From 6467c6400099dfc1d2a238d6cb60f34ab8c34223 Mon Sep 17 00:00:00 2001 From: Mikhail Treskin Date: Thu, 3 Dec 2020 12:36:34 +0300 Subject: [PATCH 001/244] Remove opset0 support and undesired passes from Interpreter backend (#1469) * Move evaluate() interface from some OPs to Interpreter * commit * Move shuffle channels reference to OP's evaluate * Add some operations missed in evaluate_node * Fix select references invocation from evaluate_node() * Activation refs (#2) * HardSigmoid * Elu * Selu * Gelu * Move to test runtime * Rollback donwgrade passes delition * Initial batch to space refs * Return opset1_upgrade * WIP: Add space to batch evaluate * Fix space to batch * add evaluates function in evaluates_map (#4) * Add space to batch evaluate * Fix crop in batch to space references * Remove vectors reallocation in evaluates for b2s and s2b * . * Add SpaceToDepth evaluate * Add depth to space evaluate * Remove code duplication depth to space evaluate * Fix some failed layer tests * Ngraph test (#3) * Remove some v0 ops & fix some tests * Fixes BatchNorm * Next * dd * s * Add dot & replace slice refs * d * dkj * Review fixes part 1 * Fixes. Part 2 * Fixes. Part 3 * Enable cells refs in evaluate map * Fix some failed layer tests * Some more fixes * Fix code style (#6) * Tests (#7) * PriorBox * Mod * NormilizeL2 * Update prior_box.hpp * Fix one hot ref call * . * Select (#8) * Select * Fix code style * Fix select messages * ReverseSeq (#9) * ReverseSeq * Select * ExtractImagePatches, Seqence * Fix Code Style * remove extra * Remove etra line@ * Add fake quantize reference * Align convolution layer tests instantiations with updated definition * Disabled some failed LPT tests * Disabled some failed LPT tests * Remove undesired changes * Update unit-test manifests + some code cleanup * Fix code style (#10) * Normalize L2 refs support (from PR #2327) * Fix code style * Apply review comments. Part 1 (#11) * Apply first part of review comments * Update onnx_import.in.cpp * Remove redundant reshape from shuffle_channels evaluate * Decompose GroupConvolution * [IE Ngraph] Fix some operation inheritance (#13) * [IE TESTS] Depth2Space * Space2Depth * ShuffleChannels * Fix ode style * Fix code style * [IE NGraph] Remove decompose op (#14) * . * Fix loosing control dependency in replace_node * Fix loosing control dependency in replace_node * Fix code style * Fix FQ references build on windows * Fix code style * Apply comments (#15) * [Ie Ngraph] Remove using v1::Add * [Ie Ngraph] Remove using v1::Mutliply * [Ie Ngraph] Remove using v1::Subtract * [Ie Ngraph] Remove using v1::Divide * [Ie Ngraph] Remove using v1::Equal * [Ie Ngraph] Remove using v1::Greater * [Ie Ngraph] Remove using v1::Greater_eq * [Ie Ngraph] Remove using v1::Less * [Ie Ngraph] Remove using v1::LessEq * [Ie Ngraph] Remove using operator+ * [Ie Ngraph] Remove using operator/ * [Ie Ngraph] Remove using operator* * [Ie Ngraph] Remove using operator- * Fix code style * Ci (#16) * Fix CentOS compilation * Revert ngraph::op::vo::Multiply removing due to OpenCV * Android fix (#17) * fix failures * Fix code style * Add (#18) * Android fix * Add * Add in opset1 upgrade pass * Add in opset1 upgrade pass * Remove v0::Add, Reverted removing v0::Multiply (#19) * Remove overloaded math operators from PyNgraph * Remove overloaded math operators from PyNgraph * Fix gna tests (#20) * Fix gna tests * Squashed commit of the following: commit 565b504c1cb8d4f21bc0cb45836e9e473a2b871e Author: Alexander Zhogov Date: Tue Oct 13 13:27:34 2020 +0300 GitHub CI: Add files_size.yml (#2570) * GitHub CI: Add files_size.yml * Update job name commit ab0fb298530152f25c7a8c5cc5ee3d6ba03d6516 Author: Vladislav Vinogradov Date: Tue Oct 13 11:37:30 2020 +0300 [IE][BUILD] Fix C5208 warning under Windows (#2628) * C++ feature in C `typedef struct` code. * The warning can be promoted to error in dependent projects. C5208: unnamed class used in typedef name cannot declare members other than non-static data members, member enumerations, or member classes commit 15a338e89ba9336038e836c7fb086cdd4fed1d7a Author: helmutg Date: Mon Oct 12 22:24:24 2020 +0200 add build option USE_SYSTEM_PUGIXML (#2502) It allows skipping inference-engine/thirdparty/pugixml and using the system copy instead. Thanks to @Osse for helping understand cmake scoping rules. Co-authored-by: Helmut Grohne commit 7ac8cd858617dd558b66b86df56aea151941288c Author: Alexander Zhogov Date: Mon Oct 12 19:23:00 2020 +0300 Azure CI: Fix nGraph ONNX commit 3a2e33962ce445369d718a8fbd36fb8e69dd5363 Author: Alexander Zhogov Date: Mon Oct 12 19:20:28 2020 +0300 Azure CI: Disable steps in nGraph ONNX commit 5835974fad10b28e6b530317a2cbbd62ec2bff8d Author: azhogov Date: Mon Oct 12 18:46:14 2020 +0300 Azure CI: Add linux_ngraph_onnx.yml * LRN Reference (#21) * Disable failed tests on ia32 * Remove redundant broadcast from MVN ref * Fix missed GatherND in opset_int_tbl + code style * Remove one extra temporary buffer from MVN ref * Merge master (#22) * Leaky relu transformation refactor (#2640) * Refactored LeakyRelu transformation * Added unit test for LeakyRelu transformation + removed duplicate test function valued_const * nGraph implementation of NMS-5 (without `evaluate()`) (#2651) * Written nGraph NMS-5 without evaluate(). * Used NGRAPH_RTTI_DECLARATION. * setupvars.sh: Updated setting pyenv error to warning. (#2663) * Fix itt build (#2662) * Loop-5 operation specification (#2291) The Loop-5 operation specification * Time tests improvements (#2642) * Remove extra functions from run_timetest.py * Add `log.debug` of raw and aggregated statistics in run_timetest.py * Implement storing of models locally for test_timetest.py * Fixed CVS-35316 (#2072) * Extend MO for operation GatherND (#2540) * Extend MO for operation GatherND * Update documentation * Rename GatherNd.py to gathernd.py Signed-off-by: Roman Kazantsev * Add hsigmoid op to ngraph (#2647) * [IE CLDNN] Fixes for GatherTree and ReverseSequence (#2660) * ReorgYolo reference implementation (#2384) * Align ReorgYolo to the spec (vector strides -> int stride) * ReorgYolo ref impl * ReorgYolo evaluate method * ReorgYolo tests * Tests update * Style apply * Add some coments * Code refactor * Comment update * Style apply * Build fix, mark evaluate as override * Revert "Align ReorgYolo to the spec (vector strides -> int stride)" * Use int_executable instead of evaluate * Use char* instead of templates * Code refactor * Comment update * Code review comment * Add constructor aligned with spec * Update shape validation * Update attributes tests * Add type_prop tests * Update backend tests * Add single layer tests * Update the spec * Remove wrong transformation test * Add ReorgYolo to evaluates_map * code style Co-authored-by: Evgeny Lazarev Co-authored-by: Vladimir Gavrilov Co-authored-by: Artyom Anokhov Co-authored-by: Andrey Somsikov Co-authored-by: Vitaliy Urusovskij Co-authored-by: Anastasiya Ageeva Co-authored-by: Roman Kazantsev Co-authored-by: iliya mironov Co-authored-by: Vladimir Paramuzov Co-authored-by: Katarzyna Mitrus * RegionYolo * Apply review comments * Merge remote-tracking branch 'upstream/master' into update_evaluates # Conflicts: # ngraph/core/src/op/mvn.cpp # ngraph/test/backend/fused_op.in.cpp # ngraph/test/runtime/ie/unit_test.manifest # ngraph/test/runtime/interpreter/int_executable.hpp # ngraph/test/runtime/interpreter/opset_int_tbl.hpp # ngraph/test/runtime/interpreter/unit_test.manifest # ngraph/test/runtime/opset0_tbl.hpp * Apply code style * Apply comments * Apply code style * Fix RegionYolo evaluate redefinition * Removed defines from evaluates map * Apply code style * Fix MVN ref * rename select reference argument * Fix code style * Fix Fake Quantize references calculation (#24) * Fix MVN ref * Fix MVN & adding NMS * Fix TI * Temporary relax comparison threshold for FQ SLT * Fix GPU LPT Tests * Add explicit rounding mode seetting in FQ references * Apply code style * Rollback op_is test deletion * Apply code style * Fix merge conflict resolving issues * Apply code style Co-authored-by: Irina Efode Co-authored-by: Anton Zaytsev Co-authored-by: Evgeny Lazarev Co-authored-by: Vladimir Gavrilov Co-authored-by: Artyom Anokhov Co-authored-by: Andrey Somsikov Co-authored-by: Vitaliy Urusovskij Co-authored-by: Anastasiya Ageeva Co-authored-by: Roman Kazantsev Co-authored-by: iliya mironov Co-authored-by: Vladimir Paramuzov Co-authored-by: Katarzyna Mitrus --- .../src/convert_function_to_cnn_network.cpp | 2 +- .../src/ie_cnn_layer_builder_ngraph.cpp | 2 +- .../algebraic_simplification.cpp | 20 +- .../plugin/cpu/bfloat16/memory_conv.cpp | 2 +- ...uantize_and_scale_shift_transformation.cpp | 19 +- .../reshape_transformation.cpp | 2 +- .../unsqueeze_transformation.cpp | 10 +- ...uantize_and_scale_shift_transformation.cpp | 17 +- .../reshape_transformation.cpp | 6 +- .../unsqueeze_transformation.cpp | 10 +- .../src/execution_graph_tests/keep_assing.cpp | 14 +- .../src/single_layer_tests/activation.cpp | 2 +- .../src/single_layer_tests/batch_to_space.cpp | 1 - .../src/single_layer_tests/fake_quantize.cpp | 7 +- .../shared/src/single_layer_tests/loop.cpp | 2 +- .../shared/src/single_layer_tests/select.cpp | 2 - .../src/single_layer_tests/space_to_batch.cpp | 1 - .../src/subgraph_tests/cascade_concat.cpp | 2 +- .../shared/src/subgraph_tests/softsign.cpp | 8 +- .../subgraph_tests/split_concat_memory.cpp | 2 +- .../layer_test_utils.cpp | 11 - .../layer_test_utils.hpp | 1 - .../tests/unit/cpu/bf16_transformer_test.cpp | 4 +- .../engines/gna/layers/gna_eltwise_test.cpp | 2 +- ngraph/core/include/ngraph/op/add.hpp | 56 +- .../core/include/ngraph/op/batch_to_space.hpp | 2 + .../core/include/ngraph/op/depth_to_space.hpp | 8 +- ngraph/core/include/ngraph/op/divide.hpp | 61 +- ngraph/core/include/ngraph/op/equal.hpp | 55 - ngraph/core/include/ngraph/op/greater.hpp | 38 - ngraph/core/include/ngraph/op/greater_eq.hpp | 38 - ngraph/core/include/ngraph/op/less.hpp | 38 - ngraph/core/include/ngraph/op/less_eq.hpp | 40 +- ngraph/core/include/ngraph/op/lstm_cell.hpp | 2 +- ngraph/core/include/ngraph/op/maximum.hpp | 39 - ngraph/core/include/ngraph/op/minimum.hpp | 39 - ngraph/core/include/ngraph/op/multiply.hpp | 10 +- ngraph/core/include/ngraph/op/not_equal.hpp | 39 - .../core/include/ngraph/op/op_version_tbl.hpp | 14 - ngraph/core/include/ngraph/op/power.hpp | 52 - ngraph/core/include/ngraph/op/select.hpp | 50 +- .../include/ngraph/op/shuffle_channels.hpp | 9 +- .../core/include/ngraph/op/space_to_batch.hpp | 3 + .../core/include/ngraph/op/space_to_depth.hpp | 9 +- ngraph/core/include/ngraph/op/subtract.hpp | 47 +- .../runtime/reference/autobroadcast_binop.hpp | 24 +- .../ngraph/runtime/reference/avg_pool.hpp | 4 +- .../ngraph/runtime/reference/convolution.hpp | 128 +- .../runtime/reference/detection_output.hpp | 10 +- .../reference/extract_image_patches.hpp | 13 +- .../runtime/reference/fake_quantize.hpp | 247 +++ .../include/ngraph/runtime/reference/mvn.hpp | 76 + .../ngraph/runtime/reference/roi_pooling.hpp | 11 +- .../ngraph/runtime/reference/select.hpp | 9 +- .../runtime/reference/squared_difference.hpp | 46 + ngraph/core/src/graph_util.cpp | 3 +- ngraph/core/src/op/add.cpp | 37 +- ngraph/core/src/op/batch_to_space.cpp | 118 ++ ngraph/core/src/op/clamp.cpp | 4 +- ngraph/core/src/op/depth_to_space.cpp | 130 +- ngraph/core/src/op/divide.cpp | 47 - .../core/src/op/embeddingbag_offsets_sum.cpp | 2 +- ngraph/core/src/op/equal.cpp | 24 - ngraph/core/src/op/fake_quantize.cpp | 16 +- ngraph/core/src/op/gelu.cpp | 6 +- ngraph/core/src/op/greater.cpp | 25 - ngraph/core/src/op/greater_eq.cpp | 25 - ngraph/core/src/op/less.cpp | 24 - ngraph/core/src/op/less_eq.cpp | 24 - ngraph/core/src/op/maximum.cpp | 23 - ngraph/core/src/op/minimum.cpp | 25 - ngraph/core/src/op/multiply.cpp | 43 +- ngraph/core/src/op/mvn.cpp | 12 +- ngraph/core/src/op/normalize_l2.cpp | 2 +- ngraph/core/src/op/not_equal.cpp | 25 - ngraph/core/src/op/power.cpp | 24 - ngraph/core/src/op/prelu.cpp | 9 +- ngraph/core/src/op/select.cpp | 42 - ngraph/core/src/op/shuffle_channels.cpp | 72 +- ngraph/core/src/op/space_to_batch.cpp | 133 ++ ngraph/core/src/op/space_to_depth.cpp | 125 +- ngraph/core/src/op/squared_difference.cpp | 4 +- ngraph/core/src/op/squeeze.cpp | 32 - ngraph/core/src/op/subtract.cpp | 32 - ngraph/core/src/op/util/op_types.cpp | 8 +- ngraph/core/src/validation_util.cpp | 1 - ngraph/frontend/onnx_import/src/op/gru.cpp | 6 +- .../onnx_import/src/utils/recurrent.cpp | 3 +- ngraph/python/src/pyngraph/node.cpp | 10 +- ngraph/test/CMakeLists.txt | 2 - ngraph/test/backend/abc.in.cpp | 8 +- ngraph/test/backend/add.in.cpp | 14 +- ngraph/test/backend/aliased_output.in.cpp | 8 +- ngraph/test/backend/api.in.cpp | 7 +- ngraph/test/backend/auto_broadcast.in.cpp | 14 +- ngraph/test/backend/comparison.in.cpp | 20 +- ngraph/test/backend/concat.in.cpp | 46 +- ngraph/test/backend/constant.in.cpp | 4 +- ngraph/test/backend/convolution.in.cpp | 37 +- ngraph/test/backend/divide.in.cpp | 14 +- ngraph/test/backend/dynamic.in.cpp | 7 +- ngraph/test/backend/function_name.in.cpp | 5 +- ngraph/test/backend/fused_op.in.cpp | 264 +-- ngraph/test/backend/gather.in.cpp | 2 +- ngraph/test/backend/group_convolution.in.cpp | 5 +- ngraph/test/backend/maximum.in.cpp | 8 +- ngraph/test/backend/minimum.in.cpp | 8 +- ngraph/test/backend/multiple_backends.in.cpp | 8 +- ngraph/test/backend/multiple_result.in.cpp | 4 +- ngraph/test/backend/multiply.in.cpp | 4 +- ngraph/test/backend/node_name.in.cpp | 4 +- ngraph/test/backend/numeric.in.cpp | 8 +- ngraph/test/backend/power.in.cpp | 2 +- ngraph/test/backend/relu.in.cpp | 4 +- ngraph/test/backend/select.in.cpp | 4 +- ngraph/test/backend/slice.in.cpp | 10 +- ngraph/test/backend/subtract.in.cpp | 6 +- ngraph/test/backend/validate_call.in.cpp | 12 +- ngraph/test/backend/zero_sized.in.cpp | 113 +- ngraph/test/backend_debug_api.cpp | 4 +- ngraph/test/build_graph.cpp | 6 +- ngraph/test/constant_folding.cpp | 69 +- ngraph/test/control_dependencies.cpp | 10 +- ngraph/test/copy.cpp | 32 +- ngraph/test/eval.cpp | 2 +- ngraph/test/input_output_assign.cpp | 2 +- .../test/models/onnx/matmul_integer.prototxt | 88 - .../models/onnx/matmul_integer_4d.prototxt | 106 - .../matmul_integer_4d_no_zero_point.prototxt | 84 - .../matmul_integer_no_zero_point.prototxt | 66 - .../onnx/matmul_integer_scalar.prototxt | 88 - .../onnx/provenance_downgrade_topk.prototxt | 77 - ngraph/test/node_input_output.cpp | 8 +- ngraph/test/onnx/onnx_import.in.cpp | 22 +- .../test/onnx/onnx_import_provenance.in.cpp | 21 - ngraph/test/onnx/onnx_import_quant.in.cpp | 185 -- ngraph/test/op.cpp | 2 +- ngraph/test/op_is.cpp | 127 +- ngraph/test/pass_shape_relevance.cpp | 2 +- ngraph/test/pattern.cpp | 197 +- ngraph/test/provenance.cpp | 150 +- ngraph/test/replace_node.cpp | 10 +- ngraph/test/runtime/backend.cpp | 1 + ngraph/test/runtime/ie/unit_test.manifest | 12 +- .../test/runtime/interpreter/CMakeLists.txt | 7 +- .../runtime/interpreter/evaluates_map.cpp | 1704 +++++++++++++++++ .../runtime/interpreter/evaluates_map.hpp | 34 + .../test/runtime/interpreter/int_backend.hpp | 1 - .../runtime/interpreter/int_executable.cpp | 364 +--- .../runtime/interpreter/int_executable.hpp | 1434 +------------- .../runtime/interpreter/opset_int_tbl.hpp | 65 +- .../reference/elu.hpp} | 30 +- .../runtime/interpreter/reference/gelu.hpp | 38 + .../runtime/interpreter/reference/grn.hpp | 34 + .../runtime/interpreter/reference/mod.hpp | 45 + .../runtime/interpreter/reference/selu.hpp | 46 + .../interpreter/reference/transpose.hpp | 63 + .../runtime/interpreter/unit_test.manifest | 23 +- ngraph/test/runtime/op/convolution.hpp | 2 +- ngraph/test/runtime/opset0_tbl.hpp | 17 +- ngraph/test/runtime/pass/opset0_downgrade.cpp | 223 --- ngraph/test/runtime/pass/opset1_upgrade.cpp | 108 +- ngraph/test/specialize_function.cpp | 28 +- ngraph/test/tensor.cpp | 8 +- ngraph/test/type_prop/binary_elementwise.cpp | 118 +- ngraph/test/type_prop/select.cpp | 72 +- ngraph/test/type_prop/ti.cpp | 4 +- ngraph/test/util.cpp | 32 +- ngraph/test/util/known_element_types.hpp | 3 +- ngraph/test/util/test_tools.cpp | 10 +- 170 files changed, 3796 insertions(+), 5222 deletions(-) create mode 100644 ngraph/core/reference/include/ngraph/runtime/reference/fake_quantize.hpp create mode 100644 ngraph/core/reference/include/ngraph/runtime/reference/mvn.hpp create mode 100644 ngraph/core/reference/include/ngraph/runtime/reference/squared_difference.hpp delete mode 100644 ngraph/test/models/onnx/matmul_integer.prototxt delete mode 100644 ngraph/test/models/onnx/matmul_integer_4d.prototxt delete mode 100644 ngraph/test/models/onnx/matmul_integer_4d_no_zero_point.prototxt delete mode 100644 ngraph/test/models/onnx/matmul_integer_no_zero_point.prototxt delete mode 100644 ngraph/test/models/onnx/matmul_integer_scalar.prototxt delete mode 100644 ngraph/test/models/onnx/provenance_downgrade_topk.prototxt create mode 100644 ngraph/test/runtime/interpreter/evaluates_map.cpp create mode 100644 ngraph/test/runtime/interpreter/evaluates_map.hpp rename ngraph/test/runtime/{opset0.hpp => interpreter/reference/elu.hpp} (65%) create mode 100644 ngraph/test/runtime/interpreter/reference/gelu.hpp create mode 100644 ngraph/test/runtime/interpreter/reference/grn.hpp create mode 100644 ngraph/test/runtime/interpreter/reference/mod.hpp create mode 100644 ngraph/test/runtime/interpreter/reference/selu.hpp create mode 100644 ngraph/test/runtime/interpreter/reference/transpose.hpp diff --git a/inference-engine/src/legacy_api/src/convert_function_to_cnn_network.cpp b/inference-engine/src/legacy_api/src/convert_function_to_cnn_network.cpp index fa80980c213652..b163cbeeaac04c 100644 --- a/inference-engine/src/legacy_api/src/convert_function_to_cnn_network.cpp +++ b/inference-engine/src/legacy_api/src/convert_function_to_cnn_network.cpp @@ -1062,7 +1062,7 @@ void convertFunctionToICNNNetwork(const std::shared_ptr>(), std::make_shared>(), std::make_shared>(), - std::make_shared>(), + std::make_shared>(), std::make_shared>(), std::make_shared>(), std::make_shared>(), diff --git a/inference-engine/src/legacy_api/src/ie_cnn_layer_builder_ngraph.cpp b/inference-engine/src/legacy_api/src/ie_cnn_layer_builder_ngraph.cpp index e6a3ca2566b4e5..50bba3d3b5fdd5 100644 --- a/inference-engine/src/legacy_api/src/ie_cnn_layer_builder_ngraph.cpp +++ b/inference-engine/src/legacy_api/src/ie_cnn_layer_builder_ngraph.cpp @@ -537,7 +537,7 @@ CNNLayer::Ptr NodeConverter::createLayer(const std::sha } template <> -CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ptr& layer) const { +CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ptr& layer) const { LayerParams params = {layer->get_friendly_name(), "Eltwise", details::convertPrecision(layer->get_output_element_type(0))}; auto res = std::make_shared(params); diff --git a/inference-engine/tests/functional/inference_engine/transformations/algebraic_simplification.cpp b/inference-engine/tests/functional/inference_engine/transformations/algebraic_simplification.cpp index 567ddda804db24..824e8d8daf73c1 100644 --- a/inference-engine/tests/functional/inference_engine/transformations/algebraic_simplification.cpp +++ b/inference-engine/tests/functional/inference_engine/transformations/algebraic_simplification.cpp @@ -36,10 +36,10 @@ TEST(algebraic_simplification, add_negative_tests) { auto c = make_shared(type, shape); auto abs_a = make_shared(a); auto iconst2 = ngraph::make_constant_from_string("2", type, shape); - auto add_a_0 = a + iconst2; - auto add_a_0_0 = add_a_0 + iconst2; - auto add_b_0 = b + abs_a; - auto add_b_0_0 = add_b_0 + abs_a; + auto add_a_0 = std::make_shared(a, iconst2); + auto add_a_0_0 = std::make_shared(add_a_0, iconst2); + auto add_b_0 = std::make_shared(b, abs_a); + auto add_b_0_0 = std::make_shared(add_b_0, abs_a); auto f = std::make_shared(ngraph::NodeVector{a, b, add_a_0_0, c, add_b_0_0}, ParameterVector{a, b, c}); @@ -63,10 +63,10 @@ TEST(algebraic_simplification, multiply_negative_tests) { auto c = make_shared(type, shape); auto abs_a = make_shared(a); auto iconst2 = ngraph::make_constant_from_string("2", type, shape); - auto add_a_0 = a * iconst2; - auto add_a_0_0 = add_a_0 * iconst2; - auto add_b_0 = b * abs_a; - auto add_b_0_0 = add_b_0 * abs_a; + auto add_a_0 = make_shared(a, iconst2); + auto add_a_0_0 = make_shared(add_a_0, iconst2); + auto add_b_0 = make_shared(b, abs_a); + auto add_b_0_0 = make_shared(add_b_0, abs_a); auto f = std::make_shared(ngraph::NodeVector{a, b, add_a_0_0, c, add_b_0_0}, ParameterVector{a, b, c}); @@ -228,7 +228,7 @@ TEST(algebraic_simplification, log_no_exp) { auto a = make_shared(element::f32, Shape{96, 100}); auto b = make_shared(element::f32, Shape{96, 100}); auto abs_a = make_shared(a); - auto div = abs_a / b; + auto div = std::make_shared(abs_a, b); auto log_div = make_shared(div); auto neg_inner = make_shared(log_div); @@ -248,7 +248,7 @@ TEST(algebraic_simplification, log_no_divide) { auto a = make_shared(element::f32, Shape{96, 100}); auto b = make_shared(element::f32, Shape{96, 100}); auto exp_a = make_shared(a); - auto mul = exp_a * b; + auto mul = make_shared(exp_a, b); auto log_mul = make_shared(mul); auto neg_inner = make_shared(log_mul); diff --git a/inference-engine/tests/functional/plugin/cpu/bfloat16/memory_conv.cpp b/inference-engine/tests/functional/plugin/cpu/bfloat16/memory_conv.cpp index ba283ab7c87003..839022a082d6c2 100644 --- a/inference-engine/tests/functional/plugin/cpu/bfloat16/memory_conv.cpp +++ b/inference-engine/tests/functional/plugin/cpu/bfloat16/memory_conv.cpp @@ -48,7 +48,7 @@ class MemoryConv : public testing::WithParamInterface(type, shape, 0); auto mem_r = make_shared(mem_i, "id"); - auto mul = make_shared(mem_r, input); + auto mul = make_shared(mem_r, input); auto sig = make_shared(mul); auto fc1_w = make_shared(type, Shape{C, C}, 1); diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/low_precision_transformations/fuse_fake_quantize_and_scale_shift_transformation.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/low_precision_transformations/fuse_fake_quantize_and_scale_shift_transformation.cpp index 0e0e430248bf16..ac65ff3ff12f31 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/low_precision_transformations/fuse_fake_quantize_and_scale_shift_transformation.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/low_precision_transformations/fuse_fake_quantize_and_scale_shift_transformation.cpp @@ -21,15 +21,16 @@ const std::vector trasformationParamValues = { }; const std::vector fakeQuantizeOnDataValues = { - { 256ul, {}, { 0.f }, { 2.55f }, { 0.f }, { 2.55f } }, - { - 256ul, - { 1ul, 3ul, 1ul, 1ul }, - { 0.f, 0.f, 0.f }, - { 2.55f / 10.f, 2.55f / 5.f, 2.55f / 2.f }, - { 0.f, 0.f, 0.f }, - { 2.55f / 10.f, 2.55f / 5.f, 2.55f / 2.f } - }, + { 256ul, {}, { 0.f }, { 2.55f }, { 0.f }, { 2.55f } } +// TODO: Issue 39810 +// { +// 256ul, +// { 1ul, 3ul, 1ul, 1ul }, +// { 0.f, 0.f, 0.f }, +// { 2.55f / 10.f, 2.55f / 5.f, 2.55f / 2.f }, +// { 0.f, 0.f, 0.f }, +// { 2.55f / 10.f, 2.55f / 5.f, 2.55f / 2.f } +// }, }; INSTANTIATE_TEST_CASE_P(smoke_LPT, FuseFakeQuantizeAndScaleShiftTransformation, diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/low_precision_transformations/reshape_transformation.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/low_precision_transformations/reshape_transformation.cpp index 397439e4e7b785..4f10d29387cc09 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/low_precision_transformations/reshape_transformation.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/low_precision_transformations/reshape_transformation.cpp @@ -26,7 +26,7 @@ const std::vector params = { { ngraph::Shape{ 1, 3, 32 }, { 1, 3, 4, 8 }, - { 256ul, ngraph::Shape{ 1, 1, 1, 1 }, { 0.f }, { 255.f }, { 0.f }, { 25.5f } }, + { 256ul, ngraph::Shape{ 1, 1, 1 }, { 0.f }, { 255.f }, { 0.f }, { 25.5f } }, }, // 4D -> 3D { diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/low_precision_transformations/unsqueeze_transformation.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/low_precision_transformations/unsqueeze_transformation.cpp index 137ff2683b01d0..de81010cf8d127 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/low_precision_transformations/unsqueeze_transformation.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/low_precision_transformations/unsqueeze_transformation.cpp @@ -24,27 +24,27 @@ namespace { const std::vector params = { { - { 256ul, ngraph::Shape { 1, 1, 1, 1 }, { -12.8f }, { 12.7f }, { -12.8f }, { 12.7f } }, + { 256ul, ngraph::Shape { 1, 1, 1 }, { -12.8f }, { 12.7f }, { -12.8f }, { 12.7f } }, { 0.0, 3.0 }, { 3, 3, 5} }, { - { 256ul, ngraph::Shape { 1, 1, 1, 1 }, { -12.8f }, { 12.7f }, { -12.8f }, { 12.7f } }, + { 256ul, ngraph::Shape { 1, 1, 1 }, { -12.8f }, { 12.7f }, { -12.8f }, { 12.7f } }, { 0.0, 1.0 }, { 3, 3, 3 } }, { - { 256ul, ngraph::Shape { 1, 1, 1, 1 }, { -12.8f }, { 12.7f }, { -12.8f }, { 12.7f } }, + { 256ul, ngraph::Shape { 1, 1, 1 }, { -12.8f }, { 12.7f }, { -12.8f }, { 12.7f } }, { 3.0 }, { 3, 4, 5, 6 } }, { - { 256ul, ngraph::Shape { 1, 1, 1, 1 }, { -12.8f }, { 12.7f }, { -12.8f }, { 12.7f } }, + { 256ul, ngraph::Shape { 1, 1, 1 }, { -12.8f }, { 12.7f }, { -12.8f }, { 12.7f } }, { 0.0, 3.0 }, { 1, 32, 2} }, { - { 256ul, ngraph::Shape { 1, 1, 1, 1 }, { -12.8f }, { 12.7f }, { -12.8f }, { 12.7f } }, + { 256ul, ngraph::Shape { 1, 1, 1 }, { -12.8f }, { 12.7f }, { -12.8f }, { 12.7f } }, { 0.0, 1.0 }, { 46, 128, 2 } } diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/low_precision_transformations/fuse_fake_quantize_and_scale_shift_transformation.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/low_precision_transformations/fuse_fake_quantize_and_scale_shift_transformation.cpp index 9cdc2bb960b80c..260c322ed4e49c 100644 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/low_precision_transformations/fuse_fake_quantize_and_scale_shift_transformation.cpp +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/low_precision_transformations/fuse_fake_quantize_and_scale_shift_transformation.cpp @@ -22,14 +22,15 @@ const std::vector trasformationParamValues = { const std::vector fakeQuantizeOnDataValues = { { 256ul, {}, { 0.f }, { 2.55f }, { 0.f }, { 2.55f } }, - { - 256ul, - { 1ul, 3ul, 1ul, 1ul }, - { 0.f, 0.f, 0.f }, - { 2.55f / 10.f, 2.55f / 5.f, 2.55f / 2.f }, - { 0.f, 0.f, 0.f }, - { 2.55f / 10.f, 2.55f / 5.f, 2.55f / 2.f } - }, +// TODO: Issue 39810 +// { +// 256ul, +// { 1ul, 3ul, 1ul, 1ul }, +// { 0.f, 0.f, 0.f }, +// { 2.55f / 10.f, 2.55f / 5.f, 2.55f / 2.f }, +// { 0.f, 0.f, 0.f }, +// { 2.55f / 10.f, 2.55f / 5.f, 2.55f / 2.f } +// }, }; INSTANTIATE_TEST_CASE_P(smoke_LPT, FuseFakeQuantizeAndScaleShiftTransformation, diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/low_precision_transformations/reshape_transformation.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/low_precision_transformations/reshape_transformation.cpp index 05914a4ce2e717..f7d811871550f5 100644 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/low_precision_transformations/reshape_transformation.cpp +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/low_precision_transformations/reshape_transformation.cpp @@ -26,19 +26,19 @@ const std::vector params = { { ngraph::Shape{ 1, 3, 32 }, { 1, 3, 4, 8 }, - { 256ul, ngraph::Shape{ 1, 1, 1, 1 }, { 0.f }, { 255.f }, { 0.f }, { 25.5f } }, + { 256ul, ngraph::Shape{ 1, 1, 1 }, { 0.f }, { 255.f }, { 0.f }, { 25.5f } }, }, // 4D -> 3D { ngraph::Shape{ 1, 3, 16, 16 }, { 1, 3, 256 }, - { 256ul, ngraph::Shape{ 1, 1, 1, 1 }, { 0.f }, { 255.f }, { 0.f }, { 25.5f } }, + { 256ul, ngraph::Shape{ 1, 1, 1 }, { 0.f }, { 255.f }, { 0.f }, { 25.5f } }, }, // 4D -> 2D { ngraph::Shape{ 1, 3, 4, 8 }, { 1, -1 }, - { 256ul, ngraph::Shape{ 1, 1, 1, 1 }, { 0.f }, { 255.f }, { 0.f }, { 25.5f } }, + { 256ul, ngraph::Shape{ 1, 1, 1 }, { 0.f }, { 255.f }, { 0.f }, { 25.5f } }, }, }; diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/low_precision_transformations/unsqueeze_transformation.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/low_precision_transformations/unsqueeze_transformation.cpp index 40c15ab7953b3c..d657debac3e2ff 100644 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/low_precision_transformations/unsqueeze_transformation.cpp +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/low_precision_transformations/unsqueeze_transformation.cpp @@ -24,27 +24,27 @@ namespace { const std::vector params = { { - { 256ul, ngraph::Shape { 1, 1, 1, 1 }, { 0.f }, { 255.f }, { -128.f }, { 127.f } }, + { 256ul, ngraph::Shape { 1, 1, 1 }, { 0.f }, { 255.f }, { -128.f }, { 127.f } }, { 0.0, 3.0 }, { 3, 3, 5} }, { - { 256ul, ngraph::Shape { 1, 1, 1, 1 }, { 0.f }, { 255.f }, { -128.f }, { 127.f } }, + { 256ul, ngraph::Shape { 1, 1, 1 }, { 0.f }, { 255.f }, { -128.f }, { 127.f } }, { 0.0, 1.0 }, { 3, 3, 3 } }, { - { 256ul, ngraph::Shape { 1, 1, 1, 1 }, { 0.f }, { 255.f }, { -128.f }, { 127.f } }, + { 256ul, ngraph::Shape { 1, 1, 1 }, { 0.f }, { 255.f }, { -128.f }, { 127.f } }, { 3.0 }, { 3, 4, 5, 6 } }, { - { 256ul, ngraph::Shape { 1, 1, 1, 1 }, { 0.f }, { 255.f }, { -128.f }, { 127.f } }, + { 256ul, ngraph::Shape { 1, 1, 1 }, { 0.f }, { 255.f }, { -128.f }, { 127.f } }, { 0.0, 3.0 }, { 1, 32, 2} }, { - { 256ul, ngraph::Shape { 1, 1, 1, 1 }, { 0.f }, { 255.f }, { -128.f }, { 127.f } }, + { 256ul, ngraph::Shape { 1, 1, 1 }, { 0.f }, { 255.f }, { -128.f }, { 127.f } }, { 0.0, 1.0 }, { 46, 128, 2 } } diff --git a/inference-engine/tests/functional/plugin/shared/src/execution_graph_tests/keep_assing.cpp b/inference-engine/tests/functional/plugin/shared/src/execution_graph_tests/keep_assing.cpp index 295629f6277302..a4da8e34831449 100644 --- a/inference-engine/tests/functional/plugin/shared/src/execution_graph_tests/keep_assing.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/execution_graph_tests/keep_assing.cpp @@ -29,13 +29,13 @@ TEST_P(ExecGraphKeepAssignNode, KeepAssignNode) { using std::make_shared; using namespace ngraph::op; - // Some simple graph with Memory(Assign) node // in read // - auto input = make_shared(type, shape); // | \ / // - auto mem_i = make_shared(type, shape, 0); // | mul // - auto mem_r = make_shared(mem_i, "id"); // | / \ // - auto mul = make_shared(mem_r, input); // sum assign // - auto mem_w = make_shared(mul, "id"); // | // - auto sum = make_shared(mul, input); // out // + // Some simple graph with Memory(Assign) node // in read // + auto input = make_shared(type, shape); // | \ / // + auto mem_i = make_shared(type, shape, 0); // | mul // + auto mem_r = make_shared(mem_i, "id"); // | / \ // + auto mul = make_shared(mem_r, input); // sum assign // + auto mem_w = make_shared(mul, "id"); // | // + auto sum = make_shared(mul, input); // out // mem_w->add_control_dependency(mem_r); sum->add_control_dependency(mem_w); diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/activation.cpp b/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/activation.cpp index 67f182762b0f14..d0fe8056b6d2b3 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/activation.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/activation.cpp @@ -198,7 +198,7 @@ void ActivationParamLayerTest::SetUp() { constantsValue = activationDecl.second; auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecision); auto params = ngraph::builder::makeParams(ngPrc, {shapes.first}); - auto activationParams = createActivationParams(ngPrc); + auto activationParams = createActivationParams(ngPrc, shapes.second); params[0]->set_friendly_name("Input"); params.insert(params.end(), activationParams.begin(), activationParams.end()); diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/batch_to_space.cpp b/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/batch_to_space.cpp index c3938d2db38894..b6748e98d65953 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/batch_to_space.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/batch_to_space.cpp @@ -43,7 +43,6 @@ std::string BatchToSpaceLayerTest::getTestCaseName(const testing::TestParamInfo< } void BatchToSpaceLayerTest::SetUp() { - SetRefMode(LayerTestsUtils::RefMode::INTERPRETER_TRANSFORMATIONS); std::vector inputShape; std::vector blockShape, cropsBegin, cropsEnd; InferenceEngine::Precision netPrecision; diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/fake_quantize.cpp b/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/fake_quantize.cpp index 511c234f1bb231..1c3bc5fd2c15c7 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/fake_quantize.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/fake_quantize.cpp @@ -26,8 +26,8 @@ /** * redefine this seed to reproduce issue with given seed that can be read from gtest logs */ -#define BASE_SEED USE_CLOCK_TIME -#define NGRAPH_SEED USE_CLOCK_TIME +#define BASE_SEED 123 +#define NGRAPH_SEED 123 namespace LayerTestsDefinitions { @@ -85,6 +85,9 @@ void FakeQuantizeLayerTest::SetUp() { inputDataMax = inputArg[1]; inputDataResolution = inputArg[2]; } + if (fqDirectArg.size() != 0) { + threshold = (fqDirectArg[3] - fqDirectArg[2]) / levels; + } auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecision); auto params = ngraph::builder::makeParams(ngPrc, {inputShape}); auto paramOuts = ngraph::helpers::convert2OutputVector(ngraph::helpers::castOps2Nodes(params)); diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/loop.cpp b/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/loop.cpp index 6cc93f1c453ee8..50f0ee590ae55f 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/loop.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/loop.cpp @@ -120,7 +120,7 @@ namespace LayerTestsDefinitions { // Body std::shared_ptr Zo = body_params[0]; for (int i = 1; i < body_params.size(); ++i) { - Zo = body_params[i] + Zo; + Zo = std::make_shared(body_params[i], Zo); } // body_params.insert(body_params.begin(), current_iteration); diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/select.cpp b/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/select.cpp index d6e405eda6b15b..52d28308ff2524 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/select.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/select.cpp @@ -37,8 +37,6 @@ namespace LayerTestsDefinitions { } void SelectLayerTest::SetUp() { - SetRefMode(LayerTestsUtils::RefMode::CONSTANT_FOLDING); - std::vector> inputShapes(numOfInputs); InferenceEngine::Precision inputPrecision; ngraph::op::AutoBroadcastSpec broadcast; diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/space_to_batch.cpp b/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/space_to_batch.cpp index d2b17821f9648f..ed576b42e0c536 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/space_to_batch.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/space_to_batch.cpp @@ -43,7 +43,6 @@ std::string SpaceToBatchLayerTest::getTestCaseName(const testing::TestParamInfo< } void SpaceToBatchLayerTest::SetUp() { - SetRefMode(LayerTestsUtils::RefMode::INTERPRETER_TRANSFORMATIONS); std::vector inputShape; std::vector blockShape, padsBegin, padsEnd; InferenceEngine::Precision inputPrecision, netPrecision; diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/cascade_concat.cpp b/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/cascade_concat.cpp index f83dde6f5a88be..53b20a7e8693db 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/cascade_concat.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/cascade_concat.cpp @@ -51,7 +51,7 @@ void CascadeConcat::SetUp() { if (multioutput) { auto const_mult = ngraph::builder::makeConstant(ngPrc, ngraph::Shape{1, input1[0][1]+input2[0][1]}, std::vector{1.01f}); - auto mult = std::make_shared(concat, const_mult); + auto mult = std::make_shared(concat, const_mult); results = ngraph::ResultVector{std::make_shared(concat2), std::make_shared(mult)}; } else { diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/softsign.cpp b/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/softsign.cpp index 0a223272e8bc10..47ffe1eb418170 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/softsign.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/softsign.cpp @@ -52,7 +52,7 @@ void SoftsignTest::SetUp() { auto abs = std::make_shared(params[0]); auto add = std::make_shared(abs, 1, 1, 1); auto power = std::make_shared(add, -1, 1, 0); - auto mul = std::make_shared(power, params[0]); + auto mul = std::make_shared(power, params[0]); ngraph::ResultVector results{ std::make_shared(mul) }; function = std::make_shared(results, params, "SoftSignTest"); } @@ -75,10 +75,10 @@ std::shared_ptr SoftsignTest::GenerateNgraphFriendlySoftSign() auto params = ngraph::builder::makeParams(ngPrc, { inputShape }); auto abs = std::make_shared(params[0]); auto constant_0 = ngraph::builder::makeConstant(ngPrc, inputShape, { 1 }); - auto add = std::make_shared(abs, constant_0); + auto add = std::make_shared(abs, constant_0); auto constant_1 = ngraph::builder::makeConstant(ngPrc, inputShape, { -1 }); - auto power = std::make_shared(add, constant_1); - auto mul = std::make_shared(power, params[0]); + auto power = std::make_shared(add, constant_1); + auto mul = std::make_shared(power, params[0]); ngraph::ResultVector results{ std::make_shared(mul) }; return std::make_shared(results, params, "SoftSignTest"); diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/split_concat_memory.cpp b/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/split_concat_memory.cpp index 2643154f6c84a3..98518f9c5517d4 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/split_concat_memory.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/split_concat_memory.cpp @@ -64,7 +64,7 @@ void SplitConcatMemory::SetUp() { auto spl = std::make_shared(cnc, axis_c, chunk_c); auto one = std::make_shared(ngPrc, ngraph::Shape{}, 1); - auto plus = std::make_shared(cnc, one, ngraph::op::AutoBroadcastSpec::NUMPY); + auto plus = std::make_shared(cnc, one, ngraph::op::AutoBroadcastSpec::NUMPY); plus->set_friendly_name("plus_one"); auto mem_w = std::make_shared(spl->output(1), "id"); diff --git a/inference-engine/tests/ie_test_utils/functional_test_utils/layer_test_utils.cpp b/inference-engine/tests/ie_test_utils/functional_test_utils/layer_test_utils.cpp index 4cbfc20959e564..8ffa066953306a 100644 --- a/inference-engine/tests/ie_test_utils/functional_test_utils/layer_test_utils.cpp +++ b/inference-engine/tests/ie_test_utils/functional_test_utils/layer_test_utils.cpp @@ -370,17 +370,6 @@ std::vector> LayerTestsCommon::CalculateRefs() { // reference inference on device with other options and nGraph function has to be implemented here break; } - case INTERPRETER_TRANSFORMATIONS: { - auto cloned_function = ngraph::clone_function(*function); - - // todo: add functionality to configure the necessary transformations for each test separately - ngraph::pass::Manager m; - m.register_pass(); - m.register_pass(); - m.run_passes(cloned_function); - expectedOutputs = ngraph::helpers::interpreterFunction(cloned_function, referenceInputs, inType, convertType); - break; - } } return expectedOutputs; diff --git a/inference-engine/tests/ie_test_utils/functional_test_utils/layer_test_utils.hpp b/inference-engine/tests/ie_test_utils/functional_test_utils/layer_test_utils.hpp index bdc1e27b209ece..20c326a4b7e496 100644 --- a/inference-engine/tests/ie_test_utils/functional_test_utils/layer_test_utils.hpp +++ b/inference-engine/tests/ie_test_utils/functional_test_utils/layer_test_utils.hpp @@ -126,7 +126,6 @@ typedef std::tuple< enum RefMode { INTERPRETER, - INTERPRETER_TRANSFORMATIONS, CONSTANT_FOLDING, IE }; diff --git a/inference-engine/tests/unit/cpu/bf16_transformer_test.cpp b/inference-engine/tests/unit/cpu/bf16_transformer_test.cpp index 2678f2fa808b9a..8c04570b41ee0c 100644 --- a/inference-engine/tests/unit/cpu/bf16_transformer_test.cpp +++ b/inference-engine/tests/unit/cpu/bf16_transformer_test.cpp @@ -68,7 +68,7 @@ TEST(BF16TransformerTest, KeepMemoryPrecision) { auto mem_r = make_shared(mem_i, "id"); mem_r->set_friendly_name("mem_r"); - auto mul = make_shared(mem_r, input); + auto mul = make_shared(mem_r, input); auto sig = make_shared(mul); auto fc1_w = make_shared(type, Shape{2, 2}, 1); @@ -131,7 +131,7 @@ TEST(BF16TransformerTest, DISABLED_KeepMemoryPrecisionWithGEMM) { auto mem_r = make_shared(mem_i, "id"); mem_r->set_friendly_name("mem_r"); - auto mul = make_shared(mem_r, input); + auto mul = make_shared(mem_r, input); auto sig = make_shared(mul); auto fc1_w = make_shared(type, Shape{2, 2}, 1); diff --git a/inference-engine/tests_deprecated/unit/engines/gna/layers/gna_eltwise_test.cpp b/inference-engine/tests_deprecated/unit/engines/gna/layers/gna_eltwise_test.cpp index 2b42d355a03f3c..d652768896524c 100644 --- a/inference-engine/tests_deprecated/unit/engines/gna/layers/gna_eltwise_test.cpp +++ b/inference-engine/tests_deprecated/unit/engines/gna/layers/gna_eltwise_test.cpp @@ -69,7 +69,7 @@ class GNAEltwiseTest : public GNATest<>, public testing::WithParamInterface(FC2, reshape_pattern, false); } - auto add = std::make_shared(FC1, FC2); + auto add = std::make_shared(FC1, FC2); auto function = std::make_shared(ngraph::NodeVector{ add }, ngraph::ParameterVector{input1, input2}); diff --git a/ngraph/core/include/ngraph/op/add.hpp b/ngraph/core/include/ngraph/op/add.hpp index 73a4824d801698..f5836c567b5266 100644 --- a/ngraph/core/include/ngraph/op/add.hpp +++ b/ngraph/core/include/ngraph/op/add.hpp @@ -24,48 +24,6 @@ namespace ngraph { namespace op { - namespace v0 - { - /// \brief Elementwise addition operation. - /// - class NGRAPH_DEPRECATED( - "This operation is deprecated and will be removed soon. Use v1::Add instead of it.") - NGRAPH_API Add : public util::BinaryElementwiseArithmetic - { - NGRAPH_SUPPRESS_DEPRECATED_START - public: - static constexpr NodeTypeInfo type_info{"Add", 0}; - const NodeTypeInfo& get_type_info() const override { return type_info; } - /// \brief Constructs an uninitialized addition operation - Add() - : util::BinaryElementwiseArithmetic(AutoBroadcastSpec::NONE) - { - } - - /// \brief Constructs an addition operation. - /// - /// \param arg0 Output that produces the first input tensor.
- /// `[d0, ...]` - /// \param arg1 Output that produces the second input tensor.
- /// `[d0, ...]` - /// \param auto_broadcast Auto broadcast specification - /// - /// Output `[d0, ...]` - /// - Add(const Output& arg0, - const Output& arg1, - const AutoBroadcastSpec& auto_broadcast = AutoBroadcastSpec()); - - std::shared_ptr - clone_with_new_inputs(const OutputVector& new_args) const override; - - bool visit_attributes(AttributeVisitor& visitor) override; - bool evaluate(const HostTensorVector& outputs, - const HostTensorVector& inputs) const override; - NGRAPH_SUPPRESS_DEPRECATED_END - }; - } // namespace v0 - namespace v1 { /// \brief Elementwise addition operation. @@ -99,19 +57,13 @@ namespace ngraph std::shared_ptr clone_with_new_inputs(const OutputVector& new_args) const override; + bool visit_attributes(AttributeVisitor& visitor) override; + size_t get_version() const override { return 1; } bool evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const override; }; - } // namespace v1 - NGRAPH_SUPPRESS_DEPRECATED_START - using v0::Add; - NGRAPH_SUPPRESS_DEPRECATED_END - } // namespace op - - NGRAPH_DEPRECATED("This operator was deprecated and will be removed with v0 operation.") - NGRAPH_API - std::shared_ptr operator+(const Output& arg0, const Output& arg1); -} // namespace ngraph + } // namespace op +} // namespace ngraph \ No newline at end of file diff --git a/ngraph/core/include/ngraph/op/batch_to_space.hpp b/ngraph/core/include/ngraph/op/batch_to_space.hpp index 8b3433a4052bd1..e48d9e8e0a9085 100644 --- a/ngraph/core/include/ngraph/op/batch_to_space.hpp +++ b/ngraph/core/include/ngraph/op/batch_to_space.hpp @@ -54,6 +54,8 @@ namespace ngraph const Output& block_shape, const Output& crops_begin, const Output& crops_end); + bool evaluate(const HostTensorVector& outputs, + const HostTensorVector& inputs) const override; void validate_and_infer_types() override; std::shared_ptr diff --git a/ngraph/core/include/ngraph/op/depth_to_space.hpp b/ngraph/core/include/ngraph/op/depth_to_space.hpp index 191050f706f2e2..19deb75df5f65d 100644 --- a/ngraph/core/include/ngraph/op/depth_to_space.hpp +++ b/ngraph/core/include/ngraph/op/depth_to_space.hpp @@ -20,6 +20,7 @@ #include "ngraph/op/op.hpp" #include "ngraph/op/util/attr_types.hpp" #include "ngraph/op/util/fused_op.hpp" +#include "ngraph/runtime/host_tensor.hpp" NGRAPH_SUPPRESS_DEPRECATED_START @@ -37,7 +38,7 @@ namespace ngraph /// /// Output node produces a tensor with shape: /// [N, C/(blocksize * blocksize), H * blocksize, W * blocksize] - class NGRAPH_API DepthToSpace : public ngraph::op::util::FusedOp + class NGRAPH_API DepthToSpace : public Op { public: NGRAPH_RTTI_DECLARATION; @@ -68,10 +69,11 @@ namespace ngraph std::size_t get_block_size() const { return m_blocksize; } DepthToSpaceMode get_mode() const { return m_mode; } - virtual OutputVector decompose_op() const override; - virtual std::shared_ptr clone_with_new_inputs(const OutputVector& new_args) const override; + void validate_and_infer_types() override; + bool evaluate(const HostTensorVector& outputs, + const HostTensorVector& inputs) const override; protected: std::size_t m_blocksize; diff --git a/ngraph/core/include/ngraph/op/divide.hpp b/ngraph/core/include/ngraph/op/divide.hpp index 36e6aaa52f3047..fdaef3a49b58e5 100644 --- a/ngraph/core/include/ngraph/op/divide.hpp +++ b/ngraph/core/include/ngraph/op/divide.hpp @@ -22,57 +22,6 @@ namespace ngraph { namespace op { - namespace v0 - { - /// \brief Elementwise division operation. - class NGRAPH_DEPRECATED( - "This operation is deprecated and will be removed soon. " - "Use v1::Divide instead of it.") NGRAPH_API Divide - : public util::BinaryElementwiseArithmetic - { - NGRAPH_SUPPRESS_DEPRECATED_START - public: - static constexpr NodeTypeInfo type_info{"Divide", 0}; - const NodeTypeInfo& get_type_info() const override { return type_info; } - /// \brief Constructs a division operation. - Divide() - : util::BinaryElementwiseArithmetic(AutoBroadcastSpec::NONE) - { - } - /// \brief Constructs a division operation. - /// - /// \param arg0 Node that produces the first input tensor. - /// \param arg1 Node that produces the second input tensor. - /// \param pythondiv Use Python style rounding for integral type - /// \param auto_broadcast Auto broadcast specification - Divide(const Output& arg0, - const Output& arg1, - bool pythondiv, - const AutoBroadcastSpec& auto_broadcast = AutoBroadcastSpec()); - - /// \brief Constructs a division operation. - /// - /// \param arg0 Node that produces the first input tensor. - /// \param arg1 Node that produces the second input tensor. - /// \param auto_broadcast Auto broadcast specification - Divide(const Output& arg0, - const Output& arg1, - const AutoBroadcastSpec& auto_broadcast = AutoBroadcastSpec()); - bool visit_attributes(AttributeVisitor& visitor) override; - bool is_pythondiv() const { return m_pythondiv; } - void set_is_pythondiv(bool pythondiv) { m_pythondiv = pythondiv; } - virtual std::shared_ptr - clone_with_new_inputs(const OutputVector& new_args) const override; - - bool evaluate(const HostTensorVector& outputs, - const HostTensorVector& inputs) const override; - - protected: - bool m_pythondiv{true}; - NGRAPH_SUPPRESS_DEPRECATED_END - }; - } // namespace v0 - namespace v1 { /// \brief Elementwise division operation. @@ -121,13 +70,5 @@ namespace ngraph bool m_pythondiv{true}; }; } // namespace v1 - - NGRAPH_SUPPRESS_DEPRECATED_START - using v0::Divide; - NGRAPH_SUPPRESS_DEPRECATED_END - } // namespace op - - NGRAPH_DEPRECATED("This operator was deprecated and will be removed with v0 operation.") - NGRAPH_API - std::shared_ptr operator/(const Output& arg0, const Output& arg1); + } // namespace op } // namespace ngraph diff --git a/ngraph/core/include/ngraph/op/equal.hpp b/ngraph/core/include/ngraph/op/equal.hpp index bbb7255c199e22..4b9edc72685c37 100644 --- a/ngraph/core/include/ngraph/op/equal.hpp +++ b/ngraph/core/include/ngraph/op/equal.hpp @@ -22,57 +22,6 @@ namespace ngraph { namespace op { - namespace v0 - { - // clang-format off - /// \brief Elementwise is-equal operation. - /// - /// ## Inputs - /// - /// | | Type | Description | - /// | ------ | --------------------------------- | ------------------------------------------------------ | - /// | `arg0` | \f$E[d_1,\dots,d_n]~(n \geq 0)\f$ | A tensor of any shape and element type. | - /// | `arg1` | \f$E[d_1,\dots,d_n]~(n \geq 0)\f$ | A tensor of the same shape and element type as `arg0`. | - /// | `autob`| AutoBroadcastSpec | Auto broadcast specification. | - /// - /// ## Output - /// - /// | Type | Description | - /// | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | - /// | \f$\texttt{bool}[d_1,\dots,d_n]\f$ | The tensor \f$T\f$, where \f$T[i_1,\dots,i_n] = 1\text{ if }\texttt{arg0}[i_1,\dots,i_n] = \texttt{arg1}[i_1,\dots,i_n]\text{, else } 0\f$ | - // clang-format on - class NGRAPH_DEPRECATED( - "This operation is deprecated and will be removed soon. " - "Use v1::Equal instead of it.") NGRAPH_API Equal - : public util::BinaryElementwiseComparison - { - NGRAPH_SUPPRESS_DEPRECATED_START - public: - static constexpr NodeTypeInfo type_info{"Equal", 0}; - const NodeTypeInfo& get_type_info() const override { return type_info; } - /// \brief Constructs an equal operation. - Equal() - : util::BinaryElementwiseComparison(AutoBroadcastSpec::NONE) - { - } - /// \brief Constructs an equal operation. - /// - /// \param arg0 Node that produces the first input tensor. - /// \param arg1 Node that produces the second input tensor. - /// \param auto_broadcast Auto broadcast specification - Equal(const Output& arg0, - const Output& arg1, - const AutoBroadcastSpec& auto_broadcast = AutoBroadcastSpec()); - - virtual std::shared_ptr - clone_with_new_inputs(const OutputVector& new_args) const override; - - bool evaluate(const HostTensorVector& outputs, - const HostTensorVector& inputs) const override; - NGRAPH_SUPPRESS_DEPRECATED_END - }; - } // namespace v0 - namespace v1 { // clang-format off @@ -118,9 +67,5 @@ namespace ngraph const HostTensorVector& inputs) const override; }; } // namespace v1 - - NGRAPH_SUPPRESS_DEPRECATED_START - using v0::Equal; - NGRAPH_SUPPRESS_DEPRECATED_END } } diff --git a/ngraph/core/include/ngraph/op/greater.hpp b/ngraph/core/include/ngraph/op/greater.hpp index 8cc0330f7b9610..ee55920c63baf4 100644 --- a/ngraph/core/include/ngraph/op/greater.hpp +++ b/ngraph/core/include/ngraph/op/greater.hpp @@ -22,40 +22,6 @@ namespace ngraph { namespace op { - namespace v0 - { - /// \brief Elementwise greater-than operation. - class NGRAPH_DEPRECATED( - "This operation is deprecated and will be removed soon. " - "Use v1::Greater instead of it.") NGRAPH_API Greater - : public util::BinaryElementwiseComparison - { - NGRAPH_SUPPRESS_DEPRECATED_START - public: - static constexpr NodeTypeInfo type_info{"Greater", 0}; - const NodeTypeInfo& get_type_info() const override { return type_info; } - /// \brief Constructs a greater-than operation. - Greater() - : util::BinaryElementwiseComparison(AutoBroadcastSpec::NONE) - { - } - /// \brief Constructs a greater-than operation. - /// - /// \param arg0 Node that produces the first input tensor. - /// \param arg1 Node that produces the second input tensor. - /// \param auto_broadcast Auto broadcast specification - Greater(const Output& arg0, - const Output& arg1, - const AutoBroadcastSpec& auto_broadcast = AutoBroadcastSpec()); - - virtual std::shared_ptr - clone_with_new_inputs(const OutputVector& new_args) const override; - bool evaluate(const HostTensorVector& outputs, - const HostTensorVector& inputs) const override; - NGRAPH_SUPPRESS_DEPRECATED_END - }; - } // namespace v0 - namespace v1 { /// \brief Elementwise greater-than operation. @@ -84,9 +50,5 @@ namespace ngraph const HostTensorVector& inputs) const override; }; } // namespace v1 - - NGRAPH_SUPPRESS_DEPRECATED_START - using v0::Greater; - NGRAPH_SUPPRESS_DEPRECATED_END } } diff --git a/ngraph/core/include/ngraph/op/greater_eq.hpp b/ngraph/core/include/ngraph/op/greater_eq.hpp index 548463d74a88d3..de4b79f0e55f74 100644 --- a/ngraph/core/include/ngraph/op/greater_eq.hpp +++ b/ngraph/core/include/ngraph/op/greater_eq.hpp @@ -22,40 +22,6 @@ namespace ngraph { namespace op { - namespace v0 - { - /// \brief Elementwise greater-than-or-equal operation. - class NGRAPH_DEPRECATED( - "This operation is deprecated and will be removed soon. " - "Use v1::GreaterEqual instead of it.") NGRAPH_API GreaterEq - : public util::BinaryElementwiseComparison - { - NGRAPH_SUPPRESS_DEPRECATED_START - public: - static constexpr NodeTypeInfo type_info{"GreaterEq", 0}; - const NodeTypeInfo& get_type_info() const override { return type_info; } - /// \brief Constructs a greater-than-or-equal operation. - GreaterEq() - : util::BinaryElementwiseComparison(AutoBroadcastSpec::NONE) - { - } - /// \brief Constructs a greater-than-or-equal operation. - /// - /// \param arg0 Node that produces the first input tensor. - /// \param arg1 Node that produces the second input tensor. - /// \param auto_broadcast Auto broadcast specification - GreaterEq(const Output& arg0, - const Output& arg1, - const AutoBroadcastSpec& auto_broadcast = AutoBroadcastSpec()); - - virtual std::shared_ptr - clone_with_new_inputs(const OutputVector& new_args) const override; - bool evaluate(const HostTensorVector& outputs, - const HostTensorVector& inputs) const override; - NGRAPH_SUPPRESS_DEPRECATED_END - }; - } // namespace v0 - namespace v1 { /// \brief Elementwise greater-than-or-equal operation. @@ -84,9 +50,5 @@ namespace ngraph const HostTensorVector& inputs) const override; }; } // namespace v1 - - NGRAPH_SUPPRESS_DEPRECATED_START - using v0::GreaterEq; - NGRAPH_SUPPRESS_DEPRECATED_END } } diff --git a/ngraph/core/include/ngraph/op/less.hpp b/ngraph/core/include/ngraph/op/less.hpp index 56b5e7f9d402f3..fcaa5e505f0b4b 100644 --- a/ngraph/core/include/ngraph/op/less.hpp +++ b/ngraph/core/include/ngraph/op/less.hpp @@ -22,40 +22,6 @@ namespace ngraph { namespace op { - namespace v0 - { - /// \brief Elementwise less-than operation. - class NGRAPH_DEPRECATED( - "This operation is deprecated and will be removed soon. " - "Use v1::Less instead of it.") NGRAPH_API Less - : public util::BinaryElementwiseComparison - { - NGRAPH_SUPPRESS_DEPRECATED_START - public: - static constexpr NodeTypeInfo type_info{"Less", 0}; - const NodeTypeInfo& get_type_info() const override { return type_info; } - /// \brief Constructs a less-than operation. - Less() - : util::BinaryElementwiseComparison(AutoBroadcastSpec::NONE) - { - } - /// \brief Constructs a less-than operation. - /// - /// \param arg0 Node that produces the first input tensor. - /// \param arg1 Node that produces the second input tensor. - /// \param auto_broadcast Auto broadcast specification - Less(const Output& arg0, - const Output& arg1, - const AutoBroadcastSpec& auto_broadcast = AutoBroadcastSpec()); - - virtual std::shared_ptr - clone_with_new_inputs(const OutputVector& new_args) const override; - bool evaluate(const HostTensorVector& outputs, - const HostTensorVector& inputs) const override; - NGRAPH_SUPPRESS_DEPRECATED_END - }; - } // namespace v0 - namespace v1 { /// \brief Elementwise less-than operation. @@ -84,9 +50,5 @@ namespace ngraph const HostTensorVector& inputs) const override; }; } // namespace v1 - - NGRAPH_SUPPRESS_DEPRECATED_START - using v0::Less; - NGRAPH_SUPPRESS_DEPRECATED_END } } diff --git a/ngraph/core/include/ngraph/op/less_eq.hpp b/ngraph/core/include/ngraph/op/less_eq.hpp index 999d972575f3c6..c87fe31f030a59 100644 --- a/ngraph/core/include/ngraph/op/less_eq.hpp +++ b/ngraph/core/include/ngraph/op/less_eq.hpp @@ -51,43 +51,5 @@ namespace ngraph const HostTensorVector& inputs) const override; }; } // namespace v1 - - namespace v0 - { - /// \brief Elementwise less-than-or-equal operation. - class NGRAPH_DEPRECATED( - "This operation is deprecated and will be removed soon. " - "Use v1::LessEqual instead of it.") NGRAPH_API LessEq - : public util::BinaryElementwiseComparison - { - NGRAPH_SUPPRESS_DEPRECATED_START - public: - static constexpr NodeTypeInfo type_info{"LessEq", 0}; - const NodeTypeInfo& get_type_info() const override { return type_info; } - /// \brief Constructs a less-than-or-equal operation. - LessEq() - : util::BinaryElementwiseComparison(AutoBroadcastSpec::NONE) - { - } - /// \brief Constructs a less-than-or-equal operation. - /// - /// \param arg0 Node that produces the first input tensor. - /// \param arg1 Node that produces the second input tensor. - /// \param auto_broadcast Auto broadcast specification - LessEq(const Output& arg0, - const Output& arg1, - const AutoBroadcastSpec& auto_broadcast = AutoBroadcastSpec()); - - virtual std::shared_ptr - clone_with_new_inputs(const OutputVector& new_args) const override; - bool evaluate(const HostTensorVector& outputs, - const HostTensorVector& inputs) const override; - NGRAPH_SUPPRESS_DEPRECATED_END - }; - } // namespace v0 - - NGRAPH_SUPPRESS_DEPRECATED_START - using v0::LessEq; - NGRAPH_SUPPRESS_DEPRECATED_END - } // namespace op + } // namespace op } // namespace ngraph diff --git a/ngraph/core/include/ngraph/op/lstm_cell.hpp b/ngraph/core/include/ngraph/op/lstm_cell.hpp index 9b6885d207ca5a..0c3957c7ecc2fe 100644 --- a/ngraph/core/include/ngraph/op/lstm_cell.hpp +++ b/ngraph/core/include/ngraph/op/lstm_cell.hpp @@ -401,7 +401,7 @@ namespace ngraph static constexpr std::size_t s_gates_count{4}; }; - } // v1 + } // v4 } // namespace op NGRAPH_API diff --git a/ngraph/core/include/ngraph/op/maximum.hpp b/ngraph/core/include/ngraph/op/maximum.hpp index 438e7a0313c2e0..19b3f2d45a05c3 100644 --- a/ngraph/core/include/ngraph/op/maximum.hpp +++ b/ngraph/core/include/ngraph/op/maximum.hpp @@ -22,41 +22,6 @@ namespace ngraph { namespace op { - namespace v0 - { - /// \brief Elementwise maximum operation. - class NGRAPH_DEPRECATED( - "This operation is deprecated and will be removed soon. " - "Use v1::Maximum instead of it.") NGRAPH_API Maximum - : public util::BinaryElementwiseArithmetic - { - NGRAPH_SUPPRESS_DEPRECATED_START - public: - static constexpr NodeTypeInfo type_info{"Maximum", 0}; - const NodeTypeInfo& get_type_info() const override { return type_info; } - /// \brief Constructs a maximum operation. - Maximum() - : util::BinaryElementwiseArithmetic(AutoBroadcastSpec::NONE) - { - } - /// \brief Constructs a maximum operation. - /// - /// \param arg0 Node that produces the first input tensor. - /// \param arg1 Node that produces the second input tensor. - /// \param auto_broadcast Auto broadcast specification - Maximum(const Output& arg0, - const Output& arg1, - const AutoBroadcastSpec& auto_broadcast = AutoBroadcastSpec()); - - virtual std::shared_ptr - clone_with_new_inputs(const OutputVector& new_args) const override; - - bool evaluate(const HostTensorVector& outputs, - const HostTensorVector& inputs) const override; - NGRAPH_SUPPRESS_DEPRECATED_END - }; - } // namespace v0 - namespace v1 { /// \brief Elementwise maximum operation. @@ -88,9 +53,5 @@ namespace ngraph const HostTensorVector& inputs) const override; }; } // namespace v1 - - NGRAPH_SUPPRESS_DEPRECATED_START - using v0::Maximum; - NGRAPH_SUPPRESS_DEPRECATED_END } } diff --git a/ngraph/core/include/ngraph/op/minimum.hpp b/ngraph/core/include/ngraph/op/minimum.hpp index 3611fa0fa79fdf..f053bbccef46b4 100644 --- a/ngraph/core/include/ngraph/op/minimum.hpp +++ b/ngraph/core/include/ngraph/op/minimum.hpp @@ -22,41 +22,6 @@ namespace ngraph { namespace op { - namespace v0 - { - /// \brief Elementwise minimum operation. - class NGRAPH_DEPRECATED( - "This operation is deprecated and will be removed soon. " - "Use v1::Minimum instead of it.") NGRAPH_API Minimum - : public util::BinaryElementwiseArithmetic - { - NGRAPH_SUPPRESS_DEPRECATED_START - public: - static constexpr NodeTypeInfo type_info{"Minimum", 0}; - const NodeTypeInfo& get_type_info() const override { return type_info; } - /// \brief Constructs a minimum operation. - Minimum() - : util::BinaryElementwiseArithmetic(AutoBroadcastSpec::NONE) - { - } - /// \brief Constructs a minimum operation. - /// - /// \param arg0 Node that produces the first input tensor. - /// \param arg1 Node that produces the second input tensor. - /// \param auto_broadcast Auto broadcast specification - Minimum(const Output& arg0, - const Output& arg1, - const AutoBroadcastSpec& auto_broadcast = AutoBroadcastSpec()); - - virtual std::shared_ptr - clone_with_new_inputs(const OutputVector& new_args) const override; - - bool evaluate(const HostTensorVector& outputs, - const HostTensorVector& inputs) const override; - NGRAPH_SUPPRESS_DEPRECATED_END - }; - } // namespace v0 - namespace v1 { /// \brief Elementwise minimum operation. @@ -88,9 +53,5 @@ namespace ngraph const HostTensorVector& inputs) const override; }; } // namespace v1 - - NGRAPH_SUPPRESS_DEPRECATED_START - using v0::Minimum; - NGRAPH_SUPPRESS_DEPRECATED_END } } diff --git a/ngraph/core/include/ngraph/op/multiply.hpp b/ngraph/core/include/ngraph/op/multiply.hpp index b685adea0d7a5b..2eab5b106cf39c 100644 --- a/ngraph/core/include/ngraph/op/multiply.hpp +++ b/ngraph/core/include/ngraph/op/multiply.hpp @@ -88,13 +88,5 @@ namespace ngraph const HostTensorVector& inputs) const override; }; } // namespace v1 - - NGRAPH_SUPPRESS_DEPRECATED_START - using v0::Multiply; - NGRAPH_SUPPRESS_DEPRECATED_END - } // namespace op - - NGRAPH_DEPRECATED("This operator was deprecated and will be removed with v0 operation.") - NGRAPH_API - std::shared_ptr operator*(const Output& arg0, const Output& arg1); + } // namespace op } // namespace ngraph diff --git a/ngraph/core/include/ngraph/op/not_equal.hpp b/ngraph/core/include/ngraph/op/not_equal.hpp index 19ccd637bb631b..dfd551ddbefdca 100644 --- a/ngraph/core/include/ngraph/op/not_equal.hpp +++ b/ngraph/core/include/ngraph/op/not_equal.hpp @@ -22,41 +22,6 @@ namespace ngraph { namespace op { - namespace v0 - { - /// \brief Elementwise not-equal operation. - class NGRAPH_DEPRECATED( - "This operation is deprecated and will be removed soon. " - "Use v1::NotEqual instead of it.") NGRAPH_API NotEqual - : public util::BinaryElementwiseComparison - { - NGRAPH_SUPPRESS_DEPRECATED_START - public: - static constexpr NodeTypeInfo type_info{"NotEqual", 0}; - const NodeTypeInfo& get_type_info() const override { return type_info; } - /// \brief Constructs a not-equal operation. - NotEqual() - : util::BinaryElementwiseComparison(AutoBroadcastSpec::NONE) - { - } - /// \brief Constructs a not-equal operation. - /// - /// \param arg0 Node that produces the first input tensor. - /// \param arg1 Node that produces the second input tensor. - /// \param auto_broadcast Auto broadcast specification - NotEqual(const Output& arg0, - const Output& arg1, - const AutoBroadcastSpec& auto_broadcast = AutoBroadcastSpec()); - - virtual std::shared_ptr - clone_with_new_inputs(const OutputVector& new_args) const override; - - bool evaluate(const HostTensorVector& outputs, - const HostTensorVector& inputs) const override; - NGRAPH_SUPPRESS_DEPRECATED_END - }; - } // namespace v0 - namespace v1 { /// \brief Elementwise not-equal operation. @@ -86,9 +51,5 @@ namespace ngraph const HostTensorVector& inputs) const override; }; } // namespace v1 - - NGRAPH_SUPPRESS_DEPRECATED_START - using v0::NotEqual; - NGRAPH_SUPPRESS_DEPRECATED_END } } diff --git a/ngraph/core/include/ngraph/op/op_version_tbl.hpp b/ngraph/core/include/ngraph/op/op_version_tbl.hpp index 9b65f94d195d6b..c87a4cd0fcb250 100644 --- a/ngraph/core/include/ngraph/op/op_version_tbl.hpp +++ b/ngraph/core/include/ngraph/op/op_version_tbl.hpp @@ -31,7 +31,6 @@ NGRAPH_SUPPRESS_DEPRECATED_START NGRAPH_OP(Abs, ngraph::op::v0, 0) NGRAPH_OP(Acos, ngraph::op::v0, 0) NGRAPH_OP(Acosh, ngraph::op::v3, 3) -NGRAPH_OP(Add, ngraph::op::v0, 0) NGRAPH_OP(Add, ngraph::op::v1, 1) NGRAPH_OP(Asin, ngraph::op::v0, 0) NGRAPH_OP(Asinh, ngraph::op::v3, 3) @@ -60,13 +59,11 @@ NGRAPH_OP(DeformableConvolution, ngraph::op::v1, 1) NGRAPH_OP(DeformablePSROIPooling, ngraph::op::v1, 1) NGRAPH_OP(DepthToSpace, ngraph::op::v0, 0) NGRAPH_OP(DetectionOutput, ngraph::op::v0, 0) -NGRAPH_OP(Divide, ngraph::op::v0, 0) NGRAPH_OP(Divide, ngraph::op::v1, 1) NGRAPH_OP(Elu, ngraph::op::v0, 0) NGRAPH_OP(EmbeddingBagOffsetsSum, ngraph::op::v3, 3) NGRAPH_OP(EmbeddingBagPackedSum, ngraph::op::v3, 3) NGRAPH_OP(EmbeddingSegmentsSum, ngraph::op::v3, 3) -NGRAPH_OP(Equal, ngraph::op::v0, 0) NGRAPH_OP(Equal, ngraph::op::v1, 1) NGRAPH_OP(Erf, ngraph::op::v0, 0) NGRAPH_OP(Exp, ngraph::op::v0, 0) @@ -80,9 +77,7 @@ NGRAPH_OP(Gather, ngraph::op::v1, 1) NGRAPH_OP(GatherND, ngraph::op::v5, 5) NGRAPH_OP(GatherTree, ngraph::op::v1, 1) NGRAPH_OP(Gelu, ngraph::op::v0, 0) -NGRAPH_OP(Greater, ngraph::op::v0, 0) NGRAPH_OP(Greater, ngraph::op::v1, 1) -NGRAPH_OP(GreaterEq, ngraph::op::v0, 0) NGRAPH_OP(GreaterEqual, ngraph::op::v1, 1) NGRAPH_OP(GroupConvolution, ngraph::op::v1, 1) NGRAPH_OP(GroupConvolutionBackpropData, ngraph::op::v1, 1) @@ -92,9 +87,7 @@ NGRAPH_OP(Interpolate, ngraph::op::v4, 4) NGRAPH_OP(LRN, ngraph::op::v0, 0) NGRAPH_OP(LSTMCell, ngraph::op::v0, 0) NGRAPH_OP(LSTMSequence, ngraph::op::v0, 0) -NGRAPH_OP(Less, ngraph::op::v0, 0) NGRAPH_OP(Less, ngraph::op::v1, 1) -NGRAPH_OP(LessEq, ngraph::op::v0, 0) NGRAPH_OP(LessEqual, ngraph::op::v1, 1) NGRAPH_OP(Log, ngraph::op::v0, 0) NGRAPH_OP(LogicalAnd, ngraph::op::v1, 1) @@ -104,26 +97,21 @@ NGRAPH_OP(LogicalXor, ngraph::op::v1, 1) NGRAPH_OP(MVN, ngraph::op::v0, 0) NGRAPH_OP(MatMul, ngraph::op::v0, 0) NGRAPH_OP(MaxPool, ngraph::op::v1, 1) -NGRAPH_OP(Maximum, ngraph::op::v0, 0) NGRAPH_OP(Maximum, ngraph::op::v1, 1) -NGRAPH_OP(Minimum, ngraph::op::v0, 0) NGRAPH_OP(Minimum, ngraph::op::v1, 1) NGRAPH_OP(Mod, ngraph::op::v1, 1) -NGRAPH_OP(Multiply, ngraph::op::v0, 0) NGRAPH_OP(Multiply, ngraph::op::v1, 1) NGRAPH_OP(Negative, ngraph::op::v0, 0) NGRAPH_OP(NonMaxSuppression, ngraph::op::v1, 1) NGRAPH_OP(NonMaxSuppression, ngraph::op::v3, 3) NGRAPH_OP(NonZero, ngraph::op::v3, 3) NGRAPH_OP(NormalizeL2, ngraph::op::v0, 0) -NGRAPH_OP(NotEqual, ngraph::op::v0, 0) NGRAPH_OP(NotEqual, ngraph::op::v1, 1) NGRAPH_OP(OneHot, ngraph::op::v1, 1) NGRAPH_OP(PRelu, ngraph::op::v0, 0) NGRAPH_OP(PSROIPooling, ngraph::op::v0, 0) NGRAPH_OP(Pad, ngraph::op::v1, 1) NGRAPH_OP(Parameter, ngraph::op::v0, 0) -NGRAPH_OP(Power, ngraph::op::v0, 0) NGRAPH_OP(Power, ngraph::op::v1, 1) NGRAPH_OP(PriorBox, ngraph::op::v0, 0) NGRAPH_OP(PriorBoxClustered, ngraph::op::v0, 0) @@ -150,7 +138,6 @@ NGRAPH_OP(Round, ngraph::op::v5, 5) NGRAPH_OP(ROIAlign, ngraph::op::v3, 3) NGRAPH_OP(ScatterElementsUpdate, ngraph::op::v3, 3) NGRAPH_OP(ScatterUpdate, ngraph::op::v3, 3) -NGRAPH_OP(Select, ngraph::op::v0, 0) NGRAPH_OP(Select, ngraph::op::v1, 1) NGRAPH_OP(Selu, ngraph::op::v0, 0) NGRAPH_OP(ShapeOf, ngraph::op::v0, 0) @@ -168,7 +155,6 @@ NGRAPH_OP(Sqrt, ngraph::op::v0, 0) NGRAPH_OP(SquaredDifference, ngraph::op::v0, 0) NGRAPH_OP(Squeeze, ngraph::op::v0, 0) NGRAPH_OP(StridedSlice, ngraph::op::v1, 1) -NGRAPH_OP(Subtract, ngraph::op::v0, 0) NGRAPH_OP(Subtract, ngraph::op::v1, 1) NGRAPH_OP(Tan, ngraph::op::v0, 0) NGRAPH_OP(Tanh, ngraph::op::v0, 0) diff --git a/ngraph/core/include/ngraph/op/power.hpp b/ngraph/core/include/ngraph/op/power.hpp index 6eecca88d84f74..0a385c15eba7e2 100644 --- a/ngraph/core/include/ngraph/op/power.hpp +++ b/ngraph/core/include/ngraph/op/power.hpp @@ -22,54 +22,6 @@ namespace ngraph { namespace op { - namespace v0 - { - // clang-format off - /// \brief Elementwise exponentiation operation. - /// - /// ## Inputs - /// - /// | | Type | Description | - /// | ------ | --------------------------------- | ------------------------------------------------------ | - /// | `arg0` | \f$N[d_1,\dots,d_n]~(n \geq 0)\f$ | A tensor of any shape and numeric element type. | - /// | `arg1` | \f$N[d_1,\dots,d_n]~(n \geq 0)\f$ | A tensor of the same shape and element type as `arg0`. | - /// - /// ## Output - /// - /// | Type | Description | - /// | ---------------------- | -------------------------------------------------------------------------------------------------------------- | - /// | \f$N[d_1,\dots,d_n]\f$ | The tensor \f$T\f$, where \f$T[i_1,\dots,i_n] = \texttt{arg0}[i_1,\dots,i_n]^{\texttt{arg1}[i_1,\dots,i_n]}\f$ | - // clang-format on - class NGRAPH_DEPRECATED( - "This operation is deprecated and will be removed soon. " - "Use v1::Power instead of it.") NGRAPH_API Power - : public util::BinaryElementwiseArithmetic - { - NGRAPH_SUPPRESS_DEPRECATED_START - public: - static constexpr NodeTypeInfo type_info{"Power", 0}; - const NodeTypeInfo& get_type_info() const override { return type_info; } - Power() - : util::BinaryElementwiseArithmetic(AutoBroadcastSpec::NONE) - { - } - /// \brief Constructs an exponentiation operation. - /// - /// \param arg0 Node that produces the first input tensor. - /// \param arg1 Node that produces the second input tensor. - /// \param auto_broadcast Auto broadcast specification - Power(const Output& arg0, - const Output& arg1, - const AutoBroadcastSpec& auto_broadcast = AutoBroadcastSpec()); - - virtual std::shared_ptr - clone_with_new_inputs(const OutputVector& new_args) const override; - bool evaluate(const HostTensorVector& outputs, - const HostTensorVector& inputs) const override; - NGRAPH_SUPPRESS_DEPRECATED_END - }; - } // namespace v0 - namespace v1 { // clang-format off @@ -114,9 +66,5 @@ namespace ngraph const HostTensorVector& inputs) const override; }; } // namespace v1 - - NGRAPH_SUPPRESS_DEPRECATED_START - using v0::Power; - NGRAPH_SUPPRESS_DEPRECATED_END } } diff --git a/ngraph/core/include/ngraph/op/select.hpp b/ngraph/core/include/ngraph/op/select.hpp index 14f4ef4da3f11c..6a8639cd1a152c 100644 --- a/ngraph/core/include/ngraph/op/select.hpp +++ b/ngraph/core/include/ngraph/op/select.hpp @@ -22,51 +22,6 @@ namespace ngraph { namespace op { - namespace v0 - { - // clang-format off - /// \brief Elementwise selection operation. - /// - /// ## Inputs - /// - /// | | Type | Description | - /// | ------ | --------------------------------------------- | ------------------------------------------------------------ | - /// | `arg0` | \f$\texttt{bool}[d_1,\dots,d_n]~(n \geq 0)\f$ | A tensor of any shape, with element `bool`. | - /// | `arg1` | \f$E[d_1,\dots,d_n]~(n \geq 0)\f$ | A tensor of the same shape as `arg0`, with any element type. | - /// | `arg2` | \f$E[d_1,\dots,d_n]~(n \geq 0)\f$ | A tensor of the same shape and element type as `arg1`. | - /// - /// ## Output - /// - /// | Type | Description | - /// | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - /// | \f$E[d_1,\dots,d_n]\f$ | The tensor \f$T\f$, where \f$T[i_1,\dots,i_n] = \texttt{arg1}[i_1,\dots,i_n]\text{ if }\texttt{arg0}[i_1,\dots,i_n] \neq 0\text{, else }\texttt{arg2}[i_1,\dots,i_n]\f$ | - // clang-format on - class NGRAPH_DEPRECATED( - "This operation is deprecated and will be removed soon. " - "Use v1::Select instead of it.") NGRAPH_API Select : public Op - { - NGRAPH_SUPPRESS_DEPRECATED_START - public: - static constexpr NodeTypeInfo type_info{"Select", 0}; - const NodeTypeInfo& get_type_info() const override { return type_info; } - /// \brief Constructs a selection operation. - Select() = default; - /// \brief Constructs a selection operation. - /// - /// \param arg0 Node that produces the first input tensor. - /// \param arg1 Node that produces the second input tensor. - /// \param arg2 Node that produces the third input tensor. - Select(const Output& arg0, - const Output& arg1, - const Output& arg2); - - virtual std::shared_ptr - clone_with_new_inputs(const OutputVector& new_args) const override; - void validate_and_infer_types() override; - NGRAPH_SUPPRESS_DEPRECATED_END - }; - } // namespace v0 - namespace v1 { // clang-format off @@ -129,8 +84,5 @@ namespace ngraph AutoBroadcastSpec m_auto_broadcast; }; } // namespace v1 - NGRAPH_SUPPRESS_DEPRECATED_START - using v0::Select; - NGRAPH_SUPPRESS_DEPRECATED_END - } // namespace op + } // namespace op } // namespace ngraph diff --git a/ngraph/core/include/ngraph/op/shuffle_channels.hpp b/ngraph/core/include/ngraph/op/shuffle_channels.hpp index aa7daf7c6d4e39..dae47013a5e120 100644 --- a/ngraph/core/include/ngraph/op/shuffle_channels.hpp +++ b/ngraph/core/include/ngraph/op/shuffle_channels.hpp @@ -30,7 +30,7 @@ namespace ngraph namespace v0 { /// \brief Permutes data in the channel dimension of the input - class NGRAPH_API ShuffleChannels : public ngraph::op::util::FusedOp + class NGRAPH_API ShuffleChannels : public Op { public: static constexpr NodeTypeInfo type_info{"ShuffleChannels", 0}; @@ -53,15 +53,16 @@ namespace ngraph bool visit_attributes(AttributeVisitor& visitor) override; size_t get_zero_based_axis() const; - virtual void pre_validate_and_infer_types() override; - - virtual OutputVector decompose_op() const override; + virtual void validate_and_infer_types() override; virtual std::shared_ptr clone_with_new_inputs(const OutputVector& new_args) const override; int64_t get_axis() const { return m_axis; } int64_t get_group() const { return m_group; } + bool evaluate(const HostTensorVector& outputs, + const HostTensorVector& inputs) const override; + private: /// \brief Generates a shape required to permute the data /// diff --git a/ngraph/core/include/ngraph/op/space_to_batch.hpp b/ngraph/core/include/ngraph/op/space_to_batch.hpp index a355e54427648e..483a1a709fbb9c 100644 --- a/ngraph/core/include/ngraph/op/space_to_batch.hpp +++ b/ngraph/core/include/ngraph/op/space_to_batch.hpp @@ -60,6 +60,9 @@ namespace ngraph std::shared_ptr clone_with_new_inputs(const OutputVector& new_args) const override; bool visit_attributes(AttributeVisitor& visitor) override; + + bool evaluate(const HostTensorVector& outputs, + const HostTensorVector& inputs) const override; }; } using v1::SpaceToBatch; diff --git a/ngraph/core/include/ngraph/op/space_to_depth.hpp b/ngraph/core/include/ngraph/op/space_to_depth.hpp index 2a35d833d16f10..3af3fbbb50cf61 100644 --- a/ngraph/core/include/ngraph/op/space_to_depth.hpp +++ b/ngraph/core/include/ngraph/op/space_to_depth.hpp @@ -18,6 +18,7 @@ #include "ngraph/node.hpp" #include "ngraph/op/util/fused_op.hpp" +#include "ngraph/runtime/host_tensor.hpp" NGRAPH_SUPPRESS_DEPRECATED_START @@ -34,7 +35,7 @@ namespace ngraph /// /// Output node produces a tensor with shape: /// [N, C * blocksize * blocksize, H / blocksize, W / blocksize] - class NGRAPH_API SpaceToDepth : public ngraph::op::util::FusedOp + class NGRAPH_API SpaceToDepth : public Op { public: static constexpr NodeTypeInfo type_info{"SpaceToDepth", 0}; @@ -65,11 +66,13 @@ namespace ngraph bool visit_attributes(AttributeVisitor& visitor) override; std::size_t get_block_size() const { return m_blocksize; } SpaceToDepthMode get_mode() const { return m_mode; } - virtual OutputVector decompose_op() const override; - + void validate_and_infer_types() override; virtual std::shared_ptr clone_with_new_inputs(const OutputVector& new_args) const override; + bool evaluate(const HostTensorVector& outputs, + const HostTensorVector& inputs) const override; + protected: std::size_t m_blocksize; SpaceToDepthMode m_mode; diff --git a/ngraph/core/include/ngraph/op/subtract.hpp b/ngraph/core/include/ngraph/op/subtract.hpp index 5e5a0f121118ea..5bac3d12d84722 100644 --- a/ngraph/core/include/ngraph/op/subtract.hpp +++ b/ngraph/core/include/ngraph/op/subtract.hpp @@ -22,42 +22,6 @@ namespace ngraph { namespace op { - namespace v0 - { - /// \brief Elementwise subtraction operation. - class NGRAPH_DEPRECATED( - "This operation is deprecated and will be removed soon. " - "Use v1::Subtract instead of it.") NGRAPH_API Subtract - : public util::BinaryElementwiseArithmetic - { - NGRAPH_SUPPRESS_DEPRECATED_START - public: - static constexpr NodeTypeInfo type_info{"Subtract", 0}; - const NodeTypeInfo& get_type_info() const override { return type_info; } - Subtract() - : util::BinaryElementwiseArithmetic(AutoBroadcastSpec::NONE) - { - } - - /// \brief Constructs a subtraction operation. - /// - /// \param arg0 Node that produces the first input tensor. - /// \param arg1 Node that produces the second input tensor. - /// \param auto_broadcast Auto broadcast specification - Subtract(const Output& arg0, - const Output& arg1, - const AutoBroadcastSpec& auto_broadcast = AutoBroadcastSpec()); - - virtual std::shared_ptr - clone_with_new_inputs(const OutputVector& new_args) const override; - - bool evaluate(const HostTensorVector& outputs, - const HostTensorVector& inputs) const override; - NGRAPH_SUPPRESS_DEPRECATED_END - }; - - } // namespace v0 - namespace v1 { /// \brief Elementwise subtraction operation. @@ -87,14 +51,5 @@ namespace ngraph const HostTensorVector& inputs) const override; }; } // namespace v1 - - NGRAPH_SUPPRESS_DEPRECATED_START - using v0::Subtract; - NGRAPH_SUPPRESS_DEPRECATED_END - } // namespace op - - NGRAPH_DEPRECATED("This operator was deprecated and will be removed with v0 operation.") - NGRAPH_API - std::shared_ptr operator-(const Output arg0, - const Output arg1); + } // namespace op } // namespace ngraph diff --git a/ngraph/core/reference/include/ngraph/runtime/reference/autobroadcast_binop.hpp b/ngraph/core/reference/include/ngraph/runtime/reference/autobroadcast_binop.hpp index 70410784226478..345555b6a8426b 100644 --- a/ngraph/core/reference/include/ngraph/runtime/reference/autobroadcast_binop.hpp +++ b/ngraph/core/reference/include/ngraph/runtime/reference/autobroadcast_binop.hpp @@ -388,19 +388,23 @@ namespace ngraph Shape arg1_padded_shape = arg1_shape; Shape arg2_padded_shape = arg2_shape; - while (arg1_padded_shape.size() < arg2_padded_shape.size()) + size_t max_shape_size = std::max({arg0_padded_shape.size(), + arg1_padded_shape.size(), + arg2_padded_shape.size()}); + + while (arg0_padded_shape.size() < max_shape_size) { - arg1_padded_shape.insert(arg1_padded_shape.begin(), 1); + arg0_padded_shape.insert(arg0_padded_shape.begin(), 1); } - while (arg2_padded_shape.size() < arg1_padded_shape.size()) + while (arg1_padded_shape.size() < max_shape_size) { - arg2_padded_shape.insert(arg2_padded_shape.begin(), 1); + arg1_padded_shape.insert(arg1_padded_shape.begin(), 1); } - while (arg0_padded_shape.size() < arg1_padded_shape.size()) + while (arg2_padded_shape.size() < max_shape_size) { - arg0_padded_shape.insert(arg0_padded_shape.begin(), 1); + arg2_padded_shape.insert(arg2_padded_shape.begin(), 1); } Shape arg0_squeezed_shape; @@ -411,7 +415,7 @@ namespace ngraph AxisSet arg2_squeezed_axes; Shape output_shape; - for (size_t i = 0; i < arg1_padded_shape.size(); i++) + for (size_t i = 0; i < max_shape_size; i++) { if (arg1_padded_shape[i] == 1) { @@ -440,9 +444,9 @@ namespace ngraph arg0_squeezed_shape.push_back(arg0_padded_shape[i]); } - output_shape.push_back(arg1_padded_shape[i] == 1 - ? arg2_padded_shape[i] - : arg1_padded_shape[i]); + output_shape.push_back(std::max({arg0_padded_shape[i], + arg2_padded_shape[i], + arg1_padded_shape[i]})); } CoordinateTransform arg0_transform(arg0_squeezed_shape); diff --git a/ngraph/core/reference/include/ngraph/runtime/reference/avg_pool.hpp b/ngraph/core/reference/include/ngraph/runtime/reference/avg_pool.hpp index 6daa4024040fe2..5a0e05851d7a10 100644 --- a/ngraph/core/reference/include/ngraph/runtime/reference/avg_pool.hpp +++ b/ngraph/core/reference/include/ngraph/runtime/reference/avg_pool.hpp @@ -223,8 +223,8 @@ namespace ngraph if (in_bounds || include_padding_in_avg_computation) { - T v = - in_bounds ? arg[input_batch_transform.index(input_batch_coord)] : 0; + T v = in_bounds ? arg[input_batch_transform.index(input_batch_coord)] + : static_cast(0); result += v; n_elements++; } diff --git a/ngraph/core/reference/include/ngraph/runtime/reference/convolution.hpp b/ngraph/core/reference/include/ngraph/runtime/reference/convolution.hpp index 2c002ec10055dd..ea64698820418a 100644 --- a/ngraph/core/reference/include/ngraph/runtime/reference/convolution.hpp +++ b/ngraph/core/reference/include/ngraph/runtime/reference/convolution.hpp @@ -19,10 +19,13 @@ #include #include #include +#include #include "ngraph/axis_vector.hpp" #include "ngraph/coordinate_transform.hpp" +#include "ngraph/runtime/reference/concat.hpp" #include "ngraph/runtime/reference/reverse.hpp" +#include "ngraph/runtime/reference/split.hpp" #include "ngraph/util.hpp" namespace ngraph @@ -72,21 +75,8 @@ namespace ngraph size_t filter_out_channel_axis, size_t filter_in_channel_axis, size_t out_batch_axis, - size_t out_channel_axis, - const float* input_scale = nullptr, - const INPUT* input_zero_point = nullptr, - const float* filter_scale = nullptr, - const FILTER* filter_zero_point = nullptr, - const float* output_scale = nullptr, - const OUTPUT* output_zero_point = nullptr) + size_t out_channel_axis) { - bool is_quantized = false; - if (input_scale && input_zero_point && filter_scale && filter_zero_point && - output_scale && output_zero_point) - { - is_quantized = true; - } - auto old_mode = std::fegetround(); std::fesetround(FE_TONEAREST); // Comments throughout assume without loss of generality that: @@ -236,11 +226,7 @@ namespace ngraph { ACCUMULATION in_v = static_cast(in[in_idx]); ACCUMULATION f_v = static_cast(filter[filter_idx]); - if (is_quantized) - { - in_v = in_v - static_cast(*input_zero_point); - f_v = f_v - static_cast(*filter_zero_point); - } + result += in_v * f_v; in_idx += in_channel_stride; filter_idx += filter_in_channel_stride; @@ -249,17 +235,8 @@ namespace ngraph ++in_it; ++filter_it; } - if (is_quantized) - { - float scale = *input_scale * *filter_scale / *output_scale; - out[out_transform.index(out_coord)] = - static_cast(std::round(static_cast(result) * scale)) + - *output_zero_point; - } - else - { - out[out_transform.index(out_coord)] = result; - } + + out[out_transform.index(out_coord)] = result; } std::fesetround(old_mode); } @@ -278,13 +255,7 @@ namespace ngraph const Strides& filter_dilation, const CoordinateDiff& in_pad_below, const CoordinateDiff& in_pad_above, - const Strides& in_dilation, - const float* input_scale = nullptr, - const INPUT* input_zero_point = nullptr, - const float* filter_scale = nullptr, - const FILTER* filter_zero_point = nullptr, - const float* output_scale = nullptr, - const OUTPUT* output_zero_point = nullptr) + const Strides& in_dilation) { general_convolution(in, @@ -303,48 +274,7 @@ namespace ngraph 0, 1, 0, - 1, - input_scale, - input_zero_point, - filter_scale, - filter_zero_point, - output_scale, - output_zero_point); - } - - template ::type> - void convolution_backprop_filter(const INPUT* in, - const OUTPUT* delta_out, - FILTER* delta_filter, - const Shape& in_shape, - const Shape& out_shape, - const Shape& filter_shape, - const Strides& filter_dilation, - const Strides& stride, - const CoordinateDiff& in_pad_below, - const CoordinateDiff& backprop_in_pad_above, - const Strides& in_dilation) - { - general_convolution(in, - delta_out, - delta_filter, - in_shape, - out_shape, - filter_shape, - filter_dilation, - stride, - in_pad_below, - backprop_in_pad_above, - in_dilation, - 1, - 0, - 1, - 0, - 1, - 0); + 1); } template reversed(shape_size(filter_shape)); AxisSet reverse_axes; - for (size_t i = 2; i < filter_shape.size(); ++i) + size_t reverse_axes_start = 2; + for (size_t i = reverse_axes_start; i < filter_shape.size(); ++i) { reverse_axes.insert(i); } @@ -377,6 +308,35 @@ namespace ngraph filter_shape, reverse_axes, sizeof(FILTER)); + size_t filter_out_channel_axis = 1; + size_t filter_in_channel_axis = 0; + + // Compute backward pad out pad bellow + size_t spatial_dim_count = in_shape.size() - 2; + + CoordinateDiff backward_delta_out_pad_below; + backward_delta_out_pad_below.resize(spatial_dim_count); + + for (size_t i = 0; i < spatial_dim_count; i++) + { + backward_delta_out_pad_below[i] = + (static_cast(filter_shape[i + 2]) - 1) * filter_dilation[i] - + forward_in_pad_bellow[i]; + } + // Compute backward pad out pad above + CoordinateDiff backward_delta_out_pad_above; + backward_delta_out_pad_above.resize(spatial_dim_count); + + for (size_t i = 0; i < spatial_dim_count; i++) + { + backward_delta_out_pad_above[i] = + (static_cast(filter_shape[i + 2]) - 1) * filter_dilation[i] + + ((forward_in_pad_bellow[i] + ((in_shape[i + 2]) - 1) * in_dilation[i] + + forward_in_pad_above[i] - + (static_cast(filter_shape[i + 2]) - 1) * filter_dilation[i]) % + stride[i]) - + forward_in_pad_above[i]; + } general_convolution( delta_out, @@ -392,8 +352,8 @@ namespace ngraph stride, 0, 1, - 1, - 0, + filter_out_channel_axis, + filter_in_channel_axis, 0, 1); } diff --git a/ngraph/core/reference/include/ngraph/runtime/reference/detection_output.hpp b/ngraph/core/reference/include/ngraph/runtime/reference/detection_output.hpp index d2499be7cf45a8..9d372b62c633ad 100644 --- a/ngraph/core/reference/include/ngraph/runtime/reference/detection_output.hpp +++ b/ngraph/core/reference/include/ngraph/runtime/reference/detection_output.hpp @@ -33,11 +33,11 @@ namespace ngraph private: struct NormalizedBBox { - dataType xmin = 0; - dataType ymin = 0; - dataType xmax = 0; - dataType ymax = 0; - dataType size = 0; + dataType xmin = dataType(0); + dataType ymin = dataType(0); + dataType xmax = dataType(0); + dataType ymax = dataType(0); + dataType size = dataType(0); }; using LabelBBox = std::map>; diff --git a/ngraph/core/reference/include/ngraph/runtime/reference/extract_image_patches.hpp b/ngraph/core/reference/include/ngraph/runtime/reference/extract_image_patches.hpp index 4e16e1c0f75ebf..b78780a3a1b5f7 100644 --- a/ngraph/core/reference/include/ngraph/runtime/reference/extract_image_patches.hpp +++ b/ngraph/core/reference/include/ngraph/runtime/reference/extract_image_patches.hpp @@ -2,6 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // +#include #include "ngraph/shape_util.hpp" namespace ngraph @@ -10,12 +11,12 @@ namespace ngraph { namespace reference { - template - void extractImagePatches(const op::ExtractImagePatches* extImgPatches, - const T* input, - T* out, - const Shape& inShape, - const Shape& outShape) + template + void extract_image_patches(const std::shared_ptr extImgPatches, + const T* input, + T* out, + const Shape& inShape, + const Shape& outShape) { const size_t dimsSize = inShape.size(); const size_t BATCH = 0, CHANNEL = 1, HIGHT = 0, WIDTH = 1; diff --git a/ngraph/core/reference/include/ngraph/runtime/reference/fake_quantize.hpp b/ngraph/core/reference/include/ngraph/runtime/reference/fake_quantize.hpp new file mode 100644 index 00000000000000..bf5f2203b070a8 --- /dev/null +++ b/ngraph/core/reference/include/ngraph/runtime/reference/fake_quantize.hpp @@ -0,0 +1,247 @@ +//***************************************************************************** +// Copyright 2020 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//***************************************************************************** + +#pragma once + +#include +#include +#include +#include +#include + +#include "ngraph/shape.hpp" + +namespace ngraph +{ + namespace runtime + { + namespace reference + { + namespace + { + std::vector + calc_broadcast_index_offset(const std::vector& memory_offsets, + const std::vector& broadcast_shape) + { + std::vector broadcast_offsets(broadcast_shape.size(), 0); + for (int i = broadcast_shape.size() - 2; i >= 0; --i) + { + if (broadcast_shape[i] == 1) + { + broadcast_offsets[i] = memory_offsets[i]; + } + } + if (!std::all_of(broadcast_shape.begin(), + broadcast_shape.end(), + [](size_t i) { return i == 1; }) && + broadcast_shape.back() == 1) + { + broadcast_offsets[broadcast_offsets.size() - 1] = 1; + } + if (broadcast_shape.back() == 1) + { + for (int i = broadcast_shape.size() - 1; i >= 0; --i) + { + if (broadcast_shape[i] != 1) + { + broadcast_offsets[i] = memory_offsets[i] - 1; + break; + } + } + } + return broadcast_offsets; + } + + size_t calc_full_broadcast_offset(const std::vector& current_dims, + const std::vector& offsets) + { + size_t full_index_offset = 0; + for (size_t i = 0; i < current_dims.size(); ++i) + { + full_index_offset += offsets[i] * current_dims[i]; + } + return full_index_offset; + } + + void align_shape_sizes(Shape& shape, size_t target_size) + { + for (size_t i = 0; i < shape.size() - target_size; ++i) + { + shape.insert(shape.begin(), 1); + } + } + + void increment_current_dim(std::vector& current_dims, + const std::vector& shape, + size_t incremented_dim_number) + { + current_dims[incremented_dim_number] += 1; + if (current_dims[incremented_dim_number] == shape[incremented_dim_number] && + incremented_dim_number != 0) + { + for (size_t i = incremented_dim_number; i < shape.size(); ++i) + { + current_dims[i] = 0; + } + increment_current_dim(current_dims, shape, incremented_dim_number - 1); + } + } + } + + template + void fake_quantize(const T* arg, + const T* in_low, + const T* in_high, + const T* out_low, + const T* out_high, + T* out, + const Shape& arg_shape, + const Shape& _in_low_shape, + const Shape& _in_high_shape, + const Shape& _out_low_shape, + const Shape& _out_high_shape, + size_t levels) + { + auto initial_round_mode = std::fegetround(); + std::fesetround(FE_TONEAREST); + Shape in_low_shape(_in_low_shape); + Shape in_high_shape(_in_high_shape); + Shape out_low_shape(_out_low_shape); + Shape out_high_shape(_out_high_shape); + + if (in_low_shape.size() > arg_shape.size() || + in_high_shape.size() > arg_shape.size() || + out_low_shape.size() > arg_shape.size() || + out_high_shape.size() > arg_shape.size()) + { + throw std::runtime_error( + std::string("Tensors with inout\\output ranges should have rank less or " + "equal to data tensor rank equal to ") + + std::to_string(arg_shape.size())); + } + + std::vector arg_memory_offsets(arg_shape.size(), 0); + for (int i = arg_shape.size() - 2; i >= 0; i--) + { + arg_memory_offsets[i] = std::accumulate( + arg_shape.begin() + i + 1, arg_shape.end(), 1, std::multiplies()); + } + align_shape_sizes(in_low_shape, arg_shape.size()); + align_shape_sizes(in_high_shape, arg_shape.size()); + align_shape_sizes(out_low_shape, arg_shape.size()); + align_shape_sizes(out_high_shape, arg_shape.size()); + + std::vector in_low_offsets, in_high_offsets, out_low_offsets, + out_high_offsets; + bool in_low_trivial_broadcast = false; + bool in_high_trivial_broadcast = false; + bool out_low_trivial_broadcast = false; + bool out_high_trivial_broadcast = false; + bool in_low_aligned = false; + bool in_high_aligned = false; + bool out_low_aligned = false; + bool out_high_aligned = false; + + auto check_trivial_broadcast = + [&arg_shape, &arg_memory_offsets](Shape& shape_to_check, + std::vector& target_offsets, + bool& trivial_broadcast, + bool& aligned) { + if (shape_size(shape_to_check) == 1 || shape_size(shape_to_check) == 0) + { + trivial_broadcast = true; + } + else if (shape_to_check == arg_shape) + { + aligned = true; + } + else + { + target_offsets = + calc_broadcast_index_offset(arg_memory_offsets, shape_to_check); + } + }; + check_trivial_broadcast( + in_low_shape, in_low_offsets, in_low_trivial_broadcast, in_low_aligned); + check_trivial_broadcast( + in_high_shape, in_high_offsets, in_high_trivial_broadcast, in_high_aligned); + check_trivial_broadcast( + out_low_shape, out_low_offsets, out_low_trivial_broadcast, out_low_aligned); + check_trivial_broadcast( + out_high_shape, out_high_offsets, out_high_trivial_broadcast, out_high_aligned); + + std::vector current_dim(arg_shape.size(), 0); + + auto get_value = [¤t_dim](bool is_trivial_broadcast, + bool is_aligned, + const T* data, + size_t idx, + const std::vector& offsets) { + T val; + if (is_aligned) + { + val = data[idx]; + } + else if (is_trivial_broadcast) + { + val = data[0]; + } + else + { + size_t index_offset = calc_full_broadcast_offset(current_dim, offsets); + if (index_offset != 0) + { + NGRAPH_CHECK(idx >= index_offset, "Incorrect index offset value!"); + } + val = data[idx - index_offset]; + } + return val; + }; + for (size_t i = 0; i < shape_size(arg_shape); ++i) + { + T in_low_val = get_value( + in_low_trivial_broadcast, in_low_aligned, in_low, i, in_low_offsets); + T in_high_val = get_value( + in_high_trivial_broadcast, in_high_aligned, in_high, i, in_high_offsets); + T out_low_val = get_value( + out_low_trivial_broadcast, out_low_aligned, out_low, i, out_low_offsets); + T out_high_val = get_value(out_high_trivial_broadcast, + out_high_aligned, + out_high, + i, + out_high_offsets); + if (arg[i] <= in_low_val) + { + out[i] = out_low_val; + } + else if (arg[i] > in_high_val) + { + out[i] = out_high_val; + } + else + { + out[i] = nearbyint((arg[i] - in_low_val) / (in_high_val - in_low_val) * + (levels - 1)) / + (levels - 1) * (out_high_val - out_low_val) + + out_low_val; + } + increment_current_dim(current_dim, arg_shape, arg_shape.size() - 1); + } + std::fesetround(initial_round_mode); + } + } + } +} \ No newline at end of file diff --git a/ngraph/core/reference/include/ngraph/runtime/reference/mvn.hpp b/ngraph/core/reference/include/ngraph/runtime/reference/mvn.hpp new file mode 100644 index 00000000000000..66f07b460ba271 --- /dev/null +++ b/ngraph/core/reference/include/ngraph/runtime/reference/mvn.hpp @@ -0,0 +1,76 @@ +//***************************************************************************** +// Copyright 2017-2020 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//***************************************************************************** + +#pragma once + +#include +#include +#include +#include +#include +#include +#include + +namespace ngraph +{ + namespace runtime + { + namespace reference + { + template + void mvn(const T* arg, + T* out, + const Shape& in_shape, + bool normalize_variance, + AxisSet reduction_axes, + double eps) + { + auto reduced_shape = reduce(in_shape, reduction_axes, true); + std::vector tmp_buffer(shape_size(in_shape)); + mean(arg, tmp_buffer.data(), in_shape, reduction_axes, true); + subtract(arg, + tmp_buffer.data(), + out, + in_shape, + reduced_shape, + op::AutoBroadcastSpec::NUMPY); + + if (normalize_variance) + { + multiply(out, out, tmp_buffer.data(), shape_size(in_shape)); + std::vector mean_value(shape_size(reduced_shape)); + mean(tmp_buffer.data(), mean_value.data(), in_shape, reduction_axes, true); + + add(mean_value.data(), + std::vector(shape_size(reduced_shape), eps).data(), + tmp_buffer.data(), + reduced_shape, + reduced_shape, + op::AutoBroadcastSpec::NUMPY); + sqrt(tmp_buffer.data(), tmp_buffer.data(), shape_size(reduced_shape)); + + divide(out, + tmp_buffer.data(), + out, + in_shape, + reduced_shape, + op::AutoBroadcastSpec::NUMPY, + true); + } + } + } // namespace reference + } // namespace runtime +} // namespace ngraph diff --git a/ngraph/core/reference/include/ngraph/runtime/reference/roi_pooling.hpp b/ngraph/core/reference/include/ngraph/runtime/reference/roi_pooling.hpp index 8ea19700e4d526..de3f61b93cf162 100644 --- a/ngraph/core/reference/include/ngraph/runtime/reference/roi_pooling.hpp +++ b/ngraph/core/reference/include/ngraph/runtime/reference/roi_pooling.hpp @@ -109,8 +109,9 @@ namespace ngraph // Define an empty pooling region to be zero bool is_empty = (h_end <= h_start) || (w_end <= w_start); - output[pool_index] = - is_empty ? 0 : std::numeric_limits::lowest(); + output[pool_index] = is_empty + ? static_cast(0) + : std::numeric_limits::lowest(); for (unsigned int h = h_start; h < h_end; h++) { @@ -138,8 +139,10 @@ namespace ngraph T roi_height = (roi_h_end - roi_h_start) * (height - 1); T roi_width = (roi_w_end - roi_w_start) * (width - 1); - T roi_height_scale = (pooled_h > 1) ? roi_height / (pooled_h - 1) : 0; - T roi_width_scale = (pooled_w > 1) ? roi_width / (pooled_w - 1) : 0; + T roi_height_scale = + (pooled_h > 1) ? roi_height / (pooled_h - 1) : static_cast(0); + T roi_width_scale = + (pooled_w > 1) ? roi_width / (pooled_w - 1) : static_cast(0); for (unsigned int c = 0; c < channels; c++) { diff --git a/ngraph/core/reference/include/ngraph/runtime/reference/select.hpp b/ngraph/core/reference/include/ngraph/runtime/reference/select.hpp index 3f6da667026666..3c81504aeaec20 100644 --- a/ngraph/core/reference/include/ngraph/runtime/reference/select.hpp +++ b/ngraph/core/reference/include/ngraph/runtime/reference/select.hpp @@ -32,11 +32,14 @@ namespace ngraph const T* arg1, const T* arg2, T* out, - size_t count) // TODO: using char for bool, is this right? + size_t arg0_count, + size_t arg1_count, + size_t arg2_count, + size_t out_count) { - for (size_t i = 0; i < count; i++) + for (size_t i = 0; i < out_count; i++) { - out[i] = arg0[i] ? arg1[i] : arg2[i]; + out[i] = arg0[i % arg0_count] ? arg1[i % arg1_count] : arg2[i % arg2_count]; } } diff --git a/ngraph/core/reference/include/ngraph/runtime/reference/squared_difference.hpp b/ngraph/core/reference/include/ngraph/runtime/reference/squared_difference.hpp new file mode 100644 index 00000000000000..ec663788d606d6 --- /dev/null +++ b/ngraph/core/reference/include/ngraph/runtime/reference/squared_difference.hpp @@ -0,0 +1,46 @@ +//***************************************************************************** +// Copyright 2017-2020 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//***************************************************************************** + +#pragma once + +#include +#include + +#include "ngraph/runtime/reference/autobroadcast_binop.hpp" +#include "ngraph/shape_util.hpp" + +namespace ngraph +{ + namespace runtime + { + namespace reference + { + template + void squared_difference(const T* arg0, + const T* arg1, + T* out, + const Shape& arg0_shape, + const Shape& arg1_shape, + const op::AutoBroadcastSpec& broadcast_spec) + { + autobroadcast_binop( + arg0, arg1, out, arg0_shape, arg1_shape, broadcast_spec, [](T x, T y) -> T { + return (x - y) * (x - y); + }); + } + } + } +} diff --git a/ngraph/core/src/graph_util.cpp b/ngraph/core/src/graph_util.cpp index a7c10582a3e2b6..688eeabf80b821 100644 --- a/ngraph/core/src/graph_util.cpp +++ b/ngraph/core/src/graph_util.cpp @@ -186,8 +186,8 @@ void ngraph::replace_node(std::shared_ptr target, input.replace_source_output(replacement->output(output_order[i])); } } - replacement->add_node_control_dependents(target); + replacement->add_node_control_dependencies(target); target->clear_control_dependents(); } @@ -212,6 +212,7 @@ void ngraph::replace_node(const std::shared_ptr& target, if (replacement_nodes.find(replacement_node) == replacement_nodes.end()) { replacement_node->add_node_control_dependents(target); + replacement_node->add_node_control_dependencies(target); target->transfer_provenance_tags(replacement_node); replacement_nodes.insert(replacement_node); } diff --git a/ngraph/core/src/op/add.cpp b/ngraph/core/src/op/add.cpp index bcf0c34284762a..132686defe0072 100644 --- a/ngraph/core/src/op/add.cpp +++ b/ngraph/core/src/op/add.cpp @@ -24,35 +24,6 @@ NGRAPH_SUPPRESS_DEPRECATED_START using namespace std; using namespace ngraph; -// ------------------------------- v0 ------------------------------------------ - -constexpr NodeTypeInfo op::v0::Add::type_info; - -op::v0::Add::Add(const Output& arg0, - const Output& arg1, - const AutoBroadcastSpec& auto_broadcast) - : BinaryElementwiseArithmetic(arg0, arg1, auto_broadcast) -{ - constructor_validate_and_infer_types(); -} - -shared_ptr op::v0::Add::clone_with_new_inputs(const OutputVector& new_args) const -{ - check_new_args_count(this, new_args); - return make_shared(new_args.at(0), new_args.at(1), this->get_autob()); -} - -bool op::v0::Add::visit_attributes(AttributeVisitor& visitor) -{ - BinaryElementwiseArithmetic::visit_attributes(visitor); - return true; -} - -shared_ptr ngraph::operator+(const Output& arg0, const Output& arg1) -{ - return make_shared(arg0, arg1); -} - namespace add { template @@ -107,12 +78,6 @@ namespace add } } -bool op::v0::Add::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const -{ - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v0::Add::evaluate"); - return add::evaluate_add(inputs[0], inputs[1], outputs[0], get_autob()); -} - // ------------------------------- v1 ------------------------------------------ NGRAPH_RTTI_DEFINITION(op::v1::Add, "Add", 1, util::BinaryElementwiseArithmetic); @@ -141,4 +106,4 @@ bool op::v1::Add::evaluate(const HostTensorVector& outputs, const HostTensorVect { OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::Add::evaluate"); return add::evaluate_add(inputs[0], inputs[1], outputs[0], get_autob()); -} +} \ No newline at end of file diff --git a/ngraph/core/src/op/batch_to_space.cpp b/ngraph/core/src/op/batch_to_space.cpp index 9cc2e620276174..142ec4628af6ad 100644 --- a/ngraph/core/src/op/batch_to_space.cpp +++ b/ngraph/core/src/op/batch_to_space.cpp @@ -16,13 +16,19 @@ #include #include #include +#include #include #include "ngraph/builder/make_constant.hpp" #include "ngraph/node.hpp" #include "ngraph/op/batch_to_space.hpp" +#include "ngraph/opsets/opset3.hpp" #include "ngraph/shape.hpp" +#include "ngraph/runtime/opt_kernel/reshape.hpp" +#include "ngraph/runtime/reference/strided_slice.hpp" +#include "ngraph/slice_plan.hpp" + using namespace std; using namespace ngraph; @@ -134,3 +140,115 @@ bool ngraph::op::v1::BatchToSpace::visit_attributes(ngraph::AttributeVisitor& vi { return true; } + +bool ngraph::op::v1::BatchToSpace::evaluate(const HostTensorVector& outputs, + const HostTensorVector& inputs) const +{ + auto data = inputs[0]; + size_t elem_size = data->get_element_type().size(); + + if (data->get_partial_shape().is_dynamic()) + { + return false; + } + auto data_shape = data->get_shape(); + + if (!(data->get_shape().size() == 4 || data->get_shape().size() == 5)) + { + return false; + } + size_t block_values_size = shape_size(inputs[1]->get_shape()); + const auto* block_values = inputs[1]->get_data_ptr(); + const auto* crops_begin_values = inputs[2]->get_data_ptr(); + const auto* crops_end_values = inputs[3]->get_data_ptr(); + + Shape dispersed_shape(1); + dispersed_shape.insert(dispersed_shape.end(), data_shape.begin(), data_shape.end()); + std::vector axes_order(block_values_size + 1); + std::vector plain_axes_order(block_values_size + 1); + std::iota(plain_axes_order.begin(), plain_axes_order.end(), 0); + Shape squeezed_shape(data_shape.begin(), data_shape.end()); + if (squeezed_shape.size() > block_values_size) + { + return false; + } + + auto* flat_data = data->get_data_ptr(); + std::vector dispersed_data(shape_size(data_shape) * elem_size); + + Shape post_transpose_shape(axes_order.size()); + std::vector post_transpose_data(shape_size(data_shape) * elem_size); + + for (size_t block_idx = 1; block_idx < block_values_size; ++block_idx) + { + dispersed_shape[0] = block_values[block_idx]; + dispersed_shape[1] /= block_values[block_idx]; + runtime::opt_kernel::reshape(flat_data, + dispersed_data.data(), + data_shape, + plain_axes_order, + dispersed_shape, + elem_size); + + size_t val = 1; + for (size_t axis_idx = 0; axis_idx <= block_values_size; ++axis_idx) + { + if ((block_idx + 1) == axis_idx) + { + axes_order[axis_idx] = 0; + } + else + { + axes_order[axis_idx] = val; + val++; + } + } + for (size_t axis_idx = 0; axis_idx < axes_order.size(); ++axis_idx) + { + post_transpose_shape[axis_idx] = dispersed_shape[axes_order[axis_idx]]; + } + + runtime::opt_kernel::reshape(dispersed_data.data(), + post_transpose_data.data(), + dispersed_shape, + axes_order, + post_transpose_shape, + elem_size); + squeezed_shape[0] = dispersed_shape[1]; + squeezed_shape[block_idx] *= block_values[block_idx]; + dispersed_shape[block_idx + 1] = squeezed_shape[block_idx]; + runtime::opt_kernel::reshape(post_transpose_data.data(), + flat_data, + post_transpose_shape, + plain_axes_order, + squeezed_shape, + elem_size); + data_shape = squeezed_shape; + } + + std::vector upperbounds_values(data_shape.size()); + for (size_t i = 0; i < data_shape.size(); ++i) + { + upperbounds_values[i] = data_shape[i] - crops_end_values[i]; + } + + std::vector begin_mask(data_shape.size(), 0); + std::vector end_mask(data_shape.size(), 0); + + std::vector begins(shape_size(inputs[2]->get_shape())); + begins.assign(crops_begin_values, crops_begin_values + shape_size(inputs[2]->get_shape())); + + std::vector default_strides(begins.size(), 1); + SlicePlan slice_plan = make_slice_plan(data_shape, + begins, + upperbounds_values, + default_strides, + begin_mask, + end_mask, + AxisSet(), + AxisSet(), + AxisSet()); + runtime::reference::strided_slice( + flat_data, outputs[0]->get_data_ptr(), data_shape, slice_plan, elem_size); + return true; +} \ No newline at end of file diff --git a/ngraph/core/src/op/clamp.cpp b/ngraph/core/src/op/clamp.cpp index 669117d99bc852..91d26b5edde6fe 100644 --- a/ngraph/core/src/op/clamp.cpp +++ b/ngraph/core/src/op/clamp.cpp @@ -221,8 +221,8 @@ OutputVector op::Clamp::decompose_op() const default: throw runtime_error("Unsupported data type in op Clamp"); break; } - auto max = make_shared(clamp_min, data); - return {make_shared(clamp_max, max)}; + auto max = make_shared(clamp_min, data); + return {make_shared(clamp_max, max)}; } shared_ptr op::Clamp::clone_with_new_inputs(const OutputVector& new_args) const diff --git a/ngraph/core/src/op/depth_to_space.cpp b/ngraph/core/src/op/depth_to_space.cpp index 277ab856338935..5e0b5424e5e019 100644 --- a/ngraph/core/src/op/depth_to_space.cpp +++ b/ngraph/core/src/op/depth_to_space.cpp @@ -16,12 +16,17 @@ #include #include #include +#include +#include +#include #include "depth_to_space.hpp" #include "ngraph/builder/reshape.hpp" #include "ngraph/node.hpp" #include "ngraph/shape.hpp" +#include "ngraph/runtime/opt_kernel/reshape.hpp" + using namespace std; using namespace ngraph; @@ -32,7 +37,7 @@ NGRAPH_RTTI_DEFINITION(op::v0::DepthToSpace, "DepthToSpace", 0); op::DepthToSpace::DepthToSpace(const Output& data, const DepthToSpaceMode& mode, const size_t block_size) - : FusedOp({data}) + : Op({data}) , m_blocksize(block_size) , m_mode(mode) { @@ -53,23 +58,73 @@ bool op::DepthToSpace::visit_attributes(AttributeVisitor& visitor) return true; } -OutputVector op::DepthToSpace::decompose_op() const +shared_ptr op::DepthToSpace::clone_with_new_inputs(const OutputVector& new_args) const +{ + if (new_args.size() != 1) + { + throw ngraph_error("Incorrect number of new arguments"); + } + return make_shared(new_args.at(0), m_mode, m_blocksize); +} + +void op::DepthToSpace::validate_and_infer_types() { + PartialShape data_pshape = get_input_partial_shape(0); + + const auto& data_type = get_input_element_type(0); + auto data = input_value(0); - auto data_shape = data.get_shape(); - NODE_VALIDATION_CHECK(this, - (data_shape.size() >= 3), - "The input tensor with rank lower than 3 is not supported (input rank: ", - data_shape.size(), - ")"); + if (data_pshape.is_static()) + { + const auto& data_shape = data.get_shape(); + + NODE_VALIDATION_CHECK( + this, + !(data_shape.size() < 3), + "The input tensor with rank lower than 3 is not supported (input rank: ", + data_shape.size(), + ")"); - if (data_shape.size() == 3) + auto divider = std::pow(m_blocksize, data_shape.size() - 2); + NODE_VALIDATION_CHECK(this, (divider), "DepthToSpace: The divider must not be 0"); + + NODE_VALIDATION_CHECK(this, + m_blocksize > 0 && !(data_shape[1] % m_blocksize), + "DepthToSpace: The input data's 'channels' axis size: ", + data_shape[1], + " must be a equivalent to 'block_size'^'spatial_dims': ", + divider); + + auto out_shape = data_shape; + out_shape[1] /= divider; + for (size_t i = 2; i < out_shape.size(); i++) + { + out_shape[i] *= m_blocksize; + } + + set_output_size(1); + set_output_type(0, data_type, out_shape); + } + else { - // Insert batch axis - data_shape.insert(data_shape.begin(), 1); - data = builder::opset1::reshape(data, data_shape); + set_output_type(0, data_type, PartialShape::dynamic()); } +} + +bool op::DepthToSpace::evaluate(const HostTensorVector& outputs, + const HostTensorVector& inputs) const +{ + const auto& data = inputs[0]; + const auto& out = outputs[0]; + const auto& out_shape = out->get_shape(); + size_t elem_size = data->get_element_type().size(); + + if (data->get_partial_shape().is_dynamic()) + { + return false; + } + auto data_shape = data->get_shape(); const size_t n_dim = data_shape.at(0); const size_t c_dim = data_shape.at(1); const size_t spatial_dim_index = 2; @@ -111,8 +166,6 @@ OutputVector op::DepthToSpace::decompose_op() const case DepthToSpaceMode::DEPTH_FIRST: { dispersed_shape.insert(dispersed_shape.begin() + 1, c_flat); - flat_node = builder::opset1::reshape(data, dispersed_shape); - axes_order.push_back(1); for (int i = spatial_dim_index; i < data_shape.size(); ++i) { @@ -120,7 +173,6 @@ OutputVector op::DepthToSpace::decompose_op() const axes_order.push_back(i); } - flat_node = builder::opset1::reorder_axes(flat_node, axes_order); break; } // x' = reshape(data, [N, block_size, block_size, ..., block_size, C / (block_size ^ K), D1, D2, @@ -132,36 +184,56 @@ OutputVector op::DepthToSpace::decompose_op() const default: { dispersed_shape.insert(dispersed_shape.begin() + spatial_dims + 1, c_flat); - flat_node = builder::opset1::reshape(data, dispersed_shape); - axes_order.push_back(spatial_dims + 1); for (int i = 2; i < data_shape.size(); ++i) { axes_order.push_back(spatial_dims + i); axes_order.push_back(i - 1); } - flat_node = builder::opset1::reorder_axes(flat_node, axes_order); + break; + } } + std::vector plain_axes_order(data_shape.size()); + std::iota(plain_axes_order.begin(), plain_axes_order.end(), 0); + std::vector dispersed_data(shape_size(data_shape) * elem_size); + std::vector transposed_data(shape_size(data_shape) * elem_size); + + runtime::opt_kernel::reshape(data->get_data_ptr(), + dispersed_data.data(), + data_shape, + plain_axes_order, + dispersed_shape, + elem_size); + + Shape post_transpose_shape(axes_order.size()); + for (size_t axis_idx = 0; axis_idx < axes_order.size(); ++axis_idx) + { + post_transpose_shape[axis_idx] = dispersed_shape[axes_order[axis_idx]]; } + runtime::opt_kernel::reshape(dispersed_data.data(), + transposed_data.data(), + dispersed_shape, + axes_order, + post_transpose_shape, + elem_size); + Shape squeezed_shape{n_dim, c_flat}; for (int i = spatial_dim_index; i < data_shape.size(); ++i) { squeezed_shape.push_back(data_shape.at(i) * bs); } - flat_node = builder::opset1::reshape(flat_node, squeezed_shape); - - return OutputVector{flat_node}; -} - -shared_ptr op::DepthToSpace::clone_with_new_inputs(const OutputVector& new_args) const -{ - if (new_args.size() != 1) + for (size_t i = plain_axes_order.size() - 1; i < post_transpose_shape.size() - 1; ++i) { - throw ngraph_error("Incorrect number of new arguments"); + plain_axes_order.push_back(plain_axes_order[i] + 1); } - return make_shared(new_args.at(0), m_mode, m_blocksize); + runtime::opt_kernel::reshape(transposed_data.data(), + out->get_data_ptr(), + post_transpose_shape, + plain_axes_order, + squeezed_shape, + elem_size); + return true; } - namespace ngraph { template <> diff --git a/ngraph/core/src/op/divide.cpp b/ngraph/core/src/op/divide.cpp index b69c51d9588ff8..688c32709202d1 100644 --- a/ngraph/core/src/op/divide.cpp +++ b/ngraph/core/src/op/divide.cpp @@ -26,47 +26,6 @@ NGRAPH_SUPPRESS_DEPRECATED_START using namespace std; using namespace ngraph; -// ------------------------------ v0 ------------------------------------------- - -constexpr NodeTypeInfo op::v0::Divide::type_info; - -op::v0::Divide::Divide(const Output& arg0, - const Output& arg1, - const AutoBroadcastSpec& auto_broadcast) - : BinaryElementwiseArithmetic(arg0, arg1, auto_broadcast) -{ - constructor_validate_and_infer_types(); -} - -op::v0::Divide::Divide(const Output& arg0, - const Output& arg1, - bool pythondiv, - const AutoBroadcastSpec& auto_broadcast) - : BinaryElementwiseArithmetic(arg0, arg1, auto_broadcast) - , m_pythondiv(pythondiv) -{ - constructor_validate_and_infer_types(); -} - -bool op::v0::Divide::visit_attributes(AttributeVisitor& visitor) -{ - BinaryElementwiseArithmetic::visit_attributes(visitor); - visitor.on_attribute("m_pythondiv", m_pythondiv); - return true; -} - -shared_ptr op::v0::Divide::clone_with_new_inputs(const OutputVector& new_args) const -{ - check_new_args_count(this, new_args); - return make_shared( - new_args.at(0), new_args.at(1), this->is_pythondiv(), this->get_autob()); -} - -shared_ptr ngraph::operator/(const Output& arg0, const Output& arg1) -{ - return make_shared(arg0, arg1); -} - namespace divide { template @@ -116,12 +75,6 @@ namespace divide } } -bool op::v0::Divide::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const -{ - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v0::Divide::evaluate"); - return divide::evaluate_divide(inputs[0], inputs[1], outputs[0], get_autob(), is_pythondiv()); -} - // ------------------------------ v1 ------------------------------------------- NGRAPH_RTTI_DEFINITION(op::v1::Divide, "Divide", 1, util::BinaryElementwiseArithmetic); diff --git a/ngraph/core/src/op/embeddingbag_offsets_sum.cpp b/ngraph/core/src/op/embeddingbag_offsets_sum.cpp index b4e27c8f697236..93ad5087f17c51 100644 --- a/ngraph/core/src/op/embeddingbag_offsets_sum.cpp +++ b/ngraph/core/src/op/embeddingbag_offsets_sum.cpp @@ -69,4 +69,4 @@ shared_ptr { throw ngraph_error("Incorrect number of arguments"); } -} +} \ No newline at end of file diff --git a/ngraph/core/src/op/equal.cpp b/ngraph/core/src/op/equal.cpp index bb93b8fb1e69c4..3e7ae54343665c 100644 --- a/ngraph/core/src/op/equal.cpp +++ b/ngraph/core/src/op/equal.cpp @@ -24,24 +24,6 @@ NGRAPH_SUPPRESS_DEPRECATED_START using namespace std; using namespace ngraph; -//------------------------------- v0 ------------------------------------------- - -constexpr NodeTypeInfo op::v0::Equal::type_info; - -op::v0::Equal::Equal(const Output& arg0, - const Output& arg1, - const AutoBroadcastSpec& auto_broadcast) - : BinaryElementwiseComparison(arg0, arg1, auto_broadcast) -{ - constructor_validate_and_infer_types(); -} - -shared_ptr op::v0::Equal::clone_with_new_inputs(const OutputVector& new_args) const -{ - check_new_args_count(this, new_args); - return make_shared(new_args.at(0), new_args.at(1), this->get_autob()); -} - namespace equal { template @@ -88,12 +70,6 @@ namespace equal } } -bool op::v0::Equal::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const -{ - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v0::Equal::evaluate"); - return equal::evaluate_equal(inputs[0], inputs[1], outputs[0], get_autob()); -} - //------------------------------- v1 ------------------------------------------- NGRAPH_RTTI_DEFINITION(op::v1::Equal, "Equal", 1); diff --git a/ngraph/core/src/op/fake_quantize.cpp b/ngraph/core/src/op/fake_quantize.cpp index 5ed3f6fd7a9704..98e1b25dd131bf 100644 --- a/ngraph/core/src/op/fake_quantize.cpp +++ b/ngraph/core/src/op/fake_quantize.cpp @@ -130,19 +130,21 @@ OutputVector op::FakeQuantize::decompose_op() const vector(shape_size(input_data_shape), m_levels - 1)); // map the number of quantization levels to the nGraph's quantization and dequantization scales - const auto quant_scale = (input_high - input_low) / levels_minus_one; - const auto dequant_scale = (output_high - output_low) / levels_minus_one; + const auto quant_scale = std::make_shared( + std::make_shared(input_high, input_low), levels_minus_one); + const auto dequant_scale = std::make_shared( + std::make_shared(output_high, output_low), levels_minus_one); // zero_point type needs to match the quantization output type const auto zero_point = Constant::create(element::Type_t::i32, data.get_shape(), {0.0}); const auto axes = get_default_order(input_data_shape); // clip the input data to the range - data = - std::make_shared(input_high, std::make_shared(input_low, data)); + data = std::make_shared(input_high, + std::make_shared(input_low, data)); // shift the input data so that it contains only positive values (and zeros) - data = data - input_low; + data = std::make_shared(data, input_low); shared_ptr quantized_data = make_shared(data, @@ -155,10 +157,10 @@ OutputVector op::FakeQuantize::decompose_op() const quantized_data = make_shared(quantized_data, input_data_type); // dequantization without using the Dequantize op (just a multiplication by the dequant_scale) - const auto dequantized_data = quantized_data * dequant_scale; + const auto dequantized_data = make_shared(quantized_data, dequant_scale); // shift the results so that they fall into the range - return {dequantized_data + output_low}; + return {std::make_shared(dequantized_data, output_low)}; } shared_ptr op::FakeQuantize::clone_with_new_inputs(const OutputVector& new_args) const diff --git a/ngraph/core/src/op/gelu.cpp b/ngraph/core/src/op/gelu.cpp index 786f124fdf6ec1..1f9a628c841160 100644 --- a/ngraph/core/src/op/gelu.cpp +++ b/ngraph/core/src/op/gelu.cpp @@ -58,7 +58,11 @@ OutputVector op::Gelu::decompose_op() const shared_ptr sqrt_two = builder::make_constant(data.get_element_type(), data.get_shape(), std::sqrt(2.0)); - return {half * data * (one + make_shared(data / sqrt_two))}; + shared_ptr add = std::make_shared( + one, make_shared(std::make_shared(data, sqrt_two))); + shared_ptr multiply = std::make_shared(half, data); + + return {std::make_shared(multiply, add)}; } shared_ptr op::Gelu::clone_with_new_inputs(const OutputVector& new_args) const diff --git a/ngraph/core/src/op/greater.cpp b/ngraph/core/src/op/greater.cpp index ae7a0afeaa7ce3..ece748b5500cb1 100644 --- a/ngraph/core/src/op/greater.cpp +++ b/ngraph/core/src/op/greater.cpp @@ -24,24 +24,6 @@ NGRAPH_SUPPRESS_DEPRECATED_START using namespace std; using namespace ngraph; -//-------------------------------------- v0 ------------------------------------ - -constexpr NodeTypeInfo op::v0::Greater::type_info; - -op::v0::Greater::Greater(const Output& arg0, - const Output& arg1, - const AutoBroadcastSpec& auto_broadcast) - : BinaryElementwiseComparison(arg0, arg1, auto_broadcast) -{ - constructor_validate_and_infer_types(); -} - -shared_ptr op::v0::Greater::clone_with_new_inputs(const OutputVector& new_args) const -{ - check_new_args_count(this, new_args); - return make_shared(new_args.at(0), new_args.at(1), this->get_autob()); -} - namespace greaterop { template @@ -88,13 +70,6 @@ namespace greaterop } } -bool op::v0::Greater::evaluate(const HostTensorVector& outputs, - const HostTensorVector& inputs) const -{ - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v0::Greater::evaluate"); - return greaterop::evaluate_greater(inputs[0], inputs[1], outputs[0], get_autob()); -} - //-------------------------------------- v1 ------------------------------------ NGRAPH_RTTI_DEFINITION(op::v1::Greater, "Greater", 1); diff --git a/ngraph/core/src/op/greater_eq.cpp b/ngraph/core/src/op/greater_eq.cpp index f3ce8cbb1801da..348f52594630f9 100644 --- a/ngraph/core/src/op/greater_eq.cpp +++ b/ngraph/core/src/op/greater_eq.cpp @@ -24,24 +24,6 @@ NGRAPH_SUPPRESS_DEPRECATED_START using namespace std; using namespace ngraph; -//---------------------------------- v0 ---------------------------------------- - -constexpr NodeTypeInfo op::v0::GreaterEq::type_info; - -op::v0::GreaterEq::GreaterEq(const Output& arg0, - const Output& arg1, - const AutoBroadcastSpec& auto_broadcast) - : BinaryElementwiseComparison(arg0, arg1, auto_broadcast) -{ - constructor_validate_and_infer_types(); -} - -shared_ptr op::v0::GreaterEq::clone_with_new_inputs(const OutputVector& new_args) const -{ - check_new_args_count(this, new_args); - return make_shared(new_args.at(0), new_args.at(1), this->get_autob()); -} - namespace greater_equalop { template @@ -88,13 +70,6 @@ namespace greater_equalop } } -bool op::v0::GreaterEq::evaluate(const HostTensorVector& outputs, - const HostTensorVector& inputs) const -{ - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v0::GreaterEq::evaluate"); - return greater_equalop::evaluate_greater_equal(inputs[0], inputs[1], outputs[0], get_autob()); -} - //---------------------------------- v1 ---------------------------------------- NGRAPH_RTTI_DEFINITION(op::v1::GreaterEqual, "GreaterEqual", 1); diff --git a/ngraph/core/src/op/less.cpp b/ngraph/core/src/op/less.cpp index 61ac88cba1cf96..ad0d2745aacc2e 100644 --- a/ngraph/core/src/op/less.cpp +++ b/ngraph/core/src/op/less.cpp @@ -24,24 +24,6 @@ NGRAPH_SUPPRESS_DEPRECATED_START using namespace std; using namespace ngraph; -// ----------------------------- v0 -------------------------------------------- - -constexpr NodeTypeInfo op::v0::Less::type_info; - -op::v0::Less::Less(const Output& arg0, - const Output& arg1, - const AutoBroadcastSpec& auto_broadcast) - : BinaryElementwiseComparison(arg0, arg1, auto_broadcast) -{ - constructor_validate_and_infer_types(); -} - -shared_ptr op::v0::Less::clone_with_new_inputs(const OutputVector& new_args) const -{ - check_new_args_count(this, new_args); - return make_shared(new_args.at(0), new_args.at(1), this->get_autob()); -} - namespace lessop { template @@ -88,12 +70,6 @@ namespace lessop } } -bool op::v0::Less::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const -{ - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v0::Less::evaluate"); - return lessop::evaluate_less(inputs[0], inputs[1], outputs[0], get_autob()); -} - // ----------------------------- v1 -------------------------------------------- NGRAPH_RTTI_DEFINITION(op::v1::Less, "Less", 1); diff --git a/ngraph/core/src/op/less_eq.cpp b/ngraph/core/src/op/less_eq.cpp index 5aa4acf11d6ae7..26b3dbeca63d64 100644 --- a/ngraph/core/src/op/less_eq.cpp +++ b/ngraph/core/src/op/less_eq.cpp @@ -94,27 +94,3 @@ bool op::v1::LessEqual::evaluate(const HostTensorVector& outputs, OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::LessEqual::evaluate"); return less_equalop::evaluate_less_equal(inputs[0], inputs[1], outputs[0], get_autob()); } - -// ---------------------------------- v0 --------------------------------------- - -constexpr NodeTypeInfo op::v0::LessEq::type_info; - -op::v0::LessEq::LessEq(const Output& arg0, - const Output& arg1, - const AutoBroadcastSpec& auto_broadcast) - : BinaryElementwiseComparison(arg0, arg1, auto_broadcast) -{ - constructor_validate_and_infer_types(); -} - -shared_ptr op::v0::LessEq::clone_with_new_inputs(const OutputVector& new_args) const -{ - check_new_args_count(this, new_args); - return make_shared(new_args.at(0), new_args.at(1), this->get_autob()); -} - -bool op::v0::LessEq::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const -{ - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v0::LessEq::evaluate"); - return less_equalop::evaluate_less_equal(inputs[0], inputs[1], outputs[0], get_autob()); -} diff --git a/ngraph/core/src/op/maximum.cpp b/ngraph/core/src/op/maximum.cpp index 8095847be923b2..604d527807ee50 100644 --- a/ngraph/core/src/op/maximum.cpp +++ b/ngraph/core/src/op/maximum.cpp @@ -32,22 +32,6 @@ using namespace ngraph; // ------------------------------------ v0 ------------------------------------- -constexpr NodeTypeInfo op::v0::Maximum::type_info; - -op::v0::Maximum::Maximum(const Output& arg0, - const Output& arg1, - const AutoBroadcastSpec& auto_broadcast) - : BinaryElementwiseArithmetic(arg0, arg1, auto_broadcast) -{ - constructor_validate_and_infer_types(); -} - -shared_ptr op::v0::Maximum::clone_with_new_inputs(const OutputVector& new_args) const -{ - check_new_args_count(this, new_args); - return make_shared(new_args.at(0), new_args.at(1), this->get_autob()); -} - namespace maximumop { template @@ -92,13 +76,6 @@ namespace maximumop } } -bool op::v0::Maximum::evaluate(const HostTensorVector& outputs, - const HostTensorVector& inputs) const -{ - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v0::Maximum::evaluate"); - return maximumop::evaluate_maximum(inputs[0], inputs[1], outputs[0], get_autob()); -} - // ------------------------------------ v1 ------------------------------------- constexpr NodeTypeInfo op::v1::Maximum::type_info; diff --git a/ngraph/core/src/op/minimum.cpp b/ngraph/core/src/op/minimum.cpp index 9520fc2c33c90b..8e3a89919633ad 100644 --- a/ngraph/core/src/op/minimum.cpp +++ b/ngraph/core/src/op/minimum.cpp @@ -30,24 +30,6 @@ NGRAPH_SUPPRESS_DEPRECATED_START using namespace std; using namespace ngraph; -// ------------------------------ v0 ------------------------------------------- - -constexpr NodeTypeInfo op::v0::Minimum::type_info; - -op::v0::Minimum::Minimum(const Output& arg0, - const Output& arg1, - const AutoBroadcastSpec& auto_broadcast) - : BinaryElementwiseArithmetic(arg0, arg1, auto_broadcast) -{ - constructor_validate_and_infer_types(); -} - -shared_ptr op::v0::Minimum::clone_with_new_inputs(const OutputVector& new_args) const -{ - check_new_args_count(this, new_args); - return make_shared(new_args.at(0), new_args.at(1), this->get_autob()); -} - namespace minimumop { template @@ -92,13 +74,6 @@ namespace minimumop } } -bool op::v0::Minimum::evaluate(const HostTensorVector& outputs, - const HostTensorVector& inputs) const -{ - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v0::Minimum::evaluate"); - return minimumop::evaluate_minimum(inputs[0], inputs[1], outputs[0], get_autob()); -} - // ------------------------------ v1 ------------------------------------------- constexpr NodeTypeInfo op::v1::Minimum::type_info; diff --git a/ngraph/core/src/op/multiply.cpp b/ngraph/core/src/op/multiply.cpp index 4c8b4be21e8092..ea2edf4c69e238 100644 --- a/ngraph/core/src/op/multiply.cpp +++ b/ngraph/core/src/op/multiply.cpp @@ -24,24 +24,6 @@ NGRAPH_SUPPRESS_DEPRECATED_START using namespace std; using namespace ngraph; -// ------------------------------------ v0 ------------------------------------- - -constexpr NodeTypeInfo op::v0::Multiply::type_info; - -op::v0::Multiply::Multiply(const Output& arg0, - const Output& arg1, - const AutoBroadcastSpec& auto_broadcast) - : BinaryElementwiseArithmetic(arg0, arg1, auto_broadcast) -{ - constructor_validate_and_infer_types(); -} - -shared_ptr op::v0::Multiply::clone_with_new_inputs(const OutputVector& new_args) const -{ - check_new_args_count(this, new_args); - return make_shared(new_args.at(0), new_args.at(1), this->get_autob()); -} - namespace multiplyop { template @@ -88,6 +70,24 @@ namespace multiplyop } } +// ------------------------------------ v0 ------------------------------------- + +constexpr NodeTypeInfo op::v0::Multiply::type_info; + +op::v0::Multiply::Multiply(const Output& arg0, + const Output& arg1, + const AutoBroadcastSpec& auto_broadcast) + : BinaryElementwiseArithmetic(arg0, arg1, auto_broadcast) +{ + constructor_validate_and_infer_types(); +} + +shared_ptr op::v0::Multiply::clone_with_new_inputs(const OutputVector& new_args) const +{ + check_new_args_count(this, new_args); + return make_shared(new_args.at(0), new_args.at(1), this->get_autob()); +} + bool op::v0::Multiply::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { @@ -119,10 +119,3 @@ bool op::v1::Multiply::evaluate(const HostTensorVector& outputs, OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::Multiply::evaluate"); return multiplyop::evaluate_multiply(inputs[0], inputs[1], outputs[0], get_autob()); } - -// ----------------------------------------------------------------------------- - -shared_ptr ngraph::operator*(const Output& arg0, const Output& arg1) -{ - return make_shared(arg0, arg1); -} diff --git a/ngraph/core/src/op/mvn.cpp b/ngraph/core/src/op/mvn.cpp index 3b733a4cce59b0..8408e09939b2ee 100644 --- a/ngraph/core/src/op/mvn.cpp +++ b/ngraph/core/src/op/mvn.cpp @@ -79,8 +79,8 @@ OutputVector op::MVN::decompose_op() const // calculate mean normalization auto mean = builder::opset1::mean(data, m_reduction_axes); - auto mean_normalization = - data - builder::opset1::make_broadcast(mean, data_shape, m_reduction_axes); + auto mean_normalization = std::make_shared( + data, builder::opset1::make_broadcast(mean, data_shape, m_reduction_axes)); if (!m_normalize_variance) { @@ -93,10 +93,10 @@ OutputVector op::MVN::decompose_op() const // add epsilon auto eps_node = op::Constant::create( data.get_element_type(), Output(variance).get_shape(), vector{m_eps}); - variance = std::make_shared(variance + eps_node); - - return OutputVector{mean_normalization / builder::opset1::make_broadcast( - variance, data_shape, m_reduction_axes)}; + variance = std::make_shared(std::make_shared(variance, eps_node)); + return OutputVector{std::make_shared( + mean_normalization, + builder::opset1::make_broadcast(variance, data_shape, m_reduction_axes))}; } } diff --git a/ngraph/core/src/op/normalize_l2.cpp b/ngraph/core/src/op/normalize_l2.cpp index 30fda2d47ee0c2..689810489365d7 100644 --- a/ngraph/core/src/op/normalize_l2.cpp +++ b/ngraph/core/src/op/normalize_l2.cpp @@ -108,7 +108,7 @@ OutputVector op::NormalizeL2::decompose_op() const const auto axes = input_value(1); Output norm = builder::opset1::l2_norm(data, axes, m_eps, builder_bias_mode, true); - data = make_shared(data, norm, AutoBroadcastSpec(AutoBroadcastType::NUMPY)); + data = make_shared(data, norm, AutoBroadcastSpec(AutoBroadcastType::NUMPY)); return OutputVector{data}; } diff --git a/ngraph/core/src/op/not_equal.cpp b/ngraph/core/src/op/not_equal.cpp index 44dae5c95cc765..0ea1b95d4a534d 100644 --- a/ngraph/core/src/op/not_equal.cpp +++ b/ngraph/core/src/op/not_equal.cpp @@ -24,24 +24,6 @@ NGRAPH_SUPPRESS_DEPRECATED_START using namespace std; using namespace ngraph; -// ----------------------------------- v0 -------------------------------------- - -constexpr NodeTypeInfo op::v0::NotEqual::type_info; - -op::v0::NotEqual::NotEqual(const Output& arg0, - const Output& arg1, - const AutoBroadcastSpec& auto_broadcast) - : BinaryElementwiseComparison(arg0, arg1, auto_broadcast) -{ - constructor_validate_and_infer_types(); -} - -shared_ptr op::v0::NotEqual::clone_with_new_inputs(const OutputVector& new_args) const -{ - check_new_args_count(this, new_args); - return make_shared(new_args.at(0), new_args.at(1), this->get_autob()); -} - namespace not_equalop { template @@ -88,13 +70,6 @@ namespace not_equalop } } -bool op::v0::NotEqual::evaluate(const HostTensorVector& outputs, - const HostTensorVector& inputs) const -{ - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v0::NotEqual::evaluate"); - return not_equalop::evaluate_not_equal(inputs[0], inputs[1], outputs[0], get_autob()); -} - // ----------------------------------- v1 -------------------------------------- NGRAPH_RTTI_DEFINITION(op::v1::NotEqual, "NotEqual", 1); diff --git a/ngraph/core/src/op/power.cpp b/ngraph/core/src/op/power.cpp index 193c6ded5edf20..ff1cb9dd91b276 100644 --- a/ngraph/core/src/op/power.cpp +++ b/ngraph/core/src/op/power.cpp @@ -27,24 +27,6 @@ NGRAPH_SUPPRESS_DEPRECATED_START using namespace std; using namespace ngraph; -// ------------------------------ v0 ------------------------------------------- - -constexpr NodeTypeInfo op::v0::Power::type_info; - -op::v0::Power::Power(const Output& arg0, - const Output& arg1, - const AutoBroadcastSpec& auto_broadcast) - : BinaryElementwiseArithmetic(arg0, arg1, auto_broadcast) -{ - constructor_validate_and_infer_types(); -} - -shared_ptr op::v0::Power::clone_with_new_inputs(const OutputVector& new_args) const -{ - check_new_args_count(this, new_args); - return make_shared(new_args.at(0), new_args.at(1), this->get_autob()); -} - namespace power { template @@ -91,12 +73,6 @@ namespace power } } -bool op::v0::Power::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const -{ - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v0::Power::evaluate"); - return power::evaluate_power(inputs[0], inputs[1], outputs[0], get_autob()); -} - // ------------------------------ v1 ------------------------------------------- constexpr NodeTypeInfo op::v1::Power::type_info; diff --git a/ngraph/core/src/op/prelu.cpp b/ngraph/core/src/op/prelu.cpp index f05d1a67a8f848..2b29c67dae4f23 100644 --- a/ngraph/core/src/op/prelu.cpp +++ b/ngraph/core/src/op/prelu.cpp @@ -75,14 +75,15 @@ OutputVector op::PRelu::decompose_op() const std::shared_ptr zero_node = make_zero(data.get_element_type(), data.get_shape()); std::shared_ptr negative_map = std::make_shared( - std::make_shared(data, zero_node), data.get_element_type()); + std::make_shared(data, zero_node), data.get_element_type()); std::shared_ptr positive_map = std::make_shared( - std::make_shared(data, zero_node), data.get_element_type()); + std::make_shared(data, zero_node), data.get_element_type()); - slope = negative_map * slope + positive_map; + slope = std::make_shared(negative_map, + std::make_shared(slope, positive_map)); - return {data * slope}; + return {std::make_shared(data, slope)}; } shared_ptr op::PRelu::clone_with_new_inputs(const OutputVector& new_args) const diff --git a/ngraph/core/src/op/select.cpp b/ngraph/core/src/op/select.cpp index 7352ec5be7bbc9..75e6d76d9f68f0 100644 --- a/ngraph/core/src/op/select.cpp +++ b/ngraph/core/src/op/select.cpp @@ -171,45 +171,3 @@ bool op::v1::Select::evaluate(const HostTensorVector& output_values, return detail::evaluate_select(output_values, input_values, autob, get_output_element_type(0)); } - -constexpr NodeTypeInfo op::v0::Select::type_info; - -op::v0::Select::Select(const Output& arg0, const Output& arg1, const Output& arg2) - : Op({arg0, arg1, arg2}) -{ - constructor_validate_and_infer_types(); -} - -void op::v0::Select::validate_and_infer_types() -{ - NODE_VALIDATION_CHECK(this, - get_input_element_type(0).is_dynamic() || - get_input_element_type(0) == element::Type_t::boolean, - "Argument 0 must have boolean element type (element type: ", - get_input_element_type(0), - ")."); - - PartialShape result_shape = get_input_partial_shape(0); - - NODE_VALIDATION_CHECK(this, - PartialShape::merge_into(result_shape, get_input_partial_shape(1)), - "Argument shapes are inconsistent."); - NODE_VALIDATION_CHECK(this, - PartialShape::merge_into(result_shape, get_input_partial_shape(2)), - "Argument shapes are inconsistent."); - - element::Type result_et; - - NODE_VALIDATION_CHECK( - this, - element::Type::merge(result_et, get_input_element_type(1), get_input_element_type(2)), - "Argument 1 and 2 element types are inconsistent."); - - set_output_type(0, result_et, result_shape); -} - -shared_ptr op::v0::Select::clone_with_new_inputs(const OutputVector& new_args) const -{ - check_new_args_count(this, new_args); - return make_shared(new_args.at(0), new_args.at(1), new_args.at(2)); -} diff --git a/ngraph/core/src/op/shuffle_channels.cpp b/ngraph/core/src/op/shuffle_channels.cpp index 9b9a23c004dd05..5f7bc350cb8457 100644 --- a/ngraph/core/src/op/shuffle_channels.cpp +++ b/ngraph/core/src/op/shuffle_channels.cpp @@ -13,10 +13,15 @@ // See the License for the specific language governing permissions and // limitations under the License. //***************************************************************************** +#include -#include "ngraph/op/shuffle_channels.hpp" #include "ngraph/attribute_visitor.hpp" #include "ngraph/builder/reshape.hpp" +#include "ngraph/op/shuffle_channels.hpp" +#include "ngraph/runtime/host_tensor.hpp" +#include "ngraph/runtime/opt_kernel/reshape.hpp" +#include "ngraph/type/element_type.hpp" +#include "ngraph/type/element_type_traits.hpp" using namespace std; using namespace ngraph; @@ -28,7 +33,7 @@ constexpr NodeTypeInfo op::ShuffleChannels::type_info; op::ShuffleChannels::ShuffleChannels(const Output& data, const int64_t axis, const int64_t group) - : FusedOp({data}) + : Op({data}) , m_axis(axis) , m_group{group} { @@ -61,8 +66,9 @@ size_t op::ShuffleChannels::get_zero_based_axis() const } } -void op::ShuffleChannels::pre_validate_and_infer_types() +void op::ShuffleChannels::validate_and_infer_types() { + const auto& data_type = get_input_element_type(0); if (get_input_partial_shape(0).is_static()) { const auto shape = get_input_shape(0); @@ -84,18 +90,13 @@ void op::ShuffleChannels::pre_validate_and_infer_types() this, channel_dim_size % m_group == 0, "The channel dimension size has to be a multiple of the groups parameter value."); + set_output_size(1); + set_output_type(0, data_type, shape); + } + else + { + set_output_type(0, data_type, PartialShape::dynamic()); } -} - -OutputVector op::ShuffleChannels::decompose_op() const -{ - const auto data = input_value(0); - const auto& data_shape = data.get_shape(); - - const auto reshaped = builder::opset1::reshape(data, get_pre_shuffle_shape(data_shape)); - const auto shuffled = builder::opset1::reorder_axes(reshaped, {0, 2, 1, 3}); - - return {builder::opset1::reshape(shuffled, data_shape)}; } shared_ptr op::ShuffleChannels::clone_with_new_inputs(const OutputVector& new_args) const @@ -137,3 +138,46 @@ Shape op::ShuffleChannels::get_pre_shuffle_shape(const Shape& data_shape) const return res; } + +bool op::ShuffleChannels::evaluate(const HostTensorVector& outputs, + const HostTensorVector& inputs) const +{ + const auto arg = inputs[0]->get_data_ptr(); + auto out = outputs[0]->get_data_ptr(); + Shape data_shape = inputs[0]->get_shape(); + const Shape& ds = data_shape; + size_t elem_size = inputs[0]->get_element_type().size(); + + Shape reshaped_out_shape(4, 1); + size_t axis_zb = m_axis >= 0 ? m_axis : m_axis + data_shape.size(); + for (size_t i = 0; i < axis_zb; ++i) + { + reshaped_out_shape[0] *= ds[i]; + } + + reshaped_out_shape[1] = m_group; + reshaped_out_shape[2] = ds[axis_zb] / m_group; + + for (size_t i = axis_zb + 1; i < ds.size(); ++i) + { + reshaped_out_shape[3] *= ds[i]; + } + size_t data_size = shape_size(data_shape) * elem_size; + + // first reshape from data_shape to reshaped_out_shape is skipped since it doesn't affect out + // data + + Shape transpose_axes_order = {0, 2, 1, 3}; + Shape transposed_shape(transpose_axes_order.size()); + + for (size_t i = 0; i < transpose_axes_order.size(); ++i) + { + transposed_shape[i] = data_shape.at(transpose_axes_order.at(i)); + } + auto axis_vector = AxisVector{begin(transpose_axes_order), end(transpose_axes_order)}; + runtime::opt_kernel::reshape( + arg, out, reshaped_out_shape, axis_vector, transposed_shape, elem_size); + + // last reshape from transposed_shape to data_shape is skipped since it doesn't affect out data + return true; +} diff --git a/ngraph/core/src/op/space_to_batch.cpp b/ngraph/core/src/op/space_to_batch.cpp index cc950a7cbca6de..c5aa1c583ac754 100644 --- a/ngraph/core/src/op/space_to_batch.cpp +++ b/ngraph/core/src/op/space_to_batch.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include "ngraph/builder/make_constant.hpp" #include "ngraph/node.hpp" @@ -23,6 +24,9 @@ #include "ngraph/ops.hpp" #include "ngraph/shape.hpp" +#include "ngraph/runtime/opt_kernel/reshape.hpp" +#include "ngraph/runtime/reference/pad.hpp" + using namespace std; using namespace ngraph; @@ -135,3 +139,132 @@ bool ngraph::op::v1::SpaceToBatch::visit_attributes(ngraph::AttributeVisitor& vi { return true; } + +bool ngraph::op::v1::SpaceToBatch::evaluate(const HostTensorVector& outputs, + const HostTensorVector& inputs) const +{ + const auto& data = inputs[0]; + const auto& out = outputs[0]; + const auto& out_shape = out->get_shape(); + size_t elem_size = data->get_element_type().size(); + + if (data->get_partial_shape().is_dynamic()) + { + return false; + } + auto data_shape = data->get_shape(); + + if (!(data->get_shape().size() == 4 || data->get_shape().size() == 5)) + { + return false; + } + + size_t block_values_size = shape_size(inputs[1]->get_shape()); + const auto* block_values = inputs[1]->get_data_ptr(); + const auto* pads_begin = inputs[2]->get_data_ptr(); + const auto* pads_end = inputs[3]->get_data_ptr(); + + const char* pad_value = nullptr; + const std::vector pad_zero_value(elem_size, 0); + if (inputs.size() == 4) + { + pad_value = inputs[3]->get_data_ptr(); + } + else + { + pad_value = pad_zero_value.data(); + } + CoordinateDiff pads_begin_vec(shape_size(inputs[2]->get_shape())); + pads_begin_vec.assign(pads_begin, pads_begin + shape_size(inputs[2]->get_shape())); + CoordinateDiff pads_end_vec(shape_size(inputs[2]->get_shape())); + pads_end_vec.assign(pads_end, pads_end + shape_size(inputs[2]->get_shape())); + + Shape padded_shape(data_shape.size()); + for (size_t i = 0; i < data_shape.size(); ++i) + { + padded_shape[i] = data_shape[i] + pads_begin_vec[i] + pads_end_vec[i]; + } + + std::vector padded_data(shape_size(padded_shape) * elem_size); + ngraph::runtime::reference::pad(data->get_data_ptr(), + pad_value, + padded_data.data(), + elem_size, + data_shape, + padded_shape, + pads_begin_vec, + pads_end_vec, + ngraph::op::PadMode::CONSTANT); + data_shape = padded_shape; + + Shape dispersed_shape(block_values_size + 1); + std::vector axes_order(block_values_size + 1); + Shape squeezed_shape(data_shape.begin(), data_shape.end()); + std::vector plain_axes_order(block_values_size + 1); + std::iota(plain_axes_order.begin(), plain_axes_order.end(), 0); + + std::vector flat_data(padded_data.begin(), padded_data.end()); + std::vector dispersed_data(shape_size(data_shape) * elem_size); + std::vector post_transpose_data(shape_size(data_shape) * elem_size); + + for (int64_t block_idx = block_values_size - 1; block_idx >= 0; --block_idx) + { + int64_t sq_shape_idx = block_values_size - 1; + int64_t axis_idx = axes_order.size() - 1; + for (int64_t shape_idx = dispersed_shape.size() - 1; shape_idx >= 0; --shape_idx) + { + if (shape_idx == (block_idx + 1)) + { + dispersed_shape[shape_idx] = block_values[block_idx]; + axes_order[0] = shape_idx; + } + else if (shape_idx == block_idx) + { + dispersed_shape[shape_idx] = squeezed_shape[sq_shape_idx] / block_values[block_idx]; + axes_order[axis_idx] = shape_idx; + axis_idx--; + sq_shape_idx--; + } + else + { + dispersed_shape[shape_idx] = squeezed_shape[sq_shape_idx]; + axes_order[axis_idx] = shape_idx; + axis_idx--; + sq_shape_idx--; + } + } + + runtime::opt_kernel::reshape(flat_data.data(), + dispersed_data.data(), + data_shape, + plain_axes_order, + dispersed_shape, + elem_size); + Shape post_transpose_shape(axes_order.size()); + for (size_t i = 0; i < axes_order.size(); ++i) + { + post_transpose_shape[i] = dispersed_shape[axes_order[i]]; + } + + runtime::opt_kernel::reshape(dispersed_data.data(), + post_transpose_data.data(), + dispersed_shape, + axes_order, + post_transpose_shape, + elem_size); + squeezed_shape[0] *= block_values[block_idx]; + squeezed_shape[block_idx] /= block_values[block_idx]; + + runtime::opt_kernel::reshape(post_transpose_data.data(), + flat_data.data(), + post_transpose_shape, + plain_axes_order, + squeezed_shape, + elem_size); + data_shape = squeezed_shape; + } + + out->write(flat_data.data(), elem_size * shape_size(out->get_shape())); + + return true; +} \ No newline at end of file diff --git a/ngraph/core/src/op/space_to_depth.cpp b/ngraph/core/src/op/space_to_depth.cpp index 26a0736c04cad6..8ef7dc5d9ca4a8 100644 --- a/ngraph/core/src/op/space_to_depth.cpp +++ b/ngraph/core/src/op/space_to_depth.cpp @@ -16,11 +16,14 @@ #include #include #include +#include #include "ngraph/attribute_visitor.hpp" #include "ngraph/builder/reshape.hpp" +#include "ngraph/op/space_to_depth.hpp" #include "ngraph/shape.hpp" -#include "space_to_depth.hpp" + +#include "ngraph/runtime/opt_kernel/reshape.hpp" using namespace std; using namespace ngraph; @@ -32,7 +35,7 @@ constexpr NodeTypeInfo op::SpaceToDepth::type_info; op::SpaceToDepth::SpaceToDepth(const Output& data, const SpaceToDepthMode& mode, size_t block_size) - : FusedOp({data}) + : Op({data}) , m_blocksize(block_size) , m_mode(mode) { @@ -51,26 +54,74 @@ bool ngraph::op::v0::SpaceToDepth::visit_attributes(AttributeVisitor& visitor) return true; } -OutputVector op::SpaceToDepth::decompose_op() const +shared_ptr op::SpaceToDepth::clone_with_new_inputs(const OutputVector& new_args) const { - auto data = input_value(0); - auto data_shape = data.get_shape(); + if (new_args.size() != 1) + { + throw ngraph_error("Incorrect number of new arguments"); + } + return make_shared(new_args.at(0), m_mode, m_blocksize); +} + +void ngraph::op::v0::SpaceToDepth::validate_and_infer_types() +{ + PartialShape data_pshape = get_input_partial_shape(0); - NODE_VALIDATION_CHECK(this, - (data_shape.size() >= 3), - "The input tensor with rank lower than 3 is not supported (input rank: ", - data_shape.size(), - ")"); + const auto& data_type = get_input_element_type(0); - NODE_VALIDATION_CHECK(this, m_blocksize > 0, "m_blocksize must be greater than 0"); + auto data = input_value(0); - if (data_shape.size() == 3) + if (data_pshape.is_static()) { - // Insert batch axis - data_shape.insert(data_shape.begin(), 1); - data = builder::opset1::reshape(data, data_shape); + const auto& data_shape = data.get_shape(); + + NODE_VALIDATION_CHECK( + this, + !(data_shape.size() < 3), + "The input tensor with rank lower than 3 is not supported (input rank: ", + data_shape.size(), + ")"); + + auto multiplier = std::pow(m_blocksize, data_shape.size() - 2); + + auto out_shape = data_shape; + out_shape[1] *= multiplier; + for (size_t i = 2; i < out_shape.size(); i++) + { + NODE_VALIDATION_CHECK(this, + m_blocksize > 0 && !(out_shape[i] % m_blocksize), + "The dimension on position: ", + i, + " equal to: ", + out_shape[i], + " must be a multiple of m_blocksize: ", + m_blocksize); + + out_shape[i] /= m_blocksize; + } + + set_output_size(1); + set_output_type(0, data_type, out_shape); } + else + { + set_output_type(0, data_type, PartialShape::dynamic()); + } +} + +bool ngraph::op::v0::SpaceToDepth::evaluate(const HostTensorVector& outputs, + const HostTensorVector& inputs) const +{ + const auto& data = inputs[0]; + const auto& out = outputs[0]; + const auto& out_shape = out->get_shape(); + size_t elem_size = data->get_element_type().size(); + if (data->get_partial_shape().is_dynamic()) + { + return false; + } + auto data_shape = data->get_shape(); const size_t n_dim = data_shape.at(0); const size_t c_dim = data_shape.at(1); const size_t spatial_dim_index = 2; @@ -97,7 +148,15 @@ OutputVector op::SpaceToDepth::decompose_op() const dispersed_shape.push_back(data_shape.at(i + spatial_dim_index) / m_blocksize); dispersed_shape.push_back(m_blocksize); } - auto flat_node = builder::opset1::reshape(data, dispersed_shape); + std::vector plain_axes_order(data_shape.size()); + std::iota(plain_axes_order.begin(), plain_axes_order.end(), 0); + std::vector dispersed_data(shape_size(data_shape) * elem_size); + runtime::opt_kernel::reshape(data->get_data_ptr(), + dispersed_data.data(), + data_shape, + plain_axes_order, + dispersed_shape, + elem_size); // calculate axes to transpose // [0, 3, 5, ..., spatial_dims + (spatial_dims + 1), 2, 4, ..., K + K]) vector axes_order{0}; @@ -131,25 +190,37 @@ OutputVector op::SpaceToDepth::decompose_op() const default: { axes_order.insert(axes_order.begin() + spatial_dims + 1, 1); } } - flat_node = builder::opset1::reorder_axes(flat_node, axes_order); + std::vector transposed_data(shape_size(data_shape) * elem_size); + Shape post_transpose_shape(axes_order.size()); + for (size_t axis_idx = 0; axis_idx < axes_order.size(); ++axis_idx) + { + post_transpose_shape[axis_idx] = dispersed_shape[axes_order[axis_idx]]; + } + + runtime::opt_kernel::reshape(dispersed_data.data(), + transposed_data.data(), + dispersed_shape, + axes_order, + post_transpose_shape, + elem_size); + Shape squeezed_shape{n_dim}; for (int i = 0; i < spatial_dims; ++i) { squeezed_shape.push_back(data_shape.at(spatial_dim_index + i) / m_blocksize); } squeezed_shape.insert(squeezed_shape.begin() + 1, c_dim * std::pow(m_blocksize, spatial_dims)); - flat_node = builder::opset1::reshape(flat_node, squeezed_shape); - - return OutputVector{flat_node}; -} - -shared_ptr op::SpaceToDepth::clone_with_new_inputs(const OutputVector& new_args) const -{ - if (new_args.size() != 1) + for (size_t i = plain_axes_order.size() - 1; i < post_transpose_shape.size() - 1; ++i) { - throw ngraph_error("Incorrect number of new arguments"); + plain_axes_order.push_back(plain_axes_order[i] + 1); } - return make_shared(new_args.at(0), m_mode, m_blocksize); + runtime::opt_kernel::reshape(transposed_data.data(), + out->get_data_ptr(), + post_transpose_shape, + plain_axes_order, + squeezed_shape, + elem_size); + return true; } namespace ngraph diff --git a/ngraph/core/src/op/squared_difference.cpp b/ngraph/core/src/op/squared_difference.cpp index 0e9410e4383cb9..c90ffb828b18df 100644 --- a/ngraph/core/src/op/squared_difference.cpp +++ b/ngraph/core/src/op/squared_difference.cpp @@ -48,9 +48,9 @@ OutputVector op::SquaredDifference::decompose_op() const const auto x1 = input_value(0); const auto x2 = input_value(1); - const auto difference = make_shared(x1, x2, m_autobroadcast); + const auto difference = make_shared(x1, x2, m_autobroadcast); - return {difference * difference}; + return {make_shared(difference, difference)}; } shared_ptr op::SquaredDifference::clone_with_new_inputs(const OutputVector& new_args) const diff --git a/ngraph/core/src/op/squeeze.cpp b/ngraph/core/src/op/squeeze.cpp index 5cf640d2932d82..a9f12d3d8e2d29 100644 --- a/ngraph/core/src/op/squeeze.cpp +++ b/ngraph/core/src/op/squeeze.cpp @@ -154,38 +154,6 @@ namespace squeeze const HostTensorPtr& out) { auto element_type = arg0->get_element_type(); - out->set_element_type(element_type); - - auto data_shape = arg0->get_shape(); - int64_t data_rank = static_cast(data_shape.size()); - auto axes_shape = arg1->get_shape(); - NGRAPH_CHECK(axes_shape.size() <= 1, "Axes to remove must be a vector or empty."); - - auto out_shape = data_shape; - // Empty axes vector - if (axes_shape.size() == 0 || axes_shape[0] == 0) - { - out_shape.erase(std::remove(out_shape.begin(), out_shape.end(), 1), out_shape.end()); - } - else - { - // Get axes - vector axes = read_index_vector(arg1); - // Normalize axes - std::transform(axes.begin(), - axes.end(), - axes.begin(), - [data_rank](int64_t i) -> int64_t { return i < 0 ? data_rank + i : i; }); - // Sort in decreasing order - std::set> axes_set(axes.begin(), axes.end()); - for (int64_t axis : axes_set) - { - NGRAPH_CHECK(axis >= 0 && axis < data_rank, "Axis is out of bounds: ", axis); - NGRAPH_CHECK(out_shape[axis] == 1, "Only axis of size 1 can be removed."); - out_shape.erase(out_shape.begin() + axis); - } - } - out->set_shape(out_shape); bool rc = true; switch (element_type) diff --git a/ngraph/core/src/op/subtract.cpp b/ngraph/core/src/op/subtract.cpp index 3c100f2b23efe0..39e2e46dbb5c3f 100644 --- a/ngraph/core/src/op/subtract.cpp +++ b/ngraph/core/src/op/subtract.cpp @@ -20,34 +20,9 @@ #include "ngraph/runtime/host_tensor.hpp" #include "ngraph/runtime/reference/subtract.hpp" -NGRAPH_SUPPRESS_DEPRECATED_START - using namespace std; using namespace ngraph; -// ------------------------------- v0 ------------------------------------------ - -constexpr NodeTypeInfo op::v0::Subtract::type_info; - -op::v0::Subtract::Subtract(const Output& arg0, - const Output& arg1, - const AutoBroadcastSpec& auto_broadcast) - : BinaryElementwiseArithmetic(arg0, arg1, auto_broadcast) -{ - constructor_validate_and_infer_types(); -} - -shared_ptr op::v0::Subtract::clone_with_new_inputs(const OutputVector& new_args) const -{ - check_new_args_count(this, new_args); - return make_shared(new_args.at(0), new_args.at(1), this->get_autob()); -} - -shared_ptr ngraph::operator-(const Output arg0, const Output arg1) -{ - return make_shared(arg0, arg1); -} - namespace subtract { template @@ -94,13 +69,6 @@ namespace subtract } } -bool op::v0::Subtract::evaluate(const HostTensorVector& outputs, - const HostTensorVector& inputs) const -{ - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v0::Subtract::evaluate"); - return subtract::evaluate_subtract(inputs[0], inputs[1], outputs[0], get_autob()); -} - // ------------------------------- v1 ------------------------------------------ NGRAPH_RTTI_DEFINITION(op::v1::Subtract, "Subtract", 1, util::BinaryElementwiseArithmetic); diff --git a/ngraph/core/src/op/util/op_types.cpp b/ngraph/core/src/op/util/op_types.cpp index b4d55d4aa74db9..843964c0436daa 100644 --- a/ngraph/core/src/op/util/op_types.cpp +++ b/ngraph/core/src/op/util/op_types.cpp @@ -94,20 +94,14 @@ bool ngraph::op::is_constant(const ngraph::Node* node) bool ngraph::op::is_commutative(const ngraph::Node* node) { - return dynamic_cast(node) != nullptr || - dynamic_cast(node) != nullptr || - dynamic_cast(node) != nullptr || + return dynamic_cast(node) != nullptr || dynamic_cast(node) != nullptr || - dynamic_cast(node) != nullptr || dynamic_cast(node) != nullptr || - dynamic_cast(node) != nullptr || dynamic_cast(node) != nullptr || dynamic_cast(node) != nullptr || dynamic_cast(node) != nullptr || dynamic_cast(node) != nullptr || - dynamic_cast(node) != nullptr || dynamic_cast(node) != nullptr || - dynamic_cast(node) != nullptr || dynamic_cast(node) != nullptr || dynamic_cast(node) != nullptr; } diff --git a/ngraph/core/src/validation_util.cpp b/ngraph/core/src/validation_util.cpp index 0b5db851140b02..2fc5041d9c19e2 100644 --- a/ngraph/core/src/validation_util.cpp +++ b/ngraph/core/src/validation_util.cpp @@ -1145,7 +1145,6 @@ pair ngraph::maximum_value(const Output& value) {op::v0::Constant::type_info, exec_constant}, {op::v0::Convert::type_info, exec_nop}, {op::v1::Gather::type_info, exec_gather}, - {op::v0::Minimum::type_info, exec_minimum}, {op::v1::Minimum::type_info, exec_minimum}, {op::v1::ReduceMin::type_info, exec_reduce_min}, {op::v1::Reshape::type_info, exec_nop}, diff --git a/ngraph/frontend/onnx_import/src/op/gru.cpp b/ngraph/frontend/onnx_import/src/op/gru.cpp index bc39a31b748b38..37b38dfedbb65c 100644 --- a/ngraph/frontend/onnx_import/src/op/gru.cpp +++ b/ngraph/frontend/onnx_import/src/op/gru.cpp @@ -58,8 +58,10 @@ namespace ngraph const int split_parts = 2 * 3; const auto split_bias = builder::opset1::split(bias, split_parts, 1); - const auto wr_z_bias = split_bias.at(0) + split_bias.at(3); - const auto wr_r_bias = split_bias.at(1) + split_bias.at(4); + const auto wr_z_bias = std::make_shared( + split_bias.at(0), split_bias.at(3)); + const auto wr_r_bias = std::make_shared( + split_bias.at(1), split_bias.at(4)); // The result has shape: [num_directions, 4 * hidden_size] // and data layout: // [ diff --git a/ngraph/frontend/onnx_import/src/utils/recurrent.cpp b/ngraph/frontend/onnx_import/src/utils/recurrent.cpp index 8ebd20b893c351..d4fbd62c9c60f7 100644 --- a/ngraph/frontend/onnx_import/src/utils/recurrent.cpp +++ b/ngraph/frontend/onnx_import/src/utils/recurrent.cpp @@ -66,7 +66,8 @@ namespace ngraph auto bias = ng_inputs.at(3); auto split_bias = builder::opset1::split(bias, 2, 1); NGRAPH_SUPPRESS_DEPRECATED_START - m_map[OpInput::B] = split_bias.at(0) + split_bias.at(1); + m_map[OpInput::B] = + std::make_shared(split_bias.at(0), split_bias.at(1)); NGRAPH_SUPPRESS_DEPRECATED_END } else diff --git a/ngraph/python/src/pyngraph/node.cpp b/ngraph/python/src/pyngraph/node.cpp index 9b9a4082b00ce4..d342cb2475a7f6 100644 --- a/ngraph/python/src/pyngraph/node.cpp +++ b/ngraph/python/src/pyngraph/node.cpp @@ -41,27 +41,27 @@ void regclass_pyngraph_Node(py::module m) node.doc() = "ngraph.impl.Node wraps ngraph::Node"; node.def("__add__", [](const std::shared_ptr& a, const std::shared_ptr b) { - return a + b; + return std::make_shared(a, b); }, py::is_operator()); node.def("__sub__", [](const std::shared_ptr& a, const std::shared_ptr b) { - return a - b; + return std::make_shared(a, b); }, py::is_operator()); node.def("__mul__", [](const std::shared_ptr& a, const std::shared_ptr b) { - return a * b; + return std::make_shared(a, b); }, py::is_operator()); node.def("__div__", [](const std::shared_ptr& a, const std::shared_ptr b) { - return a / b; + return std::make_shared(a, b); }, py::is_operator()); node.def("__truediv__", [](const std::shared_ptr& a, const std::shared_ptr b) { - return a / b; + return std::make_shared(a, b); }, py::is_operator()); diff --git a/ngraph/test/CMakeLists.txt b/ngraph/test/CMakeLists.txt index 336f9f86f16cea..70b90a36596d4e 100644 --- a/ngraph/test/CMakeLists.txt +++ b/ngraph/test/CMakeLists.txt @@ -235,7 +235,6 @@ endif() if (NGRAPH_INTERPRETER_ENABLE) list(APPEND SRC - backend_debug_api.cpp builder.cpp backend_api.cpp) set(ACTIVE_BACKEND_LIST ${ACTIVE_BACKEND_LIST} INTERPRETER) @@ -318,7 +317,6 @@ set(MULTI_TEST_SRC backend/pad.in.cpp backend/parameter_as_output.in.cpp backend/power.in.cpp - backend/quantize_dequantize.in.cpp backend/range.in.cpp backend/reduce_max.in.cpp backend/reduce_mean.in.cpp diff --git a/ngraph/test/backend/abc.in.cpp b/ngraph/test/backend/abc.in.cpp index 8ce73fe72a9c05..21f4669076fac6 100644 --- a/ngraph/test/backend/abc.in.cpp +++ b/ngraph/test/backend/abc.in.cpp @@ -20,8 +20,6 @@ #include "util/test_case.hpp" #include "util/test_control.hpp" -NGRAPH_SUPPRESS_DEPRECATED_START - using namespace std; using namespace ngraph; @@ -34,7 +32,8 @@ NGRAPH_TEST(${BACKEND_NAME}, abc) auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); auto C = make_shared(element::Type_t::f32, shape); - auto f = make_shared((A + B) * C, ParameterVector{A, B, C}); + auto arg = make_shared(make_shared(A, B), C); + auto f = make_shared(arg, ParameterVector{A, B, C}); std::vector a{1, 2, 3, 4}; std::vector b{5, 6, 7, 8}; @@ -65,7 +64,8 @@ NGRAPH_TEST(${BACKEND_NAME}, abc_int64) auto A = make_shared(element::Type_t::i64, shape); auto B = make_shared(element::Type_t::i64, shape); auto C = make_shared(element::Type_t::i64, shape); - auto f = make_shared((A + B) * C, ParameterVector{A, B, C}); + auto arg = make_shared(make_shared(A, B), C); + auto f = make_shared(arg, ParameterVector{A, B, C}); std::vector a{1, 2, 3, 4}; std::vector b{5, 6, 7, 8}; diff --git a/ngraph/test/backend/add.in.cpp b/ngraph/test/backend/add.in.cpp index e069038c609239..f479d5576976ea 100644 --- a/ngraph/test/backend/add.in.cpp +++ b/ngraph/test/backend/add.in.cpp @@ -37,8 +37,6 @@ #include "util/test_case.hpp" #include "util/test_control.hpp" -NGRAPH_SUPPRESS_DEPRECATED_START - using namespace std; using namespace ngraph; @@ -50,7 +48,7 @@ NGRAPH_TEST(${BACKEND_NAME}, add) Shape shape{2, 2}; auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); vector a{1, 2, 3, 4}; vector b{5, 6, 7, 8}; @@ -66,7 +64,7 @@ NGRAPH_TEST(${BACKEND_NAME}, add_overload) Shape shape{2, 2}; auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto f = make_shared(A + B, ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); vector a{1, 2, 3, 4}; vector b{5, 6, 7, 8}; @@ -82,10 +80,10 @@ NGRAPH_TEST(${BACKEND_NAME}, add_in_place) Shape shape{2, 2}; auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto T = A + B; - auto T2 = T + T; - auto T3 = T2 + T2; - auto T4 = T3 + T3; + auto T = make_shared(A, B); + auto T2 = make_shared(T, T); + auto T3 = make_shared(T2, T2); + auto T4 = make_shared(T3, T3); auto f = make_shared(T4, ParameterVector{A, B}); diff --git a/ngraph/test/backend/aliased_output.in.cpp b/ngraph/test/backend/aliased_output.in.cpp index 42baf1aef64173..3ff85d1730e574 100644 --- a/ngraph/test/backend/aliased_output.in.cpp +++ b/ngraph/test/backend/aliased_output.in.cpp @@ -20,8 +20,6 @@ #include "util/test_case.hpp" #include "util/test_control.hpp" -NGRAPH_SUPPRESS_DEPRECATED_START - using namespace std; using namespace ngraph; @@ -33,9 +31,9 @@ NGRAPH_TEST(${BACKEND_NAME}, aliased_output) Shape shape{2, 2}; auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto C = A + B; - auto D = A * B; - auto E = op::Constant::create(element::Type_t::f32, shape, {1, 2, 3, 4}); + auto C = make_shared(A, B); + auto D = make_shared(A, B); + auto E = op::Constant::create(element::f32, shape, {1, 2, 3, 4}); auto f = make_shared(NodeVector{C, C, D, D, C, E, E}, ParameterVector{A, B}); vector a{0, 1, 2, 3}; diff --git a/ngraph/test/backend/api.in.cpp b/ngraph/test/backend/api.in.cpp index fae7559f737b9e..d22ba34234b94d 100644 --- a/ngraph/test/backend/api.in.cpp +++ b/ngraph/test/backend/api.in.cpp @@ -24,8 +24,6 @@ #include "util/test_control.hpp" #include "util/test_tools.hpp" -NGRAPH_SUPPRESS_DEPRECATED_START - using namespace std; using namespace ngraph; @@ -37,7 +35,7 @@ NGRAPH_TEST(${BACKEND_NAME}, create_tensor_1) Shape shape{2, 2}; auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); @@ -63,7 +61,8 @@ NGRAPH_TEST(${BACKEND_NAME}, get_parameters_and_results) auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); auto C = make_shared(element::Type_t::f32, shape); - auto f = make_shared((A + B) * C, ParameterVector{A, B, C}); + auto arg = make_shared(make_shared(A, B), C); + auto f = make_shared(arg, ParameterVector{A, B, C}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); diff --git a/ngraph/test/backend/auto_broadcast.in.cpp b/ngraph/test/backend/auto_broadcast.in.cpp index 723dd467dcd720..ae3723269e45d8 100644 --- a/ngraph/test/backend/auto_broadcast.in.cpp +++ b/ngraph/test/backend/auto_broadcast.in.cpp @@ -114,7 +114,7 @@ NGRAPH_TEST(${BACKEND_NAME}, auto_bcast_binary_elementwise_pdpd_dynamic) auto b = make_shared(element::Type_t::f32, pshape_b); op::AutoBroadcastSpec autob = op::AutoBroadcastSpec(op::AutoBroadcastType::PDPD, -1); - auto f = make_shared(make_shared(a, b, autob), ParameterVector{a, b}); + auto f = make_shared(make_shared(a, b, autob), ParameterVector{a, b}); auto backend = runtime::Backend::create("${BACKEND_NAME}", true); auto ex = backend->compile(f); @@ -132,7 +132,7 @@ NGRAPH_TEST(${BACKEND_NAME}, auto_bcast_binary_elementwise_pdpd_dynamic) // a shape {2, 3, 4, 5}, b shape {3, 4} axis = 1 autob = op::AutoBroadcastSpec(op::AutoBroadcastType::PDPD, 1); - f = make_shared(make_shared(a, b, autob), ParameterVector{a, b}); + f = make_shared(make_shared(a, b, autob), ParameterVector{a, b}); ex = backend->compile(f); t_r = backend->create_dynamic_tensor(element::Type_t::f32, PartialShape::dynamic()); t_a = backend->create_tensor(element::Type_t::f32, Shape{2, 3, 4, 5}); @@ -157,21 +157,21 @@ NGRAPH_TEST(${BACKEND_NAME}, auto_bcast_string_cast) auto a = make_shared(element::Type_t::f32, Shape{1}); auto b = make_shared(element::Type_t::f32, Shape{1}); - auto add = make_shared(a, b, "NUMPY"); + auto add = make_shared(a, b, "NUMPY"); ASSERT_EQ(add->get_autob(), op::AutoBroadcastType::NUMPY); - add = make_shared(a, b, "NONE"); + add = make_shared(a, b, "NONE"); ASSERT_EQ(add->get_autob(), op::AutoBroadcastType::NONE); - add = make_shared(a, b, "PDPD"); + add = make_shared(a, b, "PDPD"); ASSERT_EQ(add->get_autob(), op::AutoBroadcastType::PDPD); - add = make_shared(a, b, "EXPLICIT"); + add = make_shared(a, b, "EXPLICIT"); ASSERT_EQ(add->get_autob(), op::AutoBroadcastType::EXPLICIT); try { - add = make_shared(a, b, "UNKNOWN"); + add = make_shared(a, b, "UNKNOWN"); FAIL() << "Unknown AutoBroadcastType not detected."; } catch (const ngraph_error& error) diff --git a/ngraph/test/backend/comparison.in.cpp b/ngraph/test/backend/comparison.in.cpp index 98a078a1048b9e..bd20b91e75d565 100644 --- a/ngraph/test/backend/comparison.in.cpp +++ b/ngraph/test/backend/comparison.in.cpp @@ -33,8 +33,6 @@ #include "util/test_control.hpp" #include "util/test_tools.hpp" -NGRAPH_SUPPRESS_DEPRECATED_START - using namespace std; using namespace ngraph; @@ -45,7 +43,7 @@ NGRAPH_TEST(${BACKEND_NAME}, equal) Shape shape{2, 2, 2}; auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); @@ -66,7 +64,7 @@ NGRAPH_TEST(${BACKEND_NAME}, notequal) Shape shape{2, 2, 2}; auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); @@ -87,7 +85,7 @@ NGRAPH_TEST(${BACKEND_NAME}, greater) Shape shape{2, 2, 2}; auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); @@ -108,7 +106,7 @@ NGRAPH_TEST(${BACKEND_NAME}, greater_int64) Shape shape{2, 2, 2}; auto A = make_shared(element::Type_t::i64, shape); auto B = make_shared(element::Type_t::i64, shape); - auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); @@ -129,7 +127,7 @@ NGRAPH_TEST(${BACKEND_NAME}, greatereq) Shape shape{2, 2, 2}; auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); @@ -150,7 +148,7 @@ NGRAPH_TEST(${BACKEND_NAME}, less) Shape shape{2, 2, 2}; auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); @@ -171,7 +169,7 @@ NGRAPH_TEST(${BACKEND_NAME}, lesseq) Shape shape{2, 2, 2}; auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); @@ -192,7 +190,7 @@ NGRAPH_TEST(${BACKEND_NAME}, lesseq_int32) Shape shape{2, 2}; auto A = make_shared(element::Type_t::i32, shape); auto B = make_shared(element::Type_t::i32, shape); - auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); @@ -213,7 +211,7 @@ NGRAPH_TEST(${BACKEND_NAME}, lesseq_bool) Shape shape{2, 2, 2}; auto A = make_shared(element::Type_t::boolean, shape); auto B = make_shared(element::Type_t::boolean, shape); - auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); diff --git a/ngraph/test/backend/concat.in.cpp b/ngraph/test/backend/concat.in.cpp index db8e68275b6296..92416268967330 100644 --- a/ngraph/test/backend/concat.in.cpp +++ b/ngraph/test/backend/concat.in.cpp @@ -291,11 +291,11 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_in_place_2d_tensor) Shape shape{1, 1}; auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto add1 = make_shared(A, B); + auto add1 = make_shared(A, B); auto C = make_shared(element::Type_t::f32, shape); auto D = make_shared(element::Type_t::f32, shape); - auto add2 = make_shared(C, D); - auto subtract = make_shared(C, A); + auto add2 = make_shared(C, D); + auto subtract = make_shared(C, A); Shape shape_r{3, 1}; auto f = make_shared(make_shared(NodeVector{add1, add2, subtract}, 0), ParameterVector{A, B, C, D}); @@ -324,12 +324,12 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_in_place_propagate_2d_tensor) Shape shape{1, 1}; auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto add1 = make_shared(A, B); + auto add1 = make_shared(A, B); auto C = make_shared(element::Type_t::f32, shape); auto D = make_shared(element::Type_t::f32, shape); - auto add2 = make_shared(C, D); + auto add2 = make_shared(C, D); auto concat1 = make_shared(NodeVector{add1, add2}, 0); - auto subtract = make_shared(C, A); + auto subtract = make_shared(C, A); Shape shape_r{3, 1}; auto f = make_shared(make_shared(NodeVector{concat1, subtract}, 0), ParameterVector{A, B, C, D}); @@ -359,10 +359,10 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_in_place_tree_1) Shape shape_r{1, 4, 2}; auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto add1 = make_shared(A, B); - auto add2 = make_shared(A, B); + auto add1 = make_shared(A, B); + auto add2 = make_shared(A, B); auto concat = make_shared(NodeVector{add1, add2}, 1); - auto f = make_shared(make_shared(concat, concat), ParameterVector{A, B}); + auto f = make_shared(make_shared(concat, concat), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output auto a = backend->create_tensor(element::Type_t::f32, shape); @@ -385,12 +385,13 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_in_place_tree_2) Shape shape_r{1, 8, 2}; auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto add1 = make_shared(A, B); - auto add2 = make_shared(A, B); + auto add1 = make_shared(A, B); + auto add2 = make_shared(A, B); auto concat1 = make_shared(NodeVector{add1, add2}, 1); auto concat2 = make_shared(NodeVector{add1, add2}, 1); auto concat12 = make_shared(NodeVector{concat1, concat2}, 1); - auto f = make_shared(make_shared(concat12, concat12), ParameterVector{A, B}); + auto f = + make_shared(make_shared(concat12, concat12), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output @@ -420,7 +421,8 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_in_place_tree_3) auto concat12 = make_shared(NodeVector{concat1, concat2}, 1); auto concat34 = make_shared(NodeVector{concat3, concat4}, 1); auto concat14 = make_shared(NodeVector{concat12, concat34}, 1); - auto f = make_shared(make_shared(concat14, concat14), ParameterVector{A, B}); + auto f = + make_shared(make_shared(concat14, concat14), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output auto a = backend->create_tensor(element::Type_t::f32, shape); @@ -442,10 +444,10 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_in_place_add_concat) Shape shape_r{4, 2}; auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto add1 = make_shared(A, B); - auto add2 = make_shared(add1, add1); + auto add1 = make_shared(A, B); + auto add2 = make_shared(add1, add1); auto concat = make_shared(NodeVector{add1, add2}, 0); - auto add3 = make_shared(concat, concat); + auto add3 = make_shared(concat, concat); auto f = make_shared(add3, ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); @@ -466,17 +468,17 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_in_place_add_concat_2) Shape shape_r{1, 6, 2}; auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto add1 = make_shared(A, B); - auto add2 = make_shared(A, B); - auto add3 = make_shared(A, B); - auto add4 = make_shared(A, B); - auto add5 = make_shared(A, B); + auto add1 = make_shared(A, B); + auto add2 = make_shared(A, B); + auto add3 = make_shared(A, B); + auto add4 = make_shared(A, B); + auto add5 = make_shared(A, B); auto concat1 = make_shared(NodeVector{add1, add2, add3}, 1); auto concat2 = make_shared(NodeVector{add4, add2, add5}, 1); - auto add6 = make_shared(concat1, concat2); + auto add6 = make_shared(concat1, concat2); auto f = make_shared(add6, ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); diff --git a/ngraph/test/backend/constant.in.cpp b/ngraph/test/backend/constant.in.cpp index e5d872e50ad0e0..675b44267c49ad 100644 --- a/ngraph/test/backend/constant.in.cpp +++ b/ngraph/test/backend/constant.in.cpp @@ -175,11 +175,11 @@ NGRAPH_TEST(${BACKEND_NAME}, constant_equality_bool) Shape shape{4}; // auto A = make_shared(element::Type_t::boolean, shape); // auto B = make_shared(element::Type_t::boolean, shape); - // auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); + // auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto A = op::Constant::create(element::Type_t::boolean, shape, {true, false, true, false}); auto B = op::Constant::create(element::Type_t::boolean, shape, {true, true, true, true}); - auto f = make_shared(make_shared(A, B), ParameterVector{}); + auto f = make_shared(make_shared(A, B), ParameterVector{}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); diff --git a/ngraph/test/backend/convolution.in.cpp b/ngraph/test/backend/convolution.in.cpp index 1b4d7ef2dcf4c2..c092b80bdbde13 100644 --- a/ngraph/test/backend/convolution.in.cpp +++ b/ngraph/test/backend/convolution.in.cpp @@ -17,7 +17,6 @@ #include "gtest/gtest.h" #include "ngraph/ngraph.hpp" #include "ngraph/runtime/tensor.hpp" -#include "op/convolution.hpp" #include "runtime/backend.hpp" #include "util/all_close.hpp" #include "util/all_close_f.hpp" @@ -38,20 +37,10 @@ NGRAPH_TEST(${BACKEND_NAME}, convolution_outlining) Shape shape_b{2, 2, 1, 1}; auto B = make_shared(element::Type_t::f32, shape_b); Shape shape_r{1, 2, 2, 2}; - auto conv1 = make_shared(A, - B, - Strides{1, 1}, - Strides{1, 1}, - CoordinateDiff{0, 0}, - CoordinateDiff{0, 0}, - Strides{1, 1}); - auto conv2 = make_shared(conv1, - B, - Strides{1, 1}, - Strides{1, 1}, - CoordinateDiff{0, 0}, - CoordinateDiff{0, 0}, - Strides{1, 1}); + auto conv1 = make_shared( + A, B, Strides{1, 1}, CoordinateDiff{0, 0}, CoordinateDiff{0, 0}, Strides{1, 1}); + auto conv2 = make_shared( + conv1, B, Strides{1, 1}, CoordinateDiff{0, 0}, CoordinateDiff{0, 0}, Strides{1, 1}); auto f = make_shared(conv2, ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); @@ -77,13 +66,8 @@ NGRAPH_TEST(${BACKEND_NAME}, convolution_simple) Shape shape_b{2, 2, 1, 1}; auto B = make_shared(element::Type_t::f32, shape_b); Shape shape_r{1, 2, 2, 2}; - auto conv1 = make_shared(A, - B, - Strides{1, 1}, - Strides{1, 1}, - CoordinateDiff{0, 0}, - CoordinateDiff{0, 0}, - Strides{1, 1}); + auto conv1 = make_shared( + A, B, Strides{1, 1}, CoordinateDiff{0, 0}, CoordinateDiff{0, 0}, Strides{1, 1}); auto f = make_shared(conv1, ParameterVector{A, B}); @@ -110,13 +94,8 @@ NGRAPH_TEST(${BACKEND_NAME}, convolution_simple_padding) Shape shape_b{1, 1, 1, 1}; auto B = make_shared(element::Type_t::f32, shape_b); Shape shape_r{1, 1, 5, 5}; - auto conv1 = make_shared(A, - B, - Strides{1, 1}, - Strides{1, 1}, - CoordinateDiff{1, 1}, - CoordinateDiff{2, 2}, - Strides{1, 1}); + auto conv1 = make_shared( + A, B, Strides{1, 1}, CoordinateDiff{1, 1}, CoordinateDiff{2, 2}, Strides{1, 1}); auto f = make_shared(conv1, ParameterVector{A, B}); diff --git a/ngraph/test/backend/divide.in.cpp b/ngraph/test/backend/divide.in.cpp index 46d4faa9321e7b..0b42c9acd98e90 100644 --- a/ngraph/test/backend/divide.in.cpp +++ b/ngraph/test/backend/divide.in.cpp @@ -41,8 +41,6 @@ #include "util/test_control.hpp" #include "util/test_tools.hpp" -NGRAPH_SUPPRESS_DEPRECATED_START - using namespace std; using namespace ngraph; @@ -54,7 +52,7 @@ NGRAPH_TEST(${BACKEND_NAME}, divide) auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); @@ -76,7 +74,7 @@ NGRAPH_TEST(${BACKEND_NAME}, divide_int32) auto A = make_shared(element::Type_t::i32, shape); auto B = make_shared(element::Type_t::i32, shape); - auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); @@ -98,7 +96,7 @@ NGRAPH_TEST(${BACKEND_NAME}, divide_cpp_rounding_int32) auto A = make_shared(element::Type_t::i32, shape); auto B = make_shared(element::Type_t::i32, shape); - auto f = make_shared(make_shared(A, B, false), ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B, false), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); @@ -120,7 +118,7 @@ NGRAPH_TEST(${BACKEND_NAME}, divide_python_rounding_int32) auto A = make_shared(element::Type_t::i32, shape); auto B = make_shared(element::Type_t::i32, shape); - auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); @@ -142,7 +140,7 @@ NGRAPH_TEST(${BACKEND_NAME}, divide_overload) auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto f = make_shared(A / B, ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); @@ -164,7 +162,7 @@ NGRAPH_TEST(${BACKEND_NAME}, divide_by_zero_float32) auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); diff --git a/ngraph/test/backend/dynamic.in.cpp b/ngraph/test/backend/dynamic.in.cpp index 911d9acf649ff5..beff30261c0dc5 100644 --- a/ngraph/test/backend/dynamic.in.cpp +++ b/ngraph/test/backend/dynamic.in.cpp @@ -22,8 +22,6 @@ #include "util/test_control.hpp" #include "util/test_tools.hpp" -NGRAPH_SUPPRESS_DEPRECATED_START - using namespace std; using namespace ngraph; @@ -56,7 +54,8 @@ NGRAPH_TEST(${BACKEND_NAME}, dynamic_abc) auto c = make_shared(element::Type_t::f32, PartialShape{2, Dimension::dynamic(), 3}); - auto a_plus_b_times_c = (a + b) * c; + auto a_plus_b = make_shared(a, b); + auto a_plus_b_times_c = make_shared(a_plus_b, c); auto f = make_shared(NodeVector{a_plus_b_times_c}, ParameterVector{a, b, c}); @@ -120,7 +119,7 @@ static void axpy_test(const PartialShape& input_pshape, const std::vector auto x = make_shared(element::Type_t::f32, input_pshape); auto y = make_shared(element::Type_t::f32, input_pshape); - auto axpy = a * x + y; + auto axpy = make_shared(make_shared(a, x), y); auto f = make_shared(NodeVector{axpy}, ParameterVector{a, x, y}); auto backend = runtime::Backend::create("${BACKEND_NAME}", true); diff --git a/ngraph/test/backend/function_name.in.cpp b/ngraph/test/backend/function_name.in.cpp index 559d4ce901ea36..c5703859c61ea7 100644 --- a/ngraph/test/backend/function_name.in.cpp +++ b/ngraph/test/backend/function_name.in.cpp @@ -23,8 +23,6 @@ #include "util/test_control.hpp" #include "util/test_tools.hpp" -NGRAPH_SUPPRESS_DEPRECATED_START - using namespace std; using namespace ngraph; @@ -35,7 +33,8 @@ NGRAPH_TEST(${BACKEND_NAME}, function_name) Shape shape{2, 2}; auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto f = make_shared(A + B, ParameterVector{A, B}, "funky func name"); + auto add = make_shared(A, B); + auto f = make_shared(add, ParameterVector{A, B}, "funky func name"); auto backend = runtime::Backend::create("${BACKEND_NAME}"); diff --git a/ngraph/test/backend/fused_op.in.cpp b/ngraph/test/backend/fused_op.in.cpp index 155a11f7f028b2..9b3393276c35d4 100644 --- a/ngraph/test/backend/fused_op.in.cpp +++ b/ngraph/test/backend/fused_op.in.cpp @@ -36,7 +36,6 @@ #include "ngraph/opsets/opset4.hpp" #include "ngraph/op/util/attr_types.hpp" #include "ngraph/op/util/rnn_cell_base.hpp" -#include "op/group_conv.hpp" #include "util/all_close.hpp" #include "util/all_close_f.hpp" #include "util/engine/test_engines.hpp" @@ -168,218 +167,6 @@ NGRAPH_TEST(${BACKEND_NAME}, prelu_negative_slope) test_case.run(); } -NGRAPH_TEST(${BACKEND_NAME}, group_conv) -{ - auto data = make_shared(element::Type_t::f32, Shape{1, 4, 2, 2}); - auto filters = make_shared(element::Type_t::f32, Shape{2, 2, 1, 1}); - auto group_conv = make_shared(data, - filters, - Strides{1, 1}, - Strides{1, 1}, - CoordinateDiff{0, 0}, - CoordinateDiff{0, 0}, - Strides{1, 1}, - 2); - auto f = make_shared(NodeVector{group_conv}, ParameterVector{data, filters}); - std::vector a{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - std::vector b{1, 2, 3, 4}; - - auto test_case = test::TestCase(f); - test_case.add_multiple_inputs({a, b}); - test_case.add_expected_output(Shape{1, 2, 2, 2}, - vector{11, 14, 17, 20, 79, 86, 93, 100}); - test_case.run(); -} - -NGRAPH_TEST(${BACKEND_NAME}, group_conv_striding) -{ - auto data = make_shared(element::Type_t::f32, Shape{1, 4, 2, 2}); - auto filters = make_shared(element::Type_t::f32, Shape{2, 2, 1, 1}); - auto group_conv = make_shared(data, - filters, - Strides{2, 2}, - Strides{1, 1}, - CoordinateDiff{0, 0}, - CoordinateDiff{0, 0}, - Strides{1, 1}, - 2); - auto f = make_shared(NodeVector{group_conv}, ParameterVector{data, filters}); - std::vector a{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - std::vector b{1, 2, 3, 4}; - - auto test_case = test::TestCase(f); - test_case.add_multiple_inputs({a, b}); - test_case.add_expected_output(Shape{1, 2, 1, 1}, vector{11, 79}); - test_case.run(); -} - -NGRAPH_TEST(${BACKEND_NAME}, group_conv_window_dilation) -{ - auto data = make_shared(element::Type_t::f32, Shape{1, 4, 2, 2}); - auto filters = make_shared(element::Type_t::f32, Shape{2, 2, 1, 1}); - auto group_conv = make_shared(data, - filters, - Strides{1, 1}, - Strides{2, 2}, - CoordinateDiff{0, 0}, - CoordinateDiff{0, 0}, - Strides{1, 1}, - 2); - auto f = make_shared(NodeVector{group_conv}, ParameterVector{data, filters}); - std::vector a{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - std::vector b{1, 2, 3, 4}; - - auto test_case = test::TestCase(f); - test_case.add_multiple_inputs({a, b}); - test_case.add_expected_output(Shape{1, 2, 2, 2}, - vector{11, 14, 17, 20, 79, 86, 93, 100}); - test_case.run(); -} - -NGRAPH_TEST(${BACKEND_NAME}, group_conv_data_dilation) -{ - auto data = make_shared(element::Type_t::f32, Shape{1, 4, 2, 2}); - auto filters = make_shared(element::Type_t::f32, Shape{2, 2, 1, 1}); - auto group_conv = make_shared(data, - filters, - Strides{1, 1}, - Strides{1, 1}, - CoordinateDiff{0, 0}, - CoordinateDiff{0, 0}, - Strides{2, 2}, - 2); - auto f = make_shared(NodeVector{group_conv}, ParameterVector{data, filters}); - std::vector a{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - std::vector b{1, 2, 3, 4}; - - auto test_case = test::TestCase(f); - test_case.add_multiple_inputs({a, b}); - test_case.add_expected_output( - Shape{1, 2, 3, 3}, - vector{11, 0, 14, 0, 0, 0, 17, 0, 20, 79, 0, 86, 0, 0, 0, 93, 0, 100}); - test_case.run(); -} - -NGRAPH_TEST(${BACKEND_NAME}, group_conv_padding) -{ - auto data = make_shared(element::Type_t::f32, Shape{1, 4, 2, 2}); - auto filters = make_shared(element::Type_t::f32, Shape{2, 2, 1, 1}); - auto group_conv = make_shared(data, - filters, - Strides{1, 1}, - Strides{1, 1}, - CoordinateDiff{1, 0}, - CoordinateDiff{0, 1}, - Strides{1, 1}, - 2); - auto f = make_shared(NodeVector{group_conv}, ParameterVector{data, filters}); - std::vector a{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - std::vector b{1, 2, 3, 4}; - - auto test_case = test::TestCase(f); - test_case.add_multiple_inputs({a, b}); - test_case.add_expected_output( - Shape{1, 2, 3, 3}, - vector{0, 0, 0, 11, 14, 0, 17, 20, 0, 0, 0, 0, 79, 86, 0, 93, 100, 0}); - test_case.run(); -} - -NGRAPH_TEST(${BACKEND_NAME}, group_conv_padding_and_window_dilation) -{ - auto data = make_shared(element::Type_t::f32, Shape{1, 4, 2, 2}); - auto filters = make_shared(element::Type_t::f32, Shape{2, 2, 1, 1}); - auto group_conv = make_shared(data, - filters, - Strides{1, 1}, - Strides{2, 2}, - CoordinateDiff{1, 0}, - CoordinateDiff{0, 1}, - Strides{1, 1}, - 2); - auto f = make_shared(NodeVector{group_conv}, ParameterVector{data, filters}); - std::vector a{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - std::vector b{1, 2, 3, 4}; - - auto test_case = test::TestCase(f); - test_case.add_multiple_inputs({a, b}); - test_case.add_expected_output( - Shape{1, 2, 3, 3}, - vector{0, 0, 0, 11, 14, 0, 17, 20, 0, 0, 0, 0, 79, 86, 0, 93, 100, 0}); - test_case.run(); -} - -NGRAPH_TEST(${BACKEND_NAME}, group_conv_input_shape_variation) -{ - auto data = make_shared(element::Type_t::f32, Shape{1, 4, 4, 1}); - auto filters = make_shared(element::Type_t::f32, Shape{2, 2, 1, 1}); - auto group_conv = make_shared(data, - filters, - Strides{1, 1}, - Strides{2, 2}, - CoordinateDiff{1, 0}, - CoordinateDiff{0, 1}, - Strides{1, 1}, - 2); - auto f = make_shared(NodeVector{group_conv}, ParameterVector{data, filters}); - std::vector a{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - std::vector b{1, 2, 3, 4}; - - auto test_case = test::TestCase(f); - test_case.add_multiple_inputs({a, b}); - test_case.add_expected_output( - Shape{1, 2, 5, 2}, - vector{0, 0, 11, 0, 14, 0, 17, 0, 20, 0, 0, 0, 79, 0, 86, 0, 93, 0, 100, 0}); - test_case.run(); -} - -NGRAPH_TEST(${BACKEND_NAME}, group_conv_input_data_variation) -{ - auto data = make_shared(element::Type_t::f32, Shape{1, 4, 3, 3}); - auto filters = make_shared(element::Type_t::f32, Shape{2, 2, 1, 1}); - auto group_conv = make_shared(data, - filters, - Strides{1, 1}, - Strides{2, 2}, - CoordinateDiff{1, 0}, - CoordinateDiff{0, 1}, - Strides{1, 1}, - 2); - auto f = make_shared(NodeVector{group_conv}, ParameterVector{data, filters}); - std::vector a{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36}; - std::vector b{1, 2, 3, 4}; - - auto test_case = test::TestCase(f); - test_case.add_multiple_inputs({a, b}); - test_case.add_expected_output( - Shape{1, 2, 4, 4}, - vector{0, 0, 0, 0, 21, 24, 27, 0, 30, 33, 36, 0, 39, 42, 45, 0, - 0, 0, 0, 0, 169, 176, 183, 0, 190, 197, 204, 0, 211, 218, 225, 0}); - test_case.run(); -} - -NGRAPH_TEST(${BACKEND_NAME}, group_conv_groups_included_in_shape) -{ - auto data = make_shared(element::Type_t::f32, Shape{1, 4, 2, 2}); - auto filters = make_shared(element::Type_t::f32, Shape{2, 1, 2, 1, 1}); - auto group_conv = make_shared(data, - filters, - Strides{1, 1}, - Strides{1, 1}, - CoordinateDiff{0, 0}, - CoordinateDiff{0, 0}, - Strides{1, 1}); - auto f = make_shared(NodeVector{group_conv}, ParameterVector{data, filters}); - std::vector a{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - std::vector b{1, 2, 3, 4}; - - auto test_case = test::TestCase(f); - test_case.add_multiple_inputs({a, b}); - test_case.add_expected_output(Shape{1, 2, 2, 2}, - vector{11, 14, 17, 20, 79, 86, 93, 100}); - test_case.run(); -} - NGRAPH_TEST(${BACKEND_NAME}, space_to_depth_block_first) { auto A = make_shared(element::Type_t::f32, Shape{1, 2, 4, 4}); @@ -456,8 +243,8 @@ NGRAPH_TEST(${BACKEND_NAME}, depth_to_space_depth_first) 7.f, 23.f, 12.f, 28.f, 14.f, 30.f, 13.f, 29.f, 15.f, 31.f}); test_case.run(); } - -NGRAPH_TEST(${BACKEND_NAME}, normalize_across_chw_4d) +// TODO: Issue: 37521 +NGRAPH_TEST(${BACKEND_NAME}, DISABLED_normalize_across_chw_4d) { Shape data_shape{1, 2, 3, 4}; auto data = make_shared(element::Type_t::f32, data_shape); @@ -485,7 +272,7 @@ NGRAPH_TEST(${BACKEND_NAME}, normalize_across_chw_4d) test_case.run(DEFAULT_FLOAT_TOLERANCE_BITS + 1); } -NGRAPH_TEST(${BACKEND_NAME}, normalize_across_empty_axes_input) +NGRAPH_TEST(${BACKEND_NAME}, DISABLED_normalize_across_empty_axes_input) { Shape data_shape{1, 2, 3, 4}; auto data = make_shared(element::Type_t::f32, data_shape); @@ -513,7 +300,7 @@ NGRAPH_TEST(${BACKEND_NAME}, normalize_across_empty_axes_input) test_case.run(DEFAULT_FLOAT_TOLERANCE_BITS + 1); } -NGRAPH_TEST(${BACKEND_NAME}, normalize_across_h_4d) +NGRAPH_TEST(${BACKEND_NAME}, DISABLED_normalize_across_h_4d) { Shape data_shape{1, 2, 3, 4}; auto data = make_shared(element::Type_t::f32, data_shape); @@ -539,7 +326,7 @@ NGRAPH_TEST(${BACKEND_NAME}, normalize_across_h_4d) test_case.run(DEFAULT_FLOAT_TOLERANCE_BITS + 1); } -NGRAPH_TEST(${BACKEND_NAME}, normalize_across_1axis_5d) +NGRAPH_TEST(${BACKEND_NAME}, DISABLED_normalize_across_1axis_5d) { Shape data_shape{1, 2, 2, 2, 3}; auto data = make_shared(element::Type_t::f32, data_shape); @@ -565,7 +352,7 @@ NGRAPH_TEST(${BACKEND_NAME}, normalize_across_1axis_5d) test_case.run(DEFAULT_FLOAT_TOLERANCE_BITS + 1); } -NGRAPH_TEST(${BACKEND_NAME}, normalize_across_123axes_5d) +NGRAPH_TEST(${BACKEND_NAME}, DISABLED_normalize_across_123axes_5d) { Shape data_shape{1, 2, 2, 2, 3}; auto data = make_shared(element::Type_t::f32, data_shape); @@ -592,7 +379,7 @@ NGRAPH_TEST(${BACKEND_NAME}, normalize_across_123axes_5d) test_case.run(DEFAULT_FLOAT_TOLERANCE_BITS + 1); } -NGRAPH_TEST(${BACKEND_NAME}, normalize_across_c_2x2_shape) +NGRAPH_TEST(${BACKEND_NAME}, DISABLED_normalize_across_c_2x2_shape) { Shape data_shape{2, 2}; auto data = make_shared(element::Type_t::f32, data_shape); @@ -616,7 +403,7 @@ NGRAPH_TEST(${BACKEND_NAME}, normalize_across_c_2x2_shape) test_case.run(DEFAULT_FLOAT_TOLERANCE_BITS + 1); } -NGRAPH_TEST(${BACKEND_NAME}, normalize_across_c_2x4_shape) +NGRAPH_TEST(${BACKEND_NAME}, DISABLED_normalize_across_c_2x4_shape) { Shape data_shape{2, 4}; auto data = make_shared(element::Type_t::f32, data_shape); @@ -647,7 +434,7 @@ NGRAPH_TEST(${BACKEND_NAME}, normalize_across_c_2x4_shape) test_case.run(DEFAULT_FLOAT_TOLERANCE_BITS + 1); } -NGRAPH_TEST(${BACKEND_NAME}, normalize_across_chw_4d_max_bias) +NGRAPH_TEST(${BACKEND_NAME}, DISABLED_normalize_across_chw_4d_max_bias) { Shape data_shape{1, 2, 3, 4}; auto data = make_shared(element::Type_t::f32, data_shape); @@ -1382,7 +1169,6 @@ NGRAPH_TEST(${BACKEND_NAME}, mvn_mean_variance_normalization_split_channels) test_case.run(); } - NGRAPH_TEST(${BACKEND_NAME}, mvn_mean_variance_normalization_shared_across_channel_batch_size_2) { Shape data_shape{2, 2, 5}; @@ -1453,7 +1239,7 @@ NGRAPH_TEST(${BACKEND_NAME}, grn_4d) test_case.run(); } -NGRAPH_TEST(${BACKEND_NAME}, grn_2d_with_bias) +NGRAPH_TEST(${BACKEND_NAME}, DISABLED_grn_2d_with_bias) { const Shape data_shape{3, 4}; const auto data = make_shared(element::Type_t::f32, data_shape); @@ -1599,7 +1385,8 @@ NGRAPH_TEST(${BACKEND_NAME}, squeeze_dynamic) EXPECT_THROW(make_shared(data_param, axes_param), CheckFailure); } -NGRAPH_TEST(${BACKEND_NAME}, squared_difference) +// TODO: Issue: 37534 +NGRAPH_TEST(${BACKEND_NAME}, DISABLED_squared_difference) { const auto x1 = make_shared(element::Type_t::f32, Shape{2, 2}); const auto x2 = make_shared(element::Type_t::f32, Shape{2, 2}); @@ -1615,7 +1402,7 @@ NGRAPH_TEST(${BACKEND_NAME}, squared_difference) test_case.run(); } -NGRAPH_TEST(${BACKEND_NAME}, squared_difference_broadcast) +NGRAPH_TEST(${BACKEND_NAME}, DISABLED_squared_difference_broadcast) { const auto x1 = make_shared(element::Type_t::i32, Shape{2, 2}); const auto x2 = make_shared(element::Type_t::i32, Shape{}); @@ -1631,7 +1418,7 @@ NGRAPH_TEST(${BACKEND_NAME}, squared_difference_broadcast) test_case.run(); } -NGRAPH_TEST(${BACKEND_NAME}, lstm_cell_zero_bias_peepholes) +NGRAPH_TEST(${BACKEND_NAME}, lstm_cell__zero_bias_peepholes) { const size_t batch_size = 2; const size_t input_size = 3; @@ -1709,7 +1496,8 @@ NGRAPH_TEST(${BACKEND_NAME}, lstm_cell_zero_bias_peepholes) ct_test_case.run(); } -NGRAPH_TEST(${BACKEND_NAME}, lstm_cell_bias_peepholes) +// Peerholes unsupported in Ngraph +NGRAPH_TEST(${BACKEND_NAME}, DISABLED_lstm_cell__bias_peepholes) { const size_t batch_size = 2; const size_t input_size = 3; @@ -1799,7 +1587,7 @@ NGRAPH_TEST(${BACKEND_NAME}, lstm_cell_bias_peepholes) ct_test_case.run(); } -NGRAPH_TEST(${BACKEND_NAME}, lstm_cell_bias_peepholes_clip_input_forget) +NGRAPH_TEST(${BACKEND_NAME}, DISABLED_lstm_cell__bias_peepholes_clip_input_forget) { const size_t batch_size = 2; const size_t input_size = 3; @@ -1900,7 +1688,8 @@ NGRAPH_TEST(${BACKEND_NAME}, lstm_cell_bias_peepholes_clip_input_forget) ct_test_case.run(); } -NGRAPH_TEST(${BACKEND_NAME}, lstm_cell_activaction_functions) +// Hard Sigmoid is unsupprted +NGRAPH_TEST(${BACKEND_NAME}, DISABLED_lstm_cell__activaction_functions) { const size_t batch_size = 2; const size_t input_size = 3; @@ -2004,7 +1793,8 @@ NGRAPH_TEST(${BACKEND_NAME}, lstm_cell_activaction_functions) ct_test_case.run(); } -NGRAPH_TEST(${BACKEND_NAME}, fake_quantize) +// TODO: Issue: 37511 +NGRAPH_TEST(${BACKEND_NAME}, DISABLED_fake_quantize) { const Shape data_shape{1, 2, 3, 4}; const size_t levels = 4; @@ -2047,7 +1837,7 @@ NGRAPH_TEST(${BACKEND_NAME}, fake_quantize) test_case.run(); } -NGRAPH_TEST(${BACKEND_NAME}, fake_quantize_with_clip) +NGRAPH_TEST(${BACKEND_NAME}, DISABLED_fake_quantize_with_clip) { const Shape data_shape{1, 2, 3, 4}; const size_t levels = 5; @@ -2087,7 +1877,7 @@ NGRAPH_TEST(${BACKEND_NAME}, fake_quantize_with_clip) test_case.run(); } -NGRAPH_TEST(${BACKEND_NAME}, fake_quantize_with_clip_across_channels) +NGRAPH_TEST(${BACKEND_NAME}, DISABLED_fake_quantize_with_clip_across_channels) { Shape data_shape{1, 2, 5, 5}; size_t levels = 5; @@ -2130,7 +1920,7 @@ NGRAPH_TEST(${BACKEND_NAME}, fake_quantize_with_clip_across_channels) test_case.run(); } -NGRAPH_TEST(${BACKEND_NAME}, fake_quantize_pdpd) +NGRAPH_TEST(${BACKEND_NAME}, DISABLED_fake_quantize_pdpd) { Shape data_shape{1, 2, 5, 5}; size_t levels = 5; @@ -2179,7 +1969,7 @@ NGRAPH_TEST(${BACKEND_NAME}, fake_quantize_pdpd) test_case.run(); } -NGRAPH_TEST(${BACKEND_NAME}, rnn_cell_no_bias) +NGRAPH_TEST(${BACKEND_NAME}, rnn_cell__no_bias) { const size_t batch_size = 2; const size_t input_size = 3; @@ -2230,7 +2020,7 @@ NGRAPH_TEST(${BACKEND_NAME}, rnn_cell_no_bias) test_case.run(); } -NGRAPH_TEST(${BACKEND_NAME}, rnn_cell_bias_clip) +NGRAPH_TEST(${BACKEND_NAME}, rnn_cell__bias_clip) { const size_t batch_size = 2; const size_t input_size = 3; @@ -2294,7 +2084,7 @@ NGRAPH_TEST(${BACKEND_NAME}, rnn_cell_bias_clip) test_case.run(); } -NGRAPH_TEST(${BACKEND_NAME}, rnn_cell_activation_function) +NGRAPH_TEST(${BACKEND_NAME}, rnn_cell__activation_function) { const size_t batch_size = 2; const size_t input_size = 3; diff --git a/ngraph/test/backend/gather.in.cpp b/ngraph/test/backend/gather.in.cpp index 4447196522264a..d42966eddcbc56 100644 --- a/ngraph/test/backend/gather.in.cpp +++ b/ngraph/test/backend/gather.in.cpp @@ -404,4 +404,4 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_axis_0_bool) test_case.add_input({0, 1, 1, 2}); test_case.add_expected_output(out_shape, {1, 1, 1, 0, 1, 0, 0, 1}); test_case.run(MIN_FLOAT_TOLERANCE_BITS); -} +} \ No newline at end of file diff --git a/ngraph/test/backend/group_convolution.in.cpp b/ngraph/test/backend/group_convolution.in.cpp index 762884564f6eb7..9c213e2e4b7f87 100644 --- a/ngraph/test/backend/group_convolution.in.cpp +++ b/ngraph/test/backend/group_convolution.in.cpp @@ -17,7 +17,6 @@ #include "gtest/gtest.h" #include "ngraph/ngraph.hpp" #include "ngraph/runtime/tensor.hpp" -#include "op/group_conv.hpp" #include "runtime/backend.hpp" #include "util/all_close.hpp" #include "util/all_close_f.hpp" @@ -49,8 +48,8 @@ NGRAPH_TEST(${BACKEND_NAME}, dyn_group_convolution_backprop_data) auto padding_end = CoordinateDiff{0, 0}; size_t groups = 3; - auto conv_bprop_data = make_shared( - data_batch, filters, deltas, strides, dilations, padding_begin, padding_end, groups); + auto conv_bprop_data = make_shared( + data_batch, filters, deltas, strides, padding_begin, padding_end, dilations); auto f = make_shared(conv_bprop_data, ParameterVector{data_batch, filters, deltas}); diff --git a/ngraph/test/backend/maximum.in.cpp b/ngraph/test/backend/maximum.in.cpp index fb668b3664e7a1..54388daf577046 100644 --- a/ngraph/test/backend/maximum.in.cpp +++ b/ngraph/test/backend/maximum.in.cpp @@ -41,8 +41,6 @@ #include "util/test_control.hpp" #include "util/test_tools.hpp" -NGRAPH_SUPPRESS_DEPRECATED_START - using namespace std; using namespace ngraph; @@ -53,7 +51,7 @@ NGRAPH_TEST(${BACKEND_NAME}, maximum) Shape shape{2, 2, 2}; auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); @@ -75,7 +73,7 @@ NGRAPH_TEST(${BACKEND_NAME}, maximum_int32) Shape shape{2, 2}; auto A = make_shared(element::Type_t::i32, shape); auto B = make_shared(element::Type_t::i32, shape); - auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); @@ -96,7 +94,7 @@ NGRAPH_TEST(${BACKEND_NAME}, maximum_int64) Shape shape{2, 2, 2}; auto A = make_shared(element::Type_t::i64, shape); auto B = make_shared(element::Type_t::i64, shape); - auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); diff --git a/ngraph/test/backend/minimum.in.cpp b/ngraph/test/backend/minimum.in.cpp index cb48daaf8b5242..1491c11be9d0b6 100644 --- a/ngraph/test/backend/minimum.in.cpp +++ b/ngraph/test/backend/minimum.in.cpp @@ -37,8 +37,6 @@ #include "util/test_case.hpp" #include "util/test_control.hpp" -NGRAPH_SUPPRESS_DEPRECATED_START - using namespace std; using namespace ngraph; @@ -50,7 +48,7 @@ NGRAPH_TEST(${BACKEND_NAME}, minimum) Shape shape{2, 2, 2}; auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); std::vector a{1, 8, -8, 17, -0.5, 0.5, 2, 1}; std::vector b{1, 2, 4, 8, 0, 0, 1, 1.5}; @@ -66,7 +64,7 @@ NGRAPH_TEST(${BACKEND_NAME}, minimum_int32) Shape shape{2, 2, 2}; auto A = make_shared(element::Type_t::i32, shape); auto B = make_shared(element::Type_t::i32, shape); - auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); std::vector a{1, 8, -8, 17, -5, 67635216, 2, 1}; std::vector b{1, 2, 4, 8, 0, 18448, 1, 6}; @@ -82,7 +80,7 @@ NGRAPH_TEST(${BACKEND_NAME}, minimum_int64) Shape shape{2, 2, 2}; auto A = make_shared(element::Type_t::i64, shape); auto B = make_shared(element::Type_t::i64, shape); - auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); std::vector a{1, 8, -8, 17, -5, 67635216, 2, 17179887632}; std::vector b{1, 2, 4, 8, 0, 18448, 1, 280592}; diff --git a/ngraph/test/backend/multiple_backends.in.cpp b/ngraph/test/backend/multiple_backends.in.cpp index 515ba2cf217b37..ff4d99575b2ad2 100644 --- a/ngraph/test/backend/multiple_backends.in.cpp +++ b/ngraph/test/backend/multiple_backends.in.cpp @@ -25,8 +25,6 @@ #include "util/test_control.hpp" #include "util/test_tools.hpp" -NGRAPH_SUPPRESS_DEPRECATED_START - using namespace std; using namespace ngraph; @@ -37,11 +35,13 @@ NGRAPH_TEST(${BACKEND_NAME}, multiple_backends) Shape shape{2, 2}; auto A1 = make_shared(element::Type_t::f32, shape); auto B1 = make_shared(element::Type_t::f32, shape); - auto f = make_shared(A1 + B1, ParameterVector{A1, B1}); + auto add = std::make_shared(A1, B1); + auto f = make_shared(add, ParameterVector{A1, B1}); auto A2 = make_shared(element::Type_t::f32, shape); auto B2 = make_shared(element::Type_t::f32, shape); - auto g = make_shared(A2 * B2, ParameterVector{A2, B2}); + auto multiply = std::make_shared(A2, B2); + auto g = make_shared(multiply, ParameterVector{A2, B2}); auto backend1 = runtime::Backend::create("${BACKEND_NAME}"); diff --git a/ngraph/test/backend/multiple_result.in.cpp b/ngraph/test/backend/multiple_result.in.cpp index 57361900135b2b..8764aa27ad9ccd 100644 --- a/ngraph/test/backend/multiple_result.in.cpp +++ b/ngraph/test/backend/multiple_result.in.cpp @@ -37,8 +37,8 @@ NGRAPH_TEST(${BACKEND_NAME}, multiple_result) auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); auto C = make_shared(element::Type_t::f32, shape); - auto A_add_B = make_shared(A, B); - auto A_add_B_mul_C = make_shared(A_add_B, C); + auto A_add_B = make_shared(A, B); + auto A_add_B_mul_C = make_shared(A_add_B, C); auto f = make_shared(NodeVector{A_add_B, A_add_B_mul_C}, ParameterVector{A, B, C}); diff --git a/ngraph/test/backend/multiply.in.cpp b/ngraph/test/backend/multiply.in.cpp index bea292e9d0efbf..7282508a190781 100644 --- a/ngraph/test/backend/multiply.in.cpp +++ b/ngraph/test/backend/multiply.in.cpp @@ -50,7 +50,7 @@ NGRAPH_TEST(${BACKEND_NAME}, multiply) Shape shape{2, 2}; auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); std::vector a{1, 2, 3, 4}; std::vector b{5, 6, 7, 8}; @@ -66,7 +66,7 @@ NGRAPH_TEST(${BACKEND_NAME}, multiply_overload) Shape shape{2, 2}; auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto f = make_shared(A * B, ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); std::vector a{1, 2, 3, 4}; std::vector b{5, 6, 7, 8}; diff --git a/ngraph/test/backend/node_name.in.cpp b/ngraph/test/backend/node_name.in.cpp index 2e30c0b0a39833..16056f6844a435 100644 --- a/ngraph/test/backend/node_name.in.cpp +++ b/ngraph/test/backend/node_name.in.cpp @@ -23,8 +23,6 @@ #include "util/test_control.hpp" #include "util/test_tools.hpp" -NGRAPH_SUPPRESS_DEPRECATED_START - using namespace std; using namespace ngraph; @@ -35,7 +33,7 @@ NGRAPH_TEST(${BACKEND_NAME}, node_name) Shape shape{2, 2}; auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto C = A + B; + auto C = std::make_shared(A, B); C->set_friendly_name("a node name"); auto f = make_shared(C, ParameterVector{A, B}); diff --git a/ngraph/test/backend/numeric.in.cpp b/ngraph/test/backend/numeric.in.cpp index a95febf5d14a16..07edfdd0a97ccd 100644 --- a/ngraph/test/backend/numeric.in.cpp +++ b/ngraph/test/backend/numeric.in.cpp @@ -33,7 +33,7 @@ NGRAPH_TEST(${BACKEND_NAME}, numeric_float_nan) Shape shape{5}; auto A = op::Constant::create(element::Type_t::f32, shape, {-2.5f, 25.5f, 2.25f, NAN, 6.0f}); auto B = op::Constant::create(element::Type_t::f32, shape, {10.0f, 5.0f, 2.25f, 10.0f, NAN}); - auto f = make_shared(make_shared(A, B), ParameterVector{}); + auto f = make_shared(make_shared(A, B), ParameterVector{}); auto test_case = test::TestCase(f); test_case.add_expected_output(shape, {false, false, true, false, false}); @@ -45,7 +45,7 @@ NGRAPH_TEST(${BACKEND_NAME}, numeric_double_nan) Shape shape{5}; auto A = op::Constant::create(element::Type_t::f64, shape, {-2.5f, 25.5f, 2.25f, NAN, 6.0f}); auto B = op::Constant::create(element::Type_t::f64, shape, {10.0f, 5.0f, 2.25f, 10.0f, NAN}); - auto f = make_shared(make_shared(A, B), ParameterVector{}); + auto f = make_shared(make_shared(A, B), ParameterVector{}); auto test_case = test::TestCase(f); test_case.add_expected_output(shape, {false, false, true, false, false}); @@ -59,7 +59,7 @@ NGRAPH_TEST(${BACKEND_NAME}, numeric_float_inf) op::Constant::create(element::Type_t::f32, shape, {-2.5f, 25.5f, 2.25f, INFINITY, 6.0f}); auto B = op::Constant::create(element::Type_t::f32, shape, {10.0f, 5.0f, 2.25f, 10.0f, -INFINITY}); - auto f = make_shared(make_shared(A, B), ParameterVector{}); + auto f = make_shared(make_shared(A, B), ParameterVector{}); auto test_case = test::TestCase(f); test_case.add_expected_output(shape, {false, false, true, false, false}); @@ -73,7 +73,7 @@ NGRAPH_TEST(${BACKEND_NAME}, numeric_double_inf) op::Constant::create(element::Type_t::f64, shape, {-2.5f, 25.5f, 2.25f, INFINITY, 6.0f}); auto B = op::Constant::create(element::Type_t::f64, shape, {10.0f, 5.0f, 2.25f, 10.0f, -INFINITY}); - auto f = make_shared(make_shared(A, B), ParameterVector{}); + auto f = make_shared(make_shared(A, B), ParameterVector{}); auto test_case = test::TestCase(f); test_case.add_expected_output(shape, {false, false, true, false, false}); diff --git a/ngraph/test/backend/power.in.cpp b/ngraph/test/backend/power.in.cpp index 9c0ea5bea0d8e6..46396c618572fb 100644 --- a/ngraph/test/backend/power.in.cpp +++ b/ngraph/test/backend/power.in.cpp @@ -50,7 +50,7 @@ NGRAPH_TEST(${BACKEND_NAME}, power) Shape shape{2, 2}; auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); std::vector a{1, 2, 3, 5}; std::vector b{2, 0, 6, 3}; diff --git a/ngraph/test/backend/relu.in.cpp b/ngraph/test/backend/relu.in.cpp index 00aa5d4e51d046..028f7a5dda458c 100644 --- a/ngraph/test/backend/relu.in.cpp +++ b/ngraph/test/backend/relu.in.cpp @@ -25,8 +25,6 @@ #include "util/test_control.hpp" #include "util/test_tools.hpp" -NGRAPH_SUPPRESS_DEPRECATED_START - using namespace std; using namespace ngraph; @@ -97,7 +95,7 @@ NGRAPH_TEST(${BACKEND_NAME}, fuse_max_with_constant_zero_input_as_relu) auto shape_a = Shape{2, 5}; auto A = op::Constant::create(element::Type_t::f32, shape_a, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}); auto B = make_shared(element::Type_t::f32, shape_a); - auto max = make_shared(A, B); + auto max = make_shared(A, B); auto shape_rt = Shape{2, 5}; auto f = make_shared(max, ParameterVector{B}); diff --git a/ngraph/test/backend/select.in.cpp b/ngraph/test/backend/select.in.cpp index 9530b3fceda1da..d7e24500bf6bf4 100644 --- a/ngraph/test/backend/select.in.cpp +++ b/ngraph/test/backend/select.in.cpp @@ -37,7 +37,7 @@ NGRAPH_TEST(${BACKEND_NAME}, select) auto A = make_shared(element::Type_t::boolean, shape); auto B = make_shared(element::Type_t::f32, shape); auto C = make_shared(element::Type_t::f32, shape); - auto f = make_shared(make_shared(A, B, C), ParameterVector{A, B, C}); + auto f = make_shared(make_shared(A, B, C), ParameterVector{A, B, C}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); @@ -87,7 +87,7 @@ NGRAPH_TEST(${BACKEND_NAME}, select_double) auto A = make_shared(element::Type_t::boolean, shape); auto B = make_shared(element::Type_t::f64, shape); auto C = make_shared(element::Type_t::f64, shape); - auto f = make_shared(make_shared(A, B, C), ParameterVector{A, B, C}); + auto f = make_shared(make_shared(A, B, C), ParameterVector{A, B, C}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); diff --git a/ngraph/test/backend/slice.in.cpp b/ngraph/test/backend/slice.in.cpp index ba8b352a3bfe82..1eee81d551a4b8 100644 --- a/ngraph/test/backend/slice.in.cpp +++ b/ngraph/test/backend/slice.in.cpp @@ -101,11 +101,11 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_matrix_axis_0_overlap) Shape shape_a{4, 4}; auto A = make_shared(element::Type_t::f32, shape_a); auto B = make_shared(element::Type_t::f32, shape_a); - auto C = make_shared(A, B); + auto C = make_shared(A, B); Shape shape_r{2, 4}; auto D = make_shared(C, Coordinate{0, 0}, Coordinate{2, 4}); auto E = make_shared(C, Coordinate{1, 0}, Coordinate{3, 4}); - auto r = make_shared(D, E); + auto r = make_shared(D, E); auto f = make_shared(r, ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); @@ -131,7 +131,7 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_matrix_axis_0_in_place) Shape shape_r{2, 4}; auto D = make_shared(A, Coordinate{0, 0}, Coordinate{2, 4}); auto E = make_shared(A, Coordinate{2, 0}, Coordinate{4, 4}); - auto r = make_shared(D, E); + auto r = make_shared(D, E); auto f = make_shared(r, ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); @@ -156,7 +156,7 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_matrix_axis_0_in_place_twice) auto B = make_shared(A, Coordinate{0, 0}, Coordinate{2, 4}); auto D = make_shared(B, Coordinate{1, 0}, Coordinate{2, 4}); auto E = make_shared(A, Coordinate{2, 0}, Coordinate{3, 4}); - auto r = make_shared(D, E); + auto r = make_shared(D, E); auto f = make_shared(r, ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); @@ -180,7 +180,7 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_matrix_axis_0_in_place_twice_overlap) auto B = make_shared(A, Coordinate{1, 0}, Coordinate{5, 4}); auto D = make_shared(B, Coordinate{1, 0}, Coordinate{3, 4}); auto E = make_shared(B, Coordinate{2, 0}, Coordinate{4, 4}); - auto r = make_shared(D, E); + auto r = make_shared(D, E); auto f = make_shared(r, ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); diff --git a/ngraph/test/backend/subtract.in.cpp b/ngraph/test/backend/subtract.in.cpp index ce2b205bfae909..e648d47e746104 100644 --- a/ngraph/test/backend/subtract.in.cpp +++ b/ngraph/test/backend/subtract.in.cpp @@ -41,8 +41,6 @@ #include "util/test_control.hpp" #include "util/test_tools.hpp" -NGRAPH_SUPPRESS_DEPRECATED_START - using namespace std; using namespace ngraph; @@ -53,7 +51,7 @@ NGRAPH_TEST(${BACKEND_NAME}, subtract) Shape shape{2, 2}; auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); @@ -74,7 +72,7 @@ NGRAPH_TEST(${BACKEND_NAME}, subtract_overload) Shape shape{2, 2}; auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto f = make_shared(A - B, ParameterVector{A, B}); + auto f = make_shared(std::make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); diff --git a/ngraph/test/backend/validate_call.in.cpp b/ngraph/test/backend/validate_call.in.cpp index 5630d57bfeca0c..ea245dff63e711 100644 --- a/ngraph/test/backend/validate_call.in.cpp +++ b/ngraph/test/backend/validate_call.in.cpp @@ -40,7 +40,7 @@ NGRAPH_TEST(${BACKEND_NAME}, validate_call_input_count) auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto a = backend->create_tensor(element::Type_t::f32, shape); auto b = backend->create_tensor(element::Type_t::f32, shape); @@ -57,7 +57,7 @@ NGRAPH_TEST(${BACKEND_NAME}, validate_call_input_type) auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto a = backend->create_tensor(element::Type_t::i32, shape); auto b = backend->create_tensor(element::Type_t::f32, shape); @@ -74,7 +74,7 @@ NGRAPH_TEST(${BACKEND_NAME}, validate_call_input_shape) auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto a = backend->create_tensor(element::Type_t::f32, {2, 3}); auto b = backend->create_tensor(element::Type_t::f32, shape); @@ -91,7 +91,7 @@ NGRAPH_TEST(${BACKEND_NAME}, validate_call_output_count) auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto a = backend->create_tensor(element::Type_t::f32, shape); auto b = backend->create_tensor(element::Type_t::f32, shape); @@ -109,7 +109,7 @@ NGRAPH_TEST(${BACKEND_NAME}, validate_call_output_type) auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto a = backend->create_tensor(element::Type_t::i32, shape); auto b = backend->create_tensor(element::Type_t::f32, shape); @@ -126,7 +126,7 @@ NGRAPH_TEST(${BACKEND_NAME}, validate_call_output_shape) auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto a = backend->create_tensor(element::Type_t::f32, {2, 3}); auto b = backend->create_tensor(element::Type_t::f32, shape); diff --git a/ngraph/test/backend/zero_sized.in.cpp b/ngraph/test/backend/zero_sized.in.cpp index dce14e91c777f9..b7608142da9c69 100644 --- a/ngraph/test/backend/zero_sized.in.cpp +++ b/ngraph/test/backend/zero_sized.in.cpp @@ -25,13 +25,19 @@ #include "util/test_control.hpp" #include "util/test_tools.hpp" -NGRAPH_SUPPRESS_DEPRECATED_START - using namespace std; using namespace ngraph; static string s_manifest = "${MANIFEST}"; +static const std::vector base_types = { + ngraph::element::from(), + ngraph::element::from(), + ngraph::element::from(), + ngraph::element::from(), + ngraph::element::from(), +}; + template void make_unary_empty_test(const string& backend_name) { @@ -39,9 +45,9 @@ void make_unary_empty_test(const string& backend_name) ParameterVector params; NodeVector result_list; - for (size_t i = 0; i < s_known_element_types.size(); i++) + for (size_t i = 0; i < base_types.size(); i++) { - shared_ptr p = make_shared(s_known_element_types[i], shape); + shared_ptr p = make_shared(base_types[i], shape); params.push_back(p); result_list.push_back(make_shared(p)); } @@ -51,36 +57,26 @@ void make_unary_empty_test(const string& backend_name) vector> inputs; vector> outputs; - for (size_t i = 0; i < s_known_element_types.size(); i++) + for (size_t i = 0; i < base_types.size(); i++) { - inputs.push_back(backend->create_tensor(s_known_element_types[i], shape)); - outputs.push_back(backend->create_tensor(s_known_element_types[i], shape)); + inputs.push_back(backend->create_tensor(base_types[i], shape)); + outputs.push_back(backend->create_tensor(base_types[i], shape)); } auto handle = backend->compile(f); handle->call_with_validate(outputs, inputs); EXPECT_EQ(read_vector(inputs[0]).size(), 0); - EXPECT_EQ(read_vector(inputs[1]).size(), 0); - EXPECT_EQ(read_vector(inputs[2]).size(), 0); - EXPECT_EQ(read_vector(inputs[3]).size(), 0); - EXPECT_EQ(read_vector(inputs[4]).size(), 0); - EXPECT_EQ(read_vector(inputs[5]).size(), 0); - EXPECT_EQ(read_vector(inputs[6]).size(), 0); - EXPECT_EQ(read_vector(inputs[7]).size(), 0); - EXPECT_EQ(read_vector(inputs[8]).size(), 0); - EXPECT_EQ(read_vector(inputs[9]).size(), 0); + EXPECT_EQ(read_vector(inputs[1]).size(), 0); + EXPECT_EQ(read_vector(inputs[2]).size(), 0); + EXPECT_EQ(read_vector(inputs[3]).size(), 0); + EXPECT_EQ(read_vector(inputs[4]).size(), 0); EXPECT_EQ(read_vector(outputs[0]).size(), 0); - EXPECT_EQ(read_vector(outputs[1]).size(), 0); - EXPECT_EQ(read_vector(outputs[2]).size(), 0); - EXPECT_EQ(read_vector(outputs[3]).size(), 0); - EXPECT_EQ(read_vector(outputs[4]).size(), 0); - EXPECT_EQ(read_vector(outputs[5]).size(), 0); - EXPECT_EQ(read_vector(outputs[6]).size(), 0); - EXPECT_EQ(read_vector(outputs[7]).size(), 0); - EXPECT_EQ(read_vector(outputs[8]).size(), 0); - EXPECT_EQ(read_vector(outputs[9]).size(), 0); + EXPECT_EQ(read_vector(outputs[1]).size(), 0); + EXPECT_EQ(read_vector(outputs[2]).size(), 0); + EXPECT_EQ(read_vector(outputs[3]).size(), 0); + EXPECT_EQ(read_vector(outputs[4]).size(), 0); } template @@ -88,9 +84,9 @@ void make_binary_empty_test(const string& backend_name, bool is_comparison = fal { Shape shape{0}; ParameterVector A; - for (size_t i = 0; i < s_known_element_types.size(); i++) + for (size_t i = 0; i < base_types.size(); i++) { - A.push_back(make_shared(s_known_element_types[i], shape)); + A.push_back(make_shared(base_types[i], shape)); } NodeVector result_list; @@ -104,16 +100,16 @@ void make_binary_empty_test(const string& backend_name, bool is_comparison = fal vector> inputs; vector> outputs; - for (size_t i = 0; i < s_known_element_types.size(); i++) + for (size_t i = 0; i < base_types.size(); i++) { - inputs.push_back(backend->create_tensor(s_known_element_types[i], shape)); + inputs.push_back(backend->create_tensor(base_types[i], shape)); if (is_comparison) { outputs.push_back(backend->create_tensor(element::from(), shape)); } else { - outputs.push_back(backend->create_tensor(s_known_element_types[i], shape)); + outputs.push_back(backend->create_tensor(base_types[i], shape)); } } @@ -121,15 +117,10 @@ void make_binary_empty_test(const string& backend_name, bool is_comparison = fal handle->call_with_validate(outputs, inputs); EXPECT_EQ(read_vector(inputs[0]).size(), 0); - EXPECT_EQ(read_vector(inputs[1]).size(), 0); - EXPECT_EQ(read_vector(inputs[2]).size(), 0); - EXPECT_EQ(read_vector(inputs[3]).size(), 0); - EXPECT_EQ(read_vector(inputs[4]).size(), 0); - EXPECT_EQ(read_vector(inputs[5]).size(), 0); - EXPECT_EQ(read_vector(inputs[6]).size(), 0); - EXPECT_EQ(read_vector(inputs[7]).size(), 0); - EXPECT_EQ(read_vector(inputs[8]).size(), 0); - EXPECT_EQ(read_vector(inputs[9]).size(), 0); + EXPECT_EQ(read_vector(inputs[1]).size(), 0); + EXPECT_EQ(read_vector(inputs[2]).size(), 0); + EXPECT_EQ(read_vector(inputs[3]).size(), 0); + EXPECT_EQ(read_vector(inputs[4]).size(), 0); if (is_comparison) { @@ -138,24 +129,14 @@ void make_binary_empty_test(const string& backend_name, bool is_comparison = fal EXPECT_EQ(read_vector(outputs[2]).size(), 0); EXPECT_EQ(read_vector(outputs[3]).size(), 0); EXPECT_EQ(read_vector(outputs[4]).size(), 0); - EXPECT_EQ(read_vector(outputs[5]).size(), 0); - EXPECT_EQ(read_vector(outputs[6]).size(), 0); - EXPECT_EQ(read_vector(outputs[7]).size(), 0); - EXPECT_EQ(read_vector(outputs[8]).size(), 0); - EXPECT_EQ(read_vector(outputs[9]).size(), 0); } else { EXPECT_EQ(read_vector(outputs[0]).size(), 0); - EXPECT_EQ(read_vector(outputs[1]).size(), 0); - EXPECT_EQ(read_vector(outputs[2]).size(), 0); - EXPECT_EQ(read_vector(outputs[3]).size(), 0); - EXPECT_EQ(read_vector(outputs[4]).size(), 0); - EXPECT_EQ(read_vector(outputs[5]).size(), 0); - EXPECT_EQ(read_vector(outputs[6]).size(), 0); - EXPECT_EQ(read_vector(outputs[7]).size(), 0); - EXPECT_EQ(read_vector(outputs[8]).size(), 0); - EXPECT_EQ(read_vector(outputs[9]).size(), 0); + EXPECT_EQ(read_vector(outputs[1]).size(), 0); + EXPECT_EQ(read_vector(outputs[2]).size(), 0); + EXPECT_EQ(read_vector(outputs[3]).size(), 0); + EXPECT_EQ(read_vector(outputs[4]).size(), 0); } } @@ -251,65 +232,65 @@ NGRAPH_TEST(${BACKEND_NAME}, zero_sized_atan) NGRAPH_TEST(${BACKEND_NAME}, zero_sized_add) { - make_binary_empty_test("${BACKEND_NAME}"); + make_binary_empty_test("${BACKEND_NAME}"); } NGRAPH_TEST(${BACKEND_NAME}, zero_sized_divide) { - make_binary_empty_test("${BACKEND_NAME}"); + make_binary_empty_test("${BACKEND_NAME}"); } NGRAPH_TEST(${BACKEND_NAME}, zero_sized_eq) { - make_binary_empty_test("${BACKEND_NAME}", true); + make_binary_empty_test("${BACKEND_NAME}", true); } NGRAPH_TEST(${BACKEND_NAME}, zero_sized_greater) { - make_binary_empty_test("${BACKEND_NAME}", true); + make_binary_empty_test("${BACKEND_NAME}", true); } NGRAPH_TEST(${BACKEND_NAME}, zero_sized_greatereq) { - make_binary_empty_test("${BACKEND_NAME}", true); + make_binary_empty_test("${BACKEND_NAME}", true); } NGRAPH_TEST(${BACKEND_NAME}, zero_sized_less) { - make_binary_empty_test("${BACKEND_NAME}", true); + make_binary_empty_test("${BACKEND_NAME}", true); } NGRAPH_TEST(${BACKEND_NAME}, zero_sized_lesseq) { - make_binary_empty_test("${BACKEND_NAME}", true); + make_binary_empty_test("${BACKEND_NAME}", true); } NGRAPH_TEST(${BACKEND_NAME}, zero_sized_maximum) { - make_binary_empty_test("${BACKEND_NAME}"); + make_binary_empty_test("${BACKEND_NAME}"); } NGRAPH_TEST(${BACKEND_NAME}, zero_sized_minimum) { - make_binary_empty_test("${BACKEND_NAME}"); + make_binary_empty_test("${BACKEND_NAME}"); } NGRAPH_TEST(${BACKEND_NAME}, zero_sized_multiply) { - make_binary_empty_test("${BACKEND_NAME}"); + make_binary_empty_test("${BACKEND_NAME}"); } NGRAPH_TEST(${BACKEND_NAME}, zero_sized_not_equal) { - make_binary_empty_test("${BACKEND_NAME}", true); + make_binary_empty_test("${BACKEND_NAME}", true); } NGRAPH_TEST(${BACKEND_NAME}, zero_sized_power) { - make_binary_empty_test("${BACKEND_NAME}"); + make_binary_empty_test("${BACKEND_NAME}"); } NGRAPH_TEST(${BACKEND_NAME}, zero_sized_subtract) { - make_binary_empty_test("${BACKEND_NAME}"); + make_binary_empty_test("${BACKEND_NAME}"); } diff --git a/ngraph/test/backend_debug_api.cpp b/ngraph/test/backend_debug_api.cpp index 5124a3c429047d..20901c782c0199 100644 --- a/ngraph/test/backend_debug_api.cpp +++ b/ngraph/test/backend_debug_api.cpp @@ -35,7 +35,7 @@ TEST(INTERPRETER, nan_check_input) Shape shape{4}; auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); shared_ptr backend = runtime::Backend::create("INTERPRETER"); @@ -59,7 +59,7 @@ TEST(INTERPRETER, nan_check_output) Shape shape{4}; auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); shared_ptr backend = runtime::Backend::create("INTERPRETER"); diff --git a/ngraph/test/build_graph.cpp b/ngraph/test/build_graph.cpp index c771382b4ec733..7da57d8940af0b 100644 --- a/ngraph/test/build_graph.cpp +++ b/ngraph/test/build_graph.cpp @@ -75,7 +75,7 @@ TEST(build_graph, tensor) auto float0 = make_shared(element::Type_t::f32, shape, float_t); ASSERT_EQ(float0->get_element_type(), element::Type_t::f32); ASSERT_EQ(float0->get_shape(), shape); - auto d = make_shared(float0, float0); + auto d = make_shared(float0, float0); ASSERT_EQ(d->input_values().at(0).get_node_shared_ptr(), float0); ASSERT_EQ(d->input_values().at(1).get_node_shared_ptr(), float0); @@ -125,10 +125,10 @@ TEST(build_graph, no_arg_construction) auto arg1 = make_shared(element::Type_t::f32, Shape{7}); auto arg2 = make_shared(element::Type_t::f32, Shape{7}); auto arg3 = make_shared(element::Type_t::f32, Shape{7}); - auto add0 = make_shared(); + auto add0 = make_shared(); auto abs0 = make_shared(); auto acos0 = make_shared(); - auto add1 = make_shared(); + auto add1 = make_shared(); add0->set_argument(1, arg0); add0->set_argument(0, arg1); abs0->set_argument(0, add0); diff --git a/ngraph/test/constant_folding.cpp b/ngraph/test/constant_folding.cpp index a7b635aa20be5e..23dec3cd5c5a38 100644 --- a/ngraph/test/constant_folding.cpp +++ b/ngraph/test/constant_folding.cpp @@ -22,8 +22,6 @@ #include "util/all_close_f.hpp" #include "util/test_tools.hpp" -NGRAPH_SUPPRESS_DEPRECATED_START - using namespace ngraph; using namespace std; @@ -315,29 +313,30 @@ TEST(constant_folding, constant_unary_binary) auto h = make_shared(element::Type_t::boolean, Shape{2, 2}, values_h); auto i = make_shared(element::Type_t::boolean, Shape{2}, values_i); - auto add = a + b; - auto sub = a - b; - auto mul = a * b; - auto divn = a / b; - auto pow = make_shared(a, b); - auto min = make_shared(c, a); - auto max = make_shared(a, c); + auto add = make_shared(a, b); + auto sub = make_shared(a, b); + auto mul = make_shared(a, b); + auto divn = make_shared(a, b); + auto pow = make_shared(a, b); + auto min = make_shared(c, a); + auto max = make_shared(a, c); auto absn = make_shared(c); auto neg = make_shared(c); auto sqrt = make_shared(d); - auto add_autob_numpy = make_shared(a, e, op::AutoBroadcastType::NUMPY); - auto sub_autob_numpy = make_shared(a, e, op::AutoBroadcastType::NUMPY); - auto mul_autob_numpy = make_shared(a, e, op::AutoBroadcastType::NUMPY); - auto div_autob_numpy = make_shared(a, g, op::AutoBroadcastType::NUMPY); - auto pow_autob_numpy = make_shared(a, g, op::AutoBroadcastType::NUMPY); - auto min_autob_numpy = make_shared(a, f, op::AutoBroadcastType::NUMPY); - auto max_autob_numpy = make_shared(a, f, op::AutoBroadcastType::NUMPY); - auto equal_autob_numpy = make_shared(a, g, op::AutoBroadcastType::NUMPY); - auto not_equal_autob_numpy = make_shared(a, g, op::AutoBroadcastType::NUMPY); - auto greater_autob_numpy = make_shared(a, g, op::AutoBroadcastType::NUMPY); - auto greater_eq_autob_numpy = make_shared(a, g, op::AutoBroadcastType::NUMPY); - auto less_autob_numpy = make_shared(a, g, op::AutoBroadcastType::NUMPY); - auto less_eq_autob_numpy = make_shared(a, g, op::AutoBroadcastType::NUMPY); + auto add_autob_numpy = make_shared(a, e, op::AutoBroadcastType::NUMPY); + auto sub_autob_numpy = make_shared(a, e, op::AutoBroadcastType::NUMPY); + auto mul_autob_numpy = make_shared(a, e, op::AutoBroadcastType::NUMPY); + auto div_autob_numpy = make_shared(a, g, op::AutoBroadcastType::NUMPY); + auto pow_autob_numpy = make_shared(a, g, op::AutoBroadcastType::NUMPY); + auto min_autob_numpy = make_shared(a, f, op::AutoBroadcastType::NUMPY); + auto max_autob_numpy = make_shared(a, f, op::AutoBroadcastType::NUMPY); + auto equal_autob_numpy = make_shared(a, g, op::AutoBroadcastType::NUMPY); + auto not_equal_autob_numpy = make_shared(a, g, op::AutoBroadcastType::NUMPY); + auto greater_autob_numpy = make_shared(a, g, op::AutoBroadcastType::NUMPY); + auto greater_eq_autob_numpy = + make_shared(a, g, op::AutoBroadcastType::NUMPY); + auto less_autob_numpy = make_shared(a, g, op::AutoBroadcastType::NUMPY); + auto less_eq_autob_numpy = make_shared(a, g, op::AutoBroadcastType::NUMPY); auto logical_or_autob_numpy = make_shared(h, i, op::AutoBroadcastType::NUMPY); auto logical_xor_autob_numpy = make_shared(h, i, op::AutoBroadcastType::NUMPY); @@ -1379,7 +1378,7 @@ TEST(constant_folding, const_equal) op::Constant::create(element::Type_t::i32, Shape{2, 3}, vector{1, 2, 3, 4, 5, 6}); auto constant1 = op::Constant::create(element::Type_t::i32, Shape{2, 3}, vector{1, 2, 2, 3, 5, 6}); - auto eq = make_shared(constant0, constant1); + auto eq = make_shared(constant0, constant1); eq->set_friendly_name("test"); auto f = make_shared(eq, ParameterVector{}); @@ -1387,7 +1386,7 @@ TEST(constant_folding, const_equal) pass_manager.register_pass(); pass_manager.run_passes(f); - ASSERT_EQ(count_ops_of_type(f), 0); + ASSERT_EQ(count_ops_of_type(f), 0); ASSERT_EQ(count_ops_of_type(f), 1); auto new_const = @@ -1407,7 +1406,7 @@ TEST(constant_folding, const_not_equal) op::Constant::create(element::Type_t::i32, Shape{2, 3}, vector{1, 2, 3, 4, 5, 6}); auto constant1 = op::Constant::create(element::Type_t::i32, Shape{2, 3}, vector{1, 2, 2, 3, 5, 6}); - auto eq = make_shared(constant0, constant1); + auto eq = make_shared(constant0, constant1); eq->set_friendly_name("test"); auto f = make_shared(eq, ParameterVector{}); @@ -1415,7 +1414,7 @@ TEST(constant_folding, const_not_equal) pass_manager.register_pass(); pass_manager.run_passes(f); - ASSERT_EQ(count_ops_of_type(f), 0); + ASSERT_EQ(count_ops_of_type(f), 0); ASSERT_EQ(count_ops_of_type(f), 1); auto new_const = @@ -1435,7 +1434,7 @@ TEST(constant_folding, const_greater) op::Constant::create(element::Type_t::i32, Shape{2, 3}, vector{1, 2, 3, 4, 5, 6}); auto constant1 = op::Constant::create(element::Type_t::i32, Shape{2, 3}, vector{2, 2, 2, 5, 5, 5}); - auto eq = make_shared(constant0, constant1); + auto eq = make_shared(constant0, constant1); eq->set_friendly_name("test"); auto f = make_shared(eq, ParameterVector{}); @@ -1443,7 +1442,7 @@ TEST(constant_folding, const_greater) pass_manager.register_pass(); pass_manager.run_passes(f); - ASSERT_EQ(count_ops_of_type(f), 0); + ASSERT_EQ(count_ops_of_type(f), 0); ASSERT_EQ(count_ops_of_type(f), 1); auto new_const = @@ -1463,7 +1462,7 @@ TEST(constant_folding, const_greater_eq) op::Constant::create(element::Type_t::i32, Shape{2, 3}, vector{1, 2, 3, 4, 5, 6}); auto constant1 = op::Constant::create(element::Type_t::i32, Shape{2, 3}, vector{2, 2, 2, 5, 5, 5}); - auto eq = make_shared(constant0, constant1); + auto eq = make_shared(constant0, constant1); eq->set_friendly_name("test"); auto f = make_shared(eq, ParameterVector{}); @@ -1471,7 +1470,7 @@ TEST(constant_folding, const_greater_eq) pass_manager.register_pass(); pass_manager.run_passes(f); - ASSERT_EQ(count_ops_of_type(f), 0); + ASSERT_EQ(count_ops_of_type(f), 0); ASSERT_EQ(count_ops_of_type(f), 1); auto new_const = @@ -1491,7 +1490,7 @@ TEST(constant_folding, const_less) op::Constant::create(element::Type_t::i32, Shape{2, 3}, vector{1, 2, 3, 4, 5, 6}); auto constant1 = op::Constant::create(element::Type_t::i32, Shape{2, 3}, vector{2, 2, 2, 5, 5, 5}); - auto eq = make_shared(constant0, constant1); + auto eq = make_shared(constant0, constant1); eq->set_friendly_name("test"); auto f = make_shared(eq, ParameterVector{}); @@ -1499,7 +1498,7 @@ TEST(constant_folding, const_less) pass_manager.register_pass(); pass_manager.run_passes(f); - ASSERT_EQ(count_ops_of_type(f), 0); + ASSERT_EQ(count_ops_of_type(f), 0); ASSERT_EQ(count_ops_of_type(f), 1); auto new_const = @@ -1519,7 +1518,7 @@ TEST(constant_folding, const_less_eq) op::Constant::create(element::Type_t::i32, Shape{2, 3}, vector{1, 2, 3, 4, 5, 6}); auto constant1 = op::Constant::create(element::Type_t::i32, Shape{2, 3}, vector{2, 2, 2, 5, 5, 5}); - auto eq = make_shared(constant0, constant1); + auto eq = make_shared(constant0, constant1); eq->set_friendly_name("test"); auto f = make_shared(eq, ParameterVector{}); @@ -1527,7 +1526,7 @@ TEST(constant_folding, const_less_eq) pass_manager.register_pass(); pass_manager.run_passes(f); - ASSERT_EQ(count_ops_of_type(f), 0); + ASSERT_EQ(count_ops_of_type(f), 0); ASSERT_EQ(count_ops_of_type(f), 1); auto new_const = @@ -2124,7 +2123,7 @@ TEST(constant_folding, constant_v1_select) pass_manager.register_pass(); pass_manager.run_passes(f); - ASSERT_EQ(count_ops_of_type(f), 0); + ASSERT_EQ(count_ops_of_type(f), 0); ASSERT_EQ(count_ops_of_type(f), 1); auto new_const = diff --git a/ngraph/test/control_dependencies.cpp b/ngraph/test/control_dependencies.cpp index 7d6e66da874615..f78710d318aabf 100644 --- a/ngraph/test/control_dependencies.cpp +++ b/ngraph/test/control_dependencies.cpp @@ -36,8 +36,6 @@ #include "util/random.hpp" #include "util/test_tools.hpp" -NGRAPH_SUPPRESS_DEPRECATED_START - using namespace ngraph; using namespace std; @@ -177,10 +175,10 @@ TEST(control_dependencies, replace_node) Shape shape{2, 2}; auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto MUL_AB = A * B; - auto MUL_BA = B * A; - auto ADD = A + B; - auto SUM = MUL_AB + ADD; + auto MUL_AB = make_shared(A, B); + auto MUL_BA = make_shared(B, A); + auto ADD = make_shared(A, B); + auto SUM = make_shared(MUL_AB, ADD); ADD->add_control_dependency(MUL_AB); ASSERT_TRUE(1 == count_control_dependencies(ADD, MUL_AB)); ASSERT_TRUE(0 == count_control_dependencies(ADD, MUL_BA)); diff --git a/ngraph/test/copy.cpp b/ngraph/test/copy.cpp index f1c97ec4837389..05a23050c3f7b3 100644 --- a/ngraph/test/copy.cpp +++ b/ngraph/test/copy.cpp @@ -24,8 +24,6 @@ #include "util/ndarray.hpp" #include "util/test_tools.hpp" -NGRAPH_SUPPRESS_DEPRECATED_START - using namespace std; using namespace ngraph; @@ -69,7 +67,7 @@ TEST(copy, acos) TEST(copy, add) { - ASSERT_TRUE(check_binary()); + ASSERT_TRUE(check_binary()); } TEST(copy, asin) @@ -178,12 +176,12 @@ TEST(copy, cosh) TEST(copy, divide) { - ASSERT_TRUE(check_binary()); + ASSERT_TRUE(check_binary()); } TEST(copy, equal) { - ASSERT_TRUE(check_binary()); + ASSERT_TRUE(check_binary()); } TEST(copy, exp) @@ -198,22 +196,22 @@ TEST(copy, floor) TEST(copy, greater_eq) { - ASSERT_TRUE(check_binary()); + ASSERT_TRUE(check_binary()); } TEST(copy, greater) { - ASSERT_TRUE(check_binary()); + ASSERT_TRUE(check_binary()); } TEST(copy, less_eq) { - ASSERT_TRUE(check_binary()); + ASSERT_TRUE(check_binary()); } TEST(copy, less) { - ASSERT_TRUE(check_binary()); + ASSERT_TRUE(check_binary()); } TEST(copy, log) @@ -223,17 +221,17 @@ TEST(copy, log) TEST(copy, maximum) { - ASSERT_TRUE(check_binary()); + ASSERT_TRUE(check_binary()); } TEST(copy, minimum) { - ASSERT_TRUE(check_binary()); + ASSERT_TRUE(check_binary()); } TEST(copy, multiply) { - ASSERT_TRUE(check_binary()); + ASSERT_TRUE(check_binary()); } TEST(copy, negative) @@ -243,7 +241,7 @@ TEST(copy, negative) TEST(copy, not_equal) { - ASSERT_TRUE(check_binary()); + ASSERT_TRUE(check_binary()); } TEST(copy, parameter) @@ -261,7 +259,7 @@ TEST(copy, parameter) TEST(copy, power) { - ASSERT_TRUE(check_binary()); + ASSERT_TRUE(check_binary()); } TEST(copy, reduce_sum) @@ -316,9 +314,9 @@ TEST(copy, select) make_shared(element::Type_t::f32, shape), make_shared(element::Type_t::f32, shape)}; - auto node = make_shared(arg0, arg1, arg2); + auto node = make_shared(arg0, arg1, arg2); auto new_node = node->clone_with_new_inputs(new_args); - auto node_cast = as_type_ptr(new_node); + auto node_cast = as_type_ptr(new_node); ASSERT_NE(node_cast, nullptr); ASSERT_TRUE(nullptr != new_node); @@ -385,7 +383,7 @@ TEST(copy, strided_slice) TEST(copy, subtract) { - ASSERT_TRUE(check_binary()); + ASSERT_TRUE(check_binary()); } TEST(copy, tan) diff --git a/ngraph/test/eval.cpp b/ngraph/test/eval.cpp index f551e39880052f..1fed4473ac16ba 100644 --- a/ngraph/test/eval.cpp +++ b/ngraph/test/eval.cpp @@ -132,7 +132,7 @@ TEST(eval, max_eval_minimum_constant) { auto c = op::Constant::create(element::Type_t::i64, Shape{}, {27}); auto p = make_shared(element::Type_t::i64, Shape{}); - auto m = make_shared(c, p); + auto m = make_shared(c, p); auto result = maximum_value(m); ASSERT_TRUE(result.first); EXPECT_EQ(result.second, 27); diff --git a/ngraph/test/input_output_assign.cpp b/ngraph/test/input_output_assign.cpp index 61c125bf5f85b6..69c20a464123fc 100644 --- a/ngraph/test/input_output_assign.cpp +++ b/ngraph/test/input_output_assign.cpp @@ -41,7 +41,7 @@ TEST(input_output, simple_output) { auto param_0 = make_shared(element::Type_t::f32, Shape{2, 4}); auto param_1 = make_shared(element::Type_t::f32, Shape{2, 4}); - auto add = make_shared(param_0, param_1); + auto add = make_shared(param_0, param_1); // Sort the ops vector> nodes; diff --git a/ngraph/test/models/onnx/matmul_integer.prototxt b/ngraph/test/models/onnx/matmul_integer.prototxt deleted file mode 100644 index bc44b1fcd3fa85..00000000000000 --- a/ngraph/test/models/onnx/matmul_integer.prototxt +++ /dev/null @@ -1,88 +0,0 @@ -ir_version: 5 -producer_name: "nGraph ONNX Importer" -graph { - node { - input: "a" - input: "b" - input: "a_zero_point" - input: "b_zero_point" - output: "y" - name: "node1" - op_type: "MatMulInteger" - doc_string: "MatMulInteger" - domain: "" - } - name: "test" - input { - name: "a" - type { - tensor_type { - elem_type: 2 - shape { - dim { - dim_value: 4 - } - dim { - dim_value: 3 - } - } - } - } - } - input { - name: "b" - type { - tensor_type { - elem_type: 2 - shape { - dim { - dim_value: 3 - } - dim { - dim_value: 2 - } - } - } - } - } - input { - name: "a_zero_point" - type { - tensor_type { - elem_type: 2 - shape { - } - } - } - } - input { - name: "b_zero_point" - type { - tensor_type { - elem_type: 2 - shape { - } - } - } - } - output { - name: "y" - type { - tensor_type { - elem_type: 6 - shape { - dim { - dim_value: 4 - } - dim { - dim_value: 2 - } - } - } - } - } -} -opset_import { - domain: "" - version: 10 -} diff --git a/ngraph/test/models/onnx/matmul_integer_4d.prototxt b/ngraph/test/models/onnx/matmul_integer_4d.prototxt deleted file mode 100644 index 61c517e3c4d6cc..00000000000000 --- a/ngraph/test/models/onnx/matmul_integer_4d.prototxt +++ /dev/null @@ -1,106 +0,0 @@ -ir_version: 5 -producer_name: "nGraph ONNX Importer" -graph { - node { - input: "a" - input: "b" - input: "a_zero_point" - input: "b_zero_point" - output: "y" - name: "node1" - op_type: "MatMulInteger" - doc_string: "MatMulInteger" - domain: "" - } - name: "test" - input { - name: "a" - type { - tensor_type { - elem_type: 2 - shape { - dim { - dim_value: 1 - } - dim { - dim_value: 2 - } - dim { - dim_value: 3 - } - dim { - dim_value: 4 - } - } - } - } - } - input { - name: "b" - type { - tensor_type { - elem_type: 2 - shape { - dim { - dim_value: 1 - } - dim { - dim_value: 2 - } - dim { - dim_value: 4 - } - dim { - dim_value: 3 - } - } - } - } - } - input { - name: "a_zero_point" - type { - tensor_type { - elem_type: 2 - shape { - } - } - } - } - input { - name: "b_zero_point" - type { - tensor_type { - elem_type: 2 - shape { - } - } - } - } - output { - name: "y" - type { - tensor_type { - elem_type: 6 - shape { - dim { - dim_value: 1 - } - dim { - dim_value: 2 - } - dim { - dim_value: 3 - } - dim { - dim_value: 3 - } - } - } - } - } -} -opset_import { - domain: "" - version: 10 -} diff --git a/ngraph/test/models/onnx/matmul_integer_4d_no_zero_point.prototxt b/ngraph/test/models/onnx/matmul_integer_4d_no_zero_point.prototxt deleted file mode 100644 index c82e49f383c38e..00000000000000 --- a/ngraph/test/models/onnx/matmul_integer_4d_no_zero_point.prototxt +++ /dev/null @@ -1,84 +0,0 @@ -ir_version: 5 -producer_name: "nGraph ONNX Importer" -graph { - node { - input: "a" - input: "b" - output: "y" - name: "node1" - op_type: "MatMulInteger" - doc_string: "MatMulInteger" - domain: "" - } - name: "test" - input { - name: "a" - type { - tensor_type { - elem_type: 2 - shape { - dim { - dim_value: 1 - } - dim { - dim_value: 2 - } - dim { - dim_value: 3 - } - dim { - dim_value: 4 - } - } - } - } - } - input { - name: "b" - type { - tensor_type { - elem_type: 2 - shape { - dim { - dim_value: 1 - } - dim { - dim_value: 2 - } - dim { - dim_value: 4 - } - dim { - dim_value: 3 - } - } - } - } - } - output { - name: "y" - type { - tensor_type { - elem_type: 6 - shape { - dim { - dim_value: 1 - } - dim { - dim_value: 2 - } - dim { - dim_value: 3 - } - dim { - dim_value: 3 - } - } - } - } - } -} -opset_import { - domain: "" - version: 10 -} diff --git a/ngraph/test/models/onnx/matmul_integer_no_zero_point.prototxt b/ngraph/test/models/onnx/matmul_integer_no_zero_point.prototxt deleted file mode 100644 index 505f72d7f373fb..00000000000000 --- a/ngraph/test/models/onnx/matmul_integer_no_zero_point.prototxt +++ /dev/null @@ -1,66 +0,0 @@ -ir_version: 5 -producer_name: "nGraph ONNX Importer" -graph { - node { - input: "a" - input: "b" - output: "y" - name: "node1" - op_type: "MatMulInteger" - doc_string: "MatMulInteger" - domain: "" - } - name: "test" - input { - name: "a" - type { - tensor_type { - elem_type: 2 - shape { - dim { - dim_value: 4 - } - dim { - dim_value: 3 - } - } - } - } - } - input { - name: "b" - type { - tensor_type { - elem_type: 2 - shape { - dim { - dim_value: 3 - } - dim { - dim_value: 2 - } - } - } - } - } - output { - name: "y" - type { - tensor_type { - elem_type: 6 - shape { - dim { - dim_value: 4 - } - dim { - dim_value: 2 - } - } - } - } - } -} -opset_import { - domain: "" - version: 10 -} diff --git a/ngraph/test/models/onnx/matmul_integer_scalar.prototxt b/ngraph/test/models/onnx/matmul_integer_scalar.prototxt deleted file mode 100644 index 1d1900b031a35c..00000000000000 --- a/ngraph/test/models/onnx/matmul_integer_scalar.prototxt +++ /dev/null @@ -1,88 +0,0 @@ -ir_version: 5 -producer_name: "nGraph ONNX Importer" -graph { - node { - input: "a" - input: "b" - input: "a_zero_point" - input: "b_zero_point" - output: "y" - name: "node1" - op_type: "MatMulInteger" - doc_string: "MatMulInteger" - domain: "" - } - name: "test" - input { - name: "a" - type { - tensor_type { - elem_type: 2 - shape { - dim { - dim_value: 1 - } - dim { - dim_value: 1 - } - } - } - } - } - input { - name: "b" - type { - tensor_type { - elem_type: 2 - shape { - dim { - dim_value: 1 - } - dim { - dim_value: 1 - } - } - } - } - } - input { - name: "a_zero_point" - type { - tensor_type { - elem_type: 2 - shape { - } - } - } - } - input { - name: "b_zero_point" - type { - tensor_type { - elem_type: 2 - shape { - } - } - } - } - output { - name: "y" - type { - tensor_type { - elem_type: 6 - shape { - dim { - dim_value: 1 - } - dim { - dim_value: 1 - } - } - } - } - } -} -opset_import { - domain: "" - version: 10 -} diff --git a/ngraph/test/models/onnx/provenance_downgrade_topk.prototxt b/ngraph/test/models/onnx/provenance_downgrade_topk.prototxt deleted file mode 100644 index 0369588e46b7f6..00000000000000 --- a/ngraph/test/models/onnx/provenance_downgrade_topk.prototxt +++ /dev/null @@ -1,77 +0,0 @@ -ir_version: 4 -producer_name: "nGraph ONNX Importer" -graph { - node { - input: "x" - input: "k" - output: "values" - output: "indices" - op_type: "TopK" - name: "TOPK" - } - name: "test_graph" - input { - name: "x" - type { - tensor_type { - elem_type: 1 - shape { - dim { - dim_value: 3 - } - dim { - dim_value: 4 - } - } - } - } - } - input { - name: "k" - type { - tensor_type { - elem_type: 7 - shape { - dim { - dim_value: 1 - } - } - } - } - } - output { - name: "values" - type { - tensor_type { - elem_type: 1 - shape { - dim { - dim_value: 3 - } - dim { - dim_value: 3 - } - } - } - } - } - output { - name: "indices" - type { - tensor_type { - elem_type: 7 - shape { - dim { - dim_value: 3 - } - dim { - dim_value: 3 - } - } - } - } - } -} -opset_import { - version: 10 -} diff --git a/ngraph/test/node_input_output.cpp b/ngraph/test/node_input_output.cpp index 4104e68166770d..473571f4208aa4 100644 --- a/ngraph/test/node_input_output.cpp +++ b/ngraph/test/node_input_output.cpp @@ -32,7 +32,7 @@ TEST(node_input_output, input_create) { auto x = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); auto y = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - auto add = make_shared(x, y); + auto add = make_shared(x, y); auto add_in_0 = add->input(0); auto add_in_1 = add->input(1); @@ -58,7 +58,7 @@ TEST(node_input_output, input_create_const) { auto x = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); auto y = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - auto add = make_shared(x, y); + auto add = make_shared(x, y); auto add_in_0 = add->input(0); auto add_in_1 = add->input(1); @@ -84,7 +84,7 @@ TEST(node_input_output, output_create) { auto x = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); auto y = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - auto add = make_shared(x, y); + auto add = make_shared(x, y); auto add_out_0 = add->output(0); @@ -101,7 +101,7 @@ TEST(node_input_output, output_create_const) { auto x = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); auto y = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - auto add = make_shared(x, y); + auto add = make_shared(x, y); auto add_out_0 = add->output(0); diff --git a/ngraph/test/onnx/onnx_import.in.cpp b/ngraph/test/onnx/onnx_import.in.cpp index 2d412e58acc180..d7844873f6b276 100644 --- a/ngraph/test/onnx/onnx_import.in.cpp +++ b/ngraph/test/onnx/onnx_import.in.cpp @@ -199,13 +199,13 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_override_op) onnx_import::register_operator( "FalseAdd", 1, "", [](const onnx_import::Node& node) -> OutputVector { OutputVector ng_inputs{node.get_ng_inputs()}; - return {std::make_shared(ng_inputs.at(0), ng_inputs.at(1))}; + return {std::make_shared(ng_inputs.at(0), ng_inputs.at(1))}; }); onnx_import::register_operator( "FalseAdd", 1, "", [](const onnx_import::Node& node) -> OutputVector { OutputVector ng_inputs{node.get_ng_inputs()}; - return {std::make_shared(ng_inputs.at(0), ng_inputs.at(1))}; + return {std::make_shared(ng_inputs.at(0), ng_inputs.at(1))}; }); auto function = onnx_import::import_onnx_model( @@ -261,7 +261,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_custom_op) onnx_import::register_operator( "AddQ", 1, "com.intel.ai", [](const onnx_import::Node& node) -> OutputVector { OutputVector ng_inputs{node.get_ng_inputs()}; - return {std::make_shared(ng_inputs.at(0), ng_inputs.at(1))}; + return {std::make_shared(ng_inputs.at(0), ng_inputs.at(1))}; }); auto function = onnx_import::import_onnx_model( @@ -278,7 +278,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_custom_op_register_unregister) onnx_import::register_operator( "AddQ", 1, "com.intel.ai", [](const onnx_import::Node& node) -> OutputVector { OutputVector ng_inputs{node.get_ng_inputs()}; - return {std::make_shared(ng_inputs.at(0), ng_inputs.at(1))}; + return {std::make_shared(ng_inputs.at(0), ng_inputs.at(1))}; }); auto function = onnx_import::import_onnx_model( @@ -312,7 +312,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_custom_op_default_domain) onnx_import::register_operator( "AddQ", 1, "com.intel.ai", [](const onnx_import::Node& node) -> OutputVector { OutputVector ng_inputs{node.get_ng_inputs()}; - return {std::make_shared(ng_inputs.at(0), ng_inputs.at(1))}; + return {std::make_shared(ng_inputs.at(0), ng_inputs.at(1))}; }); auto function = onnx_import::import_onnx_model( @@ -350,7 +350,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_is_op_supported) onnx_import::register_operator( "AddQ", 1, "com.intel.ai", [](const onnx_import::Node& node) -> OutputVector { OutputVector ng_inputs{node.get_ng_inputs()}; - return {std::make_shared(ng_inputs.at(0), ng_inputs.at(1))}; + return {std::make_shared(ng_inputs.at(0), ng_inputs.at(1))}; }); EXPECT_TRUE(onnx_import::is_operator_supported("AddQ", 1, "com.intel.ai")); } @@ -360,7 +360,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_missing_op_domain) onnx_import::register_operator( "CustomAdd", 1, "custom.op", [](const onnx_import::Node& node) -> OutputVector { OutputVector ng_inputs{node.get_ng_inputs()}; - return {std::make_shared(ng_inputs.at(0), ng_inputs.at(1))}; + return {std::make_shared(ng_inputs.at(0), ng_inputs.at(1))}; }); EXPECT_TRUE(onnx_import::is_operator_supported("CustomAdd", 1, "custom.op")); @@ -412,13 +412,13 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_missing_input) Output B = ng_inputs.at(1); Output C = ng_inputs.at(2); - A = A * C; + A = std::make_shared(A, C); if (!ngraph::op::is_null(B)) { - B = B / C; + B = std::make_shared(B, C); } - C = C + C; + C = std::make_shared(C, C); return {A, B, C}; }); @@ -432,7 +432,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_missing_input) { if (!ngraph::op::is_null(ng_input)) { - result = ng_input * result; + result = std::make_shared(ng_input, result); } } diff --git a/ngraph/test/onnx/onnx_import_provenance.in.cpp b/ngraph/test/onnx/onnx_import_provenance.in.cpp index 222af22be8c8a6..b06f75857d4815 100644 --- a/ngraph/test/onnx/onnx_import_provenance.in.cpp +++ b/ngraph/test/onnx/onnx_import_provenance.in.cpp @@ -20,9 +20,6 @@ #include "ngraph/provenance.hpp" #include "onnx_import/default_opset.hpp" #include "onnx_import/onnx.hpp" -#include "opset0.hpp" -#include "pass/opset0_downgrade.hpp" -#include "pass/opset1_downgrade.hpp" #include "util/provenance_enabler.hpp" #include "util/test_control.hpp" #include "util/type_prop.hpp" @@ -115,21 +112,3 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_provenance_tagging_parameters) file_util::path_join(SERIALIZED_ZOO, "onnx/provenance_input_tags.prototxt")); test_provenance_tags(function, ""); } - -NGRAPH_SUPPRESS_DEPRECATED_START - -NGRAPH_TEST(${BACKEND_NAME}, onnx_provenance_tag_downgrade_pass) -{ - test::ProvenanceEnabler provenance_enabler; - - const auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/provenance_downgrade_topk.prototxt")); - - ngraph::pass::Manager pass_manager; - pass_manager.register_pass(); - pass_manager.register_pass(); - pass_manager.run_passes(function); - - test_provenance_tags(function, " values, indices)>"); - test_provenance_tags(function, ""); -} diff --git a/ngraph/test/onnx/onnx_import_quant.in.cpp b/ngraph/test/onnx/onnx_import_quant.in.cpp index 910905aa24bb9b..9af8f29b83788e 100644 --- a/ngraph/test/onnx/onnx_import_quant.in.cpp +++ b/ngraph/test/onnx/onnx_import_quant.in.cpp @@ -307,27 +307,6 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_quant_conv_linear_3d) test_case.run(); } -NGRAPH_TEST(${BACKEND_NAME}, onnx_model_qlinear_matmul) -{ - auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/qlinear_matmul.prototxt")); - - auto test_case = test::TestCase(function); - - test_case.add_input(std::vector{208, 236, 0, 238, 3, 214, 255, 29}); // T1 - test_case.add_input(std::vector{0.0066f}); // a_scale - test_case.add_input(std::vector{113}); // a_zero_point - test_case.add_input( - std::vector{152, 51, 244, 60, 26, 255, 0, 127, 246, 127, 254, 247}); // T2 - test_case.add_input(std::vector{0.00705f}); // b_scale - test_case.add_input(std::vector{114}); // b_zero_point - test_case.add_input(std::vector{0.0107f}); // y_scale - test_case.add_input(std::vector{118}); // y_zero_point - - test_case.add_expected_output({2, 3}, std::vector{168, 115, 255, 1, 66, 151}); // T3 - test_case.run(); -} - NGRAPH_TEST(${BACKEND_NAME}, onnx_model_qlinear_matmul_3d) { auto function = onnx_import::import_onnx_model( @@ -410,170 +389,6 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_conv_integer_pads) test_case.run(); } -NGRAPH_TEST(${BACKEND_NAME}, onnx_model_matmul_integer) -{ - auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/matmul_integer.prototxt")); - auto test_case = test::TestCase(function); - - test_case.add_input(std::vector{11, 7, 3, 10, 6, 2, 9, 5, 1, 8, 4, 0}); // a - test_case.add_input(std::vector{1, 4, 2, 5, 3, 6}); // b - test_case.add_input(std::vector{12}); // a_zero_point - test_case.add_input(std::vector{0}); // b_zero_point - - test_case.add_expected_output( - {4, 2}, std::vector{-38, -83, -44, -98, -50, -113, -56, -128}); // y - test_case.run(); -} - -NGRAPH_TEST(${BACKEND_NAME}, onnx_model_matmul_integer_zero_point_zero) -{ - auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/matmul_integer.prototxt")); - auto test_case = test::TestCase(function); - - test_case.add_input(std::vector{11, 7, 3, 10, 6, 2, 9, 5, 1, 8, 4, 0}); // a - test_case.add_input(std::vector{1, 4, 2, 5, 3, 6}); // b - test_case.add_input(std::vector{0}); // a_zero_point - test_case.add_input(std::vector{0}); // b_zero_point - - test_case.add_expected_output({4, 2}, - std::vector{34, 97, 28, 82, 22, 67, 16, 52}); // y - test_case.run(); -} - -NGRAPH_TEST(${BACKEND_NAME}, onnx_model_matmul_integer_no_zero_point) -{ - auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/matmul_integer_no_zero_point.prototxt")); - auto test_case = test::TestCase(function); - - test_case.add_input(std::vector{11, 7, 3, 10, 6, 2, 9, 5, 1, 8, 4, 0}); // a - test_case.add_input(std::vector{1, 4, 2, 5, 3, 6}); // b - - test_case.add_expected_output({4, 2}, - std::vector{34, 97, 28, 82, 22, 67, 16, 52}); // y - test_case.run(); -} - -NGRAPH_TEST(${BACKEND_NAME}, onnx_model_matmul_integer_scalar) -{ - auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/matmul_integer_scalar.prototxt")); - auto test_case = test::TestCase(function); - - test_case.add_input(std::vector{11}); // a - test_case.add_input(std::vector{13}); // b - test_case.add_input(std::vector{12}); // a_zero_point - test_case.add_input(std::vector{12}); // b_zero_point - - test_case.add_expected_output({1, 1}, std::vector{-1}); // y - test_case.run(); -} - -NGRAPH_TEST(${BACKEND_NAME}, onnx_model_matmul_integer_4d) -{ - auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/matmul_integer_4d.prototxt")); - auto test_case = test::TestCase(function); - - test_case.add_input(std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23}); // a - test_case.add_input(std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23}); // b - test_case.add_input(std::vector{0}); // a_zero_point - test_case.add_input(std::vector{0}); // b_zero_point - - test_case.add_expected_output(Shape{1, 2, 3, 3}, - {42, - 48, - 54, - 114, - 136, - 158, - 186, - 224, - 262, - 906, - 960, - 1014, - 1170, - 1240, - 1310, - 1434, - 1520, - 1606}); // y - test_case.run(); -} - -NGRAPH_TEST(${BACKEND_NAME}, onnx_model_matmul_integer_4d_zero_point) -{ - auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/matmul_integer_4d.prototxt")); - auto test_case = test::TestCase(function); - - test_case.add_input(std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23}); // a - test_case.add_input(std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23}); // b - test_case.add_input(std::vector{1}); // a_zero_point - test_case.add_input(std::vector{1}); // b_zero_point - - test_case.add_expected_output(Shape{1, 2, 3, 3}, - {22, - 24, - 26, - 78, - 96, - 114, - 134, - 168, - 202, - 790, - 840, - 890, - 1038, - 1104, - 1170, - 1286, - 1368, - 1450}); // y - test_case.run(); -} - -NGRAPH_TEST(${BACKEND_NAME}, onnx_model_matmul_integer_4d_no_zero_point) -{ - auto function = onnx_import::import_onnx_model( - file_util::path_join(SERIALIZED_ZOO, "onnx/matmul_integer_4d_no_zero_point.prototxt")); - auto test_case = test::TestCase(function); - - test_case.add_input(std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23}); // a - test_case.add_input(std::vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23}); // b - - test_case.add_expected_output(Shape{1, 2, 3, 3}, - {42, - 48, - 54, - 114, - 136, - 158, - 186, - 224, - 262, - 906, - 960, - 1014, - 1170, - 1240, - 1310, - 1434, - 1520, - 1606}); // y - test_case.run(); -} - NGRAPH_TEST(${BACKEND_NAME}, onnx_model_fake_quantize_import_only) { const auto function = onnx_import::import_onnx_model(file_util::path_join( diff --git a/ngraph/test/op.cpp b/ngraph/test/op.cpp index 380b177125d395..ffc92ea124c3a3 100644 --- a/ngraph/test/op.cpp +++ b/ngraph/test/op.cpp @@ -42,7 +42,7 @@ TEST(op, is_parameter) { auto arg0 = make_shared(element::Type_t::f32, Shape{1}); ASSERT_NE(nullptr, arg0); - auto t0 = make_shared(arg0, arg0); + auto t0 = make_shared(arg0, arg0); ASSERT_NE(nullptr, t0); EXPECT_FALSE(op::is_parameter(t0)); } diff --git a/ngraph/test/op_is.cpp b/ngraph/test/op_is.cpp index f8a6bf1f8bf8c5..ce65d59cc7e6ad 100644 --- a/ngraph/test/op_is.cpp +++ b/ngraph/test/op_is.cpp @@ -47,15 +47,6 @@ namespace EXPECT_FALSE(op::is_binary_elementwise_logical(&node)); } - void op_is_Add() - { - op::Add node; - EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node)); - EXPECT_TRUE(op::is_binary_elementwise_arithmetic(&node)); - EXPECT_FALSE(op::is_binary_elementwise_comparison(&node)); - EXPECT_FALSE(op::is_binary_elementwise_logical(&node)); - } - void op_is_Asin() { op::Asin node; @@ -200,15 +191,6 @@ namespace EXPECT_FALSE(op::is_binary_elementwise_logical(&node)); } - void op_is_Divide() - { - op::Divide node; - EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node)); - EXPECT_TRUE(op::is_binary_elementwise_arithmetic(&node)); - EXPECT_FALSE(op::is_binary_elementwise_comparison(&node)); - EXPECT_FALSE(op::is_binary_elementwise_logical(&node)); - } - void op_is_Elu() { op::Elu node; @@ -245,15 +227,6 @@ namespace EXPECT_FALSE(op::is_binary_elementwise_logical(&node)); } - void op_is_Equal() - { - op::Equal node; - EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node)); - EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node)); - EXPECT_TRUE(op::is_binary_elementwise_comparison(&node)); - EXPECT_FALSE(op::is_binary_elementwise_logical(&node)); - } - void op_is_Erf() { op::Erf node; @@ -344,24 +317,6 @@ namespace EXPECT_FALSE(op::is_binary_elementwise_logical(&node)); } - void op_is_Greater() - { - op::Greater node; - EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node)); - EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node)); - EXPECT_TRUE(op::is_binary_elementwise_comparison(&node)); - EXPECT_FALSE(op::is_binary_elementwise_logical(&node)); - } - - void op_is_GreaterEq() - { - op::GreaterEq node; - EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node)); - EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node)); - EXPECT_TRUE(op::is_binary_elementwise_comparison(&node)); - EXPECT_FALSE(op::is_binary_elementwise_logical(&node)); - } - void op_is_GroupConvolution() { op::v0::GroupConvolution node; @@ -398,24 +353,6 @@ namespace EXPECT_FALSE(op::is_binary_elementwise_logical(&node)); } - void op_is_Less() - { - op::Less node; - EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node)); - EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node)); - EXPECT_TRUE(op::is_binary_elementwise_comparison(&node)); - EXPECT_FALSE(op::is_binary_elementwise_logical(&node)); - } - - void op_is_LessEq() - { - op::LessEq node; - EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node)); - EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node)); - EXPECT_TRUE(op::is_binary_elementwise_comparison(&node)); - EXPECT_FALSE(op::is_binary_elementwise_logical(&node)); - } - void op_is_Log() { op::Log node; @@ -470,38 +407,20 @@ namespace EXPECT_FALSE(op::is_binary_elementwise_logical(&node)); } - void op_is_NormalizeL2() - { - op::NormalizeL2 node; - EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node)); - EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node)); - EXPECT_FALSE(op::is_binary_elementwise_comparison(&node)); - EXPECT_FALSE(op::is_binary_elementwise_logical(&node)); - } - - void op_is_Maximum() - { - op::Maximum node; - EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node)); - EXPECT_TRUE(op::is_binary_elementwise_arithmetic(&node)); - EXPECT_FALSE(op::is_binary_elementwise_comparison(&node)); - EXPECT_FALSE(op::is_binary_elementwise_logical(&node)); - } - - void op_is_Minimum() + void op_is_Multiply() { - op::Minimum node; + op::v0::Multiply node; EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node)); EXPECT_TRUE(op::is_binary_elementwise_arithmetic(&node)); EXPECT_FALSE(op::is_binary_elementwise_comparison(&node)); EXPECT_FALSE(op::is_binary_elementwise_logical(&node)); } - void op_is_Multiply() + void op_is_NormalizeL2() { - op::Multiply node; + op::NormalizeL2 node; EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node)); - EXPECT_TRUE(op::is_binary_elementwise_arithmetic(&node)); + EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node)); EXPECT_FALSE(op::is_binary_elementwise_comparison(&node)); EXPECT_FALSE(op::is_binary_elementwise_logical(&node)); } @@ -524,15 +443,6 @@ namespace EXPECT_FALSE(op::is_binary_elementwise_logical(&node)); } - void op_is_NotEqual() - { - op::NotEqual node; - EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node)); - EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node)); - EXPECT_TRUE(op::is_binary_elementwise_comparison(&node)); - EXPECT_FALSE(op::is_binary_elementwise_logical(&node)); - } - void op_is_OneHot() { op::v1::OneHot node; @@ -551,15 +461,6 @@ namespace EXPECT_FALSE(op::is_binary_elementwise_logical(&node)); } - void op_is_Power() - { - op::Power node; - EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node)); - EXPECT_TRUE(op::is_binary_elementwise_arithmetic(&node)); - EXPECT_FALSE(op::is_binary_elementwise_comparison(&node)); - EXPECT_FALSE(op::is_binary_elementwise_logical(&node)); - } - void op_is_PRelu() { op::PRelu node; @@ -677,15 +578,6 @@ namespace EXPECT_FALSE(op::is_binary_elementwise_logical(&node)); } - void op_is_Select() - { - op::Select node; - EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node)); - EXPECT_FALSE(op::is_binary_elementwise_arithmetic(&node)); - EXPECT_FALSE(op::is_binary_elementwise_comparison(&node)); - EXPECT_FALSE(op::is_binary_elementwise_logical(&node)); - } - void op_is_Selu() { op::Selu node; @@ -803,15 +695,6 @@ namespace EXPECT_FALSE(op::is_binary_elementwise_logical(&node)); } - void op_is_Subtract() - { - op::Subtract node; - EXPECT_FALSE(op::is_unary_elementwise_arithmetic(&node)); - EXPECT_TRUE(op::is_binary_elementwise_arithmetic(&node)); - EXPECT_FALSE(op::is_binary_elementwise_comparison(&node)); - EXPECT_FALSE(op::is_binary_elementwise_logical(&node)); - } - void op_is_Tan() { op::Tan node; diff --git a/ngraph/test/pass_shape_relevance.cpp b/ngraph/test/pass_shape_relevance.cpp index 18be6e268a3d2c..66568d0b83914d 100644 --- a/ngraph/test/pass_shape_relevance.cpp +++ b/ngraph/test/pass_shape_relevance.cpp @@ -34,7 +34,7 @@ TEST(shape_relevance, simple) { auto param0 = make_shared(element::Type_t::f32, Shape{4, 6}); auto param1 = make_shared(element::Type_t::f32, Shape{4, 6}); - auto x = make_shared(param0, param1); + auto x = make_shared(param0, param1); auto f = make_shared(x, ParameterVector{param0, param1}); diff --git a/ngraph/test/pattern.cpp b/ngraph/test/pattern.cpp index 0ee8871b3b283d..3f862603896c37 100644 --- a/ngraph/test/pattern.cpp +++ b/ngraph/test/pattern.cpp @@ -60,15 +60,15 @@ static std::shared_ptr construct_variance_graph() // construct varaiance auto N = op::Constant::create(element::Type_t::f32, Shape{3}, {2, 2, 2}); auto input = std::make_shared(element::Type_t::f32, Shape{2, 3}); - auto input_sq = std::make_shared(input, input); + auto input_sq = std::make_shared(input, input); auto sum_input = std::make_shared( input, op::Constant::create(element::Type_t::i64, {1}, {0})); - auto square_sumed_input = std::make_shared(sum_input, sum_input); + auto square_sumed_input = std::make_shared(sum_input, sum_input); auto sum_squared_input = std::make_shared( input_sq, op::Constant::create(element::Type_t::i64, {1}, {0})); - auto avg_input_sum_sq = std::make_shared(square_sumed_input, N); - auto xmu = std::make_shared(sum_squared_input, avg_input_sum_sq); - auto variance = std::make_shared(xmu, N); + auto avg_input_sum_sq = std::make_shared(square_sumed_input, N); + auto xmu = std::make_shared(sum_squared_input, avg_input_sum_sq); + auto variance = std::make_shared(xmu, N); auto variance_label = std::make_shared(variance, nullptr, NodeVector{variance}); @@ -82,7 +82,7 @@ static std::shared_ptr construct_mean_graph() auto N = op::Constant::create(element::Type_t::f32, Shape{3}, {2, 2, 2}); auto sum_input1 = std::make_shared( input, op::Constant::create(element::Type_t::i64, {1}, {0})); - auto mean = std::make_shared(sum_input1, N); + auto mean = std::make_shared(sum_input1, N); auto mean_label = std::make_shared(mean, nullptr, NodeVector{mean}); return mean_label; } @@ -133,7 +133,7 @@ class TestGraphRewrite : public ngraph::pass::GraphRewrite return true; }; - auto m = make_shared(pattern * iconst1); + auto m = make_shared(make_shared(pattern, iconst1)); NGRAPH_SUPPRESS_DEPRECATED_START this->add_matcher(m, callback); NGRAPH_SUPPRESS_DEPRECATED_END @@ -182,7 +182,7 @@ class TestGraphRewrite : public ngraph::pass::GraphRewrite return true; }; - auto add = pattern + iconst0; + auto add = make_shared(pattern, iconst0); auto m = make_shared(add); NGRAPH_SUPPRESS_DEPRECATED_START this->add_matcher(m, callback); @@ -216,8 +216,8 @@ TEST(pattern, graph_rewrite) auto b = make_shared(element::Type_t::i32, shape); auto c = make_shared(element::Type_t::i32, shape); auto iconst0 = construct_constant_node(0); - auto graph_a = a + iconst0; - auto graph_b = b + iconst0; + auto graph_a = make_shared(a, iconst0); + auto graph_b = make_shared(b, iconst0); auto f = std::make_shared(ngraph::NodeVector{a, b, graph_a, c, graph_b}, ParameterVector{a, b, c}); @@ -227,15 +227,15 @@ TEST(pattern, graph_rewrite) ASSERT_TRUE(graph_b->get_output_target_inputs(0).empty()); auto expected = ngraph::NodeVector{a, b, a, c, b}; - ASSERT_TRUE(count_ops_of_type(f) == 0); + ASSERT_TRUE(count_ops_of_type(f) == 0); } { auto a = make_shared(element::Type_t::i32, shape); auto b = make_shared(element::Type_t::i32, shape); auto iconst0 = construct_constant_node(0); - auto sum = (a + iconst0); - auto graph = b + sum; + auto sum = make_shared(a, iconst0); + auto graph = make_shared(b, sum); run_passes(pass_manager, graph, {a, b}); ASSERT_EQ(graph->input_value(1).get_node_shared_ptr(), a); ASSERT_EQ(graph->input_value(1), a->output(0)); // graph's input points to a's output @@ -250,8 +250,8 @@ TEST(pattern, graph_rewrite) auto a = make_shared(element::Type_t::i32, shape); auto b = make_shared(element::Type_t::i32, shape); auto iconst1 = construct_constant_node(1); - auto mul = (a * iconst1); - auto graph = b + mul; + auto mul = make_shared(a, iconst1); + auto graph = make_shared(b, mul); run_passes(pass_manager, graph, {a, b}); ASSERT_EQ(graph->input_value(1).get_node_shared_ptr(), a); ASSERT_EQ(graph->input_value(1), a->output(0)); // graph's input points to a's output @@ -266,7 +266,11 @@ TEST(pattern, graph_rewrite) auto a = make_shared(element::Type_t::i32, shape); auto b = make_shared(element::Type_t::i32, shape); auto iconst1 = construct_constant_node(1); - auto graph = ((((a * iconst1) * iconst1) * iconst1) * iconst1) + b; + auto multiply = + make_shared(make_shared(a, iconst1), iconst1); + multiply = make_shared(make_shared(multiply, iconst1), + iconst1); + auto graph = make_shared(multiply, b); run_passes(pass_manager, graph, {a, b}); ASSERT_EQ(graph->input_value(0).get_node_shared_ptr(), a); ASSERT_EQ(graph->input_value(0), a->output(0)); // graph's input points to a's output @@ -279,7 +283,8 @@ TEST(pattern, graph_rewrite) auto b = make_shared(element::Type_t::i32, shape); auto iconst0 = construct_constant_node(0); auto iconst1 = construct_constant_node(1); - auto graph = b + (iconst0 + ((a + iconst0) * iconst1)); + auto mul = make_shared(make_shared(a, iconst0), iconst1); + auto graph = make_shared(b, make_shared(iconst0, mul)); run_passes(pass_manager, graph, {a, b}); ASSERT_EQ(graph->input_value(1).get_node_shared_ptr(), a); ASSERT_EQ(graph->input_value(1), a->output(0)); // graph's input points to a's output @@ -291,7 +296,10 @@ TEST(pattern, graph_rewrite) auto a = make_shared(element::Type_t::i32, shape); auto b = make_shared(element::Type_t::i32, shape); auto iconst1 = construct_constant_node(1); - auto graph = b + (iconst1 * (iconst1 * (iconst1 * (iconst1 * a)))); + auto mul = + make_shared(iconst1, make_shared(iconst1, a)); + mul = make_shared(iconst1, make_shared(iconst1, mul)); + auto graph = make_shared(b, mul); run_passes(pass_manager, graph, {a, b}); ASSERT_EQ(graph->input_value(1).get_node_shared_ptr(), a); ASSERT_EQ(graph->input_value(1), a->output(0)); // graph's input points to a's output @@ -333,19 +341,19 @@ TEST(pattern, matcher) return op::is_binary_elementwise_arithmetic(node); }; auto bea = std::make_shared(a, is_bea, NodeVector{a, b}); - auto add_ab = a + b; + auto add_ab = std::make_shared(a, b); ASSERT_TRUE(n.match(bea, add_ab)); ASSERT_EQ(n.get_matched_nodes(), (NodeVector{add_ab, a, b})); - ASSERT_TRUE(n.match(bea, b + a)); + ASSERT_TRUE(n.match(bea, std::make_shared(b, a))); auto bea_false = std::make_shared(a, false_pred, NodeVector{a, b}); - ASSERT_FALSE(n.match(bea_false, a + b)); + ASSERT_FALSE(n.match(bea_false, std::make_shared(a, b))); - auto add_abs_b = abs + b; + auto add_abs_b = std::make_shared(abs, b); auto bea_any_of = std::make_shared(a, is_bea, NodeVector{abs}); ASSERT_TRUE(n.match(bea_any_of, add_abs_b)); - auto add_b_abs = b + abs; + auto add_b_abs = std::make_shared(b, abs); ASSERT_TRUE(n.match(bea_any_of, add_b_abs)); auto bea_any_of_label = @@ -359,102 +367,125 @@ TEST(pattern, matcher) ASSERT_EQ(n.get_pattern_map()[abs_label], abs); auto bea_label = std::make_shared(a, nullptr, NodeVector{bea}); - auto ab = a + b; + auto ab = std::make_shared(a, b); ASSERT_TRUE(n.match(bea_label, ab)); ASSERT_EQ(n.get_pattern_map()[bea_label], ab); auto d = make_shared(element::Type_t::i32, shape); ASSERT_FALSE(n.match(d, b)); - ASSERT_FALSE(n.match(abs + b, b + b)); + ASSERT_FALSE( + n.match(std::make_shared(abs, b), std::make_shared(b, b))); ASSERT_EQ(n.get_matched_nodes(), (NodeVector{})); - auto add_absb = abs + b; - ASSERT_TRUE(n.match(any + b, add_absb)); + auto add_absb = std::make_shared(abs, b); + ASSERT_TRUE(n.match(std::make_shared(any, b), add_absb)); ASSERT_EQ(n.get_matched_nodes(), (NodeVector{add_absb, abs, a, b})); - ASSERT_TRUE(n.match(pattern + b, add_absb)); + ASSERT_TRUE(n.match(std::make_shared(pattern, b), add_absb)); ASSERT_EQ(n.get_pattern_map()[pattern], abs); ASSERT_EQ(n.get_matched_nodes(), (NodeVector{add_absb, abs, b})); - ASSERT_TRUE(n.match(b + pattern, add_absb)); + ASSERT_TRUE(n.match(std::make_shared(b, pattern), add_absb)); ASSERT_EQ(n.get_pattern_map()[pattern], abs); ASSERT_EQ(n.get_matched_nodes(), (NodeVector{add_absb, abs, b})); auto c = make_shared(element::Type_t::i32, shape); - auto mul_add_absb = c * (add_absb); - ASSERT_TRUE(n.match(c * (b + pattern), mul_add_absb)); + auto mul_add_absb = std::make_shared(c, add_absb); + ASSERT_TRUE( + n.match(std::make_shared(c, std::make_shared(b, pattern)), + mul_add_absb)); ASSERT_EQ(n.get_pattern_map()[pattern], abs); ASSERT_EQ(n.get_matched_nodes(), (NodeVector{mul_add_absb, c, add_absb, abs, b})); - ASSERT_TRUE(n.match(c * (any + b), mul_add_absb)); // nested any + ASSERT_TRUE( + n.match(std::make_shared(c, std::make_shared(any, b)), + mul_add_absb)); // nested any ASSERT_EQ(n.get_matched_nodes(), (NodeVector{mul_add_absb, c, add_absb, abs, a, b})); - ASSERT_TRUE(n.match(c * (any + b), (b + abs) * c)); // permutations w/ any - auto mul_c_add_ab = c * add_ab; - ASSERT_TRUE(n.match(c * (any_false + b), c * (a + b))); // nested any - ASSERT_TRUE(n.match(c * (any_false + b), mul_c_add_ab)); // permutations w/ any_false + ASSERT_TRUE( + n.match(std::make_shared(c, std::make_shared(any, b)), + std::make_shared(std::make_shared(b, abs), + c))); // permutations w/ any + auto mul_c_add_ab = make_shared(c, add_ab); + ASSERT_TRUE( + n.match(std::make_shared(c, std::make_shared(any_false, b)), + std::make_shared(c, std::make_shared(a, b)))); // + // nested any + ASSERT_TRUE( + n.match(std::make_shared(c, std::make_shared(any_false, b)), + mul_c_add_ab)); // permutations w/ any_false ASSERT_EQ(n.get_matched_nodes(), (NodeVector{mul_c_add_ab, c, add_ab, a, a, b})); auto iconst1_0 = construct_constant_node(1); auto iconst1_1 = construct_constant_node(1); - ASSERT_TRUE(n.match(pattern * iconst1_0, a * iconst1_1)); // different iconst + ASSERT_TRUE(n.match(make_shared(pattern, iconst1_0), + make_shared(a, iconst1_1))); // different iconst ASSERT_EQ(n.get_pattern_map()[pattern], a); auto fconst1_0 = op::Constant::create(element::Type_t::f32, shape, {1}); auto patternf = std::make_shared(fconst1_0); - ASSERT_TRUE(n.match(patternf * fconst1_0, a * iconst1_1)); // different iconst + ASSERT_TRUE(n.match(make_shared(patternf, fconst1_0), + make_shared(a, iconst1_1))); // different iconst // Subgraph labels - auto add = a + b; + auto add = std::make_shared(a, b); auto label = std::make_shared(add, nullptr, NodeVector{add}); ASSERT_TRUE(n.match(label, add)); ASSERT_EQ(n.get_pattern_map()[label], add); ASSERT_EQ(n.get_matched_nodes(), (NodeVector{add, add, a, b})); - ASSERT_FALSE(n.match(label, a - b)); + ASSERT_FALSE(n.match(label, std::make_shared(a, b))); ASSERT_TRUE(n.match(make_shared(label), make_shared(add))); ASSERT_EQ(n.get_pattern_map()[label], add); // Correct argument order - ASSERT_FALSE(n.match(b - a, a - b)); - auto aab = a * (a - b); - auto paab = pattern * (pattern - b); + ASSERT_FALSE(n.match(make_shared(b, a), make_shared(a, b))); + auto aab = make_shared(a, make_shared(a, b)); + auto paab = make_shared(pattern, make_shared(pattern, b)); ASSERT_TRUE(n.match(paab, aab)); - auto aba = a * (b - a); + auto aba = make_shared(a, make_shared(b, a)); ASSERT_FALSE(n.match(paab, aba)); - auto paba = pattern * (b - pattern); + auto paba = make_shared(pattern, make_shared(b, pattern)); ASSERT_FALSE(n.match(paba, aab)); // Correlations auto label1 = std::make_shared(a); - auto tmp = label1 + b; + auto tmp = std::make_shared(label1, b); auto label2 = std::make_shared(tmp, nullptr, NodeVector{tmp}); - auto sub_label1 = label1 - label2; - auto sub_add = a - add; + auto sub_label1 = std::make_shared(label1, label2); + auto sub_add = std::make_shared(a, add); ASSERT_TRUE(n.match(sub_label1, sub_add)); ASSERT_EQ(n.get_pattern_map()[label1], a); ASSERT_EQ(n.get_pattern_map()[label2], add); ASSERT_EQ(n.get_matched_nodes(), (NodeVector{sub_add, a, add, add, a, b})); - ASSERT_FALSE(n.match(sub_label1, add - a)); + ASSERT_FALSE(n.match(sub_label1, std::make_shared(add, a))); - auto add_label1 = label1 + label2; - ASSERT_TRUE(n.match(add_label1, add + a)); + auto add_label1 = std::make_shared(label1, label2); + ASSERT_TRUE(n.match(add_label1, std::make_shared(add, a))); ASSERT_EQ(n.get_pattern_map()[label1], a); ASSERT_EQ(n.get_pattern_map()[label2], add); // Or - ASSERT_TRUE(n.match(std::make_shared(OutputVector{a + b, a - b}), a + b)); - ASSERT_TRUE(n.match(std::make_shared(OutputVector{a + b, a - b}), a - b)); + ASSERT_TRUE( + n.match(std::make_shared(OutputVector{ + std::make_shared(a, b), std::make_shared(a, b)}), + std::make_shared(a, b))); + ASSERT_TRUE( + n.match(std::make_shared(OutputVector{ + std::make_shared(a, b), std::make_shared(a, b)}), + std::make_shared(a, b))); // Branch { auto branch = std::make_shared(); auto star = std::make_shared( OutputVector{branch, std::make_shared()}); - auto pattern = star + star; + auto pattern = std::make_shared(star, star); branch->set_destination(pattern); - ASSERT_TRUE(n.match(pattern, ((a + b) + (b + a) + a))); + auto arg = std::make_shared(std::make_shared(a, b), + std::make_shared(b, a)); + ASSERT_TRUE(n.match(pattern, std::make_shared(arg, a))); ASSERT_EQ(n.get_matched_nodes().size(), 4); } @@ -491,7 +522,7 @@ TEST(pattern, mean) auto N = op::Constant::create(element::Type_t::f32, Shape{3}, {2, 2, 2}); auto sum_input1 = std::make_shared( input, op::Constant::create(element::Type_t::i64, {1}, {0})); - auto mean = std::make_shared(sum_input1, N); + auto mean = std::make_shared(sum_input1, N); auto mean_graph = construct_mean_graph(); ASSERT_TRUE(n.match(mean_graph, mean)); @@ -504,15 +535,15 @@ TEST(pattern, variance) TestMatcher n; auto N = op::Constant::create(element::Type_t::f32, Shape{3}, {2, 2, 2}); auto input = std::make_shared(element::Type_t::f32, Shape{2, 3}); - auto input_sq = std::make_shared(input, input); + auto input_sq = std::make_shared(input, input); auto sum_input = std::make_shared( input, op::Constant::create(element::Type_t::i64, {1}, {0})); - auto square_sumed_input = std::make_shared(sum_input, sum_input); + auto square_sumed_input = std::make_shared(sum_input, sum_input); auto sum_squared_input = std::make_shared( input_sq, op::Constant::create(element::Type_t::i64, {1}, {0})); - auto avg_input_sum_sq = std::make_shared(square_sumed_input, N); - auto xmu = std::make_shared(sum_squared_input, avg_input_sum_sq); - auto variance = std::make_shared(xmu, N); + auto avg_input_sum_sq = std::make_shared(square_sumed_input, N); + auto xmu = std::make_shared(sum_squared_input, avg_input_sum_sq); + auto variance = std::make_shared(xmu, N); auto var_graph = construct_variance_graph(); ASSERT_TRUE(n.match(var_graph, variance)); @@ -528,15 +559,15 @@ TEST(pattern, previous_matches) auto b = make_shared(element::Type_t::i32, shape); auto pattern = std::make_shared(b); auto abs = make_shared(a); - auto add = abs + b; + auto add = make_shared(abs, b); { - Matcher n(pattern + b); + Matcher n(make_shared(pattern, b)); ASSERT_TRUE(n.match(add, previous_matches)); ASSERT_EQ(n.get_pattern_map()[pattern], abs); } { - Matcher n(pattern + b); + Matcher n(make_shared(pattern, b)); previous_matches.insert(std::make_pair(pattern, a)); ASSERT_FALSE(n.match(add, previous_matches)); } @@ -551,14 +582,14 @@ TEST(pattern, test_sort) auto b = make_shared(element::Type_t::i32, shape); auto abs1 = make_shared(a); auto abs2 = make_shared(b); - auto add = abs1 + abs2; + shared_ptr add = make_shared(abs1, abs2); auto pa = make_shared(element::Type_t::i32, shape); auto pb = make_shared(element::Type_t::i32, shape); auto pabs1 = make_shared(pa); auto pabs1_label = std::make_shared(pabs1); auto pabs2 = make_shared(b); - auto padd = pabs1_label + pabs2; + shared_ptr padd = make_shared(pabs1_label, pabs2); { Matcher n1(padd); @@ -579,10 +610,10 @@ TEST(pattern, recurrent_pattern) auto rpattern = std::make_shared(b); auto iconst0 = construct_constant_node(0); auto abs = make_shared(a); - auto add1 = iconst0 + b; - auto add2 = iconst0 + add1; - auto add3 = iconst0 + add2; - auto padd = iconst0 + rpattern; + auto add1 = make_shared(iconst0, b); + auto add2 = make_shared(iconst0, add1); + auto add3 = make_shared(iconst0, add2); + auto padd = make_shared(iconst0, rpattern); std::set> empty_correlated_matches; RecurrentMatcher rm(padd, rpattern, empty_correlated_matches); ASSERT_TRUE(rm.match(add3)); @@ -595,9 +626,9 @@ TEST(pattern, recurrent_pattern) // Multiple labels in a reccuring pattern auto iconst1 = construct_constant_node(1); auto iconst_label = std::make_shared(iconst1, nullptr, NodeVector{iconst1}); - auto add2_2 = iconst1 + add1; - auto add3_2 = iconst0 + add2_2; - auto padd2 = iconst_label + rpattern; + auto add2_2 = make_shared(iconst1, add1); + auto add3_2 = make_shared(iconst0, add2_2); + auto padd2 = make_shared(iconst_label, rpattern); RecurrentMatcher rm2(padd2, rpattern, empty_correlated_matches); ASSERT_TRUE(rm2.match(add3_2)); ASSERT_EQ(rm2.get_number_of_bound_labels(), 4); @@ -644,7 +675,7 @@ class TestRecurrentGraphRewrite : public ngraph::pass::RecurrentGraphRewrite auto iconst_label = std::make_shared(iconst0, nullptr, NodeVector{iconst0}); auto rpattern = std::make_shared(element::Type_t::i32, shape); - auto padd = iconst_label + rpattern; + auto padd = make_shared(iconst_label, rpattern); auto callback = [iconst_label, rpattern](pattern::RecurrentMatcher& rm) { NGRAPH_DEBUG << "In a callback for construct_recurrent_add against " @@ -699,17 +730,17 @@ TEST(pattern, recurrent_graph_rewrite) { auto a = make_shared(element::Type_t::i32, shape); auto iconst0 = construct_constant_node(0); - auto add_a1 = a + iconst0; - auto add_a2 = add_a1 + iconst0; - auto add_a3 = add_a2 + iconst0; + auto add_a1 = make_shared(a, iconst0); + auto add_a2 = make_shared(add_a1, iconst0); + auto add_a3 = make_shared(add_a2, iconst0); auto abs_add_a3 = std::make_shared(add_a3); auto b = make_shared(element::Type_t::i32, shape); - auto add_b1 = b + iconst0; - auto add_b2 = add_b1 + iconst0; + auto add_b1 = make_shared(b, iconst0); + auto add_b2 = make_shared(add_b1, iconst0); auto abs_add_b2 = std::make_shared(add_b2); - auto graph = abs_add_a3 * abs_add_b2; + auto graph = make_shared(abs_add_a3, abs_add_b2); auto f = std::make_shared(ngraph::NodeVector{graph}, ParameterVector{a, b}); pass_manager.run_passes(f); @@ -744,11 +775,11 @@ TEST(pattern, label_on_skip) OutputVector{const_label, shape_const, axes_const}, bcst_pred); auto bcst_label = std::make_shared(bcst, nullptr, NodeVector{bcst}); auto matcher = std::make_shared( - std::make_shared(label, bcst_label), "label_on_skip"); + std::make_shared(label, bcst_label), "label_on_skip"); auto const_broadcast = make_shared(iconst, shape_const); - auto mul = a * const_broadcast; - auto mul_scalar = b * iconst; + std::shared_ptr mul = std::make_shared(a, const_broadcast); + std::shared_ptr mul_scalar = std::make_shared(b, iconst); ASSERT_TRUE(matcher->match(mul)); ASSERT_EQ(matcher->get_pattern_map()[bcst_label], const_broadcast); ASSERT_EQ(matcher->get_pattern_map()[const_label], iconst); diff --git a/ngraph/test/provenance.cpp b/ngraph/test/provenance.cpp index 6ac66b39b68c8e..62d23911a93b0f 100644 --- a/ngraph/test/provenance.cpp +++ b/ngraph/test/provenance.cpp @@ -28,16 +28,12 @@ #include "ngraph/pass/manager.hpp" #include "ngraph/provenance.hpp" #include "pass/fused_op_decomposition.hpp" -#include "pass/opset0_downgrade.hpp" -#include "pass/opset1_upgrade.hpp" #include "util/provenance_enabler.hpp" using namespace std; using namespace ngraph; using ::testing::Return; -NGRAPH_SUPPRESS_DEPRECATED_START - using ProvSet = std::unordered_set; TEST(provenance, provenance) @@ -72,16 +68,16 @@ TEST(provenance, provenance) auto x = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); auto y = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); - auto a = make_shared(x, y); + auto a = make_shared(x, y); a->add_provenance_tag("tag_a"); - auto b = make_shared(y, x); + auto b = make_shared(y, x); b->add_provenance_tag("tag_b"); - auto c = make_shared(a, b); + auto c = make_shared(a, b); c->add_provenance_tag("tag_c"); auto f = make_shared(c, ParameterVector{x, y}); - auto new_c = make_shared(a, b); + auto new_c = make_shared(a, b); replace_node(c, new_c); EXPECT_EQ(new_c->get_provenance_tags(), ProvSet{"tag_c"}); @@ -117,16 +113,16 @@ TEST(provenance, provenance) auto x = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); auto y = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); - auto a = make_shared(x, y); + auto a = make_shared(x, y); a->add_provenance_tag("tag_a"); - auto b = make_shared(y, x); + auto b = make_shared(y, x); b->add_provenance_tag("tag_b"); - auto c = make_shared(a, b); + auto c = make_shared(a, b); c->add_provenance_tag("tag_c"); auto f = make_shared(c, ParameterVector{x, y}); - auto d = make_shared(a, b); + auto d = make_shared(a, b); d->add_provenance_tag("tag_d"); replace_node(c, d); @@ -155,11 +151,11 @@ TEST(provenance, provenance) auto x = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); auto y = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); - auto a = make_shared(x, y); + auto a = make_shared(x, y); a->add_provenance_tag("tag_a"); - auto b = make_shared(y, x); + auto b = make_shared(y, x); b->add_provenance_tag("tag_b"); - auto c = make_shared(a, b); + auto c = make_shared(a, b); c->add_provenance_tag("tag_c"); auto f = make_shared(c, ParameterVector{x, y}); @@ -193,11 +189,11 @@ TEST(provenance, provenance) auto x = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); auto y = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); - auto a = make_shared(x, y); + auto a = make_shared(x, y); a->add_provenance_tag("tag_a"); - auto b = make_shared(y, x); + auto b = make_shared(y, x); b->add_provenance_tag("tag_b"); - auto c = make_shared(a, b); + auto c = make_shared(a, b); c->add_provenance_tag("tag_c"); auto f = make_shared(c, ParameterVector{x, y}); @@ -240,17 +236,17 @@ TEST(provenance, provenance) auto x = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); auto y = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); - auto a = make_shared(x, y); + auto a = make_shared(x, y); a->add_provenance_tag("tag_a"); - auto b = make_shared(y, x); + auto b = make_shared(y, x); b->add_provenance_tag("tag_b"); - auto c = make_shared(a, b); + auto c = make_shared(a, b); c->add_provenance_tag("tag_c"); auto f = make_shared(c, ParameterVector{x, y}); - auto e = make_shared(a, x); - auto d = make_shared(e, b); + auto e = make_shared(a, x); + auto d = make_shared(e, b); d->add_provenance_tag("tag_d"); replace_node(c, d); @@ -291,18 +287,18 @@ TEST(provenance, provenance) auto x = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); auto y = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); - auto a = make_shared(x, y); + auto a = make_shared(x, y); a->add_provenance_tag("tag_a"); - auto b = make_shared(y, x); + auto b = make_shared(y, x); b->add_provenance_tag("tag_b"); - auto c = make_shared(a, b); + auto c = make_shared(a, b); c->add_provenance_tag("tag_c"); auto f = make_shared(c, ParameterVector{x, y}); - auto e = make_shared(a, x); + auto e = make_shared(a, x); e->add_provenance_tag("tag_e"); - auto d = make_shared(e, b); + auto d = make_shared(e, b); d->add_provenance_tag("tag_d"); replace_node(c, d); @@ -318,8 +314,8 @@ TEST(provenance, add_group_above) p1->add_provenance_tag("P1"); auto p2 = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); p2->add_provenance_tag("P2"); - auto a1 = p1 + p2; - auto m1 = (a1 * a1)->add_provenance_group_members_above({p1, p2}); + auto a1 = make_shared(p1, p2); + auto m1 = make_shared(a1, a1)->add_provenance_group_members_above({p1, p2}); m1->add_provenance_tag("m1"); EXPECT_EQ(p1->get_provenance_tags(), (ProvSet{"P1"})); EXPECT_EQ(p2->get_provenance_tags(), (ProvSet{"P2"})); @@ -332,9 +328,9 @@ TEST(provenance, add_tags_above) auto x = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); auto y = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); - auto a = make_shared(x, y); - auto b = make_shared(x, y); - auto c = make_shared(a, b); + auto a = make_shared(x, y); + auto b = make_shared(x, y); + auto c = make_shared(a, b); auto d = make_shared(c); // Add tags to Subtract and all nodes until Parameters (all above c, until params x, y) @@ -471,90 +467,4 @@ TEST(provenance, empty_group) EXPECT_EQ(node->get_provenance_tags(), (ProvSet{"abs"})); } } -} - -TEST(provenance, opset1_upgrade_pass_graph) -{ - test::ProvenanceEnabler provenance_enabler; - - auto x = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); - auto y = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); - - auto a = make_shared(x, y); - auto b = make_shared(x, y); - auto c = make_shared(b); - auto d = make_shared(a, b); - - auto f = make_shared(d, ParameterVector{x, y}); - - ngraph::pass::Manager pass_manager; - pass_manager.register_pass(); - pass_manager.run_passes(f); - - for (auto node : f->get_ordered_ops()) - { - auto tags = node->get_provenance_tags(); - if (as_type_ptr(node)) - { - EXPECT_EQ(tags.size(), 1); - EXPECT_TRUE(tags.find("") != tags.end()); - } - else if (as_type_ptr(node)) - { - EXPECT_EQ(tags.size(), 1); - EXPECT_TRUE(tags.find("") != tags.end()); - } - else if (as_type_ptr(node)) - { - EXPECT_EQ(tags.size(), 1); - EXPECT_TRUE(tags.find("") != tags.end()); - } - else if (as_type_ptr(node)) - { - EXPECT_TRUE(tags.empty()); - } - } -} - -TEST(provenance, opset0_downgrade_pass_graph) -{ - test::ProvenanceEnabler provenance_enabler; - - auto x = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); - auto y = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); - - auto a = make_shared(x, y); - auto b = make_shared(x, y); - auto c = make_shared(b); - auto d = make_shared(a, b); - - auto f = make_shared(d, ParameterVector{x, y}); - - ngraph::pass::Manager pass_manager; - pass_manager.register_pass(); - pass_manager.run_passes(f); - - for (auto node : f->get_ordered_ops()) - { - auto tags = node->get_provenance_tags(); - if (as_type_ptr(node)) - { - EXPECT_EQ(tags.size(), 1); - EXPECT_TRUE(tags.find("") != tags.end()); - } - else if (as_type_ptr(node)) - { - EXPECT_EQ(tags.size(), 1); - EXPECT_TRUE(tags.find("") != tags.end()); - } - else if (as_type_ptr(node)) - { - EXPECT_EQ(tags.size(), 1); - EXPECT_TRUE(tags.find("") != tags.end()); - } - else if (as_type_ptr(node)) - { - EXPECT_TRUE(tags.empty()); - } - } -} +} \ No newline at end of file diff --git a/ngraph/test/replace_node.cpp b/ngraph/test/replace_node.cpp index 816f1f8356920a..69903ac1df8a0f 100644 --- a/ngraph/test/replace_node.cpp +++ b/ngraph/test/replace_node.cpp @@ -19,8 +19,6 @@ #include "ngraph/ngraph.hpp" -NGRAPH_SUPPRESS_DEPRECATED_START - using namespace std; using namespace ngraph; @@ -67,10 +65,10 @@ TEST(replace_node, replace_nodes) auto y = make_shared(element::Type_t::f32, Shape{2}); auto z = make_shared(element::Type_t::f32, Shape{2}); - auto add = x + y; + auto add = make_shared(x, y); auto k = make_shared(element::Type_t::f32, Shape{2}, vector{1, 2}); - auto mul = add * k; - auto sub = mul - z; + auto mul = make_shared(add, k); + auto sub = make_shared(mul, z); auto f = make_shared(NodeVector{sub}, ParameterVector{x, y, z}); @@ -83,7 +81,7 @@ TEST(replace_node, replace_nodes) make_shared(element::Type_t::f32, Shape{2}, vector{3, 4}); auto k_replacement = make_shared(element::Type_t::f32, Shape{2}, vector{5, 6}); - auto z_replacement = x_replacement + mul; + auto z_replacement = make_shared(x_replacement, mul); body_replacement_map[y] = y_replacement; body_replacement_map[k] = k_replacement; body_replacement_map[z] = z_replacement; diff --git a/ngraph/test/runtime/backend.cpp b/ngraph/test/runtime/backend.cpp index 2a2444a4208944..94b3466f463fdf 100644 --- a/ngraph/test/runtime/backend.cpp +++ b/ngraph/test/runtime/backend.cpp @@ -88,6 +88,7 @@ std::shared_ptr runtime::Backend::create(const string& t, { return make_shared(inner_backend); } + return inner_backend; } vector runtime::Backend::get_registered_devices() diff --git a/ngraph/test/runtime/ie/unit_test.manifest b/ngraph/test/runtime/ie/unit_test.manifest index af9e7f51121fad..b2893af79a014b 100644 --- a/ngraph/test/runtime/ie/unit_test.manifest +++ b/ngraph/test/runtime/ie/unit_test.manifest @@ -1121,12 +1121,12 @@ IE_CPU.onnx_resize11_up_sizes_cubic_half_pixel_dynamic_sizes # Input data precision not supported. Expected float. ctc_greedy_decoder_f16 -# Next nine tests fails in CPU for the following reason. The nGraph function -# for NMS-5 are passed to the method compile() of the backend, but this -# method doesn't apply any nGraph transformations to the passed function, -# and the plugin backend gets CNNNetwork with NMS-5, NMS-5 has dynamic shapes -# for two of three outputs, and results of these two outputs are interpreted -# as scalars. If we apply all needed nGraph transformations to the nGraph +# RNN/LSTM Cells should be converted to IE representation +IE_CPU.lstm_cell__zero_bias_peepholes +IE_CPU.rnn_cell__no_bias +IE_CPU.rnn_cell__bias_clip +IE_CPU.rnn_cell__activation_function + # function with NMS-5 to get the nGraph function with NMSIE3 (internal # operation, similar with NMS-5, but with all static output shapes), before # the method compile() call, then tests for INTERPRETER backend for NMS-5 will diff --git a/ngraph/test/runtime/interpreter/CMakeLists.txt b/ngraph/test/runtime/interpreter/CMakeLists.txt index ee8116de6fc583..40593ff663fe97 100644 --- a/ngraph/test/runtime/interpreter/CMakeLists.txt +++ b/ngraph/test/runtime/interpreter/CMakeLists.txt @@ -15,12 +15,17 @@ # ****************************************************************************** if (NGRAPH_INTERPRETER_ENABLE) - add_library(interpreter_backend SHARED int_backend.cpp int_executable.cpp) + add_library(interpreter_backend SHARED int_backend.cpp int_executable.cpp evaluates_map.cpp) if(COMMAND ie_faster_build) ie_faster_build(interpreter_backend UNITY ) + endif() + + if(COMMAND ie_add_vs_version_file) + ie_add_vs_version_file(NAME interpreter_backend + FILEDESCRIPTION "nGraph interpreter backend library") endif() if(COMMAND ie_add_vs_version_file) diff --git a/ngraph/test/runtime/interpreter/evaluates_map.cpp b/ngraph/test/runtime/interpreter/evaluates_map.cpp new file mode 100644 index 00000000000000..32505a58e6dc2f --- /dev/null +++ b/ngraph/test/runtime/interpreter/evaluates_map.cpp @@ -0,0 +1,1704 @@ +//***************************************************************************** +// Copyright 2017-2020 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//***************************************************************************** + +#include "evaluates_map.hpp" + +#include "backend.hpp" +#include "ngraph/ops.hpp" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "ngraph/runtime/reference/avg_pool.hpp" +#include "ngraph/runtime/reference/convolution.hpp" +#include "ngraph/runtime/reference/ctc_greedy_decoder.hpp" +#include "ngraph/runtime/reference/ctc_loss.hpp" +#include "ngraph/runtime/reference/cum_sum.hpp" +#include "ngraph/runtime/reference/detection_output.hpp" +#include "ngraph/runtime/reference/embedding_bag_offsets_sum.hpp" +#include "ngraph/runtime/reference/embedding_bag_packed_sum.hpp" +#include "ngraph/runtime/reference/embedding_segments_sum.hpp" +#include "ngraph/runtime/reference/fake_quantize.hpp" +#include "ngraph/runtime/reference/gather_tree.hpp" +#include "ngraph/runtime/reference/hard_sigmoid.hpp" +#include "ngraph/runtime/reference/log_softmax.hpp" +#include "ngraph/runtime/reference/lrn.hpp" +#include "ngraph/runtime/reference/mvn.hpp" +#include "ngraph/runtime/reference/normalize_l2.hpp" +#include "ngraph/runtime/reference/region_yolo.hpp" +#include "ngraph/runtime/reference/roi_pooling.hpp" +#include "ngraph/runtime/reference/scatter_nd_update.hpp" +#include "ngraph/runtime/reference/squared_difference.hpp" +#include "reference/elu.hpp" +#include "reference/gelu.hpp" +#include "reference/grn.hpp" +#include "reference/selu.hpp" + +using namespace ngraph; +using namespace std; + +namespace +{ + template + bool evaluate(shared_ptr op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + return false; + } + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + const auto filter_data = inputs[1]->get_data_ptr(); + auto out_data_ptr = outputs[0]->get_data_ptr(); + const auto in_data_ptr = inputs[0]->get_data_ptr(); + const auto& out_shape = outputs[0]->get_shape(); + const auto& in_shape = inputs[0]->get_shape(); + const auto& filter_shape = inputs[1]->get_shape(); + Strides in_dilation(std::vector(in_shape.size() - 2)); + std::fill(in_dilation.begin(), in_dilation.end(), 1); + runtime::reference::convolution::value_type>( + in_data_ptr, + filter_data, + out_data_ptr, + in_shape, + filter_shape, + out_shape, + op->get_strides(), + op->get_dilations(), + op->get_pads_begin(), + op->get_pads_end(), + in_dilation); + return true; + } + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + const auto filter_data = inputs[1]->get_data_ptr(); + auto out_data_ptr = outputs[0]->get_data_ptr(); + const auto in_data_ptr = inputs[0]->get_data_ptr(); + const auto& out_shape = outputs[0]->get_shape(); + const auto& in_shape = inputs[0]->get_shape(); + const auto& filter_shape = inputs[1]->get_shape(); + Strides in_dilation(std::vector(in_shape.size() - 2)); + std::fill(in_dilation.begin(), in_dilation.end(), 1); + runtime::reference::convolution_backprop_in::value_type>( + in_data_ptr, + filter_data, + out_data_ptr, + in_shape, + filter_shape, + out_shape, + in_dilation, + op->get_dilations(), + op->get_pads_begin(), + op->get_pads_end(), + op->get_strides()); + return true; + } + + namespace cum_sum_v0 + { + template + inline void evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T1 = typename element_type_traits::value_type; + using T2 = typename element_type_traits::value_type; + runtime::reference::cumsum(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + op->is_exclusive(), + op->is_reverse()); + } + } // namespace cum_sum_v0 + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + switch (inputs[1]->get_element_type()) + { + case element::Type_t::i64: + cum_sum_v0::evaluate(op, outputs, inputs); + break; + default: cum_sum_v0::evaluate(op, outputs, inputs); break; + } + return true; + } + + namespace embedding_offsets_sum_v3 + { + template + inline void evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T1 = typename element_type_traits::value_type; + using T2 = typename element_type_traits::value_type; + runtime::reference::embeddingSegmentsSum( + inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + inputs[2]->get_data_ptr(), + inputs.size() > 4 ? inputs[4]->get_data_ptr() : nullptr, + inputs.size() > 5 ? inputs[5]->get_data_ptr() : nullptr, + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_shape(), + outputs[0]->get_shape()); + } + } // namespace embedding_offsets_sum_v3 + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + switch (inputs[1]->get_element_type()) + { + case element::Type_t::i32: + embedding_offsets_sum_v3::evaluate(op, outputs, inputs); + break; + case element::Type_t::i64: + embedding_offsets_sum_v3::evaluate(op, outputs, inputs); + break; + default: return false; + } + return true; + } + + namespace embedding_bag_offsets_sum_v3 + { + template + inline void evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T1 = typename element_type_traits::value_type; + using T2 = typename element_type_traits::value_type; + runtime::reference::embeddingBagOffsetsSum( + inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + inputs[2]->get_data_ptr(), + inputs.size() > 3 ? inputs[3]->get_data_ptr() : nullptr, + inputs.size() > 4 ? inputs[4]->get_data_ptr() : nullptr, + outputs[0]->get_data_ptr(), + shape_size(inputs[1]->get_shape()), + outputs[0]->get_shape()); + } + } // namespace embedding_bag_offsets_sum_v3 + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + switch (inputs[1]->get_element_type()) + { + case element::Type_t::i32: + embedding_bag_offsets_sum_v3::evaluate(op, outputs, inputs); + break; + case element::Type_t::i64: + embedding_bag_offsets_sum_v3::evaluate(op, outputs, inputs); + break; + default: return false; + } + return true; + } + + namespace embedding_bag_packed_sum_v3 + { + template + inline void evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T1 = typename element_type_traits::value_type; + using T2 = typename element_type_traits::value_type; + runtime::reference::embeddingBagPackedSum( + inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + inputs.size() > 2 ? inputs[2]->get_data_ptr() : nullptr, + outputs[0]->get_data_ptr(), + inputs[1]->get_shape(), + outputs[0]->get_shape()); + } + } // namespace embedding_bag_packed_sum_v3 + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + switch (inputs[1]->get_element_type()) + { + case element::Type_t::i32: + embedding_bag_packed_sum_v3::evaluate(op, outputs, inputs); + break; + case element::Type_t::i64: + embedding_bag_packed_sum_v3::evaluate(op, outputs, inputs); + break; + default: return false; + } + + return true; + } + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + runtime::reference::mvn(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + op->get_normalize_variance(), + op->get_reduction_axes(), + op->get_eps()); + return true; + } + + namespace nms_v5 + { + using V5BoxEncoding = op::v5::NonMaxSuppression::BoxEncodingType; + + struct InfoForNMS5 + { + int64_t max_output_boxes_per_class; + float iou_threshold; + float score_threshold; + float soft_nms_sigma; + Shape out_shape; + Shape boxes_shape; + Shape scores_shape; + std::vector boxes_data; + std::vector scores_data; + size_t out_shape_size; + bool sort_result_descending; + ngraph::element::Type output_type; + }; + + constexpr size_t boxes_port = 0; + constexpr size_t scores_port = 1; + constexpr size_t max_output_boxes_port = 2; + constexpr size_t iou_threshold_port = 3; + constexpr size_t score_threshold_port = 4; + constexpr size_t soft_nms_sigma_port = 5; + + PartialShape + infer_selected_indices_shape(const std::vector>& inputs, + int64_t max_output_boxes_per_class) + { + const auto boxes_ps = inputs[boxes_port]->get_partial_shape(); + const auto scores_ps = inputs[scores_port]->get_partial_shape(); + + // NonMaxSuppression produces triplets + // that have the following format: [batch_index, class_index, box_index] + PartialShape result = {Dimension::dynamic(), 3}; + + if (boxes_ps.rank().is_static() && scores_ps.rank().is_static()) + { + const auto num_boxes_boxes = boxes_ps[1]; + if (num_boxes_boxes.is_static() && scores_ps[0].is_static() && + scores_ps[1].is_static()) + { + const auto num_boxes = num_boxes_boxes.get_length(); + const auto num_classes = scores_ps[1].get_length(); + + result[0] = std::min(num_boxes, max_output_boxes_per_class) * num_classes * + scores_ps[0].get_length(); + } + } + + return result; + } + + std::vector get_floats(const std::shared_ptr& input, const Shape& shape) + { + size_t input_size = shape_size(shape); + std::vector result(input_size); + + switch (input->get_element_type()) + { + case element::Type_t::bf16: + { + bfloat16* p = input->get_data_ptr(); + for (size_t i = 0; i < input_size; ++i) + { + result[i] = float(p[i]); + } + } + break; + case element::Type_t::f16: + { + float16* p = input->get_data_ptr(); + for (size_t i = 0; i < input_size; ++i) + { + result[i] = float(p[i]); + } + } + break; + case element::Type_t::f32: + { + float* p = input->get_data_ptr(); + memcpy(result.data(), p, input_size * sizeof(float)); + } + break; + default: + throw std::runtime_error("Unsupported data type in op NonMaxSuppression-5"); + break; + } + + return result; + } + + void normalize_corner(float* boxes, const Shape& boxes_shape) + { + size_t total_num_of_boxes = shape_size(boxes_shape) / 4; + for (size_t i = 0; i < total_num_of_boxes; ++i) + { + float* current_box = boxes + 4 * i; + + float y1 = current_box[0]; + float x1 = current_box[1]; + float y2 = current_box[2]; + float x2 = current_box[3]; + + float ymin = std::min(y1, y2); + float ymax = std::max(y1, y2); + float xmin = std::min(x1, x2); + float xmax = std::max(x1, x2); + + current_box[0] = ymin; + current_box[1] = xmin; + current_box[2] = ymax; + current_box[3] = xmax; + } + } + + void normalize_center(float* boxes, const Shape& boxes_shape) + { + size_t total_num_of_boxes = shape_size(boxes_shape) / 4; + for (size_t i = 0; i < total_num_of_boxes; ++i) + { + float* current_box = boxes + 4 * i; + + float x_center = current_box[0]; + float y_center = current_box[1]; + float width = current_box[2]; + float height = current_box[3]; + + float y1 = y_center - height / 2.0; + float x1 = x_center - width / 2.0; + float y2 = y_center + height / 2.0; + float x2 = x_center + width / 2.0; + + current_box[0] = y1; + current_box[1] = x1; + current_box[2] = y2; + current_box[3] = x2; + } + } + + void normalize_box_encoding(float* boxes, + const Shape& boxes_shape, + const V5BoxEncoding box_encoding) + { + if (box_encoding == V5BoxEncoding::CORNER) + { + normalize_corner(boxes, boxes_shape); + } + else + { + normalize_center(boxes, boxes_shape); + } + } + + std::vector prepare_boxes_data(const std::shared_ptr& boxes, + const Shape& boxes_shape, + const V5BoxEncoding box_encoding) + { + auto result = get_floats(boxes, boxes_shape); + normalize_box_encoding(result.data(), boxes_shape, box_encoding); + return result; + } + + std::vector prepare_scores_data(const std::shared_ptr& scores, + const Shape& scores_shape) + { + auto result = get_floats(scores, scores_shape); + return result; + } + + InfoForNMS5 get_info_for_nms5_eval(const std::shared_ptr& nms5, + const std::vector>& inputs) + { + InfoForNMS5 result; + + result.max_output_boxes_per_class = nms5->max_boxes_output_from_input(); + result.iou_threshold = nms5->iou_threshold_from_input(); + result.score_threshold = nms5->score_threshold_from_input(); + result.soft_nms_sigma = nms5->soft_nms_sigma_from_input(); + + auto selected_indices_shape = + infer_selected_indices_shape(inputs, result.max_output_boxes_per_class); + result.out_shape = selected_indices_shape.to_shape(); + + result.boxes_shape = inputs[boxes_port]->get_shape(); + result.scores_shape = inputs[scores_port]->get_shape(); + + result.boxes_data = prepare_boxes_data( + inputs[boxes_port], result.boxes_shape, nms5->get_box_encoding()); + result.scores_data = prepare_scores_data(inputs[scores_port], result.scores_shape); + + result.out_shape_size = shape_size(result.out_shape); + + result.sort_result_descending = nms5->get_sort_result_descending(); + + result.output_type = nms5->get_output_type(); + + return result; + } + + } // namespace nms_v5 + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + auto info = nms_v5::get_info_for_nms5_eval(op, inputs); + + std::vector selected_indices(info.out_shape_size); + std::vector selected_scores(info.out_shape_size); + int64_t valid_outputs = 0; + + runtime::reference::non_max_suppression(info.boxes_data.data(), + info.boxes_shape, + info.scores_data.data(), + info.scores_shape, + info.max_output_boxes_per_class, + info.iou_threshold, + info.score_threshold, + info.soft_nms_sigma, + selected_indices.data(), + info.out_shape, + selected_scores.data(), + info.out_shape, + &valid_outputs, + info.sort_result_descending); + + auto selected_scores_type = + (inputs.size() < 4) ? element::f32 : inputs[3]->get_element_type(); + + runtime::reference::nms5_postprocessing(outputs, + info.output_type, + selected_indices, + selected_scores, + valid_outputs, + selected_scores_type); + return true; + } + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + runtime::reference::lrn(inputs[0]->get_data_ptr(), + op->get_reduction_axes(), + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + op->get_alpha(), + op->get_beta(), + op->get_bias(), + op->get_nsize()); + return true; + } + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + runtime::reference::grn(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + op->get_bias(), + inputs[0]->get_shape()); + return true; + } + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + runtime::reference::referenceDetectionOutput refDetOut( + op->get_attrs(), op->get_input_shape(0), op->get_input_shape(2)); + if (op->get_input_size() == 3) + { + refDetOut.run(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + inputs[2]->get_data_ptr(), + nullptr, + nullptr, + outputs[0]->get_data_ptr()); + } + else if (op->get_input_size() == 5) + { + refDetOut.run(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + inputs[2]->get_data_ptr(), + inputs[3]->get_data_ptr(), + inputs[4]->get_data_ptr(), + outputs[0]->get_data_ptr()); + } + else + { + throw ngraph_error("DetectionOutput layer supports only 3 or 5 inputs"); + } + return true; + } + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + auto idxType = op->get_input_element_type(1); + if (idxType == element::i32) + { + runtime::reference::scatterNdUpdate( + inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + inputs[2]->get_data_ptr(), + outputs[0]->get_data_ptr(), + op->get_input_shape(0), + op->get_input_shape(1), + op->get_input_shape(2)); + } + else if (idxType == element::i64) + { + runtime::reference::scatterNdUpdate( + inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + inputs[2]->get_data_ptr(), + outputs[0]->get_data_ptr(), + op->get_input_shape(0), + op->get_input_shape(1), + op->get_input_shape(2)); + } + else + { + throw ngraph_error( + "ScatterNDUpdate layer support only i32 and i64 'indices' input precision!"); + } + return true; + } + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + + runtime::reference::select(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + inputs[2]->get_data_ptr(), + outputs[0]->get_data_ptr(), + op->get_input_shape(0), + op->get_input_shape(1), + op->get_input_shape(2), + op->get_auto_broadcast()); + return true; + } + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + runtime::reference::avg_pool(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + op->get_output_shape(0), + op->get_kernel(), + op->get_strides(), + op->get_pads_begin(), + op->get_pads_end(), + !op->get_exclude_pad()); + return true; + } + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + runtime::reference::hard_sigmoid(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr()[0], + inputs[2]->get_data_ptr()[0], + outputs[0]->get_data_ptr(), + shape_size(outputs[0]->get_shape())); + return true; + } + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + runtime::reference::elu(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + shape_size(inputs[0]->get_shape()), + op->get_alpha()); + return true; + } + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + runtime::reference::prior_box(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + outputs[0]->get_data_ptr(), + outputs[0]->get_shape(), + op->get_attrs()); + return true; + } + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + runtime::reference::mod(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_shape(), + op->get_auto_broadcast()); + return true; + } + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + runtime::reference::selu(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + inputs[2]->get_data_ptr(), + outputs[0]->get_data_ptr(), + shape_size(inputs[0]->get_shape()), + shape_size(inputs[1]->get_shape()), + shape_size(inputs[2]->get_shape())); + return true; + } + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + runtime::reference::ceiling(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + shape_size(inputs[0]->get_shape())); + return true; + } + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + runtime::reference::gelu(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + shape_size(inputs[0]->get_shape())); + return true; + } + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + runtime::reference::relu(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + shape_size(inputs[0]->get_shape())); + return true; + } + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + runtime::reference::sign(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + shape_size(inputs[0]->get_shape())); + return true; + } + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + runtime::reference::abs(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + shape_size(inputs[0]->get_shape())); + return true; + } + + namespace ctc_loss_v4 + { + template + inline void evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T1 = typename element_type_traits::value_type; + using T2 = typename element_type_traits::value_type; + runtime::reference::CTCLoss(inputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_data_ptr(), + inputs[2]->get_data_ptr(), + inputs[3]->get_data_ptr(), + inputs[4]->get_data_ptr(), + op->get_preprocess_collapse_repeated(), + op->get_ctc_merge_repeated(), + op->get_unique(), + outputs[0]->get_data_ptr()); + } + } // namespace ctc_loss_v4 + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + switch (inputs[1]->get_element_type()) + { + case element::Type_t::i32: + ctc_loss_v4::evaluate(op, outputs, inputs); + break; + case element::Type_t::i64: + ctc_loss_v4::evaluate(op, outputs, inputs); + break; + default: return false; + } + return true; + } + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + runtime::reference::batch_norm_inference(op->get_eps_value(), + inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + inputs[2]->get_data_ptr(), + inputs[3]->get_data_ptr(), + inputs[4]->get_data_ptr(), + outputs[0]->get_data_ptr(), + inputs[2]->get_shape()); + return true; + } + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + runtime::reference::batch_norm_inference(op->get_eps_value(), + inputs[1]->get_data_ptr(), + inputs[2]->get_data_ptr(), + inputs[0]->get_data_ptr(), + inputs[3]->get_data_ptr(), + inputs[4]->get_data_ptr(), + outputs[0]->get_data_ptr(), + op->get_input_shape(0)); + return true; + } + + namespace reverse_sequence_v0 + { + template + inline void evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T1 = typename element_type_traits::value_type; + using T2 = typename element_type_traits::value_type; + runtime::reference::reverse_sequence(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + op->get_batch_axis(), + op->get_sequence_axis(), + inputs[1]->get_data_ptr()); + } + } // namespace reverse_sequence_v0 + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + switch (inputs[1]->get_element_type()) + { + case element::Type_t::boolean: + reverse_sequence_v0::evaluate(op, outputs, inputs); + break; + case element::Type_t::i8: + reverse_sequence_v0::evaluate(op, outputs, inputs); + break; + case element::Type_t::i16: + reverse_sequence_v0::evaluate(op, outputs, inputs); + break; + case element::Type_t::i32: + reverse_sequence_v0::evaluate(op, outputs, inputs); + break; + case element::Type_t::i64: + reverse_sequence_v0::evaluate(op, outputs, inputs); + break; + case element::Type_t::u8: + reverse_sequence_v0::evaluate(op, outputs, inputs); + break; + case element::Type_t::u16: + reverse_sequence_v0::evaluate(op, outputs, inputs); + break; + case element::Type_t::u32: + reverse_sequence_v0::evaluate(op, outputs, inputs); + break; + case element::Type_t::u64: + reverse_sequence_v0::evaluate(op, outputs, inputs); + break; + case element::Type_t::f16: + reverse_sequence_v0::evaluate(op, outputs, inputs); + break; + case element::Type_t::f32: + reverse_sequence_v0::evaluate(op, outputs, inputs); + break; + case element::Type_t::f64: + reverse_sequence_v0::evaluate(op, outputs, inputs); + break; + default: return false; + } +#undef REF_CALL + return true; + } + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + runtime::reference::extract_image_patches(op, + inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + outputs[0]->get_shape()); + return true; + } + + namespace convert_v0 + { + template + inline void evaluate_bool(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + runtime::reference::convert_to_bool(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + shape_size(inputs[0]->get_shape())); + } + template + inline void evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using TI = typename element_type_traits::value_type; + using TO = typename element_type_traits::value_type; + runtime::reference::convert(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + shape_size(inputs[0]->get_shape())); + } + } // namespace convert_v0 + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + if (OUT_ET == element::Type_t::boolean) + { + switch (inputs[0]->get_element_type()) + { + case element::Type_t::boolean: + convert_v0::evaluate_bool(op, outputs, inputs); + break; + case element::Type_t::i8: + convert_v0::evaluate_bool(op, outputs, inputs); + break; + case element::Type_t::i16: + convert_v0::evaluate_bool(op, outputs, inputs); + break; + case element::Type_t::i32: + convert_v0::evaluate_bool(op, outputs, inputs); + break; + case element::Type_t::i64: + convert_v0::evaluate_bool(op, outputs, inputs); + break; + case element::Type_t::u8: + convert_v0::evaluate_bool(op, outputs, inputs); + break; + case element::Type_t::u16: + convert_v0::evaluate_bool(op, outputs, inputs); + break; + case element::Type_t::u32: + convert_v0::evaluate_bool(op, outputs, inputs); + break; + case element::Type_t::u64: + convert_v0::evaluate_bool(op, outputs, inputs); + break; + case element::Type_t::f16: + convert_v0::evaluate_bool(op, outputs, inputs); + break; + case element::Type_t::f32: + convert_v0::evaluate_bool(op, outputs, inputs); + break; + case element::Type_t::f64: + convert_v0::evaluate_bool(op, outputs, inputs); + break; + default: return false; + } + } + else + { + switch (inputs[0]->get_element_type()) + { + case element::Type_t::boolean: + convert_v0::evaluate(op, outputs, inputs); + break; + case element::Type_t::i8: + convert_v0::evaluate(op, outputs, inputs); + break; + case element::Type_t::i16: + convert_v0::evaluate(op, outputs, inputs); + break; + case element::Type_t::i32: + convert_v0::evaluate(op, outputs, inputs); + break; + case element::Type_t::i64: + convert_v0::evaluate(op, outputs, inputs); + break; + case element::Type_t::u8: + convert_v0::evaluate(op, outputs, inputs); + break; + case element::Type_t::u16: + convert_v0::evaluate(op, outputs, inputs); + break; + case element::Type_t::u32: + convert_v0::evaluate(op, outputs, inputs); + break; + case element::Type_t::u64: + convert_v0::evaluate(op, outputs, inputs); + break; + case element::Type_t::f16: + convert_v0::evaluate(op, outputs, inputs); + break; + case element::Type_t::f32: + convert_v0::evaluate(op, outputs, inputs); + break; + case element::Type_t::f64: + convert_v0::evaluate(op, outputs, inputs); + break; + default: return false; + } + } + return true; + } + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + switch (inputs[0]->get_element_type()) + { + case element::Type_t::i32: + runtime::reference:: + one_hot::value_type, T>( + inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + outputs[0]->get_shape(), + op->get_axis(), + inputs[2]->get_data_ptr()[0], + inputs[3]->get_data_ptr()[0]); + break; + case element::Type_t::i64: + runtime::reference:: + one_hot::value_type, T>( + inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + outputs[0]->get_shape(), + op->get_axis(), + inputs[2]->get_data_ptr()[0], + inputs[3]->get_data_ptr()[0]); + break; + default: + std::stringstream ss; + ss << "Unhandled input precision " << inputs[0]->get_element_type().get_type_name() + << " in v1::OneHot evaluate call"; + throw ngraph_error(ss.str()); + } + return true; + } + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + runtime::reference::rnn_cell(inputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_data_ptr(), + inputs[1]->get_shape(), + inputs[2]->get_data_ptr(), + inputs[2]->get_shape(), + inputs[3]->get_data_ptr(), + inputs[3]->get_shape(), + inputs[4]->get_data_ptr(), + inputs[4]->get_shape(), + outputs[0]->get_data_ptr(), + op->get_activations().front(), + op->get_clip()); + return true; + } + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + runtime::reference::lstm_cell(inputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_data_ptr(), + inputs[1]->get_shape(), + inputs[2]->get_data_ptr(), + inputs[2]->get_shape(), + inputs[3]->get_data_ptr(), + inputs[3]->get_shape(), + inputs[4]->get_data_ptr(), + inputs[4]->get_shape(), + inputs[5]->get_data_ptr(), + inputs[5]->get_shape(), + outputs[0]->get_data_ptr(), + outputs[1]->get_data_ptr(), + op->get_activations()[0], + op->get_activations()[1], + op->get_activations()[2], + op->get_clip()); + return true; + } + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + runtime::reference::gru_cell(inputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_data_ptr(), + inputs[1]->get_shape(), + inputs[2]->get_data_ptr(), + inputs[2]->get_shape(), + inputs[3]->get_data_ptr(), + inputs[3]->get_shape(), + inputs[4]->get_data_ptr(), + inputs[4]->get_shape(), + outputs[0]->get_data_ptr(), + op->get_activations()[0], + op->get_activations()[1], + op->get_clip(), + op->get_linear_before_reset()); + return true; + } + + namespace rnn_seq_v5 + { + template + inline void evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T1 = typename element_type_traits::value_type; + using T2 = typename element_type_traits::value_type; + runtime::reference::rnn_sequence(inputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_data_ptr(), + inputs[1]->get_shape(), + inputs[2]->get_data_ptr(), + inputs[2]->get_shape(), + inputs[3]->get_data_ptr(), + inputs[3]->get_shape(), + inputs[4]->get_data_ptr(), + inputs[4]->get_shape(), + inputs[5]->get_data_ptr(), + inputs[5]->get_shape(), + outputs[0]->get_data_ptr(), + outputs[1]->get_data_ptr(), + op->get_activations()[0], + op->get_clip(), + op->get_direction()); + } + } // namespace rnn_seq_v5 + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + switch (inputs[2]->get_element_type()) + { + case element::Type_t::i64: + case element::Type_t::u64: + rnn_seq_v5::evaluate(op, outputs, inputs); + break; + case element::Type_t::i32: + case element::Type_t::u32: + rnn_seq_v5::evaluate(op, outputs, inputs); + break; + default: return false; + } + return true; + } + + namespace lstm_seq_v5 + { + template + inline void evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T1 = typename element_type_traits::value_type; + using T2 = typename element_type_traits::value_type; + runtime::reference::lstm_sequence(inputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_data_ptr(), + inputs[1]->get_shape(), + inputs[2]->get_data_ptr(), + inputs[2]->get_shape(), + inputs[3]->get_data_ptr(), + inputs[3]->get_shape(), + inputs[4]->get_data_ptr(), + inputs[4]->get_shape(), + inputs[5]->get_data_ptr(), + inputs[5]->get_shape(), + inputs[6]->get_data_ptr(), + inputs[6]->get_shape(), + outputs[0]->get_data_ptr(), + outputs[1]->get_data_ptr(), + outputs[2]->get_data_ptr(), + op->get_activations()[0], + op->get_activations()[1], + op->get_activations()[2], + op->get_clip(), + op->get_direction()); + } + } // namespace lstm_seq_v5 + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + switch (inputs[3]->get_element_type()) + { + case element::Type_t::i64: + case element::Type_t::u64: + lstm_seq_v5::evaluate(op, outputs, inputs); + break; + case element::Type_t::i32: + case element::Type_t::u32: + lstm_seq_v5::evaluate(op, outputs, inputs); + break; + default: return false; + } + return true; + } + + namespace ti_v0 + { + runtime::reference::custom_evaluate_function evaluate = + [](const std::shared_ptr& function, + const HostTensorVector& inputs, + HostTensorVector& outputs) -> void { + const auto& parameters = function->get_parameters(); + const auto& parametersNumber = parameters.size(); + const auto& inputsNumber = inputs.size(); + NGRAPH_CHECK(parametersNumber == inputsNumber, + "Got function (", + function->get_friendly_name(), + ") with ", + parametersNumber, + " parameters, but ", + inputsNumber, + " input blobs"); + + auto inputTensors = std::vector>{}; + for (const auto& parameter : parameters) + { + const auto& parameterIndex = function->get_parameter_index(parameter); + const auto& parameterShape = parameter->get_shape(); + const auto& parameterType = parameter->get_element_type(); + const auto& parameterSize = shape_size(parameterShape) * parameterType.size(); + + const auto& input = inputs[parameterIndex]; + const auto& inputSize = input->get_size_in_bytes(); + NGRAPH_CHECK(parameterSize == inputSize, + "Got parameter (", + parameter->get_friendly_name(), + ") of size ", + parameterSize, + " bytes, but corresponding input with index ", + parameterIndex, + " has ", + inputSize, + " bytes"); + + auto tensor = std::make_shared(parameterType, parameterShape); + tensor->write(input->get_data_ptr(), parameterSize); + inputTensors.push_back(tensor); + } + + const auto& results = function->get_results(); + std::vector> outputTensors; + outputTensors.reserve(results.size()); + for (size_t i = 0; i < results.size(); ++i) + { + outputTensors.push_back(std::make_shared()); + } + runtime::Backend::set_backend_shared_library_search_directory(""); + auto backend = runtime::Backend::create("INTERPRETER"); + auto handle = backend->compile(function); + handle->call_with_validate(outputTensors, inputTensors); + + outputs.reserve(outputTensors.size()); + for (const auto& tensor : outputTensors) + { + auto host_tensor = static_pointer_cast(tensor); + outputs.push_back(host_tensor); + } + }; + } // namespace ti_v0 + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + runtime::reference::tensor_iterator(op->get_num_iterations(), + op->get_function(), + op->get_output_descriptions(), + op->get_input_descriptions(), + outputs, + inputs, + ti_v0::evaluate); + return true; + } + + namespace gru_seq_v5 + { + template + inline void evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T1 = typename element_type_traits::value_type; + using T2 = typename element_type_traits::value_type; + runtime::reference::gru_sequence(inputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_data_ptr(), + inputs[1]->get_shape(), + inputs[2]->get_data_ptr(), + inputs[2]->get_shape(), + inputs[3]->get_data_ptr(), + inputs[3]->get_shape(), + inputs[4]->get_data_ptr(), + inputs[4]->get_shape(), + inputs[5]->get_data_ptr(), + inputs[5]->get_shape(), + outputs[0]->get_data_ptr(), + outputs[1]->get_data_ptr(), + op->get_activations()[0], + op->get_activations()[1], + op->get_clip(), + op->get_direction(), + op->get_linear_before_reset()); + } + } // namespace gru_seq_v5 + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + switch (inputs[2]->get_element_type()) + { + case element::Type_t::i64: + case element::Type_t::u64: + gru_seq_v5::evaluate(op, outputs, inputs); + break; + case element::Type_t::i32: + case element::Type_t::u32: + gru_seq_v5::evaluate(op, outputs, inputs); + break; + default: return false; + } + return true; + } + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + runtime::reference::roi_pooling(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + outputs[0]->get_data_ptr(), + op->get_input_shape(0), + op->get_input_shape(1), + op->get_output_shape(0), + op->get_spatial_scale(), + op->get_method()); + return true; + } + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + runtime::reference::reorg_yolo(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + op->get_strides().at(0), + inputs[0]->get_element_type().size()); + return true; + } + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + runtime::reference::region_yolo(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + op->get_num_coords(), + op->get_num_classes(), + op->get_num_regions(), + op->get_do_softmax(), + op->get_mask()); + return true; + } + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + runtime::reference::pad(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + outputs[0]->get_data_ptr(), + shape_size(inputs[0]->get_shape()), + inputs[1]->get_shape(), + outputs[0]->get_shape(), + op->get_pads_end(), + op->get_pads_begin(), + op->get_pad_mode()); + return true; + } + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + runtime::reference::gather_tree(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + inputs[2]->get_data_ptr(), + inputs[3]->get_data_ptr(), + outputs[0]->get_data_ptr(), + op->get_input_shape(0), + op->get_input_shape(1), + op->get_input_shape(2), + op->get_input_shape(3), + inputs[1]->get_element_type()); + return true; + } + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + runtime::reference::fake_quantize(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + inputs[2]->get_data_ptr(), + inputs[3]->get_data_ptr(), + inputs[4]->get_data_ptr(), + outputs[0]->get_data_ptr(), + op->get_input_shape(0), + op->get_input_shape(1), + op->get_input_shape(2), + op->get_input_shape(3), + op->get_input_shape(4), + op->get_levels()); + return true; + } + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + runtime::reference::normalize_l2(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + op->get_input_shape(0), + op->get_reduction_axes(), + op->get_eps(), + op->get_eps_mode()); + return true; + } + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + runtime::reference::ctc_greedy_decoder(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_shape(), + outputs[0]->get_shape(), + op->get_ctc_merge_repeated()); + return true; + } + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + runtime::reference::squared_difference(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + outputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_shape(), + ngraph::op::AutoBroadcastSpec::NUMPY); + return true; + } + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + if (op->get_input_element_type(1) == element::i64) + { + runtime::reference::gather_nd(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + outputs[0]->get_data_ptr(), + op->get_input_shape(0), + op->get_input_shape(1), + op->get_output_shape(0), + op->get_batch_dims()); + } + else if (op->get_input_element_type(1) == element::i32) + { + runtime::reference::gather_nd(inputs[0]->get_data_ptr(), + inputs[1]->get_data_ptr(), + outputs[0]->get_data_ptr(), + op->get_input_shape(0), + op->get_input_shape(1), + op->get_output_shape(0), + op->get_batch_dims()); + } + else + { + throw ngraph_error("Unexpected indices type for GatherND operation"); + } + return true; + } + + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + int64_t i_axis = op->get_axis(); + if (i_axis < 0) + { + i_axis += inputs[0]->get_partial_shape().rank().get_length(); + } + runtime::reference::log_softmax(inputs[0]->get_data_ptr(), + outputs[0]->get_data_ptr(), + op->get_output_shape(0), + AxisSet{(size_t)i_axis}); + return true; + } + + template + bool evaluate_node(std::shared_ptr node, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + auto element_type = node->get_output_element_type(0); + if (is_type(node)) + { + element_type = node->get_input_element_type(1); + } + else if (is_type(node)) + { + element_type = node->get_input_element_type(0); + } + for (size_t i = 1; i < node->outputs().size(); i++) + { + if (is_type(node) && i == 1) + { + continue; + } + if (element_type != node->get_output_element_type(i)) + { + throw std::logic_error("Output node element types is not equal"); + } + } + switch (element_type) + { + case element::Type_t::boolean: + return evaluate(as_type_ptr(node), outputs, inputs); + ; + // case element::Type_t::bf16: + // break; + case element::Type_t::f16: + return evaluate(as_type_ptr(node), outputs, inputs); + case element::Type_t::f64: + return evaluate(as_type_ptr(node), outputs, inputs); + case element::Type_t::f32: + return evaluate(as_type_ptr(node), outputs, inputs); + case element::Type_t::i8: + return evaluate(as_type_ptr(node), outputs, inputs); + case element::Type_t::i16: + return evaluate(as_type_ptr(node), outputs, inputs); + case element::Type_t::i32: + return evaluate(as_type_ptr(node), outputs, inputs); + case element::Type_t::i64: + return evaluate(as_type_ptr(node), outputs, inputs); + case element::Type_t::u8: + return evaluate(as_type_ptr(node), outputs, inputs); + case element::Type_t::u16: + return evaluate(as_type_ptr(node), outputs, inputs); + case element::Type_t::u32: + return evaluate(as_type_ptr(node), outputs, inputs); + case element::Type_t::u64: + return evaluate(as_type_ptr(node), outputs, inputs); + default: + throw ngraph_error(std::string("Unhandled data type ") + + node->get_element_type().get_type_name() + + std::string("in evaluate_node()")); + } + } +} // namespace + +runtime::interpreter::EvaluatorsMap& runtime::interpreter::get_evaluators_map() +{ + static runtime::interpreter::EvaluatorsMap evaluatorsMap{ +#define NGRAPH_OP(NAME, NAMESPACE) {NAMESPACE::NAME::type_info, evaluate_node}, + +#include "opset_int_tbl.hpp" + +#undef NGRAPH_OP + }; + return evaluatorsMap; +} \ No newline at end of file diff --git a/ngraph/test/runtime/interpreter/evaluates_map.hpp b/ngraph/test/runtime/interpreter/evaluates_map.hpp new file mode 100644 index 00000000000000..8d211b00f73cb4 --- /dev/null +++ b/ngraph/test/runtime/interpreter/evaluates_map.hpp @@ -0,0 +1,34 @@ +//***************************************************************************** +// Copyright 2017-2020 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//***************************************************************************** +#pragma once +#include "int_backend_visibility.hpp" +#include "ngraph/node.hpp" + +namespace ngraph +{ + namespace runtime + { + namespace interpreter + { + using EvaluatorsMap = + std::map& node, + const ngraph::HostTensorVector& outputs, + const ngraph::HostTensorVector& inputs)>>; + EvaluatorsMap& get_evaluators_map(); + } + } +} diff --git a/ngraph/test/runtime/interpreter/int_backend.hpp b/ngraph/test/runtime/interpreter/int_backend.hpp index f4309694a19542..36270345a24d14 100644 --- a/ngraph/test/runtime/interpreter/int_backend.hpp +++ b/ngraph/test/runtime/interpreter/int_backend.hpp @@ -36,7 +36,6 @@ namespace ngraph { class INTBackend; class INTExecutable; - class INTBackendConstructor; } } } diff --git a/ngraph/test/runtime/interpreter/int_executable.cpp b/ngraph/test/runtime/interpreter/int_executable.cpp index 88506e6117b880..9fe7b5eeb40ec4 100644 --- a/ngraph/test/runtime/interpreter/int_executable.cpp +++ b/ngraph/test/runtime/interpreter/int_executable.cpp @@ -17,259 +17,95 @@ #include "int_executable.hpp" #include #include "backend_manager.hpp" +#include "evaluates_map.hpp" #include "ngraph/chrome_trace.hpp" #include "ngraph/except.hpp" -#include "ngraph/op/util/op_types.hpp" #include "ngraph/ops.hpp" -#include "ngraph/pass/manager.hpp" #include "ngraph/type/bfloat16.hpp" #include "ngraph/type/float16.hpp" #include "ngraph/util.hpp" -#include "pass/fused_op_decomposition.hpp" -#include "pass/liveness.hpp" -#include "pass/opset0_downgrade.hpp" -#include "pass/opset1_downgrade.hpp" using namespace std; using namespace ngraph; NGRAPH_SUPPRESS_DEPRECATED_START -using V5BoxEncoding = op::v5::NonMaxSuppression::BoxEncodingType; - -namespace +runtime::interpreter::INTExecutable::INTExecutable(const shared_ptr& function, + bool enable_performance_collection) + : m_is_compiled{true} + , m_performance_counters_enabled{enable_performance_collection} { - constexpr size_t boxes_port = 0; - constexpr size_t scores_port = 1; - constexpr size_t max_output_boxes_port = 2; - constexpr size_t iou_threshold_port = 3; - constexpr size_t score_threshold_port = 4; - constexpr size_t soft_nms_sigma_port = 5; - - PartialShape - infer_selected_indices_shape(const std::vector>& inputs, - int64_t max_output_boxes_per_class) - { - const auto boxes_ps = inputs[boxes_port]->get_partial_shape(); - const auto scores_ps = inputs[scores_port]->get_partial_shape(); - - // NonMaxSuppression produces triplets - // that have the following format: [batch_index, class_index, box_index] - PartialShape result = {Dimension::dynamic(), 3}; - - if (boxes_ps.rank().is_static() && scores_ps.rank().is_static()) - { - const auto num_boxes_boxes = boxes_ps[1]; - if (num_boxes_boxes.is_static() && scores_ps[0].is_static() && scores_ps[1].is_static()) - { - const auto num_boxes = num_boxes_boxes.get_length(); - const auto num_classes = scores_ps[1].get_length(); - - result[0] = std::min(num_boxes, max_output_boxes_per_class) * num_classes * - scores_ps[0].get_length(); - } - } - - return result; - } - - void normalize_corner(float* boxes, const Shape& boxes_shape) - { - size_t total_num_of_boxes = shape_size(boxes_shape) / 4; - for (size_t i = 0; i < total_num_of_boxes; ++i) - { - float* current_box = boxes + 4 * i; - - float y1 = current_box[0]; - float x1 = current_box[1]; - float y2 = current_box[2]; - float x2 = current_box[3]; - - float ymin = std::min(y1, y2); - float ymax = std::max(y1, y2); - float xmin = std::min(x1, x2); - float xmax = std::max(x1, x2); - - current_box[0] = ymin; - current_box[1] = xmin; - current_box[2] = ymax; - current_box[3] = xmax; - } - } - - void normalize_center(float* boxes, const Shape& boxes_shape) - { - size_t total_num_of_boxes = shape_size(boxes_shape) / 4; - for (size_t i = 0; i < total_num_of_boxes; ++i) - { - float* current_box = boxes + 4 * i; - - float x_center = current_box[0]; - float y_center = current_box[1]; - float width = current_box[2]; - float height = current_box[3]; - - float y1 = y_center - height / 2.0; - float x1 = x_center - width / 2.0; - float y2 = y_center + height / 2.0; - float x2 = x_center + width / 2.0; - - current_box[0] = y1; - current_box[1] = x1; - current_box[2] = y2; - current_box[3] = x2; - } - } - - void normalize_box_encoding(float* boxes, - const Shape& boxes_shape, - const V5BoxEncoding box_encoding) - { - if (box_encoding == V5BoxEncoding::CORNER) - { - normalize_corner(boxes, boxes_shape); - } - else - { - normalize_center(boxes, boxes_shape); - } - } - - std::vector get_floats(const std::shared_ptr& input, const Shape& shape) + m_function = clone_function(*function); + for (const auto& node : m_function->get_ordered_ops()) { - size_t input_size = shape_size(shape); - std::vector result(input_size); - - switch (input->get_element_type()) + // TODO: WA because of references mismatch for the operation + if (is_type(node)) { - case element::Type_t::bf16: - { - bfloat16* p = input->get_data_ptr(); - for (size_t i = 0; i < input_size; ++i) + auto gr_conv_bp_data = dynamic_pointer_cast(node); + auto num_groups = gr_conv_bp_data->input_value(1).get_shape()[0]; + auto split_filter_axis = std::make_shared( + ngraph::element::Type_t::i64, ngraph::Shape{}, std::vector{0}); + auto sliced_filter = std::make_shared( + gr_conv_bp_data->input_value(1), split_filter_axis, num_groups); + auto split_data_axis = std::make_shared( + ngraph::element::Type_t::i64, ngraph::Shape{}, std::vector{1}); + auto sliced_data = std::make_shared( + gr_conv_bp_data->input_value(0), split_data_axis, num_groups); + + NodeVector convs; + auto squeeze_filter_axis = std::make_shared( + ngraph::element::Type_t::i64, ngraph::Shape{}, std::vector{0}); + for (size_t i = 0; i < num_groups; ++i) { - result[i] = float(p[i]); + auto squeezed_filter = std::make_shared(sliced_filter->output(i), + squeeze_filter_axis); + auto conv = std::make_shared( + sliced_data->output(i), + squeezed_filter, + gr_conv_bp_data->get_strides(), + gr_conv_bp_data->get_pads_begin(), + gr_conv_bp_data->get_pads_end(), + gr_conv_bp_data->get_dilations(), + gr_conv_bp_data->get_auto_pad(), + gr_conv_bp_data->get_output_padding()); + convs.push_back(conv); } + auto concat = std::make_shared(convs, 1); + replace_node(node, concat); } - break; - case element::Type_t::f16: + else if (is_type(node)) { - float16* p = input->get_data_ptr(); - for (size_t i = 0; i < input_size; ++i) + auto gr_conv = dynamic_pointer_cast(node); + auto num_groups = gr_conv->input_value(1).get_shape()[0]; + auto split_filter_axis = std::make_shared( + ngraph::element::Type_t::i64, ngraph::Shape{}, std::vector{0}); + auto sliced_filter = std::make_shared( + gr_conv->input_value(1), split_filter_axis, num_groups); + auto split_data_axis = std::make_shared( + ngraph::element::Type_t::i64, ngraph::Shape{}, std::vector{1}); + auto sliced_data = std::make_shared( + gr_conv->input_value(0), split_data_axis, num_groups); + + NodeVector convs; + auto squeeze_filter_axis = std::make_shared( + ngraph::element::Type_t::i64, ngraph::Shape{}, std::vector{0}); + for (size_t i = 0; i < num_groups; ++i) { - result[i] = float(p[i]); + auto squeezed_filter = std::make_shared(sliced_filter->output(i), + squeeze_filter_axis); + auto conv = std::make_shared(sliced_data->output(i), + squeezed_filter, + gr_conv->get_strides(), + gr_conv->get_pads_begin(), + gr_conv->get_pads_end(), + gr_conv->get_dilations(), + gr_conv->get_auto_pad()); + convs.push_back(conv); } + auto concat = std::make_shared(convs, 1); + replace_node(node, concat); } - break; - case element::Type_t::f32: - { - float* p = input->get_data_ptr(); - memcpy(result.data(), p, input_size * sizeof(float)); - } - break; - default: throw std::runtime_error("Unsupported data type in op NonMaxSuppression-5"); break; - } - - return result; - } - - std::vector prepare_boxes_data(const std::shared_ptr& boxes, - const Shape& boxes_shape, - const V5BoxEncoding box_encoding) - { - auto result = get_floats(boxes, boxes_shape); - normalize_box_encoding(result.data(), boxes_shape, box_encoding); - return result; } - - std::vector prepare_scores_data(const std::shared_ptr& scores, - const Shape& scores_shape) - { - auto result = get_floats(scores, scores_shape); - return result; - } -} - -runtime::interpreter::INTExecutable::InfoForNMS5 - runtime::interpreter::INTExecutable::get_info_for_nms5_eval( - const op::v5::NonMaxSuppression* nms5, - const std::vector>& inputs) -{ - InfoForNMS5 result; - - result.max_output_boxes_per_class = nms5->max_boxes_output_from_input(); - result.iou_threshold = nms5->iou_threshold_from_input(); - result.score_threshold = nms5->score_threshold_from_input(); - result.soft_nms_sigma = nms5->soft_nms_sigma_from_input(); - - auto selected_indices_shape = - infer_selected_indices_shape(inputs, result.max_output_boxes_per_class); - result.out_shape = selected_indices_shape.to_shape(); - - result.boxes_shape = inputs[boxes_port]->get_shape(); - result.scores_shape = inputs[scores_port]->get_shape(); - - result.boxes_data = - prepare_boxes_data(inputs[boxes_port], result.boxes_shape, nms5->get_box_encoding()); - result.scores_data = prepare_scores_data(inputs[scores_port], result.scores_shape); - - result.out_shape_size = shape_size(result.out_shape); - - result.sort_result_descending = nms5->get_sort_result_descending(); - - result.output_type = nms5->get_output_type(); - - return result; -} - -runtime::interpreter::OP_TYPEID runtime::interpreter::INTExecutable::get_typeid(const Node& node) -{ - const NodeTypeInfo& type_info = node.get_type_info(); - // This expands the op list in op_tbl.hpp into a list of enumerations that look like this: - // {Abs::type_info, OP_TYPEID::Abs}, - // {Acos::type_info, OP_TYPEID::Acos}, - // ... - static const map type_info_map{ -#define NGRAPH_OP(NAME, NAMESPACE) {NAMESPACE::NAME::type_info, OP_TYPEID::ID_SUFFIX(NAME)}, -#include "opset_int_tbl.hpp" -#undef NGRAPH_OP - }; - OP_TYPEID rc = OP_TYPEID::UnknownOp; - - auto it = type_info_map.find(type_info); - if (it != type_info_map.end()) - { - rc = it->second; - } - return rc; -} - -runtime::interpreter::INTExecutable::INTExecutable(const shared_ptr& function, - bool enable_performance_collection) - : m_is_compiled{true} - , m_performance_counters_enabled{enable_performance_collection} -{ - m_function = clone_function(*function); - auto is_supported = [](const Node& node) { - bool retval = false; - switch (INTExecutable::get_typeid(node)) - { - case OP_TYPEID::Clamp: - case OP_TYPEID::MatMul: - case OP_TYPEID::NormalizeL2: - case OP_TYPEID::PRelu: - case OP_TYPEID::Squeeze: - case OP_TYPEID::Unsqueeze: retval = true; break; - default: break; - } - return retval; - }; - pass::Manager pass_manager; - pass_manager.register_pass(is_supported); - pass_manager.register_pass(); - pass_manager.register_pass(); - // Need to decompose any v0 fused ops, which were produced by the downgrade pass - pass_manager.register_pass(is_supported); - pass_manager.run_passes(m_function); for (auto node : m_function->get_ordered_ops()) { m_nodes.push_back(node); @@ -330,7 +166,7 @@ bool runtime::interpreter::INTExecutable::call(const vectordescription(), "Interpreter"); - if (op::is_parameter(op)) + if (dynamic_pointer_cast(op) != nullptr) { continue; } @@ -368,8 +204,9 @@ bool runtime::interpreter::INTExecutable::call(const vectorget_input_element_type(0); } - else if (is_type(op) || is_type(op) || is_type(op) || - is_type(op) || is_type(op) || is_type(op)) + else if (is_type(op) || is_type(op) || + is_type(op) || is_type(op) || + is_type(op) || is_type(op)) { // Get the type of the second input, not the first // All BinaryElementwiseComparision ops have the same type for inputs @@ -387,7 +224,7 @@ bool runtime::interpreter::INTExecutable::call(const vectorevaluate(op_outputs, op_inputs)) { - generate_calls(type, *op, op_outputs, op_inputs); + evaluate_node(op, op_outputs, op_inputs); } if (m_performance_counters_enabled) { @@ -402,40 +239,6 @@ bool runtime::interpreter::INTExecutable::call(const vector>& out, - const vector>& in) -{ - stringstream ss; - switch (type) - { - case element::Type_t::boolean: op_engine(op, out, in); break; - case element::Type_t::f32: op_engine(op, out, in); break; - case element::Type_t::f64: op_engine(op, out, in); break; - case element::Type_t::i8: op_engine(op, out, in); break; - case element::Type_t::i16: op_engine(op, out, in); break; - case element::Type_t::i32: op_engine(op, out, in); break; - case element::Type_t::i64: op_engine(op, out, in); break; - case element::Type_t::u8: op_engine(op, out, in); break; - case element::Type_t::u16: op_engine(op, out, in); break; - case element::Type_t::u32: op_engine(op, out, in); break; - case element::Type_t::u64: op_engine(op, out, in); break; - case element::Type_t::undefined: - case element::Type_t::dynamic: - case element::Type_t::u1: - case element::Type_t::bf16: - case element::Type_t::f16: - ss << "unsupported element type " << type << " op " << op.get_name(); - throw ngraph_error(ss.str()); - } -} - -void runtime::interpreter::INTExecutable::set_nan_check(bool enable) -{ - m_nan_check_enabled = enable; -} - vector runtime::interpreter::INTExecutable::get_performance_data() const { @@ -566,3 +369,28 @@ vector> } return result_tensors; } + +bool runtime::interpreter::INTExecutable::evaluate_node(const std::shared_ptr& node, + const HostTensorVector& outputs, + const HostTensorVector& inputs) const +{ + auto& map = runtime::interpreter::get_evaluators_map(); + auto it = map.find(node->get_type_info()); + bool res = false; + if (it != map.end()) + { + res = it->second(node, outputs, inputs); + if (!res) + { + throw ngraph_error(std::string("Running evaluate method for OP ") + + node->get_type_info().name + std::string(" failed!")); + } + } + else + { + throw unsupported_op( + std::string("Interpreter backend doesn't implement evaluate method for OP ") + + node->get_type_info().name); + } + return res; +} \ No newline at end of file diff --git a/ngraph/test/runtime/interpreter/int_executable.hpp b/ngraph/test/runtime/interpreter/int_executable.hpp index 8d01ec56477727..24ddafaf894eab 100644 --- a/ngraph/test/runtime/interpreter/int_executable.hpp +++ b/ngraph/test/runtime/interpreter/int_executable.hpp @@ -28,85 +28,12 @@ #include "int_backend_visibility.hpp" #include "ngraph/ops.hpp" #include "ngraph/runtime/aligned_buffer.hpp" -#include "ngraph/runtime/reference/abs.hpp" -#include "ngraph/runtime/reference/acos.hpp" -#include "ngraph/runtime/reference/asin.hpp" -#include "ngraph/runtime/reference/atan.hpp" -#include "ngraph/runtime/reference/atan2.hpp" -#include "ngraph/runtime/reference/avg_pool.hpp" -#include "ngraph/runtime/reference/batch_norm.hpp" -#include "ngraph/runtime/reference/broadcast.hpp" -#include "ngraph/runtime/reference/ceiling.hpp" -#include "ngraph/runtime/reference/concat.hpp" -#include "ngraph/runtime/reference/constant.hpp" -#include "ngraph/runtime/reference/convert.hpp" -#include "ngraph/runtime/reference/convolution.hpp" -#include "ngraph/runtime/reference/cos.hpp" -#include "ngraph/runtime/reference/cosh.hpp" -#include "ngraph/runtime/reference/ctc_greedy_decoder.hpp" -#include "ngraph/runtime/reference/ctc_loss.hpp" -#include "ngraph/runtime/reference/cum_sum.hpp" -#include "ngraph/runtime/reference/detection_output.hpp" -#include "ngraph/runtime/reference/elu.hpp" -#include "ngraph/runtime/reference/embedding_bag_offsets_sum.hpp" -#include "ngraph/runtime/reference/embedding_bag_packed_sum.hpp" -#include "ngraph/runtime/reference/embedding_segments_sum.hpp" -#include "ngraph/runtime/reference/erf.hpp" -#include "ngraph/runtime/reference/exp.hpp" -#include "ngraph/runtime/reference/extract_image_patches.hpp" -#include "ngraph/runtime/reference/floor.hpp" -#include "ngraph/runtime/reference/gather.hpp" -#include "ngraph/runtime/reference/gather_nd.hpp" -#include "ngraph/runtime/reference/gather_tree.hpp" -#include "ngraph/runtime/reference/gru_cell.hpp" #include "ngraph/runtime/reference/hard_sigmoid.hpp" -#include "ngraph/runtime/reference/log.hpp" -#include "ngraph/runtime/reference/log_softmax.hpp" -#include "ngraph/runtime/reference/lrn.hpp" -#include "ngraph/runtime/reference/lstm_cell.hpp" -#include "ngraph/runtime/reference/matmul.hpp" -#include "ngraph/runtime/reference/max.hpp" -#include "ngraph/runtime/reference/max_pool.hpp" -#include "ngraph/runtime/reference/min.hpp" -#include "ngraph/runtime/reference/negate.hpp" #include "ngraph/runtime/reference/non_max_suppression.hpp" -#include "ngraph/runtime/reference/normalize_l2.hpp" -#include "ngraph/runtime/reference/not.hpp" -#include "ngraph/runtime/reference/one_hot.hpp" -#include "ngraph/runtime/reference/pad.hpp" -#include "ngraph/runtime/reference/prior_box.hpp" -#include "ngraph/runtime/reference/product.hpp" -#include "ngraph/runtime/reference/quantize.hpp" -#include "ngraph/runtime/reference/region_yolo.hpp" -#include "ngraph/runtime/reference/relu.hpp" #include "ngraph/runtime/reference/reorg_yolo.hpp" -#include "ngraph/runtime/reference/reshape.hpp" -#include "ngraph/runtime/reference/result.hpp" -#include "ngraph/runtime/reference/reverse.hpp" -#include "ngraph/runtime/reference/reverse_sequence.hpp" -#include "ngraph/runtime/reference/rnn_cell.hpp" -#include "ngraph/runtime/reference/roi_pooling.hpp" -#include "ngraph/runtime/reference/round.hpp" -#include "ngraph/runtime/reference/scatter_nd_update.hpp" -#include "ngraph/runtime/reference/select.hpp" -#include "ngraph/runtime/reference/sequences.hpp" -#include "ngraph/runtime/reference/sigmoid.hpp" -#include "ngraph/runtime/reference/sign.hpp" -#include "ngraph/runtime/reference/sin.hpp" -#include "ngraph/runtime/reference/sinh.hpp" -#include "ngraph/runtime/reference/softmax.hpp" -#include "ngraph/runtime/reference/sqrt.hpp" -#include "ngraph/runtime/reference/sum.hpp" -#include "ngraph/runtime/reference/tan.hpp" -#include "ngraph/runtime/reference/tanh.hpp" #include "ngraph/runtime/reference/tensor_iterator.hpp" -#include "ngraph/runtime/reference/topk.hpp" #include "ngraph/runtime/tensor.hpp" #include "op/avg_pool.hpp" -#include "op/convolution.hpp" -#include "op/group_conv.hpp" - -NGRAPH_SUPPRESS_DEPRECATED_START namespace ngraph { @@ -116,19 +43,6 @@ namespace ngraph { class INTBackend; class INTExecutable; - - // This expands the op list in op_tbl.hpp into a list of enumerations that look like - // this: - // Abs, - // Acos, - // ... - enum class OP_TYPEID - { -#define NGRAPH_OP(NAME, NAMESPACE) ID_SUFFIX(NAME), -#include "opset_int_tbl.hpp" -#undef NGRAPH_OP - UnknownOp - }; } // namespace interpreter } // namespace runtime } // namespace ngraph @@ -161,25 +75,18 @@ class INTERPRETER_BACKEND_API ngraph::runtime::interpreter::INTExecutable : publ protected: std::shared_ptr get_parameter(size_t index) const; std::shared_ptr get_result(size_t index) const; - int get_alignment() const { return 64; } + bool evaluate_node(const std::shared_ptr& node, + const HostTensorVector& outputs, + const HostTensorVector& inputs) const; bool m_is_compiled = false; bool m_nan_check_enabled = false; bool m_performance_counters_enabled = false; std::shared_ptr m_function; std::unordered_map, stopwatch> m_timer_map; std::vector> m_nodes; - std::set m_unsupported_op_name_list; - - static OP_TYPEID get_typeid(const Node& node); static void perform_nan_check(const std::vector>&, const Node* op = nullptr); - - virtual void generate_calls(const element::Type& type, - const Node& op, - const std::vector>& outputs, - const std::vector>& inputs); - struct InfoForNMS5 { int64_t max_output_boxes_per_class; @@ -198,1339 +105,4 @@ class INTERPRETER_BACKEND_API ngraph::runtime::interpreter::INTExecutable : publ InfoForNMS5 get_info_for_nms5_eval(const op::v5::NonMaxSuppression* nms5, const std::vector>& inputs); - - template - void op_engine(const Node& node, - const std::vector>& out, - const std::vector>& args) - { -// We want to check that every OP_TYPEID enumeration is included in the list. -// These GCC flags enable compile-time checking so that if an enumeration -// is not in the list an error is generated. -#if defined(__GNUC__) && !(__GNUC__ == 4 && __GNUC_MINOR__ == 8) -#pragma GCC diagnostic push -#pragma GCC diagnostic error "-Wswitch" -#pragma GCC diagnostic error "-Wswitch-enum" -#endif - switch (get_typeid(node)) - { - case OP_TYPEID::Abs: - { - size_t element_count = shape_size(node.get_output_shape(0)); - reference::abs( - args[0]->get_data_ptr(), out[0]->get_data_ptr(), element_count); - break; - } - case OP_TYPEID::Acos: - { - size_t element_count = shape_size(node.get_output_shape(0)); - reference::acos( - args[0]->get_data_ptr(), out[0]->get_data_ptr(), element_count); - break; - } - case OP_TYPEID::Asin: - { - size_t element_count = shape_size(node.get_output_shape(0)); - reference::asin( - args[0]->get_data_ptr(), out[0]->get_data_ptr(), element_count); - break; - } - case OP_TYPEID::Atan: - { - size_t element_count = shape_size(node.get_output_shape(0)); - reference::atan( - args[0]->get_data_ptr(), out[0]->get_data_ptr(), element_count); - break; - } - case OP_TYPEID::Elu: - { - const op::Elu* elu_node = static_cast(&node); - - size_t element_count = shape_size(node.get_output_shape(0)); - reference::elu(args[0]->get_data_ptr(), - out[0]->get_data_ptr(), - element_count, - elu_node->get_alpha()); - break; - } - case OP_TYPEID::AvgPool: - { - const op::v0::AvgPool* avg_pool = static_cast(&node); - - reference::avg_pool(args[0]->get_data_ptr(), - out[0]->get_data_ptr(), - node.get_input_shape(0), - node.get_output_shape(0), - avg_pool->get_window_shape(), - avg_pool->get_window_movement_strides(), - avg_pool->get_padding_below(), - avg_pool->get_padding_above(), - avg_pool->get_include_padding_in_avg_computation()); - break; - } - case OP_TYPEID::BatchNormInference: - { - const ngraph::op::v0::BatchNormInference* bn = - static_cast(&node); - reference::batch_norm_inference(bn->get_eps_value(), - args[0]->get_data_ptr(), - args[1]->get_data_ptr(), - args[2]->get_data_ptr(), - args[3]->get_data_ptr(), - args[4]->get_data_ptr(), - out[0]->get_data_ptr(), - node.get_input_shape(2)); - break; - } - case OP_TYPEID::BatchNormInference_v5: - { - const ngraph::op::v5::BatchNormInference* bn = - static_cast(&node); - reference::batch_norm_inference(bn->get_eps_value(), - args[1]->get_data_ptr(), - args[2]->get_data_ptr(), - args[0]->get_data_ptr(), - args[3]->get_data_ptr(), - args[4]->get_data_ptr(), - out[0]->get_data_ptr(), - node.get_input_shape(0)); - break; - } - case OP_TYPEID::Ceiling: - { - size_t element_count = shape_size(node.get_output_shape(0)); - reference::ceiling( - args[0]->get_data_ptr(), out[0]->get_data_ptr(), element_count); - break; - } - case OP_TYPEID::Convert: - { - // const op::Convert* c = static_cast(&node); - element::Type type = node.get_element_type(); - std::stringstream ss; - size_t element_count = shape_size(node.get_output_shape(0)); - switch (type) - { - case element::Type_t::boolean: - reference::convert_to_bool( - args[0]->get_data_ptr(), out[0]->get_data_ptr(), element_count); - break; - case element::Type_t::f32: - reference::convert( - args[0]->get_data_ptr(), out[0]->get_data_ptr(), element_count); - break; - case element::Type_t::f64: - reference::convert(args[0]->get_data_ptr(), - out[0]->get_data_ptr(), - element_count); - break; - case element::Type_t::i8: - reference::convert(args[0]->get_data_ptr(), - out[0]->get_data_ptr(), - element_count); - break; - case element::Type_t::i16: - reference::convert(args[0]->get_data_ptr(), - out[0]->get_data_ptr(), - element_count); - break; - case element::Type_t::i32: - reference::convert(args[0]->get_data_ptr(), - out[0]->get_data_ptr(), - element_count); - break; - case element::Type_t::i64: - reference::convert(args[0]->get_data_ptr(), - out[0]->get_data_ptr(), - element_count); - break; - case element::Type_t::u8: - reference::convert(args[0]->get_data_ptr(), - out[0]->get_data_ptr(), - element_count); - break; - case element::Type_t::u16: - reference::convert(args[0]->get_data_ptr(), - out[0]->get_data_ptr(), - element_count); - break; - case element::Type_t::u32: - reference::convert(args[0]->get_data_ptr(), - out[0]->get_data_ptr(), - element_count); - break; - case element::Type_t::u64: - reference::convert(args[0]->get_data_ptr(), - out[0]->get_data_ptr(), - element_count); - break; - case element::Type_t::undefined: - case element::Type_t::dynamic: - case element::Type_t::u1: - case element::Type_t::bf16: - case element::Type_t::f16: - ss << "unsupported element type " << type << " op Convert"; - throw std::runtime_error(ss.str()); - } - break; - } - case OP_TYPEID::Convolution: - { - const op::v0::Convolution* c = static_cast(&node); - reference::convolution(args[0]->get_data_ptr(), - args[1]->get_data_ptr(), - out[0]->get_data_ptr(), - node.get_input_shape(0), - node.get_input_shape(1), - node.get_output_shape(0), - c->get_window_movement_strides(), - c->get_window_dilation_strides(), - c->get_padding_below(), - c->get_padding_above(), - c->get_data_dilation_strides()); - - break; - } - case OP_TYPEID::ConvolutionBackpropData: - { - // Note that args[1] and args[0] are switched here from the usual order. - const op::v0::ConvolutionBackpropData* c = - static_cast(&node); - reference::convolution_backprop_in(args[1]->get_data_ptr(), - args[0]->get_data_ptr(), - out[0]->get_data_ptr(), - c->get_input_shape(1), - c->get_input_shape(0), - c->get_data_batch_shape(), - c->get_data_dilation_strides_forward(), - c->get_window_dilation_strides_forward(), - c->compute_backward_delta_out_pad_below(), - c->compute_backward_delta_out_pad_above(), - c->get_window_movement_strides_forward()); - break; - } - case OP_TYPEID::Cos: - { - size_t element_count = shape_size(node.get_output_shape(0)); - reference::cos( - args[0]->get_data_ptr(), out[0]->get_data_ptr(), element_count); - break; - } - case OP_TYPEID::Cosh: - { - size_t element_count = shape_size(node.get_output_shape(0)); - reference::cosh( - args[0]->get_data_ptr(), out[0]->get_data_ptr(), element_count); - break; - } - case OP_TYPEID::CTCGreedyDecoder_v0: - { - const auto ctc_greedy_dec = static_cast(&node); - reference::ctc_greedy_decoder(args[0]->get_data_ptr(), - args[1]->get_data_ptr(), - out[0]->get_data_ptr(), - args[0]->get_shape(), - args[1]->get_shape(), - out[0]->get_shape(), - ctc_greedy_dec->get_ctc_merge_repeated()); - break; - } - case OP_TYPEID::CTCLoss_v4: - { - const op::v4::CTCLoss* ctc_loss = static_cast(&node); - auto t_int = node.get_input_element_type(1); - if (t_int == element::Type_t::i32) - { - reference::CTCLoss( - args[0]->get_data_ptr(), - ctc_loss->get_input_shape(0), - args[1]->get_data_ptr(), - args[2]->get_data_ptr(), - args[3]->get_data_ptr(), - args.size() > 4 ? args[4]->get_data_ptr() : nullptr, - ctc_loss->get_preprocess_collapse_repeated(), - ctc_loss->get_ctc_merge_repeated(), - ctc_loss->get_unique(), - out[0]->get_data_ptr()); - } - else if (t_int == element::Type_t::i64) - { - reference::CTCLoss( - args[0]->get_data_ptr(), - ctc_loss->get_input_shape(0), - args[1]->get_data_ptr(), - args[2]->get_data_ptr(), - args[3]->get_data_ptr(), - args.size() > 4 ? args[4]->get_data_ptr() : nullptr, - ctc_loss->get_preprocess_collapse_repeated(), - ctc_loss->get_ctc_merge_repeated(), - ctc_loss->get_unique(), - out[0]->get_data_ptr()); - } - break; - } - case OP_TYPEID::CumSum: - { - const op::CumSum* cumsum = static_cast(&node); - auto axis_et = node.get_input_element_type(1); - if (axis_et == element::Type_t::i32) - { - reference::cumsum(args[0]->get_data_ptr(), - args[1]->get_data_ptr(), - out[0]->get_data_ptr(), - node.get_input_shape(0), - cumsum->is_exclusive(), - cumsum->is_reverse()); - } - else if (axis_et == element::Type_t::i64) - { - reference::cumsum(args[0]->get_data_ptr(), - args[1]->get_data_ptr(), - out[0]->get_data_ptr(), - node.get_input_shape(0), - cumsum->is_exclusive(), - cumsum->is_reverse()); - } - break; - } - case OP_TYPEID::EmbeddingBagOffsetsSum_v3: - { - const op::EmbeddingBagOffsetsSum* embed = - static_cast(&node); - auto indicesType = embed->input(1).get_element_type(); - size_t indices_num = shape_size(embed->get_input_shape(1)); - - if (indicesType == element::Type_t::u64 || indicesType == element::Type_t::i64) - { - reference::embeddingBagOffsetsSum( - args[0]->get_data_ptr(), - args[1]->get_data_ptr(), - args[2]->get_data_ptr(), - args.size() > 3 ? args[3]->get_data_ptr() : nullptr, - args.size() > 4 ? args[4]->get_data_ptr() : nullptr, - out[0]->get_data_ptr(), - indices_num, - embed->get_shape()); - } - else if (indicesType == element::Type_t::u32 || indicesType == element::Type_t::i32) - { - reference::embeddingBagOffsetsSum( - args[0]->get_data_ptr(), - args[1]->get_data_ptr(), - args[2]->get_data_ptr(), - args.size() > 3 ? args[3]->get_data_ptr() : nullptr, - args.size() > 4 ? args[4]->get_data_ptr() : nullptr, - out[0]->get_data_ptr(), - indices_num, - embed->get_shape()); - } - else - { - throw ngraph_error(std::string("Unsupported index type ") + - indicesType.c_type_string() + - std::string(" in EmbeddingBagOffsetsSum")); - } - break; - } - case OP_TYPEID::EmbeddingBagPackedSum_v3: - { - const op::EmbeddingBagPackedSum* embed = - static_cast(&node); - auto indicesType = embed->input(1).get_element_type(); - - if (indicesType == element::Type_t::u64 || indicesType == element::Type_t::i64) - { - reference::embeddingBagPackedSum( - args[0]->get_data_ptr(), - args[1]->get_data_ptr(), - args.size() > 2 ? args[2]->get_data_ptr() : nullptr, - out[0]->get_data_ptr(), - embed->get_input_shape(1), - embed->get_shape()); - } - else if (indicesType == element::Type_t::u32 || indicesType == element::Type_t::i32) - { - reference::embeddingBagPackedSum( - args[0]->get_data_ptr(), - args[1]->get_data_ptr(), - args.size() > 2 ? args[2]->get_data_ptr() : nullptr, - out[0]->get_data_ptr(), - embed->get_input_shape(1), - embed->get_shape()); - } - else - { - throw ngraph_error(std::string("Unsupported index type ") + - indicesType.c_type_string() + - std::string(" in EmbeddingBagPackedSum")); - } - break; - } - case OP_TYPEID::EmbeddingSegmentsSum_v3: - { - const op::EmbeddingSegmentsSum* embed = - static_cast(&node); - auto indicesType = embed->input(1).get_element_type(); - size_t indices_num = shape_size(embed->get_input_shape(1)); - - if (indicesType == element::Type_t::u64 || indicesType == element::Type_t::i64) - { - reference::embeddingSegmentsSum( - args[0]->get_data_ptr(), - args[1]->get_data_ptr(), - args[2]->get_data_ptr(), - args.size() > 4 ? args[4]->get_data_ptr() : nullptr, - args.size() > 5 ? args[5]->get_data_ptr() : nullptr, - out[0]->get_data_ptr(), - embed->get_input_shape(0), - embed->get_input_shape(1), - embed->get_shape()); - } - else if (indicesType == element::Type_t::u32 || indicesType == element::Type_t::i32) - { - reference::embeddingSegmentsSum( - args[0]->get_data_ptr(), - args[1]->get_data_ptr(), - args[2]->get_data_ptr(), - args.size() > 4 ? args[4]->get_data_ptr() : nullptr, - args.size() > 5 ? args[5]->get_data_ptr() : nullptr, - out[0]->get_data_ptr(), - embed->get_input_shape(0), - embed->get_input_shape(1), - embed->get_shape()); - } - else - { - throw ngraph_error(std::string("Unsupported index type ") + - indicesType.c_type_string() + - std::string(" in EmbeddingSegmentsSum")); - } - break; - } - case OP_TYPEID::Erf: - { - size_t element_count = shape_size(node.get_output_shape(0)); - reference::erf( - args[0]->get_data_ptr(), out[0]->get_data_ptr(), element_count); - break; - } - case OP_TYPEID::ExtractImagePatches_v3: - { - const op::ExtractImagePatches* extImgPatches = - static_cast(&node); - reference::extractImagePatches(extImgPatches, - args[0]->get_data_ptr(), - out[0]->get_data_ptr(), - extImgPatches->get_input_shape(0), - extImgPatches->get_shape()); - break; - } - case OP_TYPEID::Exp: - { - size_t element_count = shape_size(node.get_output_shape(0)); - reference::exp( - args[0]->get_data_ptr(), out[0]->get_data_ptr(), element_count); - break; - } -#ifdef INTERPRETER_USE_HYBRID - case OP_TYPEID::FunctionCall: - { - auto f = static_cast(&node); - auto backend = f->get_backend(); - auto executable = f->get_executable(); - - std::vector> outputs; - std::vector> inputs; - for (const std::shared_ptr& t : out) - { - auto backend_tensor = backend->create_tensor( - t->get_element_type(), t->get_shape(), t->get_data_ptr()); - outputs.push_back(backend_tensor); - } - for (const std::shared_ptr& t : args) - { - auto backend_tensor = backend->create_tensor( - t->get_element_type(), t->get_shape(), t->get_data_ptr()); - inputs.push_back(backend_tensor); - } - executable->call(outputs, inputs); - break; - } -#endif - case OP_TYPEID::Floor: - { - size_t element_count = shape_size(node.get_output_shape(0)); - reference::floor( - args[0]->get_data_ptr(), out[0]->get_data_ptr(), element_count); - break; - } - case OP_TYPEID::GatherND_v5: - { - const op::v5::GatherND* gatherNDNode = static_cast(&node); - if (node.get_input_element_type(1) == element::Type_t::i64) - { - reference::gather_nd(args[0]->get_data_ptr(), - args[1]->get_data_ptr(), - out[0]->get_data_ptr(), - node.get_input_shape(0), - node.get_input_shape(1), - node.get_output_shape(0), - gatherNDNode->get_batch_dims()); - } - else if (node.get_input_element_type(1) == element::Type_t::i32) - { - reference::gather_nd(args[0]->get_data_ptr(), - args[1]->get_data_ptr(), - out[0]->get_data_ptr(), - node.get_input_shape(0), - node.get_input_shape(1), - node.get_output_shape(0), - gatherNDNode->get_batch_dims()); - } - else - { - throw ngraph_error("Unexpected type"); - } - break; - } - case OP_TYPEID::GRUCell_v3: - { - const op::v3::GRUCell* gru_cell = static_cast(&node); - runtime::reference::gru_cell(args[0]->get_data_ptr(), - args[0]->get_shape(), - args[1]->get_data_ptr(), - args[1]->get_shape(), - args[2]->get_data_ptr(), - args[2]->get_shape(), - args[3]->get_data_ptr(), - args[3]->get_shape(), - args[4]->get_data_ptr(), - args[4]->get_shape(), - out[0]->get_data_ptr(), - gru_cell->get_activations()[0], - gru_cell->get_activations()[1], - gru_cell->get_clip(), - gru_cell->get_linear_before_reset()); - break; - } - case OP_TYPEID::LSTMCell_v0: - case OP_TYPEID::LSTMCell_v4: - { - const op::v4::LSTMCell* lstm_cell = static_cast(&node); - runtime::reference::lstm_cell(args[0]->get_data_ptr(), - args[0]->get_shape(), - args[1]->get_data_ptr(), - args[1]->get_shape(), - args[2]->get_data_ptr(), - args[2]->get_shape(), - args[3]->get_data_ptr(), - args[3]->get_shape(), - args[4]->get_data_ptr(), - args[4]->get_shape(), - args[5]->get_data_ptr(), - args[5]->get_shape(), - out[0]->get_data_ptr(), - out[1]->get_data_ptr(), - lstm_cell->get_activations()[0], - lstm_cell->get_activations()[1], - lstm_cell->get_activations()[2], - lstm_cell->get_clip()); - break; - } - case OP_TYPEID::RNNCell_v0: - { - const op::v0::RNNCell* rnn_cell = static_cast(&node); - runtime::reference::rnn_cell(args[0]->get_data_ptr(), - args[0]->get_shape(), - args[1]->get_data_ptr(), - args[1]->get_shape(), - args[2]->get_data_ptr(), - args[2]->get_shape(), - args[3]->get_data_ptr(), - args[3]->get_shape(), - args[4]->get_data_ptr(), - args[4]->get_shape(), - out[0]->get_data_ptr(), - rnn_cell->get_activations()[0], - rnn_cell->get_clip()); - break; - } - case OP_TYPEID::LSTMSequence: - case OP_TYPEID::LSTMSequence_v5: - { - auto lstm_seq = static_cast(&node); - auto type = args[3]->get_element_type(); - if (type == element::Type_t::i64 || type == element::Type_t::u64) - { - runtime::reference::lstm_sequence(args[0]->get_data_ptr(), - args[0]->get_shape(), - args[1]->get_data_ptr(), - args[1]->get_shape(), - args[2]->get_data_ptr(), - args[2]->get_shape(), - args[3]->get_data_ptr(), - args[3]->get_shape(), - args[4]->get_data_ptr(), - args[4]->get_shape(), - args[5]->get_data_ptr(), - args[5]->get_shape(), - args[6]->get_data_ptr(), - args[6]->get_shape(), - out[0]->get_data_ptr(), - out[1]->get_data_ptr(), - out[2]->get_data_ptr(), - lstm_seq->get_activations()[0], - lstm_seq->get_activations()[1], - lstm_seq->get_activations()[2], - lstm_seq->get_clip(), - lstm_seq->get_direction()); - } - else if (type == element::Type_t::i32 || type == element::Type_t::u32) - { - runtime::reference::lstm_sequence(args[0]->get_data_ptr(), - args[0]->get_shape(), - args[1]->get_data_ptr(), - args[1]->get_shape(), - args[2]->get_data_ptr(), - args[2]->get_shape(), - args[3]->get_data_ptr(), - args[3]->get_shape(), - args[4]->get_data_ptr(), - args[4]->get_shape(), - args[5]->get_data_ptr(), - args[5]->get_shape(), - args[6]->get_data_ptr(), - args[6]->get_shape(), - out[0]->get_data_ptr(), - out[1]->get_data_ptr(), - out[2]->get_data_ptr(), - lstm_seq->get_activations()[0], - lstm_seq->get_activations()[1], - lstm_seq->get_activations()[2], - lstm_seq->get_clip(), - lstm_seq->get_direction()); - } - else - { - std::stringstream ss; - ss << "unsupported element type " << type << " op LSTMSequence"; - throw std::runtime_error(ss.str()); - } - break; - } - case OP_TYPEID::GRUSequence_v5: - { - auto gru_seq = static_cast(&node); - auto type = args[2]->get_element_type(); - if (type == element::Type_t::i64 || type == element::Type_t::u64) - { - runtime::reference::gru_sequence(args[0]->get_data_ptr(), - args[0]->get_shape(), - args[1]->get_data_ptr(), - args[1]->get_shape(), - args[2]->get_data_ptr(), - args[2]->get_shape(), - args[3]->get_data_ptr(), - args[3]->get_shape(), - args[4]->get_data_ptr(), - args[4]->get_shape(), - args[5]->get_data_ptr(), - args[5]->get_shape(), - out[0]->get_data_ptr(), - out[1]->get_data_ptr(), - gru_seq->get_activations()[0], - gru_seq->get_activations()[1], - gru_seq->get_clip(), - gru_seq->get_direction(), - gru_seq->get_linear_before_reset()); - } - else if (type == element::Type_t::i32 || type == element::Type_t::u32) - { - runtime::reference::gru_sequence(args[0]->get_data_ptr(), - args[0]->get_shape(), - args[1]->get_data_ptr(), - args[1]->get_shape(), - args[2]->get_data_ptr(), - args[2]->get_shape(), - args[3]->get_data_ptr(), - args[3]->get_shape(), - args[4]->get_data_ptr(), - args[4]->get_shape(), - args[5]->get_data_ptr(), - args[5]->get_shape(), - out[0]->get_data_ptr(), - out[1]->get_data_ptr(), - gru_seq->get_activations()[0], - gru_seq->get_activations()[1], - gru_seq->get_clip(), - gru_seq->get_direction(), - gru_seq->get_linear_before_reset()); - } - else - { - std::stringstream ss; - ss << "unsupported element type " << type << " op GRUSequence"; - throw std::runtime_error(ss.str()); - } - break; - } - case OP_TYPEID::HardSigmoid: - { - size_t element_cout = shape_size(node.get_output_shape(0)); - const T alpha = args[1]->get_data_ptr()[0]; - const T beta = args[2]->get_data_ptr()[0]; - runtime::reference::hard_sigmoid(args[0]->get_data_ptr(), - alpha, - beta, - out[0]->get_data_ptr(), - element_cout); - break; - } - - case OP_TYPEID::RNNSequence_v5: - { - auto rnn_seq = static_cast(&node); - auto type = args[2]->get_element_type(); - if (type == element::Type_t::i64 || type == element::Type_t::u64) - { - runtime::reference::rnn_sequence(args[0]->get_data_ptr(), - args[0]->get_shape(), - args[1]->get_data_ptr(), - args[1]->get_shape(), - args[2]->get_data_ptr(), - args[2]->get_shape(), - args[3]->get_data_ptr(), - args[3]->get_shape(), - args[4]->get_data_ptr(), - args[4]->get_shape(), - args[5]->get_data_ptr(), - args[5]->get_shape(), - out[0]->get_data_ptr(), - out[1]->get_data_ptr(), - rnn_seq->get_activations()[0], - rnn_seq->get_clip(), - rnn_seq->get_direction()); - } - else if (type == element::Type_t::i32 || type == element::Type_t::u32) - { - runtime::reference::rnn_sequence(args[0]->get_data_ptr(), - args[0]->get_shape(), - args[1]->get_data_ptr(), - args[1]->get_shape(), - args[2]->get_data_ptr(), - args[2]->get_shape(), - args[3]->get_data_ptr(), - args[3]->get_shape(), - args[4]->get_data_ptr(), - args[4]->get_shape(), - args[5]->get_data_ptr(), - args[5]->get_shape(), - out[0]->get_data_ptr(), - out[1]->get_data_ptr(), - rnn_seq->get_activations()[0], - rnn_seq->get_clip(), - rnn_seq->get_direction()); - } - else - { - std::stringstream ss; - ss << "unsupported element type " << type << " op RNNSequence"; - throw std::runtime_error(ss.str()); - } - break; - } - case OP_TYPEID::Log: - { - size_t element_count = shape_size(node.get_output_shape(0)); - reference::log( - args[0]->get_data_ptr(), out[0]->get_data_ptr(), element_count); - break; - } - case OP_TYPEID::LogSoftmax_v5: - { - const op::v5::LogSoftmax* log_softmax = static_cast(&node); - int64_t i_axis = log_softmax->get_axis(); - if (i_axis < 0) - { - i_axis += args[0]->get_partial_shape().rank().get_length(); - } - reference::log_softmax(args[0]->get_data_ptr(), - out[0]->get_data_ptr(), - node.get_output_shape(0), - AxisSet{(size_t)i_axis}); - break; - } - case OP_TYPEID::LRN: - { - const op::LRN* lrn = static_cast(&node); - reference::lrn(args[0]->get_data_ptr(), - lrn->get_reduction_axes(), - out[0]->get_data_ptr(), - node.get_input_shape(0), - lrn->get_alpha(), - lrn->get_beta(), - lrn->get_bias(), - lrn->get_nsize()); - break; - } - case OP_TYPEID::Negative: - { - size_t element_count = shape_size(node.get_output_shape(0)); - reference::negate( - args[0]->get_data_ptr(), out[0]->get_data_ptr(), element_count); - break; - } - case OP_TYPEID::LogicalNot_v1: - { - size_t element_count = shape_size(node.get_output_shape(0)); - reference::logical_not( - args[0]->get_data_ptr(), out[0]->get_data_ptr(), element_count); - break; - } - case OP_TYPEID::OneHot_v1: - { - const op::v1::OneHot* oh = static_cast(&node); - T on_value = args[2]->get_data_ptr()[0]; - T off_value = args[3]->get_data_ptr()[0]; - - switch (args[0]->get_element_type()) - { - case element::Type_t::i8: - reference::one_hot(args[0]->get_data_ptr(), - out[0]->get_data_ptr(), - node.get_input_shape(0), - node.get_output_shape(0), - oh->get_axis(), - on_value, - off_value); - break; - case element::Type_t::i16: - reference::one_hot(args[0]->get_data_ptr(), - out[0]->get_data_ptr(), - node.get_input_shape(0), - node.get_output_shape(0), - oh->get_axis(), - on_value, - off_value); - break; - case element::Type_t::i32: - reference::one_hot(args[0]->get_data_ptr(), - out[0]->get_data_ptr(), - node.get_input_shape(0), - node.get_output_shape(0), - oh->get_axis(), - on_value, - off_value); - break; - case element::Type_t::i64: - reference::one_hot(args[0]->get_data_ptr(), - out[0]->get_data_ptr(), - node.get_input_shape(0), - node.get_output_shape(0), - oh->get_axis(), - on_value, - off_value); - break; - case element::Type_t::u8: - reference::one_hot(args[0]->get_data_ptr(), - out[0]->get_data_ptr(), - node.get_input_shape(0), - node.get_output_shape(0), - oh->get_axis(), - on_value, - off_value); - break; - case element::Type_t::u16: - reference::one_hot(args[0]->get_data_ptr(), - out[0]->get_data_ptr(), - node.get_input_shape(0), - node.get_output_shape(0), - oh->get_axis(), - on_value, - off_value); - break; - case element::Type_t::u32: - reference::one_hot(args[0]->get_data_ptr(), - out[0]->get_data_ptr(), - node.get_input_shape(0), - node.get_output_shape(0), - oh->get_axis(), - on_value, - off_value); - break; - case element::Type_t::u64: - reference::one_hot(args[0]->get_data_ptr(), - out[0]->get_data_ptr(), - node.get_input_shape(0), - node.get_output_shape(0), - oh->get_axis(), - on_value, - off_value); - break; - case element::Type_t::undefined: - case element::Type_t::dynamic: - case element::Type_t::u1: - case element::Type_t::boolean: - case element::Type_t::bf16: - case element::Type_t::f16: - case element::Type_t::f32: - case element::Type_t::f64: - default: NGRAPH_CHECK(false, "Indices input element type must be integer"); - } - - break; - } - case OP_TYPEID::Parameter: break; - case OP_TYPEID::PriorBox: - { - const op::PriorBox* pbox = static_cast(&node); - runtime::reference::prior_box(args[0]->get_data_ptr(), - args[1]->get_data_ptr(), - out[0]->get_data_ptr(), - out[0]->get_shape(), - pbox->get_attrs()); - break; - } - case OP_TYPEID::ReorgYolo_v0: - { - const op::v0::ReorgYolo* reorg_yolo = static_cast(&node); - runtime::reference::reorg_yolo(args[0]->get_data_ptr(), - out[0]->get_data_ptr(), - args[0]->get_shape(), - reorg_yolo->get_strides().at(0), - args[0]->get_element_type().size()); - break; - } - case OP_TYPEID::Quantize: - { - const op::Quantize* quantize = static_cast(&node); - auto type = quantize->get_element_type(); - - if (type == element::Type_t::u8) - { - reference::quantize(args[0]->get_data_ptr(), - args[1]->get_data_ptr(), - args[2]->get_data_ptr(), - out[0]->get_data_ptr(), - node.get_input_shape(0), - node.get_input_shape(1), - quantize->get_axes(), - quantize->get_round_mode()); - } - else if (type == element::Type_t::i8) - { - reference::quantize(args[0]->get_data_ptr(), - args[1]->get_data_ptr(), - args[2]->get_data_ptr(), - out[0]->get_data_ptr(), - node.get_input_shape(0), - node.get_input_shape(1), - quantize->get_axes(), - quantize->get_round_mode()); - } - else if (type == element::Type_t::i32) - { - reference::quantize(args[0]->get_data_ptr(), - args[1]->get_data_ptr(), - args[2]->get_data_ptr(), - out[0]->get_data_ptr(), - node.get_input_shape(0), - node.get_input_shape(1), - quantize->get_axes(), - quantize->get_round_mode()); - } - else - { - std::stringstream ss; - ss << "unsupported element type " << type << " op Quantize"; - throw std::runtime_error(ss.str()); - } - - break; - } - case OP_TYPEID::RegionYolo_v0: - { - const op::RegionYolo* region_yolo = static_cast(&node); - reference::region_yolo(args[0]->get_data_ptr(), - out[0]->get_data_ptr(), - args[0]->get_shape(), - region_yolo->get_num_coords(), - region_yolo->get_num_classes(), - region_yolo->get_num_regions(), - region_yolo->get_do_softmax(), - region_yolo->get_mask()); - break; - } - case OP_TYPEID::Relu: - { - size_t element_count = shape_size(node.get_output_shape(0)); - reference::relu( - args[0]->get_data_ptr(), out[0]->get_data_ptr(), element_count); - break; - } - case OP_TYPEID::ReverseSequence: - { - const op::ReverseSequence* reverse = static_cast(&node); - - if (node.get_input_element_type(1) == element::Type_t::i32) - { - reference::reverse_sequence(args[0]->get_data_ptr(), - out[0]->get_data_ptr(), - node.get_input_shape(0), - reverse->get_batch_axis(), - reverse->get_sequence_axis(), - args[1]->get_data_ptr()); - } - else if (node.get_input_element_type(1) == element::Type_t::i64) - { - reference::reverse_sequence(args[0]->get_data_ptr(), - out[0]->get_data_ptr(), - node.get_input_shape(0), - reverse->get_batch_axis(), - reverse->get_sequence_axis(), - args[1]->get_data_ptr()); - } - else - { - throw ngraph_error("only int32 indices are supported"); - } - break; - } - case OP_TYPEID::ROIPooling_v0: - { - const op::ROIPooling* roi_pooling = static_cast(&node); - reference::roi_pooling(args[0]->get_data_ptr(), - args[1]->get_data_ptr(), - out[0]->get_data_ptr(), - node.get_input_shape(0), - node.get_input_shape(1), - node.get_output_shape(0), - roi_pooling->get_spatial_scale(), - roi_pooling->get_method()); - break; - } - case OP_TYPEID::Select: - { - size_t element_count = shape_size(node.get_output_shape(0)); - reference::select(args[0]->get_data_ptr(), - args[1]->get_data_ptr(), - args[2]->get_data_ptr(), - out[0]->get_data_ptr(), - element_count); - break; - } - case OP_TYPEID::Sigmoid: - { - size_t element_count = shape_size(node.get_output_shape(0)); - reference::sigmoid( - args[0]->get_data_ptr(), out[0]->get_data_ptr(), element_count); - break; - } - case OP_TYPEID::Sign: - { - size_t element_count = shape_size(node.get_output_shape(0)); - reference::sign( - args[0]->get_data_ptr(), out[0]->get_data_ptr(), element_count); - break; - } - case OP_TYPEID::Sin: - { - size_t element_count = shape_size(node.get_output_shape(0)); - reference::sin( - args[0]->get_data_ptr(), out[0]->get_data_ptr(), element_count); - break; - } - case OP_TYPEID::Sinh: - { - size_t element_count = shape_size(node.get_output_shape(0)); - reference::sinh( - args[0]->get_data_ptr(), out[0]->get_data_ptr(), element_count); - break; - } - case OP_TYPEID::Sqrt: - { - size_t element_count = shape_size(node.get_output_shape(0)); - reference::sqrt( - args[0]->get_data_ptr(), out[0]->get_data_ptr(), element_count); - break; - } - case OP_TYPEID::Tan: - { - size_t element_count = shape_size(node.get_output_shape(0)); - reference::tan( - args[0]->get_data_ptr(), out[0]->get_data_ptr(), element_count); - break; - } - case OP_TYPEID::Tanh: - { - size_t element_count = shape_size(node.get_output_shape(0)); - reference::tanh( - args[0]->get_data_ptr(), out[0]->get_data_ptr(), element_count); - break; - } - case OP_TYPEID::TensorIterator: - { - auto ti = dynamic_cast(node); - - reference::custom_evaluate_function evaluate = - [](const std::shared_ptr& function, - const HostTensorVector& inputs, - HostTensorVector& outputs) -> void { - const auto& parameters = function->get_parameters(); - const auto& parametersNumber = parameters.size(); - const auto& inputsNumber = inputs.size(); - NGRAPH_CHECK(parametersNumber == inputsNumber, - "Got function (", - function->get_friendly_name(), - ") with ", - parametersNumber, - " parameters, but ", - inputsNumber, - " input blobs"); - - auto inputTensors = std::vector>{}; - for (const auto& parameter : parameters) - { - const auto& parameterIndex = function->get_parameter_index(parameter); - const auto& parameterShape = parameter->get_shape(); - const auto& parameterType = parameter->get_element_type(); - const auto& parameterSize = shape_size(parameterShape) * parameterType.size(); - - const auto& input = inputs[parameterIndex]; - const auto& inputSize = input->get_size_in_bytes(); - NGRAPH_CHECK(parameterSize == inputSize, - "Got parameter (", - parameter->get_friendly_name(), - ") of size ", - parameterSize, - " bytes, but corresponding input with index ", - parameterIndex, - " has ", - inputSize, - " bytes"); - - auto tensor = - std::make_shared(parameterType, parameterShape); - tensor->write(input->get_data_ptr(), parameterSize); - inputTensors.push_back(tensor); - } - - const auto& results = function->get_results(); - std::vector> outputTensors; - outputTensors.reserve(results.size()); - for (size_t i = 0; i < results.size(); ++i) - { - outputTensors.push_back(std::make_shared()); - } - runtime::Backend::set_backend_shared_library_search_directory(""); - auto backend = runtime::Backend::create("INTERPRETER"); - auto handle = backend->compile(function); - handle->call_with_validate(outputTensors, inputTensors); - - outputs.reserve(outputTensors.size()); - for (const auto& tensor : outputTensors) - { - auto host_tensor = static_pointer_cast(tensor); - outputs.push_back(host_tensor); - } - }; - reference::tensor_iterator(ti.get_num_iterations(), - ti.get_function(), - ti.get_output_descriptions(), - ti.get_input_descriptions(), - out, - args, - evaluate); - break; - } - case OP_TYPEID::DetectionOutput_v0: - { - const op::DetectionOutput* detOut = static_cast(&node); - reference::referenceDetectionOutput refDetOut( - detOut->get_attrs(), node.get_input_shape(0), node.get_input_shape(2)); - if (node.get_input_size() == 3) - { - refDetOut.run(args[0]->get_data_ptr(), - args[1]->get_data_ptr(), - args[2]->get_data_ptr(), - nullptr, - nullptr, - out[0]->get_data_ptr()); - } - else if (node.get_input_size() == 5) - { - refDetOut.run(args[0]->get_data_ptr(), - args[1]->get_data_ptr(), - args[2]->get_data_ptr(), - args[3]->get_data_ptr(), - args[4]->get_data_ptr(), - out[0]->get_data_ptr()); - } - else - { - throw ngraph_error("DetectionOutput layer supports only 3 or 5 inputs"); - } - - break; - } - case OP_TYPEID::ScatterNDUpdate_v3: - { - const op::ScatterNDUpdate* scatterNDUpd = - static_cast(&node); - auto idxType = scatterNDUpd->get_input_element_type(1); - if (idxType == element::Type_t::i32) - { - reference::scatterNdUpdate(args[0]->get_data_ptr(), - args[1]->get_data_ptr(), - args[2]->get_data_ptr(), - out[0]->get_data_ptr(), - node.get_input_shape(0), - node.get_input_shape(1), - node.get_input_shape(2)); - } - else if (idxType == element::Type_t::i64) - { - reference::scatterNdUpdate(args[0]->get_data_ptr(), - args[1]->get_data_ptr(), - args[2]->get_data_ptr(), - out[0]->get_data_ptr(), - node.get_input_shape(0), - node.get_input_shape(1), - node.get_input_shape(2)); - } - else - { - throw ngraph_error( - "ScatterNDUpdate layer support only i32 and i64 'indices' input precision!"); - } - - break; - } - case OP_TYPEID::GatherTree_v1: - { - reference::gather_tree(args[0]->get_data_ptr(), - args[1]->get_data_ptr(), - args[2]->get_data_ptr(), - args[3]->get_data_ptr(), - out[0]->get_data_ptr(), - node.get_input_shape(0), - node.get_input_shape(1), - node.get_input_shape(2), - node.get_input_shape(3), - args[1]->get_element_type()); - break; - } - case OP_TYPEID::NormalizeL2: - { - const op::NormalizeL2* norm = static_cast(&node); - reference::normalize_l2(args[0]->get_data_ptr(), - out[0]->get_data_ptr(), - node.get_input_shape(0), - norm->get_reduction_axes(), - norm->get_eps(), - norm->get_eps_mode()); - break; - } - case OP_TYPEID::NonMaxSuppression_v5: - { - const op::v5::NonMaxSuppression* nms = - static_cast(&node); - - auto info = get_info_for_nms5_eval(nms, args); - - std::vector selected_indices(info.out_shape_size); - std::vector selected_scores(info.out_shape_size); - int64_t valid_outputs = 0; - - reference::non_max_suppression(info.boxes_data.data(), - info.boxes_shape, - info.scores_data.data(), - info.scores_shape, - info.max_output_boxes_per_class, - info.iou_threshold, - info.score_threshold, - info.soft_nms_sigma, - selected_indices.data(), - info.out_shape, - selected_scores.data(), - info.out_shape, - &valid_outputs, - info.sort_result_descending); - - auto selected_scores_type = (args.size() < 4) ? element::Type(element::Type_t::f32) - : args[3]->get_element_type(); - - reference::nms5_postprocessing(out, - info.output_type, - selected_indices, - selected_scores, - valid_outputs, - selected_scores_type); - break; - } - - // Fused Ops are not supported in interpreter. They need to be decomposed before execution - case OP_TYPEID::DepthToSpace: - case OP_TYPEID::FakeQuantize: - case OP_TYPEID::Gather: - case OP_TYPEID::Gelu: - case OP_TYPEID::GRN: - case OP_TYPEID::GroupConvolution: - case OP_TYPEID::GroupConvolutionBackpropData: - case OP_TYPEID::Interpolate: - case OP_TYPEID::MVN: - case OP_TYPEID::PRelu: - case OP_TYPEID::ScatterUpdate_v3: - case OP_TYPEID::Selu: - case OP_TYPEID::ShuffleChannels: - case OP_TYPEID::SpaceToDepth: - case OP_TYPEID::SquaredDifference: - case OP_TYPEID::Tile: - case OP_TYPEID::UnknownOp: - throw unsupported_op("Unsupported op '" + node.description() + "'"); - case OP_TYPEID::Add: - case OP_TYPEID::Broadcast: - case OP_TYPEID::Clamp: - case OP_TYPEID::Concat: - case OP_TYPEID::Constant: - case OP_TYPEID::Divide: - case OP_TYPEID::Equal: - case OP_TYPEID::Greater: - case OP_TYPEID::GreaterEq: - case OP_TYPEID::Less: - case OP_TYPEID::LessEq: - case OP_TYPEID::LessEqual_v1: - case OP_TYPEID::LogicalAnd_v1: - case OP_TYPEID::LogicalOr_v1: - case OP_TYPEID::LogicalXor_v1: - case OP_TYPEID::Loop_v5: - case OP_TYPEID::MatMul: - case OP_TYPEID::Maximum: - case OP_TYPEID::Minimum: - case OP_TYPEID::Multiply: - case OP_TYPEID::NonZero_v3: - case OP_TYPEID::NotEqual: - case OP_TYPEID::Power: - case OP_TYPEID::Range: - case OP_TYPEID::Reshape_v1: - case OP_TYPEID::Result: - case OP_TYPEID::Reverse_v1: - case OP_TYPEID::Round_v5: - case OP_TYPEID::ShapeOf_v3: - case OP_TYPEID::ShapeOf: - case OP_TYPEID::Softmax_v1: - case OP_TYPEID::Split_v1: - case OP_TYPEID::Squeeze: - case OP_TYPEID::Subtract: - case OP_TYPEID::Unsqueeze: - case OP_TYPEID::Xor: - // These ops are handled by op evaluators so nothing to do - break; -#if defined(__GNUC__) && !(__GNUC__ == 4 && __GNUC_MINOR__ == 8) -#pragma GCC diagnostic pop -#endif - } - } }; - -NGRAPH_SUPPRESS_DEPRECATED_END diff --git a/ngraph/test/runtime/interpreter/opset_int_tbl.hpp b/ngraph/test/runtime/interpreter/opset_int_tbl.hpp index 985070bc251a46..85d25805282e42 100644 --- a/ngraph/test/runtime/interpreter/opset_int_tbl.hpp +++ b/ngraph/test/runtime/interpreter/opset_int_tbl.hpp @@ -14,59 +14,74 @@ // limitations under the License. //***************************************************************************** -#define ID_SUFFIX(NAME) NAME -#include "opset0_tbl.hpp" -#undef ID_SUFFIX +#ifndef NGRAPH_OP +#warning "NGRAPH_OP not defined" +#define NGRAPH_OP(x, y) +#endif -#define ID_SUFFIX(NAME) NAME##_v0 -NGRAPH_OP(CTCGreedyDecoder, ngraph::op::v0) +NGRAPH_OP(Abs, op::v0) +NGRAPH_OP(BatchNormInference, op::v0) +NGRAPH_OP(Ceiling, op::v0) +NGRAPH_OP(Convert, op::v0) +NGRAPH_OP(CTCGreedyDecoder, op::v0) +NGRAPH_OP(CumSum, ngraph::op::v0) NGRAPH_OP(DetectionOutput, op::v0) -NGRAPH_OP(LSTMCell, op::v0) +NGRAPH_OP(Elu, op::v0) +NGRAPH_OP(FakeQuantize, op::v0) +NGRAPH_OP(Gelu, op::v0) +NGRAPH_OP(GRN, op::v0) +NGRAPH_OP(HardSigmoid, op::v0) +NGRAPH_OP(LRN, ngraph::op::v0) +NGRAPH_OP(MVN, ngraph::op::v0) +NGRAPH_OP(NormalizeL2, op::v0) +NGRAPH_OP(PriorBox, ngraph::op::v0) NGRAPH_OP(RegionYolo, op::v0) +NGRAPH_OP(Relu, op::v0) NGRAPH_OP(ReorgYolo, op::v0) +NGRAPH_OP(ReverseSequence, op::v0) NGRAPH_OP(RNNCell, op::v0) +NGRAPH_OP(Selu, op::v0) +NGRAPH_OP(Sign, op::v0) +NGRAPH_OP(SquaredDifference, op::v0) +NGRAPH_OP(TensorIterator, op::v0) NGRAPH_OP(ROIPooling, op::v0) -#undef ID_SUFFIX -#define ID_SUFFIX(NAME) NAME##_v1 +NGRAPH_OP(AvgPool, op::v1) +NGRAPH_OP(Convolution, ngraph::op::v1) +NGRAPH_OP(ConvolutionBackpropData, ngraph::op::v1) NGRAPH_OP(LessEqual, op::v1) NGRAPH_OP(LogicalAnd, op::v1) NGRAPH_OP(LogicalOr, op::v1) NGRAPH_OP(LogicalXor, op::v1) NGRAPH_OP(LogicalNot, op::v1) -NGRAPH_OP(GatherTree, op::v1) +NGRAPH_OP(MaxPool, op::v1) +NGRAPH_OP(Mod, op::v1) NGRAPH_OP(OneHot, op::v1) -NGRAPH_OP(Softmax, op::v1) +NGRAPH_OP(Pad, op::v1) NGRAPH_OP(Split, op::v1) NGRAPH_OP(Reshape, op::v1) -NGRAPH_OP(Reverse, op::v1) -#undef ID_SUFFIX +NGRAPH_OP(Select, op::v1) +NGRAPH_OP(GatherTree, op::v1) -#define ID_SUFFIX(NAME) NAME##_v3 -NGRAPH_OP(GRUCell, op::v3) -NGRAPH_OP(EmbeddingBagOffsetsSum, op::v3) -NGRAPH_OP(EmbeddingBagPackedSum, op::v3) -NGRAPH_OP(EmbeddingSegmentsSum, op::v3) +NGRAPH_OP(EmbeddingBagOffsetsSum, ngraph::op::v3) +NGRAPH_OP(EmbeddingBagPackedSum, ngraph::op::v3) NGRAPH_OP(ExtractImagePatches, op::v3) -NGRAPH_OP(ShapeOf, op::v3) +NGRAPH_OP(EmbeddingSegmentsSum, ngraph::op::v3) +NGRAPH_OP(GRUCell, ngraph::op::v3) NGRAPH_OP(NonZero, op::v3) NGRAPH_OP(ScatterNDUpdate, op::v3) -NGRAPH_OP(ScatterUpdate, op::v3) -#undef ID_SUFFIX +NGRAPH_OP(ShapeOf, op::v3) -#define ID_SUFFIX(NAME) NAME##_v4 NGRAPH_OP(CTCLoss, op::v4) NGRAPH_OP(LSTMCell, op::v4) -#undef ID_SUFFIX -#define ID_SUFFIX(NAME) NAME##_v5 +NGRAPH_OP(BatchNormInference, op::v5) NGRAPH_OP(GatherND, op::v5) NGRAPH_OP(GRUSequence, op::v5) -NGRAPH_OP(BatchNormInference, op::v5) NGRAPH_OP(LogSoftmax, op::v5) +NGRAPH_OP(LSTMSequence, op::v5) NGRAPH_OP(Loop, op::v5) NGRAPH_OP(LSTMSequence, op::v5) NGRAPH_OP(NonMaxSuppression, op::v5) NGRAPH_OP(RNNSequence, op::v5) NGRAPH_OP(Round, op::v5) -#undef ID_SUFFIX diff --git a/ngraph/test/runtime/opset0.hpp b/ngraph/test/runtime/interpreter/reference/elu.hpp similarity index 65% rename from ngraph/test/runtime/opset0.hpp rename to ngraph/test/runtime/interpreter/reference/elu.hpp index 727daad8023167..d04b4c3a88abdc 100644 --- a/ngraph/test/runtime/opset0.hpp +++ b/ngraph/test/runtime/interpreter/reference/elu.hpp @@ -16,23 +16,23 @@ #pragma once -#include "ngraph/ops.hpp" -#include "op/avg_pool.hpp" -#include "op/convolution.hpp" -#include "op/group_conv.hpp" +#include +#include namespace ngraph { - NGRAPH_SUPPRESS_DEPRECATED_START - namespace opset0 + namespace runtime { -#ifdef NGRAPH_OP -#include "opset0_tbl.hpp" -#else -#define NGRAPH_OP(a, b) using b::a; -#include "opset0_tbl.hpp" -#undef NGRAPH_OP -#endif + namespace reference + { + template + void elu(const T* arg, T* out, size_t count, double alpha) + { + for (size_t i = 0; i < count; i++) + { + out[i] = arg[i] < T(0) ? T(alpha * (std::exp(arg[i]) - 1.0)) : arg[i]; + } + } + } } - NGRAPH_SUPPRESS_DEPRECATED_END -} +} \ No newline at end of file diff --git a/ngraph/test/runtime/interpreter/reference/gelu.hpp b/ngraph/test/runtime/interpreter/reference/gelu.hpp new file mode 100644 index 00000000000000..0d879b61b2969a --- /dev/null +++ b/ngraph/test/runtime/interpreter/reference/gelu.hpp @@ -0,0 +1,38 @@ +//***************************************************************************** +// Copyright 2020 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//***************************************************************************** + +#pragma once + +#include +#include + +namespace ngraph +{ + namespace runtime + { + namespace reference + { + template + void gelu(const T* arg, T* out, size_t count) + { + for (size_t i = 0; i < count; i++) + { + out[i] = 0.5 * arg[i] * (1 + erf(arg[i] / std::sqrt(2))); + } + } + } + } +} diff --git a/ngraph/test/runtime/interpreter/reference/grn.hpp b/ngraph/test/runtime/interpreter/reference/grn.hpp new file mode 100644 index 00000000000000..31db5cc39217e0 --- /dev/null +++ b/ngraph/test/runtime/interpreter/reference/grn.hpp @@ -0,0 +1,34 @@ +//***************************************************************************** +// Copyright 2017-2020 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//***************************************************************************** + +#pragma once + +#include "ngraph/runtime/reference/normalize_l2.hpp" + +namespace ngraph +{ + namespace runtime + { + namespace reference + { + template + void grn(const T* data, T* out, float bias, const Shape& data_shape) + { + normalize_l2(data, out, data_shape, {1}, bias, op::EpsMode::ADD); + } + } // namespace reference + } // namespace runtime +} // namespace ngraph diff --git a/ngraph/test/runtime/interpreter/reference/mod.hpp b/ngraph/test/runtime/interpreter/reference/mod.hpp new file mode 100644 index 00000000000000..134e052fbc8c46 --- /dev/null +++ b/ngraph/test/runtime/interpreter/reference/mod.hpp @@ -0,0 +1,45 @@ +//***************************************************************************** +// Copyright 2020 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//***************************************************************************** + +#pragma once + +#include +#include + +#include "ngraph/runtime/reference/autobroadcast_binop.hpp" + +namespace ngraph +{ + namespace runtime + { + namespace reference + { + template + void mod(const T* arg0, + const T* arg1, + T* out, + const Shape& arg_shape0, + const Shape& arg_shape1, + const op::AutoBroadcastSpec& broadcast_spec) + { + autobroadcast_binop( + arg0, arg1, out, arg_shape0, arg_shape1, broadcast_spec, [](T x, T y) -> T { + return T(x - std::truncf(x / y) * y); + }); + } + } + } +} diff --git a/ngraph/test/runtime/interpreter/reference/selu.hpp b/ngraph/test/runtime/interpreter/reference/selu.hpp new file mode 100644 index 00000000000000..a91e67727bd446 --- /dev/null +++ b/ngraph/test/runtime/interpreter/reference/selu.hpp @@ -0,0 +1,46 @@ +//***************************************************************************** +// Copyright 2020 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//***************************************************************************** + +#pragma once + +#include +#include + +namespace ngraph +{ + namespace runtime + { + namespace reference + { + template + void selu(const T* arg, + const T* alpha, + const T* lambda, + T* out, + size_t size_arg, + size_t size_alpha, + size_t size_lambda) + { + for (size_t i = 0; i < size_arg; ++i) + { + out[i] = arg[i] > T(0) ? T(lambda[i % size_lambda] * arg[i]) + : T(alpha[i % size_alpha] * lambda[i % size_lambda] * + (std::exp(arg[i]) - 1)); + } + } + } + } +} diff --git a/ngraph/test/runtime/interpreter/reference/transpose.hpp b/ngraph/test/runtime/interpreter/reference/transpose.hpp new file mode 100644 index 00000000000000..51b7a4c44d9ff7 --- /dev/null +++ b/ngraph/test/runtime/interpreter/reference/transpose.hpp @@ -0,0 +1,63 @@ +//***************************************************************************** +// Copyright 2020 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//***************************************************************************** + +#pragma once + +#include +#include +#include +#include +#include + +#include "ngraph/axis_vector.hpp" +#include "ngraph/coordinate_transform.hpp" +#include "ngraph/shape.hpp" + +namespace ngraph +{ + namespace runtime + { + namespace reference + { + template + void transpose(const T* arg, T* out, Shape arg_size, const U* axes_order = nullptr) + { + std::vector range_vector; + if (axes_order == nullptr) + { + range_vector.resize(arg_size.size()); + std::iota(range_vector.begin(), range_vector.end(), 0); + std::reverse(range_vector.begin(), range_vector.end()); + axes_order = range_vector.data(); + } + size_t cnt = 0; + for (size_t i = 0; i < arg_size.size(); ++i) + { + size_t axes = axes_order[i]; + size_t start = 0; + for (size_t j = 0; j < axes; ++j) + { + start += shape_size(arg_size[j]); + } + for (size_t j = start; j < start + shape_size(arg_size[axes]); ++j) + { + out[cnt++] = arg[j]; + } + } + } + } + } +} diff --git a/ngraph/test/runtime/interpreter/unit_test.manifest b/ngraph/test/runtime/interpreter/unit_test.manifest index 62535f2beb75e5..dedf6c6fe8869e 100644 --- a/ngraph/test/runtime/interpreter/unit_test.manifest +++ b/ngraph/test/runtime/interpreter/unit_test.manifest @@ -74,6 +74,15 @@ INTERPRETER.fused_clamp_bfloat16 INTERPRETER.auto_bcast_binary_elementwise INTERPRETER.auto_bcast_binary_elementwise_pdpd +# Revise reference implementation +onnx_dyn_model_hardmax +onnx_model_one_hot_with_axis +onnx_model_one_hot_with_axis +onnx_model_quantize_linear_const_scale_const_zero_p +onnx_model_quantize_linear +onnx_model_quantize_linear_axis_zero +onnx_model_quantize_linear_axis_negative + # Backward conv INTERPRETER.convolution_2d_1item INTERPRETER.convolution_2d_1item_padded_1_1x1_1 @@ -118,12 +127,22 @@ onnx_model_lstm_bdir_short_input_seq_peepholes lstm_cell_bias_peepholes lstm_cell_bias_peepholes_clip_input_forget + +# Check 'n_data_channels % groups == 0' failed +dyn_group_convolution_backprop_data + +# Check 'num_dyn_nodes_this_pass < num_dyn_nodes_last_pass' failed +dyn_convolution_backprop_data + # unsupported element type f16 INTERPRETER.ctc_greedy_decoder_f16 +# Issue 37473. Fails on ia32 platforms only +onnx_model_softmax_axis_0 +onnx_model_reshape_negative_dim + # LogSoftmax's reference implementation doesn't handle scalar input properly onnx_model_logsoftmax_0D - # Input body shape is changed during Loop iterations # Exception is throw during Loop shape inference onnx_controlflow_loop_concat_values @@ -138,4 +157,4 @@ onnx_controlflow_loop_power # The test fails in CI on Ubuntu i386 # There's an overflow of some kind: 2147483647 is not close to -2147483648 at index 2 -quantize_clamp_int32 +quantize_clamp_int32 \ No newline at end of file diff --git a/ngraph/test/runtime/op/convolution.hpp b/ngraph/test/runtime/op/convolution.hpp index 15161b55ed6f01..07e796a7e21fdc 100644 --- a/ngraph/test/runtime/op/convolution.hpp +++ b/ngraph/test/runtime/op/convolution.hpp @@ -69,7 +69,7 @@ namespace ngraph /// \brief Constructs a batched convolution operation with no data dilation (i.e., /// all /// data dilation strides are 1). - /// + /// ngraph/test/runtime/interpreter/unit_test.manifest /// \param data_batch The node producing the input data batch tensor.
/// `[N, C_IN, D1, ... Df]` /// \param filters The node producing the filters tensor.
diff --git a/ngraph/test/runtime/opset0_tbl.hpp b/ngraph/test/runtime/opset0_tbl.hpp index 35cbb2e86f0244..e5f7e81055fc89 100644 --- a/ngraph/test/runtime/opset0_tbl.hpp +++ b/ngraph/test/runtime/opset0_tbl.hpp @@ -52,7 +52,6 @@ NGRAPH_OP(Abs, ngraph::op) NGRAPH_OP(Acos, ngraph::op) -NGRAPH_OP(Add, ngraph::op) NGRAPH_OP(Asin, ngraph::op) NGRAPH_OP(Atan, ngraph::op) NGRAPH_OP(AvgPool, ngraph::op::v0) @@ -69,9 +68,7 @@ NGRAPH_OP(Cos, ngraph::op) NGRAPH_OP(Cosh, ngraph::op) NGRAPH_OP(CumSum, ngraph::op::v0) NGRAPH_OP(DepthToSpace, ngraph::op) -NGRAPH_OP(Divide, ngraph::op) NGRAPH_OP(Elu, ngraph::op) -NGRAPH_OP(Equal, ngraph::op) NGRAPH_OP(Erf, ngraph::op) NGRAPH_OP(Exp, ngraph::op) NGRAPH_OP(FakeQuantize, ngraph::op) @@ -79,27 +76,19 @@ NGRAPH_OP(Floor, ngraph::op) NGRAPH_OP(GRN, ngraph::op) NGRAPH_OP(Gather, ngraph::op::v1) NGRAPH_OP(Gelu, ngraph::op) -NGRAPH_OP(Greater, ngraph::op) -NGRAPH_OP(GreaterEq, ngraph::op) NGRAPH_OP(GroupConvolution, ngraph::op::v0) NGRAPH_OP(GroupConvolutionBackpropData, ngraph::op::v0) NGRAPH_OP(HardSigmoid, ngraph::op) NGRAPH_OP(Interpolate, ngraph::op::v0) -NGRAPH_OP(Less, ngraph::op) -NGRAPH_OP(LessEq, ngraph::op) NGRAPH_OP(Log, ngraph::op) NGRAPH_OP(LRN, ngraph::op) NGRAPH_OP(LSTMSequence, ngraph::op::v0) NGRAPH_OP(MatMul, ngraph::op) -NGRAPH_OP(NormalizeL2, ngraph::op) -NGRAPH_OP(Maximum, ngraph::op) -NGRAPH_OP(Minimum, ngraph::op) -NGRAPH_OP(Multiply, ngraph::op) +NGRAPH_OP(Multiply, ngraph::op::v0) NGRAPH_OP(MVN, ngraph::op) NGRAPH_OP(Negative, ngraph::op) -NGRAPH_OP(NotEqual, ngraph::op) +NGRAPH_OP(NormalizeL2, ngraph::op) NGRAPH_OP(Parameter, ngraph::op) -NGRAPH_OP(Power, ngraph::op) NGRAPH_OP(PRelu, ngraph::op) NGRAPH_OP(PriorBox, ngraph::op) NGRAPH_OP(Quantize, ngraph::op) @@ -107,7 +96,6 @@ NGRAPH_OP(Range, ngraph::op) NGRAPH_OP(Relu, ngraph::op) NGRAPH_OP(Result, ngraph::op) NGRAPH_OP(ReverseSequence, ngraph::op) -NGRAPH_OP(Select, ngraph::op) NGRAPH_OP(Selu, ngraph::op) NGRAPH_OP(ShapeOf, ngraph::op) NGRAPH_OP(ShuffleChannels, ngraph::op) @@ -119,7 +107,6 @@ NGRAPH_OP(SpaceToDepth, ngraph::op) NGRAPH_OP(Sqrt, ngraph::op) NGRAPH_OP(SquaredDifference, ngraph::op) NGRAPH_OP(Squeeze, ngraph::op) -NGRAPH_OP(Subtract, ngraph::op) NGRAPH_OP(Tan, ngraph::op) NGRAPH_OP(Tanh, ngraph::op) NGRAPH_OP(TensorIterator, ngraph::op) diff --git a/ngraph/test/runtime/pass/opset0_downgrade.cpp b/ngraph/test/runtime/pass/opset0_downgrade.cpp index bd7ca068162df6..d19b594710e3b5 100644 --- a/ngraph/test/runtime/pass/opset0_downgrade.cpp +++ b/ngraph/test/runtime/pass/opset0_downgrade.cpp @@ -31,8 +31,6 @@ #include "ngraph/type.hpp" #include "ngraph/validation_util.hpp" #include "op/avg_pool.hpp" -#include "op/convolution.hpp" -#include "op/group_conv.hpp" #include "pass/implicit_broadcast_elimination.hpp" #include "pass/opset0_downgrade.hpp" @@ -98,232 +96,11 @@ namespace opset0_downgrade // Default is that we did nothing shared_ptr op_cast(shared_ptr node) { return nullptr; } - shared_ptr op_cast(shared_ptr node) - { - return op_cast_binary_elementwise_node(node); - } - - shared_ptr op_cast(shared_ptr node) - { - auto const input_arg = node->input_value(0); - const auto ceil_mode = static_cast(node->get_rounding_type()); - const auto include_padding_in_avg_computation = !node->get_exclude_pad(); - const auto pad_type = node->get_auto_pad(); - const auto padding_below = node->get_pads_begin(); - const auto padding_above = node->get_pads_end(); - const auto window_movement_strides = node->get_strides(); - const auto window_shape = node->get_kernel(); - - auto replacement_node = make_shared(input_arg, - window_shape, - window_movement_strides, - padding_below, - padding_above, - include_padding_in_avg_computation, - pad_type, - ceil_mode); - replace_node(node, replacement_node); - return replacement_node; - } - - shared_ptr op_cast(shared_ptr node) - { - const auto data_arg = node->input_value(0); - const auto filters_arg = node->input_value(1); - const auto strides = node->get_strides(); - const size_t num_spatial_dims = strides.size(); - auto replacement_node = make_shared(data_arg, - filters_arg, - node->get_strides(), - node->get_dilations(), - node->get_pads_begin(), - node->get_pads_end(), - Strides(num_spatial_dims, 1), - node->get_auto_pad()); - replace_node(node, replacement_node); - return replacement_node; - } - - shared_ptr op_cast(shared_ptr node) - { - const auto data_arg = node->input_value(0); - const auto filters_arg = node->input_value(1); - - auto data_pshape = data_arg.get_partial_shape(); - auto filters_pshape = filters_arg.get_partial_shape(); - - NGRAPH_CHECK(data_pshape.rank().is_static() && data_pshape[0].is_static() && - filters_pshape.rank().is_static() && filters_pshape[1].is_static(), - "Unable to convert ConvolutionBackpropData:v1 to ConvolutionBackpropData:v0 " - "if data shape N and filters shape C dimensions are not static. Node: ", - *node); - - const size_t num_spatial_dims = data_pshape.rank().get_length() - 2; - - const PartialShape output_pshape{node->get_output_partial_shape(0)}; - NGRAPH_CHECK(output_pshape.is_static(), - "Unable to convert ConvolutionBackpropData:v1 to ConvolutionBackpropData:v0 " - "if output shape is dynamic. Node: ", - *node); - Shape output_shape = output_pshape.to_shape(); - - auto replacement_node = - make_shared(output_shape, - filters_arg, - data_arg, - node->get_strides(), - node->get_dilations(), - node->get_pads_begin(), - node->get_pads_end(), - Strides(num_spatial_dims, 1)); - replace_node(node, replacement_node); - return replacement_node; - } - - shared_ptr op_cast(shared_ptr node) - { - const auto input_arg0 = node->input_value(0); - const auto input_arg1 = node->input_value(1); - const auto autob = node->get_autob(); - const bool pydiv = node->is_pythondiv(); - auto replacement_node = make_shared(input_arg0, input_arg1, pydiv, autob); - replace_node(node, replacement_node); - return replacement_node; - } - - shared_ptr op_cast(shared_ptr node) - { - return op_cast_binary_elementwise_node(node); - } - - shared_ptr op_cast(shared_ptr node) - { - return op_cast_binary_elementwise_node(node); - } - - shared_ptr op_cast(shared_ptr node) - { - return op_cast_binary_elementwise_node(node); - } - - shared_ptr op_cast(shared_ptr node) - { - const auto data_arg = node->input_value(0); - const auto filters_arg = node->input_value(1); - const auto strides = node->get_strides(); - const size_t num_spatial_dims = strides.size(); - auto replacement_node = make_shared(data_arg, - filters_arg, - node->get_strides(), - node->get_dilations(), - node->get_pads_begin(), - node->get_pads_end(), - Strides(num_spatial_dims, 1), - node->get_auto_pad()); - replace_node(node, replacement_node); - return replacement_node; - } - - shared_ptr op_cast(shared_ptr node) - { - const auto data_arg = node->input_value(0); - const auto filters_arg = node->input_value(1); - - NGRAPH_CHECK(data_arg.get_partial_shape().is_static(), - "Unable to convert GroupConvolutionBackpropData:1 to " - "GroupConvolutionBackpropData:0 with dynamic data shape. Node: ", - *node); - - NGRAPH_CHECK(filters_arg.get_partial_shape().is_static(), - "Unable to convert GroupConvolutionBackpropData:1 to " - "GroupConvolutionBackpropData:0 with dynamic filters shape. Node: ", - *node); - - auto filters_shape = filters_arg.get_shape(); - const size_t groups = filters_shape.at(0); - - const PartialShape output_pshape{node->get_output_partial_shape(0)}; - NGRAPH_CHECK(output_pshape.is_static(), - "Unable to convert GroupConvolutionBackpropData:v1 to " - "GroupConvolutionBackpropData:v0 " - "if output_shape is dynamic. Node: ", - *node); - Shape output_shape = output_pshape.to_shape(); - - // Convert filters data layout from [GROUPS, C_INPUT, C_OUTPUT, K_D, ..., K_1] - // into [C x M/group x k1 x k2 x ... x kn] - filters_shape.erase(filters_shape.begin()); - filters_shape[0] *= groups; - - auto reshaped_filters = builder::opset1::reshape(node->input_value(1), filters_shape); - - auto replacement_node = make_shared( - op::Constant::create(data_arg.get_element_type(), output_shape, {0}), - reshaped_filters, - data_arg, - node->get_strides(), - node->get_dilations(), - node->get_pads_begin(), - node->get_pads_end(), - groups); - replace_node(node, replacement_node); - return replacement_node; - } - - shared_ptr op_cast(shared_ptr node) - { - return op_cast_binary_elementwise_node(node); - } - - shared_ptr op_cast(shared_ptr node) - { - return op_cast_binary_elementwise_node(node); - } - shared_ptr op_cast(shared_ptr node) { return op_cast_binary_elementwise_node(node); } - shared_ptr op_cast(shared_ptr node) - { - return op_cast_binary_elementwise_node(node); - } - - shared_ptr op_cast(shared_ptr node) - { - return op_cast_binary_elementwise_node(node); - } - - shared_ptr op_cast(shared_ptr node) - { - return op_cast_binary_elementwise_node(node); - } - - shared_ptr op_cast(shared_ptr node) - { - return op_cast_binary_elementwise_node(node); - } - - shared_ptr op_cast(shared_ptr node) - { - return op_cast_binary_elementwise_node(node); - } - - shared_ptr op_cast(shared_ptr node) - { - ngraph::pass::ImplicitBroadcastElimination().run_on_node(node); - auto replacement_node = make_shared( - node->input_value(0), node->input_value(1), node->input_value(2)); - replace_node(node, replacement_node); - return replacement_node; - } - - shared_ptr op_cast(shared_ptr node) - { - return op_cast_binary_elementwise_node(node); - } - using DispatchMap = map node)>>; template diff --git a/ngraph/test/runtime/pass/opset1_upgrade.cpp b/ngraph/test/runtime/pass/opset1_upgrade.cpp index 4258eaea3ac621..c18acccab3105b 100644 --- a/ngraph/test/runtime/pass/opset1_upgrade.cpp +++ b/ngraph/test/runtime/pass/opset1_upgrade.cpp @@ -49,38 +49,9 @@ namespace opset1_upgrade // Default is that we didn nothing shared_ptr op_cast(shared_ptr node) { return nullptr; } - shared_ptr op_cast(shared_ptr node) + shared_ptr op_cast(shared_ptr node) { - return op_cast_binary_elementwise_node(node); - } - - shared_ptr op_cast(shared_ptr node) - { - auto strides = node->get_window_movement_strides(); - auto dilations = node->get_window_dilation_strides(); - auto pads_begin = node->get_padding_below(); - auto pads_end = node->get_padding_above(); - auto data_dilation_strides = node->get_data_dilation_strides(); - auto auto_pad = node->get_pad_type(); - - bool is_dds_valid = all_of(data_dilation_strides.begin(), - data_dilation_strides.end(), - [](size_t value) { return value == 1; }); - - NGRAPH_CHECK(is_dds_valid, - "Unable to convert Convolution:0 to Convolution:1 with data dilation strides " - "other than `1`. Node: ", - *node); - - auto replacement_node = make_shared(node->input_value(0), - node->input_value(1), - strides, - pads_begin, - pads_end, - dilations, - auto_pad); - replace_node(node, replacement_node); - return replacement_node; + return op_cast_binary_elementwise_node(node); } shared_ptr op_cast(shared_ptr node) @@ -117,31 +88,6 @@ namespace opset1_upgrade return replacement_node; } - shared_ptr op_cast(shared_ptr node) - { - const auto autob = node->get_autob(); - const bool pydiv = node->is_pythondiv(); - auto replacement_node = - make_shared(node->input_value(0), node->input_value(1), pydiv, autob); - replace_node(node, replacement_node); - return replacement_node; - } - - shared_ptr op_cast(shared_ptr node) - { - return op_cast_binary_elementwise_node(node); - } - - shared_ptr op_cast(shared_ptr node) - { - return op_cast_binary_elementwise_node(node); - } - - shared_ptr op_cast(shared_ptr node) - { - return op_cast_binary_elementwise_node(node); - } - shared_ptr op_cast(shared_ptr node) { auto strides = node->get_window_movement_strides(); @@ -240,56 +186,6 @@ namespace opset1_upgrade return replacement_node; } - shared_ptr op_cast(shared_ptr node) - { - return op_cast_binary_elementwise_node(node); - } - - shared_ptr op_cast(shared_ptr node) - { - return op_cast_binary_elementwise_node(node); - } - - shared_ptr op_cast(shared_ptr node) - { - return op_cast_binary_elementwise_node(node); - } - - shared_ptr op_cast(shared_ptr node) - { - return op_cast_binary_elementwise_node(node); - } - - shared_ptr op_cast(shared_ptr node) - { - return op_cast_binary_elementwise_node(node); - } - - shared_ptr op_cast(shared_ptr node) - { - return op_cast_binary_elementwise_node(node); - } - - shared_ptr op_cast(shared_ptr node) - { - return op_cast_binary_elementwise_node(node); - } - - shared_ptr op_cast(shared_ptr node) - { - auto replacement_node = make_shared(node->input_value(0), - node->input_value(1), - node->input_value(2), - op::AutoBroadcastSpec()); - replace_node(node, replacement_node); - return replacement_node; - } - - shared_ptr op_cast(shared_ptr node) - { - return op_cast_binary_elementwise_node(node); - } - shared_ptr op_cast(shared_ptr node) { auto replacement_node = make_shared( diff --git a/ngraph/test/specialize_function.cpp b/ngraph/test/specialize_function.cpp index fe09800a1b5b2d..c292ec9a6ec0f7 100644 --- a/ngraph/test/specialize_function.cpp +++ b/ngraph/test/specialize_function.cpp @@ -19,8 +19,6 @@ #include "ngraph/ngraph.hpp" #include "ngraph/specialize_function.hpp" -NGRAPH_SUPPRESS_DEPRECATED_START - using namespace ngraph; // Simple case: create a function with static parameter shapes and "specialize" them to the same @@ -31,7 +29,7 @@ TEST(specialize_function, et_shape_static) auto p1 = std::make_shared(element::Type_t::i32, Shape{1, 2, 3}); auto k = std::make_shared(p1, element::Type_t::f32); - auto a = p0 + k; + auto a = std::make_shared(p0, k); auto f = std::make_shared(a, ParameterVector{p0, p1}); @@ -53,7 +51,7 @@ TEST(specialize_function, et_dynamic_shape_static) auto p1 = std::make_shared(element::Type_t::dynamic, Shape{1, 2, 3}); auto k = std::make_shared(p1, element::Type_t::f32); - auto a = p0 + k; + auto a = std::make_shared(p0, k); auto f = std::make_shared(a, ParameterVector{p0, p1}); @@ -75,7 +73,7 @@ TEST(specialize_function, et_static_shape_rank_dynamic) auto p1 = std::make_shared(element::Type_t::i32, PartialShape::dynamic()); auto k = std::make_shared(p1, element::Type_t::f32); - auto a = p0 + k; + auto a = std::make_shared(p0, k); auto f = std::make_shared(a, ParameterVector{p0, p1}); @@ -97,7 +95,7 @@ TEST(specialize_function, et_static_shape_rank_static_dynamic) auto p1 = std::make_shared(element::Type_t::i32, PartialShape::dynamic(3)); auto k = std::make_shared(p1, element::Type_t::f32); - auto a = p0 + k; + auto a = std::make_shared(p0, k); auto f = std::make_shared(a, ParameterVector{p0, p1}); @@ -119,7 +117,7 @@ TEST(specialize_function, et_static_shape_rank_static_dynamic_subst_val) auto p1 = std::make_shared(element::Type_t::i32, PartialShape::dynamic(3)); auto k = std::make_shared(p1, element::Type_t::f32); - auto a = p0 + k; + auto a = std::make_shared(p0, k); auto f = std::make_shared(a, ParameterVector{p0, p1}); @@ -136,7 +134,7 @@ TEST(specialize_function, et_static_shape_rank_static_dynamic_subst_val) ASSERT_EQ(g->get_output_element_type(0), element::Type_t::f32); auto plus_node = - as_type_ptr(g->get_results().at(0)->input_value(0).get_node_shared_ptr()); + as_type_ptr(g->get_results().at(0)->input_value(0).get_node_shared_ptr()); ASSERT_TRUE(plus_node); auto convert_node = as_type_ptr(plus_node->input_value(1).get_node_shared_ptr()); ASSERT_TRUE(convert_node); @@ -157,7 +155,7 @@ TEST(specialize_function, et_static_shape_rank_dynamic_validation_fails) auto p1 = std::make_shared(element::Type_t::i32, PartialShape::dynamic()); auto k = std::make_shared(p1, element::Type_t::f32); - auto a = p0 + k; + auto a = std::make_shared(p0, k); auto f = std::make_shared(a, ParameterVector{p0, p1}); @@ -182,7 +180,7 @@ TEST(specialize_function, et_dynamic_shape_static_validation_fails) auto p1 = std::make_shared(element::Type_t::dynamic, Shape{1, 2, 3}); auto k = std::make_shared(p1, element::Type_t::f32); - auto a = p0 + k; + auto a = std::make_shared(p0, k); auto f = std::make_shared(a, ParameterVector{p0, p1}); @@ -210,7 +208,7 @@ TEST(specialize_function, et_static_shape_rank_static_dynamic_rank_mismatch) auto p1 = std::make_shared(element::Type_t::i32, PartialShape::dynamic(3)); auto k = std::make_shared(p1, element::Type_t::f32); - auto a = p0 + k; + auto a = std::make_shared(p0, k); auto f = std::make_shared(a, ParameterVector{p0, p1}); @@ -239,7 +237,7 @@ TEST(specialize_function, et_static_shape_rank_static_dynamic_dim_mismatch) PartialShape{1, Dimension::dynamic(), 3}); auto k = std::make_shared(p1, element::Type_t::f32); - auto a = p0 + k; + auto a = std::make_shared(p0, k); auto f = std::make_shared(a, ParameterVector{p0, p1}); @@ -262,7 +260,7 @@ TEST(specialize_function, et_count_wrong) auto p1 = std::make_shared(element::Type_t::i32, PartialShape{1, 2, 3}); auto k = std::make_shared(p1, element::Type_t::f32); - auto a = p0 + k; + auto a = std::make_shared(p0, k); auto f = std::make_shared(a, ParameterVector{p0, p1}); @@ -285,7 +283,7 @@ TEST(specialize_function, shape_count_wrong) auto p1 = std::make_shared(element::Type_t::i32, PartialShape{1, 2, 3}); auto k = std::make_shared(p1, element::Type_t::f32); - auto a = p0 + k; + auto a = std::make_shared(p0, k); auto f = std::make_shared(a, ParameterVector{p0, p1}); @@ -309,7 +307,7 @@ TEST(specialize_function, value_count_wrong) auto p1 = std::make_shared(element::Type_t::i32, PartialShape{1, 2, 3}); auto k = std::make_shared(p1, element::Type_t::f32); - auto a = p0 + k; + auto a = std::make_shared(p0, k); auto f = std::make_shared(a, ParameterVector{p0, p1}); diff --git a/ngraph/test/tensor.cpp b/ngraph/test/tensor.cpp index 0eab2f21e1dfb3..08ff4840370292 100644 --- a/ngraph/test/tensor.cpp +++ b/ngraph/test/tensor.cpp @@ -40,7 +40,7 @@ TEST(tensor, size) { auto arg0 = make_shared(element::Type_t::f32, Shape{2, 3}); - auto add = make_shared(arg0, arg0); + auto add = make_shared(arg0, arg0); auto f0 = make_shared(add, ParameterVector{arg0}); pass_manager.run_passes(f0); @@ -52,7 +52,7 @@ TEST(tensor, size) { auto arg0 = make_shared(element::Type_t::f32, Shape{}); - auto add = make_shared(arg0, arg0); + auto add = make_shared(arg0, arg0); auto f0 = make_shared(add, ParameterVector{arg0}); pass_manager.run_passes(f0); @@ -64,7 +64,7 @@ TEST(tensor, size) { auto arg0 = make_shared(element::Type_t::f32, Shape{1}); - auto add = make_shared(arg0, arg0); + auto add = make_shared(arg0, arg0); auto f0 = make_shared(add, ParameterVector{arg0}); pass_manager.run_passes(f0); @@ -81,7 +81,7 @@ TEST(tensor, output_flag) pass_manager.register_pass(); auto arg0 = make_shared(element::Type_t::f32, Shape{1}); - auto add = make_shared(arg0, arg0); + auto add = make_shared(arg0, arg0); auto f0 = make_shared(add, ParameterVector{arg0}); pass_manager.run_passes(f0); diff --git a/ngraph/test/type_prop/binary_elementwise.cpp b/ngraph/test/type_prop/binary_elementwise.cpp index a3eba00c806476..eaf84df8da6e9a 100644 --- a/ngraph/test/type_prop/binary_elementwise.cpp +++ b/ngraph/test/type_prop/binary_elementwise.cpp @@ -18,8 +18,6 @@ #include "ngraph/ngraph.hpp" #include "util/type_prop.hpp" -NGRAPH_SUPPRESS_DEPRECATED_START - using namespace std; using namespace ngraph; @@ -86,7 +84,7 @@ TEST(type_prop, add_bad_arguments) { test_binary("Add", [](const shared_ptr& x, const shared_ptr& y) -> shared_ptr { - return make_shared(x, y); + return make_shared(x, y); }); } @@ -94,7 +92,7 @@ TEST(type_prop, divide_bad_arguments) { test_binary("Divide", [](const shared_ptr& x, const shared_ptr& y) -> shared_ptr { - return make_shared(x, y); + return make_shared(x, y); }); } @@ -102,7 +100,7 @@ TEST(type_prop, multiply_bad_arguments) { test_binary("Multiply", [](const shared_ptr& x, const shared_ptr& y) -> shared_ptr { - return make_shared(x, y); + return make_shared(x, y); }); } @@ -110,7 +108,7 @@ TEST(type_prop, subtract_bad_arguments) { test_binary("Subtract", [](const shared_ptr& x, const shared_ptr& y) -> shared_ptr { - return make_shared(x, y); + return make_shared(x, y); }); } @@ -230,20 +228,22 @@ void test_binary_eltwise_numpy(const element::Type& et, const op::AutoBroadcastS TEST(type_prop, eltwise_auto_bcast) { test_binary_eltwise_numpy(element::Type_t::f32, op::AutoBroadcastType::NUMPY); - test_binary_eltwise_numpy(element::Type_t::f32, op::AutoBroadcastType::NUMPY); - test_binary_eltwise_numpy(element::Type_t::f32, op::AutoBroadcastType::NUMPY); - test_binary_eltwise_numpy(element::Type_t::f32, op::AutoBroadcastType::NUMPY); - test_binary_eltwise_numpy(element::Type_t::f32, op::AutoBroadcastType::NUMPY); - test_binary_eltwise_numpy(element::Type_t::f32, op::AutoBroadcastType::NUMPY); - test_binary_eltwise_numpy(element::Type_t::f32, op::AutoBroadcastType::NUMPY); - test_binary_eltwise_numpy(element::Type_t::f32, op::AutoBroadcastType::NUMPY); - test_binary_eltwise_numpy(element::Type_t::f32, op::AutoBroadcastType::NUMPY); - test_binary_eltwise_numpy(element::Type_t::f32, op::AutoBroadcastType::NUMPY); - test_binary_eltwise_numpy(element::Type_t::f32, op::AutoBroadcastType::NUMPY); + test_binary_eltwise_numpy(element::Type_t::f32, op::AutoBroadcastType::NUMPY); + test_binary_eltwise_numpy(element::Type_t::f32, op::AutoBroadcastType::NUMPY); + test_binary_eltwise_numpy(element::Type_t::f32, op::AutoBroadcastType::NUMPY); + test_binary_eltwise_numpy(element::Type_t::f32, + op::AutoBroadcastType::NUMPY); + test_binary_eltwise_numpy(element::Type_t::f32, op::AutoBroadcastType::NUMPY); + test_binary_eltwise_numpy(element::Type_t::f32, + op::AutoBroadcastType::NUMPY); + test_binary_eltwise_numpy(element::Type_t::f32, op::AutoBroadcastType::NUMPY); + test_binary_eltwise_numpy(element::Type_t::f32, op::AutoBroadcastType::NUMPY); + test_binary_eltwise_numpy(element::Type_t::f32, op::AutoBroadcastType::NUMPY); + test_binary_eltwise_numpy(element::Type_t::f32, op::AutoBroadcastType::NUMPY); test_binary_eltwise_numpy(element::Type_t::boolean, op::AutoBroadcastType::NUMPY); - test_binary_eltwise_numpy(element::Type_t::f32, op::AutoBroadcastType::NUMPY); - test_binary_eltwise_numpy(element::Type_t::f32, op::AutoBroadcastType::NUMPY); + test_binary_eltwise_numpy(element::Type_t::f32, op::AutoBroadcastType::NUMPY); + test_binary_eltwise_numpy(element::Type_t::f32, op::AutoBroadcastType::NUMPY); test_binary_eltwise_numpy(element::Type_t::boolean, op::AutoBroadcastType::NUMPY); } @@ -251,7 +251,7 @@ TEST(type_prop, comparison_good) { auto tv0_2_4_param_0 = make_shared(element::Type_t::f32, Shape{2, 4}); auto tv0_2_4_param_1 = make_shared(element::Type_t::f32, Shape{2, 4}); - auto eq = make_shared(tv0_2_4_param_0, tv0_2_4_param_1); + auto eq = make_shared(tv0_2_4_param_0, tv0_2_4_param_1); EXPECT_EQ(eq->get_element_type(), element::Type_t::boolean); EXPECT_EQ(eq->get_shape(), (Shape{2, 4})); } @@ -262,7 +262,7 @@ TEST(type_prop, binary_arithmetic_bad_argument_element_types) auto tv0_2_4_param_1 = make_shared(element::Type_t::boolean, Shape{2, 4}); try { - auto bc = make_shared(tv0_2_4_param_0, tv0_2_4_param_1); + auto bc = make_shared(tv0_2_4_param_0, tv0_2_4_param_1); // Should have thrown, so fail if it didn't FAIL() << "Did not detect incorrect element types for arithmetic operator"; } @@ -281,57 +281,11 @@ TEST(type_prop, binary_elementwise_arithmetic_both_dynamic) { auto a = make_shared(element::Type_t::f32, PartialShape::dynamic()); auto b = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto add = make_shared(a, b); + auto add = make_shared(a, b); ASSERT_TRUE(add->get_output_partial_shape(0).rank().is_dynamic()); } -TEST(type_prop, binary_elementwise_arithmetic_left_rank_dynamic_right_static) -{ - auto a = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto b = make_shared(element::Type_t::f32, Shape{1, 2, 3}); - auto add = make_shared(a, b); - - ASSERT_TRUE(add->get_output_partial_shape(0).is_static()); - ASSERT_EQ(add->get_shape(), (Shape{1, 2, 3})); -} - -TEST(type_prop, binary_elementwise_arithmetic_left_static_right_rank_dynamic) -{ - auto a = make_shared(element::Type_t::f32, Shape{1, 2, 3}); - auto b = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto add = make_shared(a, b); - - ASSERT_TRUE(add->get_output_partial_shape(0).is_static()); - ASSERT_EQ(add->get_shape(), (Shape{1, 2, 3})); -} - -TEST(type_prop, binary_elementwise_arithmetic_left_rank_static_dynamic_right_rank_dynamic) -{ - auto a = - make_shared(element::Type_t::f32, PartialShape{1, Dimension::dynamic(), 3}); - auto b = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto add = make_shared(a, b); - - ASSERT_TRUE(add->get_output_partial_shape(0).rank().is_static()); - ASSERT_TRUE(add->get_output_partial_shape(0).is_dynamic()); - ASSERT_TRUE( - add->get_output_partial_shape(0).same_scheme(PartialShape{1, Dimension::dynamic(), 3})); -} - -TEST(type_prop, binary_elementwise_arithmetic_left_rank_dynamic_right_rank_static_dynamic) -{ - auto a = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto b = - make_shared(element::Type_t::f32, PartialShape{1, Dimension::dynamic(), 3}); - auto add = make_shared(a, b); - - ASSERT_TRUE(add->get_output_partial_shape(0).rank().is_static()); - ASSERT_TRUE(add->get_output_partial_shape(0).is_dynamic()); - ASSERT_TRUE( - add->get_output_partial_shape(0).same_scheme(PartialShape{1, Dimension::dynamic(), 3})); -} - TEST(type_prop, binary_elementwise_arithmetic_left_rank_static_dynamic_right_rank_static_dynamic_result_static) { @@ -339,7 +293,7 @@ TEST(type_prop, make_shared(element::Type_t::f32, PartialShape{1, Dimension::dynamic(), 3}); auto b = make_shared(element::Type_t::f32, PartialShape{1, 2, Dimension::dynamic()}); - auto add = make_shared(a, b); + auto add = make_shared(a, b); ASSERT_TRUE(add->get_output_partial_shape(0).is_static()); ASSERT_EQ(add->get_shape(), (Shape{1, 2, 3})); @@ -353,7 +307,7 @@ TEST( element::Type_t::f32, PartialShape{1, Dimension::dynamic(), Dimension::dynamic()}); auto b = make_shared(element::Type_t::f32, PartialShape{1, 2, Dimension::dynamic()}); - auto add = make_shared(a, b); + auto add = make_shared(a, b); ASSERT_TRUE(add->get_output_partial_shape(0).rank().is_static()); ASSERT_TRUE(add->get_output_partial_shape(0).is_dynamic()); @@ -366,7 +320,7 @@ TEST(type_prop, binary_elementwise_arithmetic_left_static_right_rank_static_dyna auto a = make_shared(element::Type_t::f32, PartialShape{1, 2, 3}); auto b = make_shared(element::Type_t::f32, PartialShape{1, 2, Dimension::dynamic()}); - auto add = make_shared(a, b); + auto add = make_shared(a, b); ASSERT_TRUE(add->get_output_partial_shape(0).is_static()); ASSERT_EQ(add->get_shape(), (Shape{1, 2, 3})); @@ -377,7 +331,7 @@ TEST(type_prop, binary_elementwise_arithmetic_left_rank_static_dynamic_right_sta auto a = make_shared(element::Type_t::f32, PartialShape{1, 2, Dimension::dynamic()}); auto b = make_shared(element::Type_t::f32, PartialShape{1, 2, 3}); - auto add = make_shared(a, b); + auto add = make_shared(a, b); ASSERT_TRUE(add->get_output_partial_shape(0).is_static()); ASSERT_EQ(add->get_shape(), (Shape{1, 2, 3})); @@ -391,7 +345,7 @@ TEST(type_prop, binary_elementwise_arithmetic_left_rank_static_dynamic_inconsist try { - auto add = make_shared(a, b); + auto add = make_shared(a, b); FAIL() << "Inconsistent partial shapes not detected"; } catch (const NodeValidationFailure& error) @@ -412,7 +366,7 @@ TEST(type_prop, binary_elementwise_arithmetic_right_rank_static_dynamic_inconsis try { - auto add = make_shared(a, b); + auto add = make_shared(a, b); FAIL() << "Inconsistent partial shapes not detected"; } catch (const NodeValidationFailure& error) @@ -434,7 +388,7 @@ TEST(type_prop, binary_elementwise_arithmetic_both_rank_static_dynamic_inconsist try { - auto add = make_shared(a, b); + auto add = make_shared(a, b); FAIL() << "Inconsistent partial shapes not detected"; } catch (const NodeValidationFailure& error) @@ -455,7 +409,7 @@ TEST(type_prop, binary_elementwise_arithmetic_left_rank_static_dynamic_different try { - auto add = make_shared(a, b); + auto add = make_shared(a, b); FAIL() << "Inconsistent partial shapes not detected"; } catch (const NodeValidationFailure& error) @@ -476,7 +430,7 @@ TEST(type_prop, binary_elementwise_arithmetic_right_rank_static_dynamic_differen try { - auto add = make_shared(a, b); + auto add = make_shared(a, b); FAIL() << "Inconsistent partial shapes not detected"; } catch (const NodeValidationFailure& error) @@ -498,7 +452,7 @@ TEST(type_prop, binary_elementwise_arithmetic_both_rank_static_dynamic_different try { - auto add = make_shared(a, b); + auto add = make_shared(a, b); FAIL() << "Inconsistent partial shapes not detected"; } catch (const NodeValidationFailure& error) @@ -515,7 +469,7 @@ TEST(type_prop, binary_elementwise_arithmetic_both_et_dynamic) { auto a = make_shared(element::Type_t::dynamic, Shape{1, 2, 3, 4}); auto b = make_shared(element::Type_t::dynamic, Shape{1, 2, 3, 4}); - auto add = make_shared(a, b); + auto add = make_shared(a, b); ASSERT_TRUE(add->get_output_element_type(0).is_dynamic()); } @@ -524,7 +478,7 @@ TEST(type_prop, binary_elementwise_arithmetic_left_et_dynamic) { auto a = make_shared(element::Type_t::dynamic, Shape{1, 2, 3, 4}); auto b = make_shared(element::Type_t::u32, Shape{1, 2, 3, 4}); - auto add = make_shared(a, b); + auto add = make_shared(a, b); ASSERT_EQ(add->get_output_element_type(0), element::Type_t::u32); } @@ -533,7 +487,7 @@ TEST(type_prop, binary_elementwise_arithmetic_right_et_dynamic) { auto a = make_shared(element::Type_t::i64, Shape{1, 2, 3, 4}); auto b = make_shared(element::Type_t::dynamic, Shape{1, 2, 3, 4}); - auto add = make_shared(a, b); + auto add = make_shared(a, b); ASSERT_EQ(add->get_output_element_type(0), element::Type_t::i64); } @@ -543,13 +497,13 @@ TEST(type_prop, logic_arith_compare_partial_et) auto test_arith = [](element::Type et0, element::Type et1) -> std::shared_ptr { auto param0 = std::make_shared(et0, Shape{1, 2, 3}); auto param1 = std::make_shared(et1, Shape{1, 2, 3}); - return std::make_shared(param0, param1); + return std::make_shared(param0, param1); }; auto test_compare = [](element::Type et0, element::Type et1) -> std::shared_ptr { auto param0 = std::make_shared(et0, Shape{1, 2, 3}); auto param1 = std::make_shared(et1, Shape{1, 2, 3}); - return std::make_shared(param0, param1); + return std::make_shared(param0, param1); }; auto test_logical_not = [](element::Type et) -> std::shared_ptr { diff --git a/ngraph/test/type_prop/select.cpp b/ngraph/test/type_prop/select.cpp index c98f2e6dc711fa..0b9c4f46f70659 100644 --- a/ngraph/test/type_prop/select.cpp +++ b/ngraph/test/type_prop/select.cpp @@ -28,7 +28,7 @@ TEST(type_prop, select_deduce) auto tv0_2_4_param_0 = make_shared(element::Type_t::boolean, Shape{2, 4}); auto tv0_2_4_param_1 = make_shared(element::Type_t::f32, Shape{2, 4}); auto tv0_2_4_param_2 = make_shared(element::Type_t::f32, Shape{2, 4}); - auto bc = make_shared(tv0_2_4_param_0, tv0_2_4_param_1, tv0_2_4_param_2); + auto bc = make_shared(tv0_2_4_param_0, tv0_2_4_param_1, tv0_2_4_param_2); ASSERT_EQ(bc->get_element_type(), element::Type_t::f32); ASSERT_EQ(bc->get_shape(), (Shape{2, 4})); } @@ -40,7 +40,7 @@ TEST(type_prop, select_shape_mismatch_a) auto tv0_2_4_param_2 = make_shared(element::Type_t::f32, Shape{2, 4}); try { - auto bc = make_shared(tv0_2_4_param_0, tv0_2_4_param_1, tv0_2_4_param_2); + auto bc = make_shared(tv0_2_4_param_0, tv0_2_4_param_1, tv0_2_4_param_2); // Should have thrown, so fail if it didn't FAIL() << "Did not detect incorrect element types for arithmetic operator"; } @@ -61,7 +61,7 @@ TEST(type_prop, select_shape_mismatch_b) auto tv0_2_4_param_2 = make_shared(element::Type_t::f32, Shape{2, 4}); try { - auto bc = make_shared(tv0_2_4_param_0, tv0_2_4_param_1, tv0_2_4_param_2); + auto bc = make_shared(tv0_2_4_param_0, tv0_2_4_param_1, tv0_2_4_param_2); // Should have thrown, so fail if it didn't FAIL() << "Did not detect incorrect element types for arithmetic operator"; } @@ -82,7 +82,7 @@ TEST(type_prop, select_shape_mismatch_c) auto tv0_2_4_param_2 = make_shared(element::Type_t::f32, Shape{3, 5}); try { - auto bc = make_shared(tv0_2_4_param_0, tv0_2_4_param_1, tv0_2_4_param_2); + auto bc = make_shared(tv0_2_4_param_0, tv0_2_4_param_1, tv0_2_4_param_2); // Should have thrown, so fail if it didn't FAIL() << "Did not detect incorrect element types for arithmetic operator"; } @@ -103,7 +103,7 @@ TEST(type_prop, select_elem_mismatch_a) auto tv0_2_4_param_2 = make_shared(element::Type_t::f32, Shape{2, 4}); try { - auto bc = make_shared(tv0_2_4_param_0, tv0_2_4_param_1, tv0_2_4_param_2); + auto bc = make_shared(tv0_2_4_param_0, tv0_2_4_param_1, tv0_2_4_param_2); // Should have thrown, so fail if it didn't FAIL() << "Did not detect incorrect element types for arithmetic operator"; } @@ -125,14 +125,14 @@ TEST(type_prop, select_elem_mismatch_bc) auto tv0_2_4_param_2 = make_shared(element::Type_t::i32, Shape{2, 4}); try { - auto bc = make_shared(tv0_2_4_param_0, tv0_2_4_param_1, tv0_2_4_param_2); + auto bc = make_shared(tv0_2_4_param_0, tv0_2_4_param_1, tv0_2_4_param_2); // Should have thrown, so fail if it didn't FAIL() << "Did not detect incorrect element types for arithmetic operator"; } catch (const NodeValidationFailure& error) { EXPECT_HAS_SUBSTRING(error.what(), - std::string("Argument 1 and 2 element types are inconsistent")); + std::string("Argument 1 and 2 element types must match")); } catch (...) { @@ -146,7 +146,7 @@ TEST(type_prop, select_partial_all_rank_dynamic) auto param1 = make_shared(element::Type_t::f32, PartialShape::dynamic()); auto param2 = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto sel = make_shared(param0, param1, param2); + auto sel = make_shared(param0, param1, param2); ASSERT_EQ(sel->get_output_element_type(0), element::Type_t::f32); ASSERT_TRUE(sel->get_output_partial_shape(0).rank().is_dynamic()); @@ -160,14 +160,14 @@ TEST(type_prop, select_partial_all_rank_dynamic_arg0_et_dynamic_arg1_arg2_et_mis try { - auto sel = make_shared(param0, param1, param2); + auto sel = make_shared(param0, param1, param2); FAIL() << "Did not detect mismatched element types for args 1 and 2 (element type-dynamic " "arg0)"; } catch (const NodeValidationFailure& error) { EXPECT_HAS_SUBSTRING(error.what(), - std::string("Argument 1 and 2 element types are inconsistent")); + std::string("Argument 1 and 2 element types must match")); } catch (...) { @@ -181,7 +181,7 @@ TEST(type_prop, select_partial_all_rank_dynamic_arg0_arg1_et_dynamic) auto param1 = make_shared(element::Type_t::dynamic, PartialShape::dynamic()); auto param2 = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto sel = make_shared(param0, param1, param2); + auto sel = make_shared(param0, param1, param2); ASSERT_EQ(sel->get_output_element_type(0), element::Type_t::f32); ASSERT_TRUE(sel->get_output_partial_shape(0).rank().is_dynamic()); @@ -193,7 +193,7 @@ TEST(type_prop, select_partial_all_rank_dynamic_arg0_arg2_et_dynamic) auto param1 = make_shared(element::Type_t::f32, PartialShape::dynamic()); auto param2 = make_shared(element::Type_t::dynamic, PartialShape::dynamic()); - auto sel = make_shared(param0, param1, param2); + auto sel = make_shared(param0, param1, param2); ASSERT_EQ(sel->get_output_element_type(0), element::Type_t::f32); ASSERT_TRUE(sel->get_output_partial_shape(0).rank().is_dynamic()); @@ -205,54 +205,12 @@ TEST(type_prop, select_partial_all_rank_dynamic_arg0_arg1_arg2_et_dynamic) auto param1 = make_shared(element::Type_t::dynamic, PartialShape::dynamic()); auto param2 = make_shared(element::Type_t::dynamic, PartialShape::dynamic()); - auto sel = make_shared(param0, param1, param2); + auto sel = make_shared(param0, param1, param2); ASSERT_EQ(sel->get_output_element_type(0), element::Type_t::dynamic); ASSERT_TRUE(sel->get_output_partial_shape(0).rank().is_dynamic()); } -TEST(type_prop, select_partial_arg0_rank_dynamic_static_arg1_arg2_rank_dynamic_ok) -{ - auto param0 = make_shared(element::Type_t::boolean, - PartialShape{2, Dimension::dynamic(), 3}); - auto param1 = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto param2 = make_shared(element::Type_t::f32, PartialShape::dynamic()); - - auto sel = make_shared(param0, param1, param2); - - ASSERT_EQ(sel->get_output_element_type(0), element::Type_t::f32); - ASSERT_TRUE( - sel->get_output_partial_shape(0).same_scheme(PartialShape{2, Dimension::dynamic(), 3})); -} - -TEST(type_prop, select_partial_arg1_rank_dynamic_static_arg0_arg2_rank_dynamic_ok) -{ - auto param0 = make_shared(element::Type_t::boolean, PartialShape::dynamic()); - auto param1 = - make_shared(element::Type_t::f32, PartialShape{2, Dimension::dynamic(), 3}); - auto param2 = make_shared(element::Type_t::f32, PartialShape::dynamic()); - - auto sel = make_shared(param0, param1, param2); - - ASSERT_EQ(sel->get_output_element_type(0), element::Type_t::f32); - ASSERT_TRUE( - sel->get_output_partial_shape(0).same_scheme(PartialShape{2, Dimension::dynamic(), 3})); -} - -TEST(type_prop, select_partial_arg2_rank_dynamic_static_arg0_arg1_rank_dynamic_ok) -{ - auto param0 = make_shared(element::Type_t::boolean, PartialShape::dynamic()); - auto param1 = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto param2 = - make_shared(element::Type_t::f32, PartialShape{2, Dimension::dynamic(), 3}); - - auto sel = make_shared(param0, param1, param2); - - ASSERT_EQ(sel->get_output_element_type(0), element::Type_t::f32); - ASSERT_TRUE( - sel->get_output_partial_shape(0).same_scheme(PartialShape{2, Dimension::dynamic(), 3})); -} - TEST(type_prop, select_partial_all_rank_static_dynamic_ok) { auto param0 = make_shared( @@ -262,7 +220,7 @@ TEST(type_prop, select_partial_all_rank_static_dynamic_ok) auto param2 = make_shared( element::Type_t::f32, PartialShape{Dimension::dynamic(), Dimension::dynamic(), 3}); - auto sel = make_shared(param0, param1, param2); + auto sel = make_shared(param0, param1, param2); ASSERT_EQ(sel->get_output_element_type(0), element::Type_t::f32); ASSERT_TRUE(sel->get_output_partial_shape(0).is_static()); @@ -280,7 +238,7 @@ TEST(type_prop, select_partial_all_rank_static_intransitive_incompatibility) try { - auto sel = make_shared(param0, param1, param2); + auto sel = make_shared(param0, param1, param2); FAIL() << "Did not detect intransitive partial-shape incompatibility"; } catch (const NodeValidationFailure& error) diff --git a/ngraph/test/type_prop/ti.cpp b/ngraph/test/type_prop/ti.cpp index c2c26b51587bd8..102da20f465a18 100644 --- a/ngraph/test/type_prop/ti.cpp +++ b/ngraph/test/type_prop/ti.cpp @@ -88,7 +88,7 @@ TEST(type_prop, tensor_iterator_2_slice_inputs_part_size_2) auto M_body = make_shared(element::Type_t::f32, Shape{32, 2, 10}); // Body - auto Zo = (Xi + Yi) * M_body; + auto Zo = std::make_shared(std::make_shared(Xi, Yi), M_body); auto body = make_shared(OutputVector{Zo}, ParameterVector{Xi, Yi, M_body}); auto tensor_iterator = make_shared(); @@ -132,7 +132,7 @@ TEST(type_prop, tensor_iterator_2_slice_inputs_part_size_2_dynamic) auto M_body = make_shared(element::Type_t::f32, PartialShape::dynamic()); // Body - auto Zo = (Xi + Yi) * M_body; + auto Zo = std::make_shared(std::make_shared(Xi, Yi), M_body); auto body = make_shared(OutputVector{Zo}, ParameterVector{Xi, Yi, M_body}); auto tensor_iterator = make_shared(); diff --git a/ngraph/test/util.cpp b/ngraph/test/util.cpp index d24bafd31dfe80..311f0385145a21 100644 --- a/ngraph/test/util.cpp +++ b/ngraph/test/util.cpp @@ -31,8 +31,6 @@ #include "util/all_close.hpp" #include "util/ndarray.hpp" -NGRAPH_SUPPRESS_DEPRECATED_START - using namespace std; using namespace ngraph; @@ -174,8 +172,8 @@ class CloneTest : public ::testing::Test std::shared_ptr A = make_shared(element::Type_t::f32, shape); std::shared_ptr B = make_shared(element::Type_t::f32, shape); std::shared_ptr C = make_shared(element::Type_t::f32, shape); - std::shared_ptr AplusB = A + B; - std::shared_ptr AplusBtimesC = AplusB * C; + std::shared_ptr AplusB = make_shared(A, B); + std::shared_ptr AplusBtimesC = make_shared(AplusB, C); NodeMap node_map; std::vector> nodes; @@ -222,8 +220,8 @@ TEST_F(CloneTest, clone_nodes_full) ASSERT_NE(nullptr, as_type_ptr(node_map.at(A.get()))); ASSERT_NE(nullptr, as_type_ptr(node_map.at(B.get()))); ASSERT_NE(nullptr, as_type_ptr(node_map.at(C.get()))); - ASSERT_NE(nullptr, as_type_ptr(node_map.at(AplusB.get()))); - ASSERT_NE(nullptr, as_type_ptr(node_map.at(AplusBtimesC.get()))); + ASSERT_NE(nullptr, as_type_ptr(node_map.at(AplusB.get()))); + ASSERT_NE(nullptr, as_type_ptr(node_map.at(AplusBtimesC.get()))); auto sorted_nodes = topological_sort(nodes); auto sorted_cloned_nodes = topological_sort(cloned_nodes); @@ -255,8 +253,8 @@ TEST(graph_util, clone_multiple_results) auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); auto C = make_shared(element::Type_t::f32, shape); - auto A_add_B = make_shared(A, B); - auto A_add_B_mul_C = make_shared(A_add_B, C); + auto A_add_B = make_shared(A, B); + auto A_add_B_mul_C = make_shared(A_add_B, C); auto f = make_shared(NodeVector{A_add_B, A_add_B_mul_C}, ParameterVector{A, B, C}); @@ -321,7 +319,7 @@ TEST(graph_util, get_subgraph_outputs_trivial_tests) outputs = ngraph::get_subgraph_outputs(NodeVector{B, abs_b, abs_b_neg}, NodeVector{}); ASSERT_EQ(outputs, (NodeVector{B})); - auto add_b = make_shared(neg_b, abs_b_neg); + auto add_b = make_shared(neg_b, abs_b_neg); outputs = ngraph::get_subgraph_outputs(NodeVector{B, abs_b, neg_b, abs_b_neg, add_b}, NodeVector{}); ASSERT_EQ(outputs, (NodeVector{})); @@ -337,8 +335,8 @@ TEST(graph_util, test_subgraph_topological_sort) auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); auto C = make_shared(element::Type_t::f32, shape); - auto add = A + B; - auto mul = C * add; + auto add = make_shared(A, B); + auto mul = make_shared(C, add); auto result = make_shared(mul); auto sorted = ngraph::subgraph_topological_sort(NodeVector{mul, add, A}); std::vector> expected{A, add, mul}; @@ -353,10 +351,10 @@ TEST(graph_util, test_subgraph_topological_sort_control_dependencies) auto C = make_shared(element::Type_t::f32, shape); auto D = make_shared(A); auto E = make_shared(B); - auto add = A + B; + auto add = make_shared(A, B); add->add_control_dependency(D); add->add_control_dependency(E); - auto mul = C * add; + auto mul = make_shared(C, add); auto result = make_shared(mul); auto sorted = ngraph::subgraph_topological_sort(NodeVector{mul, add, A, D}); std::vector> expected{A, D, add, mul}; @@ -604,7 +602,7 @@ TEST(util, clone_function_friendly_name) Shape shape{2, 2}; auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); - auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); + auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); A->set_friendly_name("A"); B->set_friendly_name("B"); @@ -628,7 +626,8 @@ TEST(util, clone_function_op_annotations) auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); auto C = make_shared(element::Type_t::f32, shape); - auto f = make_shared(A + B + C, ParameterVector{A, B, C}); + auto f = make_shared(make_shared(make_shared(A, B), C), + ParameterVector{A, B, C}); auto cacheable_op_annotation = std::make_shared(); cacheable_op_annotation->set_cacheable(true); @@ -666,7 +665,8 @@ TEST(util, topological_sort_replace) auto A = make_shared(element::Type_t::f32, shape); auto B = make_shared(element::Type_t::f32, shape); auto C = make_shared(element::Type_t::f32, shape); - auto f = make_shared(A + B + C, ParameterVector{A, B, C}); + auto f = make_shared(make_shared(make_shared(A, B), C), + ParameterVector{A, B, C}); bool custom_sorter_used = false; f->set_topological_sort( diff --git a/ngraph/test/util/known_element_types.hpp b/ngraph/test/util/known_element_types.hpp index 9003321e674b08..e3ef39b6b64d13 100644 --- a/ngraph/test/util/known_element_types.hpp +++ b/ngraph/test/util/known_element_types.hpp @@ -30,4 +30,5 @@ static const std::vector s_known_element_types = { ngraph::element::from(), ngraph::element::from(), ngraph::element::from(), - ngraph::element::from()}; + ngraph::element::from(), +}; diff --git a/ngraph/test/util/test_tools.cpp b/ngraph/test/util/test_tools.cpp index 168fa8f975d3ea..75e8705b781701 100644 --- a/ngraph/test/util/test_tools.cpp +++ b/ngraph/test/util/test_tools.cpp @@ -69,14 +69,14 @@ shared_ptr make_test_graph() auto arg_4 = make_shared(element::Type_t::f32, Shape{2, 2}); auto arg_5 = make_shared(element::Type_t::f32, Shape{2, 2}); - auto t0 = make_shared(arg_0, arg_1); + auto t0 = make_shared(arg_0, arg_1); auto t1 = make_shared(t0, arg_2); - auto t2 = make_shared(t0, arg_3); + auto t2 = make_shared(t0, arg_3); - auto t3 = make_shared(t1, arg_4); - auto t4 = make_shared(t2, arg_5); + auto t3 = make_shared(t1, arg_4); + auto t4 = make_shared(t2, arg_5); - auto r0 = make_shared(t3, t4); + auto r0 = make_shared(t3, t4); auto f0 = make_shared(r0, ParameterVector{arg_0, arg_1, arg_2, arg_3, arg_4, arg_5}); From c2e1f488e445b32f293d27752ac1fdf9475ba994 Mon Sep 17 00:00:00 2001 From: Nikolay Tyukaev Date: Thu, 3 Dec 2020 14:02:38 +0300 Subject: [PATCH 002/244] doc updates (#3437) * doc updates * delete linkchecker_filter.yaml * parse doxygen log --- docs/CMakeLists.txt | 15 ++++-- docs/doxygen/doxygen-ignore.txt | 27 +++++++++++ docs/doxygen/ie_c_api.config | 2 + docs/doxygen/ie_docs.config | 8 ++-- docs/doxygen/ie_plugin_api.config | 2 + docs/doxygen/ie_py_api.config | 2 + docs/doxygen/linkchecker_filter.yaml | 4 -- docs/doxygen/log.py | 68 ++++++++++++++++++++++++++++ docs/doxygen/ngraph_cpp_api.config | 2 + docs/doxygen/ngraph_py_api.config | 2 + 10 files changed, 120 insertions(+), 12 deletions(-) create mode 100644 docs/doxygen/doxygen-ignore.txt delete mode 100644 docs/doxygen/linkchecker_filter.yaml create mode 100644 docs/doxygen/log.py diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 5d14fd7e16bc5c..8c8d9b95036a73 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -70,6 +70,7 @@ function(build_docs) # Preprocessing scripts set(DOXY_MD_FILTER "${DOXYGEN_DIR}/doxy_md_filter.py") + set(DOXY_LOG_SCRIPT "${DOXYGEN_DIR}/log.py") set(PYX_FILTER "${DOXYGEN_DIR}/pyx_filter.py") file(GLOB_RECURSE doc_source_files @@ -193,6 +194,14 @@ function(build_docs) WORKING_DIRECTORY ${DOCS_BUILD_DIR} VERBATIM) + add_custom_command(TARGET ie_docs + POST_BUILD + COMMAND ${Python3_EXECUTABLE} ${DOXY_LOG_SCRIPT} --log ${DOCS_BUILD_DIR}/ie_docs.log + --exclude-links ".*?(omz_|pot_|gst_|workbench_).*?" + COMMENT "Parse doxygen log to find errors." + VERBATIM + ) + # Plugin API add_custom_target(plugin_api @@ -215,11 +224,9 @@ function(build_docs) # added linkcheker - if(EXISTS "${LINKCHECKER_PY}") + if(EXISTS "${LINKCHECKER}") add_custom_target(docs_check - COMMAND ${Python3_EXECUTABLE} "${LINKCHECKER_PY}" - "${DOCS_BUILD_DIR}/html/" -f "${DOXYGEN_DIR}/linkchecker_filter.yaml" - --no_recursive -l "${DOCS_BUILD_DIR}" + COMMAND ${Python3_EXECUTABLE} "${LINKCHECKER}" -v "${DOCS_BUILD_DIR}/html/" COMMENT "Check links in generated documentation" WORKING_DIRECTORY "${DOCS_BUILD_DIR}" VERBATIM) diff --git a/docs/doxygen/doxygen-ignore.txt b/docs/doxygen/doxygen-ignore.txt new file mode 100644 index 00000000000000..aafa75f9bdf705 --- /dev/null +++ b/docs/doxygen/doxygen-ignore.txt @@ -0,0 +1,27 @@ +ngraph_cpp_api.tag +inference-engine/include/details/ie_so_pointer.hpp +docs/IE_DG/Extensibility_DG/Custom_ONNX_Ops.md +docs/install_guides/installing-openvino-windows.md +docs/get_started/get_started_linux.md +inference-engine/include/vpu/vpu_plugin_config.hpp +inference-engine/include/ie_parallel.hpp +inference-engine/include/ie_unicode.hpp +inference-engine/include/ie_compound_blob.h +docs/get_started/get_started_windows.md +inference-engine/include/gpu/gpu_context_api_va.hpp +inference-engine/include/ie_remote_context.hpp +docs/how_tos/how-to-links.md +inference-engine/include/vpu/vpu_config.hpp +docs/index.md +inference-engine/ie_bridges/python/sample/ngraph_function_creation_sample/README.md +inference-engine/include/ie_plugin_config.hpp +inference-engine/include/ie_data.h +inference-engine/include/ie_blob.h +docs/get_started/get_started_macos.md +inference-engine/include/ie_precision.hpp +docs/install_guides/deployment-manager-tool.md +inference-engine/ie_bridges/c/docs/api_overview.md +inference-engine/include/gpu/gpu_context_api_dx.hpp +inference-engine/include/gpu/gpu_context_api_ocl.hpp +inference-engine/include/vpu/myriad_config.hpp +docs/benchmarks/performance_int8_vs_fp32.md diff --git a/docs/doxygen/ie_c_api.config b/docs/doxygen/ie_c_api.config index 541a21efe54254..1f7ef20ed88d44 100644 --- a/docs/doxygen/ie_c_api.config +++ b/docs/doxygen/ie_c_api.config @@ -24,3 +24,5 @@ INPUT = "@C_API@" HTML_OUTPUT = ie_c_api GENERATE_TAGFILE = "@DOCS_BUILD_DIR@/ie_c_api.tag" + +WARN_LOGFILE = @DOCS_BUILD_DIR@/ie_c_api.log \ No newline at end of file diff --git a/docs/doxygen/ie_docs.config b/docs/doxygen/ie_docs.config index c6264fac258fbf..b3872e48970cf2 100644 --- a/docs/doxygen/ie_docs.config +++ b/docs/doxygen/ie_docs.config @@ -811,7 +811,7 @@ WARN_FORMAT = "$file:$line: $text" # messages should be written. If left blank the output is written to standard # error (stderr). -WARN_LOGFILE = +WARN_LOGFILE = @DOCS_BUILD_DIR@/ie_docs.log #--------------------------------------------------------------------------- # Configuration options related to the input files @@ -1613,7 +1613,7 @@ FORMULA_MACROFILE = # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. -USE_MATHJAX = NO +USE_MATHJAX = YES # When MathJax is enabled you can set the default output format to be used for # the MathJax output. See the MathJax site (see: @@ -1636,14 +1636,14 @@ MATHJAX_FORMAT = HTML-CSS # The default value is: https://cdn.jsdelivr.net/npm/mathjax@2. # This tag requires that the tag USE_MATHJAX is set to YES. -MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest +MATHJAX_RELPATH = https://cdn.jsdelivr.net/npm/mathjax@2 # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax # extension names that should be enabled during MathJax rendering. For example # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols # This tag requires that the tag USE_MATHJAX is set to YES. -MATHJAX_EXTENSIONS = +MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # of code that will be used on startup of the MathJax code. See the MathJax site diff --git a/docs/doxygen/ie_plugin_api.config b/docs/doxygen/ie_plugin_api.config index 9c933ff249f733..1384184a417119 100644 --- a/docs/doxygen/ie_plugin_api.config +++ b/docs/doxygen/ie_plugin_api.config @@ -60,3 +60,5 @@ PREDEFINED = "INFERENCE_ENGINE_API=" \ "IE_SUPPRESS_DEPRECATED_END_WIN=" \ "IE_THREAD=IE_THREAD_TBB" \ "NGRAPH_RTTI_DECLARATION=" + +WARN_LOGFILE = @DOCS_BUILD_DIR@/ie_plugin_api.log diff --git a/docs/doxygen/ie_py_api.config b/docs/doxygen/ie_py_api.config index f89931421205b2..fd2005b800eb6e 100644 --- a/docs/doxygen/ie_py_api.config +++ b/docs/doxygen/ie_py_api.config @@ -33,3 +33,5 @@ INPUT = "@PYTHON_API_OUT@" HTML_OUTPUT = ie_python_api GENERATE_TAGFILE = "@DOCS_BUILD_DIR@/ie_python_api.tag" + +WARN_LOGFILE = @DOCS_BUILD_DIR@/ie_py_api.log diff --git a/docs/doxygen/linkchecker_filter.yaml b/docs/doxygen/linkchecker_filter.yaml deleted file mode 100644 index fc5e941c82d974..00000000000000 --- a/docs/doxygen/linkchecker_filter.yaml +++ /dev/null @@ -1,4 +0,0 @@ -exclude_links: - - '.*?\@ref omz.*' - - '.*?\@ref pot.*' - - '.*?\@ref workbench.*' diff --git a/docs/doxygen/log.py b/docs/doxygen/log.py new file mode 100644 index 00000000000000..bfd10f02480c38 --- /dev/null +++ b/docs/doxygen/log.py @@ -0,0 +1,68 @@ +import argparse +import os +import re + +def parse_arguments(): + parser = argparse.ArgumentParser() + parser.add_argument('--log', type=str, required=True, default=None, help='Path to doxygen log file') + parser.add_argument('--ignore-list', type=str, required=False, + default=os.path.join(os.path.abspath(os.path.dirname(__file__)),'doxygen-ignore.txt'), + help='Path to doxygen ignore list') + parser.add_argument('--strip', type=str, required=False, default=os.path.abspath('../../'), + help='Strip from warning paths') + parser.add_argument('--exclude-links', nargs='+', type=str, required=False, default=[], help='Markdown links to be excluded') + return parser.parse_args() + + +def strip_path(path, strip): + """Strip `path` components ends on `strip` + """ + path = path.replace('\\', '/') + if path.endswith('.md') or path.endswith('.tag'): + strip = os.path.join(strip, 'build/docs').replace('\\', '/') + '/' + else: + strip = strip.replace('\\', '/') + '/' + return path.split(strip)[-1] + + +def is_excluded_link(warning, exclude_links): + if 'unable to resolve reference to' in warning: + ref = re.findall(r"'(.*?)'", warning) + if ref: + ref = ref[0] + for link in exclude_links: + reg = re.compile(link) + if re.match(reg, ref): + return True + return False + + +def parse(log, ignore_list, strip, exclude_links): + found_errors = [] + with open(ignore_list, 'r') as f: + ignore_list = f.read().splitlines() + with open(log, 'r') as f: + log = f.read().splitlines() + for line in log: + if 'warning:' in line: + path, warning = list(map(str.strip, line.split('warning:'))) + path, line_num = path[:-1].rsplit(':', 1) + path = strip_path(path, strip) + if path in ignore_list or is_excluded_link(warning, exclude_links): + continue + else: + found_errors.append('{path} {warning} line: {line_num}'.format(path=path, + warning=warning, + line_num=line_num)) + if found_errors: + print('\n'.join(found_errors)) + exit(1) + + +def main(): + args = parse_arguments() + parse(args.log, args.ignore_list, args.strip, args.exclude_links) + + +if __name__ == '__main__': + main() diff --git a/docs/doxygen/ngraph_cpp_api.config b/docs/doxygen/ngraph_cpp_api.config index 0fba49bb28cd61..de55a6f36a96cc 100644 --- a/docs/doxygen/ngraph_cpp_api.config +++ b/docs/doxygen/ngraph_cpp_api.config @@ -19,3 +19,5 @@ INPUT = "@NGRAPH_DIR@/core/include/" \ HTML_OUTPUT = ngraph_cpp_api GENERATE_TAGFILE = "@DOCS_BUILD_DIR@/ngraph_cpp_api.tag" + +WARN_LOGFILE = @DOCS_BUILD_DIR@/ngraph_cpp_api.log diff --git a/docs/doxygen/ngraph_py_api.config b/docs/doxygen/ngraph_py_api.config index 0f5c087e3d8f83..abf5a5d20939f1 100644 --- a/docs/doxygen/ngraph_py_api.config +++ b/docs/doxygen/ngraph_py_api.config @@ -20,3 +20,5 @@ INPUT = "@NGRAPH_PY_DIR@" HTML_OUTPUT = ngraph_python_api PYTHON_DOCSTRING = NO + +WARN_LOGFILE = @DOCS_BUILD_DIR@/ngraph_python_api.log From f2c2636bb52ff6a6c6d2b4dba89fad666a66c96f Mon Sep 17 00:00:00 2001 From: Vladislav Golubev Date: Thu, 3 Dec 2020 16:26:24 +0300 Subject: [PATCH 003/244] [LPT] isPrecisionPreserved/canBeTransformed/isQuantized: handling unexpected layers tests (#3139) --- .../low_precision_transformations/src/add.cpp | 2 +- .../low_precision_transformations/src/mvn.cpp | 3 + .../lpt_public_methods_test.cpp | 56 +++++++++++++++++++ 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 inference-engine/tests/functional/inference_engine/lp_transformations/lpt_public_methods_test.cpp diff --git a/inference-engine/src/low_precision_transformations/src/add.cpp b/inference-engine/src/low_precision_transformations/src/add.cpp index daddb07a6ef52c..f284d106fd48bf 100644 --- a/inference-engine/src/low_precision_transformations/src/add.cpp +++ b/inference-engine/src/low_precision_transformations/src/add.cpp @@ -90,7 +90,7 @@ void AddTransformation::registerMatcherIn(GraphRewrite &pass, TransformationCont bool AddTransformation::transform(TransformationContext& context, ngraph::pattern::Matcher &m) const { std::shared_ptr op = as_type_ptr(m.get_match_root()); - if (!canBeTransformed(context, op)) { + if ((op == nullptr) || (!canBeTransformed(context, op))) { return false; } diff --git a/inference-engine/src/low_precision_transformations/src/mvn.cpp b/inference-engine/src/low_precision_transformations/src/mvn.cpp index b4540d22ccdc17..1057569cea9b9c 100644 --- a/inference-engine/src/low_precision_transformations/src/mvn.cpp +++ b/inference-engine/src/low_precision_transformations/src/mvn.cpp @@ -46,6 +46,9 @@ bool MVNTransformation::canBeTransformed(const TransformationContext& context, s } auto mvn = as_type_ptr(operation); + if (mvn == nullptr) { + return false; + } const std::shared_ptr multiply = mvn->get_input_node_shared_ptr(0); auto scalesConst = as_type_ptr(multiply->get_input_node_shared_ptr(1)); diff --git a/inference-engine/tests/functional/inference_engine/lp_transformations/lpt_public_methods_test.cpp b/inference-engine/tests/functional/inference_engine/lp_transformations/lpt_public_methods_test.cpp new file mode 100644 index 00000000000000..94be9f4f36c3f4 --- /dev/null +++ b/inference-engine/tests/functional/inference_engine/lp_transformations/lpt_public_methods_test.cpp @@ -0,0 +1,56 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include +#include +#include + +#include + +#include + +#include "common_test_utils/ngraph_test_utils.hpp" +#include "low_precision/transformer.hpp" + +using namespace testing; +using namespace ngraph; +using namespace ngraph::pass; + +TEST(LPT, isPrecisionPreservedTransformation) { + const auto layer = std::make_shared(element::f32, Shape{ 1, 3, 16, 16 }); + const auto transformations = low_precision::LowPrecisionTransformer::getAllTransformations(); + + for (const auto& transformation : transformations.transformations) { + ASSERT_NO_THROW(transformation.second->isPrecisionPreserved(layer)); + } +} + +TEST(LPT, canBeTransformedTransformation) { + const auto input = std::make_shared(element::f32, Shape{ 1, 3, 16, 16 }); + const auto mulConst = op::v0::Constant::create(element::f32, Shape{}, { 1.f }); + const auto mul = std::make_shared(input, mulConst); + const auto shapeConst = op::v0::Constant::create(ngraph::element::i64, ngraph::Shape{ 4 }, { 1, 3, 16, 16 }); + const auto layer = std::make_shared(mul, shapeConst, true); + + ngraph::ResultVector results{ std::make_shared(layer) }; + const auto function = std::make_shared(results, ngraph::ParameterVector{ input }, "TestFunction"); + + const auto transformations = low_precision::LowPrecisionTransformer::getAllTransformations(); + for (const auto& transformation : transformations.transformations) { + ASSERT_NO_THROW(transformation.second->canBeTransformed(low_precision::TransformationContext(function), layer)); + } +} + +TEST(LPT, isQuantizedTransformation) { + const auto input = std::make_shared(element::f32, Shape{ 1, 3, 16, 16 }); + const auto mulConst = op::v0::Constant::create(element::f32, Shape{}, { 1.f }); + const auto mul = std::make_shared(input, mulConst); + const auto shapeConst = op::v0::Constant::create(ngraph::element::i64, ngraph::Shape{ 4 }, { 1, 3, 16, 16 }); + const auto layer = std::make_shared(mul, shapeConst, true); + + const auto transformations = low_precision::LowPrecisionTransformer::getAllTransformations(); + for (const auto& transformation : transformations.transformations) { + ASSERT_NO_THROW(transformation.second->isQuantized(layer)); + } +} From 2d75d8aff2dff63ba082d17983a64ae893cde256 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Thu, 3 Dec 2020 17:52:55 +0300 Subject: [PATCH 004/244] Removed global using namespace from Plugin API (#3451) --- .../src/template_executable_network.cpp | 14 +++++----- docs/template_plugin/src/template_plugin.cpp | 22 +++++++-------- docs/template_plugin/src/template_plugin.hpp | 2 -- .../src/cldnn_engine/cldnn_engine.cpp | 28 +++++++++---------- .../src/gna_plugin/gna_plugin_internal.hpp | 4 +-- .../hetero_plugin/hetero_infer_request.cpp | 4 +-- .../src/hetero_plugin/hetero_plugin.cpp | 2 +- .../src/hetero_plugin/hetero_plugin.hpp | 2 +- .../src/mkldnn_plugin/mkldnn_exec_network.cpp | 6 ++-- .../src/mkldnn_plugin/mkldnn_plugin.cpp | 10 ++++--- .../src/multi_device/multi_device_plugin.cpp | 6 ++-- .../src/multi_device/multi_device_plugin.hpp | 2 +- .../impl/ie_plugin_internal.hpp | 4 --- .../interface/ie_iplugin_internal.hpp | 24 ++++++++-------- .../src/plugin_api/ie_algorithm.hpp | 4 +-- .../src/vpu/myriad_plugin/myriad_plugin.cpp | 28 +++++++++---------- .../mocks/mock_engine/mock_plugin.cpp | 2 +- .../mocks/mock_engine/mock_plugin.hpp | 2 +- .../unit/inference_engine_tests/util_test.cpp | 2 +- 19 files changed, 82 insertions(+), 86 deletions(-) diff --git a/docs/template_plugin/src/template_executable_network.cpp b/docs/template_plugin/src/template_executable_network.cpp index 19a1d7b4404829..d88e42844608f3 100644 --- a/docs/template_plugin/src/template_executable_network.cpp +++ b/docs/template_plugin/src/template_executable_network.cpp @@ -25,7 +25,7 @@ TemplatePlugin::ExecutableNetwork::ExecutableNetwork(const std::shared_ptrgetIdleCPUStreamsExecutor(streamsExecutorConfig); + _taskExecutor = InferenceEngine::ExecutorManager::getInstance()->getIdleCPUStreamsExecutor(streamsExecutorConfig); // NOTE: callback Executor is not configured. So callback will be called in the thread of the last stage of inference request pipeline - // _callbackExecutor = ExecutorManager::getInstance()->getIdleCPUStreamsExecutor({"TemplateCallbackExecutor"}); + // _callbackExecutor = InferenceEngine::ExecutorManager::getInstance()->getIdleCPUStreamsExecutor({"TemplateCallbackExecutor"}); } // ! [executable_network:init_executor] @@ -98,8 +98,8 @@ InferenceEngine::InferRequestInternal::Ptr TemplatePlugin::ExecutableNetwork::Cr // ! [executable_network:create_infer_request_impl] // ! [executable_network:create_infer_request] -IInferRequest::Ptr TemplatePlugin::ExecutableNetwork::CreateInferRequest() { - IInferRequest::Ptr asyncRequest; +InferenceEngine::IInferRequest::Ptr TemplatePlugin::ExecutableNetwork::CreateInferRequest() { + InferenceEngine::IInferRequest::Ptr asyncRequest; auto internalRequest = CreateInferRequestImpl(_networkInputs, _networkOutputs); auto asyncThreadSafeImpl = std::make_shared(std::static_pointer_cast(internalRequest), _taskExecutor, _plugin->_waitExecutor, _callbackExecutor); @@ -111,7 +111,7 @@ IInferRequest::Ptr TemplatePlugin::ExecutableNetwork::CreateInferRequest() { // ! [executable_network:create_infer_request] // ! [executable_network:get_config] -Parameter TemplatePlugin::ExecutableNetwork::GetConfig(const std::string &name) const { +InferenceEngine::Parameter TemplatePlugin::ExecutableNetwork::GetConfig(const std::string &name) const { return _cfg.Get(name); } // ! [executable_network:get_config] @@ -130,7 +130,7 @@ InferenceEngine::Parameter TemplatePlugin::ExecutableNetwork::GetMetric(const st CONFIG_KEY(DEVICE_ID), CONFIG_KEY(PERF_COUNT), TEMPLATE_CONFIG_KEY(THROUGHPUT_STREAMS) }; - auto streamExecutorConfigKeys = IStreamsExecutor::Config{}.SupportedKeys(); + auto streamExecutorConfigKeys = InferenceEngine::IStreamsExecutor::Config{}.SupportedKeys(); for (auto&& configKey : streamExecutorConfigKeys) { configKeys.emplace_back(configKey); } diff --git a/docs/template_plugin/src/template_plugin.cpp b/docs/template_plugin/src/template_plugin.cpp index c66b22c46156f0..64da1235e6ad21 100644 --- a/docs/template_plugin/src/template_plugin.cpp +++ b/docs/template_plugin/src/template_plugin.cpp @@ -33,15 +33,15 @@ Plugin::Plugin() { _backend = ngraph::runtime::Backend::create("INTERPRETER"); // create default stream executor with a given name - _waitExecutor = ExecutorManager::getInstance()->getIdleCPUStreamsExecutor({"TemplateWaitExecutor"}); + _waitExecutor = InferenceEngine::ExecutorManager::getInstance()->getIdleCPUStreamsExecutor({"TemplateWaitExecutor"}); } // ! [plugin:ctor] // ! [plugin:dtor] Plugin::~Plugin() { // Plugin should remove executors from executor cache to avoid threads number growth in the whole application - ExecutorManager::getInstance()->clear("TemplateStreamsExecutor"); - ExecutorManager::getInstance()->clear("TemplateWaitExecutor"); + InferenceEngine::ExecutorManager::getInstance()->clear("TemplateStreamsExecutor"); + InferenceEngine::ExecutorManager::getInstance()->clear("TemplateWaitExecutor"); // NOTE: Uncomment this if Inference Engine Executor cache is used to create callback executor // ExecutorManager::getInstance()->clear("TemplateCallbackExecutor"); } @@ -91,8 +91,8 @@ InferenceEngine::ExecutableNetworkInternal::Ptr Plugin::LoadExeNetworkImpl(const for (auto networkOutput : networkOutputs) { auto output_precision = networkOutput.second->getPrecision(); - if (output_precision != Precision::FP32 && - output_precision != Precision::FP16) { + if (output_precision != InferenceEngine::Precision::FP32 && + output_precision != InferenceEngine::Precision::FP16) { THROW_IE_EXCEPTION << "Template device supports only FP16 and FP32 output precision."; } } @@ -135,8 +135,8 @@ InferenceEngine::ExecutableNetwork Plugin::ImportNetworkImpl(std::istream& model // ! [plugin:import_network_impl] // ! [plugin:query_network] -QueryNetworkResult Plugin::QueryNetwork(const CNNNetwork &network, const ConfigMap& config) const { - QueryNetworkResult res; +InferenceEngine::QueryNetworkResult Plugin::QueryNetwork(const InferenceEngine::CNNNetwork &network, const ConfigMap& config) const { + InferenceEngine::QueryNetworkResult res; Configuration cfg{config, _cfg, false}; auto function = network.getFunction(); @@ -163,7 +163,7 @@ QueryNetworkResult Plugin::QueryNetwork(const CNNNetwork &network, const ConfigM for (auto&& fusedLayerName : ngraph::getFusedNamesVector(node)) { // Filter just nodes from original operation set // TODO: fill with actual decision rules based on whether kernel is supported by backend - if (contains(originalOps, fusedLayerName)) { + if (InferenceEngine::details::contains(originalOps, fusedLayerName)) { if (opset.contains_type_insensitive(fusedLayerName)) { supported.emplace(fusedLayerName); } else { @@ -175,7 +175,7 @@ QueryNetworkResult Plugin::QueryNetwork(const CNNNetwork &network, const ConfigM // 4. The result set should contains just nodes from supported set for (auto&& layerName : supported) { - if (!contains(unsupported, layerName)) { + if (!InferenceEngine::details::contains(unsupported, layerName)) { res.supportedLayersMap.emplace(layerName, GetName()); } } @@ -219,7 +219,7 @@ InferenceEngine::Parameter Plugin::GetMetric(const std::string& name, const std: CONFIG_KEY(DEVICE_ID), CONFIG_KEY(PERF_COUNT), TEMPLATE_CONFIG_KEY(THROUGHPUT_STREAMS)}; - auto streamExecutorConfigKeys = IStreamsExecutor::Config{}.SupportedKeys(); + auto streamExecutorConfigKeys = InferenceEngine::IStreamsExecutor::Config{}.SupportedKeys(); for (auto&& configKey : streamExecutorConfigKeys) { if (configKey != InferenceEngine::PluginConfigParams::KEY_CPU_THROUGHPUT_STREAMS) { configKeys.emplace_back(configKey); @@ -248,6 +248,6 @@ InferenceEngine::Parameter Plugin::GetMetric(const std::string& name, const std: // ! [plugin:get_metric] // ! [plugin:create_plugin_engine] -static const Version version = {{2, 1}, CI_BUILD_NUMBER, "templatePlugin"}; +static const InferenceEngine::Version version = {{2, 1}, CI_BUILD_NUMBER, "templatePlugin"}; IE_DEFINE_PLUGIN_CREATE_FUNCTION(Plugin, version) // ! [plugin:create_plugin_engine] diff --git a/docs/template_plugin/src/template_plugin.hpp b/docs/template_plugin/src/template_plugin.hpp index 9ec278cd8c6b9b..fe099ff734bc96 100644 --- a/docs/template_plugin/src/template_plugin.hpp +++ b/docs/template_plugin/src/template_plugin.hpp @@ -10,8 +10,6 @@ #include "backend.hpp" -#include "backend.hpp" - //! [plugin:header] namespace TemplatePlugin { diff --git a/inference-engine/src/cldnn_engine/cldnn_engine.cpp b/inference-engine/src/cldnn_engine/cldnn_engine.cpp index bcfa794c704709..d772214e031a0b 100644 --- a/inference-engine/src/cldnn_engine/cldnn_engine.cpp +++ b/inference-engine/src/cldnn_engine/cldnn_engine.cpp @@ -452,8 +452,8 @@ QueryNetworkResult clDNNEngine::QueryNetwork(const CNNNetwork& network, std::vector> concats; std::vector> nextLayerDependent; - for (CNNNetworkIterator itLayer{clonedNetwork.get()}; - itLayer != CNNNetworkIterator(); + for (InferenceEngine::details::CNNNetworkIterator itLayer{clonedNetwork.get()}; + itLayer != InferenceEngine::details::CNNNetworkIterator(); itLayer++) { auto layerIsSupported = [&] { auto node = (*itLayer)->getNode(); @@ -490,7 +490,7 @@ QueryNetworkResult clDNNEngine::QueryNetwork(const CNNNetwork& network, continue; } for (auto&& fusedLayerName : ngraph::getFusedNamesVector(fusedNode)) { - if (contains(originalOps, fusedLayerName)) { + if (InferenceEngine::details::contains(originalOps, fusedLayerName)) { if (layerIsSupported) { supported.emplace(fusedLayerName); } else { @@ -501,7 +501,7 @@ QueryNetworkResult clDNNEngine::QueryNetwork(const CNNNetwork& network, } for (auto&& layerName : supported) { - if (contains(unsupported, layerName)) { + if (InferenceEngine::details::contains(unsupported, layerName)) { supported.erase(layerName); } } @@ -512,10 +512,10 @@ QueryNetworkResult clDNNEngine::QueryNetwork(const CNNNetwork& network, const auto outputs = split->outputs(); for (const auto& output : outputs) { const auto& name = output.get_node()->get_friendly_name(); - if (!contains(supported, name) && - !contains(depLayerNames, name) && - !contains(concatNames, name) && - !contains(splitNames, name)) { + if (!InferenceEngine::details::contains(supported, name) && + !InferenceEngine::details::contains(depLayerNames, name) && + !InferenceEngine::details::contains(concatNames, name) && + !InferenceEngine::details::contains(splitNames, name)) { is_supported = false; break; } @@ -530,9 +530,9 @@ QueryNetworkResult clDNNEngine::QueryNetwork(const CNNNetwork& network, const auto inputs = concat->inputs(); for (const auto& input : inputs) { const auto& name = input.get_node()->get_friendly_name(); - if (!contains(supported, name) && - !contains(depLayerNames, name) && - !contains(concatNames, name)) { + if (!InferenceEngine::details::contains(supported, name) && + !InferenceEngine::details::contains(depLayerNames, name) && + !InferenceEngine::details::contains(concatNames, name)) { is_supported = false; break; } @@ -548,7 +548,7 @@ QueryNetworkResult clDNNEngine::QueryNetwork(const CNNNetwork& network, const auto inputs = cnl->inputs(); for (const auto& input : inputs) { const auto& name = input.get_node()->get_friendly_name(); - if (!contains(supported, name)) { + if (!InferenceEngine::details::contains(supported, name)) { is_supported = false; break; } @@ -556,7 +556,7 @@ QueryNetworkResult clDNNEngine::QueryNetwork(const CNNNetwork& network, const auto outputs = cnl->outputs(); for (const auto& output : outputs) { const auto& name = output.get_node()->get_friendly_name(); - if (!contains(supported, name)) { + if (!InferenceEngine::details::contains(supported, name)) { is_supported = false; break; } @@ -567,7 +567,7 @@ QueryNetworkResult clDNNEngine::QueryNetwork(const CNNNetwork& network, } for (auto&& node : function->get_ops()) { - if (contains(supported, node->get_friendly_name())) { + if (InferenceEngine::details::contains(supported, node->get_friendly_name())) { for (auto&& inputNodeOutput : node->input_values()) { if (ngraph::op::is_constant(inputNodeOutput.get_node()) || ngraph::op::is_parameter(inputNodeOutput.get_node())) { supported.emplace(inputNodeOutput.get_node()->get_friendly_name()); diff --git a/inference-engine/src/gna_plugin/gna_plugin_internal.hpp b/inference-engine/src/gna_plugin/gna_plugin_internal.hpp index 815934b12c0ef6..0b3e80e921ef3a 100644 --- a/inference-engine/src/gna_plugin/gna_plugin_internal.hpp +++ b/inference-engine/src/gna_plugin/gna_plugin_internal.hpp @@ -55,8 +55,8 @@ class GNAPluginInternal : public InferenceEngine::InferencePluginInternal { return make_executable_network(std::make_shared(modelFileName, plg)); } - ExecutableNetwork ImportNetwork(std::istream& networkModel, - const std::map& config) override { + InferenceEngine::ExecutableNetwork ImportNetwork(std::istream& networkModel, + const std::map& config) override { Config updated_config(defaultConfig); updated_config.UpdateFromMap(config); auto plg = std::make_shared(updated_config.key_config_map); diff --git a/inference-engine/src/hetero_plugin/hetero_infer_request.cpp b/inference-engine/src/hetero_plugin/hetero_infer_request.cpp index b4b606908160d7..61d963cbab728a 100644 --- a/inference-engine/src/hetero_plugin/hetero_infer_request.cpp +++ b/inference-engine/src/hetero_plugin/hetero_infer_request.cpp @@ -37,9 +37,9 @@ HeteroInferRequest::HeteroInferRequest(InferenceEngine::InputsDataMap networkInp std::tie(itBlob, emplaced) = _blobs.emplace(intermediateBlobName, Blob::Ptr{}); if (emplaced) { itBlob->second = r->GetBlob(blobName); - if (contains(networkInputs, blobName)) { + if (InferenceEngine::details::contains(networkInputs, blobName)) { _inputs[blobName] = itBlob->second; - } else if (contains(networkOutputs, blobName)) { + } else if (InferenceEngine::details::contains(networkOutputs, blobName)) { _outputs[blobName] = itBlob->second; } } else { diff --git a/inference-engine/src/hetero_plugin/hetero_plugin.cpp b/inference-engine/src/hetero_plugin/hetero_plugin.cpp index 9c7af172eb31c3..779da851eb0f27 100644 --- a/inference-engine/src/hetero_plugin/hetero_plugin.cpp +++ b/inference-engine/src/hetero_plugin/hetero_plugin.cpp @@ -65,7 +65,7 @@ InferenceEngine::ExecutableNetworkInternal::Ptr Engine::LoadExeNetworkImpl(const return std::make_shared(network, mergeConfigs(_config, config), this); } -ExecutableNetwork Engine::ImportNetworkImpl(std::istream& heteroModel, const Configs& config) { +InferenceEngine::ExecutableNetwork Engine::ImportNetworkImpl(std::istream& heteroModel, const Configs& config) { if (GetCore() == nullptr) { THROW_IE_EXCEPTION << "Please, work with HETERO device via InferencEngine::Core object"; } diff --git a/inference-engine/src/hetero_plugin/hetero_plugin.hpp b/inference-engine/src/hetero_plugin/hetero_plugin.hpp index c44b0e7e9530fa..ee04693fcdc2e1 100644 --- a/inference-engine/src/hetero_plugin/hetero_plugin.hpp +++ b/inference-engine/src/hetero_plugin/hetero_plugin.hpp @@ -37,7 +37,7 @@ class Engine : public InferenceEngine::InferencePluginInternal { InferenceEngine::Parameter GetConfig(const std::string& name, const std::map & options) const override; - ExecutableNetwork ImportNetworkImpl(std::istream& heteroModel, const Configs& config) override; + InferenceEngine::ExecutableNetwork ImportNetworkImpl(std::istream& heteroModel, const Configs& config) override; DeviceMetaInformationMap GetDevicePlugins(const std::string& targetFallback, const Configs & localConfig) const; diff --git a/inference-engine/src/mkldnn_plugin/mkldnn_exec_network.cpp b/inference-engine/src/mkldnn_plugin/mkldnn_exec_network.cpp index 4bcd2d9e4efd44..39cb372c7e0ae5 100644 --- a/inference-engine/src/mkldnn_plugin/mkldnn_exec_network.cpp +++ b/inference-engine/src/mkldnn_plugin/mkldnn_exec_network.cpp @@ -145,14 +145,14 @@ MKLDNNExecNetwork::MKLDNNExecNetwork(const InferenceEngine::ICNNNetwork &network if (cfg.exclusiveAsyncRequests) { // special case when all InferRequests are muxed into a single queue - _taskExecutor = ExecutorManager::getInstance()->getExecutor("CPU"); + _taskExecutor = InferenceEngine::ExecutorManager::getInstance()->getExecutor("CPU"); } else { auto streamsExecutorConfig = InferenceEngine::IStreamsExecutor::Config::MakeDefaultMultiThreaded(_cfg.streamExecutorConfig); streamsExecutorConfig._name = "CPUStreamsExecutor"; - _taskExecutor = ExecutorManager::getInstance()->getIdleCPUStreamsExecutor(streamsExecutorConfig); + _taskExecutor = InferenceEngine::ExecutorManager::getInstance()->getIdleCPUStreamsExecutor(streamsExecutorConfig); } if (0 != cfg.streamExecutorConfig._streams) { - _callbackExecutor = ExecutorManager::getInstance()->getIdleCPUStreamsExecutor( + _callbackExecutor = InferenceEngine::ExecutorManager::getInstance()->getIdleCPUStreamsExecutor( IStreamsExecutor::Config{"CPUCallbackExecutor", 1, 0, IStreamsExecutor::ThreadBindingType::NONE}); } else { _callbackExecutor = _taskExecutor; diff --git a/inference-engine/src/mkldnn_plugin/mkldnn_plugin.cpp b/inference-engine/src/mkldnn_plugin/mkldnn_plugin.cpp index eed640b0148d97..d5d8d8316fd336 100644 --- a/inference-engine/src/mkldnn_plugin/mkldnn_plugin.cpp +++ b/inference-engine/src/mkldnn_plugin/mkldnn_plugin.cpp @@ -259,7 +259,9 @@ static void Transformation(ICNNNetwork::Ptr& clonedNetwork, const Config& conf) // WA: after conversion to CNNNetwork user precision can redefine input/output precisions // so we need to apply additional precision conversion but only for inputs and outputs for (auto & precision : convert_precision_list) { - NetPass::ConvertIOPrecision(*clonedNetwork, convertPrecision(precision.first), convertPrecision(precision.second)); + NetPass::ConvertIOPrecision(*clonedNetwork, + InferenceEngine::details::convertPrecision(precision.first), + InferenceEngine::details::convertPrecision(precision.second)); } } @@ -450,7 +452,7 @@ QueryNetworkResult Engine::QueryNetwork(const CNNNetwork& network, const std::ma return true; } (); for (auto&& fusedLayerName : ngraph::getFusedNamesVector((*itLayer)->getNode())) { - if (contains(originalOps, fusedLayerName)) { + if (InferenceEngine::details::contains(originalOps, fusedLayerName)) { if (layerIsSupported) { supported.emplace(fusedLayerName); } else { @@ -461,7 +463,7 @@ QueryNetworkResult Engine::QueryNetwork(const CNNNetwork& network, const std::ma } for (auto&& node : function->get_ops()) { - if (!contains(unsupported, node->get_friendly_name())) { + if (!InferenceEngine::details::contains(unsupported, node->get_friendly_name())) { for (auto&& inputNodeOutput : node->input_values()) { if (ngraph::op::is_constant(inputNodeOutput.get_node())) { supported.emplace(inputNodeOutput.get_node()->get_friendly_name()); @@ -478,7 +480,7 @@ QueryNetworkResult Engine::QueryNetwork(const CNNNetwork& network, const std::ma } for (auto&& layerName : supported) { - if (!contains(unsupported, layerName)) { + if (!InferenceEngine::details::contains(unsupported, layerName)) { res.supportedLayersMap.emplace(layerName, GetName()); } } diff --git a/inference-engine/src/multi_device/multi_device_plugin.cpp b/inference-engine/src/multi_device/multi_device_plugin.cpp index 8d1217fedc7fe8..85172e37723ee0 100644 --- a/inference-engine/src/multi_device/multi_device_plugin.cpp +++ b/inference-engine/src/multi_device/multi_device_plugin.cpp @@ -99,8 +99,8 @@ std::vector MultiDeviceInferencePlugin::ParseMetaDevices(cons return metaDevices; } -Parameter MultiDeviceInferencePlugin::GetConfig(const std::string& name, - const std::map & options) const { +InferenceEngine::Parameter MultiDeviceInferencePlugin::GetConfig(const std::string& name, + const std::map & options) const { if (name == MULTI_CONFIG_KEY(DEVICE_PRIORITIES)) { auto it = _config.find(MULTI_CONFIG_KEY(DEVICE_PRIORITIES)); if (it == _config.end()) { @@ -219,7 +219,7 @@ QueryNetworkResult MultiDeviceInferencePlugin::QueryNetwork(const CNNNetwork& } supportedLayers = supportedLayers.empty() ? deviceSupportedLayers : (deviceSupportedLayers.empty() - ? supportedLayers : Intersection(supportedLayers, deviceSupportedLayers)); + ? supportedLayers : InferenceEngine::details::Intersection(supportedLayers, deviceSupportedLayers)); } for (auto&& supportedLayer : supportedLayers) { queryResult.supportedLayersMap[supportedLayer] = GetName(); diff --git a/inference-engine/src/multi_device/multi_device_plugin.hpp b/inference-engine/src/multi_device/multi_device_plugin.hpp index 09124822ce8541..0e2d9a43711724 100644 --- a/inference-engine/src/multi_device/multi_device_plugin.hpp +++ b/inference-engine/src/multi_device/multi_device_plugin.hpp @@ -24,7 +24,7 @@ class MultiDeviceInferencePlugin : public InferenceEngine::InferencePluginIntern const std::map& config) override; void SetConfig(const std::map& config) override; - Parameter GetConfig(const std::string& name, const std::map & options) const override; + InferenceEngine::Parameter GetConfig(const std::string& name, const std::map & options) const override; InferenceEngine::QueryNetworkResult QueryNetwork(const InferenceEngine::CNNNetwork& network, const std::map& config) const override; InferenceEngine::Parameter GetMetric(const std::string& name, diff --git a/inference-engine/src/plugin_api/cpp_interfaces/impl/ie_plugin_internal.hpp b/inference-engine/src/plugin_api/cpp_interfaces/impl/ie_plugin_internal.hpp index 5b2975741688b2..2f56b4827b46a7 100644 --- a/inference-engine/src/plugin_api/cpp_interfaces/impl/ie_plugin_internal.hpp +++ b/inference-engine/src/plugin_api/cpp_interfaces/impl/ie_plugin_internal.hpp @@ -21,10 +21,6 @@ #include "cpp_interfaces/interface/ie_iplugin_internal.hpp" #include "cpp_interfaces/plugin_itt.hpp" - -using namespace InferenceEngine; -using namespace InferenceEngine::details; - namespace InferenceEngine { namespace { diff --git a/inference-engine/src/plugin_api/cpp_interfaces/interface/ie_iplugin_internal.hpp b/inference-engine/src/plugin_api/cpp_interfaces/interface/ie_iplugin_internal.hpp index 935ac60dff7b97..aa448544a35986 100644 --- a/inference-engine/src/plugin_api/cpp_interfaces/interface/ie_iplugin_internal.hpp +++ b/inference-engine/src/plugin_api/cpp_interfaces/interface/ie_iplugin_internal.hpp @@ -280,16 +280,16 @@ class IInferencePlugin : public details::IRelease, * @brief Defines the exported `CreatePluginEngine` function which is used to create a plugin instance * @ingroup ie_dev_api_plugin_api */ -#define IE_DEFINE_PLUGIN_CREATE_FUNCTION(PluginType, version, ...) \ - INFERENCE_PLUGIN_API(InferenceEngine::StatusCode) CreatePluginEngine( \ - InferenceEngine::IInferencePlugin *&plugin, \ - InferenceEngine::ResponseDesc *resp) noexcept { \ - try { \ - plugin = new PluginType(__VA_ARGS__); \ - plugin->SetVersion(version); \ - return OK; \ - } \ - catch (std::exception &ex) { \ - return InferenceEngine::DescriptionBuffer(GENERAL_ERROR, resp) << ex.what(); \ - } \ +#define IE_DEFINE_PLUGIN_CREATE_FUNCTION(PluginType, version, ...) \ + INFERENCE_PLUGIN_API(InferenceEngine::StatusCode) CreatePluginEngine( \ + InferenceEngine::IInferencePlugin *&plugin, \ + InferenceEngine::ResponseDesc *resp) noexcept { \ + try { \ + plugin = new PluginType(__VA_ARGS__); \ + plugin->SetVersion(version); \ + return InferenceEngine::OK; \ + } \ + catch (std::exception &ex) { \ + return InferenceEngine::DescriptionBuffer(InferenceEngine::GENERAL_ERROR, resp) << ex.what(); \ + } \ } diff --git a/inference-engine/src/plugin_api/ie_algorithm.hpp b/inference-engine/src/plugin_api/ie_algorithm.hpp index 319198c40a9bdb..16a577b2d7a329 100644 --- a/inference-engine/src/plugin_api/ie_algorithm.hpp +++ b/inference-engine/src/plugin_api/ie_algorithm.hpp @@ -93,7 +93,7 @@ static Set Intersection(const Set& lhs, const Set& rhs) { const auto& minSizeSet = (lhs.size() < rhs.size()) ? lhs : rhs; const auto& maxSizeSet = (lhs.size() >= rhs.size()) ? lhs : rhs; for (auto&& val : minSizeSet) { - if (contains(maxSizeSet, val)) { + if (InferenceEngine::details::contains(maxSizeSet, val)) { result.insert(val); } } @@ -112,7 +112,7 @@ static bool Intersects(const Set& lhs, const Set& rhs) { const auto& minSizeSet = (lhs.size() < rhs.size()) ? lhs : rhs; const auto& maxSizeSet = (lhs.size() >= rhs.size()) ? lhs : rhs; for (auto&& val : minSizeSet) { - if (contains(maxSizeSet, val)) { + if (InferenceEngine::details::contains(maxSizeSet, val)) { return true; } } diff --git a/inference-engine/src/vpu/myriad_plugin/myriad_plugin.cpp b/inference-engine/src/vpu/myriad_plugin/myriad_plugin.cpp index d1d2d7a334802e..21c230f5e58a2f 100644 --- a/inference-engine/src/vpu/myriad_plugin/myriad_plugin.cpp +++ b/inference-engine/src/vpu/myriad_plugin/myriad_plugin.cpp @@ -100,7 +100,7 @@ QueryNetworkResult Engine::QueryNetwork( ngraph::NodeVector splits; ngraph::NodeVector concats; - const auto isLayerSupported = [this, &splitNames, &concatNames, &concats, &splits](CNNNetworkIterator& layer) -> bool { + const auto isLayerSupported = [this, &splitNames, &concatNames, &concats, &splits](InferenceEngine::details::CNNNetworkIterator& layer) -> bool { auto node = (*layer)->getNode(); if (std::dynamic_pointer_cast(node) != nullptr) { splitNames.emplace(node->get_friendly_name()); @@ -117,8 +117,8 @@ QueryNetworkResult Engine::QueryNetwork( } }; - for (CNNNetworkIterator itLayer{convertedNetwork.get()}; - itLayer != CNNNetworkIterator(); + for (InferenceEngine::details::CNNNetworkIterator itLayer{convertedNetwork.get()}; + itLayer != InferenceEngine::details::CNNNetworkIterator(); itLayer++) { const auto fusedNode = (*itLayer)->getNode(); if (fusedNode == nullptr) { @@ -126,7 +126,7 @@ QueryNetworkResult Engine::QueryNetwork( } for (auto& fusedLayerName : ngraph::getFusedNamesVector(fusedNode)) { - if (contains(originalOps, fusedLayerName)) { + if (InferenceEngine::details::contains(originalOps, fusedLayerName)) { if (isLayerSupported(itLayer)) { supported.emplace(fusedLayerName); } else { @@ -137,7 +137,7 @@ QueryNetworkResult Engine::QueryNetwork( } for (const auto& layerName : supported) { - if (contains(unsupported, layerName)) { + if (InferenceEngine::details::contains(unsupported, layerName)) { supported.erase(layerName); } } @@ -149,13 +149,13 @@ QueryNetworkResult Engine::QueryNetwork( const auto inputs = split->inputs(); for (const auto& input : inputs) { const auto& parentName = input.get_source_output().get_node()->get_friendly_name(); - if (contains(supported, parentName) && - contains(splitNames, parentName)) { + if (InferenceEngine::details::contains(supported, parentName) && + InferenceEngine::details::contains(splitNames, parentName)) { markParentSplitAsUnsupported(input.get_source_output().get_node_shared_ptr()); } } const auto& name = split->get_friendly_name(); - if (contains(supported, name)) { + if (InferenceEngine::details::contains(supported, name)) { supported.erase(name); } }; @@ -167,9 +167,9 @@ QueryNetworkResult Engine::QueryNetwork( for (const auto& output : outputs) { for (const auto& consumer : output.get_target_inputs()) { const auto& name = consumer.get_node()->get_friendly_name(); - if (!contains(supported, name) && - !contains(concatNames, name) && - !contains(splitNames, name)) { + if (!InferenceEngine::details::contains(supported, name) && + !InferenceEngine::details::contains(concatNames, name) && + !InferenceEngine::details::contains(splitNames, name)) { is_supported = false; break; } @@ -189,8 +189,8 @@ QueryNetworkResult Engine::QueryNetwork( const auto inputs = concat->inputs(); for (const auto& input : inputs) { const auto& name = input.get_source_output().get_node()->get_friendly_name(); - if (!contains(supported, name) && - !contains(concatNames, name)) { + if (!InferenceEngine::details::contains(supported, name) && + !InferenceEngine::details::contains(concatNames, name)) { is_supported = false; break; } @@ -201,7 +201,7 @@ QueryNetworkResult Engine::QueryNetwork( } for (const auto& node : function->get_ops()) { - if (contains(supported, node->get_friendly_name())) { + if (InferenceEngine::details::contains(supported, node->get_friendly_name())) { for (const auto& inputNodeOutput : node->input_values()) { if (ngraph::op::is_constant(inputNodeOutput.get_node()) || ngraph::op::is_parameter(inputNodeOutput.get_node())) { supported.emplace(inputNodeOutput.get_node()->get_friendly_name()); diff --git a/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/mock_engine/mock_plugin.cpp b/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/mock_engine/mock_plugin.cpp index f770b2c6e9ebb8..c76c188e2252e8 100644 --- a/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/mock_engine/mock_plugin.cpp +++ b/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/mock_engine/mock_plugin.cpp @@ -32,7 +32,7 @@ MockPlugin::LoadNetwork(const CNNNetwork &network, } } -ExecutableNetworkInternal::Ptr +InferenceEngine::ExecutableNetworkInternal::Ptr MockPlugin::LoadExeNetworkImpl(const InferenceEngine::CNNNetwork& network, const std::map& config) { return {}; diff --git a/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/mock_engine/mock_plugin.hpp b/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/mock_engine/mock_plugin.hpp index f500dfc1ce77e0..1015f6a5a54330 100644 --- a/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/mock_engine/mock_plugin.hpp +++ b/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/mock_engine/mock_plugin.hpp @@ -20,7 +20,7 @@ class MockPlugin : public InferenceEngine::InferencePluginInternal { InferenceEngine::ExecutableNetwork LoadNetwork(const InferenceEngine::CNNNetwork &network, const std::map &config) override; - ExecutableNetworkInternal::Ptr + InferenceEngine::ExecutableNetworkInternal::Ptr LoadExeNetworkImpl(const InferenceEngine::CNNNetwork& network, const std::map& config) override; diff --git a/inference-engine/tests_deprecated/unit/inference_engine_tests/util_test.cpp b/inference-engine/tests_deprecated/unit/inference_engine_tests/util_test.cpp index f45e41b3eabb49..9774473cd50a17 100644 --- a/inference-engine/tests_deprecated/unit/inference_engine_tests/util_test.cpp +++ b/inference-engine/tests_deprecated/unit/inference_engine_tests/util_test.cpp @@ -100,7 +100,7 @@ TEST(UtilTests, cloneLayers) { namespace { IE::CNNLayerPtr getLayer(const IE::details::CNNNetworkImplPtr n, const char* name) { - if (contains(n->allLayers(), name)) { + if (InferenceEngine::details::contains(n->allLayers(), name)) { return n->allLayers().find(name)->second; } return nullptr; From 325a0a4f5e9f0024b321dc3eb4806d8436763c29 Mon Sep 17 00:00:00 2001 From: Vladimir Paramuzov Date: Thu, 3 Dec 2020 17:53:15 +0300 Subject: [PATCH 005/244] Added cloneNetwork method into plugins api (#3450) * Added cloneNetwork method into plugins api * Fixed cloneNetwork call in MKLDNN and GNA plugins to pick correct function * Changed return type --- .../src/gna_plugin/gna_plugin.cpp | 2 +- .../src/gna_plugin/gna_plugin_internal.hpp | 2 +- .../src/inference_engine/ie_ngraph_utils.cpp | 23 +++++++++++++++++++ .../src/mkldnn_plugin/mkldnn_plugin.cpp | 4 ++-- .../src/plugin_api/ie_ngraph_utils.hpp | 9 ++++++++ 5 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 inference-engine/src/inference_engine/ie_ngraph_utils.cpp diff --git a/inference-engine/src/gna_plugin/gna_plugin.cpp b/inference-engine/src/gna_plugin/gna_plugin.cpp index b8f8be8d7935b3..a724cefc3769cd 100644 --- a/inference-engine/src/gna_plugin/gna_plugin.cpp +++ b/inference-engine/src/gna_plugin/gna_plugin.cpp @@ -436,7 +436,7 @@ void GNAPlugin::UpdateInputScaleFromNetwork(InferenceEngine::ICNNNetwork & netwo void GNAPlugin::LoadNetwork(CNNNetwork & _network) { std::shared_ptr convertedNetwork; if (_network.getFunction()) { - std::shared_ptr clonedNetwork = cloneNetwork(_network); + std::shared_ptr clonedNetwork = InferenceEngine::cloneNetwork(_network); const auto& graph = clonedNetwork->getFunction(); // Disable shape inference (WA for generic operations) ngraph::op::GenericIE::DisableReshape noReshape(graph); diff --git a/inference-engine/src/gna_plugin/gna_plugin_internal.hpp b/inference-engine/src/gna_plugin/gna_plugin_internal.hpp index 0b3e80e921ef3a..08f1efb8bae809 100644 --- a/inference-engine/src/gna_plugin/gna_plugin_internal.hpp +++ b/inference-engine/src/gna_plugin/gna_plugin_internal.hpp @@ -36,7 +36,7 @@ class GNAPluginInternal : public InferenceEngine::InferencePluginInternal { updated_config.UpdateFromMap(config); auto plg = std::make_shared(updated_config.key_config_map); plgPtr = plg; - InferenceEngine::CNNNetwork clonedNetwork(cloneNetwork(network)); + InferenceEngine::CNNNetwork clonedNetwork(InferenceEngine::cloneNetwork(network)); return std::make_shared(clonedNetwork, plg); } diff --git a/inference-engine/src/inference_engine/ie_ngraph_utils.cpp b/inference-engine/src/inference_engine/ie_ngraph_utils.cpp new file mode 100644 index 00000000000000..1663b35c012434 --- /dev/null +++ b/inference-engine/src/inference_engine/ie_ngraph_utils.cpp @@ -0,0 +1,23 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include +#include "cnn_network_ngraph_impl.hpp" +#include "ie_itt.hpp" + +namespace InferenceEngine { +namespace details { + +CNNNetwork cloneNetwork(const CNNNetwork& network) { + OV_ITT_SCOPED_TASK(itt::domains::IE, "cloneNetwork"); + + if (network.getFunction()) { + return CNNNetwork(std::make_shared(network)); + } + + THROW_IE_EXCEPTION << "InferenceEngine::details::cloneNetwork requires ngraph-based `network` object to clone"; +} + +} // namespace details +} // namespace InferenceEngine diff --git a/inference-engine/src/mkldnn_plugin/mkldnn_plugin.cpp b/inference-engine/src/mkldnn_plugin/mkldnn_plugin.cpp index d5d8d8316fd336..1f4553a3ca3148 100644 --- a/inference-engine/src/mkldnn_plugin/mkldnn_plugin.cpp +++ b/inference-engine/src/mkldnn_plugin/mkldnn_plugin.cpp @@ -298,7 +298,7 @@ Engine::LoadExeNetworkImpl(const InferenceEngine::CNNNetwork &network, const std conf.batchLimit = static_cast(network.getBatchSize()); } - std::shared_ptr clonedNetwork = cloneNetwork(network); + std::shared_ptr clonedNetwork = InferenceEngine::cloneNetwork(network); bool is_transformed = false; if (clonedNetwork->getFunction()) { @@ -437,7 +437,7 @@ QueryNetworkResult Engine::QueryNetwork(const CNNNetwork& network, const std::ma conf.batchLimit = static_cast(network.getBatchSize()); } - auto clonedNetwork = cloneNetwork(network); + auto clonedNetwork = InferenceEngine::cloneNetwork(network); Transformation(clonedNetwork, conf); std::unordered_set supported; std::unordered_set unsupported; diff --git a/inference-engine/src/plugin_api/ie_ngraph_utils.hpp b/inference-engine/src/plugin_api/ie_ngraph_utils.hpp index 3a05fcbcfe5efb..22cd621cd47572 100644 --- a/inference-engine/src/plugin_api/ie_ngraph_utils.hpp +++ b/inference-engine/src/plugin_api/ie_ngraph_utils.hpp @@ -8,6 +8,7 @@ #include #include #include +#include namespace InferenceEngine { namespace details { @@ -126,5 +127,13 @@ inline Precision convertPrecision(const ::ngraph::element::Type& precision) { } } +/** + * @brief Clones input network including all layers and internal data objects + * @note Blobs inside layers are reused + * @param network A network to clone + * @return A cloned object + */ +INFERENCE_ENGINE_API_CPP(CNNNetwork) cloneNetwork(const CNNNetwork& network); + } // namespace details } // namespace InferenceEngine From e1c9d91ece16a3340886229da820da000d81722d Mon Sep 17 00:00:00 2001 From: Ilya Churaev Date: Thu, 3 Dec 2020 17:58:17 +0300 Subject: [PATCH 006/244] Changed extern to constexpr for global element type (#3463) * Changed extern to constexpr for global element type * Fixed comments --- .../core/include/ngraph/type/element_type.hpp | 71 +++++-------------- ngraph/core/src/type/element_type.cpp | 34 --------- 2 files changed, 18 insertions(+), 87 deletions(-) diff --git a/ngraph/core/include/ngraph/type/element_type.hpp b/ngraph/core/include/ngraph/type/element_type.hpp index 34ce17e48bea54..1469a655272270 100644 --- a/ngraph/core/include/ngraph/type/element_type.hpp +++ b/ngraph/core/include/ngraph/type/element_type.hpp @@ -65,7 +65,7 @@ namespace ngraph { } Type(const Type&) = default; - Type(const Type_t t) + constexpr Type(const Type_t t) : m_type{t} { } @@ -74,7 +74,6 @@ namespace ngraph bool is_signed, bool is_quantized, const std::string& cname); - ~Type() {} Type& operator=(const Type&) = default; const std::string& c_type_string() const; size_t size() const; @@ -91,11 +90,6 @@ namespace ngraph size_t bitwidth() const; // The name of this type, the enum name of this type const std::string& get_type_name() const; - bool operator==(const Type_t& other) const; - bool operator!=(const Type_t& other) const { return !(*this == other); } - bool operator==(const Type& other) const; - bool operator!=(const Type& other) const { return !(*this == other); } - bool operator<(const Type& other) const; friend NGRAPH_API std::ostream& operator<<(std::ostream&, const Type&); /// \brief Checks whether this element type is merge-compatible with `t`. @@ -124,58 +118,29 @@ namespace ngraph static bool merge(element::Type& dst, const element::Type& t1, const element::Type& t2); // \brief This allows switch(element_type) - operator Type_t() const { return m_type; } + constexpr operator Type_t() const { return m_type; } private: Type_t m_type{Type_t::undefined}; }; typedef std::vector TypeVector; - NGRAPH_DEPRECATED( - "This global element type was deprecated. Please use Type_t::undefined instead.") - extern NGRAPH_API const Type undefined; - NGRAPH_DEPRECATED( - "This global element type was deprecated. Please use Type_t::dynamic instead.") - extern NGRAPH_API const Type dynamic; - NGRAPH_DEPRECATED( - "This global element type was deprecated. Please use Type_t::boolean instead.") - extern NGRAPH_API const Type boolean; - NGRAPH_DEPRECATED( - "This global element type was deprecated. Please use Type_t::bf16 instead.") - extern NGRAPH_API const Type bf16; - NGRAPH_DEPRECATED( - "This global element type was deprecated. Please use Type_t::f16 instead.") - extern NGRAPH_API const Type f16; - NGRAPH_DEPRECATED( - "This global element type was deprecated. Please use Type_t::f32 instead.") - extern NGRAPH_API const Type f32; - NGRAPH_DEPRECATED( - "This global element type was deprecated. Please use Type_t::f64 instead.") - extern NGRAPH_API const Type f64; - NGRAPH_DEPRECATED("This global element type was deprecated. Please use Type_t::i8 instead.") - extern NGRAPH_API const Type i8; - NGRAPH_DEPRECATED( - "This global element type was deprecated. Please use Type_t::i16 instead.") - extern NGRAPH_API const Type i16; - NGRAPH_DEPRECATED( - "This global element type was deprecated. Please use Type_t::i32 instead.") - extern NGRAPH_API const Type i32; - NGRAPH_DEPRECATED( - "This global element type was deprecated. Please use Type_t::i64 instead.") - extern NGRAPH_API const Type i64; - NGRAPH_DEPRECATED("This global element type was deprecated. Please use Type_t::u1 instead.") - extern NGRAPH_API const Type u1; - NGRAPH_DEPRECATED("This global element type was deprecated. Please use Type_t::u8 instead.") - extern NGRAPH_API const Type u8; - NGRAPH_DEPRECATED( - "This global element type was deprecated. Please use Type_t::u16 instead.") - extern NGRAPH_API const Type u16; - NGRAPH_DEPRECATED( - "This global element type was deprecated. Please use Type_t::u32 instead.") - extern NGRAPH_API const Type u32; - NGRAPH_DEPRECATED( - "This global element type was deprecated. Please use Type_t::u64 instead.") - extern NGRAPH_API const Type u64; + constexpr Type undefined(Type_t::undefined); + constexpr Type dynamic(Type_t::dynamic); + constexpr Type boolean(Type_t::boolean); + constexpr Type bf16(Type_t::bf16); + constexpr Type f16(Type_t::f16); + constexpr Type f32(Type_t::f32); + constexpr Type f64(Type_t::f64); + constexpr Type i8(Type_t::i8); + constexpr Type i16(Type_t::i16); + constexpr Type i32(Type_t::i32); + constexpr Type i64(Type_t::i64); + constexpr Type u1(Type_t::u1); + constexpr Type u8(Type_t::u8); + constexpr Type u16(Type_t::u16); + constexpr Type u32(Type_t::u32); + constexpr Type u64(Type_t::u64); template Type from() diff --git a/ngraph/core/src/type/element_type.cpp b/ngraph/core/src/type/element_type.cpp index 81a3d01345c1ae..9752c4e7b7552a 100644 --- a/ngraph/core/src/type/element_type.cpp +++ b/ngraph/core/src/type/element_type.cpp @@ -26,25 +26,6 @@ using namespace ngraph; using namespace std; -NGRAPH_SUPPRESS_DEPRECATED_START -const element::Type element::undefined(element::Type_t::undefined); -const element::Type element::dynamic(element::Type_t::dynamic); -const element::Type element::boolean(element::Type_t::boolean); -const element::Type element::bf16(element::Type_t::bf16); -const element::Type element::f16(element::Type_t::f16); -const element::Type element::f32(element::Type_t::f32); -const element::Type element::f64(element::Type_t::f64); -const element::Type element::i8(element::Type_t::i8); -const element::Type element::i16(element::Type_t::i16); -const element::Type element::i32(element::Type_t::i32); -const element::Type element::i64(element::Type_t::i64); -const element::Type element::u1(element::Type_t::u1); -const element::Type element::u8(element::Type_t::u8); -const element::Type element::u16(element::Type_t::u16); -const element::Type element::u32(element::Type_t::u32); -const element::Type element::u64(element::Type_t::u64); -NGRAPH_SUPPRESS_DEPRECATED_END - constexpr DiscreteTypeInfo AttributeAdapter::type_info; class TypeInfo @@ -127,21 +108,6 @@ const std::string& element::Type::c_type_string() const return get_type_info_map().at(m_type).m_cname; } -bool element::Type::operator==(const element::Type_t& other) const -{ - return m_type == other; -} - -bool element::Type::operator==(const element::Type& other) const -{ - return m_type == other.m_type; -} - -bool element::Type::operator<(const Type& other) const -{ - return m_type < other.m_type; -} - size_t element::Type::size() const { return std::ceil(static_cast(bitwidth()) / 8.0f); From 58aee759142897eb6c4390d84ba3634076f53b6f Mon Sep 17 00:00:00 2001 From: Andrey Sokolov Date: Thu, 3 Dec 2020 18:19:50 +0300 Subject: [PATCH 007/244] [IE][VPU]: Add interpolate nearest 2x upscale optimization (#3315) --- inference-engine/cmake/vpu_dependencies.cmake | 6 +-- .../src/stages/interpolate.cpp | 13 ++++++ .../single_layer_tests/interpolate.cpp | 41 +++++++++++++++++++ 3 files changed, 57 insertions(+), 3 deletions(-) diff --git a/inference-engine/cmake/vpu_dependencies.cmake b/inference-engine/cmake/vpu_dependencies.cmake index a20f2b6d0c6674..636f285acdc800 100644 --- a/inference-engine/cmake/vpu_dependencies.cmake +++ b/inference-engine/cmake/vpu_dependencies.cmake @@ -15,14 +15,14 @@ include(dependency_solver) set(VPU_SUPPORTED_FIRMWARES usb-ma2x8x pcie-ma2x8x) set(VPU_SUPPORTED_FIRMWARES_HASH - "becaeea32805cc59a59fced0ed08235255a43a3c8535a36fa376351607b24ad6" - "fa0303c0c073c68076190cb71ce8bf1cc04ade74ca9a7b5a538ceb99d24d3289") + "2980b6d0726107888ec7ba02c43a245a699c19a0f1e25b54f0bb928c91bfa045" + "c4692a7c3f44e6cdf6743c21d99570946d81ece9370fcd07725da95ad8fcd657") # # Default packages # -set(FIRMWARE_PACKAGE_VERSION 1521) +set(FIRMWARE_PACKAGE_VERSION 1532) set(VPU_CLC_MA2X8X_VERSION "movi-cltools-20.09.2") # diff --git a/inference-engine/src/vpu/graph_transformer/src/stages/interpolate.cpp b/inference-engine/src/vpu/graph_transformer/src/stages/interpolate.cpp index 35ffb641074277..2865eb8ce5e2df 100644 --- a/inference-engine/src/vpu/graph_transformer/src/stages/interpolate.cpp +++ b/inference-engine/src/vpu/graph_transformer/src/stages/interpolate.cpp @@ -61,6 +61,14 @@ void FrontEnd::parseInterpolate(const Model& model, const ie::CNNLayerPtr& _laye if (cmp(coordinateTransformation, "asymmetric")) { coordinateTransformationMode = InterpolateCoordTransMode::Asymmetric; + } else if (cmp(coordinateTransformation, "half_pixel")) { + coordinateTransformationMode = InterpolateCoordTransMode::HalfPixel; + } else if (cmp(coordinateTransformation, "pytorch_half_pixel")) { + coordinateTransformationMode = InterpolateCoordTransMode::PytorchHalfPixel; + } else if (cmp(coordinateTransformation, "tf_half_pixel_for_nn")) { + coordinateTransformationMode = InterpolateCoordTransMode::TfHalfPixelForNn; + } else if (cmp(coordinateTransformation, "align_corners")) { + coordinateTransformationMode = InterpolateCoordTransMode::AlignCorners; } if (cmp(nearest, "round_prefer_floor")) { @@ -69,7 +77,12 @@ void FrontEnd::parseInterpolate(const Model& model, const ie::CNNLayerPtr& _laye nearestMode = InterpolateNearestMode::RoundPreferCeil; } else if (cmp(nearest, "floor")) { nearestMode = InterpolateNearestMode::Floor; + } else if (cmp(nearest, "ceil")) { + nearestMode = InterpolateNearestMode::Ceil; + } else if (cmp(nearest, "simple")) { + nearestMode = InterpolateNearestMode::Simple; } + _stageBuilder->addResampleNearestStage(model, _layer->name, _layer, diff --git a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/single_layer_tests/interpolate.cpp b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/single_layer_tests/interpolate.cpp index 8370eaac6b8c68..565f63096ca733 100644 --- a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/single_layer_tests/interpolate.cpp +++ b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/single_layer_tests/interpolate.cpp @@ -28,6 +28,15 @@ const std::vector> targetShapes = { {1, 8, 46, 46}, // * 1.3 }; +const std::vector> inShapes2x = { + {1, 19, 37, 37}, +}; + +const std::vector> targetShapes2x = { + {1, 19, 37 * 2, 37 * 2}, +}; + + const std::vector modesWithoutNearest = { ngraph::op::v4::Interpolate::InterpolateMode::linear, }; @@ -40,6 +49,13 @@ const std::vector coordina ngraph::op::v4::Interpolate::CoordinateTransformMode::half_pixel, }; +const std::vector coordinateTransformModesNearest2x = { + ngraph::op::v4::Interpolate::CoordinateTransformMode::half_pixel, + ngraph::op::v4::Interpolate::CoordinateTransformMode::pytorch_half_pixel, + ngraph::op::v4::Interpolate::CoordinateTransformMode::asymmetric, + ngraph::op::v4::Interpolate::CoordinateTransformMode::tf_half_pixel_for_nn, +}; + const std::vector coordinateTransformModesNearestMore = { ngraph::op::v4::Interpolate::CoordinateTransformMode::asymmetric, }; @@ -90,6 +106,19 @@ const std::vector shapeCalculationMo ngraph::op::v4::Interpolate::ShapeCalcMode::scales, }; +const auto interpolateCasesNearestMode2x = ::testing::Combine( + ::testing::ValuesIn(nearestMode), + ::testing::ValuesIn(shapeCalculationMode), + ::testing::ValuesIn(coordinateTransformModesNearest2x), + ::testing::ValuesIn(nearestModes), + ::testing::ValuesIn(antialias), + ::testing::ValuesIn(pads), + ::testing::ValuesIn(pads), + ::testing::ValuesIn(cubeCoefs), + ::testing::ValuesIn(defaultAxes), + ::testing::ValuesIn(defaultScales)); + + const auto interpolateCasesNearestMode = ::testing::Combine( ::testing::ValuesIn(nearestMode), ::testing::ValuesIn(shapeCalculationMode), @@ -126,6 +155,18 @@ const auto interpolateCasesWithoutNearestMode = ::testing::Combine( ::testing::ValuesIn(defaultAxes), ::testing::ValuesIn(defaultScales)); +INSTANTIATE_TEST_CASE_P(smoke_Interpolate_nearest_mode_2x, InterpolateLayerTest, ::testing::Combine( + interpolateCasesNearestMode2x, + ::testing::ValuesIn(netPrecisions), + ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), + ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), + ::testing::Values(InferenceEngine::Layout::ANY), + ::testing::Values(InferenceEngine::Layout::ANY), + ::testing::ValuesIn(inShapes2x), + ::testing::ValuesIn(targetShapes2x), + ::testing::Values(CommonTestUtils::DEVICE_MYRIAD)), + InterpolateLayerTest::getTestCaseName); + INSTANTIATE_TEST_CASE_P(smoke_Interpolate_nearest_mode, InterpolateLayerTest, ::testing::Combine( interpolateCasesNearestMode, ::testing::ValuesIn(netPrecisions), From a7ede592c3632e5b8eed3f6b399e18ab9bc9def5 Mon Sep 17 00:00:00 2001 From: Anton Chetverikov Date: Thu, 3 Dec 2020 19:33:07 +0300 Subject: [PATCH 008/244] Fix mode attribute value in DepthToSpace ONNX operation extractor (#3466) --- model-optimizer/extensions/front/onnx/depth_to_space_ext.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/model-optimizer/extensions/front/onnx/depth_to_space_ext.py b/model-optimizer/extensions/front/onnx/depth_to_space_ext.py index f043a1c89c9a57..d8f95ea92a3a10 100644 --- a/model-optimizer/extensions/front/onnx/depth_to_space_ext.py +++ b/model-optimizer/extensions/front/onnx/depth_to_space_ext.py @@ -34,9 +34,9 @@ def extract(cls, node): onnx_mode = onnx_attr(node, 'mode', 's', default=b'DCR').decode() assert onnx_mode in ['DCR', 'CRD'], 'Unrecognized mode provided for DepthToSpace node {}'.format(node_name) if onnx_mode == 'DCR': - mode = 'depth_first' - else: mode = 'blocks_first' + else: + mode = 'depth_first' DepthToSpaceOp.update_node_stat(node, {'block_size': block_size, 'mode': mode}) return cls.enabled From d35e3e806b321d235013097f3f9b748a4ae34293 Mon Sep 17 00:00:00 2001 From: Chenhu Wang Date: Fri, 4 Dec 2020 16:05:10 +0800 Subject: [PATCH 009/244] [CPU]disable and cleanup interp and resample that are covered by interpolate (#3164) * [BF16] Interpolate layer and test were updated for support BF16 Co-authored-by: alexey-varyzgin --- .../src/mkldnn_plugin/CMakeLists.txt | 2 - .../src/mkldnn_plugin/bf16transformer.h | 2 +- .../mkldnn_plugin/mkldnn_graph_optimizer.cpp | 72 -- .../mkldnn_plugin/mkldnn_graph_optimizer.h | 1 - .../src/mkldnn_plugin/mkldnn_node.cpp | 2 - .../src/mkldnn_plugin/mkldnn_node.h | 3 - .../src/mkldnn_plugin/mkldnn_plugin.cpp | 4 + .../src/mkldnn_plugin/nodes/interp.cpp | 432 -------- .../src/mkldnn_plugin/nodes/list_tbl.hpp | 1 - .../nodes/mkldnn_interpolate_node.cpp | 21 +- .../nodes/mkldnn_resample_node.cpp | 922 ------------------ .../nodes/mkldnn_resample_node.h | 109 --- .../cpu/single_layer_tests/interpolate.cpp | 7 +- .../graph/layers/extensions/interp_tests.cpp | 254 ----- .../layers/extensions/resample_tests.cpp | 367 ------- ngraph/core/src/op/interpolate.cpp | 4 +- 16 files changed, 21 insertions(+), 2182 deletions(-) delete mode 100644 inference-engine/src/mkldnn_plugin/nodes/interp.cpp delete mode 100644 inference-engine/src/mkldnn_plugin/nodes/mkldnn_resample_node.cpp delete mode 100644 inference-engine/src/mkldnn_plugin/nodes/mkldnn_resample_node.h delete mode 100644 inference-engine/tests_deprecated/unit/engines/mkldnn/graph/layers/extensions/interp_tests.cpp delete mode 100644 inference-engine/tests_deprecated/unit/engines/mkldnn/graph/layers/extensions/resample_tests.cpp diff --git a/inference-engine/src/mkldnn_plugin/CMakeLists.txt b/inference-engine/src/mkldnn_plugin/CMakeLists.txt index 2b0743b1280b2f..d33e3385f684d4 100644 --- a/inference-engine/src/mkldnn_plugin/CMakeLists.txt +++ b/inference-engine/src/mkldnn_plugin/CMakeLists.txt @@ -36,7 +36,6 @@ set(LAYERS ${CMAKE_CURRENT_SOURCE_DIR}/nodes/mkldnn_tensoriterator_node.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nodes/mkldnn_tile_node.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nodes/mkldnn_mvn_node.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/nodes/mkldnn_resample_node.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nodes/mkldnn_normalize_node.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nodes/mkldnn_scatter_update_node.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nodes/mkldnn_interpolate_node.cpp @@ -93,7 +92,6 @@ set(LAYERS ${CMAKE_CURRENT_SOURCE_DIR}/nodes/unsqueeze.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nodes/common/softmax.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nodes/common/emitter.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/nodes/interp.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nodes/jit_eltwise_emitters.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nodes/jit_mkldnn_emitters.cpp diff --git a/inference-engine/src/mkldnn_plugin/bf16transformer.h b/inference-engine/src/mkldnn_plugin/bf16transformer.h index 3f302348e4778f..02cf8316610e9a 100644 --- a/inference-engine/src/mkldnn_plugin/bf16transformer.h +++ b/inference-engine/src/mkldnn_plugin/bf16transformer.h @@ -14,7 +14,7 @@ namespace MKLDNNPlugin { class BF16Transformer { const InferenceEngine::details::caseless_set _initbf16 = - { "convolution", "fullyconnected", "innerproduct", "gemm", "RegionYolo" }; + { "convolution", "fullyconnected", "innerproduct", "gemm", "RegionYolo", "Interpolate" }; const InferenceEngine::details::caseless_set _complementbf16 = { "relu", "tanh", "elu", "square", "abs", "sqrt", "linear", "bounded_relu", "soft_relu", "normalize", "sigmoid", "ReLU6", "not", "activation", "HSwish", "mish", "logistic", "mod", "resample", diff --git a/inference-engine/src/mkldnn_plugin/mkldnn_graph_optimizer.cpp b/inference-engine/src/mkldnn_plugin/mkldnn_graph_optimizer.cpp index d5c4e4db1db20c..d6017ff5c1f70e 100644 --- a/inference-engine/src/mkldnn_plugin/mkldnn_graph_optimizer.cpp +++ b/inference-engine/src/mkldnn_plugin/mkldnn_graph_optimizer.cpp @@ -15,7 +15,6 @@ #include "nodes/mkldnn_quantize_node.h" #include "nodes/mkldnn_mvn_node.h" #include -#include "nodes/mkldnn_resample_node.h" #include "nodes/mkldnn_interpolate_node.h" #include "nodes/mkldnn_input_node.h" @@ -123,9 +122,6 @@ void MKLDNNGraphOptimizer::ApplyCommonGraphOptimizations(MKLDNNGraph &graph) { FuseMVNAndSimpleOperation(graph); graph.RemoveDroppedNodes(); - FuseResampleAndSimpleOperation(graph); - graph.RemoveDroppedNodes(); - FuseInterpolateAndSimpleOperation(graph); graph.RemoveDroppedNodes(); @@ -1491,74 +1487,6 @@ void MKLDNNGraphOptimizer::FuseMVNAndSimpleOperation(MKLDNNGraph &graph) { } } -void MKLDNNGraphOptimizer::FuseResampleAndSimpleOperation(MKLDNNGraph &graph) { - auto& graphNodes = graph.GetNodes(); - - auto isSutableParentNode = [](MKLDNNNodePtr node) { - bool isSutableResample = (node->getType() == Resample) && (node->inDims[0].ndims() == 4 || node->inDims[0].ndims() == 5); - - if (isSutableResample) { - auto *resampleLayer = node->getCnnLayer().get(); - if (resampleLayer == nullptr) - THROW_IE_EXCEPTION << "Cannot get Resample layer " << node->getName(); - - return node->getChildEdges().size() == 1 && resampleLayer->GetParamAsString("type") == "caffe.ResampleParameter.NEAREST"; - } else { - return false; - } - }; - - auto isSutableChildNode = [](MKLDNNNodePtr node) { - if (!node->getCnnLayer()) - return false; - - if (node->getType() == Quantize) { - auto* quantizeNode = dynamic_cast(node.get()); - if (quantizeNode == nullptr) - THROW_IE_EXCEPTION << "Cannot get quantize layer " << node->getName(); - return !quantizeNode->isBinarization(); - } else if (node->getType() == Eltwise) { - auto *eltwiseNode = dynamic_cast(node.get()); - if (eltwiseNode == nullptr) - THROW_IE_EXCEPTION << "Cannot get Eltwise node " << node->getName(); - return eltwiseNode->getOpType() == Relu || - eltwiseNode->getOpType() == MulAdd; - } - - return false; - }; - - auto parent = graphNodes.begin(); - while (parent != graphNodes.end()) { - auto parentNode = *parent; - if (!isSutableParentNode(parentNode)) { - parent++; - continue; - } - - auto childNode = parentNode->getChildEdgeAt(0)->getChild(); - if (!isSutableChildNode(childNode)) { - parent++; - continue; - } - - parentNode->fuseWith(childNode); - - if (childNode->getType() == Quantize || childNode->getType() == Eltwise) { - auto parentEdges = childNode->parentEdges; - for (auto &parentEdge : parentEdges) { - auto p_edge = parentEdge.lock(); - if (p_edge->getParent()->getType() == Resample) - continue; - - removeEdge(graph, p_edge); - } - } - - graph.DropNode(childNode); - } -} - void MKLDNNGraphOptimizer::FuseInterpolateAndSimpleOperation(MKLDNNGraph &graph) { auto& graphNodes = graph.GetNodes(); diff --git a/inference-engine/src/mkldnn_plugin/mkldnn_graph_optimizer.h b/inference-engine/src/mkldnn_plugin/mkldnn_graph_optimizer.h index 025b79c9b7e864..e74786c33910c6 100644 --- a/inference-engine/src/mkldnn_plugin/mkldnn_graph_optimizer.h +++ b/inference-engine/src/mkldnn_plugin/mkldnn_graph_optimizer.h @@ -37,7 +37,6 @@ class MKLDNNGraphOptimizer { void FuseConvolutionSumAndConvolutionSumActivation(MKLDNNGraph &graph); #endif void FuseMVNAndSimpleOperation(MKLDNNGraph &graph); - void FuseResampleAndSimpleOperation(MKLDNNGraph &graph); void FuseInterpolateAndSimpleOperation(MKLDNNGraph &graph); void FuseNormalizeAndSimpleOperation(MKLDNNGraph &graph); void RemoveIdentityOperator(MKLDNNGraph& graph); diff --git a/inference-engine/src/mkldnn_plugin/mkldnn_node.cpp b/inference-engine/src/mkldnn_plugin/mkldnn_node.cpp index 55abb10a6e3272..a316784c17be29 100644 --- a/inference-engine/src/mkldnn_plugin/mkldnn_node.cpp +++ b/inference-engine/src/mkldnn_plugin/mkldnn_node.cpp @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include @@ -123,7 +122,6 @@ static const InferenceEngine::details::caseless_unordered_map { "Memory", MemoryOutput }, // for construction from layer ctor { "Convert", Convert }, { "MVN", MVN}, - { "Resample", Resample}, { "Normalize", Normalize}, { "ScatterUpdate", ScatterUpdate}, { "ScatterElementsUpdate", ScatterElementsUpdate}, diff --git a/inference-engine/src/mkldnn_plugin/mkldnn_node.h b/inference-engine/src/mkldnn_plugin/mkldnn_node.h index b804f547177bcc..1319a713a7d2fc 100644 --- a/inference-engine/src/mkldnn_plugin/mkldnn_node.h +++ b/inference-engine/src/mkldnn_plugin/mkldnn_node.h @@ -66,7 +66,6 @@ enum Type { TensorIterator, Convert, MVN, - Resample, Normalize, ScatterUpdate, ScatterElementsUpdate, @@ -162,8 +161,6 @@ static std::string NameFromType(Type type) { return "TensorIterator"; case Convert: return "Convert"; - case Resample: - return "Resample"; case Normalize: return "Normalize"; case ScatterUpdate: diff --git a/inference-engine/src/mkldnn_plugin/mkldnn_plugin.cpp b/inference-engine/src/mkldnn_plugin/mkldnn_plugin.cpp index 1f4553a3ca3148..582e0f27c41597 100644 --- a/inference-engine/src/mkldnn_plugin/mkldnn_plugin.cpp +++ b/inference-engine/src/mkldnn_plugin/mkldnn_plugin.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -52,6 +53,7 @@ #include #include #include +#include #include #include #include @@ -200,8 +202,10 @@ static void Transformation(ICNNNetwork::Ptr& clonedNetwork, const Config& conf) pass_config->disable(); pass_config->disable(); pass_config->disable(); + pass_config->disable(); pass_config->enable(); + pass_config->enable(); manager.run_passes(nGraphFunc); diff --git a/inference-engine/src/mkldnn_plugin/nodes/interp.cpp b/inference-engine/src/mkldnn_plugin/nodes/interp.cpp deleted file mode 100644 index 6e2186899c3c33..00000000000000 --- a/inference-engine/src/mkldnn_plugin/nodes/interp.cpp +++ /dev/null @@ -1,432 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "base.hpp" -#include -#include -#include -#include -#include "ie_parallel.hpp" -#include "jit_generator.hpp" - -using namespace mkldnn::impl::cpu; -using namespace mkldnn::impl::utils; - -namespace InferenceEngine { -namespace Extensions { -namespace Cpu { - -#define GET_OFF(field) offsetof(jit_args_interp, field) - -struct jit_args_interp { - const float *src00; - const float *src01; - const float *src10; - const float *src11; - float *dst; - float *h_lambda0; - float *h_lambda1; - float *w_lambda0; - float *w_lambda1; -}; - -struct jit_uni_interp_kernel { - void (*ker_)(const jit_args_interp *); - - void operator()(const jit_args_interp *args) { assert(ker_); ker_(args); } - - jit_uni_interp_kernel() : ker_(nullptr) {} - virtual ~jit_uni_interp_kernel() {} -}; - -template -struct jit_uni_interp_kernel_f32 : public jit_uni_interp_kernel, public jit_generator { - DECLARE_CPU_JIT_AUX_FUNCTIONS(jit_uni_interp_kernel_f32) - - jit_uni_interp_kernel_f32() : jit_uni_interp_kernel(), jit_generator() { - this->preamble(); - - mov(reg_src00, ptr[reg_params + GET_OFF(src00)]); - mov(reg_src01, ptr[reg_params + GET_OFF(src01)]); - mov(reg_src10, ptr[reg_params + GET_OFF(src10)]); - mov(reg_src11, ptr[reg_params + GET_OFF(src11)]); - mov(reg_dst, ptr[reg_params + GET_OFF(dst)]); - mov(reg_h_lambda0, ptr[reg_params + GET_OFF(h_lambda0)]); - mov(reg_h_lambda1, ptr[reg_params + GET_OFF(h_lambda1)]); - mov(reg_w_lambda0, ptr[reg_params + GET_OFF(w_lambda0)]); - mov(reg_w_lambda1, ptr[reg_params + GET_OFF(w_lambda1)]); - - uni_vmovups(vmm_src00, ptr[reg_src00]); - uni_vmovups(vmm_src01, ptr[reg_src01]); - uni_vmovups(vmm_src10, ptr[reg_src10]); - uni_vmovups(vmm_src11, ptr[reg_src11]); - - uni_vbroadcastss(vmm_h_lambda0, ptr[reg_h_lambda0]); - uni_vbroadcastss(vmm_h_lambda1, ptr[reg_h_lambda1]); - uni_vbroadcastss(vmm_w_lambda0, ptr[reg_w_lambda0]); - uni_vbroadcastss(vmm_w_lambda1, ptr[reg_w_lambda1]); - - if (isa != sse42) { - uni_vmulps(vmm_src01, vmm_src01, vmm_w_lambda0); - uni_vmulps(vmm_src11, vmm_src11, vmm_w_lambda0); - uni_vfmadd231ps(vmm_src01, vmm_w_lambda1, vmm_src00); - uni_vfmadd231ps(vmm_src11, vmm_w_lambda1, vmm_src10); - uni_vmulps(vmm_src01, vmm_src01, vmm_h_lambda1); - uni_vfmadd231ps(vmm_src01, vmm_h_lambda0, vmm_src11); - uni_vmovups(ptr[reg_dst], vmm_src01); - } else { - uni_vmulps(vmm_src01, vmm_src01, vmm_w_lambda0); - uni_vmulps(vmm_src11, vmm_src11, vmm_w_lambda0); - uni_vfmadd231ps(vmm_src01, vmm_w_lambda1, vmm_src00); - // uni_vfmadd231ps affects XMM (vmm_w_lambda1) register. Need to initialize again. - uni_vbroadcastss(vmm_w_lambda1, ptr[reg_w_lambda1]); - uni_vfmadd231ps(vmm_src11, vmm_w_lambda1, vmm_src10); - uni_vmulps(vmm_src01, vmm_src01, vmm_h_lambda1); - uni_vfmadd231ps(vmm_src01, vmm_h_lambda0, vmm_src11); - uni_vmovups(ptr[reg_dst], vmm_src01); - - // Next 4 elements - size_t stride = 4 * sizeof(float); - - add(reg_src00, stride); - add(reg_src01, stride); - add(reg_src10, stride); - add(reg_src11, stride); - add(reg_dst, stride); - - uni_vmovups(vmm_src00, ptr[reg_src00]); - uni_vmovups(vmm_src01, ptr[reg_src01]); - uni_vmovups(vmm_src10, ptr[reg_src10]); - uni_vmovups(vmm_src11, ptr[reg_src11]); - - uni_vbroadcastss(vmm_h_lambda0, ptr[reg_h_lambda0]); - uni_vbroadcastss(vmm_w_lambda1, ptr[reg_w_lambda1]); - - uni_vmulps(vmm_src01, vmm_src01, vmm_w_lambda0); - uni_vmulps(vmm_src11, vmm_src11, vmm_w_lambda0); - uni_vfmadd231ps(vmm_src01, vmm_w_lambda1, vmm_src00); - uni_vbroadcastss(vmm_w_lambda1, ptr[reg_w_lambda1]); - uni_vfmadd231ps(vmm_src11, vmm_w_lambda1, vmm_src10); - uni_vmulps(vmm_src01, vmm_src01, vmm_h_lambda1); - uni_vfmadd231ps(vmm_src01, vmm_h_lambda0, vmm_src11); - uni_vmovups(ptr[reg_dst], vmm_src01); - } - - this->postamble(); - ker_ = (decltype(ker_))this->getCode(); - } - -private: - using Vmm = typename conditional3::type; - size_t vlen = cpu_isa_traits::vlen; - - Xbyak::Reg64 reg_src00 = r8; - Xbyak::Reg64 reg_src01 = r9; - Xbyak::Reg64 reg_src10 = r10; - Xbyak::Reg64 reg_src11 = r11; - Xbyak::Reg64 reg_dst = rbp; - Xbyak::Reg64 reg_h_lambda0 = r12; - Xbyak::Reg64 reg_h_lambda1 = r13; - Xbyak::Reg64 reg_w_lambda0 = r14; - Xbyak::Reg64 reg_w_lambda1 = r15; - Xbyak::Reg64 reg_params = abi_param1; - - Vmm vmm_src00 = Vmm(0); - Vmm vmm_src01 = Vmm(1); - Vmm vmm_src10 = Vmm(2); - Vmm vmm_src11 = Vmm(3); - Vmm vmm_h_lambda0 = Vmm(4); - Vmm vmm_h_lambda1 = Vmm(5); - Vmm vmm_w_lambda0 = Vmm(6); - Vmm vmm_w_lambda1 = Vmm(7); - Vmm vmm_dst = Vmm(8); -}; - -class InterpImpl: public ExtLayerBase { -public: - explicit InterpImpl(const CNNLayer* layer) { - try { - if (layer->insData.size() != 1 || layer->outData.empty()) - THROW_IE_EXCEPTION << "Incorrect number of input/output edges!"; - - auto inData = layer->insData[0].lock(); - if (inData == nullptr) { - THROW_IE_EXCEPTION << "Layer '" << layer->name << "' has nullable input data."; - } - if (inData->getTensorDesc().getDims().size() != 4) - THROW_IE_EXCEPTION << "Interp supports only 4d blobs!"; - - // We don't read other parameters since they are needed only for dst reshape in caffe - pad_beg = layer->GetParamAsInt("pad_beg"); - pad_end = layer->GetParamAsInt("pad_end"); - align_corners = layer->GetParamAsBool("align_corners", true); - - ConfLayout blk_layout; - if (inData->getTensorDesc().getPrecision() == Precision::U8) { - LayerConfig config; - DataConfig dataConfigDct; - dataConfigDct.desc = TensorDesc(Precision::U8, inData->getTensorDesc().getDims(), Layout::NCHW); - config.inConfs.push_back(dataConfigDct); - - DataConfig dataConfigOut; - const SizeVector& out_dims = layer->outData[0]->getTensorDesc().getDims(); - SizeVector blocks = out_dims; - SizeVector order(blocks.size()); - SizeVector dimOffsets(blocks.size()); - SizeVector strides(blocks.size()); - size_t offset((std::numeric_limits::max)()); - for (size_t i = 0; i < order.size(); i++) { - strides[i] = (std::numeric_limits::max)(); - dimOffsets[i] = 0; - order[i] = i; - } - dataConfigOut.desc = TensorDesc(Precision::FP32, out_dims, { blocks, order, offset, dimOffsets, strides }); - config.outConfs.push_back(dataConfigOut); - config.dynBatchSupport = false; - confs.push_back(config); - } else { - if (mayiuse(avx512_common)) { - blk_layout = ConfLayout::BLK16; - interp_kernel.reset(new jit_uni_interp_kernel_f32()); - addConfig(layer, { DataConfigurator(blk_layout, Precision::FP32) }, { DataConfigurator(blk_layout, Precision::FP32) }); - } else if (mayiuse(avx2)) { - blk_layout = ConfLayout::BLK8; - interp_kernel.reset(new jit_uni_interp_kernel_f32()); - addConfig(layer, { DataConfigurator(blk_layout, Precision::FP32) }, { DataConfigurator(blk_layout, Precision::FP32) }); - } else { - blk_layout = ConfLayout::BLK8; - interp_kernel.reset(new jit_uni_interp_kernel_f32()); - addConfig(layer, { DataConfigurator(blk_layout, Precision::FP32) }, { DataConfigurator(blk_layout, Precision::FP32) }); - } - } - } catch (InferenceEngine::details::InferenceEngineException &ex) { - errorMsg = ex.what(); - } - } - - StatusCode init(LayerConfig& config, ResponseDesc *resp) noexcept override { - if (config.inConfs.size() != 1 || config.outConfs.size() != 1) { - strncpy(resp->msg, "Interp layer has invalid configs", sizeof(resp->msg)); - return GENERAL_ERROR; - } - - if (config.inConfs[0].desc.getDims().size() != 4) { - std::ostringstream result; - result << "Interp layer has invalid layout: " << config.inConfs[0].desc.getLayout(); - strncpy(resp->msg, result.str().c_str(), sizeof(resp->msg) - 1); - return GENERAL_ERROR; - } - - auto inPrecision = config.inConfs[0].desc.getPrecision(); - if (inPrecision != Precision::U8 && inPrecision != Precision::FP32) { - strncpy(resp->msg, "Interp layer has unsupported input precision", sizeof(resp->msg)); - return GENERAL_ERROR; - } - - if (config.outConfs[0].desc.getPrecision() != Precision::FP32) { - strncpy(resp->msg, "Interp layer has unsupported output precision", sizeof(resp->msg)); - return GENERAL_ERROR; - } - - return OK; - } - - StatusCode execute(std::vector& inputs, std::vector& outputs, - ResponseDesc *resp) noexcept override { -#ifdef WIN32 -#undef IN -#endif - size_t IN = inputs[0]->getTensorDesc().getDims()[0]; - size_t IH = inputs[0]->getTensorDesc().getDims()[2]; - size_t IW = inputs[0]->getTensorDesc().getDims()[3]; - size_t OH = outputs[0]->getTensorDesc().getDims()[2]; - size_t OW = outputs[0]->getTensorDesc().getDims()[3]; - - size_t IH_pad = IH + pad_beg + pad_end; - size_t IW_pad = IW + pad_beg + pad_end; - - auto *dst_data = outputs[0]->buffer().as() + outputs[0]->getTensorDesc().getBlockingDesc().getOffsetPadding(); - - switch (inputs[0]->getTensorDesc().getPrecision()) { - case Precision::FP32: - { - const float* src_data = inputs[0]->cbuffer().as() + inputs[0]->getTensorDesc().getBlockingDesc().getOffsetPadding(); - size_t IC = (inputs[0]->getTensorDesc().getLayout() == Layout::BLOCKED) - ? inputs[0]->getTensorDesc().getBlockingDesc().getBlockDims()[1] * - inputs[0]->getTensorDesc().getBlockingDesc().getBlockDims()[4] - : IC = inputs[0]->getTensorDesc().getDims()[1]; - interpolate(IN, IC, src_data, - -pad_beg, -pad_beg, IH_pad, IW_pad, IH, IW, dst_data, 0, 0, OH, OW, OH, OW); - } - break; - case Precision::U8: - { - const uint8_t* src_data = inputs[0]->cbuffer().as() + inputs[0]->getTensorDesc().getBlockingDesc().getOffsetPadding(); - size_t IC = inputs[0]->getTensorDesc().getDims()[1]; - interpolate_8u(inputs[0]->getTensorDesc().getLayout(), IN, IC, src_data, - -pad_beg, -pad_beg, IH_pad, IW_pad, IH, IW, dst_data, 0, 0, OH, OW, OH, OW); - } - break; - default: - if (resp) { - std::string errorMsg = "Incorrect input precision. Only U8 or FP32 are supported!"; - errorMsg.copy(resp->msg, sizeof(resp->msg) - 1); - } - return GENERAL_ERROR; - } - - return OK; - } - -private: - int pad_beg; - int pad_end; - bool align_corners; - std::shared_ptr interp_kernel; - - void interpolate(const size_t N, const size_t C, - const float *src, const int x1, const int y1, - const int IH_pad, const int IW_pad, const size_t IH, const size_t IW, - float *dst, const int x2, const int y2, - const int OH_pad, const int OW_pad, const size_t OH, const size_t OW) { - if (IH_pad == OH_pad && IW_pad == OW_pad) { - for (size_t i = 0; i < N * C * OH * OW; i++) { - dst[i] = src[i]; - } - return; - } - - float rh; - float rw; - if (align_corners) { - rh = (OH_pad > 1) ? static_cast(IH_pad - 1) / (OH_pad - 1) : 0.0f; - rw = (OW_pad > 1) ? static_cast(IW_pad - 1) / (OW_pad - 1) : 0.0f; - } else { - rh = static_cast(IH_pad) / (OH_pad); - rw = static_cast(IW_pad) / (OW_pad); - } - - int block_size = 1; - if (interp_kernel) { - if (mayiuse(avx512_common)) { - block_size = 16; - } else { - block_size = 8; - } - } - - // Align channel number to block size to deal with channels padding in IE with multiple blobs - size_t CB = (C + block_size - 1) & (-block_size); - - size_t CH = (C + block_size - 1) / block_size; - - parallel_for3d(N, CH, OH_pad, [&](size_t n, size_t cb, size_t h) { - const float *psrc_n_cb = src + n * CB * IH * IW + cb * block_size * IW * IH; // n+cb src address - - // h is output h - float fh = rh * h; - // ih0 is higher input h position - int ih0 = static_cast(fh); - // ih1 is lower input h position - int ih1 = (ih0 < IH_pad - 1) ? ih0 + 1 : ih0; - - float h_lambda0 = fh - ih0; // for lower input h weight - float h_lambda1 = 1.0f - h_lambda0; // for higher input h weight - - const float *psrc_h0 = psrc_n_cb + (y1 + ih0) * IW * block_size + x1 * block_size; - const float *psrc_h1 = psrc_n_cb + (y1 + ih1) * IW * block_size + x1 * block_size; - float *pdst_h = dst + n * CB * OH * OW + cb * block_size * OW * OH + (y2 + h) * OW * block_size + x2 * block_size; - - auto arg = jit_args_interp(); - arg.h_lambda0 = static_cast(&h_lambda0); - arg.h_lambda1 = static_cast(&h_lambda1); - for (int w = 0; w < OW_pad; ++w) { - float fw = rw * w; - int iw0 = static_cast(fw); - int iw1 = (iw0 < IW_pad - 1) ? iw0 + 1 : iw0; - - float w_lambda0 = fw - iw0; // for right input w weight - float w_lambda1 = 1.0f - w_lambda0; // for left input w weight - - const float *psrc00 = psrc_h0 + iw0 * block_size; - const float *psrc01 = psrc_h0 + iw1 * block_size; - const float *psrc10 = psrc_h1 + iw0 * block_size; - const float *psrc11 = psrc_h1 + iw1 * block_size; - - float *pdst = pdst_h + w * block_size; - - if (interp_kernel) { - arg.src00 = psrc00; - arg.src01 = psrc01; - arg.src10 = psrc10; - arg.src11 = psrc11; - arg.dst = pdst; - arg.w_lambda0 = static_cast(&w_lambda0); - arg.w_lambda1 = static_cast(&w_lambda1); - (*interp_kernel)(&arg); - } else { - for (int c = 0; c < block_size; ++c) { - pdst[c] = h_lambda1 * (w_lambda1 * psrc00[c] + w_lambda0 * psrc01[c]) + - h_lambda0 * (w_lambda1 * psrc10[c] + w_lambda0 * psrc11[c]); - } - } - } - }); - } - - void interpolate_8u(Layout layout, const size_t N, const size_t C, - const uint8_t *src, const int x1, const int y1, - const int IH_pad, const int IW_pad, const size_t IH, const size_t IW, - float *dst, const int x2, const int y2, - const int OH_pad, const int OW_pad, const size_t OH, const size_t OW) { - if (IH_pad == OH_pad && IW_pad == OW_pad) { - for (size_t i = 0; i < N * C * OH * OW; i++) { - dst[i] = static_cast(src[i]); - } - return; - } - - float rh; - float rw; - if (align_corners) { - rh = (OH_pad > 1) ? static_cast(IH_pad - 1) / (OH_pad - 1) : 0.0f; - rw = (OW_pad > 1) ? static_cast(IW_pad - 1) / (OW_pad - 1) : 0.0f; - } else { - rh = static_cast(IH_pad) / (OH_pad); - rw = static_cast(IW_pad) / (OW_pad); - } - - parallel_for3d(N, C, OH_pad, [&](size_t n, size_t cb, size_t h) { - const uint8_t *psrc = src + n * C * IH * IW; - - float fh = rh * h; - int ih0 = static_cast(fh); - int ih1 = (ih0 < IH_pad - 1) ? ih0 + 1 : ih0; - - float h_lambda0 = fh - ih0; - float h_lambda1 = 1.0f - h_lambda0; - - for (int w = 0; w < OW_pad; ++w) { - float fw = rw * w; - int iw0 = static_cast(fw); - int iw1 = (iw0 < IW_pad - 1) ? iw0 + 1 : iw0; - - float w_lambda0 = fw - iw0; - float w_lambda1 = 1.0f - w_lambda0; - - dst[n * C * OH * OW + cb * OW * OH + (y2 + h) * OW + (x2 + w)] = - h_lambda1 * (w_lambda1 * static_cast(psrc[cb * IW * IH + (y1 + ih0) * IW + (x1 + iw0)]) + - w_lambda0 * static_cast(psrc[cb * IW * IH + (y1 + ih0) * IW + (x1 + iw1)])) + - h_lambda0 * (w_lambda1 * static_cast(psrc[cb * IW * IH + (y1 + ih1) * IW + (x1 + iw0)]) + - w_lambda0 * static_cast(psrc[cb * IW * IH + (y1 + ih1) * IW + (x1 + iw1)])); - } - }); - } -}; - -REG_FACTORY_FOR(InterpImpl, Interp); - -} // namespace Cpu -} // namespace Extensions -} // namespace InferenceEngine diff --git a/inference-engine/src/mkldnn_plugin/nodes/list_tbl.hpp b/inference-engine/src/mkldnn_plugin/nodes/list_tbl.hpp index ccfeba3bdc28f8..054a837eff3779 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/list_tbl.hpp +++ b/inference-engine/src/mkldnn_plugin/nodes/list_tbl.hpp @@ -64,7 +64,6 @@ MKLDNN_EXTENSION_NODE(TopKImpl, TopK); MKLDNN_EXTENSION_NODE(ShuffleChannelsImpl, ShuffleChannels); MKLDNN_EXTENSION_NODE(SpaceToDepthImpl, SpaceToDepth); MKLDNN_EXTENSION_NODE(PowerFileImpl, PowerFile); -MKLDNN_EXTENSION_NODE(InterpImpl, Interp); MKLDNN_EXTENSION_NODE(BatchToSpaceImpl, BatchToSpace); MKLDNN_EXTENSION_NODE(ExperimentalDetectronPriorGridGeneratorImpl, ExperimentalDetectronPriorGridGenerator); MKLDNN_EXTENSION_NODE(SimplerNMSImpl, SimplerNMS); diff --git a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_interpolate_node.cpp b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_interpolate_node.cpp index a2be1f5e80bddc..a2813b0331b434 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_interpolate_node.cpp +++ b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_interpolate_node.cpp @@ -1872,7 +1872,6 @@ void MKLDNNInterpolateNode::buildTblLinearOnnx(SizeVector& srcDimPad5d, SizeVect size_t scratchLen = rnd_up(OW + OW + OH + OH, 16); int idxType = 2; indexTable.resize(idxType * scratchLen); - std::vector index(scratchLen, 0); int *indexLeft = static_cast(&indexTable[0]); int *indexRight = static_cast(&indexTable[OW]); int *indexTop = static_cast(&indexTable[2 * OW]); @@ -2320,7 +2319,7 @@ void MKLDNNInterpolateNode::NNCGathered(const uint8_t *in_ptr_, uint8_t *out_ptr arg.src_ptr[0] = in_ptr_cbd + blk_size * IW * index_h[h] * srcDataSize; arg.index = static_cast(&(index_w_kernel[0])); arg.work_amount = static_cast(OW); - arg.oc_off = cb * blk_size; + arg.oc_off = cb * blk_size * sizeof(float); (*interpolateKernel)(&arg); } }); @@ -2351,7 +2350,7 @@ void MKLDNNInterpolateNode::NNPlanar(const uint8_t *in_ptr_, uint8_t *out_ptr_, arg.src_ptr[0] = in_ptr; arg.dst = out_ptr; arg.index = static_cast(&index_kernel[0]); // need index_h and index_w in kernel, it's in continous memory so one param - arg.oc_off = static_cast(c); + arg.oc_off = static_cast(c * sizeof(float)); // work_amount is OH(out loop) and OW(inner loop), can get in kernel from jcp. (*interpolateKernel)(&arg); }); @@ -2391,7 +2390,7 @@ void MKLDNNInterpolateNode::linearOnnxPlanar(const uint8_t *in_ptr_, uint8_t *ou arg.weight_ptr[0] = static_cast(&weight[0]); arg.dst = out_ptr_nc; arg.work_amount = OW * OH; - arg.oc_off = c; + arg.oc_off = static_cast(c * sizeof(float)); (*interpolateKernel)(&arg); }); } @@ -2666,7 +2665,7 @@ void MKLDNNInterpolateNode::cubicPlanar(const uint8_t *in_ptr_, uint8_t *out_ptr arg.weight_ptr[0] = xFactor; arg.weight_ptr[1] = yFactor; arg.work_amount = static_cast(OW * OH); - arg.oc_off = static_cast(C); + arg.oc_off = static_cast(c * sizeof(float)); (*interpolateKernel)(&arg); }); } @@ -2788,7 +2787,7 @@ inline float MKLDNNInterpolateNode::coordTransToInput(int outCoord, float scale, } case InterpolateCoordTransMode::align_corners: { if (outShape > 1) - return outCoord * static_cast(inShape - 1) / static_cast(outShape - 1); + return outCoord * (static_cast(inShape - 1) / static_cast(outShape - 1)); else return 0; break; @@ -2844,10 +2843,9 @@ bool MKLDNNInterpolateNode::canFuse(const MKLDNNNodePtr& node) const { return false; }; - if (!mayiuse(cpu::sse42)) - return false; - if (mode == InterpolateMode::linear || mode == InterpolateMode::cubic) + if (!mayiuse(cpu::sse42) || mode == InterpolateMode::linear) { return false; + } if (node->getType() == Quantize) { auto* quantizeNode = dynamic_cast(node.get()); @@ -2858,10 +2856,9 @@ bool MKLDNNInterpolateNode::canFuse(const MKLDNNNodePtr& node) const { auto* eltwiseNode = dynamic_cast(node.get()); if (eltwiseNode == nullptr) THROW_IE_EXCEPTION << "Cannot get eltwise node " << node->getName(); - return isOneOf(eltwiseNode->getOpType(), {MulAdd, Prelu, Relu, Gelu, Elu, Logistic, BoundedRelu, Clamp, + return isOneOf(eltwiseNode->getOpType(), {Prelu, Relu, Gelu, Elu, Logistic, BoundedRelu, Clamp, Tanh, Swish, Hswish, Mish, Hsigmoid, Round, Linear, Abs, Square, Sqrt}) || - ((eltwiseNode->getOpType() == MulAdd && eltwiseNode->getCnnLayer()->blobs.size() == 2) || - (eltwiseNode->getOpType() == Prelu)); + (eltwiseNode->getOpType() == MulAdd && eltwiseNode->getCnnLayer()->blobs.size() == 2); } return false; diff --git a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_resample_node.cpp b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_resample_node.cpp deleted file mode 100644 index 7ae7ce809c87d8..00000000000000 --- a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_resample_node.cpp +++ /dev/null @@ -1,922 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "mkldnn_resample_node.h" -#include "desc_iterator.hpp" -#include "mkldnn_quantize_node.h" -#include -#include "mkldnn_eltwise_node.h" -#include -#include -#include -#include -#include -#include "utils/bfloat16.hpp" -#include -#include "ie_parallel.hpp" -#include - -#include "jit_generator.hpp" -#include "jit_uni_eltwise.hpp" -#include "jit_uni_depthwise.hpp" -#include "jit_uni_quantization.hpp" -#include "common/cpu_memcpy.h" - -using namespace mkldnn; -using namespace MKLDNNPlugin; -using namespace InferenceEngine; -using namespace mkldnn::impl; -using namespace mkldnn::impl::cpu; -using namespace mkldnn::impl::utils; -using namespace Xbyak; - - -#define GET_OFF(field) offsetof(jit_resample_call_args, field) - -static inline bool isFloatCompatible(Precision prc) { - return Precision::FP32 == prc || Precision::BF16 == prc; -} - -static inline bool isFloatCompatible(memory::data_type type) { - return memory::f32 == type || memory::bf16 == type; -} - -template -struct jit_uni_resample_nearest_kernel_f32 : public jit_uni_resample_nearest_kernel, public jit_generator { - DECLARE_CPU_JIT_AUX_FUNCTIONS(jit_uni_resample_nearest_kernel_f32) - - explicit jit_uni_resample_nearest_kernel_f32(jit_resample_config_params jcp, const mkldnn_primitive_attr &attr) - : jit_uni_resample_nearest_kernel(jcp, attr), jit_generator() { - const auto &p = attr_.post_ops_; - for (int i = 0; i < p.len_; i++) { - auto &post_op = p.entry_[i]; - if (post_op.is_eltwise()) { - eltwise_injectors.push_back(std::make_shared>( - this, - post_op.eltwise.alg, - post_op.eltwise.alpha, - post_op.eltwise.beta)); - } else if (post_op.is_depthwise()) { - depthwise_injectors.push_back(std::make_shared>( - this, - post_op.depthwise.alg)); - } else if (post_op.is_quantization()) { - quantization_injectors.push_back(std::make_shared>( - this, post_op, vmm_d_weights, vmm_d_bias, reg_d_weights, reg_d_bias)); - } - } - - this->preamble(); - - mov(reg_src, ptr[reg_params + GET_OFF(src)]); - mov(reg_dst, ptr[reg_params + GET_OFF(dst)]); - mov(reg_index, ptr[reg_params + GET_OFF(index)]); - mov(reg_work_amount, ptr[reg_params + GET_OFF(work_amount)]); - mov(reg_src_stride, ptr[reg_params + GET_OFF(src_stride)]); - mov(reg_index_stride, ptr[reg_params + GET_OFF(index_stride)]); - mov(reg_dst_stride, ptr[reg_params + GET_OFF(dst_stride)]); - if (attr_.post_ops_.len_ != 0) - mov(reg_oc_off, ptr[reg_params + GET_OFF(oc_off)]); - - if (isa == cpu::avx512_common) - uni_vpxor(vmm_zero, vmm_zero, vmm_zero); - - int blk_size = jcp_.src_dt == memory::bf16 ? 16 : (vlen / sizeof(float)); - if (isa == cpu::sse42) - blk_size *= 2; - - Xbyak::Label resample_nearest_loop_label; - Xbyak::Label resample_nearest_loop_end_label; - L(resample_nearest_loop_label); - { - cmp(reg_work_amount, 0); - jle(resample_nearest_loop_end_label, T_NEAR); - - if (jcp_.planar_layout) { - uni_vmovdqu(vmm_index, ptr[reg_index]); - uni_vpcmpeqd(vmm_mask, vmm_mask, vmm_mask); - vgatherdps(vmm_val, ptr[reg_src + vmm_index * jcp.src_data_size], vmm_mask); - store_vector(ptr[reg_dst], vmm_val, jcp_.dst_dt); - - add(reg_dst, reg_dst_stride); - add(reg_index, reg_index_stride); - sub(reg_work_amount, 1); - } else if (jcp_.nhwc_format) { // support int8 and fusion for this format - load_vector(vmm_val, ptr[reg_src], jcp_.src_dt); - if (attr_.post_ops_.len_ != 0) - apply_post_ops(jcp_.dst_dt); - store_vector(ptr[reg_dst], vmm_val, jcp_.dst_dt); - - if (isa == cpu::sse42) { - int sse42_offset = 4; - load_vector(vmm_val, ptr[reg_src + sse42_offset * jcp_.src_data_size], jcp_.src_dt); - if (attr_.post_ops_.len_ != 0) { - add(reg_oc_off, sse42_offset * sizeof(float)); - apply_post_ops(jcp_.dst_dt); - sub(reg_oc_off, sse42_offset * sizeof(float)); - } - store_vector(ptr[reg_dst + sse42_offset * jcp_.dst_data_size], vmm_val, jcp_.dst_dt); - } - - add(reg_dst, reg_dst_stride); - add(reg_src, reg_src_stride); - add(reg_oc_off, blk_size * sizeof(float)); - sub(reg_work_amount, 1); - } else { // for blk - mov(reg_src_aux, reg_src); - mov(reg_index_oc, dword[reg_index]); - add(reg_src_aux, reg_index_oc); - - load_vector(vmm_val, ptr[reg_src_aux], jcp_.src_dt); - if (attr_.post_ops_.len_ != 0) - apply_post_ops(jcp_.dst_dt); - store_vector(ptr[reg_dst], vmm_val, jcp_.dst_dt); - - if (isa == cpu::sse42) { - int sse42_offset = 4; - add(reg_src_aux, sse42_offset * jcp_.src_data_size); - load_vector(vmm_val, ptr[reg_src_aux], jcp_.src_dt); - if (attr_.post_ops_.len_ != 0) { - add(reg_oc_off, sse42_offset * sizeof(float)); - apply_post_ops(jcp_.dst_dt); - sub(reg_oc_off, sse42_offset * sizeof(float)); - } - store_vector(ptr[reg_dst + sse42_offset * jcp_.dst_data_size], vmm_val, jcp_.dst_dt); - } - - add(reg_dst, reg_dst_stride); - add(reg_index, reg_index_stride); - sub(reg_work_amount, 1); - } - - jmp(resample_nearest_loop_label, T_NEAR); - } - L(resample_nearest_loop_end_label); - - this->postamble(); - - for (auto& inj : eltwise_injectors) - inj->prepare_table(); - - ker_ = (decltype(ker_)) this->getCode(); - } - -private: - using Vmm = typename conditional3::type; - - const int vlen = cpu_isa_traits::vlen; - - Xbyak::Reg64 reg_src = r8; - Xbyak::Reg64 reg_dst = r9; - Xbyak::Reg64 reg_src_stride = r10; - Xbyak::Reg64 reg_dst_stride = r11; - Xbyak::Reg64 reg_index_stride = r12; - Xbyak::Reg64 reg_work_amount = r13; - Xbyak::Reg64 reg_index = r14; - Xbyak::Reg64 reg_src_aux = r15; - Xbyak::Reg64 reg_params = abi_param1; - - Xbyak::Reg64 reg_oc_off = rax; - Xbyak::Reg64 reg_d_weights = rbx; - Xbyak::Reg64 reg_d_bias = rcx; - Xbyak::Reg32 reg_index_oc = edx; - - Vmm vmm_val = Vmm(0); - Vmm vmm_index = Vmm(1); - Vmm vmm_zero = Vmm(2); - Vmm vmm_mask = Vmm(3); - Vmm vmm_d_weights = Vmm(4); - Vmm vmm_d_bias = Vmm(5); - - std::vector>> eltwise_injectors; - std::vector>> depthwise_injectors; - std::vector>> quantization_injectors; - - inline void load_vector(Vmm vmm_src, const Xbyak::Address &op, memory::data_type src_dt) { - switch (src_dt) { - case memory::f32: - case memory::s32: - uni_vmovups(vmm_src, op); - break; - case memory::s8: - uni_vpmovsxbd(vmm_src, op); - break; - case memory::u8: - uni_vpmovzxbd(vmm_src, op); - break; - case memory::bf16: - uni_vpmovzxwd(vmm_src, op); - uni_vpslld(vmm_src, vmm_src, 16); - break; - default: - assert(!"unknown dst_dt"); - } - - if (!isFloatCompatible(src_dt)) - uni_vcvtdq2ps(vmm_src, vmm_src); - } - - inline void store_vector(const Xbyak::Address &op, Vmm vmm_dst, memory::data_type dst_dt) { - Ymm ymm_dst = Ymm(vmm_dst.getIdx()); - Xmm xmm_dst = Xmm(vmm_dst.getIdx()); - - if (dst_dt == memory::f32) { - uni_vmovups(op, vmm_dst); - } else if (dst_dt == memory::bf16) { - vcvtneps2bf16(ymm_dst, vmm_dst); - vmovdqu16(op, ymm_dst); - } else if (dst_dt == memory::u8) { - uni_vcvtps2dq(vmm_dst, vmm_dst); - if (isa == cpu::avx512_common) { - vpmaxsd(vmm_dst, vmm_dst, vmm_zero); - vpmovusdb(op, vmm_dst); - } else { - uni_vpackusdw(vmm_dst, vmm_dst, vmm_dst); - if (isa != cpu::sse42) - vpermq(ymm_dst, ymm_dst, 0x08); - uni_vpackuswb(vmm_dst, vmm_dst, vmm_dst); - if (isa != cpu::sse42) - vmovq(op, xmm_dst); - else - movd(op, xmm_dst); - } - } else if (dst_dt == memory::s8) { - uni_vcvtps2dq(vmm_dst, vmm_dst); - if (isa == cpu::avx512_common) { - vpmovsdb(op, vmm_dst); - } else { - uni_vpackssdw(vmm_dst, vmm_dst, vmm_dst); - if (isa != cpu::sse42) - vpermq(ymm_dst, ymm_dst, 0x08); - uni_vpacksswb(vmm_dst, vmm_dst, vmm_dst); - if (isa != cpu::sse42) - vmovq(op, xmm_dst); - else - movd(op, xmm_dst); - } - } - } - - void apply_post_ops(memory::data_type dst_dt) { - const auto &p = attr_.post_ops_; - int eltwise_inj_idx = 0; - int depthwise_inj_idx = 0; - int quantization_inj_idx = 0; - for (int i = 0; i < p.len_; i++) { - auto& post_op = p.entry_[i]; - if (post_op.is_eltwise()) { - eltwise_injectors[eltwise_inj_idx]->compute_vector_range(vmm_val.getIdx(), vmm_val.getIdx() + 1); - eltwise_inj_idx++; - } else if (post_op.is_depthwise()) { - mov(reg_d_weights, reinterpret_cast(post_op.depthwise.weights_data)); - mov(reg_d_bias, reinterpret_cast(post_op.depthwise.biases_data)); - add(reg_d_weights, reg_oc_off); - add(reg_d_bias, reg_oc_off); - depthwise_injectors[depthwise_inj_idx]->compute_vector_range(vmm_val.getIdx(), vmm_val.getIdx() + 1, reg_d_weights, reg_d_bias); - depthwise_inj_idx++; - } else if (post_op.is_quantization()) { - bool do_dequantization = post_op.quantization.alg == alg_kind::quantization_quantize_dequantize; - bool do_rounding = do_dequantization || isFloatCompatible(dst_dt) || i != p.len_ - 1; - int s_idx = vmm_val.getIdx(); - - quantization_injectors[quantization_inj_idx]->init_crop_ptrs(reg_oc_off); - quantization_injectors[quantization_inj_idx]->compute_crop(s_idx, s_idx + 1, 0); - - quantization_injectors[quantization_inj_idx]->init_input_scale_shift_ptrs(reg_oc_off); - quantization_injectors[quantization_inj_idx]->compute_input_scale_shift(s_idx, s_idx + 1, 0, do_rounding); - - quantization_injectors[quantization_inj_idx]->init_output_scale_shift_ptrs(reg_oc_off); - quantization_injectors[quantization_inj_idx]->compute_output_scale_shift(s_idx, s_idx + 1, 0); - - quantization_inj_idx++; - } - } - } -}; - - -MKLDNNResampleNode::MKLDNNResampleNode(const InferenceEngine::CNNLayerPtr& layer, const mkldnn::engine& eng, MKLDNNWeightsSharing::Ptr &cache) - : MKLDNNNode(layer, eng, cache) {} - -void MKLDNNResampleNode::getSupportedDescriptors() { - if (!descs.empty()) - return; - - if (getParentEdges().size() != 1) - THROW_IE_EXCEPTION << "Incorrect number of input edges for layer " << getName(); - if (getChildEdges().empty()) - THROW_IE_EXCEPTION << "Incorrect number of output edges for layer " << getName(); - - auto *layer = getCnnLayer().get(); - type = layer->GetParamAsString("type"); - antialias = layer->GetParamAsBool("antialias", false); - factor = layer->GetParamAsFloat("factor"); -} - -void MKLDNNResampleNode::initSupportedPrimitiveDescriptors() { - if (!supportedPrimitiveDescriptors.empty()) - return; - - if (getParentEdgeAt(0)->getDims().ndims() < 4 || getParentEdgeAt(0)->getDims().ndims() > 5) { - return; - } - - setPostOps(attr, true); - - Precision inputPrecision = getCnnLayer()->insData[0].lock()->getPrecision(); - Precision outputPrecision = getCnnLayer()->outData[0]->getPrecision(); - - if (!fusedWith.empty()) { - auto lastFusedLayer = fusedWith[fusedWith.size() - 1].get()->getCnnLayer(); - if (lastFusedLayer) { - outputPrecision = lastFusedLayer->outData[0]->getPrecision(); - } - } - - if (inputPrecision == Precision::BF16 || outputPrecision == Precision::BF16) { - if (!mayiuse(avx512_core_bf16)) - inputPrecision = outputPrecision = Precision::FP32; - else - inputPrecision = outputPrecision = Precision::BF16; - } - - auto inputDataType = MKLDNNExtensionUtils::IEPrecisionToDataType(inputPrecision); - auto outputDataType = MKLDNNExtensionUtils::IEPrecisionToDataType(outputPrecision); - - input_prec = inputPrecision; - output_prec = outputPrecision; - src_data_size = MKLDNNExtensionUtils::sizeOfDataType(inputDataType); - dst_data_size = MKLDNNExtensionUtils::sizeOfDataType(outputDataType); - - InferenceEngine::LayerConfig config; - config.dynBatchSupport = false; - config.inConfs.resize(1); - config.outConfs.resize(1); - config.inConfs[0].constant = false; - config.outConfs[0].constant = false; - config.inConfs[0].inPlace = -1; - config.outConfs[0].inPlace = -1; - - auto pushDesc = [&](memory::format format) { - config.inConfs[0].desc = MKLDNNMemoryDesc(getParentEdgeAt(0)->getDims(), inputDataType, format); - config.outConfs[0].desc = MKLDNNMemoryDesc(getChildEdgeAt(0)->getDims(), outputDataType, format); - supportedPrimitiveDescriptors.push_back({config, impl_desc_type::unknown, format}); - }; - - if (type == "caffe.ResampleParameter.NEAREST") { - if (getParentEdgeAt(0)->getDims().ndims() == 4) { - pushDesc(memory::nhwc); - } else if (getParentEdgeAt(0)->getDims().ndims() == 5) { - pushDesc(memory::ndhwc); - } - - if (isFloatCompatible(inputPrecision) && isFloatCompatible(outputPrecision)) { - if (getParentEdgeAt(0)->getDims().ndims() == 4) { - if (mayiuse(cpu::avx512_common)) { - pushDesc(memory::nChw16c); - } else if (mayiuse(cpu::avx2) || mayiuse(cpu::sse42)) { - pushDesc(memory::nChw8c); - } - } else if (getParentEdgeAt(0)->getDims().ndims() == 5) { - if (mayiuse(cpu::avx512_common)) { - pushDesc(memory::nCdhw16c); - } else if (mayiuse(cpu::avx2) || mayiuse(cpu::sse42)) { - pushDesc(memory::nCdhw8c); - } - } - - if (fusedWith.empty()) { - pushDesc(MKLDNNMemory::GetPlainFormat(getChildEdgeAt(0)->getDims())); - } - } - } - if (type == "caffe.ResampleParameter.LINEAR") { - if (getParentEdgeAt(0)->getDims().ndims() == 4) { - pushDesc(memory::nchw); - } else if (getParentEdgeAt(0)->getDims().ndims() == 5) { - pushDesc(memory::ncdhw); - } - } -} - -void MKLDNNResampleNode::createPrimitive() { - auto& dstMemPtr = getChildEdgeAt(0)->getMemoryPtr(); - auto& srcMemPtr = getParentEdgeAt(0)->getMemoryPtr(); - if (!dstMemPtr || !dstMemPtr->GetPrimitivePtr()) - THROW_IE_EXCEPTION << "Destination memory didn't allocate."; - if (!srcMemPtr || !srcMemPtr->GetPrimitivePtr()) - THROW_IE_EXCEPTION << "Input memory didn't allocate."; - if (getSelectedPrimitiveDescriptor() == nullptr) - THROW_IE_EXCEPTION << "Preferable primitive descriptor is not set."; - - auto selectedPD = getSelectedPrimitiveDescriptor(); - Layout selected_layout = selectedPD->getConfig().inConfs[0].desc.getLayout(); - auto jcp = jit_resample_config_params(); - jcp.src_dt = MKLDNNExtensionUtils::IEPrecisionToDataType(selectedPD->getConfig().inConfs[0].desc.getPrecision()); - jcp.dst_dt = MKLDNNExtensionUtils::IEPrecisionToDataType(selectedPD->getConfig().outConfs[0].desc.getPrecision()); - jcp.src_data_size = MKLDNNExtensionUtils::sizeOfDataType(jcp.src_dt); - jcp.dst_data_size = MKLDNNExtensionUtils::sizeOfDataType(jcp.dst_dt); - jcp.planar_layout = MKLDNNMemory::GetPlainLayout(getChildEdgeAt(0)->getDims()) == selected_layout; - jcp.nhwc_format = (selected_layout == NHWC) || (selected_layout == NDHWC); - - if (type == "caffe.ResampleParameter.NEAREST") { - if (mayiuse(cpu::avx512_common)) { - if (jcp.planar_layout) { - resample_nearest_kernel.reset(new jit_uni_resample_nearest_kernel_f32(jcp, *attr.get())); - blk_size = 8; - } else { - resample_nearest_kernel.reset(new jit_uni_resample_nearest_kernel_f32(jcp, *attr.get())); - blk_size = 16; - } - } else if (mayiuse(cpu::avx2)) { - resample_nearest_kernel.reset(new jit_uni_resample_nearest_kernel_f32(jcp, *attr.get())); - blk_size = 8; - } else if (mayiuse(cpu::sse42) && !jcp.planar_layout) { - resample_nearest_kernel.reset(new jit_uni_resample_nearest_kernel_f32(jcp, *attr.get())); - blk_size = 8; - } - } -} - -void MKLDNNResampleNode::setPostOps(mkldnn::primitive_attr &attr, bool initWeights) { - int blob_idx = 0; - mkldnn::post_ops ops; - - for (auto &node : fusedWith) { - auto* quantizeNode = dynamic_cast(node.get()); - if (quantizeNode) { - quantizeNode->appendPostOps(ops); - continue; - } - - auto* eltwiseNode = dynamic_cast(node.get()); - if (eltwiseNode) { - eltwiseNode->appendPostOps(ops); - continue; - } - - THROW_IE_EXCEPTION << "Fusing of " << NameFromType(node->getType()) << " operation to " << NameFromType(this->getType()) << " node is not implemented"; - } - - attr.set_post_ops(ops); -} - - -void MKLDNNResampleNode::execute(mkldnn::stream strm) { - auto &dstMemPtr = getChildEdgeAt(0)->getMemoryPtr(); - auto &srcMemPtr = getParentEdgeAt(0)->getMemoryPtr(); - - Layout layout = getParentEdgeAt(0)->getDesc().getLayout(); - - SizeVector src_dim = getParentEdgeAt(0)->getDesc().getDims(); - SizeVector dst_dim = getChildEdgeAt(0)->getDesc().getDims(); - - size_t dims_size = src_dim.size(); - size_t N = src_dim[0]; - size_t C = src_dim[1]; - size_t ID = (dims_size == 5) ? src_dim[dims_size - 3] : 1lu; - size_t IH = src_dim[dims_size - 2]; - size_t IW = src_dim[dims_size - 1]; - - size_t OD = (dims_size == 5) ? dst_dim[dims_size - 3] : 1lu; - size_t OH = dst_dim[dims_size - 2]; - size_t OW = dst_dim[dims_size - 1]; - - float fx = static_cast(IW) / static_cast(OW); - float fy = static_cast(IH) / static_cast(OH); - float fz = static_cast(ID) / static_cast(OD); - - if (type == "caffe.ResampleParameter.NEAREST") { - if (layout == NCHW || layout == NCDHW) { - if (output_prec == Precision::FP32) { - auto src_data = reinterpret_cast(srcMemPtr->GetData()); - auto dst_data = reinterpret_cast(dstMemPtr->GetData()); - NearestNeighbor_PLN(src_data, dst_data, N, C, ID, IH, IW, fx, fy, fz, OD, OH, OW); - } else if (output_prec == Precision::BF16) { - auto src_data = reinterpret_cast(srcMemPtr->GetData()); - auto dst_data = reinterpret_cast(dstMemPtr->GetData()); - NearestNeighbor_PLN(src_data, dst_data, N, C, ID, IH, IW, fx, fy, fz, OD, OH, OW); - } else { - THROW_IE_EXCEPTION << "Unsupported output precision: " << output_prec.name(); - } - } else { - if (output_prec == Precision::U8) { - auto dst_data = reinterpret_cast(dstMemPtr->GetData()); - if (input_prec == Precision::U8) { - auto src_data = reinterpret_cast(srcMemPtr->GetData()); - NearestNeighbor_BLK(src_data, dst_data, N, C, ID, IH, IW, fx, fy, fz, OD, OH, OW); - } else if (input_prec == Precision::I8) { - auto src_data = reinterpret_cast(srcMemPtr->GetData()); - NearestNeighbor_BLK(src_data, dst_data, N, C, ID, IH, IW, fx, fy, fz, OD, OH, OW); - } else if (input_prec == Precision::FP32) { - auto src_data = reinterpret_cast(srcMemPtr->GetData()); - NearestNeighbor_BLK(src_data, dst_data, N, C, ID, IH, IW, fx, fy, fz, OD, OH, OW); - } else { - THROW_IE_EXCEPTION << "Unsupported output precision: " << output_prec.name(); - } - } else if (output_prec == Precision::I8) { - auto dst_data = reinterpret_cast(dstMemPtr->GetData()); - if (input_prec == Precision::U8) { - auto src_data = reinterpret_cast(srcMemPtr->GetData()); - NearestNeighbor_BLK(src_data, dst_data, N, C, ID, IH, IW, fx, fy, fz, OD, OH, OW); - } else if (input_prec == Precision::I8) { - auto src_data = reinterpret_cast(srcMemPtr->GetData()); - NearestNeighbor_BLK(src_data, dst_data, N, C, ID, IH, IW, fx, fy, fz, OD, OH, OW); - } else if (input_prec == Precision::FP32) { - auto src_data = reinterpret_cast(srcMemPtr->GetData()); - NearestNeighbor_BLK(src_data, dst_data, N, C, ID, IH, IW, fx, fy, fz, OD, OH, OW); - } else { - THROW_IE_EXCEPTION << "Unsupported output precision: " << output_prec.name(); - } - } else if (output_prec == Precision::FP32) { - auto dst_data = reinterpret_cast(dstMemPtr->GetData()); - if (input_prec == Precision::U8) { - auto src_data = reinterpret_cast(srcMemPtr->GetData()); - NearestNeighbor_BLK(src_data, dst_data, N, C, ID, IH, IW, fx, fy, fz, OD, OH, OW); - } else if (input_prec == Precision::I8) { - auto src_data = reinterpret_cast(srcMemPtr->GetData()); - NearestNeighbor_BLK(src_data, dst_data, N, C, ID, IH, IW, fx, fy, fz, OD, OH, OW); - } else if (input_prec == Precision::FP32) { - auto src_data = reinterpret_cast(srcMemPtr->GetData()); - NearestNeighbor_BLK(src_data, dst_data, N, C, ID, IH, IW, fx, fy, fz, OD, OH, OW); - } else { - THROW_IE_EXCEPTION << "Unsupported output precision: " << output_prec.name(); - } - } else if (output_prec == Precision::BF16) { - auto src_data = reinterpret_cast(srcMemPtr->GetData()); - auto dst_data = reinterpret_cast(dstMemPtr->GetData()); - NearestNeighbor_BLK(src_data, dst_data, N, C, ID, IH, IW, fx, fy, fz, OD, OH, OW); - } else { - THROW_IE_EXCEPTION << "Unsupported output precision: " << output_prec.name(); - } - } - } else if (type == "caffe.ResampleParameter.LINEAR") { - // currently no fusion, the input and output precision is the same - bool isDownsample = (fx > 1) || (fy > 1) || (fz > 1); - int kernel_width = 2; - if (input_prec == Precision::U8) { - auto src_data = reinterpret_cast(srcMemPtr->GetData()); - auto dst_data = reinterpret_cast(dstMemPtr->GetData()); - LinearInterpolation(src_data, dst_data, N, C, ID, IH, IW, fx, fy, fz, OD, OH, OW, kernel_width, isDownsample && antialias); - } else if (input_prec == Precision::I8) { - auto src_data = reinterpret_cast(srcMemPtr->GetData()); - auto dst_data = reinterpret_cast(dstMemPtr->GetData()); - LinearInterpolation(src_data, dst_data, N, C, ID, IH, IW, fx, fy, fz, OD, OH, OW, kernel_width, isDownsample && antialias); - } else if (input_prec == Precision::FP32) { - auto src_data = reinterpret_cast(srcMemPtr->GetData()); - auto dst_data = reinterpret_cast(dstMemPtr->GetData()); - LinearInterpolation(src_data, dst_data, N, C, ID, IH, IW, fx, fy, fz, OD, OH, OW, kernel_width, isDownsample && antialias); - } else if (input_prec == Precision::BF16) { - auto src_data = reinterpret_cast(srcMemPtr->GetData()); - auto dst_data = reinterpret_cast(dstMemPtr->GetData()); - LinearInterpolation(src_data, dst_data, N, C, ID, IH, IW, fx, fy, fz, OD, OH, OW, kernel_width, - isDownsample && antialias); - } else { - THROW_IE_EXCEPTION << "Unsupported input precision: " << input_prec.name(); - } - } else { - THROW_IE_EXCEPTION << "Unsupported resample parameter type: " << type; - } -} - -// f32 and no fused, f32->input is f32, no fuse->output is f32 -template -void MKLDNNResampleNode::NearestNeighbor_PLN(const in_data_t *in_ptr_, out_data_t *out_ptr_, int B, int C, int ID, int IH, int IW, - float fx, float fy, float fz, int OD, int OH, int OW) { - std::vector index_buffer(OD * OH * OW); - for (int oz = 0; oz < OD; oz++) { - float iz = oz * fz; - int iz_offset = static_cast(std::floor(iz)) * IH * IW; - int oz_offset = oz * OH * OW; - for (int oy = 0; oy < OH; oy++) { - float iy = oy * fy; - int iy_offset = static_cast(std::floor(iy)) * IW + iz_offset; - int oy_offset = oy * OW + oz_offset; - for (int ox = 0; ox < OW; ox++) { - float ix = ox * fx; - int ix_index = static_cast(std::floor(ix)) + iy_offset; - index_buffer[oy_offset + ox] = ix_index; - } - } - } - if (resample_nearest_kernel) { - parallel_for2d(B, C, [&](size_t b, size_t c) { - const in_data_t *in_ptr = in_ptr_ + IW * IH * ID * C * b + IW * IH * ID * c; - out_data_t *out_ptr = out_ptr_ + OW * OH * OD * C * b + OW * OH * OD * c; - - // for OW*OH*OD - auto arg = jit_resample_call_args(); - arg.src = in_ptr; - arg.dst = out_ptr; - arg.index = static_cast(&index_buffer[0]); - arg.index_stride = blk_size * sizeof(int); - arg.dst_stride = blk_size * dst_data_size; - arg.work_amount = OW * OH * OD / blk_size; - (*resample_nearest_kernel)(&arg); - - int tail_start = (OW * OH * OD / blk_size) * blk_size; - for (int tail = tail_start; tail < OW * OH * OD; tail++) { - out_ptr[tail] = in_ptr[index_buffer[tail]]; - } - }); - } else { - parallel_for2d(B, C, [&](size_t b, size_t c) { - const in_data_t *in_ptr = in_ptr_ + IW * IH * ID * C * b + IW * IH * ID * c; - out_data_t *out_ptr = out_ptr_ + OW * OH * OD * C * b + OW * OH * OD * c; - - for (int i_dst = 0; i_dst < OW * OH * OD; i_dst++) { - out_ptr[i_dst] = in_ptr[index_buffer[i_dst]]; - } - }); - } -} - -// for ndhwc and nCdhw8/16d -// int8->input may be int8, fused->output may be int8 -template -void MKLDNNResampleNode::NearestNeighbor_BLK(const in_data_t *in_ptr_, out_data_t *out_ptr_, int B, int C, int ID, int IH, int IW, - float fx, float fy, float fz, int OD, int OH, int OW) { - std::vector index_d(OD); - std::vector index_h(OH); - std::vector index_w(OW); - for (int oz = 0; oz < OD; oz++) { - float iz = oz * fz; - index_d[oz] = static_cast(std::floor(iz)); - } - for (int oy = 0; oy < OH; oy++) { - float iy = oy * fy; - index_h[oy] = static_cast(std::floor(iy)); - } - for (int ox = 0; ox < OW; ox++) { - float ix = ox * fx; - index_w[ox] = static_cast(std::floor(ix)); - } - - Layout layout = getParentEdgeAt(0)->getDesc().getLayout(); - bool is_nhwc = (layout == NHWC || layout == NDHWC) ? true : false; - - for (int b = 0; b < B; b++) { - if (is_nhwc) { - const in_data_t *in_ptr = in_ptr_ + IW * IH * ID * C * b; - out_data_t *out_ptr = out_ptr_ + OW * OH * OD * C * b; - if (resample_nearest_kernel) { - int tail = (C / blk_size) * blk_size; - parallel_for2d(OD, OH, [&](size_t d, size_t h) { - // better that same core process continuous memory - out_data_t *out_ptr_dh = out_ptr + C * OW * OH * d + C * OW * h; - const in_data_t *in_ptr_dh = in_ptr + C * IW * IH * index_d[d] + C * IW * index_h[h]; - auto arg = jit_resample_call_args(); - for (int ox = 0; ox < OW; ox++) { - // kernel for OC - arg.dst = out_ptr_dh + C * ox; - arg.src = in_ptr_dh + C * index_w[ox]; - arg.dst_stride = blk_size * sizeof(out_data_t); - arg.src_stride = blk_size * sizeof(in_data_t); - arg.work_amount = C / blk_size; - arg.oc_off = 0; - (*resample_nearest_kernel)(&arg); - } - // tail - if (tail != C) { - for (int ox = 0; ox < OW; ox++) { - out_data_t *out_ptr_dhw = out_ptr_dh + C * ox; - const in_data_t *in_ptr_dhw = in_ptr_dh + C * index_w[ox]; - if (fusedWith.empty() && output_prec == input_prec) { - cpu_memcpy(out_ptr_dhw + tail, in_ptr_dhw + tail, (C - tail) * sizeof(in_data_t)); - } else { - for (int c = tail; c < C; c++) { - float dst_value = static_cast(in_ptr_dhw[c]); - apply_post_ops_scalar(dst_value, c); - if (isFloatCompatible(output_prec)) { - out_ptr_dhw[c] = dst_value; - } else if (output_prec == Precision::U8) { - out_ptr_dhw[c] = (dst_value >= 0) ? lroundf(dst_value) : 0; - } else if (output_prec == Precision::I8) { - out_ptr_dhw[c] = lroundf(dst_value); - } - } - } - } - } - }); - } else { // without kernel - parallel_for2d(OD, OH, [&](size_t d, size_t h) { - out_data_t *out_ptr_dh = out_ptr + C * OW * OH * d + C * OW * h; - const in_data_t *in_ptr_dh = in_ptr + C * IW * IH * index_d[d] + C * IW * index_h[h]; - for (int ox = 0; ox < OW; ox++) { - out_data_t *out_ptr_dhw = out_ptr_dh + C * ox; - const in_data_t *in_ptr_dhw = in_ptr_dh + C * index_w[ox]; - if (fusedWith.empty() && output_prec == input_prec) { - cpu_memcpy(out_ptr_dhw, in_ptr_dhw, C * sizeof(in_data_t)); - } else { - for (int c = 0; c < C; c++) { - float dst_value = static_cast(in_ptr_dhw[c]); - apply_post_ops_scalar(dst_value, c); - if (isFloatCompatible(output_prec)) { - out_ptr_dhw[c] = dst_value; - } else if (output_prec == Precision::U8) { - out_ptr_dhw[c] = (dst_value >= 0) ? lroundf(dst_value) : 0; - } else if (output_prec == Precision::I8) { - out_ptr_dhw[c] = lroundf(dst_value); - } - } - } - } - }); - } - } else { // for nC(d)hw8/16c - int CB = div_up(C, blk_size); - const in_data_t *in_ptr = in_ptr_ + IW * IH * ID * CB * blk_size * b; - out_data_t *out_ptr = out_ptr_ + OW * OH * OD * CB * blk_size * b; - if (resample_nearest_kernel) { - std::vector index_w_kernel(OW); - for (int ox = 0; ox < OW; ox++) { - index_w_kernel[ox] = index_w[ox] * blk_size * sizeof(in_data_t); - } - parallel_for2d(CB, OD, [&](size_t cb, size_t d) { - out_data_t *out_ptr_cbd = out_ptr + blk_size * OW * OH * OD * cb + blk_size * OW * OH * d; - const in_data_t *in_ptr_cbd = in_ptr + blk_size * IW * IH * ID * cb + blk_size * IW * IH * index_d[d]; - auto arg = jit_resample_call_args(); - for (int h = 0; h < OH; h++) { // kernel for blk_size * OW - arg.dst = out_ptr_cbd + blk_size * OW * h; - arg.src = in_ptr_cbd + blk_size * IW * index_h[h]; - arg.index = static_cast(&(index_w_kernel[0])); - arg.dst_stride = static_cast(blk_size * sizeof(out_data_t)); - arg.index_stride = static_cast(1 * sizeof(int)); - arg.work_amount = static_cast(OW); - arg.oc_off = cb * blk_size; - (*resample_nearest_kernel)(&arg); - } - }); - } else { - parallel_for2d(CB, OD, [&](int cb, int d) { - out_data_t *out_ptr_cbd = out_ptr + blk_size * OW * OH * OD * cb + blk_size * OW * OH * d; - const in_data_t *in_ptr_cbd = in_ptr + blk_size * IW * IH * ID * cb + blk_size * IW * IH * index_d[d]; - for (int h = 0; h < OH; h++) { - out_data_t *out_ptr_cbdh = out_ptr_cbd + blk_size * OW * h; - const in_data_t *in_ptr_cbdh = in_ptr_cbd + blk_size * IW * index_h[h]; - for (int w = 0; w < OW; w++) { - out_data_t *out_ptr_cbdhw = out_ptr_cbdh + blk_size * w; - const in_data_t *in_ptr_cbdhw = in_ptr_cbdh + blk_size * index_w[w]; - if (fusedWith.empty()) { - cpu_memcpy(out_ptr_cbdhw, in_ptr_cbdhw, blk_size * sizeof(in_data_t)); - } else { - for (int blk = 0; blk < blk_size; blk++) { - float dst_value = static_cast(in_ptr_cbdhw[blk]); - apply_post_ops_scalar(dst_value, cb * blk_size + blk); - if (isFloatCompatible(output_prec)) { - out_ptr_cbdhw[blk] = dst_value; - } else if (output_prec == Precision::U8) { - out_ptr_cbdhw[blk] = (dst_value >= 0) ? lroundf(dst_value) : 0; - } else if (output_prec == Precision::I8) { - out_ptr_cbdhw[blk] = lroundf(dst_value); - } - } - } - } - } - }); - } - } - } // batch end -} - -static inline float triangleCoeff(float x) { - return (std::max)(0.0f, 1 - std::abs(x)); -} - -template -void MKLDNNResampleNode::LinearInterpolation(const in_data_t *in_ptr_, out_data_t *out_ptr_, int B, int C, int ID, int IH, int IW, - float fx, float fy, float fz, int OD, int OH, int OW, int kernel_width, bool antialias) { - if (IW == OW && IH == OH && ID == OD) { - size_t size = B * C * ID * IH * IW; - if (isFloatCompatible(input_prec)) { - size *= sizeof(in_data_t); - } - cpu_memcpy(out_ptr_, in_ptr_, size); - return; - } - - for (size_t b = 0; b < B; b++) { - const in_data_t *in_ptr_n = in_ptr_ + IW * IH * ID * C * b; - out_data_t *out_ptr_n = out_ptr_ + OW * OH * OD * C * b; - for (size_t c = 0; c < C; c++) { - const in_data_t *in_ptr_nc = in_ptr_n + IW * IH * ID * c; - out_data_t *out_ptr_nc = out_ptr_n + OW * OH * OD * c; - - for (size_t oz = 0; oz < OD; oz++) { - out_data_t *out_ptr_ncd = out_ptr_nc + OW * OH * oz; - for (size_t oy = 0; oy < OH; oy++) { - out_data_t *out_ptr_ncdh = out_ptr_ncd + OW * oy; - for (size_t ox = 0; ox < OW; ox++) { - float ix = ox * fx + fx / 2.0f - 0.5f; - float iy = oy * fy + fy / 2.0f - 0.5f; - float iz = oz * fz + fz / 2.0f - 0.5f; - - int ix_r = static_cast(round(ix)); - int iy_r = static_cast(round(iy)); - int iz_r = static_cast(round(iz)); - - float sum = 0; - float wsum = 0; - - float ax = 1.0f / (antialias ? fx : 1.0f); - float ay = 1.0f / (antialias ? fy : 1.0f); - float az = 1.0f / (antialias ? fz : 1.0f); - - int rx = (fx < 1.0f) ? 2 : static_cast(ceil(static_cast(kernel_width) / ax)); - int ry = (fy < 1.0f) ? 2 : static_cast(ceil(static_cast(kernel_width) / ay)); - int rz = (fz < 1.0f) ? 2 : static_cast(ceil(static_cast(kernel_width) / az)); - - for (int z = iz_r - rz; z <= iz_r + rz; z++) { - for (int y = iy_r - ry; y <= iy_r + ry; y++) { - for (int x = ix_r - rx; x <= ix_r + rx; x++) { - bool is_continue = z < 0 || - y < 0 || - x < 0 || - z >= static_cast(ID) || - y >= static_cast(IH) || - x >= static_cast(IW); - if (is_continue) - continue; - - float dx = ix - x; - float dy = iy - y; - float dz = iz - z; - - float w = ax * triangleCoeff(ax * dx) * - ay * triangleCoeff(ay * dy) * - az * triangleCoeff(az * dz); - - sum += w * static_cast(in_ptr_nc[z * IH * IW + y * IW + x]); - wsum += w; - } - } - } - if (!wsum) { - out_ptr_ncdh[ox] = 0; - } else { - float dst_value = sum / wsum; - if (isFloatCompatible(output_prec)) { - out_ptr_ncdh[ox] = dst_value; - } else if (output_prec == Precision::U8) { - out_ptr_ncdh[ox] = (dst_value >= 0) ? lroundf(dst_value) : 0; - } else if (output_prec == Precision::I8) { - out_ptr_ncdh[ox] = lroundf(dst_value); - } - } - } - } - } - } - } -} - -inline void MKLDNNResampleNode::apply_post_ops_scalar(float &dst_value, int index_c) { - const auto &p = (*attr.get()).post_ops_; - for (int i = 0; i < p.len_; i++) { - auto &post_op = p.entry_[i]; - if (post_op.is_eltwise()) { - // only eltwise_relu supported - if (dst_value < 0) dst_value = 0; - } else if (post_op.is_depthwise()) { - // only ScaleShift supported - float scale = post_op.depthwise.weights_data[index_c]; - float shift = post_op.depthwise.biases_data[index_c]; - dst_value = dst_value * scale + shift; - } else if (post_op.is_quantization()) { - bool do_dequantization = post_op.quantization.alg == - alg_kind::quantization_quantize_dequantize; - bool do_rounding = do_dequantization || isFloatCompatible(output_prec) || - i != p.len_ - 1; - - auto quant = post_op.quantization; - - float crop_low = quant.crop_low_data->shifts_[quant.crop_low_data->count_ == 1 ? 0 : index_c]; - float crop_high = quant.crop_high_data->shifts_[quant.crop_high_data->count_ == 1 ? 0 : index_c]; - float input_scale = quant.input_scale_data->scales_[quant.input_scale_data->count_ == 1 ? 0 : index_c]; - float input_shift = quant.input_shift_data->shifts_[quant.input_shift_data->count_ == 1 ? 0 : index_c]; - - dst_value = nstl::min(crop_high, nstl::max(crop_low, dst_value)); - dst_value = dst_value * input_scale + input_shift; - - if (do_rounding) { - dst_value = roundf(dst_value); - } - - if (do_dequantization) { - float output_scale = quant.output_scale_data->scales_[quant.output_scale_data->count_ == 1 ? 0 : index_c]; - float output_shift = quant.output_shift_data->shifts_[quant.output_shift_data->count_ == 1 ? 0 : index_c]; - dst_value = dst_value * output_scale + output_shift; - } - } - } -} - -bool MKLDNNResampleNode::created() const { - return getType() == Resample; -} - -REG_MKLDNN_PRIM_FOR(MKLDNNResampleNode, Resample); \ No newline at end of file diff --git a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_resample_node.h b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_resample_node.h deleted file mode 100644 index 47137a0dfefee4..00000000000000 --- a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_resample_node.h +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#pragma once - -#include -#include -#include -#include -#include - -namespace MKLDNNPlugin { - -struct jit_resample_config_params { - bool planar_layout; - bool nhwc_format; - mkldnn::memory::data_type src_dt; - mkldnn::memory::data_type dst_dt; - int src_data_size; - int dst_data_size; -}; - -struct jit_resample_call_args { - const void *src; - const int *index; - void *dst; - size_t src_stride; - size_t index_stride; - size_t dst_stride; - size_t work_amount; - size_t oc_off; -}; - -struct jit_uni_resample_nearest_kernel { - void (*ker_)(const jit_resample_call_args *); - - void operator()(const jit_resample_call_args *args) { - assert(ker_); - ker_(args); - } - - explicit jit_uni_resample_nearest_kernel(jit_resample_config_params jcp, const mkldnn_primitive_attr &attr) : ker_(nullptr), jcp_(jcp), attr_(attr) {} - virtual ~jit_uni_resample_nearest_kernel() {} - - jit_resample_config_params jcp_; - const mkldnn_primitive_attr &attr_; -}; - -struct jit_uni_resample_linear_kernel { - void (*ker_)(const jit_resample_call_args *); - - void operator()(const jit_resample_call_args *args) { - assert(ker_); - ker_(args); - } - - explicit jit_uni_resample_linear_kernel(jit_resample_config_params jcp, const mkldnn_primitive_attr &attr) : ker_(nullptr), jcp_(jcp), attr_(attr) {} - virtual ~jit_uni_resample_linear_kernel() {} - - jit_resample_config_params jcp_; - const mkldnn_primitive_attr &attr_; -}; - - -class MKLDNNResampleNode : public MKLDNNNode { -public: - MKLDNNResampleNode(const InferenceEngine::CNNLayerPtr& layer, const mkldnn::engine& eng, MKLDNNWeightsSharing::Ptr &cache); - ~MKLDNNResampleNode() override = default; - - void getSupportedDescriptors() override; - void initSupportedPrimitiveDescriptors() override; - void createPrimitive() override; - bool created() const override; - void execute(mkldnn::stream strm) override; - bool canBeInPlace() const override { - return false; - } - -private: - template - void NearestNeighbor_PLN(const in_data_t *in_ptr_, out_data_t *out_ptr_, int B, int C, int ID, int IH, int IW, - float fx, float fy, float fz, int OD, int OH, int OW); - template - void NearestNeighbor_BLK(const in_data_t *in_ptr_, out_data_t *out_ptr_, int B, int C, int ID, int IH, int IW, - float fx, float fy, float fz, int OD, int OH, int OW); - template - void LinearInterpolation(const in_data_t *in_ptr_, out_data_t *out_ptr_, int B, int C, int ID, int IH, int IW, - float fx, float fy, float fz, int OD, int OH, int OW, int kernel_width, bool antialias); - void setPostOps(mkldnn::primitive_attr &attr, bool initWeights = false); - inline void apply_post_ops_scalar(float &dst_value, int index_c); - - int blk_size; - - std::string type; - bool antialias; - float factor; - - mkldnn::primitive_attr attr; - std::vector PostOpsIntBlobMemory; - - InferenceEngine::Precision input_prec, output_prec; - size_t src_data_size, dst_data_size; - - std::shared_ptr resample_nearest_kernel; -}; - -} // namespace MKLDNNPlugin - diff --git a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/interpolate.cpp b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/interpolate.cpp index 9d153429994aba..a1cebccf2a67e6 100644 --- a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/interpolate.cpp +++ b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/interpolate.cpp @@ -55,6 +55,7 @@ class InterpolateLayerCPUTest : public testing::WithParamInterface axes; std::vector scales; std:tie(mode, shapeCalcMode, coordinateTransformMode, nearestMode, antialias, padBegin, padEnd, cubeCoef, axes, scales) = interpolateParams; + inPrc = outPrc = netPrecision; using ShapeCalcMode = ngraph::op::v4::Interpolate::ShapeCalcMode; @@ -81,6 +82,8 @@ class InterpolateLayerCPUTest : public testing::WithParamInterfaceget_rt_info() = getCPUInfo(); const ngraph::ResultVector results{std::make_shared(interpolate)}; function = std::make_shared(results, params, "interpolate"); + + selectedType = getPrimitiveType() + "_" + inPrc.name(); } }; @@ -99,7 +102,6 @@ std::vector filterCPUInfoForDevice() { if (with_cpu_x86_avx512f()) { resCPUParams.push_back(CPUSpecificParams{{nChw16c, x, x}, {nChw16c}, {"jit_avx512"}, "jit_avx512_FP32"}); resCPUParams.push_back(CPUSpecificParams{{nhwc, x, x}, {nhwc}, {"jit_avx512"}, "jit_avx512_FP32"}); - resCPUParams.push_back(CPUSpecificParams{{nchw, x, x}, {nchw}, {"jit_avx2"}, "jit_avx2_FP32"}); } else if (with_cpu_x86_avx2()) { resCPUParams.push_back(CPUSpecificParams{{nChw8c, x, x}, {nChw8c}, {"jit_avx2"}, "jit_avx2_FP32"}); resCPUParams.push_back(CPUSpecificParams{{nhwc, x, x}, {nhwc}, {"jit_avx2"}, "jit_avx2_FP32"}); @@ -115,7 +117,8 @@ std::vector filterCPUInfoForDevice() { /* ========== */ const std::vector netPrecisions = { - InferenceEngine::Precision::FP32 + InferenceEngine::Precision::FP32, + InferenceEngine::Precision::BF16 }; const std::vector coordinateTransformModes = { diff --git a/inference-engine/tests_deprecated/unit/engines/mkldnn/graph/layers/extensions/interp_tests.cpp b/inference-engine/tests_deprecated/unit/engines/mkldnn/graph/layers/extensions/interp_tests.cpp deleted file mode 100644 index e7e900a7d01f91..00000000000000 --- a/inference-engine/tests_deprecated/unit/engines/mkldnn/graph/layers/extensions/interp_tests.cpp +++ /dev/null @@ -1,254 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - - -#include "test_graph.hpp" - -#include "single_layer_common.hpp" -#include "tests_common.hpp" -#include - - -using namespace ::testing; -using namespace std; -using namespace mkldnn; - - -struct interp_test_params { - struct { - size_t n; - size_t c; - size_t h; - size_t w; - } in; - - struct { - size_t h; - size_t w; - } out; - - int pad_beg; - int pad_end; - - size_t num_prim_desc; - - int selectedType; - - std::vector> comp; -}; - -void interpolate(const int N, const int C, const float *src, const int x1, const int y1, const int IH_pad, const int IW_pad, - const int IH, const int IW, float *dst, const int x2, const int y2, const int OH_pad, const int OW_pad, const int OH, const int OW) { - if (IH_pad == OH_pad && IW_pad == OW_pad) { - for (int i = 0; i < N * C * OH * OW; i++) { - dst[i] = src[i]; - } - return; - } - - const float rh = (OH_pad > 1) ? static_cast(IH_pad - 1) / (OH_pad - 1) : 0.0f; - const float rw = (OW_pad > 1) ? static_cast(IW_pad - 1) / (OW_pad - 1) : 0.0f; - - const int block_size = 1; - - // Align channel number to block size to deal with channels padding in IE with multiple blobs - int CB = (C + block_size - 1) & (-block_size); // CB=n*block_size, i.e.:c=15,(block_size=8), then CB=16, CH=2 - - int CH = (C + block_size - 1) / block_size; // number of block:(n) - - for (int n = 0; n < N; n++) { - for (int cb = 0; cb < CH; ++cb) { - for (int h = 0; h < OH_pad; ++h) { - const float *psrc = src + n * CB * IH * IW; // should be nChw8c(16c) data format - - float fh = rh * h; - int ih0 = static_cast(fh); - int ih1 = (ih0 < IH_pad - 1) ? ih0 + 1 : ih0; - - float h_lambda0 = fh - ih0; - float h_lambda1 = 1.0f - h_lambda0; - - for (int w = 0; w < OW_pad; ++w) { - float fw = rw * w; - int iw0 = static_cast(fw); - int iw1 = (iw0 < IW_pad - 1) ? iw0 + 1 : iw0; - - float w_lambda0 = fw - iw0; - float w_lambda1 = 1.0f - w_lambda0; - - const float *psrc00 = - psrc + cb * block_size * IW * IH + (y1 + ih0) * IW * block_size + (x1 + iw0) * block_size; - const float *psrc01 = - psrc + cb * block_size * IW * IH + (y1 + ih0) * IW * block_size + (x1 + iw1) * block_size; - const float *psrc10 = - psrc + cb * block_size * IW * IH + (y1 + ih1) * IW * block_size + (x1 + iw0) * block_size; - const float *psrc11 = - psrc + cb * block_size * IW * IH + (y1 + ih1) * IW * block_size + (x1 + iw1) * block_size; - - float *pdst = dst + n * CB * OH * OW + cb * block_size * OW * OH + (y2 + h) * OW * block_size + - (x2 + w) * block_size; - - for (int c = 0; c < block_size; ++c) { - pdst[c] = h_lambda1 * (w_lambda1 * psrc00[c] + w_lambda0 * psrc01[c]) + - h_lambda0 * (w_lambda1 * psrc10[c] + w_lambda0 * psrc11[c]); - } - } - } - } - } -} - -template -void ref_interp(const InferenceEngine::TBlob &src, InferenceEngine::TBlob &dst, interp_test_params prm) { - int IB = static_cast(src.getTensorDesc().getDims()[0]); - int IC = static_cast(src.getTensorDesc().getDims()[1]); - int IH = static_cast(src.getTensorDesc().getDims()[2]); - int IW = static_cast(src.getTensorDesc().getDims()[3]); - - int OH = static_cast(dst.getTensorDesc().getDims()[2]); - int OW = static_cast(dst.getTensorDesc().getDims()[3]); - - int IH_pad = IH + prm.pad_beg + prm.pad_end; - int IW_pad = IW + prm.pad_beg + prm.pad_end; - - const data_t *src_data = src.readOnly(); - data_t *dst_data = dst.data(); - - interpolate(IB, IC, src_data, -prm.pad_beg, -prm.pad_beg, IH_pad, IW_pad, IH, IW, dst_data, 0, 0, OH, OW, OH, OW); -} - -class MKLDNNCPUExtInterpTests: public TestsCommon, public WithParamInterface { - std::string model_t = R"V0G0N( - - - - - - _IN_ - _IC_ - _IH_ - _IW_ - - - - - - - - - _IN_ - _IC_ - _IH_ - _IW_ - - - - - _IN_ - _IC_ - _OH_ - _OW_ - - - - - - - - -)V0G0N"; - - std::string getModel(interp_test_params p) { - std::string model = model_t; - REPLACE_WITH_NUM(model, "_IW_", p.in.w); - REPLACE_WITH_NUM(model, "_IH_", p.in.h); - REPLACE_WITH_NUM(model, "_IC_", p.in.c); - REPLACE_WITH_NUM(model, "_IN_", p.in.n); - - REPLACE_WITH_NUM(model, "_OH_", p.out.h); - REPLACE_WITH_NUM(model, "_OW_", p.out.w); - - REPLACE_WITH_NUM(model, "_PB_", p.pad_beg); - REPLACE_WITH_NUM(model, "_PE_", p.pad_end); - return model; - } - -protected: - virtual void TearDown() { - } - - virtual void SetUp() { - try { - TestsCommon::SetUp(); - interp_test_params p = ::testing::WithParamInterface::GetParam(); - std::string model = getModel(p); - - InferenceEngine::Core core; - InferenceEngine::CNNNetwork network; - ASSERT_NO_THROW(network = core.ReadNetwork(model, InferenceEngine::Blob::CPtr())); - - MKLDNNGraphTestClass graph; - graph.CreateGraph(network); - - auto& nodes = graph.getNodes(); - nodes = graph.getNodes(); - for (auto &node : nodes) { - if (node->getName() == "interp1") { - ASSERT_LE(p.num_prim_desc, node->getSupportedPrimitiveDescriptors().size()); - for (size_t j = 0; j < p.num_prim_desc && j < p.comp.size(); j++) { - p.comp.at(j)(node->getSupportedPrimitiveDescriptors().at(j)); - } - ASSERT_NE(nullptr, node->getSelectedPrimitiveDescriptor()); - ASSERT_EQ(p.selectedType, - node->getSelectedPrimitiveDescriptor()->getImplementationType() & p.selectedType); - } - } - ASSERT_LE(4, nodes.size()); - - InferenceEngine::SizeVector dims_src = {p.in.n, p.in.c, p.in.h, p.in.w}; - - InferenceEngine::Blob::Ptr src = InferenceEngine::make_shared_blob({InferenceEngine::Precision::FP32, dims_src, InferenceEngine::NCHW}); - src->allocate(); - fill_data(src->buffer(), src->size()); - - auto * srcPtr = dynamic_cast*>(src.get()); - - if (srcPtr == nullptr) - FAIL() << "Cannot cast blob to TBlob."; - - InferenceEngine::BlobMap srcs; - srcs.insert(std::pair("in1", src)); - - InferenceEngine::OutputsDataMap out; - out = network.getOutputsInfo(); - InferenceEngine::BlobMap outputBlobs; - - std::pair item = *out.begin(); - - InferenceEngine::TBlob::Ptr output; - output = InferenceEngine::make_shared_blob(item.second->getTensorDesc()); - output->allocate(); - outputBlobs[item.first] = output; - - graph.Infer(srcs, outputBlobs); - - - InferenceEngine::TBlob dst_ref(item.second->getTensorDesc()); - dst_ref.allocate(); - ref_interp(*srcPtr, dst_ref, p); - compare(*output, dst_ref); - } catch (const InferenceEngine::details::InferenceEngineException &e) { - FAIL() << e.what(); - } - } -}; - -TEST_P(MKLDNNCPUExtInterpTests, TestsInterp) {} - -INSTANTIATE_TEST_CASE_P( - TestsInterp, MKLDNNCPUExtInterpTests, - ::testing::Values( - interp_test_params{{1, 256, 1, 1}, {33, 65}, 0, 0, 1, MKLDNNPlugin::impl_desc_type::unknown }, - interp_test_params{{6, 128, 320, 320}, {23, 38}, 0, 0, 1, MKLDNNPlugin::impl_desc_type::unknown }, - interp_test_params{{1, 2, 33, 65}, {33, 65}, 0, 0, 1, MKLDNNPlugin::impl_desc_type::unknown })); diff --git a/inference-engine/tests_deprecated/unit/engines/mkldnn/graph/layers/extensions/resample_tests.cpp b/inference-engine/tests_deprecated/unit/engines/mkldnn/graph/layers/extensions/resample_tests.cpp deleted file mode 100644 index e46a14b7f311b3..00000000000000 --- a/inference-engine/tests_deprecated/unit/engines/mkldnn/graph/layers/extensions/resample_tests.cpp +++ /dev/null @@ -1,367 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "test_graph.hpp" - -#include "single_layer_common.hpp" -#include "tests_common.hpp" -#include "ir_gen_helper.hpp" -#include - -#include - -using namespace InferenceEngine; -using namespace ::testing; -using namespace std; -using namespace single_layer_tests; - -using namespace Extensions; -using namespace ::Cpu; - -struct resample_test_params { - std::vector in_dims; - - float factor; - int antialias; - std::string type; - - size_t num_prim_desc; - bool isBlockedFormat; - int selectedType; - - std::vector> comp; -}; - - -static inline float triangleCoeff(float x) { - return max(0.0f, 1 - std::abs(x)); -} - -extern InferenceEngine::IExtensionPtr make_FakeExtensions(); - -template -void ref_resample(const InferenceEngine::TBlob &src, InferenceEngine::TBlob &dst, resample_test_params prm) { - const data_t *src_data = src.readOnly(); - data_t *dst_data = dst.data(); - - size_t ndims = prm.in_dims.size(); - - size_t N = prm.in_dims[0]; - size_t C = prm.in_dims[1]; - size_t ID = ndims == 5 ? prm.in_dims[ndims - 3] : 1; - size_t IH = prm.in_dims[ndims - 2]; - size_t IW = prm.in_dims[ndims - 1]; - size_t OD = ndims == 5 ? ID / prm.factor : 1; - size_t OH = IH / prm.factor; - size_t OW = IW / prm.factor; - - float fx = static_cast(IW) / static_cast(OW); - float fy = static_cast(IH) / static_cast(OH); - float fz = static_cast(ID) / static_cast(OD); - - if (prm.type == "caffe.ResampleParameter.NEAREST") { - for (size_t b = 0; b < N; b++) { - for (size_t c = 0; c < C; c++) { - const float *in_ptr = src_data + IW * IH * ID * C * b + IW * IH * ID * c; - float *out_ptr = dst_data + OW * OH * OD * C * b + OW * OH * OD * c; - - for (size_t oz = 0; oz < OD; oz++) { - for (size_t oy = 0; oy < OH; oy++) { - for (size_t ox = 0; ox < OW; ox++) { - float ix = ox * fx; - float iy = oy * fy; - float iz = oz * fz; - - size_t ix_r = static_cast(std::floor(ix)); - size_t iy_r = static_cast(std::floor(iy)); - size_t iz_r = static_cast(std::floor(iz)); - - out_ptr[oz * OH * OW + oy * OW + ox] = in_ptr[iz_r * IH * IW + iy_r * IW + ix_r]; - } - } - } - } - } - } else if (prm.type == "caffe.ResampleParameter.LINEAR") { - size_t kernel_width = 2; - bool isDownsample = (fx > 1) || (fy > 1) || (fz > 1); - bool antialias = isDownsample && prm.antialias; - - for (size_t b = 0; b < N; b++) { - for (size_t c = 0; c < C; c++) { - const float *in_ptr = src_data + IW * IH * ID * C * b + IW * IH * ID * c; - float *out_ptr = dst_data + OW * OH * OD * C * b + OW * OH * OD * c; - - for (size_t oz = 0; oz < OD; oz++) { - for (size_t oy = 0; oy < OH; oy++) { - for (size_t ox = 0; ox < OW; ox++) { - float ix = ox * fx + fx / 2.0f - 0.5f; - float iy = oy * fy + fy / 2.0f - 0.5f; - float iz = oz * fz + fz / 2.0f - 0.5f; - - int ix_r = static_cast(round(ix)); - int iy_r = static_cast(round(iy)); - int iz_r = static_cast(round(iz)); - - float sum = 0; - float wsum = 0; - - float ax = 1.0f / (antialias ? fx : 1.0f); - float ay = 1.0f / (antialias ? fy : 1.0f); - float az = 1.0f / (antialias ? fz : 1.0f); - - int rx = (fx < 1.0f) ? 2 : static_cast(ceil(static_cast(kernel_width) / ax)); - int ry = (fy < 1.0f) ? 2 : static_cast(ceil(static_cast(kernel_width) / ay)); - int rz = (fz < 1.0f) ? 2 : static_cast(ceil(static_cast(kernel_width) / az)); - - for (int z = iz_r - rz; z <= iz_r + rz; z++) { - for (int y = iy_r - ry; y <= iy_r + ry; y++) { - for (int x = ix_r - rx; x <= ix_r + rx; x++) { - if (z < 0 || y < 0 || x < 0 || z >= static_cast(ID) ||y >= static_cast(IH) || x >= static_cast(IW)) - continue; - - float dx = ix - x; - float dy = iy - y; - float dz = iz - z; - - float w = ax * triangleCoeff(ax * dx) * ay * triangleCoeff(ay * dy) * az * triangleCoeff(az * dz); - - sum += w * in_ptr[z * IH * IW + y * IW + x]; - wsum += w; - } - } - } - out_ptr[oz * OH * OW + oy * OW + ox] = (!wsum) ? 0 : (sum / wsum); - } - } - } - } - } - } else { - assert(!"Unsupported resample operation type"); - } -} - -class MKLDNNCPUExtResampleTests: public TestsCommon, public WithParamInterface { - std::string model_t = R"V0G0N( - - - - - - _IN_ - _IC_ - _ID_ - _IH_ - _IW_ - - - - - - - _IN_ - _IC_ - _ID_ - _IH_ - _IW_ - - - - - _IN_ - _IC_ - _ID_ - _IH_ - _IW_ - - - - - - - - _IN_ - _IC_ - _ID_ - _IH_ - _IW_ - - - - - _IN_ - _IC_ - _OD_ - _OH_ - _OW_ - - - - - - - - - -)V0G0N"; - - std::string getModel(resample_test_params p) { - std::string model = model_t; - - auto dims_size = p.in_dims.size(); - if (dims_size == 4) { - REMOVE_LINE(model, "_ID_"); - REMOVE_LINE(model, "_OD_"); - } - - if (p.isBlockedFormat) - REPLACE_WITH_STR(model, "_FL_", "FakeLayerBLK"); - else - REPLACE_WITH_STR(model, "_FL_", "FakeLayerPLN"); - - REPLACE_WITH_NUM(model, "_IN_", p.in_dims[0]); - REPLACE_WITH_NUM(model, "_IC_", p.in_dims[1]); - if (dims_size == 5) - REPLACE_WITH_NUM(model, "_ID_", p.in_dims[dims_size - 3]); - REPLACE_WITH_NUM(model, "_IH_", p.in_dims[dims_size - 2]); - REPLACE_WITH_NUM(model, "_IW_", p.in_dims[dims_size - 1]); - - if (dims_size == 5) - REPLACE_WITH_NUM(model, "_OD_", (int)(p.in_dims[dims_size - 3] / p.factor)); - REPLACE_WITH_NUM(model, "_OH_", (int)(p.in_dims[dims_size - 2] / p.factor)); - REPLACE_WITH_NUM(model, "_OW_", (int)(p.in_dims[dims_size - 1] / p.factor)); - - REPLACE_WITH_NUM(model, "_AN_", p.antialias); - REPLACE_WITH_NUM(model, "_F_", p.factor); - REPLACE_WITH_STR(model, "_T_", p.type); - - return model; - } - -protected: - virtual void TearDown() { - } - - virtual void SetUp() { - try { - TestsCommon::SetUp(); - resample_test_params p = ::testing::WithParamInterface::GetParam(); - std::string model = getModel(p); - - MKLDNNPlugin::MKLDNNExtensionManager::Ptr extMgr(new MKLDNNPlugin::MKLDNNExtensionManager()); - auto defaultExtensions = std::make_shared(); - extMgr->AddExtension(defaultExtensions); - extMgr->AddExtension(make_FakeExtensions()); - - InferenceEngine::Core core; - InferenceEngine::CNNNetwork network; - ASSERT_NO_THROW(network = core.ReadNetwork(model, InferenceEngine::Blob::CPtr())); - - MKLDNNGraphTestClass graph; - graph.CreateGraph(network, extMgr); - - auto& nodes = graph.getNodes(); - nodes = graph.getNodes(); - - for (auto &node : nodes) { - if (node->getName() == "resample") { - ASSERT_EQ(p.num_prim_desc, node->getSupportedPrimitiveDescriptors().size()); - for (size_t j = 0; j < p.num_prim_desc && j < p.comp.size(); j++) { - p.comp.at(j)(node->getSupportedPrimitiveDescriptors().at(j)); - } - ASSERT_NE(nullptr, node->getSelectedPrimitiveDescriptor()); - ASSERT_EQ(p.selectedType, - node->getSelectedPrimitiveDescriptor()->getImplementationType() & p.selectedType); - } - } - - InferenceEngine::SizeVector dims_src = p.in_dims; - - InferenceEngine::Layout layout = InferenceEngine::ANY; - switch (p.in_dims.size()) { - case 4: layout = InferenceEngine::NCHW; break; - case 5: layout = InferenceEngine::NCDHW; break; - } - - InferenceEngine::Blob::Ptr src = InferenceEngine::make_shared_blob({InferenceEngine::Precision::FP32, dims_src, layout}); - src->allocate(); - fill_data(src->buffer(), src->size()); - - auto * srcPtr = dynamic_cast*>(src.get()); - - if (srcPtr == nullptr) - FAIL() << "Cannot cast blob to TBlob."; - - InferenceEngine::BlobMap srcs; - srcs.insert(std::pair("in1", src)); - - InferenceEngine::OutputsDataMap out; - out = network.getOutputsInfo(); - InferenceEngine::BlobMap outputBlobs; - - std::pair item = *out.begin(); - - InferenceEngine::TBlob::Ptr output; - output = InferenceEngine::make_shared_blob(item.second->getTensorDesc()); - output->allocate(); - outputBlobs[item.first] = output; - - graph.Infer(srcs, outputBlobs); - - InferenceEngine::TBlob dst_ref(item.second->getTensorDesc()); - dst_ref.allocate(); - ref_resample(*srcPtr, dst_ref, p); - compare(*output, dst_ref); - } catch (const InferenceEngine::details::InferenceEngineException &e) { - FAIL() << e.what(); - } - } -}; - -TEST_P(MKLDNNCPUExtResampleTests, TestsResample) {} - -INSTANTIATE_TEST_CASE_P( - TestsResample, MKLDNNCPUExtResampleTests, - ::testing::Values( - resample_test_params{{2, 64, 15, 25}, 1.f, 0, "caffe.ResampleParameter.NEAREST", 3, false, MKLDNNPlugin::impl_desc_type::unknown }, - resample_test_params{{2, 64, 15, 25}, 1.f, 0, "caffe.ResampleParameter.NEAREST", 3, true, MKLDNNPlugin::impl_desc_type::unknown }, - resample_test_params{{2, 64, 15, 25}, 1.f, 1, "caffe.ResampleParameter.LINEAR", 1, false, MKLDNNPlugin::impl_desc_type::unknown }, - resample_test_params{{2, 64, 10, 20}, 0.25f, 0, "caffe.ResampleParameter.NEAREST", 3, false, MKLDNNPlugin::impl_desc_type::unknown }, - resample_test_params{{2, 64, 10, 20}, 0.25f, 0, "caffe.ResampleParameter.NEAREST", 3, true, MKLDNNPlugin::impl_desc_type::unknown }, - resample_test_params{{2, 64, 10, 20}, 0.25f, 1, "caffe.ResampleParameter.LINEAR", 1, false, MKLDNNPlugin::impl_desc_type::unknown }, - resample_test_params{{2, 64, 10, 20}, 4.f, 0, "caffe.ResampleParameter.NEAREST", 3, false, MKLDNNPlugin::impl_desc_type::unknown }, - resample_test_params{{2, 64, 10, 20}, 4.f, 0, "caffe.ResampleParameter.NEAREST", 3, true, MKLDNNPlugin::impl_desc_type::unknown }, - resample_test_params{{2, 64, 10, 20}, 4.f, 1, "caffe.ResampleParameter.LINEAR", 1, false, MKLDNNPlugin::impl_desc_type::unknown }, - resample_test_params{{2, 3, 15, 25}, 1.f, 0, "caffe.ResampleParameter.NEAREST", 3, false, MKLDNNPlugin::impl_desc_type::unknown }, - resample_test_params{{2, 3, 15, 25}, 1.f, 0, "caffe.ResampleParameter.NEAREST", 3, true, MKLDNNPlugin::impl_desc_type::unknown }, - resample_test_params{{2, 3, 15, 25}, 1.f, 1, "caffe.ResampleParameter.LINEAR", 1, false, MKLDNNPlugin::impl_desc_type::unknown }, - resample_test_params{{2, 3, 10, 20}, 0.25f, 0, "caffe.ResampleParameter.NEAREST", 3, false, MKLDNNPlugin::impl_desc_type::unknown }, - resample_test_params{{2, 3, 10, 20}, 0.25f, 0, "caffe.ResampleParameter.NEAREST", 3, true, MKLDNNPlugin::impl_desc_type::unknown }, - resample_test_params{{2, 3, 10, 20}, 0.25f, 1, "caffe.ResampleParameter.LINEAR", 1, false, MKLDNNPlugin::impl_desc_type::unknown }, - resample_test_params{{2, 3, 10, 20}, 4.f, 0, "caffe.ResampleParameter.NEAREST", 3, false, MKLDNNPlugin::impl_desc_type::unknown }, - resample_test_params{{2, 3, 10, 20}, 4.f, 0, "caffe.ResampleParameter.NEAREST", 3, true, MKLDNNPlugin::impl_desc_type::unknown }, - resample_test_params{{2, 3, 10, 20}, 4.f, 1, "caffe.ResampleParameter.LINEAR", 1, false, MKLDNNPlugin::impl_desc_type::unknown }, - // 5D nearest - resample_test_params{{2, 64, 20, 15, 25}, 1.f, 0, "caffe.ResampleParameter.NEAREST", 3, false, MKLDNNPlugin::impl_desc_type::unknown }, - resample_test_params{{2, 64, 20, 15, 25}, 1.f, 0, "caffe.ResampleParameter.NEAREST", 3, true, MKLDNNPlugin::impl_desc_type::unknown }, - resample_test_params{{2, 64, 15, 10, 20}, 0.25f, 0, "caffe.ResampleParameter.NEAREST", 3, false, MKLDNNPlugin::impl_desc_type::unknown }, - resample_test_params{{2, 64, 15, 10, 20}, 0.25f, 0, "caffe.ResampleParameter.NEAREST", 3, true, MKLDNNPlugin::impl_desc_type::unknown }, - resample_test_params{{2, 64, 15, 10, 20}, 4.f, 0, "caffe.ResampleParameter.NEAREST", 3, false, MKLDNNPlugin::impl_desc_type::unknown }, - resample_test_params{{2, 64, 15, 10, 20}, 4.f, 0, "caffe.ResampleParameter.NEAREST", 3, true, MKLDNNPlugin::impl_desc_type::unknown }, - resample_test_params{{2, 3, 20, 15, 25}, 1.f, 0, "caffe.ResampleParameter.NEAREST", 3, false, MKLDNNPlugin::impl_desc_type::unknown }, - resample_test_params{{2, 3, 20, 15, 25}, 1.f, 0, "caffe.ResampleParameter.NEAREST", 3, true, MKLDNNPlugin::impl_desc_type::unknown }, - resample_test_params{{2, 3, 15, 10, 20}, 0.25f, 0, "caffe.ResampleParameter.NEAREST", 3, false, MKLDNNPlugin::impl_desc_type::unknown }, - resample_test_params{{2, 3, 15, 10, 20}, 0.25f, 0, "caffe.ResampleParameter.NEAREST", 3, true, MKLDNNPlugin::impl_desc_type::unknown }, - resample_test_params{{2, 3, 15, 10, 20}, 4.f, 0, "caffe.ResampleParameter.NEAREST", 3, false, MKLDNNPlugin::impl_desc_type::unknown }, - resample_test_params{{2, 3, 15, 10, 20}, 4.f, 0, "caffe.ResampleParameter.NEAREST", 3, true, MKLDNNPlugin::impl_desc_type::unknown }, - // 5D linear - resample_test_params{{2, 15, 15, 10, 20}, 9.f, 1, "caffe.ResampleParameter.LINEAR", 1, false, MKLDNNPlugin::impl_desc_type::unknown }, - resample_test_params{{2, 15, 15, 10, 20}, 1.f, 1, "caffe.ResampleParameter.LINEAR", 1, false, MKLDNNPlugin::impl_desc_type::unknown }, - resample_test_params{{2, 15, 15, 10, 20}, 4.f, 1, "caffe.ResampleParameter.LINEAR", 1, false, MKLDNNPlugin::impl_desc_type::unknown }, - resample_test_params{{2, 2, 15, 10, 20}, 0.25f, 1, "caffe.ResampleParameter.LINEAR", 1, false, MKLDNNPlugin::impl_desc_type::unknown }, - resample_test_params{{2, 15, 15, 10, 20}, 9.f, 0, "caffe.ResampleParameter.LINEAR", 1, false, MKLDNNPlugin::impl_desc_type::unknown }, - resample_test_params{{2, 15, 15, 10, 20}, 1.f, 0, "caffe.ResampleParameter.LINEAR", 1, false, MKLDNNPlugin::impl_desc_type::unknown }, - resample_test_params{{2, 8, 15, 10, 20}, 4.f, 0, "caffe.ResampleParameter.LINEAR", 1, false, MKLDNNPlugin::impl_desc_type::unknown }, - resample_test_params{{2, 2, 15, 10, 20}, 0.25f, 0, "caffe.ResampleParameter.LINEAR", 1, false, MKLDNNPlugin::impl_desc_type::unknown })); \ No newline at end of file diff --git a/ngraph/core/src/op/interpolate.cpp b/ngraph/core/src/op/interpolate.cpp index 14b58b9381bd64..5395c08c1236f8 100644 --- a/ngraph/core/src/op/interpolate.cpp +++ b/ngraph/core/src/op/interpolate.cpp @@ -222,8 +222,8 @@ void op::v4::Interpolate::validate_and_infer_types() element::Type input_et = get_input_element_type(0); NODE_VALIDATION_CHECK(this, input_et == element::Type_t::f32 || input_et == element::Type_t::f16 || - input_et == element::Type_t::i8, - "Input element type must be f32, f16, or i8"); + input_et == element::Type_t::i8 || input_et == element::Type_t::bf16, + "Input element type must be f32, f16, bf16 or i8"); PartialShape input_shape = PartialShape(get_input_partial_shape(0)); From 291785dc1437163aabc5f584cdca988cc901874e Mon Sep 17 00:00:00 2001 From: Alina Kladieva Date: Fri, 4 Dec 2020 11:21:30 +0300 Subject: [PATCH 010/244] [tests|layer_tests_summary] Add requirements.txt (#3457) Co-authored-by: akladiev --- .../functional_test_utils/layer_tests_summary/requirements.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 inference-engine/tests/ie_test_utils/functional_test_utils/layer_tests_summary/requirements.txt diff --git a/inference-engine/tests/ie_test_utils/functional_test_utils/layer_tests_summary/requirements.txt b/inference-engine/tests/ie_test_utils/functional_test_utils/layer_tests_summary/requirements.txt new file mode 100644 index 00000000000000..60ffe02f13e36f --- /dev/null +++ b/inference-engine/tests/ie_test_utils/functional_test_utils/layer_tests_summary/requirements.txt @@ -0,0 +1 @@ +jinja2==2.11.2 From 3d668690813f92645a73c6644d5a1188c13acc77 Mon Sep 17 00:00:00 2001 From: Piotr Szmelczynski Date: Fri, 4 Dec 2020 10:13:32 +0100 Subject: [PATCH 011/244] add f64 support to ngraph serializer (#3462) * add f64 support to ngraph serializer * Create add_abc test with f64 type --- .../src/transformations/serialize.cpp | 2 + .../ir_serialization/models/add_abc_f64.xml | 112 ++++++++++++++++++ .../ir_serialization/serialize.cpp | 1 + 3 files changed, 115 insertions(+) create mode 100644 inference-engine/tests/functional/inference_engine/ir_serialization/models/add_abc_f64.xml diff --git a/inference-engine/src/transformations/src/transformations/serialize.cpp b/inference-engine/src/transformations/src/transformations/serialize.cpp index fa1f473ddab87d..33c64233bd9908 100644 --- a/inference-engine/src/transformations/src/transformations/serialize.cpp +++ b/inference-engine/src/transformations/src/transformations/serialize.cpp @@ -240,6 +240,8 @@ std::string get_output_precision_name(ngraph::Output& o) { return "FP32"; case ::ngraph::element::Type_t::bf16: return "BF16"; + case ::ngraph::element::Type_t::f64: + return "FP64"; case ::ngraph::element::Type_t::i8: return "I8"; case ::ngraph::element::Type_t::i16: diff --git a/inference-engine/tests/functional/inference_engine/ir_serialization/models/add_abc_f64.xml b/inference-engine/tests/functional/inference_engine/ir_serialization/models/add_abc_f64.xml new file mode 100644 index 00000000000000..fa68bf0a77b245 --- /dev/null +++ b/inference-engine/tests/functional/inference_engine/ir_serialization/models/add_abc_f64.xml @@ -0,0 +1,112 @@ + + + + + + + + 1 + + + + + + + + 1 + + + + + + + 1 + + + 1 + + + + + 1 + + + + + + + + 1 + + + + + + + 1 + + + 1 + + + + + 1 + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inference-engine/tests/functional/inference_engine/ir_serialization/serialize.cpp b/inference-engine/tests/functional/inference_engine/ir_serialization/serialize.cpp index 7357e7cb7135a4..70984ec0be705c 100644 --- a/inference-engine/tests/functional/inference_engine/ir_serialization/serialize.cpp +++ b/inference-engine/tests/functional/inference_engine/ir_serialization/serialize.cpp @@ -49,6 +49,7 @@ TEST_P(SerializationTest, CompareFunctions) { INSTANTIATE_TEST_CASE_P(IRSerialization, SerializationTest, testing::Values(std::make_tuple("add_abc.xml"), + std::make_tuple("add_abc_f64.xml"), std::make_tuple("split_equal_parts_2d.xml"), std::make_tuple("addmul_abc.xml"), std::make_tuple("add_abc_initializers.xml"), From 256e047ad27546785999ac1b18d14b19051b28fb Mon Sep 17 00:00:00 2001 From: Ilya Churaev Date: Fri, 4 Dec 2020 13:28:53 +0300 Subject: [PATCH 012/244] Revert "Deprecate global element types (#3444)" (#3468) * Revert "Deprecate global element types (#3444)" This reverts commit 071fb9d1c68d290450d1453ae30aeefecbd6f765. * Fixed code style --- ngraph/changes.md | 4 +- .../include/ngraph/builder/autobroadcast.hpp | 2 +- .../builder/src/builder/autobroadcast.cpp | 22 +- .../core/builder/src/builder/reduce_ops.cpp | 8 +- ngraph/core/builder/src/builder/reshape.cpp | 30 +- ngraph/core/builder/src/builder/split.cpp | 8 +- ngraph/core/include/ngraph/op/bucketize.hpp | 2 +- ngraph/core/include/ngraph/op/constant.hpp | 12 +- .../core/include/ngraph/op/lstm_sequence.hpp | 2 +- .../include/ngraph/op/non_max_suppression.hpp | 135 ++-- ngraph/core/include/ngraph/op/non_zero.hpp | 2 +- .../include/ngraph/op/scatter_nd_update.hpp | 3 +- ngraph/core/include/ngraph/op/shape_of.hpp | 3 +- ngraph/core/include/ngraph/op/topk.hpp | 10 +- .../core/include/ngraph/pattern/op/branch.hpp | 2 +- .../core/include/ngraph/pattern/op/label.hpp | 4 +- .../include/ngraph/specialize_function.hpp | 8 +- .../core/include/ngraph/type/element_type.hpp | 1 + .../reference/src/runtime/reference/loop.cpp | 12 +- .../runtime/reference/non_max_suppression.cpp | 4 +- .../src/runtime/reference/tensor_iterator.cpp | 4 +- ngraph/core/src/graph_util.cpp | 2 +- ngraph/core/src/node.cpp | 4 +- ngraph/core/src/op/broadcast.cpp | 2 +- ngraph/core/src/op/bucketize.cpp | 3 +- ngraph/core/src/op/concat.cpp | 2 +- ngraph/core/src/op/constant.cpp | 6 +- ngraph/core/src/op/cum_sum.cpp | 4 +- ngraph/core/src/op/detection_output.cpp | 4 +- ngraph/core/src/op/embedding_segments_sum.cpp | 16 +- ngraph/core/src/op/equal.cpp | 2 +- ngraph/core/src/op/fake_quantize.cpp | 4 +- ngraph/core/src/op/gather.cpp | 6 +- ngraph/core/src/op/greater.cpp | 2 +- ngraph/core/src/op/greater_eq.cpp | 2 +- ngraph/core/src/op/grn.cpp | 2 +- ngraph/core/src/op/gru_cell.cpp | 2 +- ngraph/core/src/op/gru_sequence.cpp | 2 +- ngraph/core/src/op/interpolate.cpp | 4 +- ngraph/core/src/op/less.cpp | 2 +- ngraph/core/src/op/less_eq.cpp | 2 +- ngraph/core/src/op/lrn.cpp | 2 +- ngraph/core/src/op/lstm_cell.cpp | 4 +- ngraph/core/src/op/lstm_sequence.cpp | 10 +- ngraph/core/src/op/mod.cpp | 5 +- ngraph/core/src/op/non_max_suppression.cpp | 48 +- ngraph/core/src/op/non_zero.cpp | 3 +- ngraph/core/src/op/not_equal.cpp | 2 +- ngraph/core/src/op/prior_box.cpp | 4 +- ngraph/core/src/op/prior_box_clustered.cpp | 4 +- ngraph/core/src/op/range.cpp | 4 +- ngraph/core/src/op/reduce_logical_and.cpp | 2 +- ngraph/core/src/op/reduce_logical_or.cpp | 2 +- ngraph/core/src/op/reverse.cpp | 2 +- ngraph/core/src/op/rnn_cell.cpp | 2 +- ngraph/core/src/op/rnn_sequence.cpp | 2 +- ngraph/core/src/op/select.cpp | 2 +- ngraph/core/src/op/shape_of.cpp | 7 +- ngraph/core/src/op/squeeze.cpp | 2 +- ngraph/core/src/op/strided_slice.cpp | 7 +- ngraph/core/src/op/topk.cpp | 7 +- .../core/src/op/util/arithmetic_reduction.cpp | 9 +- .../op/util/binary_elementwise_arithmetic.cpp | 2 +- .../op/util/binary_elementwise_comparison.cpp | 2 +- .../op/util/binary_elementwise_logical.cpp | 4 +- .../src/op/util/embeddingbag_offsets_base.cpp | 12 +- .../src/op/util/embeddingbag_packed_base.cpp | 4 +- ngraph/core/src/op/util/index_reduction.cpp | 4 +- ngraph/core/src/op/util/logical_reduction.cpp | 13 +- ngraph/core/src/op/util/rnn_cell_base.cpp | 2 +- ngraph/core/src/op/util/scatter_nd_base.cpp | 2 +- .../op/util/unary_elementwise_arithmetic.cpp | 2 +- ngraph/core/src/pass/convert_fp32_to_fp16.cpp | 14 +- ngraph/core/src/pattern/op/label.cpp | 3 +- ngraph/core/src/runtime/host_tensor.cpp | 2 +- ngraph/core/src/type/element_type.cpp | 22 +- ngraph/core/src/util.cpp | 52 +- .../include/onnx_import/core/tensor.hpp | 50 +- .../include/onnx_import/core/value_info.hpp | 2 +- .../include/onnx_import/op/gather.hpp | 3 +- .../include/onnx_import/op/identity.hpp | 6 +- .../include/onnx_import/utils/common.hpp | 2 +- .../frontend/onnx_import/src/op/constant.cpp | 24 +- .../onnx_import/src/op/constant_of_shape.cpp | 3 +- .../onnx_import/src/op/conv_integer.cpp | 9 +- .../onnx_import/src/op/conv_transpose.cpp | 26 +- .../frontend/onnx_import/src/op/cum_sum.cpp | 4 +- .../onnx_import/src/op/dequantize_linear.cpp | 19 +- .../src/op/global_average_pool.cpp | 2 +- .../onnx_import/src/op/global_max_pool.cpp | 2 +- .../frontend/onnx_import/src/op/hardmax.cpp | 10 +- .../onnx_import/src/op/instance_norm.cpp | 8 +- .../onnx_import/src/op/log_softmax.cpp | 3 +- ngraph/frontend/onnx_import/src/op/loop.cpp | 17 +- .../frontend/onnx_import/src/op/lp_norm.cpp | 10 +- .../frontend/onnx_import/src/op/lp_pool.cpp | 2 +- ngraph/frontend/onnx_import/src/op/lstm.cpp | 2 +- .../src/op/non_max_suppression.cpp | 6 +- .../frontend/onnx_import/src/op/non_zero.cpp | 2 +- ngraph/frontend/onnx_import/src/op/onehot.cpp | 7 +- .../src/op/org.openvinotoolkit/group_norm.cpp | 8 +- .../src/op/org.openvinotoolkit/normalize.cpp | 4 +- .../src/op/org.openvinotoolkit/prior_box.cpp | 6 +- .../src/op/org.openvinotoolkit/swish.cpp | 3 +- ngraph/frontend/onnx_import/src/op/pad.cpp | 24 +- .../onnx_import/src/op/quant_conv.cpp | 12 +- .../onnx_import/src/op/quantize_linear.cpp | 17 +- ngraph/frontend/onnx_import/src/op/reduce.cpp | 2 +- .../frontend/onnx_import/src/op/reshape.cpp | 2 +- ngraph/frontend/onnx_import/src/op/resize.cpp | 17 +- .../onnx_import/src/op/reverse_sequence.cpp | 2 +- .../onnx_import/src/op/scatter_elements.cpp | 2 +- ngraph/frontend/onnx_import/src/op/shape.cpp | 2 +- ngraph/frontend/onnx_import/src/op/size.cpp | 2 +- ngraph/frontend/onnx_import/src/op/slice.cpp | 19 +- .../frontend/onnx_import/src/op/softmax.cpp | 3 +- .../frontend/onnx_import/src/op/squeeze.cpp | 2 +- ngraph/frontend/onnx_import/src/op/tile.cpp | 3 +- ngraph/frontend/onnx_import/src/op/topk.cpp | 9 +- .../frontend/onnx_import/src/op/unsqueeze.cpp | 2 +- .../frontend/onnx_import/src/op/upsample.cpp | 20 +- .../src/utils/arg_min_max_factory.cpp | 12 +- .../frontend/onnx_import/src/utils/common.cpp | 37 +- .../onnx_import/src/utils/recurrent.cpp | 4 +- .../onnx_import/src/utils/reshape.cpp | 6 +- ngraph/python/src/pyngraph/ops/constant.cpp | 50 +- .../src/pyngraph/types/element_type.cpp | 26 +- ngraph/test/attributes.cpp | 277 ++++---- ngraph/test/backend/abc.in.cpp | 12 +- ngraph/test/backend/abs.in.cpp | 2 +- ngraph/test/backend/acos.in.cpp | 2 +- ngraph/test/backend/acosh.in.cpp | 2 +- ngraph/test/backend/add.in.cpp | 12 +- ngraph/test/backend/aliased_output.in.cpp | 4 +- ngraph/test/backend/api.in.cpp | 24 +- ngraph/test/backend/asin.in.cpp | 2 +- ngraph/test/backend/asinh.in.cpp | 2 +- ngraph/test/backend/atan.in.cpp | 2 +- ngraph/test/backend/atanh.in.cpp | 2 +- ngraph/test/backend/auto_broadcast.in.cpp | 30 +- ngraph/test/backend/batch_norm.in.cpp | 72 +-- ngraph/test/backend/broadcast.in.cpp | 141 ++--- .../backend/builder_reduce_ops_opset1.in.cpp | 14 +- ngraph/test/backend/ceiling.in.cpp | 4 +- ngraph/test/backend/comparison.in.cpp | 90 +-- ngraph/test/backend/concat.in.cpp | 246 +++---- ngraph/test/backend/constant.in.cpp | 48 +- ngraph/test/backend/convert.in.cpp | 54 +- ngraph/test/backend/convolution.in.cpp | 45 +- ngraph/test/backend/cos.in.cpp | 2 +- ngraph/test/backend/cosh.in.cpp | 2 +- ngraph/test/backend/ctc_greedy_decoder.in.cpp | 28 +- ngraph/test/backend/cum_sum.in.cpp | 38 +- ngraph/test/backend/divide.in.cpp | 60 +- ngraph/test/backend/dyn_reshape.in.cpp | 12 +- ngraph/test/backend/dynamic.in.cpp | 70 +- ngraph/test/backend/erf.in.cpp | 2 +- ngraph/test/backend/exp.in.cpp | 2 +- ngraph/test/backend/floor.in.cpp | 6 +- ngraph/test/backend/function_name.in.cpp | 4 +- ngraph/test/backend/fused_op.in.cpp | 361 +++++------ ngraph/test/backend/gather.in.cpp | 114 ++-- ngraph/test/backend/gather_nd.in.cpp | 150 ++--- ngraph/test/backend/gelu.in.cpp | 12 +- ngraph/test/backend/group_convolution.in.cpp | 24 +- ngraph/test/backend/hard_sigmoid.in.cpp | 12 +- ngraph/test/backend/interpolate.in.cpp | 9 +- ngraph/test/backend/layer_norm.in.cpp | 18 +- ngraph/test/backend/log.in.cpp | 2 +- ngraph/test/backend/log_softmax.in.cpp | 66 +- ngraph/test/backend/logical_and.in.cpp | 4 +- ngraph/test/backend/logical_not.in.cpp | 4 +- ngraph/test/backend/logical_or.in.cpp | 4 +- ngraph/test/backend/logical_xor.in.cpp | 4 +- ngraph/test/backend/lrn.in.cpp | 35 +- ngraph/test/backend/matmul.in.cpp | 156 ++--- ngraph/test/backend/maximum.in.cpp | 30 +- ngraph/test/backend/minimum.in.cpp | 12 +- ngraph/test/backend/multiple_backends.in.cpp | 20 +- ngraph/test/backend/multiple_result.in.cpp | 16 +- ngraph/test/backend/multiply.in.cpp | 8 +- ngraph/test/backend/negative.in.cpp | 6 +- ngraph/test/backend/node_name.in.cpp | 10 +- .../test/backend/non_max_suppression.in.cpp | 225 ++++--- ngraph/test/backend/non_zero.in.cpp | 24 +- ngraph/test/backend/normalize_l2.in.cpp | 64 +- ngraph/test/backend/numeric.in.cpp | 20 +- ngraph/test/backend/one_hot.in.cpp | 76 +-- ngraph/test/backend/pad.in.cpp | 324 +++++----- .../test/backend/parameter_as_output.in.cpp | 6 +- ngraph/test/backend/partial_slice.in.cpp | 18 +- ngraph/test/backend/power.in.cpp | 4 +- .../test/backend/quantize_dequantize.in.cpp | 80 +-- ngraph/test/backend/range.in.cpp | 16 +- ngraph/test/backend/reduce_max.in.cpp | 266 ++++---- ngraph/test/backend/reduce_mean.in.cpp | 112 ++-- ngraph/test/backend/reduce_min.in.cpp | 272 ++++---- ngraph/test/backend/reduce_prod.in.cpp | 272 ++++---- ngraph/test/backend/reduce_sum.in.cpp | 438 +++++++------ ngraph/test/backend/region_yolo.in.cpp | 4 +- ngraph/test/backend/relu.in.cpp | 26 +- ngraph/test/backend/reorg_yolo.in.cpp | 4 +- ngraph/test/backend/reshape.in.cpp | 104 +-- ngraph/test/backend/reverse.in.cpp | 151 +++-- ngraph/test/backend/reverse_sequence.in.cpp | 40 +- ngraph/test/backend/roi_pooling.in.cpp | 16 +- ngraph/test/backend/round.in.cpp | 24 +- ngraph/test/backend/select.in.cpp | 42 +- ngraph/test/backend/shape_of.in.cpp | 88 +-- ngraph/test/backend/sigmoid.in.cpp | 16 +- ngraph/test/backend/sign.in.cpp | 6 +- ngraph/test/backend/sin.in.cpp | 6 +- ngraph/test/backend/sinh.in.cpp | 6 +- ngraph/test/backend/slice.in.cpp | 88 +-- ngraph/test/backend/softmax.in.cpp | 42 +- ngraph/test/backend/split.in.cpp | 40 +- ngraph/test/backend/sqrt.in.cpp | 12 +- ngraph/test/backend/strided_slice.in.cpp | 31 +- ngraph/test/backend/subtract.in.cpp | 20 +- ngraph/test/backend/tan.in.cpp | 6 +- ngraph/test/backend/tanh.in.cpp | 6 +- ngraph/test/backend/tile.in.cpp | 16 +- ngraph/test/backend/topk.in.cpp | 336 +++++----- ngraph/test/backend/transpose.in.cpp | 13 +- ngraph/test/backend/unhandled_op.in.cpp | 2 +- ngraph/test/backend/validate_call.in.cpp | 62 +- ngraph/test/backend_debug_api.cpp | 20 +- ngraph/test/build_graph.cpp | 96 +-- ngraph/test/builder.cpp | 18 +- ngraph/test/builder_autobroadcast.cpp | 42 +- ngraph/test/constant.cpp | 108 ++-- ngraph/test/constant_folding.cpp | 522 ++++++++------- ngraph/test/control_dependencies.cpp | 24 +- ngraph/test/convert_u1_to_string.cpp | 2 +- ngraph/test/copy.cpp | 123 ++-- ngraph/test/dyn_elimination.cpp | 38 +- ngraph/test/element_type.cpp | 46 +- ngraph/test/eval.cpp | 598 +++++++++--------- ngraph/test/graph_rewrite.cpp | 18 +- ngraph/test/input_output_assign.cpp | 6 +- ngraph/test/matcher_pass.cpp | 8 +- ngraph/test/node_input_output.cpp | 28 +- ngraph/test/onnx/onnx_import.in.cpp | 2 +- .../test/onnx/onnx_import_controlflow.in.cpp | 10 +- ngraph/test/op.cpp | 8 +- ngraph/test/op_eval/floor_mod.cpp | 6 +- ngraph/test/op_eval/hsigmoid.cpp | 4 +- ngraph/test/op_eval/hswish.cpp | 4 +- ngraph/test/op_eval/interpolate.cpp | 30 +- ngraph/test/op_eval/matmul.cpp | 36 +- ngraph/test/op_eval/mish.cpp | 4 +- ngraph/test/op_eval/non_zero.cpp | 44 +- ngraph/test/op_eval/reduce_l1.cpp | 12 +- ngraph/test/op_eval/reduce_l2.cpp | 12 +- ngraph/test/op_eval/roi_align.cpp | 18 +- ngraph/test/op_eval/roi_pooling.cpp | 4 +- ngraph/test/op_eval/round.cpp | 8 +- ngraph/test/op_eval/softplus.cpp | 4 +- ngraph/test/op_eval/split.cpp | 24 +- ngraph/test/op_eval/strided_slice.cpp | 40 +- ngraph/test/op_eval/swish.cpp | 16 +- ngraph/test/op_eval/variadic_split.cpp | 56 +- ngraph/test/partial_shape.cpp | 46 +- ngraph/test/pass_config.cpp | 6 +- ngraph/test/pass_liveness.cpp | 2 +- ngraph/test/pass_shape_relevance.cpp | 36 +- ngraph/test/pattern.cpp | 138 ++-- ngraph/test/provenance.cpp | 49 +- ngraph/test/replace_node.cpp | 16 +- .../runtime/interpreter/int_executable.cpp | 4 +- ngraph/test/runtime/pass/dyn_elimination.cpp | 12 +- ngraph/test/runtime/pass/opset0_downgrade.cpp | 2 +- ngraph/test/runtime/pass/opset1_downgrade.cpp | 2 +- ngraph/test/runtime/pass/opset1_upgrade.cpp | 5 +- ngraph/test/specialize_function.cpp | 110 ++-- ngraph/test/tensor.cpp | 8 +- ngraph/test/type_prop/assign.cpp | 6 +- ngraph/test/type_prop/avg_pool.cpp | 96 +-- ngraph/test/type_prop/batch_norm.cpp | 180 +++--- ngraph/test/type_prop/batch_to_space.cpp | 47 +- ngraph/test/type_prop/binary_convolution.cpp | 16 +- ngraph/test/type_prop/binary_elementwise.cpp | 193 +++--- ngraph/test/type_prop/broadcast.cpp | 358 +++++------ ngraph/test/type_prop/bucketize.cpp | 49 +- ngraph/test/type_prop/clamp.cpp | 4 +- ngraph/test/type_prop/concat.cpp | 118 ++-- ngraph/test/type_prop/constant.cpp | 24 +- ngraph/test/type_prop/convert.cpp | 6 +- ngraph/test/type_prop/convolution.cpp | 493 +++++++-------- ngraph/test/type_prop/ctc_greedy_decoder.cpp | 52 +- ngraph/test/type_prop/ctc_loss.cpp | 146 +++-- .../test/type_prop/deformable_convolution.cpp | 24 +- .../type_prop/deformable_psroi_pooling.cpp | 30 +- ngraph/test/type_prop/depth_to_space.cpp | 24 +- ngraph/test/type_prop/dyn_reshape.cpp | 12 +- ngraph/test/type_prop/elu.cpp | 4 +- .../test/type_prop/embedding_segments_sum.cpp | 224 +++---- .../type_prop/embeddingbag_offsetssum.cpp | 168 +++-- .../test/type_prop/embeddingbag_packedsum.cpp | 72 +-- ngraph/test/type_prop/extractimagepatches.cpp | 54 +- ngraph/test/type_prop/fake_quantize.cpp | 34 +- ngraph/test/type_prop/gather.cpp | 35 +- ngraph/test/type_prop/gather_nd.cpp | 126 ++-- ngraph/test/type_prop/gather_tree.cpp | 42 +- ngraph/test/type_prop/grn.cpp | 8 +- ngraph/test/type_prop/group_convolution.cpp | 20 +- .../group_convolution_backprop_data.cpp | 26 +- ngraph/test/type_prop/gru_cell.cpp | 126 ++-- ngraph/test/type_prop/gru_sequence.cpp | 21 +- ngraph/test/type_prop/hard_sigmoid.cpp | 4 +- ngraph/test/type_prop/hsigmoid.cpp | 16 +- ngraph/test/type_prop/hswish.cpp | 16 +- ngraph/test/type_prop/interpolate.cpp | 54 +- ngraph/test/type_prop/log_softmax.cpp | 18 +- ngraph/test/type_prop/loop.cpp | 192 +++--- ngraph/test/type_prop/lrn.cpp | 10 +- ngraph/test/type_prop/lstm_cell.cpp | 177 +++--- ngraph/test/type_prop/lstm_sequence.cpp | 66 +- ngraph/test/type_prop/matmul.cpp | 209 +++--- ngraph/test/type_prop/max_pool.cpp | 8 +- ngraph/test/type_prop/mish.cpp | 16 +- ngraph/test/type_prop/mvn.cpp | 13 +- ngraph/test/type_prop/non_max_suppression.cpp | 329 +++++----- ngraph/test/type_prop/non_zero.cpp | 22 +- ngraph/test/type_prop/normalize.cpp | 14 +- ngraph/test/type_prop/one_hot.cpp | 68 +- ngraph/test/type_prop/pad.cpp | 70 +- ngraph/test/type_prop/parameter.cpp | 5 +- ngraph/test/type_prop/prelu.cpp | 6 +- ngraph/test/type_prop/proposal.cpp | 62 +- ngraph/test/type_prop/quantize.cpp | 108 ++-- ngraph/test/type_prop/range.cpp | 162 +++-- ngraph/test/type_prop/read_value.cpp | 4 +- ngraph/test/type_prop/reduce_l1.cpp | 12 +- ngraph/test/type_prop/reduce_l2.cpp | 12 +- ngraph/test/type_prop/reduce_prod.cpp | 12 +- ngraph/test/type_prop/reduce_sum.cpp | 12 +- ngraph/test/type_prop/reorg_yolo.cpp | 10 +- ngraph/test/type_prop/reshape.cpp | 70 +- ngraph/test/type_prop/reverse.cpp | 121 ++-- ngraph/test/type_prop/reverse_sequence.cpp | 81 ++- ngraph/test/type_prop/rnn_cell.cpp | 126 ++-- ngraph/test/type_prop/rnn_sequence.cpp | 20 +- ngraph/test/type_prop/roi_align.cpp | 38 +- ngraph/test/type_prop/roi_pooling.cpp | 54 +- ngraph/test/type_prop/round.cpp | 32 +- .../type_prop/scatter_elements_update.cpp | 56 +- ngraph/test/type_prop/scatter_nd_update.cpp | 30 +- ngraph/test/type_prop/scatter_update.cpp | 92 +-- ngraph/test/type_prop/select.cpp | 217 +++---- ngraph/test/type_prop/shape_of.cpp | 44 +- ngraph/test/type_prop/shuffle_channels.cpp | 8 +- ngraph/test/type_prop/softmax.cpp | 4 +- ngraph/test/type_prop/softplus.cpp | 16 +- ngraph/test/type_prop/space_to_batch.cpp | 47 +- ngraph/test/type_prop/space_to_depth.cpp | 20 +- ngraph/test/type_prop/split.cpp | 56 +- ngraph/test/type_prop/squared_difference.cpp | 8 +- ngraph/test/type_prop/squeeze.cpp | 26 +- ngraph/test/type_prop/strided_slice.cpp | 53 +- ngraph/test/type_prop/swish.cpp | 30 +- ngraph/test/type_prop/ti.cpp | 44 +- ngraph/test/type_prop/tile.cpp | 18 +- ngraph/test/type_prop/top_k.cpp | 22 +- ngraph/test/type_prop/transpose.cpp | 98 ++- ngraph/test/type_prop/unary_elementwise.cpp | 2 +- ngraph/test/type_prop/unsqueeze.cpp | 12 +- ngraph/test/type_prop/variadic_split.cpp | 84 ++- ngraph/test/type_prop_layers.cpp | 52 +- ngraph/test/util.cpp | 82 +-- ngraph/test/util/test_tools.cpp | 34 +- ngraph/test/util/visitor.hpp | 2 +- 372 files changed, 7629 insertions(+), 8040 deletions(-) diff --git a/ngraph/changes.md b/ngraph/changes.md index e3e7dc43922c82..bd5d3c281eff6d 100644 --- a/ngraph/changes.md +++ b/ngraph/changes.md @@ -103,9 +103,9 @@ methods have been decorated with deprecated warnings which may be enabled by set To update, remove the passed argument. For example, ```C++ // Old -make_shared(make_shared(element::Type_t::f32, Shape{2, 4})); +make_shared(make_shared(element::f32, Shape{2, 4})); // New (remove TensorViewType) -make_shared(element::Type_t::f32, Shape{2, 4}); +make_shared(element::f32, Shape{2, 4}); // Old make_shared(results, result_type, parameters); diff --git a/ngraph/core/builder/include/ngraph/builder/autobroadcast.hpp b/ngraph/core/builder/include/ngraph/builder/autobroadcast.hpp index c6b78ea4a93890..a4569cb1bf826f 100644 --- a/ngraph/core/builder/include/ngraph/builder/autobroadcast.hpp +++ b/ngraph/core/builder/include/ngraph/builder/autobroadcast.hpp @@ -169,7 +169,7 @@ namespace ngraph std::size_t start_match_axis) { auto shape_const = - op::Constant::create(element::Type_t::u64, Shape{new_shape.size()}, new_shape); + op::Constant::create(element::u64, Shape{new_shape.size()}, new_shape); return std::make_shared( value, shape_const, diff --git a/ngraph/core/builder/src/builder/autobroadcast.cpp b/ngraph/core/builder/src/builder/autobroadcast.cpp index 129c5403357fc6..9ac059f47c761f 100644 --- a/ngraph/core/builder/src/builder/autobroadcast.cpp +++ b/ngraph/core/builder/src/builder/autobroadcast.cpp @@ -177,8 +177,8 @@ namespace ngraph if (!broadcast_axes.empty()) { - auto shape_const = op::Constant::create( - element::Type_t::u64, Shape{output_shape.size()}, output_shape); + auto shape_const = + op::Constant::create(element::u64, Shape{output_shape.size()}, output_shape); broadcasted_node = make_shared( broadcasted_node, shape_const, @@ -236,8 +236,8 @@ namespace ngraph trimmed_value = builder::opset1::reshape(value, trimmed_value_shape); } - auto shape_const = op::Constant::create( - element::Type_t::u64, Shape{output_shape.size()}, output_shape); + auto shape_const = + op::Constant::create(element::u64, Shape{output_shape.size()}, output_shape); auto value_bcast = make_shared( trimmed_value, shape_const, opset1::get_axes_mapping_output(output_shape, axes)); @@ -354,8 +354,7 @@ namespace ngraph iota(begin(axes) + start_match_axis, end(axes), start_match_axis + input_shape.size()); auto axes_mapping = opset1::get_axes_mapping(output_shape, axes); - return op::Constant::create( - element::Type_t::i64, Shape{axes_mapping.size()}, axes_mapping); + return op::Constant::create(element::i64, Shape{axes_mapping.size()}, axes_mapping); } namespace opset1 @@ -435,15 +434,14 @@ namespace ngraph vector mapping(input_shape.size()); iota(begin(mapping), end(mapping), start_match_axis); - return op::Constant::create(element::Type_t::i64, Shape{mapping.size()}, mapping); + return op::Constant::create(element::i64, Shape{mapping.size()}, mapping); } Output get_axes_mapping_output(const Shape& output_shape, const AxisSet& broadcast_axes) { vector axes_mapping{get_axes_mapping(output_shape, broadcast_axes)}; - return op::Constant::create( - element::Type_t::i64, Shape{axes_mapping.size()}, axes_mapping); + return op::Constant::create(element::i64, Shape{axes_mapping.size()}, axes_mapping); } Output make_broadcast(const Output& node, @@ -452,8 +450,7 @@ namespace ngraph { return make_shared( node, - op::Constant::create( - element::Type_t::i64, Shape{target_shape.size()}, target_shape), + op::Constant::create(element::i64, Shape{target_shape.size()}, target_shape), get_axes_mapping_output(target_shape, broadcast_axes)); } @@ -463,8 +460,7 @@ namespace ngraph { return make_shared( node, - op::Constant::create( - element::Type_t::i64, Shape{target_shape.size()}, target_shape), + op::Constant::create(element::i64, Shape{target_shape.size()}, target_shape), get_axes_mapping_output(target_shape, node.get_shape(), start_match_axis)); } diff --git a/ngraph/core/builder/src/builder/reduce_ops.cpp b/ngraph/core/builder/src/builder/reduce_ops.cpp index 305171c2baf2bf..ede1e90bce0d3c 100644 --- a/ngraph/core/builder/src/builder/reduce_ops.cpp +++ b/ngraph/core/builder/src/builder/reduce_ops.cpp @@ -49,10 +49,10 @@ namespace ngraph const auto dim_values = std::make_shared( value_shape, reduction_axes, - ngraph::opset1::Constant::create(element::Type_t::i64, {}, {0})); + ngraph::opset1::Constant::create(element::i64, {}, {0})); return std::make_shared( - dim_values, ngraph::opset1::Constant::create(element::Type_t::i64, {}, {0})); + dim_values, ngraph::opset1::Constant::create(element::i64, {}, {0})); } std::shared_ptr builder::opset1::mean(const Output& value, @@ -62,7 +62,7 @@ namespace ngraph std::shared_ptr elems_number; const auto value_elem_type = value.get_element_type(); const auto reduction_axes_const = ngraph::opset1::Constant::create( - element::Type_t::i64, Shape{reduction_axes.size()}, reduction_axes.to_vector()); + element::i64, Shape{reduction_axes.size()}, reduction_axes.to_vector()); const auto value_elems_sum = std::make_shared(value, reduction_axes_const, keep_dims); if (value.get_partial_shape().is_static()) @@ -109,7 +109,7 @@ namespace ngraph diff = std::make_shared( std::make_shared(diff, diff), ngraph::opset1::Constant::create( - element::Type_t::i64, Shape{reduction_axes.size()}, reduction_axes.to_vector()), + element::i64, Shape{reduction_axes.size()}, reduction_axes.to_vector()), false); const auto& et = value.get_element_type(); diff --git a/ngraph/core/builder/src/builder/reshape.cpp b/ngraph/core/builder/src/builder/reshape.cpp index fe5500ad9ec170..cc52942cea5e33 100644 --- a/ngraph/core/builder/src/builder/reshape.cpp +++ b/ngraph/core/builder/src/builder/reshape.cpp @@ -47,13 +47,13 @@ shared_ptr builder::opset1::reshape(const Output& value, const Shape auto value_rank = value.get_shape().size(); AxisVector axes_vector(value_rank); std::iota(axes_vector.begin(), axes_vector.end(), 0); - auto axes = op::Constant::create(element::Type_t::i64, Shape{value_rank}, axes_vector); + auto axes = op::Constant::create(element::i64, Shape{value_rank}, axes_vector); return std::make_shared(value, axes); } else { auto out_pattern = op::Constant::create( - element::Type_t::i64, Shape{shape.size()}, vector(shape.begin(), shape.end())); + element::i64, Shape{shape.size()}, vector(shape.begin(), shape.end())); return make_shared(value, out_pattern, false) ->add_provenance_group_members_above({value}); @@ -63,7 +63,7 @@ shared_ptr builder::opset1::reshape(const Output& value, const Shape shared_ptr builder::opset1::reorder_axes(const Output& value, vector axes_order) { const auto axes_order_const = - op::Constant::create(element::Type_t::i64, + op::Constant::create(element::i64, Shape{axes_order.size()}, vector(axes_order.begin(), axes_order.end())); return make_shared(value, axes_order_const) @@ -83,7 +83,7 @@ shared_ptr builder::opset1::transpose(const Output& value) const auto input_rank = std::make_shared(std::make_shared(value)); - const auto neg_one = ngraph::opset1::Constant::create(element::Type_t::i64, Shape{}, {-1}); + const auto neg_one = ngraph::opset1::Constant::create(element::i64, Shape{}, {-1}); const auto start_node = std::make_shared(input_rank, neg_one); const auto reverse_axes_order = std::make_shared(reshape(start_node, Shape{}), // start @@ -114,7 +114,7 @@ namespace ngraph get_normalized_axis_node(const std::shared_ptr node_rank, int64_t axis) { auto axis_node = - ngraph::opset1::Constant::create(element::Type_t::i64, Shape{1}, {axis}); + ngraph::opset1::Constant::create(element::i64, Shape{1}, {axis}); // shortcut for alredy positive value if (axis >= 0) { @@ -138,11 +138,11 @@ shared_ptr builder::opset1::flatten(const Output& value, int axis) shared_ptr output_shape; if (axis == 0) { - output_shape = ngraph::opset1::Constant::create(element::Type_t::i64, Shape{2}, {1, -1}); + output_shape = ngraph::opset1::Constant::create(element::i64, Shape{2}, {1, -1}); } else if (axis == 1) { - output_shape = ngraph::opset1::Constant::create(element::Type_t::i64, Shape{2}, {0, -1}); + output_shape = ngraph::opset1::Constant::create(element::i64, Shape{2}, {0, -1}); } else { @@ -152,15 +152,15 @@ shared_ptr builder::opset1::flatten(const Output& value, int axis) const auto first_part_dims = make_shared( value_shape, - ngraph::opset1::Constant::create(element::Type_t::i64, {1}, {0}), + ngraph::opset1::Constant::create(element::i64, {1}, {0}), axis_node, vector{}, vector{}); const auto first_part_dims_length = make_shared( - first_part_dims, ngraph::opset1::Constant::create(element::Type_t::i64, {}, {0}), true); + first_part_dims, ngraph::opset1::Constant::create(element::i64, {}, {0}), true); const auto remaining_part_length = - ngraph::opset1::Constant::create(element::Type_t::i64, {1}, {-1}); + ngraph::opset1::Constant::create(element::i64, {1}, {-1}); output_shape = make_shared( OutputVector{first_part_dims_length, remaining_part_length}, 0); @@ -230,21 +230,19 @@ shared_ptr builder::opset1::collapse(const Output& value, const auto rank = make_shared(shape); // Split lengths used in VariadicSplit - const auto start_axis_node = - ngraph::opset1::Constant::create(element::Type_t::i64, {1}, {start_axis}); - const auto end_axis_node = - ngraph::opset1::Constant::create(element::Type_t::i64, {1}, {end_axis + 1}); + const auto start_axis_node = ngraph::opset1::Constant::create(element::i64, {1}, {start_axis}); + const auto end_axis_node = ngraph::opset1::Constant::create(element::i64, {1}, {end_axis + 1}); const auto collapsed_axis = make_shared(end_axis_node, start_axis_node); const auto post_axis = make_shared(rank, end_axis_node); const auto split_lengths = make_shared( OutputVector{start_axis_node, collapsed_axis, post_axis}, 0); - const auto split_axis = ngraph::opset1::Constant::create(element::Type_t::i64, {}, {0}); + const auto split_axis = ngraph::opset1::Constant::create(element::i64, {}, {0}); const auto split_node = make_shared(shape, split_axis, split_lengths); - const auto reduced_axis = ngraph::opset1::Constant::create(element::Type_t::i64, {1}, {0}); + const auto reduced_axis = ngraph::opset1::Constant::create(element::i64, {1}, {0}); const auto collapsed_axis_size = make_shared(split_node->output(1), reduced_axis, true); diff --git a/ngraph/core/builder/src/builder/split.cpp b/ngraph/core/builder/src/builder/split.cpp index 3e47f07a2e5d12..7b254d3f0759b4 100644 --- a/ngraph/core/builder/src/builder/split.cpp +++ b/ngraph/core/builder/src/builder/split.cpp @@ -25,9 +25,9 @@ OutputVector builder::opset1::split(const Output& value, const std::vector& split_lengths, int64_t axis) { - const auto axis_node = ngraph::opset1::Constant::create(element::Type_t::i64, Shape{}, {axis}); - const auto split_lengths_node = ngraph::opset1::Constant::create( - element::Type_t::u64, Shape{split_lengths.size()}, split_lengths); + const auto axis_node = ngraph::opset1::Constant::create(element::i64, Shape{}, {axis}); + const auto split_lengths_node = + ngraph::opset1::Constant::create(element::u64, Shape{split_lengths.size()}, split_lengths); const auto variadic_split = std::make_shared(value, axis_node, split_lengths_node); @@ -36,7 +36,7 @@ OutputVector builder::opset1::split(const Output& value, OutputVector builder::opset1::split(const Output& value, size_t num_splits, int64_t axis) { - const auto axis_node = ngraph::opset1::Constant::create(element::Type_t::i64, Shape{}, {axis}); + const auto axis_node = ngraph::opset1::Constant::create(element::i64, Shape{}, {axis}); const auto split = std::make_shared(value, axis_node, num_splits); return split->outputs(); diff --git a/ngraph/core/include/ngraph/op/bucketize.hpp b/ngraph/core/include/ngraph/op/bucketize.hpp index 5449da11a7900d..1d9452aeb4d3f1 100644 --- a/ngraph/core/include/ngraph/op/bucketize.hpp +++ b/ngraph/core/include/ngraph/op/bucketize.hpp @@ -40,7 +40,7 @@ namespace ngraph /// edge of interval. default true = includes right edge Bucketize(const Output& data, const Output& buckets, - const element::Type output_type = element::Type_t::i64, + const element::Type output_type = element::i64, const bool with_right_bound = true); virtual void validate_and_infer_types() override; diff --git a/ngraph/core/include/ngraph/op/constant.hpp b/ngraph/core/include/ngraph/op/constant.hpp index 22c90b3e383f4c..f5e97b71f03c57 100644 --- a/ngraph/core/include/ngraph/op/constant.hpp +++ b/ngraph/core/include/ngraph/op/constant.hpp @@ -273,31 +273,31 @@ namespace ngraph } /// \brief Returns the value of the constant node as a Shape object - /// Can only be used on element::Type_t::i64 nodes and interprets + /// Can only be used on element::i64 nodes and interprets /// negative values as zeros. Shape get_shape_val() const; /// \brief Returns the value of the constant node as a Strides /// object - /// Can only be used on element::Type_t::i64 nodes and interprets + /// Can only be used on element::i64 nodes and interprets /// negative values as zeros. Strides get_strides_val() const; /// \brief Returns the value of the constant node as a Coordinate /// object - /// Can only be used on element::Type_t::i64 nodes and interprets + /// Can only be used on element::i64 nodes and interprets /// negative values as zeros. Coordinate get_coordinate_val() const; /// \brief Returns the value of the constant node as a /// CoordinateDiff object - /// Can only be used on element::Type_t::i64 nodes. + /// Can only be used on element::i64 nodes. CoordinateDiff get_coordinate_diff_val() const; /// \brief Returns the value of the constant node as an AxisVector /// object - /// Can only be used on element::Type_t::i64 nodes and interprets + /// Can only be used on element::i64 nodes and interprets /// negative values as zeros. AxisVector get_axis_vector_val() const; /// \brief Returns the value of the constant node as an AxisSet /// object - /// Can only be used on element::Type_t::i64 nodes and interprets + /// Can only be used on element::i64 nodes and interprets /// negative values as zeros. /// Repeated values are allowed. AxisSet get_axis_set_val() const; diff --git a/ngraph/core/include/ngraph/op/lstm_sequence.hpp b/ngraph/core/include/ngraph/op/lstm_sequence.hpp index fd7a946c10304a..81cf782ac40768 100644 --- a/ngraph/core/include/ngraph/op/lstm_sequence.hpp +++ b/ngraph/core/include/ngraph/op/lstm_sequence.hpp @@ -117,7 +117,7 @@ namespace ngraph R, B, Constant::create( - element::Type_t::f32, + element::f32, Shape{(lstm_direction == direction::BIDIRECTIONAL ? 2UL : 1UL), 3UL * static_cast(hidden_size)}, std::vector{0.f}), diff --git a/ngraph/core/include/ngraph/op/non_max_suppression.hpp b/ngraph/core/include/ngraph/op/non_max_suppression.hpp index 0154cf3733f355..b6a93610f62a3d 100644 --- a/ngraph/core/include/ngraph/op/non_max_suppression.hpp +++ b/ngraph/core/include/ngraph/op/non_max_suppression.hpp @@ -125,15 +125,14 @@ namespace ngraph /// \param sort_result_descending Specifies whether it is necessary to sort selected /// boxes across batches /// \param output_type Specifies the output tensor type - NonMaxSuppression( - const Output& boxes, - const Output& scores, - const Output& max_output_boxes_per_class, - const Output& iou_threshold, - const Output& score_threshold, - const BoxEncodingType box_encoding = BoxEncodingType::CORNER, - const bool sort_result_descending = true, - const ngraph::element::Type& output_type = ngraph::element::Type_t::i64); + NonMaxSuppression(const Output& boxes, + const Output& scores, + const Output& max_output_boxes_per_class, + const Output& iou_threshold, + const Output& score_threshold, + const BoxEncodingType box_encoding = BoxEncodingType::CORNER, + const bool sort_result_descending = true, + const ngraph::element::Type& output_type = ngraph::element::i64); /// \brief Constructs a NonMaxSuppression operation with default values for the last /// 3 inputs @@ -144,12 +143,11 @@ namespace ngraph /// \param sort_result_descending Specifies whether it is necessary to sort selected /// boxes across batches /// \param output_type Specifies the output tensor type - NonMaxSuppression( - const Output& boxes, - const Output& scores, - const BoxEncodingType box_encoding = BoxEncodingType::CORNER, - const bool sort_result_descending = true, - const ngraph::element::Type& output_type = ngraph::element::Type_t::i64); + NonMaxSuppression(const Output& boxes, + const Output& scores, + const BoxEncodingType box_encoding = BoxEncodingType::CORNER, + const bool sort_result_descending = true, + const ngraph::element::Type& output_type = ngraph::element::i64); bool visit_attributes(AttributeVisitor& visitor) override; void validate_and_infer_types() override; @@ -178,7 +176,7 @@ namespace ngraph protected: BoxEncodingType m_box_encoding = BoxEncodingType::CORNER; bool m_sort_result_descending = true; - ngraph::element::Type m_output_type = ngraph::element::Type_t::i64; + ngraph::element::Type m_output_type = ngraph::element::i64; void validate(); int64_t max_boxes_output_from_input() const; }; @@ -207,15 +205,14 @@ namespace ngraph /// \param sort_result_descending Specifies whether it is necessary to sort selected /// boxes across batches /// \param output_type Specifies the output tensor type - NonMaxSuppression( - const Output& boxes, - const Output& scores, - const Output& max_output_boxes_per_class, - const Output& iou_threshold, - const Output& score_threshold, - const BoxEncodingType box_encoding = BoxEncodingType::CORNER, - const bool sort_result_descending = true, - const ngraph::element::Type& output_type = ngraph::element::Type_t::i64); + NonMaxSuppression(const Output& boxes, + const Output& scores, + const Output& max_output_boxes_per_class, + const Output& iou_threshold, + const Output& score_threshold, + const BoxEncodingType box_encoding = BoxEncodingType::CORNER, + const bool sort_result_descending = true, + const ngraph::element::Type& output_type = ngraph::element::i64); /// \brief Constructs a NonMaxSuppression operation with default values for the last /// 3 inputs @@ -226,12 +223,11 @@ namespace ngraph /// \param sort_result_descending Specifies whether it is necessary to sort selected /// boxes across batches /// \param output_type Specifies the output tensor type - NonMaxSuppression( - const Output& boxes, - const Output& scores, - const BoxEncodingType box_encoding = BoxEncodingType::CORNER, - const bool sort_result_descending = true, - const ngraph::element::Type& output_type = ngraph::element::Type_t::i64); + NonMaxSuppression(const Output& boxes, + const Output& scores, + const BoxEncodingType box_encoding = BoxEncodingType::CORNER, + const bool sort_result_descending = true, + const ngraph::element::Type& output_type = ngraph::element::i64); void validate_and_infer_types() override; @@ -265,12 +261,11 @@ namespace ngraph /// \param sort_result_descending Specifies whether it is necessary to sort selected /// boxes across batches /// \param output_type Specifies the output tensor type - NonMaxSuppression( - const Output& boxes, - const Output& scores, - const BoxEncodingType box_encoding = BoxEncodingType::CORNER, - const bool sort_result_descending = true, - const ngraph::element::Type& output_type = ngraph::element::Type_t::i64); + NonMaxSuppression(const Output& boxes, + const Output& scores, + const BoxEncodingType box_encoding = BoxEncodingType::CORNER, + const bool sort_result_descending = true, + const ngraph::element::Type& output_type = ngraph::element::i64); /// \brief Constructs a NonMaxSuppression operation with default values in the last. /// 3 inputs. @@ -283,13 +278,12 @@ namespace ngraph /// \param sort_result_descending Specifies whether it is necessary to sort selected /// boxes across batches /// \param output_type Specifies the output tensor type - NonMaxSuppression( - const Output& boxes, - const Output& scores, - const Output& max_output_boxes_per_class, - const BoxEncodingType box_encoding = BoxEncodingType::CORNER, - const bool sort_result_descending = true, - const ngraph::element::Type& output_type = ngraph::element::Type_t::i64); + NonMaxSuppression(const Output& boxes, + const Output& scores, + const Output& max_output_boxes_per_class, + const BoxEncodingType box_encoding = BoxEncodingType::CORNER, + const bool sort_result_descending = true, + const ngraph::element::Type& output_type = ngraph::element::i64); /// \brief Constructs a NonMaxSuppression operation with default values in the last. /// 2 inputs. @@ -303,14 +297,13 @@ namespace ngraph /// \param sort_result_descending Specifies whether it is necessary to sort selected /// boxes across batches /// \param output_type Specifies the output tensor type - NonMaxSuppression( - const Output& boxes, - const Output& scores, - const Output& max_output_boxes_per_class, - const Output& iou_threshold, - const BoxEncodingType box_encoding = BoxEncodingType::CORNER, - const bool sort_result_descending = true, - const ngraph::element::Type& output_type = ngraph::element::Type_t::i64); + NonMaxSuppression(const Output& boxes, + const Output& scores, + const Output& max_output_boxes_per_class, + const Output& iou_threshold, + const BoxEncodingType box_encoding = BoxEncodingType::CORNER, + const bool sort_result_descending = true, + const ngraph::element::Type& output_type = ngraph::element::i64); /// \brief Constructs a NonMaxSuppression operation with default value in the last. /// input. @@ -325,15 +318,14 @@ namespace ngraph /// \param sort_result_descending Specifies whether it is necessary to sort selected /// boxes across batches /// \param output_type Specifies the output tensor type - NonMaxSuppression( - const Output& boxes, - const Output& scores, - const Output& max_output_boxes_per_class, - const Output& iou_threshold, - const Output& score_threshold, - const BoxEncodingType box_encoding = BoxEncodingType::CORNER, - const bool sort_result_descending = true, - const ngraph::element::Type& output_type = ngraph::element::Type_t::i64); + NonMaxSuppression(const Output& boxes, + const Output& scores, + const Output& max_output_boxes_per_class, + const Output& iou_threshold, + const Output& score_threshold, + const BoxEncodingType box_encoding = BoxEncodingType::CORNER, + const bool sort_result_descending = true, + const ngraph::element::Type& output_type = ngraph::element::i64); /// \brief Constructs a NonMaxSuppression operation. /// @@ -348,16 +340,15 @@ namespace ngraph /// \param sort_result_descending Specifies whether it is necessary to sort selected /// boxes across batches /// \param output_type Specifies the output tensor type - NonMaxSuppression( - const Output& boxes, - const Output& scores, - const Output& max_output_boxes_per_class, - const Output& iou_threshold, - const Output& score_threshold, - const Output& soft_nms_sigma, - const BoxEncodingType box_encoding = BoxEncodingType::CORNER, - const bool sort_result_descending = true, - const ngraph::element::Type& output_type = ngraph::element::Type_t::i64); + NonMaxSuppression(const Output& boxes, + const Output& scores, + const Output& max_output_boxes_per_class, + const Output& iou_threshold, + const Output& score_threshold, + const Output& soft_nms_sigma, + const BoxEncodingType box_encoding = BoxEncodingType::CORNER, + const bool sort_result_descending = true, + const ngraph::element::Type& output_type = ngraph::element::i64); bool visit_attributes(AttributeVisitor& visitor) override; void validate_and_infer_types() override; @@ -391,7 +382,7 @@ namespace ngraph protected: BoxEncodingType m_box_encoding = BoxEncodingType::CORNER; bool m_sort_result_descending = true; - ngraph::element::Type m_output_type = ngraph::element::Type_t::i64; + ngraph::element::Type m_output_type = ngraph::element::i64; void validate(); }; } // namespace v5 diff --git a/ngraph/core/include/ngraph/op/non_zero.hpp b/ngraph/core/include/ngraph/op/non_zero.hpp index 2f0053431f6502..9f7886c79c3cec 100644 --- a/ngraph/core/include/ngraph/op/non_zero.hpp +++ b/ngraph/core/include/ngraph/op/non_zero.hpp @@ -74,7 +74,7 @@ namespace ngraph const HostTensorVector& inputs) const override; protected: - element::Type m_output_type = element::Type_t::i64; + element::Type m_output_type = element::i64; }; } using v3::NonZero; diff --git a/ngraph/core/include/ngraph/op/scatter_nd_update.hpp b/ngraph/core/include/ngraph/op/scatter_nd_update.hpp index 5df323666bee62..1894704416007a 100644 --- a/ngraph/core/include/ngraph/op/scatter_nd_update.hpp +++ b/ngraph/core/include/ngraph/op/scatter_nd_update.hpp @@ -33,8 +33,7 @@ namespace ngraph const NodeTypeInfo& get_type_info() const override { return type_info; } ScatterNDUpdate() = default; /// \param inputs Tensor - /// \param indices Index tensor: Data type must be `element::Type_t::i32` or - /// `element::Type_t::i64` + /// \param indices Index tensor: Data type must be `element::i32` or `element::i64` /// \param updates Tensor: Must have same type as inputs ScatterNDUpdate(const Output& inputs, const Output& indices, diff --git a/ngraph/core/include/ngraph/op/shape_of.hpp b/ngraph/core/include/ngraph/op/shape_of.hpp index cc322eafb8db4c..38aa6d3b31ceb9 100644 --- a/ngraph/core/include/ngraph/op/shape_of.hpp +++ b/ngraph/core/include/ngraph/op/shape_of.hpp @@ -32,8 +32,7 @@ namespace ngraph const NodeTypeInfo& get_type_info() const override { return type_info; } ShapeOf() = default; /// \brief Constructs a shape-of operation. - ShapeOf(const Output& arg, - const element::Type output_type = element::Type_t::i64); + ShapeOf(const Output& arg, const element::Type output_type = element::i64); bool visit_attributes(AttributeVisitor& visitor) override; virtual std::shared_ptr diff --git a/ngraph/core/include/ngraph/op/topk.hpp b/ngraph/core/include/ngraph/op/topk.hpp index c35830b7e2553a..8a6b13da13de96 100644 --- a/ngraph/core/include/ngraph/op/topk.hpp +++ b/ngraph/core/include/ngraph/op/topk.hpp @@ -57,14 +57,14 @@ namespace ngraph const int64_t axis, const std::string& mode, const std::string& sort, - const element::Type& index_element_type = element::Type_t::i32); + const element::Type& index_element_type = element::i32); TopK(const Output& data, const Output& k, const int64_t axis, const Mode mode, const SortType sort, - const element::Type& index_element_type = element::Type_t::i32); + const element::Type& index_element_type = element::i32); bool visit_attributes(AttributeVisitor& visitor) override; void validate_and_infer_types() override; @@ -104,7 +104,7 @@ namespace ngraph uint64_t m_normalized_axis; Mode m_mode; SortType m_sort; - element::Type m_index_element_type{element::Type_t::i32}; + element::Type m_index_element_type{element::i32}; virtual size_t read_k_from_constant_node(const std::shared_ptr& node, const element::Type& k_element_type) const; @@ -146,14 +146,14 @@ namespace ngraph const int64_t axis, const std::string& mode, const std::string& sort, - const element::Type& index_element_type = element::Type_t::i32); + const element::Type& index_element_type = element::i32); TopK(const Output& data, const Output& k, const int64_t axis, const Mode mode, const SortType sort, - const element::Type& index_element_type = element::Type_t::i32); + const element::Type& index_element_type = element::i32); bool visit_attributes(AttributeVisitor& visitor) override; void validate_and_infer_types() override; virtual std::shared_ptr diff --git a/ngraph/core/include/ngraph/pattern/op/branch.hpp b/ngraph/core/include/ngraph/pattern/op/branch.hpp index d73f6baa0a7e18..4afcd128af8d07 100644 --- a/ngraph/core/include/ngraph/pattern/op/branch.hpp +++ b/ngraph/core/include/ngraph/pattern/op/branch.hpp @@ -44,7 +44,7 @@ namespace ngraph Branch() : Pattern(OutputVector{}) { - set_output_type(0, element::Type_t::f32, Shape{}); + set_output_type(0, element::f32, Shape{}); } void set_destination(const Output& destination) diff --git a/ngraph/core/include/ngraph/pattern/op/label.hpp b/ngraph/core/include/ngraph/pattern/op/label.hpp index 9ced55996a020a..e172f9702828fd 100644 --- a/ngraph/core/include/ngraph/pattern/op/label.hpp +++ b/ngraph/core/include/ngraph/pattern/op/label.hpp @@ -47,7 +47,7 @@ namespace ngraph /// Example: /// \code{.cpp} /// auto add = a + b; // a and b are op::Parameter in this example - /// auto label = std::make_shared(element::Type_t::f32, + /// auto label = std::make_shared(element::f32, /// Shape{2,2}, /// nullptr, /// OutputVector{add}); @@ -61,7 +61,7 @@ namespace ngraph set_output_type(0, type, s); } - explicit Label(const element::Type& type = element::Type_t::dynamic, + explicit Label(const element::Type& type = element::dynamic, const PartialShape& s = PartialShape::dynamic()) : Label(type, s, [](const Output&) { return true; }, OutputVector()) { diff --git a/ngraph/core/include/ngraph/specialize_function.hpp b/ngraph/core/include/ngraph/specialize_function.hpp index 820d6fc5a44c23..2270e132a8baed 100644 --- a/ngraph/core/include/ngraph/specialize_function.hpp +++ b/ngraph/core/include/ngraph/specialize_function.hpp @@ -76,12 +76,10 @@ namespace ngraph /// because when we reconstruct the new x node, it will see that the shapes are inconsistent /// for elementwise add. /// - /// Specialization of element types is also possible: `element::Type_t::dynamic` can be - /// specialized + /// Specialization of element types is also possible: `element::dynamic` can be specialized /// to a concrete element type or left dynamic; but a concrete element type can only be - /// specialized to itself (e.g., specialization does not allow you to change - /// `element::Type_t::i32` - /// to `element::Type_t::i64`). + /// specialized to itself (e.g., specialization does not allow you to change `element::i32` + /// to `element::i64`). /// /// Finally, it is possible to specialize parameter values. If the ith element of /// `parameter_values` is not `nullptr`, and fully static element type and shape has been diff --git a/ngraph/core/include/ngraph/type/element_type.hpp b/ngraph/core/include/ngraph/type/element_type.hpp index 1469a655272270..e29bb7c0d1e99d 100644 --- a/ngraph/core/include/ngraph/type/element_type.hpp +++ b/ngraph/core/include/ngraph/type/element_type.hpp @@ -91,6 +91,7 @@ namespace ngraph // The name of this type, the enum name of this type const std::string& get_type_name() const; friend NGRAPH_API std::ostream& operator<<(std::ostream&, const Type&); + static std::vector get_known_types(); /// \brief Checks whether this element type is merge-compatible with `t`. /// \param t The element type to compare this element type to. diff --git a/ngraph/core/reference/src/runtime/reference/loop.cpp b/ngraph/core/reference/src/runtime/reference/loop.cpp index d520387838a715..9731e8a659ad1a 100644 --- a/ngraph/core/reference/src/runtime/reference/loop.cpp +++ b/ngraph/core/reference/src/runtime/reference/loop.cpp @@ -49,8 +49,8 @@ namespace ngraph input_descs.size() + (cur_iter_idx >= 0 ? !cur_iter_initial_value_exist : 0); HostTensorVector inputs_to_body; for (int64_t i = 0; i < inputs_count; ++i) - inputs_to_body.push_back(std::make_shared(element::Type_t::dynamic, - PartialShape::dynamic())); + inputs_to_body.push_back( + std::make_shared(element::dynamic, PartialShape::dynamic())); if (cur_iter_idx >= 0 && !cur_iter_initial_value_exist) { const auto& cur_iter = func->get_parameters().at(cur_iter_idx); @@ -90,12 +90,12 @@ namespace ngraph // Get TripCount int64_t trip_count = 0; - if (args[0]->get_element_type() == ngraph::element::Type_t::i32) + if (args[0]->get_element_type() == ngraph::element::i32) { auto* trip_count_p = args[0]->get_data_ptr(); trip_count = trip_count_p[0]; } - else if (args[0]->get_element_type() == ngraph::element::Type_t::i64) + else if (args[0]->get_element_type() == ngraph::element::i64) { auto* trip_count_p = args[0]->get_data_ptr(); trip_count = trip_count_p[0]; @@ -204,10 +204,10 @@ namespace ngraph { const auto& cur_iter_param = func->get_parameters().at(cur_iter_idx); int64_t iter_num = cur_iter + 1; - if (cur_iter_param->get_element_type() == element::Type_t::i64) + if (cur_iter_param->get_element_type() == element::i64) inputs_to_body.at(cur_iter_idx) ->write(&iter_num, cur_iter_param->get_element_type().size()); - else if (cur_iter_param->get_element_type() == element::Type_t::i32) + else if (cur_iter_param->get_element_type() == element::i32) { int32_t iter_num_i32 = static_cast(iter_num); inputs_to_body.at(cur_iter_idx) diff --git a/ngraph/core/reference/src/runtime/reference/non_max_suppression.cpp b/ngraph/core/reference/src/runtime/reference/non_max_suppression.cpp index 8c950c0b807215..55719a597ccc65 100644 --- a/ngraph/core/reference/src/runtime/reference/non_max_suppression.cpp +++ b/ngraph/core/reference/src/runtime/reference/non_max_suppression.cpp @@ -326,7 +326,7 @@ namespace ngraph size_t selected_size = valid_outputs * 3; - if (output_type == ngraph::element::Type_t::i64) + if (output_type == ngraph::element::i64) { int64_t* indices_ptr = outputs[0]->get_data_ptr(); memcpy(indices_ptr, selected_indices.data(), selected_size * sizeof(int64_t)); @@ -381,7 +381,7 @@ namespace ngraph return; } - if (output_type == ngraph::element::Type_t::i64) + if (output_type == ngraph::element::i64) { int64_t* valid_outputs_ptr = outputs[2]->get_data_ptr(); *valid_outputs_ptr = valid_outputs; diff --git a/ngraph/core/reference/src/runtime/reference/tensor_iterator.cpp b/ngraph/core/reference/src/runtime/reference/tensor_iterator.cpp index c6e12f562b8e87..08f80cd70f6aed 100644 --- a/ngraph/core/reference/src/runtime/reference/tensor_iterator.cpp +++ b/ngraph/core/reference/src/runtime/reference/tensor_iterator.cpp @@ -35,8 +35,8 @@ namespace ngraph { HostTensorVector inputs_to_body; for (int64_t i = 0; i < input_descs.size(); ++i) - inputs_to_body.push_back(std::make_shared(element::Type_t::dynamic, - PartialShape::dynamic())); + inputs_to_body.push_back( + std::make_shared(element::dynamic, PartialShape::dynamic())); // Port map processing: inputs and back edges struct BackEdge diff --git a/ngraph/core/src/graph_util.cpp b/ngraph/core/src/graph_util.cpp index 688eeabf80b821..e3f4a9ebabad7b 100644 --- a/ngraph/core/src/graph_util.cpp +++ b/ngraph/core/src/graph_util.cpp @@ -587,7 +587,7 @@ std::shared_ptr ngraph::make_zero(const element::Type& element_type, const if (shape.size() > 0) { return std::make_shared( - zero, op::Constant::create(element::Type_t::u64, Shape{shape.size()}, shape)); + zero, op::Constant::create(element::u64, Shape{shape.size()}, shape)); } return zero; } diff --git a/ngraph/core/src/node.cpp b/ngraph/core/src/node.cpp index 3913daa5a7f36e..489df366205126 100644 --- a/ngraph/core/src/node.cpp +++ b/ngraph/core/src/node.cpp @@ -213,8 +213,8 @@ descriptor::Output& Node::get_output_descriptor(size_t position) while (m_outputs.size() <= position) { size_t i = m_outputs.size(); - auto tensor_descriptor = make_shared( - element::Type_t::dynamic, PartialShape::dynamic(), this, i); + auto tensor_descriptor = + make_shared(element::dynamic, PartialShape::dynamic(), this, i); m_outputs.emplace_back(this, i, tensor_descriptor); } return m_outputs.at(position); diff --git a/ngraph/core/src/op/broadcast.cpp b/ngraph/core/src/op/broadcast.cpp index 71db716778d24d..4f91709a84692b 100644 --- a/ngraph/core/src/op/broadcast.cpp +++ b/ngraph/core/src/op/broadcast.cpp @@ -260,7 +260,7 @@ op::v1::Broadcast::Broadcast(const Output& arg, const AutoBroadcastSpec& broadcast_spec) : util::BroadcastBase{arg, target_shape, - op::v0::Constant::create(element::Type_t::u8, Shape{}, {0})->output(0), + op::v0::Constant::create(element::u8, Shape{}, {0})->output(0), to_broadcast_mode(broadcast_spec)} , m_broadcast_spec{broadcast_spec} { diff --git a/ngraph/core/src/op/bucketize.cpp b/ngraph/core/src/op/bucketize.cpp index 38ae363ce1c918..fb1bd237fea5d0 100644 --- a/ngraph/core/src/op/bucketize.cpp +++ b/ngraph/core/src/op/bucketize.cpp @@ -45,8 +45,7 @@ void op::v3::Bucketize::validate_and_infer_types() const PartialShape& buckets_pshape = get_input_partial_shape(1); NODE_VALIDATION_CHECK(this, - m_output_type == element::Type_t::i64 || - m_output_type == element::Type_t::i32, + m_output_type == element::i64 || m_output_type == element::i32, "Output type must be i32 or i64. Default is i64"); if (buckets_pshape.is_static()) diff --git a/ngraph/core/src/op/concat.cpp b/ngraph/core/src/op/concat.cpp index e6bfad1d0bc666..aa993f2377bb6c 100644 --- a/ngraph/core/src/op/concat.cpp +++ b/ngraph/core/src/op/concat.cpp @@ -50,7 +50,7 @@ void op::Concat::validate_and_infer_types() NODE_VALIDATION_CHECK(this, get_input_size() >= 1, "At least one argument required."); PartialShape inputs_shape_scheme{PartialShape::dynamic()}; - element::Type inputs_et{element::Type_t::dynamic}; + element::Type inputs_et{element::dynamic}; Dimension concatenation_axis_output_dim{0}; for (uint64_t i = 0; i < get_input_size(); i++) diff --git a/ngraph/core/src/op/constant.cpp b/ngraph/core/src/op/constant.cpp index 133fcb3fc27fcd..b3026a388e5268 100644 --- a/ngraph/core/src/op/constant.cpp +++ b/ngraph/core/src/op/constant.cpp @@ -482,7 +482,7 @@ Shape op::Constant::get_shape_val() const Strides op::Constant::get_strides_val() const { - NGRAPH_CHECK(m_element_type == element::Type_t::i64); + NGRAPH_CHECK(m_element_type == element::i64); std::vector out_strides = cast_vector(); Strides output_strides(shape_size(m_shape)); std::transform(out_strides.begin(), @@ -494,7 +494,7 @@ Strides op::Constant::get_strides_val() const Coordinate op::Constant::get_coordinate_val() const { - NGRAPH_CHECK(m_element_type == element::Type_t::i64); + NGRAPH_CHECK(m_element_type == element::i64); std::vector out_coordinate = cast_vector(); Coordinate output_coordinate(shape_size(m_shape)); std::transform(out_coordinate.begin(), @@ -506,7 +506,7 @@ Coordinate op::Constant::get_coordinate_val() const CoordinateDiff op::Constant::get_coordinate_diff_val() const { - NGRAPH_CHECK(m_element_type == element::Type_t::i64); + NGRAPH_CHECK(m_element_type == element::i64); std::vector out_coordinate_diff = cast_vector(); CoordinateDiff output_coordinate_diff(shape_size(m_shape)); std::transform(out_coordinate_diff.begin(), diff --git a/ngraph/core/src/op/cum_sum.cpp b/ngraph/core/src/op/cum_sum.cpp index 86fc0085e3624b..c00b80766e3b0a 100644 --- a/ngraph/core/src/op/cum_sum.cpp +++ b/ngraph/core/src/op/cum_sum.cpp @@ -37,7 +37,7 @@ op::v0::CumSum::CumSum(const Output& arg, } op::v0::CumSum::CumSum(const Output& arg, const bool exclusive, const bool reverse) - : Op({arg, op::Constant::create(element::Type_t::i32, Shape{}, {0})}) + : Op({arg, op::Constant::create(element::i32, Shape{}, {0})}) , m_exclusive(exclusive) , m_reverse(reverse) { @@ -65,7 +65,7 @@ void op::v0::CumSum::validate_and_infer_types() const auto& axis_type = get_input_element_type(1); NODE_VALIDATION_CHECK(this, - axis_type == element::Type_t::i32 || axis_type == element::Type_t::i64, + axis_type == element::i32 || axis_type == element::i64, "axis element type must be either int64_t or int32_t but got (", axis_type, ")."); diff --git a/ngraph/core/src/op/detection_output.cpp b/ngraph/core/src/op/detection_output.cpp index 41c04467255969..86a107deb5d92f 100644 --- a/ngraph/core/src/op/detection_output.cpp +++ b/ngraph/core/src/op/detection_output.cpp @@ -49,11 +49,11 @@ void op::DetectionOutput::validate_and_infer_types() { auto box_logits_shape = get_input_partial_shape(0).to_shape(); set_output_type( - 0, element::Type_t::f32, Shape{1, 1, m_attrs.keep_top_k[0] * box_logits_shape[0], 7}); + 0, element::f32, Shape{1, 1, m_attrs.keep_top_k[0] * box_logits_shape[0], 7}); } else { - set_output_type(0, element::Type_t::f32, PartialShape::dynamic()); + set_output_type(0, element::f32, PartialShape::dynamic()); } } diff --git a/ngraph/core/src/op/embedding_segments_sum.cpp b/ngraph/core/src/op/embedding_segments_sum.cpp index 528b49b1e97936..6a2eca7a92b483 100644 --- a/ngraph/core/src/op/embedding_segments_sum.cpp +++ b/ngraph/core/src/op/embedding_segments_sum.cpp @@ -56,18 +56,18 @@ op::v3::EmbeddingSegmentsSum::EmbeddingSegmentsSum(const Output& emb_table void op::v3::EmbeddingSegmentsSum::validate_and_infer_types() { NODE_VALIDATION_CHECK(this, - get_input_element_type(SEGMENT_IDS) == element::Type_t::i64 || - get_input_element_type(SEGMENT_IDS) == element::Type_t::i32, + get_input_element_type(SEGMENT_IDS) == element::i64 || + get_input_element_type(SEGMENT_IDS) == element::i32, "SEGMENT_IDS type must be i32 or i64"); NODE_VALIDATION_CHECK(this, - get_input_element_type(INDICES) == element::Type_t::i64 || - get_input_element_type(INDICES) == element::Type_t::i32, + get_input_element_type(INDICES) == element::i64 || + get_input_element_type(INDICES) == element::i32, "INDICES type must be i32 or i64"); NODE_VALIDATION_CHECK(this, - get_input_element_type(NUM_SEGMENTS) == element::Type_t::i64 || - get_input_element_type(NUM_SEGMENTS) == element::Type_t::i32, + get_input_element_type(NUM_SEGMENTS) == element::i64 || + get_input_element_type(NUM_SEGMENTS) == element::i32, "NUM_SEGMENTS type must be i32 or i64"); NODE_VALIDATION_CHECK( @@ -110,8 +110,8 @@ void op::v3::EmbeddingSegmentsSum::validate_and_infer_types() if (get_input_size() >= 5) { NODE_VALIDATION_CHECK(this, - get_input_element_type(DEFAULT_INDEX) == element::Type_t::i64 || - get_input_element_type(DEFAULT_INDEX) == element::Type_t::i32, + get_input_element_type(DEFAULT_INDEX) == element::i64 || + get_input_element_type(DEFAULT_INDEX) == element::i32, "DEFAULT_INDEX type must be i32 or i64"); NODE_VALIDATION_CHECK( diff --git a/ngraph/core/src/op/equal.cpp b/ngraph/core/src/op/equal.cpp index 3e7ae54343665c..87b96820df2953 100644 --- a/ngraph/core/src/op/equal.cpp +++ b/ngraph/core/src/op/equal.cpp @@ -47,7 +47,7 @@ namespace equal const op::AutoBroadcastSpec& broadcast_spec) { bool rc = true; - out->set_broadcast(broadcast_spec, arg0, arg1, element::Type_t::boolean); + out->set_broadcast(broadcast_spec, arg0, arg1, element::boolean); switch (arg0->get_element_type()) { TYPE_CASE(boolean)(arg0, arg1, out, broadcast_spec); diff --git a/ngraph/core/src/op/fake_quantize.cpp b/ngraph/core/src/op/fake_quantize.cpp index 98e1b25dd131bf..8228684aab4b63 100644 --- a/ngraph/core/src/op/fake_quantize.cpp +++ b/ngraph/core/src/op/fake_quantize.cpp @@ -136,7 +136,7 @@ OutputVector op::FakeQuantize::decompose_op() const std::make_shared(output_high, output_low), levels_minus_one); // zero_point type needs to match the quantization output type - const auto zero_point = Constant::create(element::Type_t::i32, data.get_shape(), {0.0}); + const auto zero_point = Constant::create(element::i32, data.get_shape(), {0.0}); const auto axes = get_default_order(input_data_shape); // clip the input data to the range @@ -150,7 +150,7 @@ OutputVector op::FakeQuantize::decompose_op() const make_shared(data, quant_scale, zero_point, - element::Type_t::i32, + element::i32, axes, op::Quantize::RoundMode::ROUND_NEAREST_TOWARD_EVEN); diff --git a/ngraph/core/src/op/gather.cpp b/ngraph/core/src/op/gather.cpp index 82e7b6ec405ce3..45c971797bfb0e 100644 --- a/ngraph/core/src/op/gather.cpp +++ b/ngraph/core/src/op/gather.cpp @@ -167,7 +167,7 @@ namespace gather out->set_shape(out_shape); - if (arg1->get_element_type() == element::Type_t::i64) + if (arg1->get_element_type() == element::i64) { runtime::reference::gather(arg0->get_data_ptr(), arg1->get_data_ptr(), @@ -177,7 +177,7 @@ namespace gather out->get_shape(), axis); } - else if (arg1->get_element_type() == element::Type_t::i32) + else if (arg1->get_element_type() == element::i32) { runtime::reference::gather(arg0->get_data_ptr(), arg1->get_data_ptr(), @@ -280,7 +280,7 @@ namespace gather if (indices_shape.empty()) { // gathering a scalar - const auto axes = op::Constant::create(element::Type_t::i64, Shape{1}, {0}); + const auto axes = op::Constant::create(element::i64, Shape{1}, {0}); gathered = make_shared(gathered_concat_input, axes); } diff --git a/ngraph/core/src/op/greater.cpp b/ngraph/core/src/op/greater.cpp index ece748b5500cb1..dfdb00a4154f4c 100644 --- a/ngraph/core/src/op/greater.cpp +++ b/ngraph/core/src/op/greater.cpp @@ -47,7 +47,7 @@ namespace greaterop const op::AutoBroadcastSpec& broadcast_spec) { bool rc = true; - out->set_broadcast(broadcast_spec, arg0, arg1, element::Type_t::boolean); + out->set_broadcast(broadcast_spec, arg0, arg1, element::boolean); switch (arg0->get_element_type()) { TYPE_CASE(boolean)(arg0, arg1, out, broadcast_spec); diff --git a/ngraph/core/src/op/greater_eq.cpp b/ngraph/core/src/op/greater_eq.cpp index 348f52594630f9..c3838fa16f7007 100644 --- a/ngraph/core/src/op/greater_eq.cpp +++ b/ngraph/core/src/op/greater_eq.cpp @@ -47,7 +47,7 @@ namespace greater_equalop const op::AutoBroadcastSpec& broadcast_spec) { bool rc = true; - out->set_broadcast(broadcast_spec, arg0, arg1, element::Type_t::boolean); + out->set_broadcast(broadcast_spec, arg0, arg1, element::boolean); switch (arg0->get_element_type()) { TYPE_CASE(boolean)(arg0, arg1, out, broadcast_spec); diff --git a/ngraph/core/src/op/grn.cpp b/ngraph/core/src/op/grn.cpp index 3710b2bb6c60d6..3668d227238ae0 100644 --- a/ngraph/core/src/op/grn.cpp +++ b/ngraph/core/src/op/grn.cpp @@ -78,7 +78,7 @@ OutputVector op::GRN::decompose_op() const data = builder::opset1::reshape(data, data_shape); } - const auto axis_set_const = op::Constant::create(element::Type_t::i64, {}, {1}); + const auto axis_set_const = op::Constant::create(element::i64, {}, {1}); // Calculate l2 norm across channels. shared_ptr norm = builder::opset1::l2_norm(data, axis_set_const, m_bias); // Get back reduced axis. diff --git a/ngraph/core/src/op/gru_cell.cpp b/ngraph/core/src/op/gru_cell.cpp index d70e115c7db4c0..f84c4dee2ae34b 100644 --- a/ngraph/core/src/op/gru_cell.cpp +++ b/ngraph/core/src/op/gru_cell.cpp @@ -119,7 +119,7 @@ void op::v3::GRUCell::validate_and_infer_types() } auto merged_batch_size = Dimension::dynamic(); auto merged_hidden_size = Dimension::dynamic(); - element::Type result_et = element::Type_t::dynamic; + auto result_et = element::dynamic; // Get input partial shape for all inputs const auto& x_pshape = get_input_partial_shape(0); diff --git a/ngraph/core/src/op/gru_sequence.cpp b/ngraph/core/src/op/gru_sequence.cpp index 4446c3fb7fcfa2..fc7cb620d3dd73 100644 --- a/ngraph/core/src/op/gru_sequence.cpp +++ b/ngraph/core/src/op/gru_sequence.cpp @@ -74,7 +74,7 @@ void op::v5::GRUSequence::validate_and_infer_types() auto merged_batch_size = Dimension::dynamic(); auto merged_hidden_size = Dimension::dynamic(); auto merged_num_directions = Dimension::dynamic(); - element::Type result_et = element::Type_t::dynamic; + auto result_et = element::dynamic; auto x_pshape = get_input_partial_shape(0); auto ht_pshape = get_input_partial_shape(1); diff --git a/ngraph/core/src/op/interpolate.cpp b/ngraph/core/src/op/interpolate.cpp index 5395c08c1236f8..785a7ab5b390d0 100644 --- a/ngraph/core/src/op/interpolate.cpp +++ b/ngraph/core/src/op/interpolate.cpp @@ -221,8 +221,8 @@ void op::v4::Interpolate::validate_and_infer_types() { element::Type input_et = get_input_element_type(0); NODE_VALIDATION_CHECK(this, - input_et == element::Type_t::f32 || input_et == element::Type_t::f16 || - input_et == element::Type_t::i8 || input_et == element::Type_t::bf16, + input_et == element::f32 || input_et == element::f16 || + input_et == element::i8 || input_et == element::bf16, "Input element type must be f32, f16, bf16 or i8"); PartialShape input_shape = PartialShape(get_input_partial_shape(0)); diff --git a/ngraph/core/src/op/less.cpp b/ngraph/core/src/op/less.cpp index ad0d2745aacc2e..02e3b06c616252 100644 --- a/ngraph/core/src/op/less.cpp +++ b/ngraph/core/src/op/less.cpp @@ -47,7 +47,7 @@ namespace lessop const op::AutoBroadcastSpec& broadcast_spec) { bool rc = true; - out->set_broadcast(broadcast_spec, arg0, arg1, element::Type_t::boolean); + out->set_broadcast(broadcast_spec, arg0, arg1, element::boolean); switch (arg0->get_element_type()) { TYPE_CASE(boolean)(arg0, arg1, out, broadcast_spec); diff --git a/ngraph/core/src/op/less_eq.cpp b/ngraph/core/src/op/less_eq.cpp index 26b3dbeca63d64..bc6a53079a2f89 100644 --- a/ngraph/core/src/op/less_eq.cpp +++ b/ngraph/core/src/op/less_eq.cpp @@ -65,7 +65,7 @@ namespace less_equalop const op::AutoBroadcastSpec& broadcast_spec) { bool rc = true; - out->set_broadcast(broadcast_spec, arg0, arg1, element::Type_t::boolean); + out->set_broadcast(broadcast_spec, arg0, arg1, element::boolean); switch (arg0->get_element_type()) { TYPE_CASE(boolean)(arg0, arg1, out, broadcast_spec); diff --git a/ngraph/core/src/op/lrn.cpp b/ngraph/core/src/op/lrn.cpp index a28694ffc14f9a..0ebe097acded45 100644 --- a/ngraph/core/src/op/lrn.cpp +++ b/ngraph/core/src/op/lrn.cpp @@ -25,7 +25,7 @@ using namespace ngraph; constexpr NodeTypeInfo op::LRN::type_info; op::LRN::LRN(const Output& arg, double alpha, double beta, double bias, size_t size) - : LRN(arg, op::Constant::create(element::Type_t::i64, Shape{1}, {1}), alpha, beta, bias, size) + : LRN(arg, op::Constant::create(element::i64, Shape{1}, {1}), alpha, beta, bias, size) { add_provenance_group_member(input_value(1).get_node_shared_ptr()); } diff --git a/ngraph/core/src/op/lstm_cell.cpp b/ngraph/core/src/op/lstm_cell.cpp index 235763125f11e2..0d2b24d53eae9a 100644 --- a/ngraph/core/src/op/lstm_cell.cpp +++ b/ngraph/core/src/op/lstm_cell.cpp @@ -156,7 +156,7 @@ void op::v0::LSTMCell::validate_and_infer_types() auto merged_batch_size = Dimension::dynamic(); auto merged_hidden_size = Dimension::dynamic(); - element::Type result_et = element::Type_t::dynamic; + auto result_et = element::dynamic; // Copy all inputs without peephole (7th input) and initial_cell_state (2nd input) information // for further validation @@ -457,7 +457,7 @@ void op::v4::LSTMCell::validate_and_infer_types() } auto merged_batch_size = Dimension::dynamic(); auto merged_hidden_size = Dimension::dynamic(); - element::Type result_et = element::Type_t::dynamic; + auto result_et = element::dynamic; // Get input partial shape for all inputs const auto& x_pshape = get_input_partial_shape(0); diff --git a/ngraph/core/src/op/lstm_sequence.cpp b/ngraph/core/src/op/lstm_sequence.cpp index 7994cae95da506..ab3607c425eacf 100644 --- a/ngraph/core/src/op/lstm_sequence.cpp +++ b/ngraph/core/src/op/lstm_sequence.cpp @@ -131,10 +131,8 @@ shared_ptr op::v0::LSTMSequence::get_masked_node(const Output& data, // Create predicate nodes. The condition is whether current time step value // is greater than sequence length for respective batch inputs. - shared_ptr curr_time_step_node = - opset1::Constant::create(element::Type_t::i32, - data.get_shape(), - vector(shape_size(data.get_shape()), time_step)); + shared_ptr curr_time_step_node = opset1::Constant::create( + element::i32, data.get_shape(), vector(shape_size(data.get_shape()), time_step)); Output batch_seq_length = builder::opset1::legacy_broadcast_for_binary_operation( curr_time_step_node, input_value(3).get_node_shared_ptr(), batch_axis); @@ -272,7 +270,7 @@ void op::v0::LSTMSequence::validate_and_infer_types() auto merged_batch_size = Dimension::dynamic(); auto merged_hidden_size = Dimension::dynamic(); auto merged_num_directions = Dimension::dynamic(); - element::Type result_et = element::Type_t::dynamic; + auto result_et = element::dynamic; // Copy all inputs without peephole and initial_cell_state information for further validation for (size_t i = 0; i < get_input_size() - 1; i++) @@ -470,7 +468,7 @@ void op::v5::LSTMSequence::validate_and_infer_types() auto merged_batch_size = Dimension::dynamic(); auto merged_hidden_size = Dimension::dynamic(); auto merged_num_directions = Dimension::dynamic(); - element::Type result_et = element::Type_t::dynamic; + auto result_et = element::dynamic; // Copy all inputs without initial_cell_state information for further validation for (size_t i = 0; i < get_input_size(); i++) diff --git a/ngraph/core/src/op/mod.cpp b/ngraph/core/src/op/mod.cpp index ff573124da89f2..30284534137be8 100644 --- a/ngraph/core/src/op/mod.cpp +++ b/ngraph/core/src/op/mod.cpp @@ -52,9 +52,8 @@ OutputVector op::v1::Mod::decompose_op() const const auto divisor = make_shared(input_value(1)); // truncated(a / b) - auto division = - make_shared(make_shared(dividend, divisor, m_auto_broadcast), - ngraph::element::Type_t::i64); + auto division = make_shared( + make_shared(dividend, divisor, m_auto_broadcast), ngraph::element::i64); division = make_shared(division, dividend_et); // truncated(a / b) * b const auto multiplication = make_shared(division, divisor, m_auto_broadcast); diff --git a/ngraph/core/src/op/non_max_suppression.cpp b/ngraph/core/src/op/non_max_suppression.cpp index 2e158f30b208f5..d5e715b6865696 100644 --- a/ngraph/core/src/op/non_max_suppression.cpp +++ b/ngraph/core/src/op/non_max_suppression.cpp @@ -52,9 +52,9 @@ op::v1::NonMaxSuppression::NonMaxSuppression( const bool sort_result_descending) : Op({boxes, scores, - op::Constant::create(element::Type_t::i64, Shape{}, {0}), - op::Constant::create(element::Type_t::f32, Shape{}, {.0f}), - op::Constant::create(element::Type_t::f32, Shape{}, {.0f})}) + op::Constant::create(element::i64, Shape{}, {0}), + op::Constant::create(element::f32, Shape{}, {.0f}), + op::Constant::create(element::f32, Shape{}, {.0f})}) , m_box_encoding{box_encoding} , m_sort_result_descending{sort_result_descending} { @@ -71,13 +71,13 @@ std::shared_ptr const auto& arg2 = new_args.size() > 2 ? new_args.at(2) - : ngraph::op::Constant::create(element::Type_t::i32, Shape{}, {0}); + : ngraph::op::Constant::create(element::i32, Shape{}, {0}); const auto& arg3 = new_args.size() > 3 ? new_args.at(3) - : ngraph::op::Constant::create(element::Type_t::f32, Shape{}, {.0f}); + : ngraph::op::Constant::create(element::f32, Shape{}, {.0f}); const auto& arg4 = new_args.size() > 4 ? new_args.at(4) - : ngraph::op::Constant::create(element::Type_t::f32, Shape{}, {.0f}); + : ngraph::op::Constant::create(element::f32, Shape{}, {.0f}); return std::make_shared( new_args.at(0), new_args.at(1), arg2, arg3, arg4, m_box_encoding, m_sort_result_descending); @@ -98,7 +98,7 @@ void op::v1::NonMaxSuppression::validate_and_infer_types() // the spec doesn't say what exact type should be used for the output of this op // that's why we're setting it to 64-bit integer to provide the maximum range of values support // this will be changed (configurable) in the next version of this op - const auto& output_element_type = element::Type_t::i64; + const auto& output_element_type = element::i64; // NonMaxSuppression produces triplets // that have the following format: [batch_index, class_index, box_index] @@ -249,9 +249,9 @@ op::v3::NonMaxSuppression::NonMaxSuppression( const element::Type& output_type) : Op({boxes, scores, - op::Constant::create(element::Type_t::i64, Shape{}, {0}), - op::Constant::create(element::Type_t::f32, Shape{}, {.0f}), - op::Constant::create(element::Type_t::f32, Shape{}, {.0f})}) + op::Constant::create(element::i64, Shape{}, {0}), + op::Constant::create(element::f32, Shape{}, {.0f}), + op::Constant::create(element::f32, Shape{}, {.0f})}) , m_box_encoding{box_encoding} , m_sort_result_descending{sort_result_descending} , m_output_type{output_type} @@ -269,13 +269,13 @@ std::shared_ptr const auto& arg2 = new_args.size() > 2 ? new_args.at(2) - : ngraph::op::Constant::create(element::Type_t::i32, Shape{}, {0}); + : ngraph::op::Constant::create(element::i32, Shape{}, {0}); const auto& arg3 = new_args.size() > 3 ? new_args.at(3) - : ngraph::op::Constant::create(element::Type_t::f32, Shape{}, {.0f}); + : ngraph::op::Constant::create(element::f32, Shape{}, {.0f}); const auto& arg4 = new_args.size() > 4 ? new_args.at(4) - : ngraph::op::Constant::create(element::Type_t::f32, Shape{}, {.0f}); + : ngraph::op::Constant::create(element::f32, Shape{}, {.0f}); return std::make_shared(new_args.at(0), new_args.at(1), @@ -301,8 +301,7 @@ void op::v3::NonMaxSuppression::validate() const auto scores_ps = get_input_partial_shape(1); NODE_VALIDATION_CHECK(this, - m_output_type == element::Type_t::i64 || - m_output_type == element::Type_t::i32, + m_output_type == element::i64 || m_output_type == element::i32, "Output type must be i32 or i64"); if (boxes_ps.is_dynamic() || scores_ps.is_dynamic()) @@ -469,9 +468,9 @@ op::v4::NonMaxSuppression::NonMaxSuppression( const element::Type& output_type) : op::v3::NonMaxSuppression(boxes, scores, - op::Constant::create(element::Type_t::i64, Shape{}, {0}), - op::Constant::create(element::Type_t::f32, Shape{}, {.0f}), - op::Constant::create(element::Type_t::f32, Shape{}, {.0f}), + op::Constant::create(element::i64, Shape{}, {0}), + op::Constant::create(element::f32, Shape{}, {.0f}), + op::Constant::create(element::f32, Shape{}, {.0f}), box_encoding, sort_result_descending, output_type) @@ -489,13 +488,13 @@ std::shared_ptr const auto& arg2 = new_args.size() > 2 ? new_args.at(2) - : ngraph::op::Constant::create(element::Type_t::i32, Shape{}, {0}); + : ngraph::op::Constant::create(element::i32, Shape{}, {0}); const auto& arg3 = new_args.size() > 3 ? new_args.at(3) - : ngraph::op::Constant::create(element::Type_t::f32, Shape{}, {.0f}); + : ngraph::op::Constant::create(element::f32, Shape{}, {.0f}); const auto& arg4 = new_args.size() > 4 ? new_args.at(4) - : ngraph::op::Constant::create(element::Type_t::f32, Shape{}, {.0f}); + : ngraph::op::Constant::create(element::f32, Shape{}, {.0f}); return std::make_shared(new_args.at(0), new_args.at(1), @@ -694,7 +693,7 @@ namespace inline bool is_float_type_admissible(const element::Type& t) { - return t == element::Type_t::f32 || t == element::Type_t::f16 || t == element::Type_t::bf16; + return t == element::f32 || t == element::f16 || t == element::bf16; } inline bool is_scalar_or_1d_tensor_with_1_element(const PartialShape& p) @@ -716,8 +715,7 @@ void op::v5::NonMaxSuppression::validate() const auto scores_ps = get_input_partial_shape(1); NODE_VALIDATION_CHECK(this, - m_output_type == element::Type_t::i64 || - m_output_type == element::Type_t::i32, + m_output_type == element::i64 || m_output_type == element::i32, "Output type must be i32 or i64"); if (boxes_ps.is_dynamic() || scores_ps.is_dynamic()) @@ -922,7 +920,7 @@ void op::v5::NonMaxSuppression::validate_and_infer_types() } set_output_type(0, m_output_type, out_shape); - set_output_type(1, element::Type_t::f32, out_shape); + set_output_type(1, element::f32, out_shape); set_output_type(2, m_output_type, Shape{1}); } diff --git a/ngraph/core/src/op/non_zero.cpp b/ngraph/core/src/op/non_zero.cpp index 55831236118599..9e544abc0136ba 100644 --- a/ngraph/core/src/op/non_zero.cpp +++ b/ngraph/core/src/op/non_zero.cpp @@ -62,8 +62,7 @@ void op::v3::NonZero::validate_and_infer_types() "NonZero input data type needs to be a numeric type. Got: ", input_et); NODE_VALIDATION_CHECK(this, - m_output_type == element::Type_t::i64 || - m_output_type == element::Type_t::i32, + m_output_type == element::i64 || m_output_type == element::i32, "Output type must be i32 or i64"); // For scalar non-zero value case, onnx test case expects output shape {1, 1} diff --git a/ngraph/core/src/op/not_equal.cpp b/ngraph/core/src/op/not_equal.cpp index 0ea1b95d4a534d..9990bd3126cf23 100644 --- a/ngraph/core/src/op/not_equal.cpp +++ b/ngraph/core/src/op/not_equal.cpp @@ -47,7 +47,7 @@ namespace not_equalop const op::AutoBroadcastSpec& broadcast_spec) { bool rc = true; - out->set_broadcast(broadcast_spec, arg0, arg1, element::Type_t::boolean); + out->set_broadcast(broadcast_spec, arg0, arg1, element::boolean); switch (arg0->get_element_type()) { TYPE_CASE(boolean)(arg0, arg1, out, broadcast_spec); diff --git a/ngraph/core/src/op/prior_box.cpp b/ngraph/core/src/op/prior_box.cpp index 5e0a5580070c6c..437678880c9d33 100644 --- a/ngraph/core/src/op/prior_box.cpp +++ b/ngraph/core/src/op/prior_box.cpp @@ -72,14 +72,14 @@ void op::PriorBox::validate_and_infer_types() auto layer_shape = const_shape->get_shape_val(); set_output_type(0, - element::Type_t::f32, + element::f32, Shape{2, 4 * layer_shape[0] * layer_shape[1] * static_cast(number_of_priors(m_attrs))}); } else { - set_output_type(0, element::Type_t::f32, PartialShape::dynamic()); + set_output_type(0, element::f32, PartialShape::dynamic()); } } diff --git a/ngraph/core/src/op/prior_box_clustered.cpp b/ngraph/core/src/op/prior_box_clustered.cpp index ec41d3b074d2c4..4b173c6a007774 100644 --- a/ngraph/core/src/op/prior_box_clustered.cpp +++ b/ngraph/core/src/op/prior_box_clustered.cpp @@ -80,11 +80,11 @@ void op::PriorBoxClustered::validate_and_infer_types() // {Prior boxes, variances-adjusted prior boxes} const auto num_priors = m_attrs.widths.size(); set_output_type( - 0, element::Type_t::f32, Shape{2, 4 * layer_shape[0] * layer_shape[1] * num_priors}); + 0, element::f32, Shape{2, 4 * layer_shape[0] * layer_shape[1] * num_priors}); } else { - set_output_type(0, element::Type_t::f32, PartialShape::dynamic()); + set_output_type(0, element::f32, PartialShape::dynamic()); } } diff --git a/ngraph/core/src/op/range.cpp b/ngraph/core/src/op/range.cpp index 0da2373ef95f04..b8083cafff022c 100644 --- a/ngraph/core/src/op/range.cpp +++ b/ngraph/core/src/op/range.cpp @@ -363,7 +363,7 @@ void op::v0::Range::validate_and_infer_types() set_input_is_relevant_to_shape(1); set_input_is_relevant_to_shape(2); - element::Type result_et = element::Type_t::dynamic; + auto result_et = element::dynamic; NODE_VALIDATION_CHECK( this, @@ -373,7 +373,7 @@ void op::v0::Range::validate_and_infer_types() "Element types for start, stop, and step do not match."); NODE_VALIDATION_CHECK(this, - result_et != element::Type_t::boolean, + result_et != element::boolean, "Element type for start, stop, and step, must not be boolean."); NODE_VALIDATION_CHECK( diff --git a/ngraph/core/src/op/reduce_logical_and.cpp b/ngraph/core/src/op/reduce_logical_and.cpp index 666b818efb7488..a83d94200bb3b1 100644 --- a/ngraph/core/src/op/reduce_logical_and.cpp +++ b/ngraph/core/src/op/reduce_logical_and.cpp @@ -76,7 +76,7 @@ bool op::v1::ReduceLogicalAnd::evaluate(const HostTensorVector& outputs, const auto& axes = inputs[1]; const auto& out = outputs[0]; - if (data->get_element_type() != element::Type_t::boolean || + if (data->get_element_type() != element::boolean || !axes->get_element_type().is_integral_number()) { return false; diff --git a/ngraph/core/src/op/reduce_logical_or.cpp b/ngraph/core/src/op/reduce_logical_or.cpp index f1c731cc24997d..ba3efba782f0a1 100644 --- a/ngraph/core/src/op/reduce_logical_or.cpp +++ b/ngraph/core/src/op/reduce_logical_or.cpp @@ -76,7 +76,7 @@ bool op::v1::ReduceLogicalOr::evaluate(const HostTensorVector& outputs, const auto& axes = inputs[1]; const auto& out = outputs[0]; - if (data->get_element_type() != element::Type_t::boolean || + if (data->get_element_type() != element::boolean || !axes->get_element_type().is_integral_number()) { return false; diff --git a/ngraph/core/src/op/reverse.cpp b/ngraph/core/src/op/reverse.cpp index 212a6befe041a0..fe929235617550 100644 --- a/ngraph/core/src/op/reverse.cpp +++ b/ngraph/core/src/op/reverse.cpp @@ -59,7 +59,7 @@ void op::v1::Reverse::validate_and_infer_types() if (m_mode == Mode::MASK) { NODE_VALIDATION_CHECK(this, - get_input_element_type(1) == element::Type_t::boolean, + get_input_element_type(1) == element::boolean, "In 'mask' mode the second input must contain boolean values."); } diff --git a/ngraph/core/src/op/rnn_cell.cpp b/ngraph/core/src/op/rnn_cell.cpp index 482929fd03e2e5..80dba75a894307 100644 --- a/ngraph/core/src/op/rnn_cell.cpp +++ b/ngraph/core/src/op/rnn_cell.cpp @@ -92,7 +92,7 @@ void op::v0::RNNCell::validate_and_infer_types() } auto merged_batch_size = Dimension::dynamic(); auto merged_hidden_size = Dimension::dynamic(); - element::Type result_et = element::Type_t::dynamic; + auto result_et = element::dynamic; // Get input partial shape for all inputs const auto& x_pshape = get_input_partial_shape(0); diff --git a/ngraph/core/src/op/rnn_sequence.cpp b/ngraph/core/src/op/rnn_sequence.cpp index cfbbb1d7f95519..5087b631d1e1d1 100644 --- a/ngraph/core/src/op/rnn_sequence.cpp +++ b/ngraph/core/src/op/rnn_sequence.cpp @@ -71,7 +71,7 @@ void op::v5::RNNSequence::validate_and_infer_types() auto merged_batch_size = Dimension::dynamic(); auto merged_hidden_size = Dimension::dynamic(); auto merged_num_directions = Dimension::dynamic(); - element::Type result_et = element::Type_t::dynamic; + auto result_et = element::dynamic; auto x_pshape = get_input_partial_shape(0); auto ht_pshape = get_input_partial_shape(1); diff --git a/ngraph/core/src/op/select.cpp b/ngraph/core/src/op/select.cpp index 75e6d76d9f68f0..2dd1bbf076dd6a 100644 --- a/ngraph/core/src/op/select.cpp +++ b/ngraph/core/src/op/select.cpp @@ -46,7 +46,7 @@ void op::v1::Select::validate_and_infer_types() // Condition element type check NODE_VALIDATION_CHECK(this, get_input_element_type(0).is_dynamic() || - get_input_element_type(0) == element::Type_t::boolean, + get_input_element_type(0) == element::boolean, "Argument 0 must have boolean element type (element type: ", get_input_element_type(0), ")."); diff --git a/ngraph/core/src/op/shape_of.cpp b/ngraph/core/src/op/shape_of.cpp index 84134080bfbe25..78923352831d98 100644 --- a/ngraph/core/src/op/shape_of.cpp +++ b/ngraph/core/src/op/shape_of.cpp @@ -42,8 +42,7 @@ op::v3::ShapeOf::ShapeOf(const Output& arg, element::Type output_type) void op::v3::ShapeOf::validate_and_infer_types() { NODE_VALIDATION_CHECK(this, - m_output_type == element::Type_t::i64 || - m_output_type == element::Type_t::i32, + m_output_type == element::i64 || m_output_type == element::i32, "Output type must be i32 or i64"); set_input_is_relevant_to_value(0, false); set_output_type(0, m_output_type, PartialShape{get_input_partial_shape(0).rank()}); @@ -142,7 +141,7 @@ namespace shape_of auto index = std::make_shared( output_type, Shape{1}, std::vector{i}); auto axis = std::make_shared( - element::Type_t::i64, Shape{}, std::vector{0}); + element::i64, Shape{}, std::vector{0}); auto temp = make_shared(shape_of, index, axis); temp->set_friendly_name("DynDim/" + temp->get_name()); dimensions.push_back(temp); @@ -183,7 +182,7 @@ op::v0::ShapeOf::ShapeOf(const Output& arg) void op::v0::ShapeOf::validate_and_infer_types() { set_input_is_relevant_to_value(0, false); - set_output_type(0, element::Type_t::i64, PartialShape{get_input_partial_shape(0).rank()}); + set_output_type(0, element::i64, PartialShape{get_input_partial_shape(0).rank()}); } bool ngraph::op::v0::ShapeOf::visit_attributes(AttributeVisitor& visitor) diff --git a/ngraph/core/src/op/squeeze.cpp b/ngraph/core/src/op/squeeze.cpp index a9f12d3d8e2d29..b3276ececfd6e1 100644 --- a/ngraph/core/src/op/squeeze.cpp +++ b/ngraph/core/src/op/squeeze.cpp @@ -126,7 +126,7 @@ OutputVector op::Squeeze::decompose_op() const auto output_data_shape = get_output_shape(0); return {make_shared( data, - op::Constant::create(element::Type_t::u64, {output_data_shape.size()}, output_data_shape), + op::Constant::create(element::u64, {output_data_shape.size()}, output_data_shape), false)}; } diff --git a/ngraph/core/src/op/strided_slice.cpp b/ngraph/core/src/op/strided_slice.cpp index b4af01c84c4b24..8dc5ca05b976a5 100644 --- a/ngraph/core/src/op/strided_slice.cpp +++ b/ngraph/core/src/op/strided_slice.cpp @@ -77,13 +77,12 @@ namespace { NGRAPH_CHECK(begin_pshape.rank().is_static() && begin_pshape.rank().get_length() == 1, "Begin input must be 1D"); - return std::make_shared( - op::Constant::create(element::Type_t::i64, {}, {1}), - std::make_shared(begin)); + return std::make_shared(op::Constant::create(element::i64, {}, {1}), + std::make_shared(begin)); } return op::Constant::create( - element::Type_t::i64, Shape{strides_length}, vector(strides_length, 1)); + element::i64, Shape{strides_length}, vector(strides_length, 1)); } } diff --git a/ngraph/core/src/op/topk.cpp b/ngraph/core/src/op/topk.cpp index e6b3bab597756d..9a47674e57d31f 100644 --- a/ngraph/core/src/op/topk.cpp +++ b/ngraph/core/src/op/topk.cpp @@ -320,9 +320,8 @@ size_t op::v1::TopK::read_k_from_constant_node(const shared_ptr& node, const element::Type& k_element_type) const { NODE_VALIDATION_CHECK(this, - k_element_type == element::Type_t::i8 || - k_element_type == element::Type_t::i32 || - k_element_type == element::Type_t::i64, + k_element_type == element::i8 || k_element_type == element::i32 || + k_element_type == element::i64, "K input element type must be i8, i32 or i64 (got ", k_element_type, ")."); @@ -401,7 +400,7 @@ size_t op::v1::TopK::get_k() const void op::v1::TopK::set_k(size_t k) { this->input(1).replace_source_output( - op::Constant::create(element::Type_t::i64, Shape{}, {k})->output(0)); + op::Constant::create(element::i64, Shape{}, {k})->output(0)); } bool op::v1::TopK::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const diff --git a/ngraph/core/src/op/util/arithmetic_reduction.cpp b/ngraph/core/src/op/util/arithmetic_reduction.cpp index dac51ff772434c..09b17f952978c4 100644 --- a/ngraph/core/src/op/util/arithmetic_reduction.cpp +++ b/ngraph/core/src/op/util/arithmetic_reduction.cpp @@ -29,7 +29,7 @@ op::util::ArithmeticReduction::ArithmeticReduction(const Output& arg, const AxisSet& reduction_axes) : Op({arg, op::Constant::create( - element::Type_t::i64, Shape{reduction_axes.size()}, reduction_axes.to_vector()) + element::i64, Shape{reduction_axes.size()}, reduction_axes.to_vector()) ->output(0)}) { add_provenance_group_member(input_value(1).get_node_shared_ptr()); @@ -62,10 +62,9 @@ const AxisSet op::util::ArithmeticReduction::get_reduction_axes() const void op::util::ArithmeticReduction::set_reduction_axes(const AxisSet& reduction_axes) { - this->input(1).replace_source_output(op::Constant::create(element::Type_t::i64, - Shape{reduction_axes.size()}, - reduction_axes.to_vector()) - ->output(0)); + this->input(1).replace_source_output( + op::Constant::create(element::i64, Shape{reduction_axes.size()}, reduction_axes.to_vector()) + ->output(0)); } void op::util::ArithmeticReduction::validate_and_infer_types() diff --git a/ngraph/core/src/op/util/binary_elementwise_arithmetic.cpp b/ngraph/core/src/op/util/binary_elementwise_arithmetic.cpp index 18af758956f394..7f9b4afbeec0c7 100644 --- a/ngraph/core/src/op/util/binary_elementwise_arithmetic.cpp +++ b/ngraph/core/src/op/util/binary_elementwise_arithmetic.cpp @@ -44,7 +44,7 @@ void op::util::BinaryElementwiseArithmetic::validate_and_infer_elementwise_arith PartialShape& args_pshape = std::get<1>(args_et_pshape); NODE_VALIDATION_CHECK(this, - args_et.is_dynamic() || args_et != element::Type_t::boolean, + args_et.is_dynamic() || args_et != element::boolean, "Arguments cannot have boolean element type (argument element type: ", args_et, ")."); diff --git a/ngraph/core/src/op/util/binary_elementwise_comparison.cpp b/ngraph/core/src/op/util/binary_elementwise_comparison.cpp index 74c4e239dfb3f1..f8f35d99721b3f 100644 --- a/ngraph/core/src/op/util/binary_elementwise_comparison.cpp +++ b/ngraph/core/src/op/util/binary_elementwise_comparison.cpp @@ -39,7 +39,7 @@ void op::util::BinaryElementwiseComparison::validate_and_infer_types() auto args_et_pshape = op::util::validate_and_infer_elementwise_args(this, m_autob); PartialShape& args_pshape = std::get<1>(args_et_pshape); - set_output_type(0, element::Type_t::boolean, args_pshape); + set_output_type(0, element::boolean, args_pshape); } bool op::util::BinaryElementwiseComparison::visit_attributes(AttributeVisitor& visitor) diff --git a/ngraph/core/src/op/util/binary_elementwise_logical.cpp b/ngraph/core/src/op/util/binary_elementwise_logical.cpp index 666b8c1daa8c0f..6c7dc0bf51fce5 100644 --- a/ngraph/core/src/op/util/binary_elementwise_logical.cpp +++ b/ngraph/core/src/op/util/binary_elementwise_logical.cpp @@ -44,12 +44,12 @@ void op::util::BinaryElementwiseLogical::validate_and_infer_elementwise_logical( NODE_VALIDATION_CHECK( this, - args_et.is_dynamic() || args_et == element::Type_t::boolean, + args_et.is_dynamic() || args_et == element::boolean, "Operands for logical operators must have boolean element type but have element type ", args_et, "."); - set_output_type(0, element::Type_t::boolean, args_pshape); + set_output_type(0, element::boolean, args_pshape); } void op::util::BinaryElementwiseLogical::validate_and_infer_types() diff --git a/ngraph/core/src/op/util/embeddingbag_offsets_base.cpp b/ngraph/core/src/op/util/embeddingbag_offsets_base.cpp index 8834496a2cba1c..3fa1b09ba78364 100644 --- a/ngraph/core/src/op/util/embeddingbag_offsets_base.cpp +++ b/ngraph/core/src/op/util/embeddingbag_offsets_base.cpp @@ -52,13 +52,13 @@ op::util::EmbeddingBagOffsetsBase::EmbeddingBagOffsetsBase(const Output& e void op::util::EmbeddingBagOffsetsBase::validate_and_infer_types() { NODE_VALIDATION_CHECK(this, - get_input_element_type(OFFSETS) == element::Type_t::i64 || - get_input_element_type(OFFSETS) == element::Type_t::i32, + get_input_element_type(OFFSETS) == element::i64 || + get_input_element_type(OFFSETS) == element::i32, "OFFSETS type must be i32 or i64"); NODE_VALIDATION_CHECK(this, - get_input_element_type(INDICES) == element::Type_t::i64 || - get_input_element_type(INDICES) == element::Type_t::i32, + get_input_element_type(INDICES) == element::i64 || + get_input_element_type(INDICES) == element::i32, "INDICES type must be i32 or i64"); NODE_VALIDATION_CHECK( @@ -83,8 +83,8 @@ void op::util::EmbeddingBagOffsetsBase::validate_and_infer_types() if (get_input_size() >= 4) { NODE_VALIDATION_CHECK(this, - get_input_element_type(DEFAULT_INDEX) == element::Type_t::i64 || - get_input_element_type(DEFAULT_INDEX) == element::Type_t::i32, + get_input_element_type(DEFAULT_INDEX) == element::i64 || + get_input_element_type(DEFAULT_INDEX) == element::i32, "DEFAULT_INDEX type must be i32 or i64"); NODE_VALIDATION_CHECK( diff --git a/ngraph/core/src/op/util/embeddingbag_packed_base.cpp b/ngraph/core/src/op/util/embeddingbag_packed_base.cpp index 48d7e5d196372d..7b9afd0f7add74 100644 --- a/ngraph/core/src/op/util/embeddingbag_packed_base.cpp +++ b/ngraph/core/src/op/util/embeddingbag_packed_base.cpp @@ -40,8 +40,8 @@ op::util::EmbeddingBagPackedBase::EmbeddingBagPackedBase(const Output& emb void op::util::EmbeddingBagPackedBase::validate_and_infer_types() { NODE_VALIDATION_CHECK(this, - get_input_element_type(INDICES) == element::Type_t::i64 || - get_input_element_type(INDICES) == element::Type_t::i32, + get_input_element_type(INDICES) == element::i64 || + get_input_element_type(INDICES) == element::i32, "INDICES type must be i32 or i64"); NODE_VALIDATION_CHECK(this, diff --git a/ngraph/core/src/op/util/index_reduction.cpp b/ngraph/core/src/op/util/index_reduction.cpp index f0e11361c7c5aa..f4fd0ab5dc10ff 100644 --- a/ngraph/core/src/op/util/index_reduction.cpp +++ b/ngraph/core/src/op/util/index_reduction.cpp @@ -68,8 +68,8 @@ void op::util::IndexReduction::validate_and_infer_types() rank, ")."); NODE_VALIDATION_CHECK(this, - m_index_element_type == element::Type_t::i32 || - m_index_element_type == element::Type_t::i64, + m_index_element_type == element::i32 || + m_index_element_type == element::i64, "Index element is neither i64 or i32."); PartialShape output_shape{PartialShape::dynamic()}; diff --git a/ngraph/core/src/op/util/logical_reduction.cpp b/ngraph/core/src/op/util/logical_reduction.cpp index c53f68be53bc97..dbb12c3e025bfc 100644 --- a/ngraph/core/src/op/util/logical_reduction.cpp +++ b/ngraph/core/src/op/util/logical_reduction.cpp @@ -28,7 +28,7 @@ op::util::LogicalReduction::LogicalReduction() op::util::LogicalReduction::LogicalReduction(const Output& arg, const AxisSet& reduction_axes) : Op({arg, op::Constant::create( - element::Type_t::i64, Shape{reduction_axes.size()}, reduction_axes.to_vector()) + element::i64, Shape{reduction_axes.size()}, reduction_axes.to_vector()) ->output(0)}) { add_provenance_group_member(input_value(1).get_node_shared_ptr()); @@ -57,10 +57,9 @@ const AxisSet op::util::LogicalReduction::get_reduction_axes() const void op::util::LogicalReduction::set_reduction_axes(const AxisSet& reduction_axes) { - this->input(1).replace_source_output(op::Constant::create(element::Type_t::i64, - Shape{reduction_axes.size()}, - reduction_axes.to_vector()) - ->output(0)); + this->input(1).replace_source_output( + op::Constant::create(element::i64, Shape{reduction_axes.size()}, reduction_axes.to_vector()) + ->output(0)); } void op::util::LogicalReduction::validate_and_infer_types() @@ -112,8 +111,8 @@ void op::util::LogicalReduction::validate_and_infer_types() set_input_is_relevant_to_shape(1); NODE_VALIDATION_CHECK(this, - get_input_element_type(0).compatible(element::Type_t::boolean), + get_input_element_type(0).compatible(element::boolean), "Input element type must be boolean."); - set_output_type(0, element::Type_t::boolean, result_shape); + set_output_type(0, element::boolean, result_shape); } diff --git a/ngraph/core/src/op/util/rnn_cell_base.cpp b/ngraph/core/src/op/util/rnn_cell_base.cpp index 12ae26565aaf31..9a9c56e018d8cb 100644 --- a/ngraph/core/src/op/util/rnn_cell_base.cpp +++ b/ngraph/core/src/op/util/rnn_cell_base.cpp @@ -46,7 +46,7 @@ std::shared_ptr ngraph::op::util::convert_lstm_node_format(const Output(element::Type_t::i64, Shape{}, axis); + auto axis_const = std::make_shared(element::i64, Shape{}, axis); OutputVector splitted_node = std::make_shared(node, axis_const, num_gates)->outputs(); OutputVector nodes_in_new_format(num_gates); diff --git a/ngraph/core/src/op/util/scatter_nd_base.cpp b/ngraph/core/src/op/util/scatter_nd_base.cpp index 7a95b0a35fad79..2bb6b9cb8af3ce 100644 --- a/ngraph/core/src/op/util/scatter_nd_base.cpp +++ b/ngraph/core/src/op/util/scatter_nd_base.cpp @@ -50,7 +50,7 @@ void op::util::ScatterNDBase::validate_and_infer_types() const PartialShape& updates_shape = get_input_partial_shape(UPDATES); NODE_VALIDATION_CHECK(this, - indices_et == element::Type_t::i32 || indices_et == element::Type_t::i64, + indices_et == element::i32 || indices_et == element::i64, "Indices element type must be i64 or i32"); NODE_VALIDATION_CHECK( diff --git a/ngraph/core/src/op/util/unary_elementwise_arithmetic.cpp b/ngraph/core/src/op/util/unary_elementwise_arithmetic.cpp index 1c79c1e76576d8..6ececc9b273ce7 100644 --- a/ngraph/core/src/op/util/unary_elementwise_arithmetic.cpp +++ b/ngraph/core/src/op/util/unary_elementwise_arithmetic.cpp @@ -36,7 +36,7 @@ void op::util::UnaryElementwiseArithmetic::validate_and_infer_elementwise_arithm PartialShape& args_pshape = std::get<1>(args_et_pshape); NODE_VALIDATION_CHECK(this, - args_et.is_dynamic() || args_et != element::Type_t::boolean, + args_et.is_dynamic() || args_et != element::boolean, "Arguments cannot have boolean element type (argument element type: ", args_et, ")."); diff --git a/ngraph/core/src/pass/convert_fp32_to_fp16.cpp b/ngraph/core/src/pass/convert_fp32_to_fp16.cpp index 8a908bb3cb3a42..60d87ed5c1d5e2 100644 --- a/ngraph/core/src/pass/convert_fp32_to_fp16.cpp +++ b/ngraph/core/src/pass/convert_fp32_to_fp16.cpp @@ -25,8 +25,8 @@ NGRAPH_RTTI_DEFINITION(ngraph::pass::ConvertFP32ToFP16, "ConvertFP32ToFP16", 0); void pass::ConvertFP32ToFP16::convert_constants_precision() { - auto constant = std::make_shared( - element::Type_t::f32, Shape{1}, std::vector{0}); + auto constant = + std::make_shared(element::f32, Shape{1}, std::vector{0}); ngraph::graph_rewrite_callback callback = [](pattern::Matcher& m) { auto constant = std::dynamic_pointer_cast(m.get_match_root()); @@ -35,7 +35,7 @@ void pass::ConvertFP32ToFP16::convert_constants_precision() return false; } - if (constant->get_element_type() == element::Type_t::f32) + if (constant->get_element_type() == element::f32) { auto data = constant->get_vector(); std::vector new_data(data.size()); @@ -44,7 +44,7 @@ void pass::ConvertFP32ToFP16::convert_constants_precision() new_data[i] = ngraph::float16(data[i]); } auto new_const = std::make_shared( - element::Type_t::f16, constant->get_shape(), new_data); + element::f16, constant->get_shape(), new_data); new_const->set_friendly_name(constant->get_friendly_name()); ngraph::replace_node(constant, new_const); return true; @@ -60,13 +60,13 @@ void pass::ConvertFP32ToFP16::convert_constants_precision() void pass::ConvertFP32ToFP16::convert_parameters_precision() { - auto constant = std::make_shared(element::Type_t::f32, Shape{1}); + auto constant = std::make_shared(element::f32, Shape{1}); ngraph::graph_rewrite_callback callback = [](pattern::Matcher& m) { auto parameter = std::dynamic_pointer_cast(m.get_match_root()); - if (parameter && parameter->get_element_type() == element::Type_t::f32) + if (parameter && parameter->get_element_type() == element::f32) { - parameter->set_element_type(element::Type_t::f16); + parameter->set_element_type(element::f16); return true; } return false; diff --git a/ngraph/core/src/pattern/op/label.cpp b/ngraph/core/src/pattern/op/label.cpp index 129e9d5c57a551..52d807afa74f47 100644 --- a/ngraph/core/src/pattern/op/label.cpp +++ b/ngraph/core/src/pattern/op/label.cpp @@ -68,6 +68,5 @@ std::shared_ptr pattern::any_input() std::shared_ptr pattern::any_input(const pattern::op::ValuePredicate& pred) { - return std::make_shared( - element::Type_t::dynamic, PartialShape::dynamic(), pred); + return std::make_shared(element::dynamic, PartialShape::dynamic(), pred); } diff --git a/ngraph/core/src/runtime/host_tensor.cpp b/ngraph/core/src/runtime/host_tensor.cpp index 2af9bcd4b39b77..5a8c7fe8505693 100644 --- a/ngraph/core/src/runtime/host_tensor.cpp +++ b/ngraph/core/src/runtime/host_tensor.cpp @@ -62,7 +62,7 @@ runtime::HostTensor::HostTensor(const element::Type& element_type, } runtime::HostTensor::HostTensor(const std::string& name) - : HostTensor(element::Type_t::dynamic, PartialShape::dynamic()) + : HostTensor(element::dynamic, PartialShape::dynamic()) { } diff --git a/ngraph/core/src/type/element_type.cpp b/ngraph/core/src/type/element_type.cpp index 9752c4e7b7552a..d70c963a5a1e69 100644 --- a/ngraph/core/src/type/element_type.cpp +++ b/ngraph/core/src/type/element_type.cpp @@ -85,6 +85,26 @@ static const element_types_map_t& get_type_info_map() return s_type_info_map; }; +std::vector element::Type::get_known_types() +{ + std::vector rc = {&element::dynamic, + &element::boolean, + &element::bf16, + &element::f16, + &element::f32, + &element::f64, + &element::i8, + &element::i16, + &element::i32, + &element::i64, + &element::u1, + &element::u8, + &element::u16, + &element::u32, + &element::u64}; + return rc; +} + element::Type::Type(size_t bitwidth, bool is_real, bool is_signed, @@ -245,7 +265,7 @@ bool element::Type::is_real() const bool element::Type::is_integral_number() const { - return is_integral() && (m_type != element::Type_t::boolean); + return is_integral() && (m_type != element::boolean); } bool element::Type::is_signed() const diff --git a/ngraph/core/src/util.cpp b/ngraph/core/src/util.cpp index 6ab6f7aef6484f..5cedea190ac94e 100644 --- a/ngraph/core/src/util.cpp +++ b/ngraph/core/src/util.cpp @@ -481,7 +481,7 @@ vector read_float_vector(shared_ptr tv) vector float_vec; element::Type element_type = tv->get_element_type(); - if (element_type == element::Type_t::boolean) + if (element_type == element::boolean) { vector vec = read_vector(tv); // Changed from vector ctor to explicit for loop to add static_cast @@ -491,12 +491,12 @@ vector read_float_vector(shared_ptr tv) float_vec.push_back(static_cast(value)); } } - else if (element_type == element::Type_t::bf16) + else if (element_type == element::bf16) { vector vec = read_vector(tv); float_vec = bfloat16::to_float_vector(vec); } - else if (element_type == element::Type_t::f16) + else if (element_type == element::f16) { vector vec = read_vector(tv); for (float16 value : vec) @@ -504,7 +504,7 @@ vector read_float_vector(shared_ptr tv) float_vec.push_back(static_cast(value)); } } - else if (element_type == element::Type_t::f32) + else if (element_type == element::f32) { vector vec = read_vector(tv); for (float value : vec) @@ -512,7 +512,7 @@ vector read_float_vector(shared_ptr tv) float_vec.push_back(static_cast(value)); } } - else if (element_type == element::Type_t::f64) + else if (element_type == element::f64) { vector vec = read_vector(tv); for (double value : vec) @@ -520,7 +520,7 @@ vector read_float_vector(shared_ptr tv) float_vec.push_back(static_cast(value)); } } - else if (element_type == element::Type_t::i8) + else if (element_type == element::i8) { vector vec = read_vector(tv); for (int8_t value : vec) @@ -528,7 +528,7 @@ vector read_float_vector(shared_ptr tv) float_vec.push_back(static_cast(value)); } } - else if (element_type == element::Type_t::i16) + else if (element_type == element::i16) { vector vec = read_vector(tv); for (int16_t value : vec) @@ -536,7 +536,7 @@ vector read_float_vector(shared_ptr tv) float_vec.push_back(static_cast(value)); } } - else if (element_type == element::Type_t::i32) + else if (element_type == element::i32) { vector vec = read_vector(tv); for (int32_t value : vec) @@ -544,7 +544,7 @@ vector read_float_vector(shared_ptr tv) float_vec.push_back(static_cast(value)); } } - else if (element_type == element::Type_t::i64) + else if (element_type == element::i64) { vector vec = read_vector(tv); for (int64_t value : vec) @@ -552,7 +552,7 @@ vector read_float_vector(shared_ptr tv) float_vec.push_back(static_cast(value)); } } - else if (element_type == element::Type_t::u8) + else if (element_type == element::u8) { vector vec = read_vector(tv); for (uint8_t value : vec) @@ -560,7 +560,7 @@ vector read_float_vector(shared_ptr tv) float_vec.push_back(static_cast(value)); } } - else if (element_type == element::Type_t::u16) + else if (element_type == element::u16) { vector vec = read_vector(tv); for (uint16_t value : vec) @@ -568,7 +568,7 @@ vector read_float_vector(shared_ptr tv) float_vec.push_back(static_cast(value)); } } - else if (element_type == element::Type_t::u32) + else if (element_type == element::u32) { vector vec = read_vector(tv); for (uint32_t value : vec) @@ -576,7 +576,7 @@ vector read_float_vector(shared_ptr tv) float_vec.push_back(static_cast(value)); } } - else if (element_type == element::Type_t::u64) + else if (element_type == element::u64) { vector vec = read_vector(tv); for (uint64_t value : vec) @@ -597,7 +597,7 @@ vector read_index_vector(shared_ptr tv) vector index_vec; element::Type element_type = tv->get_element_type(); - if (element_type == element::Type_t::boolean) + if (element_type == element::boolean) { vector vec = read_vector(tv); // Changed from vector ctor to explicit for loop to add static_cast @@ -607,7 +607,7 @@ vector read_index_vector(shared_ptr tv) index_vec.push_back(static_cast(value)); } } - else if (element_type == element::Type_t::bf16) + else if (element_type == element::bf16) { vector vec = read_vector(tv); vector float_vec = bfloat16::to_float_vector(vec); @@ -616,7 +616,7 @@ vector read_index_vector(shared_ptr tv) index_vec.push_back(static_cast(value)); } } - else if (element_type == element::Type_t::f16) + else if (element_type == element::f16) { vector vec = read_vector(tv); for (float16 value : vec) @@ -624,7 +624,7 @@ vector read_index_vector(shared_ptr tv) index_vec.push_back(static_cast(static_cast(value))); } } - else if (element_type == element::Type_t::f32) + else if (element_type == element::f32) { vector vec = read_vector(tv); for (float value : vec) @@ -632,7 +632,7 @@ vector read_index_vector(shared_ptr tv) index_vec.push_back(static_cast(value)); } } - else if (element_type == element::Type_t::f64) + else if (element_type == element::f64) { vector vec = read_vector(tv); for (double value : vec) @@ -640,7 +640,7 @@ vector read_index_vector(shared_ptr tv) index_vec.push_back(static_cast(value)); } } - else if (element_type == element::Type_t::i8) + else if (element_type == element::i8) { vector vec = read_vector(tv); for (int8_t value : vec) @@ -648,7 +648,7 @@ vector read_index_vector(shared_ptr tv) index_vec.push_back(static_cast(value)); } } - else if (element_type == element::Type_t::i16) + else if (element_type == element::i16) { vector vec = read_vector(tv); for (int16_t value : vec) @@ -656,7 +656,7 @@ vector read_index_vector(shared_ptr tv) index_vec.push_back(static_cast(value)); } } - else if (element_type == element::Type_t::i32) + else if (element_type == element::i32) { vector vec = read_vector(tv); for (int32_t value : vec) @@ -664,11 +664,11 @@ vector read_index_vector(shared_ptr tv) index_vec.push_back(static_cast(value)); } } - else if (element_type == element::Type_t::i64) + else if (element_type == element::i64) { index_vec = read_vector(tv); } - else if (element_type == element::Type_t::u8) + else if (element_type == element::u8) { vector vec = read_vector(tv); for (uint8_t value : vec) @@ -676,7 +676,7 @@ vector read_index_vector(shared_ptr tv) index_vec.push_back(static_cast(value)); } } - else if (element_type == element::Type_t::u16) + else if (element_type == element::u16) { vector vec = read_vector(tv); for (uint16_t value : vec) @@ -684,7 +684,7 @@ vector read_index_vector(shared_ptr tv) index_vec.push_back(static_cast(value)); } } - else if (element_type == element::Type_t::u32) + else if (element_type == element::u32) { vector vec = read_vector(tv); for (uint32_t value : vec) @@ -692,7 +692,7 @@ vector read_index_vector(shared_ptr tv) index_vec.push_back(static_cast(value)); } } - else if (element_type == element::Type_t::u64) + else if (element_type == element::u64) { vector vec = read_vector(tv); for (uint64_t value : vec) diff --git a/ngraph/frontend/onnx_import/include/onnx_import/core/tensor.hpp b/ngraph/frontend/onnx_import/include/onnx_import/core/tensor.hpp index d8415d54319d2d..67890b719b5e28 100644 --- a/ngraph/frontend/onnx_import/include/onnx_import/core/tensor.hpp +++ b/ngraph/frontend/onnx_import/include/onnx_import/core/tensor.hpp @@ -531,7 +531,7 @@ namespace ngraph return static_cast(m_tensor_proto->data_type()); } - element::Type get_ng_type() const + const element::Type& get_ng_type() const { if (!m_tensor_proto->has_data_type()) { @@ -540,29 +540,29 @@ namespace ngraph switch (m_tensor_proto->data_type()) { case ONNX_NAMESPACE::TensorProto_DataType::TensorProto_DataType_BOOL: - return element::Type_t::boolean; + return element::boolean; case ONNX_NAMESPACE::TensorProto_DataType::TensorProto_DataType_FLOAT: - return element::Type_t::f32; + return element::f32; case ONNX_NAMESPACE::TensorProto_DataType::TensorProto_DataType_FLOAT16: - return element::Type_t::f16; + return element::f16; case ONNX_NAMESPACE::TensorProto_DataType::TensorProto_DataType_DOUBLE: - return element::Type_t::f64; + return element::f64; case ONNX_NAMESPACE::TensorProto_DataType::TensorProto_DataType_INT8: - return element::Type_t::i8; + return element::i8; case ONNX_NAMESPACE::TensorProto_DataType::TensorProto_DataType_INT16: - return element::Type_t::i16; + return element::i16; case ONNX_NAMESPACE::TensorProto_DataType::TensorProto_DataType_INT32: - return element::Type_t::i32; + return element::i32; case ONNX_NAMESPACE::TensorProto_DataType::TensorProto_DataType_INT64: - return element::Type_t::i64; + return element::i64; case ONNX_NAMESPACE::TensorProto_DataType::TensorProto_DataType_UINT8: - return element::Type_t::u8; + return element::u8; case ONNX_NAMESPACE::TensorProto_DataType::TensorProto_DataType_UINT16: - return element::Type_t::u16; + return element::u16; case ONNX_NAMESPACE::TensorProto_DataType::TensorProto_DataType_UINT32: - return element::Type_t::u32; + return element::u32; case ONNX_NAMESPACE::TensorProto_DataType::TensorProto_DataType_UINT64: - return element::Type_t::u64; + return element::u64; case ONNX_NAMESPACE::TensorProto_DataType::TensorProto_DataType_UNDEFINED: throw error::tensor::data_type_undefined{}; default: throw error::tensor::unsupported_data_type{m_tensor_proto->data_type()}; @@ -575,29 +575,29 @@ namespace ngraph switch (m_tensor_proto->data_type()) { case ONNX_NAMESPACE::TensorProto_DataType::TensorProto_DataType_BOOL: - return make_ng_constant(element::Type_t::boolean); + return make_ng_constant(element::boolean); case ONNX_NAMESPACE::TensorProto_DataType::TensorProto_DataType_FLOAT: - return make_ng_constant(element::Type_t::f32); + return make_ng_constant(element::f32); case ONNX_NAMESPACE::TensorProto_DataType::TensorProto_DataType_FLOAT16: - return make_ng_constant(element::Type_t::f16); + return make_ng_constant(element::f16); case ONNX_NAMESPACE::TensorProto_DataType::TensorProto_DataType_DOUBLE: - return make_ng_constant(element::Type_t::f64); + return make_ng_constant(element::f64); case ONNX_NAMESPACE::TensorProto_DataType::TensorProto_DataType_INT8: - return make_ng_constant(element::Type_t::i8); + return make_ng_constant(element::i8); case ONNX_NAMESPACE::TensorProto_DataType::TensorProto_DataType_INT16: - return make_ng_constant(element::Type_t::i16); + return make_ng_constant(element::i16); case ONNX_NAMESPACE::TensorProto_DataType::TensorProto_DataType_INT32: - return make_ng_constant(element::Type_t::i32); + return make_ng_constant(element::i32); case ONNX_NAMESPACE::TensorProto_DataType::TensorProto_DataType_INT64: - return make_ng_constant(element::Type_t::i64); + return make_ng_constant(element::i64); case ONNX_NAMESPACE::TensorProto_DataType::TensorProto_DataType_UINT8: - return make_ng_constant(element::Type_t::u8); + return make_ng_constant(element::u8); case ONNX_NAMESPACE::TensorProto_DataType::TensorProto_DataType_UINT16: - return make_ng_constant(element::Type_t::u16); + return make_ng_constant(element::u16); case ONNX_NAMESPACE::TensorProto_DataType::TensorProto_DataType_UINT32: - return make_ng_constant(element::Type_t::u32); + return make_ng_constant(element::u32); case ONNX_NAMESPACE::TensorProto_DataType::TensorProto_DataType_UINT64: - return make_ng_constant(element::Type_t::u64); + return make_ng_constant(element::u64); default: throw error::tensor::unsupported_data_type{m_tensor_proto->data_type()}; } } diff --git a/ngraph/frontend/onnx_import/include/onnx_import/core/value_info.hpp b/ngraph/frontend/onnx_import/include/onnx_import/core/value_info.hpp index c45287d988b6c4..1d98c16d364128 100644 --- a/ngraph/frontend/onnx_import/include/onnx_import/core/value_info.hpp +++ b/ngraph/frontend/onnx_import/include/onnx_import/core/value_info.hpp @@ -75,7 +75,7 @@ namespace ngraph const std::string& get_name() const { return m_value_info_proto->name(); } const PartialShape& get_shape() const { return m_partial_shape; } - element::Type get_element_type() const + const element::Type& get_element_type() const { if (!m_value_info_proto->type().tensor_type().has_elem_type()) { diff --git a/ngraph/frontend/onnx_import/include/onnx_import/op/gather.hpp b/ngraph/frontend/onnx_import/include/onnx_import/op/gather.hpp index 6556db9864c25b..762d3b6c91686d 100644 --- a/ngraph/frontend/onnx_import/include/onnx_import/op/gather.hpp +++ b/ngraph/frontend/onnx_import/include/onnx_import/op/gather.hpp @@ -43,8 +43,7 @@ namespace ngraph return {std::make_shared( data, indices, - default_opset::Constant::create( - element::Type_t::i64, Shape{}, {valid_axis}))}; + default_opset::Constant::create(element::i64, Shape{}, {valid_axis}))}; } } // namespace set_1 diff --git a/ngraph/frontend/onnx_import/include/onnx_import/op/identity.hpp b/ngraph/frontend/onnx_import/include/onnx_import/op/identity.hpp index 3a4ab0174a0cb1..079148225dcc0a 100644 --- a/ngraph/frontend/onnx_import/include/onnx_import/op/identity.hpp +++ b/ngraph/frontend/onnx_import/include/onnx_import/op/identity.hpp @@ -33,10 +33,10 @@ namespace ngraph inline OutputVector identity(const Node& node) { auto input = node.get_ng_inputs().at(0); - if (input.get_element_type() == ngraph::element::Type_t::boolean) + if (input.get_element_type() == ngraph::element::boolean) { - const auto logic_zero = default_opset::Constant::create( - ngraph::element::Type_t::boolean, {}, {false}); + const auto logic_zero = + default_opset::Constant::create(ngraph::element::boolean, {}, {false}); return {std::make_shared(input, logic_zero)}; } const auto zero = diff --git a/ngraph/frontend/onnx_import/include/onnx_import/utils/common.hpp b/ngraph/frontend/onnx_import/include/onnx_import/utils/common.hpp index 45ef95a7328c8d..a0157a2c0f92ae 100644 --- a/ngraph/frontend/onnx_import/include/onnx_import/utils/common.hpp +++ b/ngraph/frontend/onnx_import/include/onnx_import/utils/common.hpp @@ -37,7 +37,7 @@ namespace ngraph { namespace common { - const ngraph::element::Type get_ngraph_element_type(std::int64_t onnx_type); + const ngraph::element::Type& get_ngraph_element_type(std::int64_t onnx_type); /// \brief Return a monotonic sequence. /// diff --git a/ngraph/frontend/onnx_import/src/op/constant.cpp b/ngraph/frontend/onnx_import/src/op/constant.cpp index 2a33e52232a48d..3a1718f6154fe2 100644 --- a/ngraph/frontend/onnx_import/src/op/constant.cpp +++ b/ngraph/frontend/onnx_import/src/op/constant.cpp @@ -62,84 +62,84 @@ namespace ngraph inline std::shared_ptr make_ng_constant(const Tensor& tensor) { - return __make_ng_constant(element::Type_t::f16, tensor); + return __make_ng_constant(element::f16, tensor); } template <> inline std::shared_ptr make_ng_constant(const Tensor& tensor) { - return __make_ng_constant(element::Type_t::f32, tensor); + return __make_ng_constant(element::f32, tensor); } template <> inline std::shared_ptr make_ng_constant(const Tensor& tensor) { - return __make_ng_constant(element::Type_t::f64, tensor); + return __make_ng_constant(element::f64, tensor); } template <> inline std::shared_ptr make_ng_constant(const Tensor& tensor) { - return __make_ng_constant(element::Type_t::i8, tensor); + return __make_ng_constant(element::i8, tensor); } template <> inline std::shared_ptr make_ng_constant(const Tensor& tensor) { - return __make_ng_constant(element::Type_t::i16, tensor); + return __make_ng_constant(element::i16, tensor); } template <> inline std::shared_ptr make_ng_constant(const Tensor& tensor) { - return __make_ng_constant(element::Type_t::i32, tensor); + return __make_ng_constant(element::i32, tensor); } template <> inline std::shared_ptr make_ng_constant(const Tensor& tensor) { - return __make_ng_constant(element::Type_t::i64, tensor); + return __make_ng_constant(element::i64, tensor); } template <> inline std::shared_ptr make_ng_constant(const Tensor& tensor) { - return __make_ng_constant(element::Type_t::u8, tensor); + return __make_ng_constant(element::u8, tensor); } template <> inline std::shared_ptr make_ng_constant(const Tensor& tensor) { - return __make_ng_constant(element::Type_t::u16, tensor); + return __make_ng_constant(element::u16, tensor); } template <> inline std::shared_ptr make_ng_constant(const Tensor& tensor) { - return __make_ng_constant(element::Type_t::u32, tensor); + return __make_ng_constant(element::u32, tensor); } template <> inline std::shared_ptr make_ng_constant(const Tensor& tensor) { - return __make_ng_constant(element::Type_t::u64, tensor); + return __make_ng_constant(element::u64, tensor); } template <> inline std::shared_ptr make_ng_constant(const Tensor& tensor) { - return __make_ng_constant(element::Type_t::boolean, tensor); + return __make_ng_constant(element::boolean, tensor); } inline std::shared_ptr diff --git a/ngraph/frontend/onnx_import/src/op/constant_of_shape.cpp b/ngraph/frontend/onnx_import/src/op/constant_of_shape.cpp index 8b33b027fd9251..cf6b91f10978f1 100644 --- a/ngraph/frontend/onnx_import/src/op/constant_of_shape.cpp +++ b/ngraph/frontend/onnx_import/src/op/constant_of_shape.cpp @@ -39,8 +39,7 @@ namespace ngraph } else { - constant_value = - default_opset::Constant::create(element::Type_t::f32, {}, {0}); + constant_value = default_opset::Constant::create(element::f32, {}, {0}); } return {std::make_shared(constant_value, node.get_ng_inputs().at(0))}; diff --git a/ngraph/frontend/onnx_import/src/op/conv_integer.cpp b/ngraph/frontend/onnx_import/src/op/conv_integer.cpp index e6b52ea5acb11c..76d55a15618769 100644 --- a/ngraph/frontend/onnx_import/src/op/conv_integer.cpp +++ b/ngraph/frontend/onnx_import/src/op/conv_integer.cpp @@ -63,11 +63,10 @@ namespace ngraph padding_above); const Strides default_data_dilation_strides(input.get_shape().size() - 2, 1); - auto scale_one = make_constant(ngraph::element::Type_t::f32, Shape{}, 1); + auto scale_one = make_constant(ngraph::element::f32, Shape{}, 1); auto input_zero_point = make_constant(input.get_element_type(), Shape{}, 0); auto filters_zero_point = make_constant(filters.get_element_type(), Shape{}, 0); - auto output_zero_point = - make_constant(ngraph::element::Type_t::i32, Shape{}, 0); + auto output_zero_point = make_constant(ngraph::element::i32, Shape{}, 0); if (num_inputs == 2) { @@ -85,7 +84,7 @@ namespace ngraph filters_zero_point, scale_one, output_zero_point, - ngraph::element::Type_t::i32, + ngraph::element::i32, ngraph::AxisSet{}, ngraph::AxisSet{}, ngraph::AxisSet{})}; @@ -111,7 +110,7 @@ namespace ngraph filters_zero_point, scale_one, output_zero_point, - ngraph::element::Type_t::i32, + ngraph::element::i32, ngraph::AxisSet{}, ngraph::AxisSet{}, ngraph::AxisSet{})}; diff --git a/ngraph/frontend/onnx_import/src/op/conv_transpose.cpp b/ngraph/frontend/onnx_import/src/op/conv_transpose.cpp index 3bc7974a1a6e75..8b7b2ea7516095 100644 --- a/ngraph/frontend/onnx_import/src/op/conv_transpose.cpp +++ b/ngraph/frontend/onnx_import/src/op/conv_transpose.cpp @@ -74,7 +74,7 @@ namespace ngraph data, filters, default_opset::Constant::create( - element::Type_t::i64, Shape{output_shape.size()}, output_shape), + element::i64, Shape{output_shape.size()}, output_shape), strides, dilations, auto_pad_type, @@ -113,7 +113,7 @@ namespace ngraph data, filters, default_opset::Constant::create( - element::Type_t::i64, Shape{output_shape.size()}, output_shape), + element::i64, Shape{output_shape.size()}, output_shape), strides, pads_begin, pads_end, @@ -144,10 +144,10 @@ namespace ngraph std::make_shared(filters); const auto filters_rank = std::make_shared(filters_shape); - const auto one_node = default_opset::Constant::create( - element::Type_t::i64, Shape{1}, {1}); - const auto zero_node = default_opset::Constant::create( - element::Type_t::i64, Shape{1}, {0}); + const auto one_node = + default_opset::Constant::create(element::i64, Shape{1}, {1}); + const auto zero_node = + default_opset::Constant::create(element::i64, Shape{1}, {0}); std::shared_ptr in_c_dim = std::make_shared( @@ -166,8 +166,8 @@ namespace ngraph std::vector{0}); // end mask // Apply shape layout transformation: - const auto groups_node = default_opset::Constant::create( - element::Type_t::i64, Shape{1}, {groups}); + const auto groups_node = + default_opset::Constant::create(element::i64, Shape{1}, {groups}); in_c_dim = std::make_shared(in_c_dim, groups_node); @@ -192,7 +192,7 @@ namespace ngraph new_bias_shape[1] = conv_pshape[1].get_length(); bias_shape_node = default_opset::Constant::create( - element::Type_t::i64, Shape{new_bias_shape.size()}, new_bias_shape); + element::i64, Shape{new_bias_shape.size()}, new_bias_shape); } else { @@ -201,10 +201,10 @@ namespace ngraph std::make_shared(conv_shape); // Prepare new bias shape base: [1, 1, 1, 1, ... ] - const auto one_node = default_opset::Constant::create( - element::Type_t::i64, Shape{1}, {1}); - const auto two_node = default_opset::Constant::create( - element::Type_t::i64, Shape{1}, {2}); + const auto one_node = + default_opset::Constant::create(element::i64, Shape{1}, {1}); + const auto two_node = + default_opset::Constant::create(element::i64, Shape{1}, {2}); const auto remaining_shape_length = std::make_shared(conv_rank, two_node); const auto remaining_bias_shape_ones = diff --git a/ngraph/frontend/onnx_import/src/op/cum_sum.cpp b/ngraph/frontend/onnx_import/src/op/cum_sum.cpp index 06337928d74467..3397f666b96a53 100644 --- a/ngraph/frontend/onnx_import/src/op/cum_sum.cpp +++ b/ngraph/frontend/onnx_import/src/op/cum_sum.cpp @@ -41,8 +41,8 @@ namespace ngraph } else { - axis = default_opset::Constant::create( - element::Type_t::i64, Shape{}, {0}); // default + axis = + default_opset::Constant::create(element::i64, Shape{}, {0}); // default } return OutputVector{ std::make_shared(data, axis, exclusive, reverse)}; diff --git a/ngraph/frontend/onnx_import/src/op/dequantize_linear.cpp b/ngraph/frontend/onnx_import/src/op/dequantize_linear.cpp index 9ea2340ba0334e..cbe0c49e529f93 100644 --- a/ngraph/frontend/onnx_import/src/op/dequantize_linear.cpp +++ b/ngraph/frontend/onnx_import/src/op/dequantize_linear.cpp @@ -41,17 +41,17 @@ namespace ngraph { auto zero_point = inputs[2]; - if (zero_point.get_element_type() != element::Type_t::f32) + if (zero_point.get_element_type() != element::f32) { - zero_point = std::make_shared( - zero_point, element::Type_t::f32); + zero_point = + std::make_shared(zero_point, element::f32); } return zero_point; } else { - return default_opset::Constant::create(element::Type_t::f32, Shape{}, {0}); + return default_opset::Constant::create(element::f32, Shape{}, {0}); } } } @@ -70,13 +70,12 @@ namespace ngraph const auto scale = inputs[1]; const auto zero_point = get_zero_point(inputs); - common::validate_scalar_input("Dequantization scale", - scale.get_node_shared_ptr(), - {element::Type_t::f32}); + common::validate_scalar_input( + "Dequantization scale", scale.get_node_shared_ptr(), {element::f32}); common::validate_scalar_input("Zero point", zero_point.get_node_shared_ptr()); const auto converted_x = - std::make_shared(x, element::Type_t::f32); + std::make_shared(x, element::f32); return {std::make_shared( std::make_shared(converted_x, zero_point), scale)}; @@ -164,7 +163,7 @@ namespace ngraph } const auto target_shape = default_opset::Constant::create( - element::Type_t::i64, Shape{target_dims.size()}, target_dims); + element::i64, Shape{target_dims.size()}, target_dims); return std::make_shared(input, target_shape, true); } @@ -199,7 +198,7 @@ namespace ngraph zero_point = reshape_input(zero_point, axis, x_shape); const auto converted_x = - std::make_shared(x, element::Type_t::f32); + std::make_shared(x, element::f32); return {std::make_shared( std::make_shared(converted_x, zero_point), scale)}; diff --git a/ngraph/frontend/onnx_import/src/op/global_average_pool.cpp b/ngraph/frontend/onnx_import/src/op/global_average_pool.cpp index 8b68552de159e2..30b6d4b317f6b0 100644 --- a/ngraph/frontend/onnx_import/src/op/global_average_pool.cpp +++ b/ngraph/frontend/onnx_import/src/op/global_average_pool.cpp @@ -57,7 +57,7 @@ namespace ngraph auto reduce_axes_vector = std::vector(data_spatial_rank); std::iota(reduce_axes_vector.begin(), reduce_axes_vector.end(), 2); auto reduce_axes = default_opset::Constant::create( - element::Type_t::i64, Shape{data_spatial_rank}, reduce_axes_vector); + element::i64, Shape{data_spatial_rank}, reduce_axes_vector); return {std::make_shared(data, reduce_axes, true)}; } diff --git a/ngraph/frontend/onnx_import/src/op/global_max_pool.cpp b/ngraph/frontend/onnx_import/src/op/global_max_pool.cpp index 9b92ee22eb9758..53af9d601142c3 100644 --- a/ngraph/frontend/onnx_import/src/op/global_max_pool.cpp +++ b/ngraph/frontend/onnx_import/src/op/global_max_pool.cpp @@ -57,7 +57,7 @@ namespace ngraph auto reduce_axes_vector = std::vector(data_spatial_rank); std::iota(reduce_axes_vector.begin(), reduce_axes_vector.end(), 2); auto reduce_axes = default_opset::Constant::create( - element::Type_t::i64, Shape{data_spatial_rank}, reduce_axes_vector); + element::i64, Shape{data_spatial_rank}, reduce_axes_vector); return {std::make_shared(data, reduce_axes, true)}; } diff --git a/ngraph/frontend/onnx_import/src/op/hardmax.cpp b/ngraph/frontend/onnx_import/src/op/hardmax.cpp index 9baf0dcfe76c8f..0f4ea157b5875d 100644 --- a/ngraph/frontend/onnx_import/src/op/hardmax.cpp +++ b/ngraph/frontend/onnx_import/src/op/hardmax.cpp @@ -50,22 +50,22 @@ namespace ngraph std::make_shared(coerced_tensor); Output row_size = std::make_shared( coerced_tensor_shape, - default_opset::Constant::create(element::Type_t::i64, {1}, {1}), - default_opset::Constant::create(element::Type_t::i64, {}, {0})); + default_opset::Constant::create(element::i64, {1}, {1}), + default_opset::Constant::create(element::i64, {}, {0})); row_size = ngraph::onnx_import::reshape::interpret_as_scalar(row_size); const auto indices_axis = 1; const auto topk = std::make_shared( coerced_tensor, - default_opset::Constant::create(ngraph::element::Type_t::i64, Shape{}, {1}), + default_opset::Constant::create(ngraph::element::i64, Shape{}, {1}), indices_axis, default_opset::TopK::Mode::MAX, default_opset::TopK::SortType::NONE); const auto on_value = - default_opset::Constant::create(ngraph::element::Type_t::i64, Shape{}, {1}); + default_opset::Constant::create(ngraph::element::i64, Shape{}, {1}); const auto off_value = - default_opset::Constant::create(ngraph::element::Type_t::i64, Shape{}, {0}); + default_opset::Constant::create(ngraph::element::i64, Shape{}, {0}); const auto results = std::make_shared( topk->output(1), row_size, on_value, off_value, indices_axis); diff --git a/ngraph/frontend/onnx_import/src/op/instance_norm.cpp b/ngraph/frontend/onnx_import/src/op/instance_norm.cpp index 4a1ca7aba6ac1a..9516ea52a9ae5e 100644 --- a/ngraph/frontend/onnx_import/src/op/instance_norm.cpp +++ b/ngraph/frontend/onnx_import/src/op/instance_norm.cpp @@ -99,7 +99,7 @@ namespace ngraph if (data_pshape.is_static()) { data_shape_node = std::make_shared( - element::Type_t::i64, + element::i64, Shape{static_cast(data_pshape.rank().get_length())}, data_pshape.to_shape()); } @@ -112,13 +112,11 @@ namespace ngraph scale = std::make_shared( scale, data_shape_node, - std::make_shared( - element::Type_t::i64, Shape{1}, 1)); + std::make_shared(element::i64, Shape{1}, 1)); bias = std::make_shared( bias, data_shape_node, - std::make_shared( - element::Type_t::i64, Shape{1}, 1)); + std::make_shared(element::i64, Shape{1}, 1)); // scale * mvn + bias std::shared_ptr result = diff --git a/ngraph/frontend/onnx_import/src/op/log_softmax.cpp b/ngraph/frontend/onnx_import/src/op/log_softmax.cpp index a083613e2be5fd..c19ca2b86c0d4e 100644 --- a/ngraph/frontend/onnx_import/src/op/log_softmax.cpp +++ b/ngraph/frontend/onnx_import/src/op/log_softmax.cpp @@ -32,8 +32,7 @@ namespace ngraph { const auto coerced_data = ngraph::builder::opset1::flatten(data, axis); - const auto axis_1 = - default_opset::Constant::create(element::Type_t::i64, Shape{1}, {1}); + const auto axis_1 = default_opset::Constant::create(element::i64, Shape{1}, {1}); const auto max = std::make_shared(coerced_data, axis_1, true); diff --git a/ngraph/frontend/onnx_import/src/op/loop.cpp b/ngraph/frontend/onnx_import/src/op/loop.cpp index 519b28c6318efe..2039b12b46ff65 100644 --- a/ngraph/frontend/onnx_import/src/op/loop.cpp +++ b/ngraph/frontend/onnx_import/src/op/loop.cpp @@ -62,7 +62,7 @@ namespace ngraph ->input_value(1) .get_node_shared_ptr(); if (ngraph::op::is_constant(second_input) && - second_input->get_element_type() == element::Type_t::boolean && + second_input->get_element_type() == element::boolean && as_type_ptr(second_input) ->cast_vector() .at(0) == false) @@ -90,8 +90,7 @@ namespace ngraph if (ngraph::op::is_null(ng_inputs.at(0))) // trip count skipped { // -1 means infinite Loop - trip_count = - ngraph::op::Constant::create(ngraph::element::Type_t::i64, {1}, {-1}); + trip_count = ngraph::op::Constant::create(ngraph::element::i64, {1}, {-1}); } else { @@ -103,8 +102,8 @@ namespace ngraph if (ngraph::op::is_null( ng_inputs.at(1).get_node_shared_ptr())) // termination condition skipped { - termination_cond = ngraph::op::Constant::create( - ngraph::element::Type_t::boolean, {1}, {true}); + termination_cond = + ngraph::op::Constant::create(ngraph::element::boolean, {1}, {true}); } else if (ngraph::op::is_constant(ng_inputs.at(1).get_node_shared_ptr()) && as_type_ptr( @@ -131,8 +130,8 @@ namespace ngraph } const int64_t concat_axis = 0; - const auto concat_axis_const = ngraph::op::Constant::create( - ngraph::element::Type_t::i64, {1}, {concat_axis}); + const auto concat_axis_const = + ngraph::op::Constant::create(ngraph::element::i64, {1}, {concat_axis}); // provide scalar handing for scan outputs for (size_t i = loop_carried_dependencies.size() + 1; i < body_outputs.size(); ++i) @@ -150,8 +149,8 @@ namespace ngraph // optimization allow to improve nG Loop shape inference if (is_termination_condition_always_true(body_loop_out_cond)) { - body_outputs[0] = ngraph::op::Constant::create( - ngraph::element::Type_t::boolean, {1}, {true}); + body_outputs[0] = + ngraph::op::Constant::create(ngraph::element::boolean, {1}, {true}); } CHECK_VALID_NODE(node, diff --git a/ngraph/frontend/onnx_import/src/op/lp_norm.cpp b/ngraph/frontend/onnx_import/src/op/lp_norm.cpp index 11f941fcf136c0..3bdd9a71a673fa 100644 --- a/ngraph/frontend/onnx_import/src/op/lp_norm.cpp +++ b/ngraph/frontend/onnx_import/src/op/lp_norm.cpp @@ -58,14 +58,12 @@ namespace ngraph "Only normalization of 1st or 2nd order is supported."); const auto normalize_axis_const = - default_opset::Constant::create(element::Type_t::i64, {}, {normalize_axis}); + default_opset::Constant::create(element::i64, {}, {normalize_axis}); std::shared_ptr norm = ngraph::builder::opset1::lp_norm( data, normalize_axis_const, static_cast(p_norm)); - const auto target_shape = - default_opset::Constant::create(element::Type_t::i64, - Shape{size_t(data_rank_value)}, - data_shape.to_shape()); + const auto target_shape = default_opset::Constant::create( + element::i64, Shape{size_t(data_rank_value)}, data_shape.to_shape()); // Create a default axes order matching the data tensor rank and erase the // element at the 'normalize_axis' position. The erased element indicates the @@ -76,7 +74,7 @@ namespace ngraph axes_values.erase(axes_values.begin() + normalize_axis); const auto axes_mapping = default_opset::Constant::create( - element::Type_t::i64, Shape{axes_values.size()}, axes_values); + element::i64, Shape{axes_values.size()}, axes_values); norm = std::make_shared( norm, target_shape, axes_mapping); diff --git a/ngraph/frontend/onnx_import/src/op/lp_pool.cpp b/ngraph/frontend/onnx_import/src/op/lp_pool.cpp index 65ab066240cc24..aa7337572d0dd4 100644 --- a/ngraph/frontend/onnx_import/src/op/lp_pool.cpp +++ b/ngraph/frontend/onnx_import/src/op/lp_pool.cpp @@ -75,7 +75,7 @@ namespace ngraph output_shape.at(0) = data_shape[0].get_length(); const auto reshape_pattern = default_opset::Constant::create( - element::Type_t::i64, Shape{output_shape.size()}, output_shape); + element::i64, Shape{output_shape.size()}, output_shape); slice = std::make_shared(slice, reshape_pattern, false); diff --git a/ngraph/frontend/onnx_import/src/op/lstm.cpp b/ngraph/frontend/onnx_import/src/op/lstm.cpp index e53963ba0b5e89..c67b260e78c16e 100644 --- a/ngraph/frontend/onnx_import/src/op/lstm.cpp +++ b/ngraph/frontend/onnx_import/src/op/lstm.cpp @@ -211,7 +211,7 @@ namespace ngraph m_input_map[LSTMInput::LSTM_INPUT_SEQ_LENGTHS] = default_opset::Constant::create( - element::Type_t::i32, + element::i32, Shape{m_dim_map[LSTMInputDimension::BATCH_SIZE]}, std::vector( m_dim_map[LSTMInputDimension::BATCH_SIZE], diff --git a/ngraph/frontend/onnx_import/src/op/non_max_suppression.cpp b/ngraph/frontend/onnx_import/src/op/non_max_suppression.cpp index 3a3383913283ca..b41b409a13677f 100644 --- a/ngraph/frontend/onnx_import/src/op/non_max_suppression.cpp +++ b/ngraph/frontend/onnx_import/src/op/non_max_suppression.cpp @@ -49,7 +49,7 @@ namespace ngraph else { max_output_boxes_per_class = - default_opset::Constant::create(element::Type_t::i64, Shape{}, {0}); + default_opset::Constant::create(element::i64, Shape{}, {0}); } Output iou_threshold; @@ -61,7 +61,7 @@ namespace ngraph else { iou_threshold = - default_opset::Constant::create(element::Type_t::f32, Shape{}, {.0f}); + default_opset::Constant::create(element::f32, Shape{}, {.0f}); } Output score_threshold; @@ -73,7 +73,7 @@ namespace ngraph else { score_threshold = - default_opset::Constant::create(element::Type_t::f32, Shape{}, {.0f}); + default_opset::Constant::create(element::f32, Shape{}, {.0f}); } const auto center_point_box = diff --git a/ngraph/frontend/onnx_import/src/op/non_zero.cpp b/ngraph/frontend/onnx_import/src/op/non_zero.cpp index e72b5da9208c0e..2c96ec1c106326 100644 --- a/ngraph/frontend/onnx_import/src/op/non_zero.cpp +++ b/ngraph/frontend/onnx_import/src/op/non_zero.cpp @@ -30,7 +30,7 @@ namespace ngraph OutputVector non_zero(const Node& node) { const auto data = node.get_ng_inputs().at(0); - return {std::make_shared(data, element::Type_t::i64)}; + return {std::make_shared(data, element::i64)}; } } // namespace set_1 diff --git a/ngraph/frontend/onnx_import/src/op/onehot.cpp b/ngraph/frontend/onnx_import/src/op/onehot.cpp index 018b4d99fbe060..229b4ed6d90485 100644 --- a/ngraph/frontend/onnx_import/src/op/onehot.cpp +++ b/ngraph/frontend/onnx_import/src/op/onehot.cpp @@ -32,14 +32,13 @@ namespace ngraph OutputVector onehot(const Node& node) { OutputVector inputs{node.get_ng_inputs()}; - auto indices = std::make_shared(inputs.at(0), - element::Type_t::i64); + auto indices = + std::make_shared(inputs.at(0), element::i64); auto depth = reshape::interpret_as_scalar(inputs.at(1)); // Rank 1 tensor containing exactly two elements: [off_value, on_value] auto values = inputs.at(2); - auto split_axis = - default_opset::Constant::create(element::Type_t::i64, {}, {0}); + auto split_axis = default_opset::Constant::create(element::i64, {}, {0}); auto off_on_values = std::make_shared(values, split_axis, 2); auto off_value = reshape::interpret_as_scalar(off_on_values->output(0)); diff --git a/ngraph/frontend/onnx_import/src/op/org.openvinotoolkit/group_norm.cpp b/ngraph/frontend/onnx_import/src/op/org.openvinotoolkit/group_norm.cpp index 225c6ddc1f52f1..bdc0294d92fa86 100644 --- a/ngraph/frontend/onnx_import/src/op/org.openvinotoolkit/group_norm.cpp +++ b/ngraph/frontend/onnx_import/src/op/org.openvinotoolkit/group_norm.cpp @@ -55,13 +55,13 @@ namespace ngraph new_shape.push_back(shape[i]); } return default_opset::Constant::create( - element::Type_t::i64, Shape{new_shape.size()}, new_shape); + element::i64, Shape{new_shape.size()}, new_shape); } auto shape = std::make_shared(data); auto splits = builder::opset1::split(shape, rank_size); - auto num_groups_const = default_opset::Constant::create( - element::Type_t::i64, Shape{1}, {num_groups}); + auto num_groups_const = + default_opset::Constant::create(element::i64, Shape{1}, {num_groups}); NodeVector new_shape{ splits[0].get_node_shared_ptr(), num_groups_const, @@ -98,7 +98,7 @@ namespace ngraph { auto shape = data_pshape.to_shape(); data_shape_node = default_opset::Constant::create( - element::Type_t::u64, Shape{shape.size()}, shape); + element::u64, Shape{shape.size()}, shape); } else { diff --git a/ngraph/frontend/onnx_import/src/op/org.openvinotoolkit/normalize.cpp b/ngraph/frontend/onnx_import/src/op/org.openvinotoolkit/normalize.cpp index ffec771b1421fc..226658d7f55e82 100644 --- a/ngraph/frontend/onnx_import/src/op/org.openvinotoolkit/normalize.cpp +++ b/ngraph/frontend/onnx_import/src/op/org.openvinotoolkit/normalize.cpp @@ -66,7 +66,7 @@ namespace ngraph weights_shape.push_back(1); } auto new_shape = std::make_shared( - element::Type_t::i64, Shape{weights_shape.size()}, weights_shape); + element::i64, Shape{weights_shape.size()}, weights_shape); weights = std::make_shared(inputs[1], new_shape, true); } @@ -75,7 +75,7 @@ namespace ngraph if (!across_spatial) { axes = std::make_shared( - element::Type_t::i64, Shape{1}, std::vector{1}); + element::i64, Shape{1}, std::vector{1}); } else { diff --git a/ngraph/frontend/onnx_import/src/op/org.openvinotoolkit/prior_box.cpp b/ngraph/frontend/onnx_import/src/op/org.openvinotoolkit/prior_box.cpp index 222e84cf598b36..33ae3dc25a4b97 100644 --- a/ngraph/frontend/onnx_import/src/op/org.openvinotoolkit/prior_box.cpp +++ b/ngraph/frontend/onnx_import/src/op/org.openvinotoolkit/prior_box.cpp @@ -36,9 +36,9 @@ namespace ngraph return std::make_shared( node, default_opset::Constant::create( - element::Type_t::i64, Shape{1}, std::vector{start}), + element::i64, Shape{1}, std::vector{start}), default_opset::Constant::create( - element::Type_t::i64, Shape{1}, std::vector{end}), + element::i64, Shape{1}, std::vector{end}), std::vector{0}, // begin mask std::vector{0}); // end mask } @@ -75,7 +75,7 @@ namespace ngraph attrs.density = node.get_attribute_value>("density", {}); auto axes = default_opset::Constant::create( - element::Type_t::i64, Shape{1}, std::vector{0}); + element::i64, Shape{1}, std::vector{0}); return {std::make_shared( std::make_shared( diff --git a/ngraph/frontend/onnx_import/src/op/org.openvinotoolkit/swish.cpp b/ngraph/frontend/onnx_import/src/op/org.openvinotoolkit/swish.cpp index 0856d25b223314..486551f24e453c 100644 --- a/ngraph/frontend/onnx_import/src/op/org.openvinotoolkit/swish.cpp +++ b/ngraph/frontend/onnx_import/src/op/org.openvinotoolkit/swish.cpp @@ -40,8 +40,7 @@ namespace ngraph } else { - beta = - default_opset::Constant::create(element::Type_t::f32, Shape{}, {1.0}); + beta = default_opset::Constant::create(element::f32, Shape{}, {1.0}); } return {std::make_shared(ng_inputs.at(0), beta)}; diff --git a/ngraph/frontend/onnx_import/src/op/pad.cpp b/ngraph/frontend/onnx_import/src/op/pad.cpp index 73b264893171fe..2143d194f4af2e 100644 --- a/ngraph/frontend/onnx_import/src/op/pad.cpp +++ b/ngraph/frontend/onnx_import/src/op/pad.cpp @@ -83,13 +83,9 @@ namespace ngraph return {std::make_shared( data, std::make_shared( - element::Type_t::i64, - ngraph::Shape{padding_below.size()}, - padding_below), + element::i64, ngraph::Shape{padding_below.size()}, padding_below), std::make_shared( - element::Type_t::i64, - ngraph::Shape{padding_above.size()}, - padding_above), + element::i64, ngraph::Shape{padding_above.size()}, padding_above), std::make_shared( data.get_element_type(), ngraph::Shape{}, std::vector{value}), pad_mode)}; @@ -129,20 +125,20 @@ namespace ngraph pads_vector.begin() + half_size, pads_vector.end()); padding_begin = default_opset::Constant::create( - element::Type_t::i64, ngraph::Shape{half_size}, padding_begin_values); + element::i64, ngraph::Shape{half_size}, padding_begin_values); padding_end = default_opset::Constant::create( - element::Type_t::i64, ngraph::Shape{half_size}, padding_end_values); + element::i64, ngraph::Shape{half_size}, padding_end_values); } else { - auto axis = default_opset::Constant::create( - element::Type_t::i64, ngraph::Shape{}, {0}); + auto axis = + default_opset::Constant::create(element::i64, ngraph::Shape{}, {0}); OutputVector padding = builder::opset1::split(pads, 2, 0); - padding_begin = std::make_shared( - padding.at(0), element::Type_t::i64); - padding_end = std::make_shared( - padding.at(1), element::Type_t::i64); + padding_begin = + std::make_shared(padding.at(0), element::i64); + padding_end = + std::make_shared(padding.at(1), element::i64); } const std::string mode = diff --git a/ngraph/frontend/onnx_import/src/op/quant_conv.cpp b/ngraph/frontend/onnx_import/src/op/quant_conv.cpp index 042679e0c21bf6..a7478b9a8dc658 100644 --- a/ngraph/frontend/onnx_import/src/op/quant_conv.cpp +++ b/ngraph/frontend/onnx_import/src/op/quant_conv.cpp @@ -69,15 +69,15 @@ namespace ngraph const Output& bias = nullptr) { ngraph::element::Type output_type; - if (data.get_element_type() == ngraph::element::Type_t::u8 && - filters.get_element_type() == ngraph::element::Type_t::i8) + if (data.get_element_type() == ngraph::element::u8 && + filters.get_element_type() == ngraph::element::i8) { - output_type = ngraph::element::Type_t::i8; + output_type = ngraph::element::i8; } - else if (data.get_element_type() == ngraph::element::Type_t::u8 && - filters.get_element_type() == ngraph::element::Type_t::u8) + else if (data.get_element_type() == ngraph::element::u8 && + filters.get_element_type() == ngraph::element::u8) { - output_type = ngraph::element::Type_t::u8; + output_type = ngraph::element::u8; } if (groups > 1) { diff --git a/ngraph/frontend/onnx_import/src/op/quantize_linear.cpp b/ngraph/frontend/onnx_import/src/op/quantize_linear.cpp index 5f4126f667da82..4115b9c62bb793 100644 --- a/ngraph/frontend/onnx_import/src/op/quantize_linear.cpp +++ b/ngraph/frontend/onnx_import/src/op/quantize_linear.cpp @@ -48,7 +48,7 @@ namespace ngraph else { return std::make_shared( - element::Type_t::u8, Shape{1}, std::uint8_t(0)); + element::u8, Shape{1}, std::uint8_t(0)); } } @@ -59,8 +59,7 @@ namespace ngraph CHECK_VALID_NODE( onnx_node, y_zero_point_et.is_static() && - (y_zero_point_et == element::Type_t::u8 || - y_zero_point_et == element::Type_t::i8), + (y_zero_point_et == element::u8 || y_zero_point_et == element::i8), "\"y_zero_point\" input data type must be static and of 8-bit " "integer type."); } @@ -73,10 +72,9 @@ namespace ngraph CHECK_VALID_NODE(onnx_node, y_scale_et.is_static(), "\"y_scale\" input data type must be static."); - if (y_scale_et != element::Type_t::f32) + if (y_scale_et != element::f32) { - return std::make_shared(y_scale, - element::Type_t::f32); + return std::make_shared(y_scale, element::f32); } return y_scale; } @@ -89,10 +87,9 @@ namespace ngraph data_et.is_static(), "\"x\" input data type must be static."); - if (data_et != element::Type_t::f32) + if (data_et != element::f32) { - return std::make_shared(data, - element::Type_t::f32); + return std::make_shared(data, element::f32); } return data; } @@ -104,7 +101,7 @@ namespace ngraph std::shared_ptr output_low; std::shared_ptr output_high; - if (destination_type == element::Type_t::i8) + if (destination_type == element::i8) { output_low = std::make_shared( data_type, Shape{1}, -128); diff --git a/ngraph/frontend/onnx_import/src/op/reduce.cpp b/ngraph/frontend/onnx_import/src/op/reduce.cpp index 9ee53014cf3479..28058c697e2f9d 100644 --- a/ngraph/frontend/onnx_import/src/op/reduce.cpp +++ b/ngraph/frontend/onnx_import/src/op/reduce.cpp @@ -61,7 +61,7 @@ namespace ngraph } return default_opset::Constant::create( - element::Type_t::i64, Shape{reduction_axes.size()}, reduction_axes); + element::i64, Shape{reduction_axes.size()}, reduction_axes); } template diff --git a/ngraph/frontend/onnx_import/src/op/reshape.cpp b/ngraph/frontend/onnx_import/src/op/reshape.cpp index 83e84ad78d45a4..df893c954e8585 100644 --- a/ngraph/frontend/onnx_import/src/op/reshape.cpp +++ b/ngraph/frontend/onnx_import/src/op/reshape.cpp @@ -51,7 +51,7 @@ namespace ngraph node.get_attribute_value>("shape", {}); pattern = default_opset::Constant::create( - element::Type_t::i64, Shape{output_shape.size()}, output_shape); + element::i64, Shape{output_shape.size()}, output_shape); } return {std::make_shared(data, pattern, true)}; diff --git a/ngraph/frontend/onnx_import/src/op/resize.cpp b/ngraph/frontend/onnx_import/src/op/resize.cpp index d84084b833e7e1..ff288d82d3fa42 100644 --- a/ngraph/frontend/onnx_import/src/op/resize.cpp +++ b/ngraph/frontend/onnx_import/src/op/resize.cpp @@ -166,7 +166,7 @@ namespace ngraph std::floor(data_static_shape.at(i) * scales_vector.at(i))); } auto output_shape_const = default_opset::Constant::create( - element::Type_t::u64, Shape({output_shape.size()}), output_shape); + element::u64, Shape({output_shape.size()}), output_shape); return output_shape_const; } @@ -175,8 +175,8 @@ namespace ngraph std::make_shared(data), scales.get_element_type()); const auto multiply = std::make_shared(shape_of_data, scales); - const auto output_shape = std::make_shared( - multiply, ngraph::element::Type_t::i64); + const auto output_shape = + std::make_shared(multiply, ngraph::element::i64); return output_shape; } @@ -207,20 +207,19 @@ namespace ngraph scales.push_back(scale); } auto scales_const = default_opset::Constant::create( - element::Type_t::f32, Shape({scales.size()}), scales); + element::f32, Shape({scales.size()}), scales); return scales_const; } const auto shape_of_data = std::make_shared( - std::make_shared(data), - ngraph::element::Type_t::f32); - const auto converted_sizes = std::make_shared( - sizes, ngraph::element::Type_t::f32); + std::make_shared(data), ngraph::element::f32); + const auto converted_sizes = + std::make_shared(sizes, ngraph::element::f32); const auto divide = std::make_shared(converted_sizes, shape_of_data); const auto eps_node = std::make_shared( - ngraph::element::Type_t::f32, Shape{}, epsilon); + ngraph::element::f32, Shape{}, epsilon); const auto scales = std::make_shared(divide, eps_node); return scales; diff --git a/ngraph/frontend/onnx_import/src/op/reverse_sequence.cpp b/ngraph/frontend/onnx_import/src/op/reverse_sequence.cpp index 1f7d45ae6e0f25..ad61af22bdaf4a 100644 --- a/ngraph/frontend/onnx_import/src/op/reverse_sequence.cpp +++ b/ngraph/frontend/onnx_import/src/op/reverse_sequence.cpp @@ -38,7 +38,7 @@ namespace ngraph const auto sequence_lengths = node.get_ng_inputs().at(1); // nGraph supports only int32 type of sequence_lengths const auto sequence_lengths_i32 = std::make_shared( - node.get_ng_inputs().at(1), element::Type_t::i32); + node.get_ng_inputs().at(1), element::i32); const auto data_rank = data.get_partial_shape().rank(); const auto batch_axis = node.get_attribute_value("batch_axis", 1); diff --git a/ngraph/frontend/onnx_import/src/op/scatter_elements.cpp b/ngraph/frontend/onnx_import/src/op/scatter_elements.cpp index 601429508089ea..984c6f1b9a8ed7 100644 --- a/ngraph/frontend/onnx_import/src/op/scatter_elements.cpp +++ b/ngraph/frontend/onnx_import/src/op/scatter_elements.cpp @@ -36,7 +36,7 @@ namespace ngraph const auto axis = node.get_attribute_value("axis", 0); const auto axis_node = - default_opset::Constant::create(element::Type_t::i64, Shape{}, {axis}); + default_opset::Constant::create(element::i64, Shape{}, {axis}); return {std::make_shared( data, indices, updates, axis_node)}; diff --git a/ngraph/frontend/onnx_import/src/op/shape.cpp b/ngraph/frontend/onnx_import/src/op/shape.cpp index f6643a972e1fee..c02df889f9a563 100644 --- a/ngraph/frontend/onnx_import/src/op/shape.cpp +++ b/ngraph/frontend/onnx_import/src/op/shape.cpp @@ -39,7 +39,7 @@ namespace ngraph { const auto static_data_shape = data_shape.to_shape(); - return {default_opset::Constant::create(ngraph::element::Type_t::i64, + return {default_opset::Constant::create(ngraph::element::i64, Shape{static_data_shape.size()}, static_data_shape)}; } diff --git a/ngraph/frontend/onnx_import/src/op/size.cpp b/ngraph/frontend/onnx_import/src/op/size.cpp index 1c892087489f9b..b1331f3c3af124 100644 --- a/ngraph/frontend/onnx_import/src/op/size.cpp +++ b/ngraph/frontend/onnx_import/src/op/size.cpp @@ -38,7 +38,7 @@ namespace ngraph static_cast(shape_size(data.get_shape()))}; return {std::make_shared( - ngraph::element::Type_t::i64, + ngraph::element::i64, Shape{}, std::vector{tensor_elements_count})}; } diff --git a/ngraph/frontend/onnx_import/src/op/slice.cpp b/ngraph/frontend/onnx_import/src/op/slice.cpp index 20ae2a65e2160f..20478b523419af 100644 --- a/ngraph/frontend/onnx_import/src/op/slice.cpp +++ b/ngraph/frontend/onnx_import/src/op/slice.cpp @@ -139,16 +139,15 @@ namespace ngraph // expected_output_shape: {3, 3, 1, 1} OutputVector adjusted_indices(slice_indices_length); std::vector target_axes(axes); - const auto gather_axis = - default_opset::Constant::create(element::Type_t::i64, {}, {0}); + const auto gather_axis = default_opset::Constant::create(element::i64, {}, {0}); int added_indices_number = 0; for (int i = 0; i < slice_indices_length; ++i) { if (std::find(std::begin(axes), std::end(axes), i) == axes.end()) { - adjusted_indices[i] = default_opset::Constant::create( - element::Type_t::i64, {1}, {fill_in_value}); + adjusted_indices[i] = + default_opset::Constant::create(element::i64, {1}, {fill_in_value}); target_axes.insert(std::next(target_axes.begin(), i), i); ++added_indices_number; } @@ -157,7 +156,7 @@ namespace ngraph adjusted_indices[i] = std::make_shared( indices, default_opset::Constant::create( - element::Type_t::i64, {1}, {i - added_indices_number}), + element::i64, {1}, {i - added_indices_number}), gather_axis); } } @@ -203,7 +202,7 @@ namespace ngraph "Data rank must be static when axes input is not provided"); const size_t data_rank_value = data_rank.get_length(); axes = default_opset::Constant::create( - element::Type_t::i64, + element::i64, {data_rank_value}, common::get_monotonic_range(data_rank_value)); } @@ -226,7 +225,7 @@ namespace ngraph else { steps = default_opset::Constant::create( - element::Type_t::i64, + element::i64, {slice_indices_length}, std::vector(slice_indices_length, 1)); } @@ -253,9 +252,9 @@ namespace ngraph std::shared_ptr starts = std::make_shared( - element::Type_t::i64, Shape{starts_atr.size()}, starts_atr); + element::i64, Shape{starts_atr.size()}, starts_atr); std::shared_ptr ends = std::make_shared( - element::Type_t::i64, Shape{ends_atr.size()}, ends_atr); + element::i64, Shape{ends_atr.size()}, ends_atr); auto axes = node.get_attribute_value>( "axes", std::vector()); @@ -278,7 +277,7 @@ namespace ngraph const auto begin_end_mask = axes_to_mask(normalized_axes, slice_indices_length); std::shared_ptr strides = default_opset::Constant::create( - element::Type_t::i64, + element::i64, Shape{slice_indices_length}, std::vector(slice_indices_length, 1)); diff --git a/ngraph/frontend/onnx_import/src/op/softmax.cpp b/ngraph/frontend/onnx_import/src/op/softmax.cpp index 24daa2cd1c66b1..87c7e5192f7521 100644 --- a/ngraph/frontend/onnx_import/src/op/softmax.cpp +++ b/ngraph/frontend/onnx_import/src/op/softmax.cpp @@ -32,8 +32,7 @@ namespace ngraph { const auto coerced_data = ngraph::builder::opset1::flatten(data, axis); - const auto axis_1 = - default_opset::Constant::create(element::Type_t::i64, Shape{1}, {1}); + const auto axis_1 = default_opset::Constant::create(element::i64, Shape{1}, {1}); const auto max = std::make_shared(coerced_data, axis_1, true); diff --git a/ngraph/frontend/onnx_import/src/op/squeeze.cpp b/ngraph/frontend/onnx_import/src/op/squeeze.cpp index 8dc6ac87b00ca0..035f5902957d70 100644 --- a/ngraph/frontend/onnx_import/src/op/squeeze.cpp +++ b/ngraph/frontend/onnx_import/src/op/squeeze.cpp @@ -39,7 +39,7 @@ namespace ngraph std::vector normalized_axes = ngraph::normalize_axes(node.get_description(), axes, data_rank); auto axes_node = std::make_shared( - element::Type_t::u64, Shape{normalized_axes.size()}, normalized_axes); + element::u64, Shape{normalized_axes.size()}, normalized_axes); return {std::make_shared(data, axes_node)}; } diff --git a/ngraph/frontend/onnx_import/src/op/tile.cpp b/ngraph/frontend/onnx_import/src/op/tile.cpp index 2d9faa381c73fb..e14af18e72629b 100644 --- a/ngraph/frontend/onnx_import/src/op/tile.cpp +++ b/ngraph/frontend/onnx_import/src/op/tile.cpp @@ -35,8 +35,7 @@ namespace ngraph // Workaround for backends which require repeats to be i64. // Remove the following line when no longer needed. - repeats = - std::make_shared(repeats, element::Type_t::i64); + repeats = std::make_shared(repeats, element::i64); return {std::make_shared(input, repeats)}; } diff --git a/ngraph/frontend/onnx_import/src/op/topk.cpp b/ngraph/frontend/onnx_import/src/op/topk.cpp index 3267b97f479fba..8dfb1ecb4ecc1e 100644 --- a/ngraph/frontend/onnx_import/src/op/topk.cpp +++ b/ngraph/frontend/onnx_import/src/op/topk.cpp @@ -63,8 +63,7 @@ namespace ngraph { auto data = node.get_ng_inputs().at(0); std::int64_t k{node.get_attribute_value("k")}; - auto k_node = - default_opset::Constant::create(element::Type_t::i64, Shape{}, {k}); + auto k_node = default_opset::Constant::create(element::i64, Shape{}, {k}); auto axis = get_axis(node); std::shared_ptr top_k = std::make_shared( @@ -73,7 +72,7 @@ namespace ngraph axis, default_opset::TopK::Mode::MAX, default_opset::TopK::SortType::SORT_VALUES, - element::Type_t::i64); + element::i64); return {top_k->output(0), top_k->output(1)}; } @@ -93,7 +92,7 @@ namespace ngraph axis, default_opset::TopK::Mode::MAX, default_opset::TopK::SortType::SORT_VALUES, - element::Type_t::i64); + element::i64); return {top_k->output(0), top_k->output(1)}; } @@ -121,7 +120,7 @@ namespace ngraph : default_opset::TopK::Mode::MIN; std::shared_ptr top_k = std::make_shared( - data, k, axis, mode, sort_type, element::Type_t::i64); + data, k, axis, mode, sort_type, element::i64); return {top_k->output(0), top_k->output(1)}; } diff --git a/ngraph/frontend/onnx_import/src/op/unsqueeze.cpp b/ngraph/frontend/onnx_import/src/op/unsqueeze.cpp index 150dd5684db8ec..ba2a64778e8648 100644 --- a/ngraph/frontend/onnx_import/src/op/unsqueeze.cpp +++ b/ngraph/frontend/onnx_import/src/op/unsqueeze.cpp @@ -35,7 +35,7 @@ namespace ngraph auto data = node.get_ng_inputs().at(0); auto axes = node.get_attribute_value>("axes", {}); auto axes_node = std::make_shared( - element::Type_t::i64, Shape{axes.size()}, axes); + element::i64, Shape{axes.size()}, axes); return {std::make_shared(data, axes_node)}; } diff --git a/ngraph/frontend/onnx_import/src/op/upsample.cpp b/ngraph/frontend/onnx_import/src/op/upsample.cpp index 5c635d71501c9f..ff749771b97997 100644 --- a/ngraph/frontend/onnx_import/src/op/upsample.cpp +++ b/ngraph/frontend/onnx_import/src/op/upsample.cpp @@ -111,26 +111,24 @@ namespace ngraph std::floor(data_static_shape.at(i) * scales.at(i))); } auto output_shape_const = default_opset::Constant::create( - element::Type_t::u64, Shape({output_shape.size()}), output_shape); + element::u64, Shape({output_shape.size()}), output_shape); const auto scales_const = default_opset::Constant::create( - ngraph::element::Type_t::f32, Shape({scales.size()}), scales); + ngraph::element::f32, Shape({scales.size()}), scales); return {std::make_shared( data, output_shape_const, scales_const, attrs)}; } const auto scales_const = default_opset::Constant::create( - ngraph::element::Type_t::f32, Shape({scales.size()}), scales); + ngraph::element::f32, Shape({scales.size()}), scales); auto shape_of_data = std::make_shared( - std::make_shared(data), - ngraph::element::Type_t::f32); + std::make_shared(data), ngraph::element::f32); auto multiply = std::make_shared(shape_of_data, scales_const); auto output_shape = std::make_shared( - std::make_shared(multiply), - ngraph::element::Type_t::i64); + std::make_shared(multiply), ngraph::element::i64); return {std::make_shared( data, output_shape, scales_const, attrs)}; @@ -190,20 +188,18 @@ namespace ngraph std::floor(data_static_shape.at(i) * scales_vector.at(i))); } auto output_shape_const = default_opset::Constant::create( - element::Type_t::u64, Shape({output_shape.size()}), output_shape); + element::u64, Shape({output_shape.size()}), output_shape); return {std::make_shared( data, output_shape_const, scales, attrs)}; } auto shape_of_data = std::make_shared( - std::make_shared(data), - ngraph::element::Type_t::f32); + std::make_shared(data), ngraph::element::f32); auto multiply = std::make_shared(shape_of_data, scales); auto output_shape = std::make_shared( - std::make_shared(multiply), - ngraph::element::Type_t::i64); + std::make_shared(multiply), ngraph::element::i64); return {std::make_shared( data, output_shape, scales, attrs)}; diff --git a/ngraph/frontend/onnx_import/src/utils/arg_min_max_factory.cpp b/ngraph/frontend/onnx_import/src/utils/arg_min_max_factory.cpp index ef7649e41a164c..c8695011ea9b65 100644 --- a/ngraph/frontend/onnx_import/src/utils/arg_min_max_factory.cpp +++ b/ngraph/frontend/onnx_import/src/utils/arg_min_max_factory.cpp @@ -45,22 +45,20 @@ namespace ngraph ArgMinMaxFactory::make_topk_subgraph(default_opset::TopK::Mode mode) const { const auto k_node = - default_opset::Constant::create(ngraph::element::Type_t::i64, Shape{}, {1}); + default_opset::Constant::create(ngraph::element::i64, Shape{}, {1}); const auto topk = std::make_shared( m_input_node, k_node, m_axis, mode, default_opset::TopK::SortType::NONE); if (m_keep_dims == 0) { - const auto axis_to_remove = default_opset::Constant::create( - element::Type_t::u64, Shape{}, {topk->get_axis()}); + const auto axis_to_remove = + default_opset::Constant::create(element::u64, Shape{}, {topk->get_axis()}); const auto reshaped_indices = std::make_shared(topk->output(1), axis_to_remove); - return std::make_shared(reshaped_indices, - element::Type_t::i64); + return std::make_shared(reshaped_indices, element::i64); } - return std::make_shared(topk->output(1), - element::Type_t::i64); + return std::make_shared(topk->output(1), element::i64); } } } diff --git a/ngraph/frontend/onnx_import/src/utils/common.cpp b/ngraph/frontend/onnx_import/src/utils/common.cpp index 882914fa49032a..a25248e2fba9c2 100644 --- a/ngraph/frontend/onnx_import/src/utils/common.cpp +++ b/ngraph/frontend/onnx_import/src/utils/common.cpp @@ -25,24 +25,23 @@ namespace ngraph { namespace common { - const ngraph::element::Type get_ngraph_element_type(int64_t onnx_type) + const ngraph::element::Type& get_ngraph_element_type(int64_t onnx_type) { switch (onnx_type) { - case ONNX_NAMESPACE::TensorProto_DataType_BOOL: return element::Type_t::boolean; - case ONNX_NAMESPACE::TensorProto_DataType_DOUBLE: return element::Type_t::f64; - case ONNX_NAMESPACE::TensorProto_DataType_FLOAT16: return element::Type_t::f16; - case ONNX_NAMESPACE::TensorProto_DataType_FLOAT: return element::Type_t::f32; - case ONNX_NAMESPACE::TensorProto_DataType_INT8: return element::Type_t::i8; - case ONNX_NAMESPACE::TensorProto_DataType_INT16: return element::Type_t::i16; - case ONNX_NAMESPACE::TensorProto_DataType_INT32: return element::Type_t::i32; - case ONNX_NAMESPACE::TensorProto_DataType_INT64: return element::Type_t::i64; - case ONNX_NAMESPACE::TensorProto_DataType_UINT8: return element::Type_t::u8; - case ONNX_NAMESPACE::TensorProto_DataType_UINT16: return element::Type_t::u16; - case ONNX_NAMESPACE::TensorProto_DataType_UINT32: return element::Type_t::u32; - case ONNX_NAMESPACE::TensorProto_DataType_UINT64: return element::Type_t::u64; - case ONNX_NAMESPACE::TensorProto_DataType_UNDEFINED: - return element::Type_t::dynamic; + case ONNX_NAMESPACE::TensorProto_DataType_BOOL: return element::boolean; + case ONNX_NAMESPACE::TensorProto_DataType_DOUBLE: return element::f64; + case ONNX_NAMESPACE::TensorProto_DataType_FLOAT16: return element::f16; + case ONNX_NAMESPACE::TensorProto_DataType_FLOAT: return element::f32; + case ONNX_NAMESPACE::TensorProto_DataType_INT8: return element::i8; + case ONNX_NAMESPACE::TensorProto_DataType_INT16: return element::i16; + case ONNX_NAMESPACE::TensorProto_DataType_INT32: return element::i32; + case ONNX_NAMESPACE::TensorProto_DataType_INT64: return element::i64; + case ONNX_NAMESPACE::TensorProto_DataType_UINT8: return element::u8; + case ONNX_NAMESPACE::TensorProto_DataType_UINT16: return element::u16; + case ONNX_NAMESPACE::TensorProto_DataType_UINT32: return element::u32; + case ONNX_NAMESPACE::TensorProto_DataType_UINT64: return element::u64; + case ONNX_NAMESPACE::TensorProto_DataType_UNDEFINED: return element::dynamic; } #ifdef NGRAPH_USE_PROTOBUF_LITE throw ngraph_error("unsupported element type"); @@ -62,15 +61,15 @@ namespace ngraph const auto range_value = get_monotonic_range( value.get_partial_shape().rank().get_length(), start_value, step); return default_opset::Constant::create( - element::Type_t::i64, {range_value.size()}, range_value); + element::i64, {range_value.size()}, range_value); } const auto value_shape = std::make_shared(value); return std::make_shared( - default_opset::Constant::create(element::Type_t::i64, {}, {start_value}), + default_opset::Constant::create(element::i64, {}, {start_value}), std::make_shared(value_shape), - default_opset::Constant::create(element::Type_t::i64, {}, {step}), - element::Type_t::i64); + default_opset::Constant::create(element::i64, {}, {step}), + element::i64); } void validate_scalar_input(const char* input_name, diff --git a/ngraph/frontend/onnx_import/src/utils/recurrent.cpp b/ngraph/frontend/onnx_import/src/utils/recurrent.cpp index d4fbd62c9c60f7..9d5ca4bb96dc88 100644 --- a/ngraph/frontend/onnx_import/src/utils/recurrent.cpp +++ b/ngraph/frontend/onnx_import/src/utils/recurrent.cpp @@ -82,9 +82,7 @@ namespace ngraph else { m_map[OpInput::SEQ_LENGTHS] = std::make_shared( - element::Type_t::i32, - Shape{batch_size}, - m_map[OpInput::X].get_shape().at(1)); + element::i32, Shape{batch_size}, m_map[OpInput::X].get_shape().at(1)); } // The initial value of the hidden. if (ng_inputs.size() > 5 && !ngraph::op::is_null(ng_inputs.at(5))) diff --git a/ngraph/frontend/onnx_import/src/utils/reshape.cpp b/ngraph/frontend/onnx_import/src/utils/reshape.cpp index 4f42aa4573fddf..ddd4674a868f94 100644 --- a/ngraph/frontend/onnx_import/src/utils/reshape.cpp +++ b/ngraph/frontend/onnx_import/src/utils/reshape.cpp @@ -126,10 +126,8 @@ namespace ngraph // reshape the node with shape {C} to {1, C, 1, 1, ..., 1} std::vector reshape_pattern_values(expected_rank, 1U); reshape_pattern_values[1] = node.get_shape().front(); - const auto reshape_pattern = - default_opset::Constant::create(element::Type_t::u64, - Shape{reshape_pattern_values.size()}, - reshape_pattern_values); + const auto reshape_pattern = default_opset::Constant::create( + element::u64, Shape{reshape_pattern_values.size()}, reshape_pattern_values); return std::make_shared(node, reshape_pattern, false); } return node; diff --git a/ngraph/python/src/pyngraph/ops/constant.cpp b/ngraph/python/src/pyngraph/ops/constant.cpp index 4e061767912ff4..1f6dd6b08504af 100644 --- a/ngraph/python/src/pyngraph/ops/constant.cpp +++ b/ngraph/python/src/pyngraph/ops/constant.cpp @@ -117,52 +117,51 @@ void regclass_pyngraph_op_Constant(py::module m) constant.def("get_vector", [](const ngraph::op::Constant& self) { auto element_type = self.get_element_type(); - if (element_type == ngraph::element::Type_t::boolean) + if (element_type == ngraph::element::boolean) { return _cast_vector(self); } - else if (element_type == ngraph::element::Type_t::f16) + else if (element_type == ngraph::element::f16) { return _cast_vector(self); } - else if (element_type == ngraph::element::Type_t::f32) + else if (element_type == ngraph::element::f32) { return _cast_vector(self); } - else if (element_type == ngraph::element::Type_t::f64) + else if (element_type == ngraph::element::f64) { return _cast_vector(self); } - else if (element_type == ngraph::element::Type_t::i8) + else if (element_type == ngraph::element::i8) { return _cast_vector(self); } - else if (element_type == ngraph::element::Type_t::i16) + else if (element_type == ngraph::element::i16) { return _cast_vector(self); } - else if (element_type == ngraph::element::Type_t::i32) + else if (element_type == ngraph::element::i32) { return _cast_vector(self); } - else if (element_type == ngraph::element::Type_t::i64) + else if (element_type == ngraph::element::i64) { return _cast_vector(self); } - else if (element_type == ngraph::element::Type_t::u8 || - element_type == ngraph::element::Type_t::u1) + else if (element_type == ngraph::element::u8 || element_type == ngraph::element::u1) { return _cast_vector(self); } - else if (element_type == ngraph::element::Type_t::u16) + else if (element_type == ngraph::element::u16) { return _cast_vector(self); } - else if (element_type == ngraph::element::Type_t::u32) + else if (element_type == ngraph::element::u32) { return _cast_vector(self); } - else if (element_type == ngraph::element::Type_t::u64) + else if (element_type == ngraph::element::u64) { return _cast_vector(self); } @@ -175,52 +174,51 @@ void regclass_pyngraph_op_Constant(py::module m) // Provide buffer access constant.def_buffer([](const ngraph::op::Constant& self) -> py::buffer_info { auto element_type = self.get_element_type(); - if (element_type == ngraph::element::Type_t::boolean) + if (element_type == ngraph::element::boolean) { return _get_buffer_info(self); } - else if (element_type == ngraph::element::Type_t::f16) + else if (element_type == ngraph::element::f16) { return _get_buffer_info(self); } - else if (element_type == ngraph::element::Type_t::f32) + else if (element_type == ngraph::element::f32) { return _get_buffer_info(self); } - else if (element_type == ngraph::element::Type_t::f64) + else if (element_type == ngraph::element::f64) { return _get_buffer_info(self); } - else if (element_type == ngraph::element::Type_t::i8) + else if (element_type == ngraph::element::i8) { return _get_buffer_info(self); } - else if (element_type == ngraph::element::Type_t::i16) + else if (element_type == ngraph::element::i16) { return _get_buffer_info(self); } - else if (element_type == ngraph::element::Type_t::i32) + else if (element_type == ngraph::element::i32) { return _get_buffer_info(self); } - else if (element_type == ngraph::element::Type_t::i64) + else if (element_type == ngraph::element::i64) { return _get_buffer_info(self); } - else if (element_type == ngraph::element::Type_t::u8 || - element_type == ngraph::element::Type_t::u1) + else if (element_type == ngraph::element::u8 || element_type == ngraph::element::u1) { return _get_buffer_info(self); } - else if (element_type == ngraph::element::Type_t::u16) + else if (element_type == ngraph::element::u16) { return _get_buffer_info(self); } - else if (element_type == ngraph::element::Type_t::u32) + else if (element_type == ngraph::element::u32) { return _get_buffer_info(self); } - else if (element_type == ngraph::element::Type_t::u64) + else if (element_type == ngraph::element::u64) { return _get_buffer_info(self); } diff --git a/ngraph/python/src/pyngraph/types/element_type.cpp b/ngraph/python/src/pyngraph/types/element_type.cpp index d5f25dad35b7b3..ce72aacc7158c7 100644 --- a/ngraph/python/src/pyngraph/types/element_type.cpp +++ b/ngraph/python/src/pyngraph/types/element_type.cpp @@ -27,19 +27,19 @@ void regclass_pyngraph_Type(py::module m) { py::class_> type(m, "Type"); type.doc() = "ngraph.impl.Type wraps ngraph::element::Type"; - type.attr("boolean") = ngraph::element::Type(ngraph::element::Type_t::boolean); - type.attr("f16") = ngraph::element::Type(ngraph::element::Type_t::f16); - type.attr("f32") = ngraph::element::Type(ngraph::element::Type_t::f32); - type.attr("f64") = ngraph::element::Type(ngraph::element::Type_t::f64); - type.attr("i8") = ngraph::element::Type(ngraph::element::Type_t::i8); - type.attr("i16") = ngraph::element::Type(ngraph::element::Type_t::i16); - type.attr("i32") = ngraph::element::Type(ngraph::element::Type_t::i32); - type.attr("i64") = ngraph::element::Type(ngraph::element::Type_t::i64); - type.attr("u1") = ngraph::element::Type(ngraph::element::Type_t::u1); - type.attr("u8") = ngraph::element::Type(ngraph::element::Type_t::u8); - type.attr("u16") = ngraph::element::Type(ngraph::element::Type_t::u16); - type.attr("u32") = ngraph::element::Type(ngraph::element::Type_t::u32); - type.attr("u64") = ngraph::element::Type(ngraph::element::Type_t::u64); + type.attr("boolean") = ngraph::element::boolean; + type.attr("f16") = ngraph::element::f16; + type.attr("f32") = ngraph::element::f32; + type.attr("f64") = ngraph::element::f64; + type.attr("i8") = ngraph::element::i8; + type.attr("i16") = ngraph::element::i16; + type.attr("i32") = ngraph::element::i32; + type.attr("i64") = ngraph::element::i64; + type.attr("u1") = ngraph::element::u1; + type.attr("u8") = ngraph::element::u8; + type.attr("u16") = ngraph::element::u16; + type.attr("u32") = ngraph::element::u32; + type.attr("u64") = ngraph::element::u64; type.def("__repr__", [](const ngraph::element::Type& self) { std::string bitwidth = std::to_string(self.bitwidth()); diff --git a/ngraph/test/attributes.cpp b/ngraph/test/attributes.cpp index 34867de416b367..88efac34f63ef8 100644 --- a/ngraph/test/attributes.cpp +++ b/ngraph/test/attributes.cpp @@ -268,7 +268,7 @@ class Oracle : public op::Op m_result_vector); } - void validate_and_infer_types() override { set_output_type(0, element::Type_t::i64, {}); } + void validate_and_infer_types() override { set_output_type(0, element::i64, {}); } bool visit_attributes(AttributeVisitor& visitor) override { visitor.on_attribute("turing_model", m_turing_model); @@ -348,13 +348,13 @@ constexpr NodeTypeInfo Oracle::type_info; TEST(attributes, user_op) { FactoryRegistry::get().register_factory(); - auto program = make_shared(element::Type_t::i32, Shape{200}); - auto data = make_shared(element::Type_t::i32, Shape{200}); + auto program = make_shared(element::i32, Shape{200}); + auto data = make_shared(element::i32, Shape{200}); auto result = make_shared(data); auto oracle = make_shared(program, data, TuringModel::XL1200, - element::Type_t::f32, + element::f32, element::Type_t::i64, "12AU7", true, @@ -438,8 +438,8 @@ TEST(attributes, user_op) TEST(attributes, matmul_op) { FactoryRegistry::get().register_factory(); - auto A = make_shared(element::Type_t::f32, Shape{0, 2}); - auto B = make_shared(element::Type_t::f32, Shape{2, 0}); + auto A = make_shared(element::f32, Shape{0, 2}); + auto B = make_shared(element::f32, Shape{2, 0}); bool transpose_a = true; bool transpose_b = true; @@ -492,7 +492,7 @@ TEST(attributes, partial_shape) TEST(attributes, max_pool_op) { FactoryRegistry::get().register_factory(); - auto data = make_shared(element::Type_t::f32, Shape{64, 3, 5}); + auto data = make_shared(element::f32, Shape{64, 3, 5}); auto strides = Strides{2}; auto pads_begin = Shape{1}; @@ -517,8 +517,8 @@ TEST(attributes, max_pool_op) TEST(attributes, mod_op) { FactoryRegistry::get().register_factory(); - auto A = make_shared(element::Type_t::f32, Shape{0, 2}); - auto B = make_shared(element::Type_t::f32, Shape{2, 0}); + auto A = make_shared(element::f32, Shape{0, 2}); + auto B = make_shared(element::f32, Shape{2, 0}); auto auto_broadcast = op::AutoBroadcastType::NUMPY; @@ -532,8 +532,8 @@ TEST(attributes, mod_op) TEST(attributes, non_max_suppression_op_custom_attributes) { FactoryRegistry::get().register_factory(); - auto boxes = make_shared(element::Type_t::f32, Shape{1, 1, 4}); - auto scores = make_shared(element::Type_t::f32, Shape{1, 1, 1}); + auto boxes = make_shared(element::f32, Shape{1, 1, 4}); + auto scores = make_shared(element::f32, Shape{1, 1, 1}); auto box_encoding = opset1::NonMaxSuppression::BoxEncodingType::CENTER; bool sort_result_descending = false; @@ -550,8 +550,8 @@ TEST(attributes, non_max_suppression_op_custom_attributes) TEST(attributes, non_max_suppression_op_default_attributes) { FactoryRegistry::get().register_factory(); - auto boxes = make_shared(element::Type_t::f32, Shape{1, 1, 4}); - auto scores = make_shared(element::Type_t::f32, Shape{1, 1, 1}); + auto boxes = make_shared(element::f32, Shape{1, 1, 4}); + auto scores = make_shared(element::f32, Shape{1, 1, 1}); auto nms = make_shared(boxes, scores); NodeBuilder builder(nms); @@ -564,12 +564,12 @@ TEST(attributes, non_max_suppression_op_default_attributes) TEST(attributes, non_max_suppression_v3_op_custom_attributes) { FactoryRegistry::get().register_factory(); - auto boxes = make_shared(element::Type_t::f32, Shape{1, 1, 4}); - auto scores = make_shared(element::Type_t::f32, Shape{1, 1, 1}); + auto boxes = make_shared(element::f32, Shape{1, 1, 4}); + auto scores = make_shared(element::f32, Shape{1, 1, 1}); auto box_encoding = opset3::NonMaxSuppression::BoxEncodingType::CENTER; bool sort_result_descending = false; - element::Type output_type = element::Type_t::i32; + element::Type output_type = element::i32; auto nms = make_shared( boxes, scores, box_encoding, sort_result_descending, output_type); @@ -584,8 +584,8 @@ TEST(attributes, non_max_suppression_v3_op_custom_attributes) TEST(attributes, non_max_suppression_v3_op_default_attributes) { FactoryRegistry::get().register_factory(); - auto boxes = make_shared(element::Type_t::f32, Shape{1, 1, 4}); - auto scores = make_shared(element::Type_t::f32, Shape{1, 1, 1}); + auto boxes = make_shared(element::f32, Shape{1, 1, 4}); + auto scores = make_shared(element::f32, Shape{1, 1, 1}); auto nms = make_shared(boxes, scores); NodeBuilder builder(nms); @@ -599,8 +599,8 @@ TEST(attributes, non_max_suppression_v3_op_default_attributes) TEST(attributes, normalize_l2_op) { FactoryRegistry::get().register_factory(); - auto data = make_shared(element::Type_t::i32, Shape{1}); - const auto axes = make_shared(element::Type_t::i32, Shape{}, vector{0}); + auto data = make_shared(element::i32, Shape{1}); + const auto axes = make_shared(element::i32, Shape{}, vector{0}); float eps{1e-6f}; auto eps_mode = op::EpsMode::ADD; @@ -616,10 +616,10 @@ TEST(attributes, normalize_l2_op) TEST(attributes, one_hot_op) { FactoryRegistry::get().register_factory(); - auto indices = make_shared(element::Type_t::i64, Shape{1, 3, 2, 3}); - auto depth = op::Constant::create(element::Type_t::i64, Shape{}, {4}); - auto on_value = op::Constant::create(element::Type_t::f32, Shape{}, {1.0f}); - auto off_value = op::Constant::create(element::Type_t::f32, Shape{}, {0.0f}); + auto indices = make_shared(element::i64, Shape{1, 3, 2, 3}); + auto depth = op::Constant::create(element::i64, Shape{}, {4}); + auto on_value = op::Constant::create(element::f32, Shape{}, {1.0f}); + auto off_value = op::Constant::create(element::f32, Shape{}, {0.0f}); int64_t axis = 3; @@ -633,9 +633,9 @@ TEST(attributes, one_hot_op) TEST(attributes, pad_op) { FactoryRegistry::get().register_factory(); - auto arg = make_shared(element::Type_t::f32, Shape{1, 2, 3}); - auto pads_begin = make_shared(element::Type_t::i64, Shape{1}); - auto pads_end = make_shared(element::Type_t::i64, Shape{1}); + auto arg = make_shared(element::f32, Shape{1, 2, 3}); + auto pads_begin = make_shared(element::i64, Shape{1}); + auto pads_end = make_shared(element::i64, Shape{1}); auto pad_mode = op::PadMode::EDGE; @@ -649,8 +649,8 @@ TEST(attributes, pad_op) TEST(attributes, psroi_pooling_op) { FactoryRegistry::get().register_factory(); - auto input = make_shared(element::Type_t::f32, Shape{1, 1024, 63, 38}); - auto coords = make_shared(element::Type_t::f32, Shape{300, 5}); + auto input = make_shared(element::f32, Shape{1, 1024, 63, 38}); + auto coords = make_shared(element::f32, Shape{300, 5}); const int64_t output_dim = 882; const int64_t group_size = 3; @@ -676,8 +676,8 @@ TEST(attributes, reduce_logical_and_op) { // ReduceLogicalAnd derives visit_attributes from op::util::LogicalReductionKeepDims FactoryRegistry::get().register_factory(); - auto data = make_shared(element::Type_t::f32, Shape{3, 4, 5}); - auto reduction_axes = make_shared(element::Type_t::i64, Shape{2}); + auto data = make_shared(element::f32, Shape{3, 4, 5}); + auto reduction_axes = make_shared(element::i64, Shape{2}); bool keep_dims = true; @@ -692,8 +692,8 @@ TEST(attributes, reduce_logical_or_op) { // ReduceLogicalOr derives visit_attributes from op::util::LogicalReductionKeepDims FactoryRegistry::get().register_factory(); - auto data = make_shared(element::Type_t::f32, Shape{3, 4, 5}); - auto reduction_axes = make_shared(element::Type_t::i64, Shape{2}); + auto data = make_shared(element::f32, Shape{3, 4, 5}); + auto reduction_axes = make_shared(element::i64, Shape{2}); bool keep_dims = true; @@ -708,8 +708,8 @@ TEST(attributes, reduce_max_op) { // ReduceMax derives visit_attributes from op::util::ArithmeticReductionKeepDims FactoryRegistry::get().register_factory(); - auto data = make_shared(element::Type_t::f32, Shape{3, 4, 5}); - auto reduction_axes = make_shared(element::Type_t::i64, Shape{2}); + auto data = make_shared(element::f32, Shape{3, 4, 5}); + auto reduction_axes = make_shared(element::i64, Shape{2}); bool keep_dims = true; @@ -724,8 +724,8 @@ TEST(attributes, reduce_mean_op) { // ReduceMean derives visit_attributes from op::util::ArithmeticReductionKeepDims FactoryRegistry::get().register_factory(); - auto data = make_shared(element::Type_t::f32, Shape{3, 4, 5}); - auto reduction_axes = make_shared(element::Type_t::i64, Shape{2}); + auto data = make_shared(element::f32, Shape{3, 4, 5}); + auto reduction_axes = make_shared(element::i64, Shape{2}); bool keep_dims = true; @@ -740,8 +740,8 @@ TEST(attributes, reduce_min_op) { // ReduceMin derives visit_attributes from op::util::ArithmeticReductionKeepDims FactoryRegistry::get().register_factory(); - auto data = make_shared(element::Type_t::f32, Shape{3, 4, 5}); - auto reduction_axes = make_shared(element::Type_t::i64, Shape{2}); + auto data = make_shared(element::f32, Shape{3, 4, 5}); + auto reduction_axes = make_shared(element::i64, Shape{2}); bool keep_dims = true; @@ -756,8 +756,8 @@ TEST(attributes, reduce_prod_op) { // ReduceProd derives visit_attributes from op::util::ArithmeticReductionKeepDims FactoryRegistry::get().register_factory(); - auto data = make_shared(element::Type_t::f32, Shape{3, 4, 5}); - auto reduction_axes = make_shared(element::Type_t::i64, Shape{2}); + auto data = make_shared(element::f32, Shape{3, 4, 5}); + auto reduction_axes = make_shared(element::i64, Shape{2}); bool keep_dims = true; @@ -772,8 +772,8 @@ TEST(attributes, reduce_sum_op) { // ReduceSum derives visit_attributes from op::util::ArithmeticReductionKeepDims FactoryRegistry::get().register_factory(); - auto data = make_shared(element::Type_t::f32, Shape{3, 4, 5}); - auto reduction_axes = make_shared(element::Type_t::i64, Shape{2}); + auto data = make_shared(element::f32, Shape{3, 4, 5}); + auto reduction_axes = make_shared(element::i64, Shape{2}); bool keep_dims = true; @@ -787,7 +787,7 @@ TEST(attributes, reduce_sum_op) TEST(attributes, region_yolo_op) { FactoryRegistry::get().register_factory(); - auto data = make_shared(element::Type_t::f32, Shape{1, 255, 26, 26}); + auto data = make_shared(element::f32, Shape{1, 255, 26, 26}); size_t num_coords = 4; size_t num_classes = 1; @@ -816,8 +816,8 @@ TEST(attributes, region_yolo_op) TEST(attributes, reshape_op) { FactoryRegistry::get().register_factory(); - auto data = make_shared(element::Type_t::i32, Shape{2, 3, 4}); - auto pattern = make_shared(element::Type_t::i32, Shape{2}); + auto data = make_shared(element::i32, Shape{2, 3, 4}); + auto pattern = make_shared(element::i32, Shape{2}); bool special_zero = true; @@ -831,8 +831,8 @@ TEST(attributes, reshape_op) TEST(attributes, reverse_op_enum_mode) { FactoryRegistry::get().register_factory(); - auto data = make_shared(element::Type_t::i32, Shape{200}); - auto reversed_axes = make_shared(element::Type_t::i32, Shape{200}); + auto data = make_shared(element::i32, Shape{200}); + auto reversed_axes = make_shared(element::i32, Shape{200}); auto reverse = make_shared(data, reversed_axes, opset1::Reverse::Mode::INDEX); NodeBuilder builder(reverse); @@ -844,8 +844,8 @@ TEST(attributes, reverse_op_enum_mode) TEST(attributes, reverse_op_string_mode) { FactoryRegistry::get().register_factory(); - auto data = make_shared(element::Type_t::i32, Shape{200}); - auto reversed_axes = make_shared(element::Type_t::i32, Shape{200}); + auto data = make_shared(element::i32, Shape{200}); + auto reversed_axes = make_shared(element::i32, Shape{200}); std::string mode = "index"; @@ -859,8 +859,8 @@ TEST(attributes, reverse_op_string_mode) TEST(attributes, reverse_sequence_op) { FactoryRegistry::get().register_factory(); - auto data = make_shared(element::Type_t::i32, Shape{2, 3, 4, 2}); - auto seq_indices = make_shared(element::Type_t::i32, Shape{4}); + auto data = make_shared(element::i32, Shape{2, 3, 4, 2}); + auto seq_indices = make_shared(element::i32, Shape{4}); auto batch_axis = 2; auto seq_axis = 1; @@ -879,10 +879,10 @@ TEST(attributes, reverse_sequence_op) TEST(attributes, rnn_cell_op_custom_attributes) { FactoryRegistry::get().register_factory(); - auto X = make_shared(element::Type_t::f32, Shape{2, 3}); - auto H = make_shared(element::Type_t::f32, Shape{2, 3}); - auto W = make_shared(element::Type_t::f32, Shape{3, 3}); - auto R = make_shared(element::Type_t::f32, Shape{3, 3}); + auto X = make_shared(element::f32, Shape{2, 3}); + auto H = make_shared(element::f32, Shape{2, 3}); + auto W = make_shared(element::f32, Shape{3, 3}); + auto R = make_shared(element::f32, Shape{3, 3}); const size_t hidden_size = 3; auto activations = std::vector{"sigmoid", "tanh"}; @@ -906,10 +906,10 @@ TEST(attributes, rnn_cell_op_custom_attributes) TEST(attributes, rnn_cell_op_default_attributes) { FactoryRegistry::get().register_factory(); - auto X = make_shared(element::Type_t::f32, Shape{2, 3}); - auto H = make_shared(element::Type_t::f32, Shape{2, 3}); - auto W = make_shared(element::Type_t::f32, Shape{3, 3}); - auto R = make_shared(element::Type_t::f32, Shape{3, 3}); + auto X = make_shared(element::f32, Shape{2, 3}); + auto H = make_shared(element::f32, Shape{2, 3}); + auto W = make_shared(element::f32, Shape{3, 3}); + auto R = make_shared(element::f32, Shape{3, 3}); const size_t hidden_size = 3; @@ -928,7 +928,7 @@ TEST(attributes, rnn_cell_op_default_attributes) TEST(attributes, elu_op) { FactoryRegistry::get().register_factory(); - auto data = make_shared(element::Type_t::f32, Shape{2, 4}); + auto data = make_shared(element::f32, Shape{2, 4}); double alpha = 0.1; @@ -942,11 +942,11 @@ TEST(attributes, elu_op) TEST(attributes, fake_quantize_op) { FactoryRegistry::get().register_factory(); - const auto data = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - const auto input_low = make_shared(element::Type_t::f32, Shape{}); - const auto input_high = make_shared(element::Type_t::f32, Shape{}); - const auto output_low = make_shared(element::Type_t::f32, Shape{}); - const auto output_high = make_shared(element::Type_t::f32, Shape{}); + const auto data = make_shared(element::f32, Shape{1, 2, 3, 4}); + const auto input_low = make_shared(element::f32, Shape{}); + const auto input_high = make_shared(element::f32, Shape{}); + const auto output_low = make_shared(element::f32, Shape{}); + const auto output_high = make_shared(element::f32, Shape{}); auto levels = 5; auto auto_broadcast = op::AutoBroadcastType::NUMPY; @@ -963,8 +963,8 @@ TEST(attributes, fake_quantize_op) TEST(attributes, broadcast_v3) { FactoryRegistry::get().register_factory(); - const auto arg = make_shared(element::Type_t::i64, Shape{1, 3, 1}); - const auto shape = make_shared(element::Type_t::i64, Shape{3}); + const auto arg = make_shared(element::i64, Shape{1, 3, 1}); + const auto shape = make_shared(element::i64, Shape{3}); const auto broadcast_spec = op::BroadcastType::BIDIRECTIONAL; const auto broadcast_v3 = make_shared(arg, shape, broadcast_spec); @@ -977,7 +977,7 @@ TEST(attributes, broadcast_v3) TEST(attributes, grn_op) { FactoryRegistry::get().register_factory(); - auto data = make_shared(element::Type_t::f32, Shape{2, 3, 4, 5}); + auto data = make_shared(element::f32, Shape{2, 3, 4, 5}); float bias = 1.25f; @@ -991,8 +991,8 @@ TEST(attributes, grn_op) TEST(attributes, group_conv_op) { FactoryRegistry::get().register_factory(); - auto data = make_shared(element::Type_t::f32, Shape{1, 12, 224, 224}); - auto filters = make_shared(element::Type_t::f32, Shape{4, 1, 3, 5, 5}); + auto data = make_shared(element::f32, Shape{1, 12, 224, 224}); + auto filters = make_shared(element::f32, Shape{4, 1, 3, 5, 5}); auto strides = Strides{1, 1}; auto pads_begin = CoordinateDiff{1, 2}; auto pads_end = CoordinateDiff{1, 2}; @@ -1011,10 +1011,9 @@ TEST(attributes, group_conv_op) TEST(attributes, group_conv_backprop_data_op) { FactoryRegistry::get().register_factory(); - const auto data = make_shared(element::Type_t::f32, Shape{1, 20, 224, 224}); - const auto filter = make_shared(element::Type_t::f32, Shape{4, 5, 2, 3, 3}); - const auto output_shape = - make_shared(element::Type_t::f32, Shape{1, 8, 447, 447}); + const auto data = make_shared(element::f32, Shape{1, 20, 224, 224}); + const auto filter = make_shared(element::f32, Shape{4, 5, 2, 3, 3}); + const auto output_shape = make_shared(element::f32, Shape{1, 8, 447, 447}); const auto strides = Strides{2, 1}; const auto pads_begin = CoordinateDiff{3, 4}; @@ -1046,8 +1045,8 @@ TEST(attributes, group_conv_backprop_data_op) TEST(attributes, lrn_op) { FactoryRegistry::get().register_factory(); - const auto arg = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - const auto axes = make_shared(element::Type_t::i32, Shape{2}); + const auto arg = make_shared(element::f32, Shape{1, 2, 3, 4}); + const auto axes = make_shared(element::i32, Shape{2}); const double alpha = 1.1; const double beta = 2.2; @@ -1067,12 +1066,12 @@ TEST(attributes, lrn_op) TEST(attributes, lstm_cell_op) { FactoryRegistry::get().register_factory(); - auto X = make_shared(element::Type_t::f32, Shape{2, 3}); - auto H = make_shared(element::Type_t::f32, Shape{2, 3}); - auto W = make_shared(element::Type_t::f32, Shape{12, 3}); - auto R = make_shared(element::Type_t::f32, Shape{12, 3}); - const auto initial_hidden_state = make_shared(element::Type_t::f32, Shape{2, 3}); - const auto initial_cell_state = make_shared(element::Type_t::f32, Shape{2, 3}); + auto X = make_shared(element::f32, Shape{2, 3}); + auto H = make_shared(element::f32, Shape{2, 3}); + auto W = make_shared(element::f32, Shape{12, 3}); + auto R = make_shared(element::f32, Shape{12, 3}); + const auto initial_hidden_state = make_shared(element::f32, Shape{2, 3}); + const auto initial_cell_state = make_shared(element::f32, Shape{2, 3}); const auto hidden_size = 3; const std::vector activations = {"tanh", "sigmoid", "tanh"}; @@ -1110,19 +1109,17 @@ TEST(attributes, lstm_sequence_op) const size_t hidden_size = 64; const auto X = - make_shared(element::Type_t::f32, Shape{batch_size, seq_length, input_size}); - const auto initial_hidden_state = make_shared( - element::Type_t::f32, Shape{batch_size, num_directions, hidden_size}); - const auto initial_cell_state = make_shared( - element::Type_t::f32, Shape{batch_size, num_directions, hidden_size}); - const auto sequence_lengths = - make_shared(element::Type_t::i32, Shape{batch_size}); - const auto W = make_shared(element::Type_t::f32, + make_shared(element::f32, Shape{batch_size, seq_length, input_size}); + const auto initial_hidden_state = + make_shared(element::f32, Shape{batch_size, num_directions, hidden_size}); + const auto initial_cell_state = + make_shared(element::f32, Shape{batch_size, num_directions, hidden_size}); + const auto sequence_lengths = make_shared(element::i32, Shape{batch_size}); + const auto W = make_shared(element::f32, Shape{num_directions, 4 * hidden_size, input_size}); - const auto R = make_shared(element::Type_t::f32, + const auto R = make_shared(element::f32, Shape{num_directions, 4 * hidden_size, hidden_size}); - const auto B = - make_shared(element::Type_t::f32, Shape{num_directions, 4 * hidden_size}); + const auto B = make_shared(element::f32, Shape{num_directions, 4 * hidden_size}); const auto lstm_direction = op::RecurrentSequenceDirection::BIDIRECTIONAL; const std::vector activations_alpha = {1, 2, 3}; @@ -1157,7 +1154,7 @@ TEST(attributes, lstm_sequence_op) TEST(attributes, shuffle_channels_op) { FactoryRegistry::get().register_factory(); - auto data = make_shared(element::Type_t::i32, Shape{200}); + auto data = make_shared(element::i32, Shape{200}); auto axis = 0; auto groups = 2; auto shuffle_channels = make_shared(data, axis, groups); @@ -1171,7 +1168,7 @@ TEST(attributes, shuffle_channels_op) TEST(attributes, softmax_op) { FactoryRegistry::get().register_factory(); - auto data = make_shared(element::Type_t::i32, Shape{200}); + auto data = make_shared(element::i32, Shape{200}); auto axis = 0; auto softmax = make_shared(data, axis); NodeBuilder builder(softmax); @@ -1183,7 +1180,7 @@ TEST(attributes, softmax_op) TEST(attributes, space_to_depth_op) { FactoryRegistry::get().register_factory(); - auto data = make_shared(element::Type_t::i32, Shape{2, 3, 50, 50}); + auto data = make_shared(element::i32, Shape{2, 3, 50, 50}); auto block_size = 2; auto mode = opset1::SpaceToDepth::SpaceToDepthMode::BLOCKS_FIRST; auto space_to_depth = make_shared(data, mode, block_size); @@ -1197,8 +1194,8 @@ TEST(attributes, space_to_depth_op) TEST(attributes, split_op) { FactoryRegistry::get().register_factory(); - auto data = make_shared(element::Type_t::i32, Shape{200}); - auto axis = make_shared(element::Type_t::i32, Shape{}); + auto data = make_shared(element::i32, Shape{200}); + auto axis = make_shared(element::i32, Shape{}); auto num_splits = 2; auto split = make_shared(data, axis, num_splits); NodeBuilder builder(split); @@ -1210,8 +1207,8 @@ TEST(attributes, split_op) TEST(attributes, squared_difference_op) { FactoryRegistry::get().register_factory(); - auto x1 = make_shared(element::Type_t::i32, Shape{200}); - auto x2 = make_shared(element::Type_t::i32, Shape{200}); + auto x1 = make_shared(element::i32, Shape{200}); + auto x2 = make_shared(element::i32, Shape{200}); auto auto_broadcast = op::AutoBroadcastType::NUMPY; auto squared_difference = make_shared(x1, x2, auto_broadcast); NodeBuilder builder(squared_difference); @@ -1223,10 +1220,10 @@ TEST(attributes, squared_difference_op) TEST(attributes, strided_slice_op) { FactoryRegistry::get().register_factory(); - auto data = make_shared(element::Type_t::i32, Shape{2, 3, 4, 5}); - auto begin = make_shared(element::Type_t::i32, Shape{2}); - auto end = make_shared(element::Type_t::i32, Shape{2}); - auto stride = make_shared(element::Type_t::i32, Shape{2}); + auto data = make_shared(element::i32, Shape{2, 3, 4, 5}); + auto begin = make_shared(element::i32, Shape{2}); + auto end = make_shared(element::i32, Shape{2}); + auto stride = make_shared(element::i32, Shape{2}); auto begin_mask = std::vector{0, 0}; auto end_mask = std::vector{0, 0}; @@ -1256,8 +1253,8 @@ TEST(attributes, strided_slice_op) TEST(attributes, topk_op) { FactoryRegistry::get().register_factory(); - auto data = make_shared(element::Type_t::i32, Shape{2, 3, 4, 5}); - auto k = make_shared(element::Type_t::i32, Shape{}); + auto data = make_shared(element::i32, Shape{2, 3, 4, 5}); + auto k = make_shared(element::i32, Shape{}); auto axis = 0; auto mode = opset1::TopK::Mode::MAX; @@ -1275,8 +1272,8 @@ TEST(attributes, topk_op) TEST(attributes, logical_xor_op) { FactoryRegistry::get().register_factory(); - auto x1 = make_shared(element::Type_t::boolean, Shape{200}); - auto x2 = make_shared(element::Type_t::boolean, Shape{200}); + auto x1 = make_shared(element::boolean, Shape{200}); + auto x2 = make_shared(element::boolean, Shape{200}); auto auto_broadcast = op::AutoBroadcastType::NUMPY; @@ -1290,7 +1287,7 @@ TEST(attributes, logical_xor_op) TEST(attributes, extractimagepatches_op) { FactoryRegistry::get().register_factory(); - auto data = make_shared(element::Type_t::i32, Shape{64, 3, 10, 10}); + auto data = make_shared(element::i32, Shape{64, 3, 10, 10}); auto sizes = Shape{3, 3}; auto strides = Strides{5, 5}; @@ -1311,7 +1308,7 @@ TEST(attributes, extractimagepatches_op) TEST(attributes, mvn_op) { FactoryRegistry::get().register_factory(); - const auto data = make_shared(element::Type_t::i32, Shape{2, 3, 4, 5}); + const auto data = make_shared(element::i32, Shape{2, 3, 4, 5}); const auto axes = AxisSet{0, 1}; @@ -1329,7 +1326,7 @@ TEST(attributes, mvn_op) TEST(attributes, reorg_yolo_op_stride) { FactoryRegistry::get().register_factory(); - const auto data = make_shared(element::Type_t::i32, Shape{1, 64, 26, 26}); + const auto data = make_shared(element::i32, Shape{1, 64, 26, 26}); const auto op = make_shared(data, 2); NodeBuilder builder(op); @@ -1341,7 +1338,7 @@ TEST(attributes, reorg_yolo_op_stride) TEST(attributes, reorg_yolo_op_strides) { FactoryRegistry::get().register_factory(); - const auto data = make_shared(element::Type_t::i32, Shape{1, 64, 26, 26}); + const auto data = make_shared(element::i32, Shape{1, 64, 26, 26}); const auto op = make_shared(data, Strides{2}); NodeBuilder builder(op); @@ -1353,8 +1350,8 @@ TEST(attributes, reorg_yolo_op_strides) TEST(attributes, roi_pooling_op) { FactoryRegistry::get().register_factory(); - const auto data = make_shared(element::Type_t::f32, Shape{2, 3, 4, 5}); - const auto coords = make_shared(element::Type_t::f32, Shape{2, 5}); + const auto data = make_shared(element::f32, Shape{2, 3, 4, 5}); + const auto coords = make_shared(element::f32, Shape{2, 5}); const auto op = make_shared(data, coords, Shape{5, 5}, 0.123, "bilinear"); NodeBuilder builder(op); @@ -1368,7 +1365,7 @@ TEST(attributes, roi_pooling_op) TEST(attributes, constant_op) { vector data{5.0f, 4.0f, 3.0f, 2.0f, 1.0f, 0.0f}; - auto k = make_shared(element::Type_t::f32, Shape{2, 3}, data); + auto k = make_shared(element::f32, Shape{2, 3}, data); NodeBuilder builder(k); auto g_k = as_type_ptr(builder.create()); g_k->validate_and_infer_types(); @@ -1382,8 +1379,8 @@ TEST(attributes, constant_op) TEST(attributes, bucketize_v3_op_default_attributes) { FactoryRegistry::get().register_factory(); - auto data = make_shared(element::Type_t::f32, Shape{2, 3, 4}); - auto buckets = make_shared(element::Type_t::f32, Shape{5}); + auto data = make_shared(element::f32, Shape{2, 3, 4}); + auto buckets = make_shared(element::f32, Shape{5}); auto bucketize = make_shared(data, buckets); NodeBuilder builder(bucketize); @@ -1396,9 +1393,9 @@ TEST(attributes, bucketize_v3_op_default_attributes) TEST(attributes, bucketize_v3_op_custom_attributes) { FactoryRegistry::get().register_factory(); - auto data = make_shared(element::Type_t::f32, Shape{2, 3, 4}); - auto buckets = make_shared(element::Type_t::f32, Shape{5}); - element::Type output_type = element::Type_t::i32; + auto data = make_shared(element::f32, Shape{2, 3, 4}); + auto buckets = make_shared(element::f32, Shape{5}); + element::Type output_type = element::i32; bool with_right_bound = false; auto bucketize = make_shared(data, buckets, output_type, with_right_bound); @@ -1415,8 +1412,8 @@ TEST(attributes, cum_sum_op_default_attributes) FactoryRegistry::get().register_factory(); Shape shape{1, 4}; - auto A = make_shared(element::Type_t::f32, shape); - auto axis = make_shared(element::Type_t::i32, Shape{1}); + auto A = make_shared(element::f32, shape); + auto axis = make_shared(element::i32, Shape{1}); auto cs = make_shared(A, axis); NodeBuilder builder(cs); @@ -1431,8 +1428,8 @@ TEST(attributes, cum_sum_op_custom_attributes) FactoryRegistry::get().register_factory(); Shape shape{1, 4}; - auto A = make_shared(element::Type_t::f32, shape); - auto axis = make_shared(element::Type_t::i32, Shape{1}); + auto A = make_shared(element::f32, shape); + auto axis = make_shared(element::i32, Shape{1}); bool exclusive = true; bool reverse = true; auto cs = make_shared(A, axis, exclusive, reverse); @@ -1447,8 +1444,8 @@ TEST(attributes, cum_sum_op_custom_attributes) TEST(attributes, interpolate_op) { FactoryRegistry::get().register_factory(); - auto img = make_shared(element::Type_t::f32, Shape{1, 3, 32, 32}); - auto out_shape = make_shared(element::Type_t::i32, Shape{2}); + auto img = make_shared(element::f32, Shape{1, 3, 32, 32}); + auto out_shape = make_shared(element::i32, Shape{2}); op::v0::InterpolateAttrs interp_atrs; interp_atrs.axes = AxisSet{1, 2}; @@ -1476,11 +1473,11 @@ TEST(attributes, interpolate_op) TEST(attributes, detection_output_op) { FactoryRegistry::get().register_factory(); - const auto box_logits = make_shared(element::Type_t::f32, Shape{1, 3, 32, 32}); - const auto class_preds = make_shared(element::Type_t::f32, Shape{32}); - const auto proposals = make_shared(element::Type_t::f32, Shape{128, 2}); - const auto aux_class_preds = make_shared(element::Type_t::f32, Shape{16}); - const auto aux_box_pred = make_shared(element::Type_t::f32, Shape{32, 2}); + const auto box_logits = make_shared(element::f32, Shape{1, 3, 32, 32}); + const auto class_preds = make_shared(element::f32, Shape{32}); + const auto proposals = make_shared(element::f32, Shape{128, 2}); + const auto aux_class_preds = make_shared(element::f32, Shape{16}); + const auto aux_box_pred = make_shared(element::f32, Shape{32, 2}); op::DetectionOutputAttrs attrs; attrs.num_classes = 32; @@ -1529,8 +1526,8 @@ TEST(attributes, detection_output_op) TEST(attributes, prior_box_op) { FactoryRegistry::get().register_factory(); - const auto layer_shape = make_shared(element::Type_t::i64, Shape{128, 128}); - const auto image_shape = make_shared(element::Type_t::i64, Shape{32, 32}); + const auto layer_shape = make_shared(element::i64, Shape{128, 128}); + const auto image_shape = make_shared(element::i64, Shape{32, 32}); op::PriorBoxAttrs attrs; attrs.min_size = vector{16.f, 32.f}; @@ -1570,8 +1567,8 @@ TEST(attributes, prior_box_op) TEST(attributes, prior_box_clustered_op) { FactoryRegistry::get().register_factory(); - const auto layer_shape = make_shared(element::Type_t::i64, Shape{128, 128}); - const auto image_shape = make_shared(element::Type_t::i64, Shape{32, 32}); + const auto layer_shape = make_shared(element::i64, Shape{128, 128}); + const auto image_shape = make_shared(element::i64, Shape{32, 32}); op::PriorBoxClusteredAttrs attrs; attrs.widths = vector{128.f, 512.f, 4096.f}; @@ -1601,11 +1598,9 @@ TEST(attributes, prior_box_clustered_op) TEST(attributes, proposal_op) { FactoryRegistry::get().register_factory(); - const auto class_probs = - make_shared(element::Type_t::i64, Shape{1024, 3, 128, 128}); - const auto class_logits = - make_shared(element::Type_t::i64, Shape{1024, 3, 128, 128}); - const auto image_shape = make_shared(element::Type_t::i64, Shape{4}); + const auto class_probs = make_shared(element::i64, Shape{1024, 3, 128, 128}); + const auto class_logits = make_shared(element::i64, Shape{1024, 3, 128, 128}); + const auto image_shape = make_shared(element::i64, Shape{4}); op::ProposalAttrs attrs; attrs.base_size = 224; diff --git a/ngraph/test/backend/abc.in.cpp b/ngraph/test/backend/abc.in.cpp index 21f4669076fac6..e9c6cb1313be8b 100644 --- a/ngraph/test/backend/abc.in.cpp +++ b/ngraph/test/backend/abc.in.cpp @@ -29,9 +29,9 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, abc) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); - auto C = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); + auto C = make_shared(element::f32, shape); auto arg = make_shared(make_shared(A, B), C); auto f = make_shared(arg, ParameterVector{A, B, C}); @@ -61,9 +61,9 @@ NGRAPH_TEST(${BACKEND_NAME}, abc) NGRAPH_TEST(${BACKEND_NAME}, abc_int64) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::i64, shape); - auto B = make_shared(element::Type_t::i64, shape); - auto C = make_shared(element::Type_t::i64, shape); + auto A = make_shared(element::i64, shape); + auto B = make_shared(element::i64, shape); + auto C = make_shared(element::i64, shape); auto arg = make_shared(make_shared(A, B), C); auto f = make_shared(arg, ParameterVector{A, B, C}); diff --git a/ngraph/test/backend/abs.in.cpp b/ngraph/test/backend/abs.in.cpp index 1ab328f996b2b9..9c2d62c090f479 100644 --- a/ngraph/test/backend/abs.in.cpp +++ b/ngraph/test/backend/abs.in.cpp @@ -46,7 +46,7 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, abs) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared(make_shared(A), ParameterVector{A}); auto test_case = test::TestCase(f); diff --git a/ngraph/test/backend/acos.in.cpp b/ngraph/test/backend/acos.in.cpp index 530ce69b7ff685..893322c3d723de 100644 --- a/ngraph/test/backend/acos.in.cpp +++ b/ngraph/test/backend/acos.in.cpp @@ -46,7 +46,7 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, acos) { Shape shape{11}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared(make_shared(A), ParameterVector{A}); auto test_case = test::TestCase(f); diff --git a/ngraph/test/backend/acosh.in.cpp b/ngraph/test/backend/acosh.in.cpp index 1bfb63fc4d1704..bcaf7b23aa6abc 100644 --- a/ngraph/test/backend/acosh.in.cpp +++ b/ngraph/test/backend/acosh.in.cpp @@ -46,7 +46,7 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, acosh) { Shape shape{11}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared(make_shared(A), ParameterVector{A}); vector input{0.f, 1.f, -1.f, 2.f, -2.f, 3.f, -3.f, 4.f, 5.f, 10.f, 100.f}; diff --git a/ngraph/test/backend/add.in.cpp b/ngraph/test/backend/add.in.cpp index f479d5576976ea..325ddd636062d7 100644 --- a/ngraph/test/backend/add.in.cpp +++ b/ngraph/test/backend/add.in.cpp @@ -46,8 +46,8 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, add) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); vector a{1, 2, 3, 4}; @@ -62,8 +62,8 @@ NGRAPH_TEST(${BACKEND_NAME}, add) NGRAPH_TEST(${BACKEND_NAME}, add_overload) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); vector a{1, 2, 3, 4}; @@ -78,8 +78,8 @@ NGRAPH_TEST(${BACKEND_NAME}, add_overload) NGRAPH_TEST(${BACKEND_NAME}, add_in_place) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto T = make_shared(A, B); auto T2 = make_shared(T, T); auto T3 = make_shared(T2, T2); diff --git a/ngraph/test/backend/aliased_output.in.cpp b/ngraph/test/backend/aliased_output.in.cpp index 3ff85d1730e574..2a6841921985eb 100644 --- a/ngraph/test/backend/aliased_output.in.cpp +++ b/ngraph/test/backend/aliased_output.in.cpp @@ -29,8 +29,8 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, aliased_output) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto C = make_shared(A, B); auto D = make_shared(A, B); auto E = op::Constant::create(element::f32, shape, {1, 2, 3, 4}); diff --git a/ngraph/test/backend/api.in.cpp b/ngraph/test/backend/api.in.cpp index d22ba34234b94d..8da34ed951a9c4 100644 --- a/ngraph/test/backend/api.in.cpp +++ b/ngraph/test/backend/api.in.cpp @@ -33,8 +33,8 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, create_tensor_1) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); @@ -42,12 +42,12 @@ NGRAPH_TEST(${BACKEND_NAME}, create_tensor_1) // Create some tensors for input/output vector av = {1, 2, 3, 4}; vector bv = {5, 6, 7, 8}; - shared_ptr a = backend->create_tensor(element::Type_t::f32, shape); - shared_ptr b = backend->create_tensor(element::Type_t::f32, shape); + shared_ptr a = backend->create_tensor(element::f32, shape); + shared_ptr b = backend->create_tensor(element::f32, shape); copy_data(a, av); copy_data(b, bv); - shared_ptr result = backend->create_tensor(element::Type_t::f32, shape); + shared_ptr result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b}); @@ -58,19 +58,19 @@ NGRAPH_TEST(${BACKEND_NAME}, create_tensor_1) NGRAPH_TEST(${BACKEND_NAME}, get_parameters_and_results) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); - auto C = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); + auto C = make_shared(element::f32, shape); auto arg = make_shared(make_shared(A, B), C); auto f = make_shared(arg, ParameterVector{A, B, C}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - shared_ptr a = backend->create_tensor(element::Type_t::f32, shape); - shared_ptr b = backend->create_tensor(element::Type_t::f32, shape); - shared_ptr c = backend->create_tensor(element::Type_t::f32, shape); - shared_ptr result = backend->create_tensor(element::Type_t::f32, shape); + shared_ptr a = backend->create_tensor(element::f32, shape); + shared_ptr b = backend->create_tensor(element::f32, shape); + shared_ptr c = backend->create_tensor(element::f32, shape); + shared_ptr result = backend->create_tensor(element::f32, shape); copy_data(a, test::NDArray({{1, 2}, {3, 4}}).get_vector()); copy_data(b, test::NDArray({{5, 6}, {7, 8}}).get_vector()); diff --git a/ngraph/test/backend/asin.in.cpp b/ngraph/test/backend/asin.in.cpp index 95ecbcc2668b0a..5b6084e304063b 100644 --- a/ngraph/test/backend/asin.in.cpp +++ b/ngraph/test/backend/asin.in.cpp @@ -46,7 +46,7 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, asin) { Shape shape{11}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared(make_shared(A), ParameterVector{A}); auto test_case = test::TestCase(f); diff --git a/ngraph/test/backend/asinh.in.cpp b/ngraph/test/backend/asinh.in.cpp index b716fce2874a8a..6dd0abe9568123 100644 --- a/ngraph/test/backend/asinh.in.cpp +++ b/ngraph/test/backend/asinh.in.cpp @@ -46,7 +46,7 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, asinh) { Shape shape{11}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared(make_shared(A), ParameterVector{A}); vector input{0.f, 1.f, -1.f, 2.f, -2.f, 3.f, -3.f, 4.f, 5.f, 10.f, 100.f}; diff --git a/ngraph/test/backend/atan.in.cpp b/ngraph/test/backend/atan.in.cpp index adb9bd107dcd5d..e2f0c04b27f0b2 100644 --- a/ngraph/test/backend/atan.in.cpp +++ b/ngraph/test/backend/atan.in.cpp @@ -46,7 +46,7 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, atan) { Shape shape{11}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared(make_shared(A), ParameterVector{A}); auto test_case = test::TestCase(f); diff --git a/ngraph/test/backend/atanh.in.cpp b/ngraph/test/backend/atanh.in.cpp index 99e6ab8ce2509e..ce7b5a82b64137 100644 --- a/ngraph/test/backend/atanh.in.cpp +++ b/ngraph/test/backend/atanh.in.cpp @@ -46,7 +46,7 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, atanh) { Shape shape{11}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared(make_shared(A), ParameterVector{A}); vector input{0.f, 1.f, -1.f, 2.f, -2.f, 3.f, -3.f, 4.f, 5.f, 10.f, 100.f}; diff --git a/ngraph/test/backend/auto_broadcast.in.cpp b/ngraph/test/backend/auto_broadcast.in.cpp index ae3723269e45d8..e372b44d7fe67c 100644 --- a/ngraph/test/backend/auto_broadcast.in.cpp +++ b/ngraph/test/backend/auto_broadcast.in.cpp @@ -71,11 +71,11 @@ void check_auto_bcast( if (std::is_same::value) { - iet = element::Type_t::boolean; + iet = element::boolean; } if (std::is_same::value) { - oet = element::Type_t::boolean; + oet = element::boolean; } auto A = make_shared(iet, Shape{2, 3}); auto B = make_shared(iet, Shape{3}); @@ -110,17 +110,17 @@ NGRAPH_TEST(${BACKEND_NAME}, auto_bcast_binary_elementwise_pdpd_dynamic) { auto pshape_a = PartialShape::dynamic(); auto pshape_b = PartialShape::dynamic(); - auto a = make_shared(element::Type_t::f32, pshape_a); - auto b = make_shared(element::Type_t::f32, pshape_b); + auto a = make_shared(element::f32, pshape_a); + auto b = make_shared(element::f32, pshape_b); op::AutoBroadcastSpec autob = op::AutoBroadcastSpec(op::AutoBroadcastType::PDPD, -1); auto f = make_shared(make_shared(a, b, autob), ParameterVector{a, b}); auto backend = runtime::Backend::create("${BACKEND_NAME}", true); auto ex = backend->compile(f); - auto t_r = backend->create_dynamic_tensor(element::Type_t::f32, PartialShape::dynamic()); - auto t_a = backend->create_tensor(element::Type_t::f32, Shape{2, 3}); - auto t_b = backend->create_tensor(element::Type_t::f32, Shape{3}); + auto t_r = backend->create_dynamic_tensor(element::f32, PartialShape::dynamic()); + auto t_a = backend->create_tensor(element::f32, Shape{2, 3}); + auto t_b = backend->create_tensor(element::f32, Shape{3}); copy_data(t_a, vector{1, 2, 3, 4, 5, 6}); copy_data(t_b, vector{5, 6, 7}); ex->call_with_validate({t_r}, {t_a, t_b}); @@ -134,18 +134,18 @@ NGRAPH_TEST(${BACKEND_NAME}, auto_bcast_binary_elementwise_pdpd_dynamic) autob = op::AutoBroadcastSpec(op::AutoBroadcastType::PDPD, 1); f = make_shared(make_shared(a, b, autob), ParameterVector{a, b}); ex = backend->compile(f); - t_r = backend->create_dynamic_tensor(element::Type_t::f32, PartialShape::dynamic()); - t_a = backend->create_tensor(element::Type_t::f32, Shape{2, 3, 4, 5}); - t_b = backend->create_tensor(element::Type_t::f32, Shape{3, 4}); + t_r = backend->create_dynamic_tensor(element::f32, PartialShape::dynamic()); + t_a = backend->create_tensor(element::f32, Shape{2, 3, 4, 5}); + t_b = backend->create_tensor(element::f32, Shape{3, 4}); copy_data(t_a, vector(2 * 3 * 4 * 5, 1)); copy_data(t_b, vector(3 * 4, 1)); ex->call_with_validate({t_r}, {t_a, t_b}); ASSERT_EQ(t_r->get_shape(), (Shape{2, 3, 4, 5})); // a shape {2, 3, 4, 5}, b shape {3, 1} axis = 1 - t_r = backend->create_dynamic_tensor(element::Type_t::f32, PartialShape::dynamic()); - t_a = backend->create_tensor(element::Type_t::f32, Shape{2, 3, 4, 5}); - t_b = backend->create_tensor(element::Type_t::f32, Shape{3, 1}); + t_r = backend->create_dynamic_tensor(element::f32, PartialShape::dynamic()); + t_a = backend->create_tensor(element::f32, Shape{2, 3, 4, 5}); + t_b = backend->create_tensor(element::f32, Shape{3, 1}); copy_data(t_a, vector(2 * 3 * 4 * 5, 1)); copy_data(t_b, vector(3, 1)); ex->call_with_validate({t_r}, {t_a, t_b}); @@ -154,8 +154,8 @@ NGRAPH_TEST(${BACKEND_NAME}, auto_bcast_binary_elementwise_pdpd_dynamic) NGRAPH_TEST(${BACKEND_NAME}, auto_bcast_string_cast) { - auto a = make_shared(element::Type_t::f32, Shape{1}); - auto b = make_shared(element::Type_t::f32, Shape{1}); + auto a = make_shared(element::f32, Shape{1}); + auto b = make_shared(element::f32, Shape{1}); auto add = make_shared(a, b, "NUMPY"); ASSERT_EQ(add->get_autob(), op::AutoBroadcastType::NUMPY); diff --git a/ngraph/test/backend/batch_norm.in.cpp b/ngraph/test/backend/batch_norm.in.cpp index ee81eb2c48c5d2..d4b501c8c9d0fe 100644 --- a/ngraph/test/backend/batch_norm.in.cpp +++ b/ngraph/test/backend/batch_norm.in.cpp @@ -161,7 +161,7 @@ class BatchNormInferenceTesterZeroEpsilon : public BatchNormInferenceTester NGRAPH_TEST(${BACKEND_NAME}, batch_norm_inference_0eps_f64) { using T = double; - element::Type et = element::Type_t::f64; + auto& et = element::f64; auto backend = runtime::Backend::create("${BACKEND_NAME}"); BatchNormInferenceTesterZeroEpsilon bnt(backend, et); EXPECT_TRUE(bnt.test_gamma()) << "Gamma test"; @@ -173,7 +173,7 @@ NGRAPH_TEST(${BACKEND_NAME}, batch_norm_inference_0eps_f64) NGRAPH_TEST(${BACKEND_NAME}, batch_norm_inference_0eps_f32) { using T = float; - element::Type et = element::Type_t::f32; + auto& et = element::f32; auto backend = runtime::Backend::create("${BACKEND_NAME}"); BatchNormInferenceTesterZeroEpsilon bnt(backend, et); EXPECT_TRUE(bnt.test_gamma()) << "Gamma test"; @@ -255,7 +255,7 @@ class BatchNormInferenceTesterNonZeroEpsilon : public BatchNormInferenceTester bnt(backend, et); EXPECT_TRUE(bnt.test_gamma()) << "Gamma test"; @@ -267,7 +267,7 @@ NGRAPH_TEST(${BACKEND_NAME}, batch_norm_inference_f64) NGRAPH_TEST(${BACKEND_NAME}, batch_norm_inference_f32) { using T = float; - element::Type et = element::Type_t::f32; + auto& et = element::f32; auto backend = runtime::Backend::create("${BACKEND_NAME}"); BatchNormInferenceTesterNonZeroEpsilon bnt(backend, et); EXPECT_TRUE(bnt.test_gamma()) << "Gamma test"; @@ -279,10 +279,10 @@ NGRAPH_TEST(${BACKEND_NAME}, batch_norm_inference_f32) NGRAPH_TEST(${BACKEND_NAME}, batch_norm_inference_parameters_duplication) { auto input_shape = Shape{2, 2, 2, 1}; - auto input = make_shared(element::Type_t::f32, input_shape); + auto input = make_shared(element::f32, input_shape); auto mvgb_shape = Shape{2}; - auto mvgb = make_shared(element::Type_t::f32, mvgb_shape); + auto mvgb = make_shared(element::f32, mvgb_shape); double eps = 0.001; auto shape_r = Shape{2, 2, 2, 1}; @@ -291,7 +291,7 @@ NGRAPH_TEST(${BACKEND_NAME}, batch_norm_inference_parameters_duplication) auto f = make_shared(bn, ParameterVector{input, mvgb, mvgb, mvgb, mvgb}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto _input = backend->create_tensor(element::Type_t::f32, input_shape); + auto _input = backend->create_tensor(element::f32, input_shape); copy_data(_input, vector{0.54881352f, 0.71518934f, @@ -302,9 +302,9 @@ NGRAPH_TEST(${BACKEND_NAME}, batch_norm_inference_parameters_duplication) 0.4375872f, 0.89177299f}); - auto _mvgb = backend->create_tensor(element::Type_t::f32, mvgb_shape); + auto _mvgb = backend->create_tensor(element::f32, mvgb_shape); copy_data(_mvgb, vector{1.0f, 1.0f}); - auto bn_output = backend->create_tensor(element::Type_t::f32, shape_r); + auto bn_output = backend->create_tensor(element::f32, shape_r); vector expected_result{0.54903894f, 0.71533161f, @@ -324,10 +324,10 @@ NGRAPH_TEST(${BACKEND_NAME}, batch_norm_inference_parameters_duplication) NGRAPH_TEST(${BACKEND_NAME}, batch_norm_inference_parameters_duplication_v5) { auto input_shape = Shape{2, 2, 2, 1}; - auto input = make_shared(element::Type_t::f32, input_shape); + auto input = make_shared(element::f32, input_shape); auto mvgb_shape = Shape{2}; - auto mvgb = make_shared(element::Type_t::f32, mvgb_shape); + auto mvgb = make_shared(element::f32, mvgb_shape); double eps = 0.001; auto shape_r = Shape{2, 2, 2, 1}; @@ -336,7 +336,7 @@ NGRAPH_TEST(${BACKEND_NAME}, batch_norm_inference_parameters_duplication_v5) auto f = make_shared(bn, ParameterVector{input, mvgb, mvgb, mvgb, mvgb}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto _input = backend->create_tensor(element::Type_t::f32, input_shape); + auto _input = backend->create_tensor(element::f32, input_shape); copy_data(_input, vector{0.54881352f, 0.71518934f, @@ -347,9 +347,9 @@ NGRAPH_TEST(${BACKEND_NAME}, batch_norm_inference_parameters_duplication_v5) 0.4375872f, 0.89177299f}); - auto _mvgb = backend->create_tensor(element::Type_t::f32, mvgb_shape); + auto _mvgb = backend->create_tensor(element::f32, mvgb_shape); copy_data(_mvgb, vector{1.0f, 1.0f}); - auto bn_output = backend->create_tensor(element::Type_t::f32, shape_r); + auto bn_output = backend->create_tensor(element::f32, shape_r); vector expected_result{0.54903894f, 0.71533161f, @@ -369,15 +369,15 @@ NGRAPH_TEST(${BACKEND_NAME}, batch_norm_inference_parameters_duplication_v5) NGRAPH_TEST(${BACKEND_NAME}, batch_norm_fprop_inference_b2c2h2w1) { auto input_shape = Shape{2, 2, 2, 1}; - auto input = make_shared(element::Type_t::f32, input_shape); + auto input = make_shared(element::f32, input_shape); auto gamma_shape = Shape{2}; - auto gamma = make_shared(element::Type_t::f32, gamma_shape); + auto gamma = make_shared(element::f32, gamma_shape); auto beta_shape = Shape{2}; - auto beta = make_shared(element::Type_t::f32, beta_shape); + auto beta = make_shared(element::f32, beta_shape); auto mean_shape = Shape{2}; - auto mean = make_shared(element::Type_t::f32, mean_shape); + auto mean = make_shared(element::f32, mean_shape); auto var_shape = Shape{2}; - auto var = make_shared(element::Type_t::f32, var_shape); + auto var = make_shared(element::f32, var_shape); double eps = 0.001; auto shape_r = Shape{2, 2, 2, 1}; auto bn = make_shared(input, gamma, beta, mean, var, eps); @@ -385,7 +385,7 @@ NGRAPH_TEST(${BACKEND_NAME}, batch_norm_fprop_inference_b2c2h2w1) auto f = make_shared(bn, ParameterVector{input, gamma, beta, mean, var}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto _input = backend->create_tensor(element::Type_t::f32, input_shape); + auto _input = backend->create_tensor(element::f32, input_shape); copy_data(_input, vector{0.54881352f, 0.71518934f, @@ -396,15 +396,15 @@ NGRAPH_TEST(${BACKEND_NAME}, batch_norm_fprop_inference_b2c2h2w1) 0.4375872f, 0.89177299f}); - auto _gamma = backend->create_tensor(element::Type_t::f32, gamma_shape); + auto _gamma = backend->create_tensor(element::f32, gamma_shape); copy_data(_gamma, vector{1.0f, 1.0f}); - auto _beta = backend->create_tensor(element::Type_t::f32, beta_shape); + auto _beta = backend->create_tensor(element::f32, beta_shape); copy_data(_beta, vector{0.0f, 0.0f}); - auto _mean = backend->create_tensor(element::Type_t::f32, mean_shape); + auto _mean = backend->create_tensor(element::f32, mean_shape); copy_data(_mean, vector{0.583388f, 0.619252f}); - auto _var = backend->create_tensor(element::Type_t::f32, var_shape); + auto _var = backend->create_tensor(element::f32, var_shape); copy_data(_var, vector{0.0119972f, 0.0282681f}); - auto bn_output = backend->create_tensor(element::Type_t::f32, shape_r); + auto bn_output = backend->create_tensor(element::f32, shape_r); vector expected_result{ -0.30327f, 1.1561f, -0.0963782f, -0.434702f, -1.4011f, 0.548275f, -1.06187f, 1.59295f}; @@ -418,15 +418,15 @@ NGRAPH_TEST(${BACKEND_NAME}, batch_norm_fprop_inference_b2c2h2w1) NGRAPH_TEST(${BACKEND_NAME}, batch_norm_fprop_inference_b2c2h2w1_v5) { auto input_shape = Shape{2, 2, 2, 1}; - auto input = make_shared(element::Type_t::f32, input_shape); + auto input = make_shared(element::f32, input_shape); auto gamma_shape = Shape{2}; - auto gamma = make_shared(element::Type_t::f32, gamma_shape); + auto gamma = make_shared(element::f32, gamma_shape); auto beta_shape = Shape{2}; - auto beta = make_shared(element::Type_t::f32, beta_shape); + auto beta = make_shared(element::f32, beta_shape); auto mean_shape = Shape{2}; - auto mean = make_shared(element::Type_t::f32, mean_shape); + auto mean = make_shared(element::f32, mean_shape); auto var_shape = Shape{2}; - auto var = make_shared(element::Type_t::f32, var_shape); + auto var = make_shared(element::f32, var_shape); double eps = 0.001; auto shape_r = Shape{2, 2, 2, 1}; auto bn = make_shared(input, gamma, beta, mean, var, eps); @@ -434,7 +434,7 @@ NGRAPH_TEST(${BACKEND_NAME}, batch_norm_fprop_inference_b2c2h2w1_v5) auto f = make_shared(bn, ParameterVector{input, gamma, beta, mean, var}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto _input = backend->create_tensor(element::Type_t::f32, input_shape); + auto _input = backend->create_tensor(element::f32, input_shape); copy_data(_input, vector{0.54881352f, 0.71518934f, @@ -445,15 +445,15 @@ NGRAPH_TEST(${BACKEND_NAME}, batch_norm_fprop_inference_b2c2h2w1_v5) 0.4375872f, 0.89177299f}); - auto _gamma = backend->create_tensor(element::Type_t::f32, gamma_shape); + auto _gamma = backend->create_tensor(element::f32, gamma_shape); copy_data(_gamma, vector{1.0f, 1.0f}); - auto _beta = backend->create_tensor(element::Type_t::f32, beta_shape); + auto _beta = backend->create_tensor(element::f32, beta_shape); copy_data(_beta, vector{0.0f, 0.0f}); - auto _mean = backend->create_tensor(element::Type_t::f32, mean_shape); + auto _mean = backend->create_tensor(element::f32, mean_shape); copy_data(_mean, vector{0.583388f, 0.619252f}); - auto _var = backend->create_tensor(element::Type_t::f32, var_shape); + auto _var = backend->create_tensor(element::f32, var_shape); copy_data(_var, vector{0.0119972f, 0.0282681f}); - auto bn_output = backend->create_tensor(element::Type_t::f32, shape_r); + auto bn_output = backend->create_tensor(element::f32, shape_r); vector expected_result{ -0.30327f, 1.1561f, -0.0963782f, -0.434702f, -1.4011f, 0.548275f, -1.06187f, 1.59295f}; diff --git a/ngraph/test/backend/broadcast.in.cpp b/ngraph/test/backend/broadcast.in.cpp index 6c203a8adb977d..25b5ac6976b155 100644 --- a/ngraph/test/backend/broadcast.in.cpp +++ b/ngraph/test/backend/broadcast.in.cpp @@ -43,19 +43,19 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, broadcast_scalar_vector) { Shape shape_a{}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_r{4}; auto f = make_shared( make_shared( - A, op::Constant::create(element::Type_t::u64, Shape{shape_r.size()}, shape_r)), + A, op::Constant::create(element::u64, Shape{shape_r.size()}, shape_r)), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{6}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -66,19 +66,19 @@ NGRAPH_TEST(${BACKEND_NAME}, broadcast_scalar_vector) NGRAPH_TEST(${BACKEND_NAME}, broadcast_scalar_matrix) { Shape shape_a{}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_r{2, 2}; auto f = make_shared( make_shared( - A, op::Constant::create(element::Type_t::u64, Shape{shape_r.size()}, shape_r)), + A, op::Constant::create(element::u64, Shape{shape_r.size()}, shape_r)), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{6}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -89,19 +89,19 @@ NGRAPH_TEST(${BACKEND_NAME}, broadcast_scalar_matrix) NGRAPH_TEST(${BACKEND_NAME}, broadcast_scalar_tensor) { Shape shape_a{}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_r{2, 2, 2}; auto f = make_shared( make_shared( - A, op::Constant::create(element::Type_t::u64, Shape{shape_r.size()}, shape_r)), + A, op::Constant::create(element::u64, Shape{shape_r.size()}, shape_r)), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{6}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -113,18 +113,18 @@ NGRAPH_TEST(${BACKEND_NAME}, broadcast_scalar_tensor) NGRAPH_TEST(${BACKEND_NAME}, broadcast_trivial) { Shape shape{2, 2, 2}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared( make_shared( - A, op::Constant::create(element::Type_t::u64, Shape{shape.size()}, shape)), + A, op::Constant::create(element::u64, Shape{shape.size()}, shape)), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{2, 4, 6, 8, 16, 32, 64, 128}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -136,21 +136,21 @@ NGRAPH_TEST(${BACKEND_NAME}, broadcast_trivial) NGRAPH_TEST(${BACKEND_NAME}, broadcast_vector_colwise) { Shape shape_a{3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_r{3, 4}; auto f = make_shared( make_shared( A, - op::Constant::create(element::Type_t::u64, Shape{shape_r.size()}, shape_r), - op::Constant::create(element::Type_t::i64, Shape{1}, {0})), + op::Constant::create(element::u64, Shape{shape_r.size()}, shape_r), + op::Constant::create(element::i64, Shape{1}, {0})), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -162,21 +162,21 @@ NGRAPH_TEST(${BACKEND_NAME}, broadcast_vector_colwise) NGRAPH_TEST(${BACKEND_NAME}, broadcast_vector_rowwise) { Shape shape_a{4}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_r{3, 4}; auto f = make_shared( make_shared( A, - op::Constant::create(element::Type_t::u64, Shape{shape_r.size()}, shape_r), - op::Constant::create(element::Type_t::i64, Shape{1}, {1})), + op::Constant::create(element::u64, Shape{shape_r.size()}, shape_r), + op::Constant::create(element::i64, Shape{1}, {1})), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -189,24 +189,22 @@ NGRAPH_TEST(${BACKEND_NAME}, broadcast_vector_rowwise) NGRAPH_TEST(${BACKEND_NAME}, broadcast_vector_rowwise_reversed) { Shape shape_a{4}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_r{3, 4}; auto broadcast = make_shared( A, - op::Constant::create(element::Type_t::u64, Shape{shape_r.size()}, shape_r), - op::Constant::create(element::Type_t::i64, Shape{1}, {1})); - auto reverse = - make_shared(broadcast, - op::Constant::create(element::Type_t::i64, {1}, {1}), - op::v1::Reverse::Mode::INDEX); + op::Constant::create(element::u64, Shape{shape_r.size()}, shape_r), + op::Constant::create(element::i64, Shape{1}, {1})); + auto reverse = make_shared( + broadcast, op::Constant::create(element::i64, {1}, {1}), op::v1::Reverse::Mode::INDEX); auto f = make_shared(reverse, ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -218,21 +216,21 @@ NGRAPH_TEST(${BACKEND_NAME}, broadcast_vector_rowwise_reversed) NGRAPH_TEST(${BACKEND_NAME}, broadcast_vector_rowwise_int64) { Shape shape_a{4}; - auto A = make_shared(element::Type_t::i64, shape_a); + auto A = make_shared(element::i64, shape_a); Shape shape_r{3, 4}; auto f = make_shared( make_shared( A, - op::Constant::create(element::Type_t::u64, Shape{shape_r.size()}, shape_r), - op::Constant::create(element::Type_t::i64, Shape{1}, {1})), + op::Constant::create(element::u64, Shape{shape_r.size()}, shape_r), + op::Constant::create(element::i64, Shape{1}, {1})), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i64, shape_a); + auto a = backend->create_tensor(element::i64, shape_a); copy_data(a, vector{1, 2, 3, 4}); - auto result = backend->create_tensor(element::Type_t::i64, shape_r); + auto result = backend->create_tensor(element::i64, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -242,21 +240,21 @@ NGRAPH_TEST(${BACKEND_NAME}, broadcast_vector_rowwise_int64) NGRAPH_TEST(${BACKEND_NAME}, broadcast_scalar_to_matrix_int64) { Shape shape_a{1}; - auto A = make_shared(element::Type_t::i64, shape_a); + auto A = make_shared(element::i64, shape_a); Shape shape_r{3, 1}; auto f = make_shared( make_shared( A, - op::Constant::create(element::Type_t::u64, Shape{shape_r.size()}, shape_r), - op::Constant::create(element::Type_t::i64, Shape{1}, {1})), + op::Constant::create(element::u64, Shape{shape_r.size()}, shape_r), + op::Constant::create(element::i64, Shape{1}, {1})), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i64, shape_a); + auto a = backend->create_tensor(element::i64, shape_a); copy_data(a, vector{4}); - auto result = backend->create_tensor(element::Type_t::i64, shape_r); + auto result = backend->create_tensor(element::i64, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -266,21 +264,21 @@ NGRAPH_TEST(${BACKEND_NAME}, broadcast_scalar_to_matrix_int64) NGRAPH_TEST(${BACKEND_NAME}, broadcast_scalar_to_matrix_int32) { Shape shape_a{1}; - auto A = make_shared(element::Type_t::i32, shape_a); + auto A = make_shared(element::i32, shape_a); Shape shape_r{3, 1}; auto f = make_shared( make_shared( A, - op::Constant::create(element::Type_t::u64, Shape{shape_r.size()}, shape_r), - op::Constant::create(element::Type_t::i64, Shape{1}, {1})), + op::Constant::create(element::u64, Shape{shape_r.size()}, shape_r), + op::Constant::create(element::i64, Shape{1}, {1})), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i32, shape_a); + auto a = backend->create_tensor(element::i32, shape_a); copy_data(a, vector{4}); - auto result = backend->create_tensor(element::Type_t::i32, shape_r); + auto result = backend->create_tensor(element::i32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -289,16 +287,15 @@ NGRAPH_TEST(${BACKEND_NAME}, broadcast_scalar_to_matrix_int32) static void broadcast_test_helper(const Shape& shape_a, const Shape& shape_r, const AxisSet& axes) { - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); vector inp_data(shape_size(shape_a)); iota(inp_data.begin(), inp_data.end(), 1.f); - auto shape_const = op::Constant::create(element::Type_t::u64, Shape{shape_r.size()}, shape_r); + auto shape_const = op::Constant::create(element::u64, Shape{shape_r.size()}, shape_r); std::shared_ptr broadcast; if (axes.size() > 0) { - auto axes_const = - op::Constant::create(element::Type_t::i64, Shape{axes.size()}, axes.to_vector()); + auto axes_const = op::Constant::create(element::i64, Shape{axes.size()}, axes.to_vector()); broadcast = make_shared(A, shape_const, axes_const); } else @@ -310,14 +307,14 @@ static void broadcast_test_helper(const Shape& shape_a, const Shape& shape_r, co auto ref_backend = runtime::Backend::create("INTERPRETER"); auto wrk_backend = runtime::Backend::create("${BACKEND_NAME}"); - auto wrk_a = wrk_backend->create_tensor(element::Type_t::f32, shape_a); + auto wrk_a = wrk_backend->create_tensor(element::f32, shape_a); copy_data(wrk_a, inp_data); - auto ref_a = ref_backend->create_tensor(element::Type_t::f32, shape_a); + auto ref_a = ref_backend->create_tensor(element::f32, shape_a); copy_data(ref_a, inp_data); - auto wrk_result = wrk_backend->create_tensor(element::Type_t::f32, shape_r); - auto ref_result = ref_backend->create_tensor(element::Type_t::f32, shape_r); + auto wrk_result = wrk_backend->create_tensor(element::f32, shape_r); + auto ref_result = ref_backend->create_tensor(element::f32, shape_r); auto wrk_handle = wrk_backend->compile(f); auto ref_handle = ref_backend->compile(f); @@ -449,19 +446,19 @@ NGRAPH_TEST(${BACKEND_NAME}, broadcast_algo_3d_stride_2) NGRAPH_TEST(${BACKEND_NAME}, broadcast_matrix_0) { Shape shape_a{2, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_r{2, 2, 2}; auto f = make_shared( make_shared( - A, op::Constant::create(element::Type_t::u64, Shape{shape_r.size()}, shape_r)), + A, op::Constant::create(element::u64, Shape{shape_r.size()}, shape_r)), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -473,21 +470,21 @@ NGRAPH_TEST(${BACKEND_NAME}, broadcast_matrix_0) NGRAPH_TEST(${BACKEND_NAME}, broadcast_matrix_1) { Shape shape_a{2, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_r{2, 2, 2}; auto f = make_shared( make_shared( A, - op::Constant::create(element::Type_t::u64, Shape{shape_r.size()}, shape_r), - op::Constant::create(element::Type_t::i64, Shape{2}, {0, 2})), + op::Constant::create(element::u64, Shape{shape_r.size()}, shape_r), + op::Constant::create(element::i64, Shape{2}, {0, 2})), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -499,21 +496,21 @@ NGRAPH_TEST(${BACKEND_NAME}, broadcast_matrix_1) NGRAPH_TEST(${BACKEND_NAME}, broadcast_matrix_2) { Shape shape_a{2, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_r{2, 2, 2}; auto f = make_shared( make_shared( A, - op::Constant::create(element::Type_t::u64, Shape{shape_r.size()}, shape_r), - op::Constant::create(element::Type_t::i64, Shape{2}, {0, 1})), + op::Constant::create(element::u64, Shape{shape_r.size()}, shape_r), + op::Constant::create(element::i64, Shape{2}, {0, 1})), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); diff --git a/ngraph/test/backend/builder_reduce_ops_opset1.in.cpp b/ngraph/test/backend/builder_reduce_ops_opset1.in.cpp index d5128334ef29f6..1a322bb09bfa47 100644 --- a/ngraph/test/backend/builder_reduce_ops_opset1.in.cpp +++ b/ngraph/test/backend/builder_reduce_ops_opset1.in.cpp @@ -36,7 +36,7 @@ NGRAPH_TEST(${BACKEND_NAME}, builder_opset1_mean) { const Shape input_shape{4, 3, 2}; const AxisSet axes{1, 2}; - const auto input = make_shared(element::Type_t::f32, input_shape); + const auto input = make_shared(element::f32, input_shape); const auto mean_builder = builder::opset1::mean(input, axes); auto function = make_shared(mean_builder, ParameterVector{input}); @@ -53,7 +53,7 @@ NGRAPH_TEST(${BACKEND_NAME}, builder_opset1_mean_dynamic) { const Shape input_shape{2, 4, 5}; const AxisSet axes{0, 1}; - const auto input = make_shared(element::Type_t::f32, input_shape); + const auto input = make_shared(element::f32, input_shape); const auto mean_builder = builder::opset1::mean(input, axes); auto function = make_shared(mean_builder, ParameterVector{input}); @@ -71,7 +71,7 @@ NGRAPH_TEST(${BACKEND_NAME}, builder_opset1_mean_dynamic_2) { const Shape input_shape{2, 1, 3}; const AxisSet axes{1, 2}; - const auto input = make_shared(element::Type_t::f32, input_shape); + const auto input = make_shared(element::f32, input_shape); const auto mean_builder = builder::opset1::mean(input, axes); auto function = make_shared(mean_builder, ParameterVector{input}); @@ -91,7 +91,7 @@ NGRAPH_TEST(${BACKEND_NAME}, builder_opset1_collapse_5d_to_3d) const auto elems_in_tensor = shape_size(shape_input); - const auto A = make_shared(element::Type_t::f32, shape_input); + const auto A = make_shared(element::f32, shape_input); const auto builder_collapse = builder::opset1::collapse(A, 1, shape_input.size() - 2); const auto f = make_shared(builder_collapse, ParameterVector{A}); @@ -112,7 +112,7 @@ NGRAPH_TEST(${BACKEND_NAME}, builder_opset1_collapse_all_dims) const auto elems_in_tensor = shape_size(shape_input); - const auto A = make_shared(element::Type_t::f32, shape_input); + const auto A = make_shared(element::f32, shape_input); const auto builder_collapse = builder::opset1::collapse(A, 0, shape_input.size() - 1); const auto f = make_shared(builder_collapse, ParameterVector{A}); @@ -132,7 +132,7 @@ NGRAPH_TEST(${BACKEND_NAME}, builder_opset1_collapse_none) const auto elems_in_tensor = shape_size(shape_input); - const auto A = make_shared(element::Type_t::f32, shape_input); + const auto A = make_shared(element::f32, shape_input); const auto builder_collapse = builder::opset1::collapse(A, 2, shape_input.size() - 4); const auto f = make_shared(builder_collapse, ParameterVector{A}); @@ -151,7 +151,7 @@ NGRAPH_TEST(${BACKEND_NAME}, builder_opset1_collapse_dyn_shape) PartialShape pshape_input{1, 2, 3, 4, 5, Dimension()}; PartialShape pshape_output{1, 24, 5, Dimension()}; - const auto A = make_shared(element::Type_t::f32, pshape_input); + const auto A = make_shared(element::f32, pshape_input); EXPECT_TRUE(A->get_output_partial_shape(0).same_scheme( PartialShape{1, 2, 3, 4, 5, Dimension::dynamic()})); const auto builder_collapse = builder::opset1::collapse(A, 1, 3); diff --git a/ngraph/test/backend/ceiling.in.cpp b/ngraph/test/backend/ceiling.in.cpp index ca97bd85eb72a8..e237bfa9c29ea4 100644 --- a/ngraph/test/backend/ceiling.in.cpp +++ b/ngraph/test/backend/ceiling.in.cpp @@ -46,7 +46,7 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, ceiling) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared(make_shared(A), ParameterVector{A}); auto test_case = test::TestCase(f); @@ -59,7 +59,7 @@ NGRAPH_TEST(${BACKEND_NAME}, ceiling_int64) { // This tests large numbers that will not fit in a double Shape shape{3}; - auto A = make_shared(element::Type_t::i64, shape); + auto A = make_shared(element::i64, shape); auto f = make_shared(make_shared(A), ParameterVector{A}); vector expected{0, 1, 0x4000000000000001}; diff --git a/ngraph/test/backend/comparison.in.cpp b/ngraph/test/backend/comparison.in.cpp index bd20b91e75d565..37d08c2c120470 100644 --- a/ngraph/test/backend/comparison.in.cpp +++ b/ngraph/test/backend/comparison.in.cpp @@ -41,18 +41,18 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, equal) { Shape shape{2, 2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 8, -8, 17, -0.5, 0, 1, 1}); - auto b = backend->create_tensor(element::Type_t::f32, shape); + auto b = backend->create_tensor(element::f32, shape); copy_data(b, vector{1, 8, 4, 8, 0, 0, 1, 1.5}); - auto result = backend->create_tensor(element::Type_t::boolean, shape); + auto result = backend->create_tensor(element::boolean, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b}); @@ -62,18 +62,18 @@ NGRAPH_TEST(${BACKEND_NAME}, equal) NGRAPH_TEST(${BACKEND_NAME}, notequal) { Shape shape{2, 2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 8, -8, 17, -0.5, 0, 1, 1}); - auto b = backend->create_tensor(element::Type_t::f32, shape); + auto b = backend->create_tensor(element::f32, shape); copy_data(b, vector{1, 8, 4, 8, 0, 0, 1, 1.5}); - auto result = backend->create_tensor(element::Type_t::boolean, shape); + auto result = backend->create_tensor(element::boolean, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b}); @@ -83,18 +83,18 @@ NGRAPH_TEST(${BACKEND_NAME}, notequal) NGRAPH_TEST(${BACKEND_NAME}, greater) { Shape shape{2, 2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 8, -8, 17, -0.5, 0.5, 2, 1}); - auto b = backend->create_tensor(element::Type_t::f32, shape); + auto b = backend->create_tensor(element::f32, shape); copy_data(b, vector{1, 2, 4, 8, 0, 0, 1, 1.5}); - auto result = backend->create_tensor(element::Type_t::boolean, shape); + auto result = backend->create_tensor(element::boolean, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b}); @@ -104,18 +104,18 @@ NGRAPH_TEST(${BACKEND_NAME}, greater) NGRAPH_TEST(${BACKEND_NAME}, greater_int64) { Shape shape{2, 2, 2}; - auto A = make_shared(element::Type_t::i64, shape); - auto B = make_shared(element::Type_t::i64, shape); + auto A = make_shared(element::i64, shape); + auto B = make_shared(element::i64, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i64, shape); + auto a = backend->create_tensor(element::i64, shape); copy_data(a, vector{0x4000000000000002, 0x4000000000000006, -8, 17, -5, 5, 2, 1}); - auto b = backend->create_tensor(element::Type_t::i64, shape); + auto b = backend->create_tensor(element::i64, shape); copy_data(b, vector{0x4000000000000001, 0x4000000000000002, 4, 8, 0, 0, 1, 2}); - auto result = backend->create_tensor(element::Type_t::boolean, shape); + auto result = backend->create_tensor(element::boolean, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b}); @@ -125,18 +125,18 @@ NGRAPH_TEST(${BACKEND_NAME}, greater_int64) NGRAPH_TEST(${BACKEND_NAME}, greatereq) { Shape shape{2, 2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 8, -8, 17, -0.5, 0, 2, 1}); - auto b = backend->create_tensor(element::Type_t::f32, shape); + auto b = backend->create_tensor(element::f32, shape); copy_data(b, vector{1, 2, -8, 8, 0, 0, 0.5, 1.5}); - auto result = backend->create_tensor(element::Type_t::boolean, shape); + auto result = backend->create_tensor(element::boolean, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b}); @@ -146,18 +146,18 @@ NGRAPH_TEST(${BACKEND_NAME}, greatereq) NGRAPH_TEST(${BACKEND_NAME}, less) { Shape shape{2, 2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 8, -8, 17, -0.5, 0.5, 2, 1}); - auto b = backend->create_tensor(element::Type_t::f32, shape); + auto b = backend->create_tensor(element::f32, shape); copy_data(b, vector{1, 2, 4, 8, 0, 0, 1, 1.5}); - auto result = backend->create_tensor(element::Type_t::boolean, shape); + auto result = backend->create_tensor(element::boolean, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b}); @@ -167,18 +167,18 @@ NGRAPH_TEST(${BACKEND_NAME}, less) NGRAPH_TEST(${BACKEND_NAME}, lesseq) { Shape shape{2, 2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 8, -8, 17, -0.5, 0, 2, 1}); - auto b = backend->create_tensor(element::Type_t::f32, shape); + auto b = backend->create_tensor(element::f32, shape); copy_data(b, vector{1, 2, -8, 8, 0, 0, 0.5, 1.5}); - auto result = backend->create_tensor(element::Type_t::boolean, shape); + auto result = backend->create_tensor(element::boolean, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b}); @@ -188,18 +188,18 @@ NGRAPH_TEST(${BACKEND_NAME}, lesseq) NGRAPH_TEST(${BACKEND_NAME}, lesseq_int32) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::i32, shape); - auto B = make_shared(element::Type_t::i32, shape); + auto A = make_shared(element::i32, shape); + auto B = make_shared(element::i32, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i32, shape); + auto a = backend->create_tensor(element::i32, shape); copy_data(a, vector{0x40000170, 0x40000005, 0x40000005, -5}); - auto b = backend->create_tensor(element::Type_t::i32, shape); + auto b = backend->create_tensor(element::i32, shape); copy_data(b, vector{0x40000140, 0x40000001, 0x40000005, 0}); - auto result = backend->create_tensor(element::Type_t::boolean, shape); + auto result = backend->create_tensor(element::boolean, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b}); @@ -209,18 +209,18 @@ NGRAPH_TEST(${BACKEND_NAME}, lesseq_int32) NGRAPH_TEST(${BACKEND_NAME}, lesseq_bool) { Shape shape{2, 2, 2}; - auto A = make_shared(element::Type_t::boolean, shape); - auto B = make_shared(element::Type_t::boolean, shape); + auto A = make_shared(element::boolean, shape); + auto B = make_shared(element::boolean, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::boolean, shape); + auto a = backend->create_tensor(element::boolean, shape); copy_data(a, vector{1, 1, 1, 1, 1, 1, 1, 1}); - auto b = backend->create_tensor(element::Type_t::boolean, shape); + auto b = backend->create_tensor(element::boolean, shape); copy_data(b, vector{0, 0, 0, 0, 0, 0, 0, 0}); - auto result = backend->create_tensor(element::Type_t::boolean, shape); + auto result = backend->create_tensor(element::boolean, shape); // Overwrite the initial result vector to make sure we're not just coincidentally getting the // right value. diff --git a/ngraph/test/backend/concat.in.cpp b/ngraph/test/backend/concat.in.cpp index 92416268967330..c98ecfeb0d9900 100644 --- a/ngraph/test/backend/concat.in.cpp +++ b/ngraph/test/backend/concat.in.cpp @@ -34,11 +34,11 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, concat_negative_axis) { auto pshape_a = PartialShape::dynamic(); - auto A = make_shared(element::Type_t::f32, pshape_a); + auto A = make_shared(element::f32, pshape_a); auto pshape_b = PartialShape::dynamic(); - auto B = make_shared(element::Type_t::f32, pshape_b); + auto B = make_shared(element::f32, pshape_b); auto pshape_c = PartialShape::dynamic(); - auto C = make_shared(element::Type_t::f32, pshape_c); + auto C = make_shared(element::f32, pshape_c); auto pshape_r = PartialShape::dynamic(); auto f = make_shared(make_shared(NodeVector{A, B, C}, -1), ParameterVector{A, B, C}); @@ -46,13 +46,13 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_negative_axis) auto backend = runtime::Backend::create("${BACKEND_NAME}", true); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, Shape{2, 2}); + auto a = backend->create_tensor(element::f32, Shape{2, 2}); copy_data(a, vector{2, 4, 8, 16}); - auto b = backend->create_tensor(element::Type_t::f32, Shape{2, 3}); + auto b = backend->create_tensor(element::f32, Shape{2, 3}); copy_data(b, vector{1, 2, 4, 8, 16, 32}); - auto c = backend->create_tensor(element::Type_t::f32, Shape{2, 3}); + auto c = backend->create_tensor(element::f32, Shape{2, 3}); copy_data(c, vector{2, 3, 5, 7, 11, 13}); - auto result = backend->create_dynamic_tensor(element::Type_t::f32, PartialShape::dynamic()); + auto result = backend->create_dynamic_tensor(element::f32, PartialShape::dynamic()); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b, c}); ASSERT_EQ(result->get_shape(), (Shape{2, 8})); @@ -63,11 +63,11 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_negative_axis) NGRAPH_TEST(${BACKEND_NAME}, concat_matrix_colwise) { Shape shape_a{2, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_b{2, 3}; - auto B = make_shared(element::Type_t::f32, shape_b); + auto B = make_shared(element::f32, shape_b); Shape shape_c{2, 3}; - auto C = make_shared(element::Type_t::f32, shape_c); + auto C = make_shared(element::f32, shape_c); Shape shape_r{2, 8}; auto f = make_shared(make_shared(NodeVector{A, B, C}, 1), ParameterVector{A, B, C}); @@ -75,13 +75,13 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_matrix_colwise) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{2, 4, 8, 16}); - auto b = backend->create_tensor(element::Type_t::f32, shape_b); + auto b = backend->create_tensor(element::f32, shape_b); copy_data(b, vector{1, 2, 4, 8, 16, 32}); - auto c = backend->create_tensor(element::Type_t::f32, shape_c); + auto c = backend->create_tensor(element::f32, shape_c); copy_data(c, vector{2, 3, 5, 7, 11, 13}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b, c}); @@ -94,11 +94,11 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_matrix_colwise) NGRAPH_TEST(${BACKEND_NAME}, concat_matrix_rowwise) { Shape shape_a{2, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_b{3, 2}; - auto B = make_shared(element::Type_t::f32, shape_b); + auto B = make_shared(element::f32, shape_b); Shape shape_c{3, 2}; - auto C = make_shared(element::Type_t::f32, shape_c); + auto C = make_shared(element::f32, shape_c); Shape shape_r{8, 2}; auto f = make_shared(make_shared(NodeVector{A, B, C}, 0), ParameterVector{A, B, C}); @@ -106,13 +106,13 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_matrix_rowwise) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{2, 4, 8, 16}); - auto b = backend->create_tensor(element::Type_t::f32, shape_b); + auto b = backend->create_tensor(element::f32, shape_b); copy_data(b, vector{1, 2, 4, 8, 16, 32}); - auto c = backend->create_tensor(element::Type_t::f32, shape_c); + auto c = backend->create_tensor(element::f32, shape_c); copy_data(c, vector{2, 3, 5, 7, 11, 13}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b, c}); @@ -125,11 +125,11 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_matrix_rowwise) NGRAPH_TEST(${BACKEND_NAME}, concat_matrix_int64) { Shape shape_a{2, 2}; - auto A = make_shared(element::Type_t::i64, shape_a); + auto A = make_shared(element::i64, shape_a); Shape shape_b{3, 2}; - auto B = make_shared(element::Type_t::i64, shape_b); + auto B = make_shared(element::i64, shape_b); Shape shape_c{3, 2}; - auto C = make_shared(element::Type_t::i64, shape_c); + auto C = make_shared(element::i64, shape_c); Shape shape_r{8, 2}; auto f = make_shared(make_shared(NodeVector{A, B, C}, 0), ParameterVector{A, B, C}); @@ -137,13 +137,13 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_matrix_int64) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i64, shape_a); + auto a = backend->create_tensor(element::i64, shape_a); copy_data(a, vector{2, 4, 8, 16}); - auto b = backend->create_tensor(element::Type_t::i64, shape_b); + auto b = backend->create_tensor(element::i64, shape_b); copy_data(b, vector{1, 2, 4, 8, 16, 32}); - auto c = backend->create_tensor(element::Type_t::i64, shape_c); + auto c = backend->create_tensor(element::i64, shape_c); copy_data(c, vector{2, 3, 5, 7, 11, 13}); - auto result = backend->create_tensor(element::Type_t::i64, shape_r); + auto result = backend->create_tensor(element::i64, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b, c}); @@ -166,7 +166,7 @@ NGRAPH_TEST_P(${BACKEND_NAME}, concat_vector_params, concat_vector_large) ParameterVector inputs_param; for (uint32_t i = 0; i < num_inputs; i++) { - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); inputs_param.push_back(A); inputs.push_back(A); } @@ -180,12 +180,12 @@ NGRAPH_TEST_P(${BACKEND_NAME}, concat_vector_params, concat_vector_large) std::vector ref_result; for (uint32_t i = 0; i < num_inputs; i++) { - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{static_cast(i)}); ref_result.push_back(static_cast(i)); inputs_value.push_back(a); } - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, inputs_value); @@ -205,11 +205,11 @@ NGRAPH_INSTANTIATE_TEST_CASE_P(${BACKEND_NAME}, NGRAPH_TEST(${BACKEND_NAME}, concat_vector) { Shape shape_a{4}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_b{6}; - auto B = make_shared(element::Type_t::f32, shape_b); + auto B = make_shared(element::f32, shape_b); Shape shape_c{2}; - auto C = make_shared(element::Type_t::f32, shape_c); + auto C = make_shared(element::f32, shape_c); Shape shape_r{12}; auto f = make_shared(make_shared(NodeVector{A, B, C}, 0), ParameterVector{A, B, C}); @@ -217,13 +217,13 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_vector) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{2, 4, 8, 16}); - auto b = backend->create_tensor(element::Type_t::f32, shape_b); + auto b = backend->create_tensor(element::f32, shape_b); copy_data(b, vector{1, 2, 4, 8, 16, 32}); - auto c = backend->create_tensor(element::Type_t::f32, shape_c); + auto c = backend->create_tensor(element::f32, shape_c); copy_data(c, vector{18, 19}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b, c}); @@ -235,9 +235,9 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_vector) NGRAPH_TEST(${BACKEND_NAME}, concat_4d_tensor) { Shape shape{1, 1, 1, 1}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); - auto C = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); + auto C = make_shared(element::f32, shape); Shape shape_r{3, 1, 1, 1}; auto f = make_shared(make_shared(NodeVector{A, B, C}, 0), ParameterVector{A, B, C}); @@ -245,13 +245,13 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_4d_tensor) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1}); - auto b = backend->create_tensor(element::Type_t::f32, shape); + auto b = backend->create_tensor(element::f32, shape); copy_data(b, vector{2}); - auto c = backend->create_tensor(element::Type_t::f32, shape); + auto c = backend->create_tensor(element::f32, shape); copy_data(c, vector{3}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b, c}); @@ -262,9 +262,9 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_4d_tensor) NGRAPH_TEST(${BACKEND_NAME}, concat_2d_tensor) { Shape shape{1, 1}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); - auto C = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); + auto C = make_shared(element::f32, shape); Shape shape_r{3, 1}; auto f = make_shared(make_shared(NodeVector{A, B, C}, 0), ParameterVector{A, B, C}); @@ -272,13 +272,13 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_2d_tensor) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1}); - auto b = backend->create_tensor(element::Type_t::f32, shape); + auto b = backend->create_tensor(element::f32, shape); copy_data(b, vector{2}); - auto c = backend->create_tensor(element::Type_t::f32, shape); + auto c = backend->create_tensor(element::f32, shape); copy_data(c, vector{3}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b, c}); @@ -289,11 +289,11 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_2d_tensor) NGRAPH_TEST(${BACKEND_NAME}, concat_in_place_2d_tensor) { Shape shape{1, 1}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto add1 = make_shared(A, B); - auto C = make_shared(element::Type_t::f32, shape); - auto D = make_shared(element::Type_t::f32, shape); + auto C = make_shared(element::f32, shape); + auto D = make_shared(element::f32, shape); auto add2 = make_shared(C, D); auto subtract = make_shared(C, A); Shape shape_r{3, 1}; @@ -303,15 +303,15 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_in_place_2d_tensor) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1}); - auto b = backend->create_tensor(element::Type_t::f32, shape); + auto b = backend->create_tensor(element::f32, shape); copy_data(b, vector{2}); - auto c = backend->create_tensor(element::Type_t::f32, shape); + auto c = backend->create_tensor(element::f32, shape); copy_data(c, vector{3}); - auto d = backend->create_tensor(element::Type_t::f32, shape); + auto d = backend->create_tensor(element::f32, shape); copy_data(d, vector{4}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b, c, d}); @@ -322,11 +322,11 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_in_place_2d_tensor) NGRAPH_TEST(${BACKEND_NAME}, concat_in_place_propagate_2d_tensor) { Shape shape{1, 1}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto add1 = make_shared(A, B); - auto C = make_shared(element::Type_t::f32, shape); - auto D = make_shared(element::Type_t::f32, shape); + auto C = make_shared(element::f32, shape); + auto D = make_shared(element::f32, shape); auto add2 = make_shared(C, D); auto concat1 = make_shared(NodeVector{add1, add2}, 0); auto subtract = make_shared(C, A); @@ -337,15 +337,15 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_in_place_propagate_2d_tensor) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1}); - auto b = backend->create_tensor(element::Type_t::f32, shape); + auto b = backend->create_tensor(element::f32, shape); copy_data(b, vector{2}); - auto c = backend->create_tensor(element::Type_t::f32, shape); + auto c = backend->create_tensor(element::f32, shape); copy_data(c, vector{3}); - auto d = backend->create_tensor(element::Type_t::f32, shape); + auto d = backend->create_tensor(element::f32, shape); copy_data(d, vector{4}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b, c, d}); @@ -357,20 +357,20 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_in_place_tree_1) { Shape shape{1, 2, 2}; Shape shape_r{1, 4, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto add1 = make_shared(A, B); auto add2 = make_shared(A, B); auto concat = make_shared(NodeVector{add1, add2}, 1); auto f = make_shared(make_shared(concat, concat), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 1, 1, 1}); - auto b = backend->create_tensor(element::Type_t::f32, shape); + auto b = backend->create_tensor(element::f32, shape); copy_data(b, vector{1, 1, 1, 1}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b}); vector expected; @@ -383,8 +383,8 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_in_place_tree_2) { Shape shape{1, 2, 2}; Shape shape_r{1, 8, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto add1 = make_shared(A, B); auto add2 = make_shared(A, B); auto concat1 = make_shared(NodeVector{add1, add2}, 1); @@ -395,11 +395,11 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_in_place_tree_2) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 1, 1, 1}); - auto b = backend->create_tensor(element::Type_t::f32, shape); + auto b = backend->create_tensor(element::f32, shape); copy_data(b, vector{1, 1, 1, 1}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b}); vector expected; @@ -412,8 +412,8 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_in_place_tree_3) { Shape shape{1, 2, 2}; Shape shape_r{1, 16, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto concat1 = make_shared(NodeVector{A, B}, 1); auto concat2 = make_shared(NodeVector{A, B}, 1); auto concat3 = make_shared(NodeVector{A, B}, 1); @@ -425,11 +425,11 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_in_place_tree_3) make_shared(make_shared(concat14, concat14), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 1, 1, 1}); - auto b = backend->create_tensor(element::Type_t::f32, shape); + auto b = backend->create_tensor(element::f32, shape); copy_data(b, vector{1, 1, 1, 1}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b}); vector expected; @@ -442,8 +442,8 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_in_place_add_concat) { Shape shape{2, 2}; Shape shape_r{4, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto add1 = make_shared(A, B); auto add2 = make_shared(add1, add1); auto concat = make_shared(NodeVector{add1, add2}, 0); @@ -451,11 +451,11 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_in_place_add_concat) auto f = make_shared(add3, ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 1, 1, 1}); - auto b = backend->create_tensor(element::Type_t::f32, shape); + auto b = backend->create_tensor(element::f32, shape); copy_data(b, vector{1, 1, 1, 1}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b}); vector expected = {4, 4, 4, 4, 8, 8, 8, 8}; @@ -466,8 +466,8 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_in_place_add_concat_2) { Shape shape{1, 2, 2}; Shape shape_r{1, 6, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto add1 = make_shared(A, B); auto add2 = make_shared(A, B); auto add3 = make_shared(A, B); @@ -482,11 +482,11 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_in_place_add_concat_2) auto f = make_shared(add6, ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 1, 1, 1}); - auto b = backend->create_tensor(element::Type_t::f32, shape); + auto b = backend->create_tensor(element::f32, shape); copy_data(b, vector{1, 1, 1, 1}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b}); vector expected = {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}; @@ -558,11 +558,11 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_5d) } Shape shape_a{2, 3, 4, 3, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_b{2, 3, 3, 3, 2}; - auto B = make_shared(element::Type_t::f32, shape_b); + auto B = make_shared(element::f32, shape_b); Shape shape_c{2, 3, 2, 3, 2}; - auto C = make_shared(element::Type_t::f32, shape_c); + auto C = make_shared(element::f32, shape_c); Shape shape_r{2, 3, 9, 3, 2}; auto r = make_shared(NodeVector{A, B, C}, 2); @@ -571,14 +571,14 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_5d) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, a_data); - auto b = backend->create_tensor(element::Type_t::f32, shape_b); + auto b = backend->create_tensor(element::f32, shape_b); copy_data(b, b_data); - auto c = backend->create_tensor(element::Type_t::f32, shape_c); + auto c = backend->create_tensor(element::f32, shape_c); copy_data(c, c_data); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b, c}); @@ -618,9 +618,9 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_5d) NGRAPH_TEST(${BACKEND_NAME}, concat_zero_length_1d_last) { Shape shape_a{4}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_b{0}; - auto B = make_shared(element::Type_t::f32, shape_b); + auto B = make_shared(element::f32, shape_b); Shape shape_r{4}; auto r = make_shared(NodeVector{A, B}, 0); @@ -632,12 +632,12 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_zero_length_1d_last) vector a_data{1, 2, 3, 4}; vector b_data(0); - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, a_data); - auto b = backend->create_tensor(element::Type_t::f32, shape_b); + auto b = backend->create_tensor(element::f32, shape_b); copy_data(b, b_data); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b}); @@ -648,11 +648,11 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_zero_length_1d_last) NGRAPH_TEST(${BACKEND_NAME}, concat_zero_length_1d_middle) { Shape shape_a{4}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_b{0}; - auto B = make_shared(element::Type_t::f32, shape_b); + auto B = make_shared(element::f32, shape_b); Shape shape_c{4}; - auto C = make_shared(element::Type_t::f32, shape_c); + auto C = make_shared(element::f32, shape_c); Shape shape_r{8}; auto r = make_shared(NodeVector{A, B, C}, 0); @@ -665,14 +665,14 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_zero_length_1d_middle) vector b_data(0); vector c_data{5, 6, 7, 8}; - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, a_data); - auto b = backend->create_tensor(element::Type_t::f32, shape_b); + auto b = backend->create_tensor(element::f32, shape_b); copy_data(b, b_data); - auto c = backend->create_tensor(element::Type_t::f32, shape_c); + auto c = backend->create_tensor(element::f32, shape_c); copy_data(c, c_data); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b, c}); @@ -684,13 +684,13 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_zero_length_1d_middle) NGRAPH_TEST(${BACKEND_NAME}, concat_zero_zero) { Shape shape{0}; - auto constant_1 = op::Constant::create(element::Type_t::f32, shape, {1}); + auto constant_1 = op::Constant::create(element::f32, shape, {1}); auto concat_1 = make_shared(NodeVector{constant_1, constant_1}, 0); auto f = make_shared(concat_1, ParameterVector{}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {}); @@ -702,11 +702,11 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_zero_zero) NGRAPH_TEST(${BACKEND_NAME}, concat_zero_length_4d_middle) { Shape shape_a{2, 2, 1, 1}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_b{2, 2, 0, 1}; - auto B = make_shared(element::Type_t::f32, shape_b); + auto B = make_shared(element::f32, shape_b); Shape shape_c{2, 2, 1, 1}; - auto C = make_shared(element::Type_t::f32, shape_c); + auto C = make_shared(element::f32, shape_c); Shape shape_r{2, 2, 2, 1}; auto r = make_shared(NodeVector{A, B, C}, 2); @@ -719,14 +719,14 @@ NGRAPH_TEST(${BACKEND_NAME}, concat_zero_length_4d_middle) vector b_data(0); vector c_data{5, 6, 7, 8}; - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, a_data); - auto b = backend->create_tensor(element::Type_t::f32, shape_b); + auto b = backend->create_tensor(element::f32, shape_b); copy_data(b, b_data); - auto c = backend->create_tensor(element::Type_t::f32, shape_c); + auto c = backend->create_tensor(element::f32, shape_c); copy_data(c, c_data); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b, c}); diff --git a/ngraph/test/backend/constant.in.cpp b/ngraph/test/backend/constant.in.cpp index 675b44267c49ad..090063e642a397 100644 --- a/ngraph/test/backend/constant.in.cpp +++ b/ngraph/test/backend/constant.in.cpp @@ -34,13 +34,13 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, tensor_constant) { Shape shape{2, 2, 2}; - auto A = op::Constant::create(element::Type_t::f32, shape, {1, 2, 3, 4, 5, 6, 7, 8}); + auto A = op::Constant::create(element::f32, shape, {1, 2, 3, 4, 5, 6, 7, 8}); auto f = make_shared(A, ParameterVector{}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {}); @@ -52,14 +52,14 @@ NGRAPH_TEST(${BACKEND_NAME}, tensor_constant) NGRAPH_TEST(${BACKEND_NAME}, tensor_2constant) { Shape shape{2, 2, 2}; - auto A = op::Constant::create(element::Type_t::f32, shape, {1, 2, 3, 4, 5, 6, 7, 8}); + auto A = op::Constant::create(element::f32, shape, {1, 2, 3, 4, 5, 6, 7, 8}); auto f = make_shared(NodeVector{A, A}, ParameterVector{}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto result0 = backend->create_tensor(element::Type_t::f32, shape); - auto result1 = backend->create_tensor(element::Type_t::f32, shape); + auto result0 = backend->create_tensor(element::f32, shape); + auto result1 = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result0, result1}, {}); @@ -74,13 +74,13 @@ NGRAPH_TEST(${BACKEND_NAME}, tensor_2constant) NGRAPH_TEST(${BACKEND_NAME}, tensor_constant_with_op) { Shape shape{2, 2, 2}; - auto A = op::Constant::create(element::Type_t::f32, shape, {-1, 2, 3, -4, 5, -6, -7, 8}); + auto A = op::Constant::create(element::f32, shape, {-1, 2, 3, -4, 5, -6, -7, 8}); auto f = make_shared(make_shared(A), ParameterVector{}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {}); @@ -91,30 +91,29 @@ NGRAPH_TEST(${BACKEND_NAME}, tensor_constant_with_op) NGRAPH_TEST(${BACKEND_NAME}, constant_multi_use) { - auto A = - make_shared(element::Type_t::i32, Shape{}, std::vector{"388"}); + auto A = make_shared(element::i32, Shape{}, std::vector{"388"}); auto f = make_shared(A, ParameterVector{}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - std::shared_ptr r1 = backend->create_tensor(element::Type_t::i32, Shape{}); + std::shared_ptr r1 = backend->create_tensor(element::i32, Shape{}); auto handle = backend->compile(f); handle->call_with_validate({r1}, std::vector>{}); EXPECT_EQ(read_vector(r1), std::vector{388}); - std::shared_ptr r2 = backend->create_tensor(element::Type_t::i32, Shape{}); + std::shared_ptr r2 = backend->create_tensor(element::i32, Shape{}); handle->call_with_validate({r2}, std::vector>{}); EXPECT_EQ(read_vector(r2), std::vector{388}); } NGRAPH_TEST(${BACKEND_NAME}, scalar_constant_float32) { - auto r = op::Constant::create(element::Type_t::f32, Shape{}, {4.75}); + auto r = op::Constant::create(element::f32, Shape{}, {4.75}); auto f = make_shared(r, ParameterVector{}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto result = backend->create_tensor(element::Type_t::f32, Shape{}); + auto result = backend->create_tensor(element::f32, Shape{}); auto handle = backend->compile(f); handle->call_with_validate({result}, {}); @@ -124,13 +123,13 @@ NGRAPH_TEST(${BACKEND_NAME}, scalar_constant_float32) NGRAPH_TEST(${BACKEND_NAME}, scalar_constant_int64) { - auto r = op::Constant::create(element::Type_t::i64, Shape{}, {0x4000000000000001}); + auto r = op::Constant::create(element::i64, Shape{}, {0x4000000000000001}); auto f = make_shared(r, ParameterVector{}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto result = backend->create_tensor(element::Type_t::i64, Shape{}); + auto result = backend->create_tensor(element::i64, Shape{}); auto handle = backend->compile(f); handle->call_with_validate({result}, {}); @@ -140,13 +139,13 @@ NGRAPH_TEST(${BACKEND_NAME}, scalar_constant_int64) NGRAPH_TEST(${BACKEND_NAME}, tensor_constant_float32) { Shape shape{2, 2}; - auto r = op::Constant::create(element::Type_t::f32, shape, {4.75, 4.5, -5.25, 0.0}); + auto r = op::Constant::create(element::f32, shape, {4.75, 4.5, -5.25, 0.0}); auto f = make_shared(r, ParameterVector{}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {}); @@ -158,12 +157,11 @@ NGRAPH_TEST(${BACKEND_NAME}, tensor_constant_float32) NGRAPH_TEST(${BACKEND_NAME}, tensor_constant_int64) { Shape shape{2}; - auto r = - op::Constant::create(element::Type_t::i64, shape, {0x4000000000000001, 0x4000000000000002}); + auto r = op::Constant::create(element::i64, shape, {0x4000000000000001, 0x4000000000000002}); auto f = make_shared(r, ParameterVector{}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto result = backend->create_tensor(element::Type_t::i64, shape); + auto result = backend->create_tensor(element::i64, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {}); EXPECT_EQ((vector{0x4000000000000001, 0x4000000000000002}), @@ -173,18 +171,18 @@ NGRAPH_TEST(${BACKEND_NAME}, tensor_constant_int64) NGRAPH_TEST(${BACKEND_NAME}, constant_equality_bool) { Shape shape{4}; - // auto A = make_shared(element::Type_t::boolean, shape); - // auto B = make_shared(element::Type_t::boolean, shape); + // auto A = make_shared(element::boolean, shape); + // auto B = make_shared(element::boolean, shape); // auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); - auto A = op::Constant::create(element::Type_t::boolean, shape, {true, false, true, false}); - auto B = op::Constant::create(element::Type_t::boolean, shape, {true, true, true, true}); + auto A = op::Constant::create(element::boolean, shape, {true, false, true, false}); + auto B = op::Constant::create(element::boolean, shape, {true, true, true, true}); auto f = make_shared(make_shared(A, B), ParameterVector{}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto result = backend->create_tensor(element::Type_t::boolean, shape); + auto result = backend->create_tensor(element::boolean, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {}); diff --git a/ngraph/test/backend/convert.in.cpp b/ngraph/test/backend/convert.in.cpp index 0a0b780ea76bfc..17cc8d13ff00f7 100644 --- a/ngraph/test/backend/convert.in.cpp +++ b/ngraph/test/backend/convert.in.cpp @@ -32,16 +32,15 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, convert_int32_float32) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::i32, shape); - auto f = make_shared(make_shared(A, element::Type_t::f32), - ParameterVector{A}); + auto A = make_shared(element::i32, shape); + auto f = make_shared(make_shared(A, element::f32), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i32, shape); + auto a = backend->create_tensor(element::i32, shape); copy_data(a, vector{281, 2, 3, 4}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -51,16 +50,15 @@ NGRAPH_TEST(${BACKEND_NAME}, convert_int32_float32) NGRAPH_TEST(${BACKEND_NAME}, convert_uint16_float32) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::u16, shape); - auto f = make_shared(make_shared(A, element::Type_t::f32), - ParameterVector{A}); + auto A = make_shared(element::u16, shape); + auto f = make_shared(make_shared(A, element::f32), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::u16, shape); + auto a = backend->create_tensor(element::u16, shape); copy_data(a, vector{1, 2, 3, 4}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -71,9 +69,9 @@ NGRAPH_TEST(${BACKEND_NAME}, convert_uint16_float32) NGRAPH_TEST(${BACKEND_NAME}, convert_int32_bool) { Shape shape{2, 3}; - auto A = make_shared(element::Type_t::i32, shape); - auto f = make_shared(make_shared(A, element::Type_t::boolean), - ParameterVector{A}); + auto A = make_shared(element::i32, shape); + auto f = + make_shared(make_shared(A, element::boolean), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); @@ -81,9 +79,9 @@ NGRAPH_TEST(${BACKEND_NAME}, convert_int32_bool) int32_t max = std::numeric_limits::max(); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i32, shape); + auto a = backend->create_tensor(element::i32, shape); copy_data(a, vector{0, 12, 23, 0, lowest, max}); - auto result = backend->create_tensor(element::Type_t::boolean, shape); + auto result = backend->create_tensor(element::boolean, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -93,9 +91,9 @@ NGRAPH_TEST(${BACKEND_NAME}, convert_int32_bool) NGRAPH_TEST(${BACKEND_NAME}, convert_float32_bool) { Shape shape{3, 3}; - auto A = make_shared(element::Type_t::f32, shape); - auto f = make_shared(make_shared(A, element::Type_t::boolean), - ParameterVector{A}); + auto A = make_shared(element::f32, shape); + auto f = + make_shared(make_shared(A, element::boolean), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); @@ -106,9 +104,9 @@ NGRAPH_TEST(${BACKEND_NAME}, convert_float32_bool) float neg_inf = -std::numeric_limits::infinity(); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{0.f, 1.5745f, 0.12352f, 0.f, lowest, max, min, pos_inf, neg_inf}); - auto result = backend->create_tensor(element::Type_t::boolean, shape); + auto result = backend->create_tensor(element::boolean, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -123,14 +121,14 @@ NGRAPH_TEST(${BACKEND_NAME}, convert_float32_bf16) vector a_data = { 0.5f, 1.5f, 0.5f, 2.5f, 1.5f, 0.5f, 3.5f, 2.5f, 0.5f, 0.5f, 2.5f, 0.5f, 0.5f, 0.5f, 1.5f}; - auto A = make_shared(element::Type_t::f32, shape_a); - auto convert = make_shared(A, element::Type_t::bf16); + auto A = make_shared(element::f32, shape_a); + auto convert = make_shared(A, element::bf16); auto f = make_shared(NodeVector{convert}, ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, a_data); - auto result = backend->create_tensor(element::Type_t::bf16, shape_a); + auto result = backend->create_tensor(element::bf16, shape_a); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); EXPECT_EQ((vector{ @@ -146,14 +144,14 @@ NGRAPH_TEST(${BACKEND_NAME}, convert_bf16_float32) vector a_data = { 0.5, 1.5, 0.5, 2.5, 1.5, 0.5, 3.5, 2.5, 0.5, 0.5, 2.5, 0.5, 0.5, 0.5, 1.5}; - auto A = make_shared(element::Type_t::bf16, shape_a); - auto convert = make_shared(A, element::Type_t::f32); + auto A = make_shared(element::bf16, shape_a); + auto convert = make_shared(A, element::f32); auto f = make_shared(NodeVector{convert}, ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::bf16, shape_a); + auto a = backend->create_tensor(element::bf16, shape_a); copy_data(a, a_data); - auto result = backend->create_tensor(element::Type_t::f32, shape_a); + auto result = backend->create_tensor(element::f32, shape_a); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); EXPECT_EQ((vector{0.5f, diff --git a/ngraph/test/backend/convolution.in.cpp b/ngraph/test/backend/convolution.in.cpp index c092b80bdbde13..20636a2b4fec0d 100644 --- a/ngraph/test/backend/convolution.in.cpp +++ b/ngraph/test/backend/convolution.in.cpp @@ -33,9 +33,9 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, convolution_outlining) { Shape shape_a{1, 2, 2, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_b{2, 2, 1, 1}; - auto B = make_shared(element::Type_t::f32, shape_b); + auto B = make_shared(element::f32, shape_b); Shape shape_r{1, 2, 2, 2}; auto conv1 = make_shared( A, B, Strides{1, 1}, CoordinateDiff{0, 0}, CoordinateDiff{0, 0}, Strides{1, 1}); @@ -46,11 +46,11 @@ NGRAPH_TEST(${BACKEND_NAME}, convolution_outlining) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f}); - auto b = backend->create_tensor(element::Type_t::f32, shape_b); + auto b = backend->create_tensor(element::f32, shape_b); copy_data(b, vector{1.0f, 1.0f, 1.0f, 1.0f}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); vector expected_result{4.0f, 4.0f, 4.0f, 4.0f, 4.0f, 4.0f, 4.0f, 4.0f}; @@ -62,9 +62,9 @@ NGRAPH_TEST(${BACKEND_NAME}, convolution_outlining) NGRAPH_TEST(${BACKEND_NAME}, convolution_simple) { Shape shape_a{1, 2, 2, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_b{2, 2, 1, 1}; - auto B = make_shared(element::Type_t::f32, shape_b); + auto B = make_shared(element::f32, shape_b); Shape shape_r{1, 2, 2, 2}; auto conv1 = make_shared( A, B, Strides{1, 1}, CoordinateDiff{0, 0}, CoordinateDiff{0, 0}, Strides{1, 1}); @@ -74,11 +74,11 @@ NGRAPH_TEST(${BACKEND_NAME}, convolution_simple) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f}); - auto b = backend->create_tensor(element::Type_t::f32, shape_b); + auto b = backend->create_tensor(element::f32, shape_b); copy_data(b, vector{3.0f, 3.0f, 3.0f, 3.0f}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); vector expected_result{18.0f, 24.0f, 30.0f, 36.0f, 18.0f, 24.0f, 30.0f, 36.0f}; @@ -90,9 +90,9 @@ NGRAPH_TEST(${BACKEND_NAME}, convolution_simple) NGRAPH_TEST(${BACKEND_NAME}, convolution_simple_padding) { Shape shape_a{1, 1, 2, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_b{1, 1, 1, 1}; - auto B = make_shared(element::Type_t::f32, shape_b); + auto B = make_shared(element::f32, shape_b); Shape shape_r{1, 1, 5, 5}; auto conv1 = make_shared( A, B, Strides{1, 1}, CoordinateDiff{1, 1}, CoordinateDiff{2, 2}, Strides{1, 1}); @@ -102,11 +102,11 @@ NGRAPH_TEST(${BACKEND_NAME}, convolution_simple_padding) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1.0f, 2.0f, 3.0f, 4.0f}); - auto b = backend->create_tensor(element::Type_t::f32, shape_b); + auto b = backend->create_tensor(element::f32, shape_b); copy_data(b, vector{2.0f}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); // clang-format off vector expected_result{0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 2.0f, 4.0f, 0.0f, 0.0f, @@ -124,12 +124,12 @@ NGRAPH_TEST(${BACKEND_NAME}, convolution_simple_padding) NGRAPH_TEST(${BACKEND_NAME}, dyn_convolution_backprop_data) { Shape shape_filter{6, 3, 3, 3}; - auto filters = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto filters = make_shared(element::f32, PartialShape::dynamic()); Shape shape_delta{2, 6, 3, 3}; - auto deltas = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto deltas = make_shared(element::f32, PartialShape::dynamic()); Shape shape_data_batch_shape{2, 3, 5, 5}; auto data_batch_shape = - make_shared(element::Type_t::i64, PartialShape{Dimension::dynamic()}); + make_shared(element::i64, PartialShape{Dimension::dynamic()}); auto strides = Strides{1, 1}; auto dilations = Strides{1, 1}; auto padding_begin = CoordinateDiff{0, 0}; @@ -144,7 +144,7 @@ NGRAPH_TEST(${BACKEND_NAME}, dyn_convolution_backprop_data) auto handle = backend->compile(f); - auto result = backend->create_dynamic_tensor(element::Type_t::f32, PartialShape::dynamic()); + auto result = backend->create_dynamic_tensor(element::f32, PartialShape::dynamic()); vector filter, delta, expected_result; @@ -160,12 +160,11 @@ NGRAPH_TEST(${BACKEND_NAME}, dyn_convolution_backprop_data) vector shapes = {5, 5}; // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_delta); + auto a = backend->create_tensor(element::f32, shape_delta); copy_data(a, delta); - auto b = backend->create_tensor(element::Type_t::f32, shape_filter); + auto b = backend->create_tensor(element::f32, shape_filter); copy_data(b, filter); - auto c = backend->create_tensor(element::Type_t::i64, - Shape{shapes.size()}); // dynamic data batch shape + auto c = backend->create_tensor(element::i64, Shape{shapes.size()}); // dynamic data batch shape copy_data(c, shapes); handle->call_with_validate({result}, {a, b, c}); EXPECT_FALSE(test::all_close_f(vector{expected_result}, read_vector(result))); diff --git a/ngraph/test/backend/cos.in.cpp b/ngraph/test/backend/cos.in.cpp index 87f9b81192b325..9e29f11199f17b 100644 --- a/ngraph/test/backend/cos.in.cpp +++ b/ngraph/test/backend/cos.in.cpp @@ -46,7 +46,7 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, cos) { Shape shape{11}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared(make_shared(A), ParameterVector{A}); auto test_case = test::TestCase(f); diff --git a/ngraph/test/backend/cosh.in.cpp b/ngraph/test/backend/cosh.in.cpp index 126ee0e3f5fb0a..461c609fb2dd15 100644 --- a/ngraph/test/backend/cosh.in.cpp +++ b/ngraph/test/backend/cosh.in.cpp @@ -46,7 +46,7 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, cosh) { Shape shape{6}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared(make_shared(A), ParameterVector{A}); vector input{1.0f, 0.0f, -0.0f, -1.0f, 5.0f, -5.0f}; diff --git a/ngraph/test/backend/ctc_greedy_decoder.in.cpp b/ngraph/test/backend/ctc_greedy_decoder.in.cpp index 57fb6675a52215..ae516d7ef2e631 100644 --- a/ngraph/test/backend/ctc_greedy_decoder.in.cpp +++ b/ngraph/test/backend/ctc_greedy_decoder.in.cpp @@ -53,8 +53,8 @@ NGRAPH_TEST(${BACKEND_NAME}, ctc_greedy_decoder) const auto data_shape = Shape{T, N, C}; const auto masks_shape = Shape{T, N}; - auto data = make_shared(element::Type_t::f32, data_shape); - auto masks = make_shared(element::Type_t::f32, masks_shape); + auto data = make_shared(element::f32, data_shape); + auto masks = make_shared(element::f32, masks_shape); auto decoder = make_shared(data, masks, false); auto function = make_shared(decoder, ParameterVector{data, masks}); auto test_case = test::TestCase(function); @@ -74,8 +74,8 @@ NGRAPH_TEST(${BACKEND_NAME}, ctc_greedy_decoder_f16) const auto data_shape = Shape{T, N, C}; const auto masks_shape = Shape{T, N}; - auto data = make_shared(element::Type_t::f16, data_shape); - auto masks = make_shared(element::Type_t::f16, masks_shape); + auto data = make_shared(element::f16, data_shape); + auto masks = make_shared(element::f16, masks_shape); auto decoder = make_shared(data, masks, false); auto function = make_shared(decoder, ParameterVector{data, masks}); auto test_case = test::TestCase(function); @@ -95,8 +95,8 @@ NGRAPH_TEST(${BACKEND_NAME}, ctc_greedy_decoder_multiple_batches) const auto data_shape = Shape{T, N, C}; const auto masks_shape = Shape{T, N}; - auto data = make_shared(element::Type_t::f32, data_shape); - auto masks = make_shared(element::Type_t::f32, masks_shape); + auto data = make_shared(element::f32, data_shape); + auto masks = make_shared(element::f32, masks_shape); auto decoder = make_shared(data, masks, false); auto function = make_shared(decoder, ParameterVector{data, masks}); auto test_case = test::TestCase(function); @@ -136,8 +136,8 @@ NGRAPH_TEST(${BACKEND_NAME}, ctc_greedy_decoder_single_batch_short_sequence) const auto data_shape = Shape{T, N, C}; const auto masks_shape = Shape{T, N}; - auto data = make_shared(element::Type_t::f32, data_shape); - auto masks = make_shared(element::Type_t::f32, masks_shape); + auto data = make_shared(element::f32, data_shape); + auto masks = make_shared(element::f32, masks_shape); auto decoder = make_shared(data, masks, false); auto function = make_shared(decoder, ParameterVector{data, masks}); auto test_case = test::TestCase(function); @@ -157,8 +157,8 @@ NGRAPH_TEST(${BACKEND_NAME}, ctc_greedy_decoder_merge) const auto data_shape = Shape{T, N, C}; const auto masks_shape = Shape{T, N}; - auto data = make_shared(element::Type_t::f32, data_shape); - auto masks = make_shared(element::Type_t::f32, masks_shape); + auto data = make_shared(element::f32, data_shape); + auto masks = make_shared(element::f32, masks_shape); auto decoder = make_shared(data, masks, true); auto function = make_shared(decoder, ParameterVector{data, masks}); auto test_case = test::TestCase(function); @@ -178,8 +178,8 @@ NGRAPH_TEST(${BACKEND_NAME}, ctc_greedy_decoder_single_no_merge) const auto data_shape = Shape{T, N, C}; const auto masks_shape = Shape{T, N}; - auto data = make_shared(element::Type_t::f32, data_shape); - auto masks = make_shared(element::Type_t::f32, masks_shape); + auto data = make_shared(element::f32, data_shape); + auto masks = make_shared(element::f32, masks_shape); auto decoder = make_shared(data, masks, false); auto function = make_shared(decoder, ParameterVector{data, masks}); auto test_case = test::TestCase(function); @@ -199,8 +199,8 @@ NGRAPH_TEST(${BACKEND_NAME}, ctc_greedy_decoder_multiple_sequences) const auto data_shape = Shape{T, N, C}; const auto masks_shape = Shape{T, N}; - auto data = make_shared(element::Type_t::f32, data_shape); - auto masks = make_shared(element::Type_t::f32, masks_shape); + auto data = make_shared(element::f32, data_shape); + auto masks = make_shared(element::f32, masks_shape); auto decoder = make_shared(data, masks, false); auto function = make_shared(decoder, ParameterVector{data, masks}); auto test_case = test::TestCase(function); diff --git a/ngraph/test/backend/cum_sum.in.cpp b/ngraph/test/backend/cum_sum.in.cpp index e70d0258066a2a..7e6f143562e740 100644 --- a/ngraph/test/backend/cum_sum.in.cpp +++ b/ngraph/test/backend/cum_sum.in.cpp @@ -42,18 +42,18 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, cum_sum_default) { Shape shape{1, 4}; - auto A = make_shared(element::Type_t::f32, shape); - auto axis = make_shared(element::Type_t::i32, Shape{1}); + auto A = make_shared(element::f32, shape); + auto axis = make_shared(element::i32, Shape{1}); auto f = make_shared(make_shared(A, axis), ParameterVector{A, axis}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 2, 3, 4}); auto axis_tensor = backend->create_tensor(axis->get_element_type(), axis->get_shape()); copy_data(axis_tensor, vector{1}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, axis_tensor}); @@ -63,18 +63,18 @@ NGRAPH_TEST(${BACKEND_NAME}, cum_sum_default) NGRAPH_TEST(${BACKEND_NAME}, cum_sum_2dim) { Shape shape{2, 4}; - auto A = make_shared(element::Type_t::f32, shape); - auto axis = make_shared(element::Type_t::i64, Shape{1}); + auto A = make_shared(element::f32, shape); + auto axis = make_shared(element::i64, Shape{1}); auto f = make_shared(make_shared(A, axis), ParameterVector{A, axis}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{0, 1, 2, 3, 4, 5, 6, 7}); auto axis_tensor = backend->create_tensor(axis->get_element_type(), axis->get_shape()); copy_data(axis_tensor, vector{0}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, axis_tensor}); @@ -85,15 +85,15 @@ NGRAPH_TEST(${BACKEND_NAME}, cum_sum_2dim) NGRAPH_TEST(${BACKEND_NAME}, cum_sum_2dim_default_axis) { Shape shape{2, 4}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared(make_shared(A), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{0, 1, 2, 3, 4, 5, 6, 7}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -105,19 +105,19 @@ NGRAPH_TEST(${BACKEND_NAME}, cum_sum_3d) { auto test_cumsum_3d = [](const int32_t axis_val) -> void { Shape shape{3, 2, 4}; - auto A = make_shared(element::Type_t::f32, shape); - auto axis = make_shared(element::Type_t::i32, Shape{1}); + auto A = make_shared(element::f32, shape); + auto axis = make_shared(element::i32, Shape{1}); auto f = make_shared(make_shared(A, axis), ParameterVector{A, axis}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23}); auto axis_tensor = backend->create_tensor(axis->get_element_type(), axis->get_shape()); copy_data(axis_tensor, vector{axis_val}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, axis_tensor}); @@ -153,19 +153,19 @@ NGRAPH_TEST(${BACKEND_NAME}, cum_sum_2dim_allmodes) { auto test_cum_sum_allmodes = [](const int64_t axis_val, int exclusive, int reverse) { Shape shape{2, 4}; - auto A = make_shared(element::Type_t::f32, shape); - auto axis = make_shared(element::Type_t::i64, Shape{1}); + auto A = make_shared(element::f32, shape); + auto axis = make_shared(element::i64, Shape{1}); auto f = make_shared(make_shared(A, axis, exclusive, reverse), ParameterVector{A, axis}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{0, 1, 2, 3, 4, 5, 6, 7}); auto axis_tensor = backend->create_tensor(axis->get_element_type(), axis->get_shape()); copy_data(axis_tensor, vector{axis_val}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, axis_tensor}); diff --git a/ngraph/test/backend/divide.in.cpp b/ngraph/test/backend/divide.in.cpp index 0b42c9acd98e90..c963e7687653b4 100644 --- a/ngraph/test/backend/divide.in.cpp +++ b/ngraph/test/backend/divide.in.cpp @@ -50,18 +50,18 @@ NGRAPH_TEST(${BACKEND_NAME}, divide) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{2, 4, 8, 16}); - auto b = backend->create_tensor(element::Type_t::f32, shape); + auto b = backend->create_tensor(element::f32, shape); copy_data(b, vector{1, 2, 4, 8}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b}); @@ -72,18 +72,18 @@ NGRAPH_TEST(${BACKEND_NAME}, divide_int32) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::i32, shape); - auto B = make_shared(element::Type_t::i32, shape); + auto A = make_shared(element::i32, shape); + auto B = make_shared(element::i32, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i32, shape); + auto a = backend->create_tensor(element::i32, shape); copy_data(a, vector{0x40000140, 0x40000001, 8, 16}); - auto b = backend->create_tensor(element::Type_t::i32, shape); + auto b = backend->create_tensor(element::i32, shape); copy_data(b, vector{2, 5, 4, 8}); - auto result = backend->create_tensor(element::Type_t::i32, shape); + auto result = backend->create_tensor(element::i32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b}); @@ -94,18 +94,18 @@ NGRAPH_TEST(${BACKEND_NAME}, divide_cpp_rounding_int32) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::i32, shape); - auto B = make_shared(element::Type_t::i32, shape); + auto A = make_shared(element::i32, shape); + auto B = make_shared(element::i32, shape); auto f = make_shared(make_shared(A, B, false), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i32, shape); + auto a = backend->create_tensor(element::i32, shape); copy_data(a, vector{-10, -10, 10, 10}); - auto b = backend->create_tensor(element::Type_t::i32, shape); + auto b = backend->create_tensor(element::i32, shape); copy_data(b, vector{-3, 3, -3, 3}); - auto result = backend->create_tensor(element::Type_t::i32, shape); + auto result = backend->create_tensor(element::i32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b}); @@ -116,18 +116,18 @@ NGRAPH_TEST(${BACKEND_NAME}, divide_python_rounding_int32) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::i32, shape); - auto B = make_shared(element::Type_t::i32, shape); + auto A = make_shared(element::i32, shape); + auto B = make_shared(element::i32, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i32, shape); + auto a = backend->create_tensor(element::i32, shape); copy_data(a, vector{-10, -10, 10, 10}); - auto b = backend->create_tensor(element::Type_t::i32, shape); + auto b = backend->create_tensor(element::i32, shape); copy_data(b, vector{-3, 3, -3, 3}); - auto result = backend->create_tensor(element::Type_t::i32, shape); + auto result = backend->create_tensor(element::i32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b}); @@ -138,18 +138,18 @@ NGRAPH_TEST(${BACKEND_NAME}, divide_overload) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{2, 4, 8, 16}); - auto b = backend->create_tensor(element::Type_t::f32, shape); + auto b = backend->create_tensor(element::f32, shape); copy_data(b, vector{1, 2, 4, 8}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b}); @@ -160,18 +160,18 @@ NGRAPH_TEST(${BACKEND_NAME}, divide_by_zero_float32) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{2, 4, 8, 16}); - auto b = backend->create_tensor(element::Type_t::f32, shape); + auto b = backend->create_tensor(element::f32, shape); copy_data(b, vector{0, 0, 0, 0}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b}); diff --git a/ngraph/test/backend/dyn_reshape.in.cpp b/ngraph/test/backend/dyn_reshape.in.cpp index ca382cee1d99f2..a7e6ebbe425442 100644 --- a/ngraph/test/backend/dyn_reshape.in.cpp +++ b/ngraph/test/backend/dyn_reshape.in.cpp @@ -29,8 +29,8 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, reshape_v1) { - auto arg = std::make_shared(element::Type_t::i64, PartialShape::dynamic()); - auto pattern = make_shared(element::Type_t::i64, PartialShape::dynamic(1)); + auto arg = std::make_shared(element::i64, PartialShape::dynamic()); + auto pattern = make_shared(element::i64, PartialShape::dynamic(1)); auto reshape_v1 = std::make_shared(arg, pattern, false); auto f = std::make_shared(NodeVector{reshape_v1}, ParameterVector{arg, pattern}); @@ -41,15 +41,15 @@ NGRAPH_TEST(${BACKEND_NAME}, reshape_v1) auto arg_data = vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}; auto pattern_data = vector{2, 2, 3}; - auto arg_tensor = backend->create_tensor(element::Type_t::i64, Shape{arg_data.size()}); - auto pattern_tensor = backend->create_tensor(element::Type_t::i64, Shape{pattern_data.size()}); + auto arg_tensor = backend->create_tensor(element::i64, Shape{arg_data.size()}); + auto pattern_tensor = backend->create_tensor(element::i64, Shape{pattern_data.size()}); copy_data(arg_tensor, arg_data); copy_data(pattern_tensor, pattern_data); - auto output = backend->create_dynamic_tensor(element::Type_t::i64, PartialShape::dynamic()); + auto output = backend->create_dynamic_tensor(element::i64, PartialShape::dynamic()); ex->call_with_validate({output}, {arg_tensor, pattern_tensor}); - ASSERT_EQ(output->get_element_type(), element::Type_t::i64); + ASSERT_EQ(output->get_element_type(), element::i64); EXPECT_EQ(read_vector(output), vector({1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12})); } diff --git a/ngraph/test/backend/dynamic.in.cpp b/ngraph/test/backend/dynamic.in.cpp index beff30261c0dc5..f8237e13601178 100644 --- a/ngraph/test/backend/dynamic.in.cpp +++ b/ngraph/test/backend/dynamic.in.cpp @@ -37,8 +37,7 @@ NGRAPH_TEST(${BACKEND_NAME}, create_dynamic_backend) NGRAPH_TEST(${BACKEND_NAME}, create_dynamic_tensor) { auto backend = runtime::Backend::create("${BACKEND_NAME}", true); - auto t = backend->create_dynamic_tensor(element::Type_t::f32, - PartialShape{2, Dimension::dynamic(), 3}); + auto t = backend->create_dynamic_tensor(element::f32, PartialShape{2, Dimension::dynamic(), 3}); ASSERT_TRUE(t->get_partial_shape().same_scheme(PartialShape{2, Dimension::dynamic(), 3})); } @@ -47,12 +46,9 @@ NGRAPH_TEST(${BACKEND_NAME}, dynamic_abc) // // Create a graph for f(a,b,c) = (a+b)*c, where a, b, c all have shape {2,?,3}. // - auto a = - make_shared(element::Type_t::f32, PartialShape{2, Dimension::dynamic(), 3}); - auto b = - make_shared(element::Type_t::f32, PartialShape{2, Dimension::dynamic(), 3}); - auto c = - make_shared(element::Type_t::f32, PartialShape{2, Dimension::dynamic(), 3}); + auto a = make_shared(element::f32, PartialShape{2, Dimension::dynamic(), 3}); + auto b = make_shared(element::f32, PartialShape{2, Dimension::dynamic(), 3}); + auto c = make_shared(element::f32, PartialShape{2, Dimension::dynamic(), 3}); auto a_plus_b = make_shared(a, b); auto a_plus_b_times_c = make_shared(a_plus_b, c); @@ -69,8 +65,8 @@ NGRAPH_TEST(${BACKEND_NAME}, dynamic_abc) // // Create a dynamic output tensor with shape {2,?,3}. // - auto t_r = backend->create_dynamic_tensor(element::Type_t::f32, - PartialShape{2, Dimension::dynamic(), 3}); + auto t_r = + backend->create_dynamic_tensor(element::f32, PartialShape{2, Dimension::dynamic(), 3}); // // For each of n=[0,...,5), run the compiled executable against a test vector of shape @@ -86,9 +82,9 @@ NGRAPH_TEST(${BACKEND_NAME}, dynamic_abc) } // Create static tensors for the inputs and copy data. - auto t_a = backend->create_tensor(element::Type_t::f32, Shape{2, middle_dim, 3}); - auto t_b = backend->create_tensor(element::Type_t::f32, Shape{2, middle_dim, 3}); - auto t_c = backend->create_tensor(element::Type_t::f32, Shape{2, middle_dim, 3}); + auto t_a = backend->create_tensor(element::f32, Shape{2, middle_dim, 3}); + auto t_b = backend->create_tensor(element::f32, Shape{2, middle_dim, 3}); + auto t_c = backend->create_tensor(element::f32, Shape{2, middle_dim, 3}); copy_data(t_a, inputs); copy_data(t_b, inputs); @@ -115,9 +111,9 @@ NGRAPH_TEST(${BACKEND_NAME}, dynamic_abc) static void axpy_test(const PartialShape& input_pshape, const std::vector& input_shapes) { - auto a = make_shared(element::Type_t::f32, input_pshape); - auto x = make_shared(element::Type_t::f32, input_pshape); - auto y = make_shared(element::Type_t::f32, input_pshape); + auto a = make_shared(element::f32, input_pshape); + auto x = make_shared(element::f32, input_pshape); + auto y = make_shared(element::f32, input_pshape); auto axpy = make_shared(make_shared(a, x), y); @@ -125,7 +121,7 @@ static void axpy_test(const PartialShape& input_pshape, const std::vector auto backend = runtime::Backend::create("${BACKEND_NAME}", true); auto ex = backend->compile(f); - auto t_r = backend->create_dynamic_tensor(element::Type_t::f32, input_pshape); + auto t_r = backend->create_dynamic_tensor(element::f32, input_pshape); for (auto& shape : input_shapes) { @@ -135,9 +131,9 @@ static void axpy_test(const PartialShape& input_pshape, const std::vector inputs[i] = i; } - auto t_a = backend->create_tensor(element::Type_t::f32, shape); - auto t_x = backend->create_tensor(element::Type_t::f32, shape); - auto t_y = backend->create_tensor(element::Type_t::f32, shape); + auto t_a = backend->create_tensor(element::f32, shape); + auto t_x = backend->create_tensor(element::f32, shape); + auto t_y = backend->create_tensor(element::f32, shape); copy_data(t_a, inputs); copy_data(t_x, inputs); @@ -182,13 +178,13 @@ NGRAPH_TEST(${BACKEND_NAME}, dynamic_axpy) static void to_vector_test(const PartialShape& input_pshape, const std::vector& input_shapes) { - auto x = make_shared(element::Type_t::f32, input_pshape); + auto x = make_shared(element::f32, input_pshape); shared_ptr x_new_shape = make_shared(x); - auto axes = op::Constant::create(element::Type_t::i64, {}, {0}); + auto axes = op::Constant::create(element::i64, {}, {0}); x_new_shape = make_shared(x_new_shape, axes); x_new_shape = make_shared( - x_new_shape, op::Constant::create(element::Type_t::u64, {1}, Shape{1}), false); + x_new_shape, op::Constant::create(element::u64, {1}, Shape{1}), false); auto x_reshaped = make_shared(x, x_new_shape, true); @@ -196,7 +192,7 @@ static void to_vector_test(const PartialShape& input_pshape, const std::vectorcompile(f); - auto t_r = backend->create_dynamic_tensor(element::Type_t::f32, PartialShape::dynamic(1)); + auto t_r = backend->create_dynamic_tensor(element::f32, PartialShape::dynamic(1)); for (auto& shape : input_shapes) { @@ -206,7 +202,7 @@ static void to_vector_test(const PartialShape& input_pshape, const std::vectorcreate_tensor(element::Type_t::f32, shape); + auto t_x = backend->create_tensor(element::f32, shape); copy_data(t_x, inputs); @@ -244,12 +240,11 @@ NGRAPH_TEST(${BACKEND_NAME}, dynamic_to_vector) static void reverse_shape_test(const PartialShape& input_pshape, const std::vector& input_shapes) { - auto x = make_shared(element::Type_t::f32, input_pshape); + auto x = make_shared(element::f32, input_pshape); shared_ptr x_new_shape = make_shared(x); - x_new_shape = make_shared(x_new_shape, - op::Constant::create(element::Type_t::i64, {1}, {0}), - op::v1::Reverse::Mode::INDEX); + x_new_shape = make_shared( + x_new_shape, op::Constant::create(element::i64, {1}, {0}), op::v1::Reverse::Mode::INDEX); auto x_reshaped = make_shared(x, x_new_shape, true); @@ -257,7 +252,7 @@ static void reverse_shape_test(const PartialShape& input_pshape, auto backend = runtime::Backend::create("${BACKEND_NAME}", true); auto ex = backend->compile(f); - auto t_r = backend->create_dynamic_tensor(element::Type_t::f32, PartialShape::dynamic()); + auto t_r = backend->create_dynamic_tensor(element::f32, PartialShape::dynamic()); for (auto& shape : input_shapes) { @@ -267,7 +262,7 @@ static void reverse_shape_test(const PartialShape& input_pshape, inputs[i] = i; } - auto t_x = backend->create_tensor(element::Type_t::f32, shape); + auto t_x = backend->create_tensor(element::f32, shape); copy_data(t_x, inputs); @@ -306,8 +301,8 @@ NGRAPH_TEST(${BACKEND_NAME}, dynamic_reverse_shape) NGRAPH_TEST(${BACKEND_NAME}, dynamic_transpose) { - auto arg = std::make_shared(element::Type_t::i32, PartialShape::dynamic()); - auto input_order = make_shared(element::Type_t::i32, PartialShape::dynamic()); + auto arg = std::make_shared(element::i32, PartialShape::dynamic()); + auto input_order = make_shared(element::i32, PartialShape::dynamic()); auto transpose = std::make_shared(arg, input_order); auto f = std::make_shared(NodeVector{transpose}, ParameterVector{arg, input_order}); @@ -318,16 +313,15 @@ NGRAPH_TEST(${BACKEND_NAME}, dynamic_transpose) auto arg_data = vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}; auto input_order_data = vector{2, 0, 1}; - auto arg_tensor = backend->create_tensor(element::Type_t::i32, Shape{2, 2, 3}); - auto input_order_tensor = - backend->create_tensor(element::Type_t::i32, Shape{input_order_data.size()}); + auto arg_tensor = backend->create_tensor(element::i32, Shape{2, 2, 3}); + auto input_order_tensor = backend->create_tensor(element::i32, Shape{input_order_data.size()}); copy_data(arg_tensor, arg_data); copy_data(input_order_tensor, input_order_data); - auto output = backend->create_dynamic_tensor(element::Type_t::i32, PartialShape::dynamic()); + auto output = backend->create_dynamic_tensor(element::i32, PartialShape::dynamic()); ex->call_with_validate({output}, {arg_tensor, input_order_tensor}); - ASSERT_EQ(output->get_element_type(), element::Type_t::i32); + ASSERT_EQ(output->get_element_type(), element::i32); EXPECT_EQ(read_vector(output), vector({1, 4, 7, 10, 2, 5, 8, 11, 3, 6, 9, 12})); } diff --git a/ngraph/test/backend/erf.in.cpp b/ngraph/test/backend/erf.in.cpp index baac0c7861eaff..1cbe2260567594 100644 --- a/ngraph/test/backend/erf.in.cpp +++ b/ngraph/test/backend/erf.in.cpp @@ -46,7 +46,7 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, erf) { Shape shape{8}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared(make_shared(A), ParameterVector{A}); auto test_case = test::TestCase(f); diff --git a/ngraph/test/backend/exp.in.cpp b/ngraph/test/backend/exp.in.cpp index 52369462c7cb81..f4d3ae2a1c53f5 100644 --- a/ngraph/test/backend/exp.in.cpp +++ b/ngraph/test/backend/exp.in.cpp @@ -46,7 +46,7 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, exp) { Shape shape{8}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared(make_shared(A), ParameterVector{A}); auto test_case = test::TestCase(f); diff --git a/ngraph/test/backend/floor.in.cpp b/ngraph/test/backend/floor.in.cpp index bb8675c92e9ec2..03d919b1aa5f70 100644 --- a/ngraph/test/backend/floor.in.cpp +++ b/ngraph/test/backend/floor.in.cpp @@ -46,7 +46,7 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, floor) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared(make_shared(A), ParameterVector{A}); auto test_case = test::TestCase(f); @@ -58,7 +58,7 @@ NGRAPH_TEST(${BACKEND_NAME}, floor) NGRAPH_TEST(${BACKEND_NAME}, floor_int32) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::i32, shape); + auto A = make_shared(element::i32, shape); auto f = make_shared(make_shared(A), ParameterVector{A}); auto test_case = test::TestCase(f); @@ -71,7 +71,7 @@ NGRAPH_TEST(${BACKEND_NAME}, floor_int64) { // This tests large numbers that will not fit in a double Shape shape{3}; - auto A = make_shared(element::Type_t::i64, shape); + auto A = make_shared(element::i64, shape); auto f = make_shared(make_shared(A), ParameterVector{A}); auto test_case = test::TestCase(f); diff --git a/ngraph/test/backend/function_name.in.cpp b/ngraph/test/backend/function_name.in.cpp index c5703859c61ea7..22517affa81248 100644 --- a/ngraph/test/backend/function_name.in.cpp +++ b/ngraph/test/backend/function_name.in.cpp @@ -31,8 +31,8 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, function_name) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto add = make_shared(A, B); auto f = make_shared(add, ParameterVector{A, B}, "funky func name"); diff --git a/ngraph/test/backend/fused_op.in.cpp b/ngraph/test/backend/fused_op.in.cpp index 9b3393276c35d4..c967ceee66b5ce 100644 --- a/ngraph/test/backend/fused_op.in.cpp +++ b/ngraph/test/backend/fused_op.in.cpp @@ -56,7 +56,7 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, elu) { - auto A = make_shared(element::Type_t::f32, Shape{3, 2}); + auto A = make_shared(element::f32, Shape{3, 2}); auto elu = make_shared(A, 0.5f); auto function = make_shared(NodeVector{elu}, ParameterVector{A}); @@ -69,7 +69,7 @@ NGRAPH_TEST(${BACKEND_NAME}, elu) NGRAPH_TEST(${BACKEND_NAME}, elu_negative_alpha) { - auto A = make_shared(element::Type_t::f32, Shape{3, 2}); + auto A = make_shared(element::f32, Shape{3, 2}); auto elu = make_shared(A, -1.f); auto function = make_shared(NodeVector{elu}, ParameterVector{A}); @@ -84,8 +84,8 @@ NGRAPH_TEST(${BACKEND_NAME}, prelu) { Shape shape{3, 2}; Shape rshape{3}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, rshape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, rshape); auto prelu = make_shared(A, B); auto f = make_shared(NodeVector{prelu}, ParameterVector{A, B}); std::vector a{-2, 3, -2, 1, -1, 0}; @@ -102,7 +102,7 @@ NGRAPH_TEST(${BACKEND_NAME}, hardsigmoid) const Shape shape{2, 7}; const float alpha_f = 0.125f; const float beta_f = 0.642f; - const auto A = make_shared(element::Type_t::f32, shape); + const auto A = make_shared(element::f32, shape); const auto alpha = op::Constant::create(A->get_element_type(), Shape{}, {alpha_f}); const auto beta = op::Constant::create(A->get_element_type(), Shape{}, {beta_f}); auto hardsigmoid = make_shared(A, alpha, beta); @@ -137,8 +137,8 @@ NGRAPH_TEST(${BACKEND_NAME}, prelu_shared_slope) { Shape shape{3, 2}; Shape rshape{}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, rshape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, rshape); auto prelu = make_shared(A, B); auto f = make_shared(NodeVector{prelu}, ParameterVector{A, B}); std::vector a{-2, 3, -2, 1, -1, 0}; @@ -154,8 +154,8 @@ NGRAPH_TEST(${BACKEND_NAME}, prelu_negative_slope) { Shape shape{3, 2}; Shape rshape{}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, rshape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, rshape); auto prelu = make_shared(A, B); auto f = make_shared(NodeVector{prelu}, ParameterVector{A, B}); std::vector a{-2, 3, -2, 1, -1, 0}; @@ -169,7 +169,7 @@ NGRAPH_TEST(${BACKEND_NAME}, prelu_negative_slope) NGRAPH_TEST(${BACKEND_NAME}, space_to_depth_block_first) { - auto A = make_shared(element::Type_t::f32, Shape{1, 2, 4, 4}); + auto A = make_shared(element::f32, Shape{1, 2, 4, 4}); const auto mode = ngraph::op::SpaceToDepth::SpaceToDepthMode::BLOCKS_FIRST; auto space_to_depth = make_shared(A, mode, 2); auto function = make_shared(NodeVector{space_to_depth}, ParameterVector{A}); @@ -190,7 +190,7 @@ NGRAPH_TEST(${BACKEND_NAME}, space_to_depth_block_first) NGRAPH_TEST(${BACKEND_NAME}, space_to_depth_depth_first) { - auto A = make_shared(element::Type_t::f32, Shape{1, 2, 4, 4}); + auto A = make_shared(element::f32, Shape{1, 2, 4, 4}); const auto mode = ngraph::op::SpaceToDepth::SpaceToDepthMode::DEPTH_FIRST; auto space_to_depth = make_shared(A, mode, 2); auto function = make_shared(NodeVector{space_to_depth}, ParameterVector{A}); @@ -208,7 +208,7 @@ NGRAPH_TEST(${BACKEND_NAME}, space_to_depth_depth_first) NGRAPH_TEST(${BACKEND_NAME}, depth_to_space_block_first) { - auto A = make_shared(element::Type_t::f32, Shape{1, 8, 2, 2}); + auto A = make_shared(element::f32, Shape{1, 8, 2, 2}); auto depth_to_space = make_shared(A, op::DepthToSpace::DepthToSpaceMode::BLOCKS_FIRST, 2); auto function = make_shared(NodeVector{depth_to_space}, ParameterVector{A}); @@ -227,7 +227,7 @@ NGRAPH_TEST(${BACKEND_NAME}, depth_to_space_block_first) NGRAPH_TEST(${BACKEND_NAME}, depth_to_space_depth_first) { - auto A = make_shared(element::Type_t::f32, Shape{1, 8, 2, 2}); + auto A = make_shared(element::f32, Shape{1, 8, 2, 2}); auto depth_to_space = make_shared(A, op::DepthToSpace::DepthToSpaceMode::DEPTH_FIRST, 2); auto function = make_shared(NodeVector{depth_to_space}, ParameterVector{A}); @@ -247,9 +247,8 @@ NGRAPH_TEST(${BACKEND_NAME}, depth_to_space_depth_first) NGRAPH_TEST(${BACKEND_NAME}, DISABLED_normalize_across_chw_4d) { Shape data_shape{1, 2, 3, 4}; - auto data = make_shared(element::Type_t::f32, data_shape); - const auto axes = - make_shared(element::Type_t::i64, Shape{3}, vector{1, 2, 3}); + auto data = make_shared(element::f32, data_shape); + const auto axes = make_shared(element::i64, Shape{3}, vector{1, 2, 3}); float eps{1e-6f}; auto eps_mode = op::EpsMode::ADD; @@ -275,8 +274,8 @@ NGRAPH_TEST(${BACKEND_NAME}, DISABLED_normalize_across_chw_4d) NGRAPH_TEST(${BACKEND_NAME}, DISABLED_normalize_across_empty_axes_input) { Shape data_shape{1, 2, 3, 4}; - auto data = make_shared(element::Type_t::f32, data_shape); - const auto axes = make_shared(element::Type_t::i64, Shape{0}, vector{}); + auto data = make_shared(element::f32, data_shape); + const auto axes = make_shared(element::i64, Shape{0}, vector{}); float eps{1e-6f}; auto eps_mode = op::EpsMode::ADD; @@ -303,8 +302,8 @@ NGRAPH_TEST(${BACKEND_NAME}, DISABLED_normalize_across_empty_axes_input) NGRAPH_TEST(${BACKEND_NAME}, DISABLED_normalize_across_h_4d) { Shape data_shape{1, 2, 3, 4}; - auto data = make_shared(element::Type_t::f32, data_shape); - const auto axes = make_shared(element::Type_t::i64, Shape{1}, vector{1}); + auto data = make_shared(element::f32, data_shape); + const auto axes = make_shared(element::i64, Shape{1}, vector{1}); float eps{1e-6f}; auto eps_mode = op::EpsMode::ADD; @@ -329,8 +328,8 @@ NGRAPH_TEST(${BACKEND_NAME}, DISABLED_normalize_across_h_4d) NGRAPH_TEST(${BACKEND_NAME}, DISABLED_normalize_across_1axis_5d) { Shape data_shape{1, 2, 2, 2, 3}; - auto data = make_shared(element::Type_t::f32, data_shape); - const auto axes = make_shared(element::Type_t::i64, Shape{1}, vector{1}); + auto data = make_shared(element::f32, data_shape); + const auto axes = make_shared(element::i64, Shape{1}, vector{1}); float eps{1e-6f}; auto eps_mode = op::EpsMode::ADD; @@ -355,9 +354,8 @@ NGRAPH_TEST(${BACKEND_NAME}, DISABLED_normalize_across_1axis_5d) NGRAPH_TEST(${BACKEND_NAME}, DISABLED_normalize_across_123axes_5d) { Shape data_shape{1, 2, 2, 2, 3}; - auto data = make_shared(element::Type_t::f32, data_shape); - const auto axes = - make_shared(element::Type_t::i64, Shape{3}, vector{1, 2, 3}); + auto data = make_shared(element::f32, data_shape); + const auto axes = make_shared(element::i64, Shape{3}, vector{1, 2, 3}); float eps{1e-6f}; auto eps_mode = op::EpsMode::ADD; @@ -382,8 +380,8 @@ NGRAPH_TEST(${BACKEND_NAME}, DISABLED_normalize_across_123axes_5d) NGRAPH_TEST(${BACKEND_NAME}, DISABLED_normalize_across_c_2x2_shape) { Shape data_shape{2, 2}; - auto data = make_shared(element::Type_t::f32, data_shape); - const auto axes = make_shared(element::Type_t::i64, Shape{}, vector{1}); + auto data = make_shared(element::f32, data_shape); + const auto axes = make_shared(element::i64, Shape{}, vector{1}); float eps{1e-6f}; auto eps_mode = op::EpsMode::ADD; @@ -406,8 +404,8 @@ NGRAPH_TEST(${BACKEND_NAME}, DISABLED_normalize_across_c_2x2_shape) NGRAPH_TEST(${BACKEND_NAME}, DISABLED_normalize_across_c_2x4_shape) { Shape data_shape{2, 4}; - auto data = make_shared(element::Type_t::f32, data_shape); - const auto axes = make_shared(element::Type_t::i64, Shape{}, vector{1}); + auto data = make_shared(element::f32, data_shape); + const auto axes = make_shared(element::i64, Shape{}, vector{1}); float eps{1e-6f}; auto eps_mode = op::EpsMode::ADD; @@ -437,9 +435,8 @@ NGRAPH_TEST(${BACKEND_NAME}, DISABLED_normalize_across_c_2x4_shape) NGRAPH_TEST(${BACKEND_NAME}, DISABLED_normalize_across_chw_4d_max_bias) { Shape data_shape{1, 2, 3, 4}; - auto data = make_shared(element::Type_t::f32, data_shape); - const auto axes = - make_shared(element::Type_t::i64, Shape{3}, vector{1, 2, 3}); + auto data = make_shared(element::f32, data_shape); + const auto axes = make_shared(element::i64, Shape{3}, vector{1, 2, 3}); float eps{5000}; auto eps_mode = op::EpsMode::MAX; @@ -486,7 +483,7 @@ namespace NGRAPH_TEST(${BACKEND_NAME}, fused_clamp_double) { - auto type = element::Type_t::f64; + auto type = element::f64; typedef double ctype; auto sshape = Shape{5, 2}; @@ -572,7 +569,7 @@ NGRAPH_TEST(${BACKEND_NAME}, fused_clamp_double) NGRAPH_TEST(${BACKEND_NAME}, fused_clamp_float) { - auto type = element::Type_t::f32; + auto type = element::f32; typedef float ctype; auto sshape = Shape{5, 2}; @@ -658,7 +655,7 @@ NGRAPH_TEST(${BACKEND_NAME}, fused_clamp_float) NGRAPH_TEST(${BACKEND_NAME}, fused_clamp_int8) { - auto type = element::Type_t::i8; + auto type = element::i8; typedef int8_t ctype; auto sshape = Shape{4, 2}; @@ -687,7 +684,7 @@ NGRAPH_TEST(${BACKEND_NAME}, fused_clamp_int8) NGRAPH_TEST(${BACKEND_NAME}, fused_clamp_int16) { - auto type = element::Type_t::i16; + auto type = element::i16; typedef int16_t ctype; auto sshape = Shape{4, 2}; @@ -716,7 +713,7 @@ NGRAPH_TEST(${BACKEND_NAME}, fused_clamp_int16) NGRAPH_TEST(${BACKEND_NAME}, fused_clamp_int32) { - auto type = element::Type_t::i32; + auto type = element::i32; typedef int32_t ctype; auto sshape = Shape{4, 2}; @@ -745,7 +742,7 @@ NGRAPH_TEST(${BACKEND_NAME}, fused_clamp_int32) NGRAPH_TEST(${BACKEND_NAME}, fused_clamp_int64) { - auto type = element::Type_t::i64; + auto type = element::i64; typedef int64_t ctype; auto sshape = Shape{4, 2}; @@ -774,7 +771,7 @@ NGRAPH_TEST(${BACKEND_NAME}, fused_clamp_int64) NGRAPH_TEST(${BACKEND_NAME}, fused_clamp_uint8) { - auto type = element::Type_t::u8; + auto type = element::u8; typedef uint8_t ctype; auto sshape = Shape{4, 2}; @@ -806,7 +803,7 @@ NGRAPH_TEST(${BACKEND_NAME}, fused_clamp_uint8) NGRAPH_TEST(${BACKEND_NAME}, fused_clamp_uint16) { - auto type = element::Type_t::u16; + auto type = element::u16; typedef uint16_t ctype; auto sshape = Shape{4, 2}; @@ -838,7 +835,7 @@ NGRAPH_TEST(${BACKEND_NAME}, fused_clamp_uint16) NGRAPH_TEST(${BACKEND_NAME}, fused_clamp_uint32) { - auto type = element::Type_t::u32; + auto type = element::u32; typedef uint32_t ctype; auto sshape = Shape{4, 2}; @@ -870,7 +867,7 @@ NGRAPH_TEST(${BACKEND_NAME}, fused_clamp_uint32) NGRAPH_TEST(${BACKEND_NAME}, fused_clamp_uint64) { - auto type = element::Type_t::u64; + auto type = element::u64; typedef uint64_t ctype; auto sshape = Shape{4, 2}; @@ -902,7 +899,7 @@ NGRAPH_TEST(${BACKEND_NAME}, fused_clamp_uint64) NGRAPH_TEST(${BACKEND_NAME}, fused_clamp_float16) { - auto type = element::Type_t::f16; + auto type = element::f16; typedef float16 ctype; auto sshape = Shape{5, 2}; @@ -988,7 +985,7 @@ NGRAPH_TEST(${BACKEND_NAME}, fused_clamp_float16) NGRAPH_TEST(${BACKEND_NAME}, fused_clamp_bfloat16) { - auto type = element::Type_t::bf16; + auto type = element::bf16; typedef bfloat16 ctype; auto sshape = Shape{5, 2}; @@ -1075,7 +1072,7 @@ NGRAPH_TEST(${BACKEND_NAME}, fused_clamp_bfloat16) NGRAPH_TEST(${BACKEND_NAME}, mvn_mean_normalization) { Shape data_shape{1, 2, 5}; - auto data = make_shared(element::Type_t::f32, data_shape); + auto data = make_shared(element::f32, data_shape); auto mvn_func = make_shared(data, true, false); auto function = make_shared(NodeVector{mvn_func}, ParameterVector{data}); @@ -1095,7 +1092,7 @@ NGRAPH_TEST(${BACKEND_NAME}, mvn_mean_normalization) NGRAPH_TEST(${BACKEND_NAME}, mvn_mean_normalization_split_channels) { Shape data_shape{1, 2, 5, 1}; - auto data = make_shared(element::Type_t::f32, data_shape); + auto data = make_shared(element::f32, data_shape); auto mvn_func = make_shared(data, false, false); auto function = make_shared(NodeVector{mvn_func}, ParameterVector{data}); @@ -1115,7 +1112,7 @@ NGRAPH_TEST(${BACKEND_NAME}, mvn_mean_normalization_split_channels) NGRAPH_TEST(${BACKEND_NAME}, mvn_mean_variance_normalization) { Shape data_shape{1, 2, 5}; - auto data = make_shared(element::Type_t::f32, data_shape); + auto data = make_shared(element::f32, data_shape); auto mvn_func = make_shared(data); auto function = make_shared(NodeVector{mvn_func}, ParameterVector{data}); @@ -1144,7 +1141,7 @@ NGRAPH_TEST(${BACKEND_NAME}, mvn_mean_variance_normalization) NGRAPH_TEST(${BACKEND_NAME}, mvn_mean_variance_normalization_split_channels) { Shape data_shape{1, 2, 5}; - auto data = make_shared(element::Type_t::f32, data_shape); + auto data = make_shared(element::f32, data_shape); auto mvn_func = make_shared(data, false); auto function = make_shared(NodeVector{mvn_func}, ParameterVector{data}); @@ -1172,7 +1169,7 @@ NGRAPH_TEST(${BACKEND_NAME}, mvn_mean_variance_normalization_split_channels) NGRAPH_TEST(${BACKEND_NAME}, mvn_mean_variance_normalization_shared_across_channel_batch_size_2) { Shape data_shape{2, 2, 5}; - auto data = make_shared(element::Type_t::f32, data_shape); + auto data = make_shared(element::f32, data_shape); auto mvn_func = make_shared(data, true); auto function = make_shared(NodeVector{mvn_func}, ParameterVector{data}); @@ -1195,7 +1192,7 @@ NGRAPH_TEST(${BACKEND_NAME}, mvn_mean_variance_normalization_shared_across_chann NGRAPH_TEST(${BACKEND_NAME}, mvn_mean_variance_normalization_not_shared_across_channel_batch_size_2) { Shape data_shape{2, 2, 5}; - auto data = make_shared(element::Type_t::f32, data_shape); + auto data = make_shared(element::f32, data_shape); auto mvn_func = make_shared(data, false); auto function = make_shared(NodeVector{mvn_func}, ParameterVector{data}); @@ -1218,7 +1215,7 @@ NGRAPH_TEST(${BACKEND_NAME}, mvn_mean_variance_normalization_not_shared_across_c NGRAPH_TEST(${BACKEND_NAME}, grn_4d) { const Shape data_shape{1, 2, 3, 4}; - const auto data = make_shared(element::Type_t::f32, data_shape); + const auto data = make_shared(element::f32, data_shape); float bias{1e-6f}; const auto grn = make_shared(data, bias); @@ -1242,7 +1239,7 @@ NGRAPH_TEST(${BACKEND_NAME}, grn_4d) NGRAPH_TEST(${BACKEND_NAME}, DISABLED_grn_2d_with_bias) { const Shape data_shape{3, 4}; - const auto data = make_shared(element::Type_t::f32, data_shape); + const auto data = make_shared(element::f32, data_shape); float bias{2.25f}; const auto grn = make_shared(data, bias); @@ -1273,9 +1270,9 @@ NGRAPH_TEST(${BACKEND_NAME}, DISABLED_grn_2d_with_bias) NGRAPH_TEST(${BACKEND_NAME}, unsqueeze) { - auto data_node = make_shared(element::Type_t::f32, Shape{4, 2}); + auto data_node = make_shared(element::f32, Shape{4, 2}); auto axes_node = - make_shared(element::Type_t::i64, Shape{2}, vector{1, 2}); + make_shared(element::i64, Shape{2}, vector{1, 2}); auto squeeze = make_shared(data_node, axes_node); auto function = make_shared(NodeVector{squeeze}, ParameterVector{data_node}); @@ -1288,7 +1285,7 @@ NGRAPH_TEST(${BACKEND_NAME}, unsqueeze) NGRAPH_TEST(${BACKEND_NAME}, shuffle_channels_simple) { - const auto data = make_shared(element::Type_t::i32, Shape{1, 15, 2, 2}); + const auto data = make_shared(element::i32, Shape{1, 15, 2, 2}); auto tested_op = make_shared(data, 1, 5); auto function = make_shared(tested_op, ParameterVector{data}); @@ -1312,7 +1309,7 @@ NGRAPH_TEST(${BACKEND_NAME}, shuffle_channels_negative_axis) // in this test the output is the same as in shuffle_channels_simple but // the axis value is negative and the C(channels) value is in a different dimension(0) of the // shape - const auto data = make_shared(element::Type_t::i32, Shape{15, 2, 1, 2}); + const auto data = make_shared(element::i32, Shape{15, 2, 1, 2}); auto tested_op = make_shared(data, -4, 5); auto function = make_shared(tested_op, ParameterVector{data}); @@ -1333,7 +1330,7 @@ NGRAPH_TEST(${BACKEND_NAME}, shuffle_channels_negative_axis) NGRAPH_TEST(${BACKEND_NAME}, shuffle_channels_float) { - const auto data = make_shared(element::Type_t::f32, Shape{6, 1, 1, 1}); + const auto data = make_shared(element::f32, Shape{6, 1, 1, 1}); auto tested_op = make_shared(data, 0, 2); auto function = make_shared(tested_op, ParameterVector{data}); @@ -1348,9 +1345,9 @@ NGRAPH_TEST(${BACKEND_NAME}, shuffle_channels_float) NGRAPH_TEST(${BACKEND_NAME}, squeeze) { - const auto data_node = make_shared(element::Type_t::f32, Shape{1, 4, 1, 1, 2}); + const auto data_node = make_shared(element::f32, Shape{1, 4, 1, 1, 2}); const auto axes_node = - make_shared(element::Type_t::i64, Shape{2}, vector{0, 2}); + make_shared(element::i64, Shape{2}, vector{0, 2}); const auto squeeze = make_shared(data_node, axes_node); const auto function = make_shared(NodeVector{squeeze}, ParameterVector{data_node}); @@ -1364,9 +1361,9 @@ NGRAPH_TEST(${BACKEND_NAME}, squeeze) NGRAPH_TEST(${BACKEND_NAME}, squeeze_default_axes) { - const auto data_node = make_shared(element::Type_t::f32, Shape{1, 4, 1, 1, 2}); + const auto data_node = make_shared(element::f32, Shape{1, 4, 1, 1, 2}); const auto axes_node = - make_shared(element::Type_t::i64, Shape{0}, vector{}); + make_shared(element::i64, Shape{0}, vector{}); const auto squeeze = make_shared(data_node, axes_node); const auto function = make_shared(NodeVector{squeeze}, ParameterVector{data_node}); @@ -1380,16 +1377,16 @@ NGRAPH_TEST(${BACKEND_NAME}, squeeze_default_axes) NGRAPH_TEST(${BACKEND_NAME}, squeeze_dynamic) { - const auto data_param = make_shared(element::Type_t::f32, Shape{1, 4, 1, 1, 2}); - const auto axes_param = make_shared(element::Type_t::i64, Shape{2}); + const auto data_param = make_shared(element::f32, Shape{1, 4, 1, 1, 2}); + const auto axes_param = make_shared(element::i64, Shape{2}); EXPECT_THROW(make_shared(data_param, axes_param), CheckFailure); } // TODO: Issue: 37534 NGRAPH_TEST(${BACKEND_NAME}, DISABLED_squared_difference) { - const auto x1 = make_shared(element::Type_t::f32, Shape{2, 2}); - const auto x2 = make_shared(element::Type_t::f32, Shape{2, 2}); + const auto x1 = make_shared(element::f32, Shape{2, 2}); + const auto x2 = make_shared(element::f32, Shape{2, 2}); auto tested_op = make_shared(x1, x2); auto function = make_shared(tested_op, ParameterVector{x1, x2}); @@ -1404,8 +1401,8 @@ NGRAPH_TEST(${BACKEND_NAME}, DISABLED_squared_difference) NGRAPH_TEST(${BACKEND_NAME}, DISABLED_squared_difference_broadcast) { - const auto x1 = make_shared(element::Type_t::i32, Shape{2, 2}); - const auto x2 = make_shared(element::Type_t::i32, Shape{}); + const auto x1 = make_shared(element::i32, Shape{2, 2}); + const auto x2 = make_shared(element::i32, Shape{}); auto tested_op = make_shared(x1, x2); auto function = make_shared(tested_op, ParameterVector{x1, x2}); @@ -1425,18 +1422,15 @@ NGRAPH_TEST(${BACKEND_NAME}, lstm_cell__zero_bias_peepholes) const size_t hidden_size = 3; const size_t gates_count = 4; - const auto X = make_shared(element::Type_t::f32, Shape{batch_size, input_size}); - const auto W = make_shared(element::Type_t::f32, - Shape{gates_count * hidden_size, input_size}); - const auto R = make_shared(element::Type_t::f32, - Shape{gates_count * hidden_size, hidden_size}); - const auto H_t = - make_shared(element::Type_t::f32, Shape{batch_size, hidden_size}); - const auto C_t = - make_shared(element::Type_t::f32, Shape{batch_size, hidden_size}); - const auto B = - make_shared(element::Type_t::f32, Shape{gates_count * hidden_size}); - const auto P = make_shared(element::Type_t::f32, Shape{3 * hidden_size}); + const auto X = make_shared(element::f32, Shape{batch_size, input_size}); + const auto W = + make_shared(element::f32, Shape{gates_count * hidden_size, input_size}); + const auto R = + make_shared(element::f32, Shape{gates_count * hidden_size, hidden_size}); + const auto H_t = make_shared(element::f32, Shape{batch_size, hidden_size}); + const auto C_t = make_shared(element::f32, Shape{batch_size, hidden_size}); + const auto B = make_shared(element::f32, Shape{gates_count * hidden_size}); + const auto P = make_shared(element::f32, Shape{3 * hidden_size}); const auto lstm_cell = make_shared( X, @@ -1504,18 +1498,15 @@ NGRAPH_TEST(${BACKEND_NAME}, DISABLED_lstm_cell__bias_peepholes) const size_t hidden_size = 3; const size_t gates_count = 4; - const auto X = make_shared(element::Type_t::f32, Shape{batch_size, input_size}); - const auto W = make_shared(element::Type_t::f32, - Shape{gates_count * hidden_size, input_size}); - const auto R = make_shared(element::Type_t::f32, - Shape{gates_count * hidden_size, hidden_size}); - const auto H_t = - make_shared(element::Type_t::f32, Shape{batch_size, hidden_size}); - const auto C_t = - make_shared(element::Type_t::f32, Shape{batch_size, hidden_size}); - const auto B = - make_shared(element::Type_t::f32, Shape{gates_count * hidden_size}); - const auto P = make_shared(element::Type_t::f32, Shape{3 * hidden_size}); + const auto X = make_shared(element::f32, Shape{batch_size, input_size}); + const auto W = + make_shared(element::f32, Shape{gates_count * hidden_size, input_size}); + const auto R = + make_shared(element::f32, Shape{gates_count * hidden_size, hidden_size}); + const auto H_t = make_shared(element::f32, Shape{batch_size, hidden_size}); + const auto C_t = make_shared(element::f32, Shape{batch_size, hidden_size}); + const auto B = make_shared(element::f32, Shape{gates_count * hidden_size}); + const auto P = make_shared(element::f32, Shape{3 * hidden_size}); const auto lstm_cell = make_shared(X, H_t, C_t, W, R, B, hidden_size); @@ -1596,18 +1587,15 @@ NGRAPH_TEST(${BACKEND_NAME}, DISABLED_lstm_cell__bias_peepholes_clip_input_forge const float clip_threshold = 3.5f; bool input_forget = true; - const auto X = make_shared(element::Type_t::f32, Shape{batch_size, input_size}); - const auto W = make_shared(element::Type_t::f32, - Shape{gates_count * hidden_size, input_size}); - const auto R = make_shared(element::Type_t::f32, - Shape{gates_count * hidden_size, hidden_size}); - const auto H_t = - make_shared(element::Type_t::f32, Shape{batch_size, hidden_size}); - const auto C_t = - make_shared(element::Type_t::f32, Shape{batch_size, hidden_size}); - const auto B = - make_shared(element::Type_t::f32, Shape{gates_count * hidden_size}); - const auto P = make_shared(element::Type_t::f32, Shape{3 * hidden_size}); + const auto X = make_shared(element::f32, Shape{batch_size, input_size}); + const auto W = + make_shared(element::f32, Shape{gates_count * hidden_size, input_size}); + const auto R = + make_shared(element::f32, Shape{gates_count * hidden_size, hidden_size}); + const auto H_t = make_shared(element::f32, Shape{batch_size, hidden_size}); + const auto C_t = make_shared(element::f32, Shape{batch_size, hidden_size}); + const auto B = make_shared(element::f32, Shape{gates_count * hidden_size}); + const auto P = make_shared(element::f32, Shape{3 * hidden_size}); const auto lstm_cell = make_shared(X, H_t, @@ -1701,18 +1689,15 @@ NGRAPH_TEST(${BACKEND_NAME}, DISABLED_lstm_cell__activaction_functions) vector activation_alpha{0.f, 0.f, 1.8345f}; vector activation_beta{0.f, 0.f, 3.05f}; - const auto X = make_shared(element::Type_t::f32, Shape{batch_size, input_size}); - const auto W = make_shared(element::Type_t::f32, - Shape{gates_count * hidden_size, input_size}); - const auto R = make_shared(element::Type_t::f32, - Shape{gates_count * hidden_size, hidden_size}); - const auto H_t = - make_shared(element::Type_t::f32, Shape{batch_size, hidden_size}); - const auto C_t = - make_shared(element::Type_t::f32, Shape{batch_size, hidden_size}); - const auto B = - make_shared(element::Type_t::f32, Shape{gates_count * hidden_size}); - const auto P = make_shared(element::Type_t::f32, Shape{3 * hidden_size}); + const auto X = make_shared(element::f32, Shape{batch_size, input_size}); + const auto W = + make_shared(element::f32, Shape{gates_count * hidden_size, input_size}); + const auto R = + make_shared(element::f32, Shape{gates_count * hidden_size, hidden_size}); + const auto H_t = make_shared(element::f32, Shape{batch_size, hidden_size}); + const auto C_t = make_shared(element::f32, Shape{batch_size, hidden_size}); + const auto B = make_shared(element::f32, Shape{gates_count * hidden_size}); + const auto P = make_shared(element::f32, Shape{3 * hidden_size}); const auto lstm_cell = make_shared(X, H_t, @@ -1798,11 +1783,11 @@ NGRAPH_TEST(${BACKEND_NAME}, DISABLED_fake_quantize) { const Shape data_shape{1, 2, 3, 4}; const size_t levels = 4; - const auto data = make_shared(element::Type_t::f32, data_shape); - const auto input_low = make_shared(element::Type_t::f32, Shape{}); - const auto input_high = make_shared(element::Type_t::f32, Shape{}); - const auto output_low = make_shared(element::Type_t::f32, Shape{}); - const auto output_high = make_shared(element::Type_t::f32, Shape{}); + const auto data = make_shared(element::f32, data_shape); + const auto input_low = make_shared(element::f32, Shape{}); + const auto input_high = make_shared(element::f32, Shape{}); + const auto output_low = make_shared(element::f32, Shape{}); + const auto output_high = make_shared(element::f32, Shape{}); const auto quantize = make_shared(data, input_low, input_high, output_low, output_high, levels); @@ -1841,11 +1826,11 @@ NGRAPH_TEST(${BACKEND_NAME}, DISABLED_fake_quantize_with_clip) { const Shape data_shape{1, 2, 3, 4}; const size_t levels = 5; - const auto data = make_shared(element::Type_t::f32, data_shape); - const auto input_low = make_shared(element::Type_t::f32, Shape{}); - const auto input_high = make_shared(element::Type_t::f32, Shape{}); - const auto output_low = make_shared(element::Type_t::f32, Shape{}); - const auto output_high = make_shared(element::Type_t::f32, Shape{}); + const auto data = make_shared(element::f32, data_shape); + const auto input_low = make_shared(element::f32, Shape{}); + const auto input_high = make_shared(element::f32, Shape{}); + const auto output_low = make_shared(element::f32, Shape{}); + const auto output_high = make_shared(element::f32, Shape{}); const auto quantize = make_shared(data, input_low, input_high, output_low, output_high, levels); @@ -1881,11 +1866,11 @@ NGRAPH_TEST(${BACKEND_NAME}, DISABLED_fake_quantize_with_clip_across_channels) { Shape data_shape{1, 2, 5, 5}; size_t levels = 5; - auto data = make_shared(element::Type_t::f32, data_shape); - auto input_low = make_shared(element::Type_t::f32, Shape{2, 1, 1}); - auto input_high = make_shared(element::Type_t::f32, Shape{2, 1, 1}); - auto output_low = make_shared(element::Type_t::f32, Shape{2, 1, 1}); - auto output_high = make_shared(element::Type_t::f32, Shape{2, 1, 1}); + auto data = make_shared(element::f32, data_shape); + auto input_low = make_shared(element::f32, Shape{2, 1, 1}); + auto input_high = make_shared(element::f32, Shape{2, 1, 1}); + auto output_low = make_shared(element::f32, Shape{2, 1, 1}); + auto output_high = make_shared(element::f32, Shape{2, 1, 1}); auto quantize = make_shared(data, input_low, input_high, output_low, output_high, levels); @@ -1924,11 +1909,11 @@ NGRAPH_TEST(${BACKEND_NAME}, DISABLED_fake_quantize_pdpd) { Shape data_shape{1, 2, 5, 5}; size_t levels = 5; - auto data = make_shared(element::Type_t::f32, data_shape); - auto input_low = make_shared(element::Type_t::f32, Shape{2}); - auto input_high = make_shared(element::Type_t::f32, Shape{2}); - auto output_low = make_shared(element::Type_t::f32, Shape{2}); - auto output_high = make_shared(element::Type_t::f32, Shape{2}); + auto data = make_shared(element::f32, data_shape); + auto input_low = make_shared(element::f32, Shape{2}); + auto input_high = make_shared(element::f32, Shape{2}); + auto output_low = make_shared(element::f32, Shape{2}); + auto output_high = make_shared(element::f32, Shape{2}); auto quantize = make_shared(data, @@ -1975,12 +1960,10 @@ NGRAPH_TEST(${BACKEND_NAME}, rnn_cell__no_bias) const size_t input_size = 3; const size_t hidden_size = 3; - const auto X = make_shared(element::Type_t::f32, Shape{batch_size, input_size}); - const auto H_t = - make_shared(element::Type_t::f32, Shape{batch_size, hidden_size}); - const auto W = make_shared(element::Type_t::f32, Shape{hidden_size, input_size}); - const auto R = - make_shared(element::Type_t::f32, Shape{hidden_size, hidden_size}); + const auto X = make_shared(element::f32, Shape{batch_size, input_size}); + const auto H_t = make_shared(element::f32, Shape{batch_size, hidden_size}); + const auto W = make_shared(element::f32, Shape{hidden_size, input_size}); + const auto R = make_shared(element::f32, Shape{hidden_size, hidden_size}); const auto rnn_cell = make_shared(X, H_t, W, R, hidden_size); auto function = make_shared(rnn_cell, ParameterVector{X, H_t, W, R}); @@ -2027,13 +2010,11 @@ NGRAPH_TEST(${BACKEND_NAME}, rnn_cell__bias_clip) const size_t hidden_size = 3; float clip = 2.88f; - const auto X = make_shared(element::Type_t::f32, Shape{batch_size, input_size}); - const auto H_t = - make_shared(element::Type_t::f32, Shape{batch_size, hidden_size}); - const auto W = make_shared(element::Type_t::f32, Shape{hidden_size, input_size}); - const auto R = - make_shared(element::Type_t::f32, Shape{hidden_size, hidden_size}); - const auto B = make_shared(element::Type_t::f32, Shape{hidden_size}); + const auto X = make_shared(element::f32, Shape{batch_size, input_size}); + const auto H_t = make_shared(element::f32, Shape{batch_size, hidden_size}); + const auto W = make_shared(element::f32, Shape{hidden_size, input_size}); + const auto R = make_shared(element::f32, Shape{hidden_size, hidden_size}); + const auto B = make_shared(element::f32, Shape{hidden_size}); const auto rnn_cell = make_shared(X, H_t, @@ -2091,13 +2072,11 @@ NGRAPH_TEST(${BACKEND_NAME}, rnn_cell__activation_function) const size_t hidden_size = 3; float clip = 2.88f; - const auto X = make_shared(element::Type_t::f32, Shape{batch_size, input_size}); - const auto H_t = - make_shared(element::Type_t::f32, Shape{batch_size, hidden_size}); - const auto W = make_shared(element::Type_t::f32, Shape{hidden_size, input_size}); - const auto R = - make_shared(element::Type_t::f32, Shape{hidden_size, hidden_size}); - const auto B = make_shared(element::Type_t::f32, Shape{hidden_size}); + const auto X = make_shared(element::f32, Shape{batch_size, input_size}); + const auto H_t = make_shared(element::f32, Shape{batch_size, hidden_size}); + const auto W = make_shared(element::f32, Shape{hidden_size, input_size}); + const auto R = make_shared(element::f32, Shape{hidden_size, hidden_size}); + const auto B = make_shared(element::f32, Shape{hidden_size}); const auto rnn_cell = make_shared(X, H_t, @@ -2157,15 +2136,13 @@ NGRAPH_TEST(${BACKEND_NAME}, gru_cell_bias_clip) float clip = 2.88f; bool linear_before_reset = false; - const auto X = make_shared(element::Type_t::f32, Shape{batch_size, input_size}); - const auto W = make_shared(element::Type_t::f32, - Shape{gates_count * hidden_size, input_size}); - const auto R = make_shared(element::Type_t::f32, - Shape{gates_count * hidden_size, hidden_size}); - const auto H_t = - make_shared(element::Type_t::f32, Shape{batch_size, hidden_size}); - const auto B = - make_shared(element::Type_t::f32, Shape{gates_count * hidden_size}); + const auto X = make_shared(element::f32, Shape{batch_size, input_size}); + const auto W = + make_shared(element::f32, Shape{gates_count * hidden_size, input_size}); + const auto R = + make_shared(element::f32, Shape{gates_count * hidden_size, hidden_size}); + const auto H_t = make_shared(element::f32, Shape{batch_size, hidden_size}); + const auto B = make_shared(element::f32, Shape{gates_count * hidden_size}); const auto gru_cell = make_shared(X, H_t, @@ -2232,15 +2209,13 @@ NGRAPH_TEST(${BACKEND_NAME}, gru_cell_linear_before_reset) float clip = 2.88f; bool linear_before_reset = true; - const auto X = make_shared(element::Type_t::f32, Shape{batch_size, input_size}); - const auto W = make_shared(element::Type_t::f32, - Shape{gates_count * hidden_size, input_size}); - const auto R = make_shared(element::Type_t::f32, - Shape{gates_count * hidden_size, hidden_size}); - const auto H_t = - make_shared(element::Type_t::f32, Shape{batch_size, hidden_size}); - const auto B = - make_shared(element::Type_t::f32, Shape{(gates_count + 1) * hidden_size}); + const auto X = make_shared(element::f32, Shape{batch_size, input_size}); + const auto W = + make_shared(element::f32, Shape{gates_count * hidden_size, input_size}); + const auto R = + make_shared(element::f32, Shape{gates_count * hidden_size, hidden_size}); + const auto H_t = make_shared(element::f32, Shape{batch_size, hidden_size}); + const auto B = make_shared(element::f32, Shape{(gates_count + 1) * hidden_size}); const auto gru_cell = make_shared(X, H_t, @@ -2306,15 +2281,13 @@ NGRAPH_TEST(${BACKEND_NAME}, gru_cell_activation_function) float clip = 2.88f; bool linear_before_reset = true; - const auto X = make_shared(element::Type_t::f32, Shape{batch_size, input_size}); - const auto W = make_shared(element::Type_t::f32, - Shape{gates_count * hidden_size, input_size}); - const auto R = make_shared(element::Type_t::f32, - Shape{gates_count * hidden_size, hidden_size}); - const auto H_t = - make_shared(element::Type_t::f32, Shape{batch_size, hidden_size}); - const auto B = - make_shared(element::Type_t::f32, Shape{(gates_count + 1) * hidden_size}); + const auto X = make_shared(element::f32, Shape{batch_size, input_size}); + const auto W = + make_shared(element::f32, Shape{gates_count * hidden_size, input_size}); + const auto R = + make_shared(element::f32, Shape{gates_count * hidden_size, hidden_size}); + const auto H_t = make_shared(element::f32, Shape{batch_size, hidden_size}); + const auto B = make_shared(element::f32, Shape{(gates_count + 1) * hidden_size}); const auto gru_cell = make_shared(X, H_t, @@ -2378,31 +2351,31 @@ NGRAPH_TEST(${BACKEND_NAME}, depth_to_space_space_to_depth_block_first) Shape dts_input_shape{2, 32, 2, 4, 2, 4}; size_t block_size = 2; - auto dts_input = make_shared(element::Type_t::f32, dts_input_shape); + auto dts_input = make_shared(element::f32, dts_input_shape); auto depth_to_space = make_shared( dts_input, op::DepthToSpace::DepthToSpaceMode::BLOCKS_FIRST, block_size); auto dts_func = make_shared(NodeVector{depth_to_space}, ParameterVector{dts_input}); - auto dts_input_tensor = backend->create_tensor(element::Type_t::f32, dts_input_shape); + auto dts_input_tensor = backend->create_tensor(element::f32, dts_input_shape); const auto data_size = shape_size(dts_input_shape); vector data(data_size); std::iota(data.begin(), data.end(), 0); copy_data(dts_input_tensor, data); const auto dts_output_shape = depth_to_space->get_output_shape(0); - auto dts_output_tensor = backend->create_tensor(element::Type_t::f32, dts_output_shape); + auto dts_output_tensor = backend->create_tensor(element::f32, dts_output_shape); auto handle = backend->compile(dts_func); handle->call_with_validate({dts_output_tensor}, {dts_input_tensor}); auto dts_result = read_vector(dts_output_tensor); // use depth_to_space output as space_to_depth input - auto std_input = make_shared(element::Type_t::f32, dts_output_shape); + auto std_input = make_shared(element::f32, dts_output_shape); auto space_to_depth = make_shared( std_input, op::SpaceToDepth::SpaceToDepthMode::BLOCKS_FIRST, block_size); auto std_func = make_shared(NodeVector{space_to_depth}, ParameterVector{std_input}); - auto std_input_tensor = backend->create_tensor(element::Type_t::f32, dts_output_shape); + auto std_input_tensor = backend->create_tensor(element::f32, dts_output_shape); copy_data(std_input_tensor, dts_result); - auto std_output_tensor = backend->create_tensor(element::Type_t::f32, dts_input_shape); + auto std_output_tensor = backend->create_tensor(element::f32, dts_input_shape); handle = backend->compile(std_func); handle->call_with_validate({std_output_tensor}, {std_input_tensor}); auto std_result = read_vector(std_output_tensor); @@ -2418,31 +2391,31 @@ NGRAPH_TEST(${BACKEND_NAME}, depth_to_space_space_to_depth_depth_first) Shape dts_input_shape{2, 32, 2, 4, 2, 4}; size_t block_size = 2; - auto dts_input = make_shared(element::Type_t::f32, dts_input_shape); + auto dts_input = make_shared(element::f32, dts_input_shape); auto depth_to_space = make_shared( dts_input, op::DepthToSpace::DepthToSpaceMode::DEPTH_FIRST, block_size); auto dts_func = make_shared(NodeVector{depth_to_space}, ParameterVector{dts_input}); - auto dts_input_tensor = backend->create_tensor(element::Type_t::f32, dts_input_shape); + auto dts_input_tensor = backend->create_tensor(element::f32, dts_input_shape); const auto data_size = shape_size(dts_input_shape); vector data(data_size); std::iota(data.begin(), data.end(), 0); copy_data(dts_input_tensor, data); const auto dts_output_shape = depth_to_space->get_output_shape(0); - auto dts_output_tensor = backend->create_tensor(element::Type_t::f32, dts_output_shape); + auto dts_output_tensor = backend->create_tensor(element::f32, dts_output_shape); auto handle = backend->compile(dts_func); handle->call_with_validate({dts_output_tensor}, {dts_input_tensor}); auto dts_result = read_vector(dts_output_tensor); // use depth_to_space output as space_to_depth input - auto std_input = make_shared(element::Type_t::f32, dts_output_shape); + auto std_input = make_shared(element::f32, dts_output_shape); auto space_to_depth = make_shared( std_input, op::SpaceToDepth::SpaceToDepthMode::DEPTH_FIRST, block_size); auto std_func = make_shared(NodeVector{space_to_depth}, ParameterVector{std_input}); - auto std_input_tensor = backend->create_tensor(element::Type_t::f32, dts_output_shape); + auto std_input_tensor = backend->create_tensor(element::f32, dts_output_shape); copy_data(std_input_tensor, dts_result); - auto std_output_tensor = backend->create_tensor(element::Type_t::f32, dts_input_shape); + auto std_output_tensor = backend->create_tensor(element::f32, dts_input_shape); handle = backend->compile(std_func); handle->call_with_validate({std_output_tensor}, {std_input_tensor}); auto std_result = read_vector(std_output_tensor); diff --git a/ngraph/test/backend/gather.in.cpp b/ngraph/test/backend/gather.in.cpp index d42966eddcbc56..288b1a8a926251 100644 --- a/ngraph/test/backend/gather.in.cpp +++ b/ngraph/test/backend/gather.in.cpp @@ -40,9 +40,9 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_4d_indices_axis_0_uint8) Shape data_shape{3, 2}; Shape indices_shape{2, 2, 3, 4}; Shape out_shape{2, 2, 3, 4, 2}; - auto P = make_shared(element::Type_t::u8, data_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); - auto A = op::Constant::create(element::Type_t::i64, Shape{}, {0}); + auto P = make_shared(element::u8, data_shape); + auto I = make_shared(element::i32, indices_shape); + auto A = op::Constant::create(element::i64, Shape{}, {0}); auto G = make_shared(P, I, A); auto f = make_shared(G, ParameterVector{P, I}); @@ -65,9 +65,9 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_4d_indices_axis_0_2d_input) Shape data_shape{3, 2}; Shape indices_shape{2, 2, 3, 4}; Shape out_shape{2, 2, 3, 4, 2}; - auto P = make_shared(element::Type_t::f32, data_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); - auto A = op::Constant::create(element::Type_t::i64, Shape{}, {0}); + auto P = make_shared(element::f32, data_shape); + auto I = make_shared(element::i32, indices_shape); + auto A = op::Constant::create(element::i64, Shape{}, {0}); auto G = make_shared(P, I, A); auto f = make_shared(G, ParameterVector{P, I}); @@ -93,9 +93,9 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_3d_indices_axis_0_2d_input) Shape data_shape{3, 2}; Shape indices_shape{2, 3, 4}; Shape out_shape{2, 3, 4, 2}; - auto P = make_shared(element::Type_t::f32, data_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); - auto A = op::Constant::create(element::Type_t::i64, Shape{}, {0}); + auto P = make_shared(element::f32, data_shape); + auto I = make_shared(element::i32, indices_shape); + auto A = op::Constant::create(element::i64, Shape{}, {0}); auto G = make_shared(P, I, A); auto f = make_shared(G, ParameterVector{P, I}); @@ -116,9 +116,9 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_2d_indices_axis_0_2d_input) Shape data_shape{3, 2}; Shape indices_shape{2, 2}; Shape out_shape{2, 2, 2}; - auto P = make_shared(element::Type_t::f32, data_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); - auto A = op::Constant::create(element::Type_t::i64, Shape{}, {0}); + auto P = make_shared(element::f32, data_shape); + auto I = make_shared(element::i32, indices_shape); + auto A = op::Constant::create(element::i64, Shape{}, {0}); auto G = make_shared(P, I, A); auto f = make_shared(G, ParameterVector{P, I}); @@ -135,9 +135,9 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_2d_negative_and_positive_indices_axis_0_2d_i Shape data_shape{3, 2}; Shape indices_shape{2, 2}; Shape out_shape{2, 2, 2}; - auto P = make_shared(element::Type_t::f32, data_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); - auto A = op::Constant::create(element::Type_t::i64, Shape{}, {0}); + auto P = make_shared(element::f32, data_shape); + auto I = make_shared(element::i32, indices_shape); + auto A = op::Constant::create(element::i64, Shape{}, {0}); auto G = make_shared(P, I, A); auto f = make_shared(G, ParameterVector{P, I}); @@ -154,9 +154,9 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_1d_indices_axis_0_1d_input) Shape data_shape{3}; Shape indices_shape{2}; Shape out_shape{2}; - auto P = make_shared(element::Type_t::f32, data_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); - auto A = op::Constant::create(element::Type_t::i64, Shape{}, {0}); + auto P = make_shared(element::f32, data_shape); + auto I = make_shared(element::i32, indices_shape); + auto A = op::Constant::create(element::i64, Shape{}, {0}); auto G = make_shared(P, I, A); auto f = make_shared(G, ParameterVector{P, I}); @@ -172,9 +172,9 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_scalar_indices_axis_0_2d_input) Shape data_shape{3, 2}; Shape indices_shape{}; Shape out_shape{2}; - auto P = make_shared(element::Type_t::f32, data_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); - auto A = op::Constant::create(element::Type_t::i64, Shape{}, {0}); + auto P = make_shared(element::f32, data_shape); + auto I = make_shared(element::i32, indices_shape); + auto A = op::Constant::create(element::i64, Shape{}, {0}); auto G = make_shared(P, I, A); auto f = make_shared(G, ParameterVector{P, I}); @@ -190,9 +190,9 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_2d_indices_axis_1_2d_input) Shape data_shape{3, 3}; Shape indices_shape{1, 2}; Shape out_shape{3, 1, 2}; - auto P = make_shared(element::Type_t::f32, data_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); - auto A = op::Constant::create(element::Type_t::i64, Shape{}, {1}); + auto P = make_shared(element::f32, data_shape); + auto I = make_shared(element::i32, indices_shape); + auto A = op::Constant::create(element::i64, Shape{}, {1}); auto G = make_shared(P, I, A); auto f = make_shared(G, ParameterVector{P, I}); @@ -208,9 +208,9 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_1d_indices_axis_2_4d_input) Shape data_shape{2, 2, 3, 3}; Shape indices_shape{2}; Shape out_shape{2, 2, 2, 3}; - auto P = make_shared(element::Type_t::f32, data_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); - auto A = op::Constant::create(element::Type_t::i64, Shape{}, {2}); + auto P = make_shared(element::f32, data_shape); + auto I = make_shared(element::i32, indices_shape); + auto A = op::Constant::create(element::i64, Shape{}, {2}); auto G = make_shared(P, I, A); auto f = make_shared(G, ParameterVector{P, I}); @@ -231,9 +231,9 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_scalar_indices_axis_1_2d_input) Shape data_shape{3, 3}; Shape indices_shape{}; Shape out_shape{3}; - auto P = make_shared(element::Type_t::f32, data_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); - auto A = op::Constant::create(element::Type_t::i64, Shape{}, {1}); + auto P = make_shared(element::f32, data_shape); + auto I = make_shared(element::i32, indices_shape); + auto A = op::Constant::create(element::i64, Shape{}, {1}); auto G = make_shared(P, I, A); auto f = make_shared(G, ParameterVector{P, I}); @@ -249,9 +249,9 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_axis_0_int8) Shape data_shape{3, 2}; Shape indices_shape{2, 2}; Shape out_shape{2, 2, 2}; - auto P = make_shared(element::Type_t::i8, data_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); - auto A = op::Constant::create(element::Type_t::i64, Shape{}, {0}); + auto P = make_shared(element::i8, data_shape); + auto I = make_shared(element::i32, indices_shape); + auto A = op::Constant::create(element::i64, Shape{}, {0}); auto G = make_shared(P, I, A); auto f = make_shared(G, ParameterVector{P, I}); @@ -267,9 +267,9 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_axis_0_int16) Shape data_shape{3, 2}; Shape indices_shape{2, 2}; Shape out_shape{2, 2, 2}; - auto P = make_shared(element::Type_t::i16, data_shape); - auto I = make_shared(element::Type_t::i64, indices_shape); - auto A = op::Constant::create(element::Type_t::i64, Shape{}, {0}); + auto P = make_shared(element::i16, data_shape); + auto I = make_shared(element::i64, indices_shape); + auto A = op::Constant::create(element::i64, Shape{}, {0}); auto G = make_shared(P, I, A); auto f = make_shared(G, ParameterVector{P, I}); @@ -285,9 +285,9 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_axis_0_int32) Shape data_shape{3, 2}; Shape indices_shape{2, 2}; Shape out_shape{2, 2, 2}; - auto P = make_shared(element::Type_t::i32, data_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); - auto A = op::Constant::create(element::Type_t::i64, Shape{}, {0}); + auto P = make_shared(element::i32, data_shape); + auto I = make_shared(element::i32, indices_shape); + auto A = op::Constant::create(element::i64, Shape{}, {0}); auto G = make_shared(P, I, A); auto f = make_shared(G, ParameterVector{P, I}); @@ -303,9 +303,9 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_axis_0_int64) Shape data_shape{3, 2}; Shape indices_shape{2, 2}; Shape out_shape{2, 2, 2}; - auto P = make_shared(element::Type_t::i64, data_shape); - auto I = make_shared(element::Type_t::i64, indices_shape); - auto A = op::Constant::create(element::Type_t::i64, Shape{}, {0}); + auto P = make_shared(element::i64, data_shape); + auto I = make_shared(element::i64, indices_shape); + auto A = op::Constant::create(element::i64, Shape{}, {0}); auto G = make_shared(P, I, A); auto f = make_shared(G, ParameterVector{P, I}); @@ -321,9 +321,9 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_axis_0_uint8) Shape data_shape{3, 2}; Shape indices_shape{2, 2}; Shape out_shape{2, 2, 2}; - auto P = make_shared(element::Type_t::u8, data_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); - auto A = op::Constant::create(element::Type_t::i64, Shape{}, {0}); + auto P = make_shared(element::u8, data_shape); + auto I = make_shared(element::i32, indices_shape); + auto A = op::Constant::create(element::i64, Shape{}, {0}); auto G = make_shared(P, I, A); auto f = make_shared(G, ParameterVector{P, I}); @@ -339,9 +339,9 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_axis_0_uint16) Shape data_shape{3, 2}; Shape indices_shape{2, 2}; Shape out_shape{2, 2, 2}; - auto P = make_shared(element::Type_t::u16, data_shape); - auto I = make_shared(element::Type_t::i64, indices_shape); - auto A = op::Constant::create(element::Type_t::i64, Shape{}, {0}); + auto P = make_shared(element::u16, data_shape); + auto I = make_shared(element::i64, indices_shape); + auto A = op::Constant::create(element::i64, Shape{}, {0}); auto G = make_shared(P, I, A); auto f = make_shared(G, ParameterVector{P, I}); @@ -357,9 +357,9 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_axis_0_uint32) Shape data_shape{3, 2}; Shape indices_shape{2, 2}; Shape out_shape{2, 2, 2}; - auto P = make_shared(element::Type_t::u32, data_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); - auto A = op::Constant::create(element::Type_t::i64, Shape{}, {0}); + auto P = make_shared(element::u32, data_shape); + auto I = make_shared(element::i32, indices_shape); + auto A = op::Constant::create(element::i64, Shape{}, {0}); auto G = make_shared(P, I, A); auto f = make_shared(G, ParameterVector{P, I}); @@ -375,9 +375,9 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_axis_0_uint64) Shape data_shape{3, 2}; Shape indices_shape{2, 2}; Shape out_shape{2, 2, 2}; - auto P = make_shared(element::Type_t::u64, data_shape); - auto I = make_shared(element::Type_t::i64, indices_shape); - auto A = op::Constant::create(element::Type_t::i64, Shape{}, {0}); + auto P = make_shared(element::u64, data_shape); + auto I = make_shared(element::i64, indices_shape); + auto A = op::Constant::create(element::i64, Shape{}, {0}); auto G = make_shared(P, I, A); auto f = make_shared(G, ParameterVector{P, I}); @@ -393,9 +393,9 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_axis_0_bool) Shape data_shape{3, 2}; Shape indices_shape{2, 2}; Shape out_shape{2, 2, 2}; - auto P = make_shared(element::Type_t::boolean, data_shape); - auto I = make_shared(element::Type_t::i64, indices_shape); - auto A = op::Constant::create(element::Type_t::i64, Shape{}, {0}); + auto P = make_shared(element::boolean, data_shape); + auto I = make_shared(element::i64, indices_shape); + auto A = op::Constant::create(element::i64, Shape{}, {0}); auto G = make_shared(P, I, A); auto f = make_shared(G, ParameterVector{P, I}); diff --git a/ngraph/test/backend/gather_nd.in.cpp b/ngraph/test/backend/gather_nd.in.cpp index 10a8d5dda6e064..5fe3578a4d67cd 100644 --- a/ngraph/test/backend/gather_nd.in.cpp +++ b/ngraph/test/backend/gather_nd.in.cpp @@ -45,19 +45,19 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_nd_single_indices) Shape params_shape{3, 3}; Shape indices_shape{2}; Shape out_shape{}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); auto G = make_shared(P, I); auto f = make_shared(G, ParameterVector{P, I}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto p = backend->create_tensor(element::Type_t::f32, params_shape); + auto p = backend->create_tensor(element::f32, params_shape); copy_data(p, vector{1.0f, 1.1f, 1.2f, 1.3f, 1.4f, 1.5f, 1.6f, 1.7f, 1.8f}); - auto i = backend->create_tensor(element::Type_t::i32, indices_shape); + auto i = backend->create_tensor(element::i32, indices_shape); copy_data(i, vector{1, 2}); - auto result = backend->create_tensor(element::Type_t::f32, out_shape); + auto result = backend->create_tensor(element::f32, out_shape); auto c = backend->compile(f); c->call_with_validate({result}, {p, i}); @@ -77,19 +77,19 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_nd_scalar_from_2d) Shape params_shape{2, 2}; Shape indices_shape{2, 2}; Shape out_shape{2}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); auto G = make_shared(P, I); auto f = make_shared(G, ParameterVector{P, I}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto p = backend->create_tensor(element::Type_t::f32, params_shape); + auto p = backend->create_tensor(element::f32, params_shape); copy_data(p, vector{1.0f, 1.1f, 1.2f, 1.3f}); - auto i = backend->create_tensor(element::Type_t::i32, indices_shape); + auto i = backend->create_tensor(element::i32, indices_shape); copy_data(i, vector{0, 0, 1, 1}); - auto result = backend->create_tensor(element::Type_t::f32, out_shape); + auto result = backend->create_tensor(element::f32, out_shape); auto c = backend->compile(f); c->call_with_validate({result}, {p, i}); @@ -109,19 +109,19 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_nd_1d_from_2d) Shape params_shape{2, 2}; Shape indices_shape{2, 1}; Shape out_shape{2, 2}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); auto G = make_shared(P, I); auto f = make_shared(G, ParameterVector{P, I}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto p = backend->create_tensor(element::Type_t::f32, params_shape); + auto p = backend->create_tensor(element::f32, params_shape); copy_data(p, vector{1.0f, 1.1f, 1.2f, 1.3f}); - auto i = backend->create_tensor(element::Type_t::i32, indices_shape); + auto i = backend->create_tensor(element::i32, indices_shape); copy_data(i, vector{1, 0}); - auto result = backend->create_tensor(element::Type_t::f32, out_shape); + auto result = backend->create_tensor(element::f32, out_shape); auto c = backend->compile(f); c->call_with_validate({result}, {p, i}); @@ -143,19 +143,19 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_nd_scalar_from_3d) Shape params_shape{2, 2, 2}; Shape indices_shape{2, 3}; Shape out_shape{2}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); auto G = make_shared(P, I); auto f = make_shared(G, ParameterVector{P, I}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto p = backend->create_tensor(element::Type_t::f32, params_shape); + auto p = backend->create_tensor(element::f32, params_shape); copy_data(p, vector{1.0f, 1.1f, 1.2f, 1.3f, 2.0f, 2.1f, 2.2f, 2.3f}); - auto i = backend->create_tensor(element::Type_t::i32, indices_shape); + auto i = backend->create_tensor(element::i32, indices_shape); copy_data(i, vector{0, 0, 1, 1, 0, 1}); - auto result = backend->create_tensor(element::Type_t::f32, out_shape); + auto result = backend->create_tensor(element::f32, out_shape); auto c = backend->compile(f); c->call_with_validate({result}, {p, i}); @@ -175,19 +175,19 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_nd_1d_from_3d) Shape params_shape{2, 2, 2}; Shape indices_shape{2, 2}; Shape out_shape{2, 2}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); auto G = make_shared(P, I); auto f = make_shared(G, ParameterVector{P, I}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto p = backend->create_tensor(element::Type_t::f32, params_shape); + auto p = backend->create_tensor(element::f32, params_shape); copy_data(p, vector{1.0f, 1.1f, 1.2f, 1.3f, 2.0f, 2.1f, 2.2f, 2.3f}); - auto i = backend->create_tensor(element::Type_t::i32, indices_shape); + auto i = backend->create_tensor(element::i32, indices_shape); copy_data(i, vector{0, 1, 1, 0}); - auto result = backend->create_tensor(element::Type_t::f32, out_shape); + auto result = backend->create_tensor(element::f32, out_shape); auto c = backend->compile(f); c->call_with_validate({result}, {p, i}); @@ -209,19 +209,19 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_nd_2d_from_3d) Shape params_shape{2, 2, 2}; Shape indices_shape{1, 1}; Shape out_shape{1, 2, 2}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); auto G = make_shared(P, I); auto f = make_shared(G, ParameterVector{P, I}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto p = backend->create_tensor(element::Type_t::f32, params_shape); + auto p = backend->create_tensor(element::f32, params_shape); copy_data(p, vector{1.0f, 1.1f, 1.2f, 1.3f, 2.0f, 2.1f, 2.2f, 2.3f}); - auto i = backend->create_tensor(element::Type_t::i32, indices_shape); + auto i = backend->create_tensor(element::i32, indices_shape); copy_data(i, vector{1}); - auto result = backend->create_tensor(element::Type_t::f32, out_shape); + auto result = backend->create_tensor(element::f32, out_shape); auto c = backend->compile(f); c->call_with_validate({result}, {p, i}); @@ -243,19 +243,19 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_nd_batch_scalar_from_2d) Shape params_shape{2, 2}; Shape indices_shape{2, 1, 2}; Shape out_shape{2, 1}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); auto G = make_shared(P, I); auto f = make_shared(G, ParameterVector{P, I}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto p = backend->create_tensor(element::Type_t::f32, params_shape); + auto p = backend->create_tensor(element::f32, params_shape); copy_data(p, vector{1.0f, 1.1f, 1.2f, 1.3f}); - auto i = backend->create_tensor(element::Type_t::i32, indices_shape); + auto i = backend->create_tensor(element::i32, indices_shape); copy_data(i, vector{0, 0, 0, 1}); - auto result = backend->create_tensor(element::Type_t::f32, out_shape); + auto result = backend->create_tensor(element::f32, out_shape); auto c = backend->compile(f); c->call_with_validate({result}, {p, i}); @@ -275,19 +275,19 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_nd_batch_1d_from_2d) Shape params_shape{2, 2}; Shape indices_shape{2, 1, 1}; Shape out_shape{2, 1, 2}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); auto G = make_shared(P, I); auto f = make_shared(G, ParameterVector{P, I}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto p = backend->create_tensor(element::Type_t::f32, params_shape); + auto p = backend->create_tensor(element::f32, params_shape); copy_data(p, vector{1.0f, 1.1f, 1.2f, 1.3f}); - auto i = backend->create_tensor(element::Type_t::i32, indices_shape); + auto i = backend->create_tensor(element::i32, indices_shape); copy_data(i, vector{1, 0}); - auto result = backend->create_tensor(element::Type_t::f32, out_shape); + auto result = backend->create_tensor(element::f32, out_shape); auto c = backend->compile(f); c->call_with_validate({result}, {p, i}); @@ -309,19 +309,19 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_nd_batch_scalar_from_3d) Shape params_shape{2, 2, 2}; Shape indices_shape{2, 2, 3}; Shape out_shape{2, 2}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); auto G = make_shared(P, I); auto f = make_shared(G, ParameterVector{P, I}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto p = backend->create_tensor(element::Type_t::f32, params_shape); + auto p = backend->create_tensor(element::f32, params_shape); copy_data(p, vector{1.0f, 1.1f, 1.2f, 1.3f, 2.0f, 2.1f, 2.2f, 2.3f}); - auto i = backend->create_tensor(element::Type_t::i32, indices_shape); + auto i = backend->create_tensor(element::i32, indices_shape); copy_data(i, vector{0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0}); - auto result = backend->create_tensor(element::Type_t::f32, out_shape); + auto result = backend->create_tensor(element::f32, out_shape); auto c = backend->compile(f); c->call_with_validate({result}, {p, i}); @@ -343,19 +343,19 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_nd_batch_1d_from_3d) Shape params_shape{2, 2, 2}; Shape indices_shape{2, 2, 2}; Shape out_shape{2, 2, 2}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); auto G = make_shared(P, I); auto f = make_shared(G, ParameterVector{P, I}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto p = backend->create_tensor(element::Type_t::f32, params_shape); + auto p = backend->create_tensor(element::f32, params_shape); copy_data(p, vector{1.0f, 1.1f, 1.2f, 1.3f, 2.0f, 2.1f, 2.2f, 2.3f}); - auto i = backend->create_tensor(element::Type_t::i32, indices_shape); + auto i = backend->create_tensor(element::i32, indices_shape); copy_data(i, vector{0, 1, 1, 0, 0, 0, 1, 1}); - auto result = backend->create_tensor(element::Type_t::f32, out_shape); + auto result = backend->create_tensor(element::f32, out_shape); auto c = backend->compile(f); c->call_with_validate({result}, {p, i}); @@ -377,19 +377,19 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_nd_batch_1d_from_3d_negative) Shape params_shape{2, 2, 2}; Shape indices_shape{2, 2, 2}; Shape out_shape{2, 2, 2}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); auto G = make_shared(P, I); auto f = make_shared(G, ParameterVector{P, I}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto p = backend->create_tensor(element::Type_t::f32, params_shape); + auto p = backend->create_tensor(element::f32, params_shape); copy_data(p, vector{1.0f, 1.1f, 1.2f, 1.3f, 2.0f, 2.1f, 2.2f, 2.3f}); - auto i = backend->create_tensor(element::Type_t::i32, indices_shape); + auto i = backend->create_tensor(element::i32, indices_shape); copy_data(i, vector{0, -1, -1, 0, 0, 0, 1, 1}); - auto result = backend->create_tensor(element::Type_t::f32, out_shape); + auto result = backend->create_tensor(element::f32, out_shape); auto c = backend->compile(f); c->call_with_validate({result}, {p, i}); @@ -403,19 +403,19 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_nd_batch_2d_from_3d) Shape params_shape{2, 2, 2}; Shape indices_shape{2, 1, 1}; Shape out_shape{2, 1, 2, 2}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); auto G = make_shared(P, I); auto f = make_shared(G, ParameterVector{P, I}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto p = backend->create_tensor(element::Type_t::f32, params_shape); + auto p = backend->create_tensor(element::f32, params_shape); copy_data(p, vector{1.0f, 1.1f, 1.2f, 1.3f, 2.0f, 2.1f, 2.2f, 2.3f}); - auto i = backend->create_tensor(element::Type_t::i32, indices_shape); + auto i = backend->create_tensor(element::i32, indices_shape); copy_data(i, vector{1, 0}); - auto result = backend->create_tensor(element::Type_t::f32, out_shape); + auto result = backend->create_tensor(element::f32, out_shape); auto c = backend->compile(f); c->call_with_validate({result}, {p, i}); @@ -438,20 +438,20 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_nd_batch_dims1) Shape indices_shape{2, 1}; Shape out_shape{2, 4}; int batch_dims = 1; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); auto G = make_shared(P, I, batch_dims); auto f = make_shared(G, ParameterVector{P, I}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto p = backend->create_tensor(element::Type_t::f32, params_shape); + auto p = backend->create_tensor(element::f32, params_shape); copy_data(p, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}); - auto i = backend->create_tensor(element::Type_t::i32, indices_shape); + auto i = backend->create_tensor(element::i32, indices_shape); copy_data(i, vector{1, 0}); - auto result = backend->create_tensor(element::Type_t::f32, out_shape); + auto result = backend->create_tensor(element::f32, out_shape); auto c = backend->compile(f); c->call_with_validate({result}, {p, i}); @@ -466,22 +466,22 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_nd_batch_dims2) Shape indices_shape{2, 3, 3, 2}; Shape out_shape{6, 3}; int batch_dims = 2; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); auto G = make_shared(P, I, batch_dims); auto f = make_shared(G, ParameterVector{P, I}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto p = backend->create_tensor(element::Type_t::f32, params_shape); + auto p = backend->create_tensor(element::f32, params_shape); copy_data(p, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48}); - auto i = backend->create_tensor(element::Type_t::i32, indices_shape); + auto i = backend->create_tensor(element::i32, indices_shape); copy_data(i, vector{1, 0, 3, 1, 2, 1, 0, 1, 1, 1, 2, 0, 3, 0, 3, 1, 2, 1, 2, 0, 1, 1, 3, 1, 1, 1, 2, 0, 2, 0, 0, 0, 3, 1, 3, 1}); - auto result = backend->create_tensor(element::Type_t::f32, out_shape); + auto result = backend->create_tensor(element::f32, out_shape); auto c = backend->compile(f); c->call_with_validate({result}, {p, i}); @@ -497,20 +497,20 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_nd_batch_dims2_lead_dims) Shape indices_shape{2, 3, 1, 1}; Shape out_shape{6, 1}; int batch_dims = 2; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); auto G = make_shared(P, I, batch_dims); auto f = make_shared(G, ParameterVector{P, I}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto p = backend->create_tensor(element::Type_t::f32, params_shape); + auto p = backend->create_tensor(element::f32, params_shape); copy_data(p, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}); - auto i = backend->create_tensor(element::Type_t::i32, indices_shape); + auto i = backend->create_tensor(element::i32, indices_shape); copy_data(i, vector{1, 0, 2, 0, 2, 2}); - auto result = backend->create_tensor(element::Type_t::f32, out_shape); + auto result = backend->create_tensor(element::f32, out_shape); auto c = backend->compile(f); c->call_with_validate({result}, {p, i}); diff --git a/ngraph/test/backend/gelu.in.cpp b/ngraph/test/backend/gelu.in.cpp index 426f92c74ec954..5e99792b678f00 100644 --- a/ngraph/test/backend/gelu.in.cpp +++ b/ngraph/test/backend/gelu.in.cpp @@ -50,7 +50,7 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, gelu_f32) { Shape shape{100000}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared(make_shared(A), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); @@ -66,9 +66,9 @@ NGRAPH_TEST(${BACKEND_NAME}, gelu_f32) } // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, args[0]); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); std::transform(args[0].begin(), args[0].end(), args[0].begin(), [](float x) -> float { return 0.5f * x * (1.0f + erf(x / sqrt(2.0f))); @@ -82,16 +82,16 @@ NGRAPH_TEST(${BACKEND_NAME}, gelu_f32) NGRAPH_TEST(${BACKEND_NAME}, gelu_f64) { Shape shape{8}; - auto A = make_shared(element::Type_t::f64, shape); + auto A = make_shared(element::f64, shape); auto f = make_shared(make_shared(A), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f64, shape); + auto a = backend->create_tensor(element::f64, shape); vector input{-4.0, -3.0, -2.0, -1.0, 0.0, 1.0, 2.0, 3.0}; copy_data(a, input); - auto result = backend->create_tensor(element::Type_t::f64, shape); + auto result = backend->create_tensor(element::f64, shape); std::transform(input.begin(), input.end(), input.begin(), [](double x) -> double { return 0.5 * x * (1.0 + erf(x / sqrt(2.0))); diff --git a/ngraph/test/backend/group_convolution.in.cpp b/ngraph/test/backend/group_convolution.in.cpp index 9c213e2e4b7f87..16063ddd8f5534 100644 --- a/ngraph/test/backend/group_convolution.in.cpp +++ b/ngraph/test/backend/group_convolution.in.cpp @@ -37,11 +37,11 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, dyn_group_convolution_backprop_data) { Shape shape_filter{6, 1, 3, 3}; - auto filters = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto filters = make_shared(element::f32, PartialShape::dynamic()); Shape shape_delta{2, 6, 3, 3}; - auto deltas = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto deltas = make_shared(element::f32, PartialShape::dynamic()); Shape shape_data_batch{2, 3, 5, 5}; - auto data_batch = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto data_batch = make_shared(element::f32, PartialShape::dynamic()); auto strides = Strides{1, 1}; auto dilations = Strides{1, 1}; auto padding_begin = CoordinateDiff{0, 0}; @@ -57,7 +57,7 @@ NGRAPH_TEST(${BACKEND_NAME}, dyn_group_convolution_backprop_data) auto handle = backend->compile(f); - auto result = backend->create_dynamic_tensor(element::Type_t::f32, PartialShape::dynamic()); + auto result = backend->create_dynamic_tensor(element::f32, PartialShape::dynamic()); vector filter, delta, data, expected_result; @@ -73,11 +73,11 @@ NGRAPH_TEST(${BACKEND_NAME}, dyn_group_convolution_backprop_data) for (int i = 0; i < 2 * 3 * 5 * 5; i++) expected_result.emplace_back(i); - auto a = backend->create_tensor(element::Type_t::f32, shape_data_batch); + auto a = backend->create_tensor(element::f32, shape_data_batch); copy_data(a, data); - auto b = backend->create_tensor(element::Type_t::f32, shape_filter); + auto b = backend->create_tensor(element::f32, shape_filter); copy_data(b, filter); - auto c = backend->create_tensor(element::Type_t::f32, shape_delta); + auto c = backend->create_tensor(element::f32, shape_delta); copy_data(c, delta); handle->call_with_validate({result}, {a, b, c}); EXPECT_FALSE(test::all_close_f(vector{expected_result}, read_vector(result))); @@ -92,8 +92,8 @@ NGRAPH_TEST(${BACKEND_NAME}, v1_group_conv_backprop_data) Strides dilations{1, 1}; const op::PadType auto_pad{op::PadType::EXPLICIT}; - auto data = make_shared(element::Type_t::f32, Shape{1, 1, 3, 3}); - auto filters = make_shared(element::Type_t::f32, Shape{1, 1, 1, 3, 3}); + auto data = make_shared(element::f32, Shape{1, 1, 3, 3}); + auto filters = make_shared(element::f32, Shape{1, 1, 1, 3, 3}); auto gcbd = make_shared( data, filters, strides, pads_begin, pads_end, dilations, auto_pad, output_padding); @@ -138,9 +138,9 @@ NGRAPH_TEST(${BACKEND_NAME}, v1_group_conv_backprop_data_output_shape) Strides strides{1, 1}; Strides dilations{1, 1}; - auto data = make_shared(element::Type_t::f32, Shape{1, 1, 1, 10}); - auto filters = make_shared(element::Type_t::f32, Shape{1, 1, 1, 1, 5}); - auto output_shape = op::Constant::create(element::Type_t::i64, Shape{2}, {1, 14}); + auto data = make_shared(element::f32, Shape{1, 1, 1, 10}); + auto filters = make_shared(element::f32, Shape{1, 1, 1, 1, 5}); + auto output_shape = op::Constant::create(element::i64, Shape{2}, {1, 14}); auto gcbd = make_shared( data, filters, output_shape, strides, dilations, op::PadType::SAME_UPPER); diff --git a/ngraph/test/backend/hard_sigmoid.in.cpp b/ngraph/test/backend/hard_sigmoid.in.cpp index 08798a191deb46..b8379c0695042d 100644 --- a/ngraph/test/backend/hard_sigmoid.in.cpp +++ b/ngraph/test/backend/hard_sigmoid.in.cpp @@ -33,10 +33,10 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, hard_sigmoid_1d) { const Shape a_shape{3}; - const auto A = make_shared(element::Type_t::f32, a_shape); + const auto A = make_shared(element::f32, a_shape); - const auto alpha = op::Constant::create(element::Type_t::f32, Shape{}, {0.5f}); - const auto beta = op::Constant::create(element::Type_t::f32, Shape{}, {0.6f}); + const auto alpha = op::Constant::create(element::f32, Shape{}, {0.5f}); + const auto beta = op::Constant::create(element::f32, Shape{}, {0.6f}); const auto R = make_shared(A, alpha, beta); const auto f = make_shared(R, ParameterVector{A}); @@ -55,10 +55,10 @@ NGRAPH_TEST(${BACKEND_NAME}, hard_sigmoid_1d) NGRAPH_TEST(${BACKEND_NAME}, hard_sigmoid_2d) { const Shape a_shape{2, 5}; - const auto A = make_shared(element::Type_t::f32, a_shape); + const auto A = make_shared(element::f32, a_shape); - const auto alpha = op::Constant::create(element::Type_t::f32, Shape{}, {0.2f}); - const auto beta = op::Constant::create(element::Type_t::f32, Shape{}, {0.5f}); + const auto alpha = op::Constant::create(element::f32, Shape{}, {0.2f}); + const auto beta = op::Constant::create(element::f32, Shape{}, {0.5f}); const auto R = make_shared(A, alpha, beta); const auto f = make_shared(R, ParameterVector{A}); diff --git a/ngraph/test/backend/interpolate.in.cpp b/ngraph/test/backend/interpolate.in.cpp index 6911c81bb8bc3e..9fcc1e1a324a57 100644 --- a/ngraph/test/backend/interpolate.in.cpp +++ b/ngraph/test/backend/interpolate.in.cpp @@ -42,17 +42,16 @@ NGRAPH_TEST(${BACKEND_NAME}, interpolate_down_scales_const_linear) attrs.axes = AxisSet{0, 1, 2, 3}; attrs.mode = "linear"; attrs.align_corners = false; - const auto input = make_shared(element::Type_t::f32, input_shape); - const auto output_shape_input = - op::v0::Constant::create(element::Type_t::i64, {4}, {1, 1, 1, 2}); + const auto input = make_shared(element::f32, input_shape); + const auto output_shape_input = op::v0::Constant::create(element::i64, {4}, {1, 1, 1, 2}); std::vector intput_data{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0}; auto interpolate = make_shared(input, output_shape_input, attrs); auto f = make_shared(interpolate, ParameterVector{input}); auto backend = runtime::Backend::create("IE_CPU"); - auto input_tensor = backend->create_tensor(element::Type_t::f32, input_shape); - auto result_tensor = backend->create_tensor(element::Type_t::f32, output_shape); + auto input_tensor = backend->create_tensor(element::f32, input_shape); + auto result_tensor = backend->create_tensor(element::f32, output_shape); auto handle = backend->compile(f); copy_data(input_tensor, intput_data); diff --git a/ngraph/test/backend/layer_norm.in.cpp b/ngraph/test/backend/layer_norm.in.cpp index 9fa0c3267ff34d..ebb0feb4f654ec 100644 --- a/ngraph/test/backend/layer_norm.in.cpp +++ b/ngraph/test/backend/layer_norm.in.cpp @@ -48,18 +48,18 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, layer_norm_affine_stats) { - auto p_data = make_shared(element::Type_t::f32, Shape{2, 4}); - auto p_scale = make_shared(element::Type_t::f32, Shape{4}); - auto p_bias = make_shared(element::Type_t::f32, Shape{4}); + auto p_data = make_shared(element::f32, Shape{2, 4}); + auto p_scale = make_shared(element::f32, Shape{4}); + auto p_bias = make_shared(element::f32, Shape{4}); auto ln = make_shared(p_data, p_scale, p_bias); auto f = make_shared(ln->outputs(), ParameterVector{p_data, p_scale, p_bias}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create tensors for input - auto data = backend->create_tensor(element::Type_t::f32, Shape{2, 4}); - auto scale = backend->create_tensor(element::Type_t::f32, Shape{4}); - auto bias = backend->create_tensor(element::Type_t::f32, Shape{4}); + auto data = backend->create_tensor(element::f32, Shape{2, 4}); + auto scale = backend->create_tensor(element::f32, Shape{4}); + auto bias = backend->create_tensor(element::f32, Shape{4}); // Fill in input tensors vector d_input{-4.0f, -3.0f, -2.0f, -1.0f, 0.0f, 1.0f, 2.0f, 3.0f}; copy_data(data, d_input); @@ -68,9 +68,9 @@ NGRAPH_TEST(${BACKEND_NAME}, layer_norm_affine_stats) vector b_input{-4.0f, -3.0f, -2.0f, -1.0f}; copy_data(bias, b_input); // Create tensors for output - auto norm = backend->create_tensor(element::Type_t::f32, Shape{2, 4}); - auto mean = backend->create_tensor(element::Type_t::f32, Shape{2}); - auto var = backend->create_tensor(element::Type_t::f32, Shape{2}); + auto norm = backend->create_tensor(element::f32, Shape{2, 4}); + auto mean = backend->create_tensor(element::f32, Shape{2}); + auto var = backend->create_tensor(element::f32, Shape{2}); // Expected results (Manually computed) vector exp_norm{-2.658364534378051758f, diff --git a/ngraph/test/backend/log.in.cpp b/ngraph/test/backend/log.in.cpp index 5b45b8687289ca..f3558820d39901 100644 --- a/ngraph/test/backend/log.in.cpp +++ b/ngraph/test/backend/log.in.cpp @@ -46,7 +46,7 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, log) { Shape shape{2, 2, 2}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared(make_shared(A), ParameterVector{A}); std::vector a{0.125f, 0.25f, 0.5f, 1.f, 2.f, 4.f, 8.f, 16.f}; diff --git a/ngraph/test/backend/log_softmax.in.cpp b/ngraph/test/backend/log_softmax.in.cpp index f9a24a83b24098..1304e8156325b5 100644 --- a/ngraph/test/backend/log_softmax.in.cpp +++ b/ngraph/test/backend/log_softmax.in.cpp @@ -45,13 +45,13 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, log_softmax_1d_single_value) { Shape shape{1}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); std::vector expected_result{0}; @@ -64,13 +64,13 @@ NGRAPH_TEST(${BACKEND_NAME}, log_softmax_1d_single_value) NGRAPH_TEST(${BACKEND_NAME}, log_softmax_2d_axis0) { Shape shape{2, 4}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{0, 1, 2, 3, 10000, 10001, 10002, 10003}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); std::vector expected_result{-10000., -10000., -10000., -10000., 0., 0., 0., 0.}; @@ -83,13 +83,13 @@ NGRAPH_TEST(${BACKEND_NAME}, log_softmax_2d_axis0) NGRAPH_TEST(${BACKEND_NAME}, log_softmax_2d_axis1) { Shape shape{2, 4}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{0, 1, 2, 3, 10000, 10001, 10002, 10003}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); std::vector expected_result{-3.4401896, -2.4401896, @@ -109,13 +109,13 @@ NGRAPH_TEST(${BACKEND_NAME}, log_softmax_2d_axis1) NGRAPH_TEST(${BACKEND_NAME}, log_softmax_2d_axis_neg1) { Shape shape{2, 4}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{0, 1, 2, 3, 10000, 10001, 10002, 10003}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); std::vector expected_result{-3.4401896, -2.4401896, @@ -135,13 +135,13 @@ NGRAPH_TEST(${BACKEND_NAME}, log_softmax_2d_axis_neg1) NGRAPH_TEST(${BACKEND_NAME}, log_softmax_2d_axis_neg2) { Shape shape{2, 4}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{0, 1, 2, 3, 10000, 10001, 10002, 10003}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); std::vector expected_result{-10000., -10000., -10000., -10000., 0., 0., 0., 0.}; @@ -154,13 +154,13 @@ NGRAPH_TEST(${BACKEND_NAME}, log_softmax_2d_axis_neg2) NGRAPH_TEST(${BACKEND_NAME}, log_softmax_3d_axis_0) { Shape shape{3, 2, 3}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{-9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); std::vector expected_result{-12.0024818, -12.0024818, @@ -190,13 +190,13 @@ NGRAPH_TEST(${BACKEND_NAME}, log_softmax_3d_axis_0) NGRAPH_TEST(${BACKEND_NAME}, log_softmax_3d_axis_1) { Shape shape{3, 2, 3}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{-9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); std::vector expected_result{-3.04858735, -3.04858735, @@ -226,13 +226,13 @@ NGRAPH_TEST(${BACKEND_NAME}, log_softmax_3d_axis_1) NGRAPH_TEST(${BACKEND_NAME}, log_softmax_3d_axis_2) { Shape shape{3, 2, 3}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{-9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); std::vector expected_result{-2.40760596, -1.40760596, @@ -262,13 +262,13 @@ NGRAPH_TEST(${BACKEND_NAME}, log_softmax_3d_axis_2) NGRAPH_TEST(${BACKEND_NAME}, log_softmax_3d_axis_neg1) { Shape shape{3, 2, 3}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{-9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); std::vector expected_result{-2.40760596, -1.40760596, @@ -298,13 +298,13 @@ NGRAPH_TEST(${BACKEND_NAME}, log_softmax_3d_axis_neg1) NGRAPH_TEST(${BACKEND_NAME}, log_softmax_3d_axis_neg2) { Shape shape{3, 2, 3}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{-9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); std::vector expected_result{-3.04858735, -3.04858735, @@ -334,13 +334,13 @@ NGRAPH_TEST(${BACKEND_NAME}, log_softmax_3d_axis_neg2) NGRAPH_TEST(${BACKEND_NAME}, log_softmax_3d_axis_neg3) { Shape shape{3, 2, 3}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{-9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); std::vector expected_result{-12.0024818, -12.0024818, diff --git a/ngraph/test/backend/logical_and.in.cpp b/ngraph/test/backend/logical_and.in.cpp index e39d68971a2b6b..680f9444a705e5 100644 --- a/ngraph/test/backend/logical_and.in.cpp +++ b/ngraph/test/backend/logical_and.in.cpp @@ -31,8 +31,8 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, logical_and) { Shape shape{3, 4}; - auto A = make_shared(element::Type_t::boolean, shape); - auto B = make_shared(element::Type_t::boolean, shape); + auto A = make_shared(element::boolean, shape); + auto B = make_shared(element::boolean, shape); auto f = make_shared(std::make_shared(A, B), ParameterVector{A, B}); diff --git a/ngraph/test/backend/logical_not.in.cpp b/ngraph/test/backend/logical_not.in.cpp index a33db690a3cc6d..c59654b048275b 100644 --- a/ngraph/test/backend/logical_not.in.cpp +++ b/ngraph/test/backend/logical_not.in.cpp @@ -48,7 +48,7 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, not) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::boolean, shape); + auto A = make_shared(element::boolean, shape); auto f = make_shared(make_shared(A), ParameterVector{A}); std::vector a{1, 0, 1, 0}; @@ -62,7 +62,7 @@ NGRAPH_TEST(${BACKEND_NAME}, not) NGRAPH_TEST(${BACKEND_NAME}, not_i32) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::i32, shape); + auto A = make_shared(element::i32, shape); auto f = make_shared(make_shared(A), ParameterVector{A}); std::vector a{1, 0, 2, 0}; diff --git a/ngraph/test/backend/logical_or.in.cpp b/ngraph/test/backend/logical_or.in.cpp index 40e23624f8dd5c..bfe148a86656b2 100644 --- a/ngraph/test/backend/logical_or.in.cpp +++ b/ngraph/test/backend/logical_or.in.cpp @@ -31,8 +31,8 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, logical_or) { Shape shape{2, 2, 2}; - auto A = make_shared(element::Type_t::boolean, shape); - auto B = make_shared(element::Type_t::boolean, shape); + auto A = make_shared(element::boolean, shape); + auto B = make_shared(element::boolean, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); std::vector a{1, 0, 1, 1, 1, 0, 1, 0}; diff --git a/ngraph/test/backend/logical_xor.in.cpp b/ngraph/test/backend/logical_xor.in.cpp index c4ee11b8ec8afc..f71a3f8aa5f8e1 100644 --- a/ngraph/test/backend/logical_xor.in.cpp +++ b/ngraph/test/backend/logical_xor.in.cpp @@ -29,8 +29,8 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, logical_xor) { Shape shape{2, 2, 2}; - auto A = make_shared(element::Type_t::boolean, shape); - auto B = make_shared(element::Type_t::boolean, shape); + auto A = make_shared(element::boolean, shape); + auto B = make_shared(element::boolean, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); std::vector a{1, 0, 1, 1, 1, 0, 1, 0}; diff --git a/ngraph/test/backend/lrn.in.cpp b/ngraph/test/backend/lrn.in.cpp index 7aebbef155d89b..3c568e76d041d3 100644 --- a/ngraph/test/backend/lrn.in.cpp +++ b/ngraph/test/backend/lrn.in.cpp @@ -41,7 +41,7 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, lrn_across_channel) { Shape shape{2, 3, 2, 1}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); double alpha = 3; double beta = 0.5; double bias = 1; @@ -73,8 +73,8 @@ NGRAPH_TEST(${BACKEND_NAME}, lrn_across_channel) NGRAPH_TEST(${BACKEND_NAME}, lrn_across_h) { Shape shape{2, 3, 2, 1}; - auto A = make_shared(element::Type_t::f32, shape); - auto axes = make_shared(element::Type_t::i64, Shape{1}, vector{2}); + auto A = make_shared(element::f32, shape); + auto axes = make_shared(element::i64, Shape{1}, vector{2}); double alpha = 3; double beta = 0.5; double bias = 1; @@ -106,8 +106,8 @@ NGRAPH_TEST(${BACKEND_NAME}, lrn_across_h) NGRAPH_TEST(${BACKEND_NAME}, lrn_across_hw) { Shape shape{2, 3, 2, 1}; - auto A = make_shared(element::Type_t::f32, shape); - auto axes = make_shared(element::Type_t::i64, Shape{2}, vector{2, 3}); + auto A = make_shared(element::f32, shape); + auto axes = make_shared(element::i64, Shape{2}, vector{2, 3}); double alpha = 3; double beta = 0.5; double bias = 1; @@ -139,9 +139,8 @@ NGRAPH_TEST(${BACKEND_NAME}, lrn_across_hw) NGRAPH_TEST(${BACKEND_NAME}, lrn_across_all_dims) { Shape shape{2, 3, 2, 1}; - auto A = make_shared(element::Type_t::f32, shape); - auto axes = - make_shared(element::Type_t::i64, Shape{4}, vector{0, 1, 2, 3}); + auto A = make_shared(element::f32, shape); + auto axes = make_shared(element::i64, Shape{4}, vector{0, 1, 2, 3}); double alpha = 3; double beta = 0.5; double bias = 1; @@ -173,8 +172,8 @@ NGRAPH_TEST(${BACKEND_NAME}, lrn_across_all_dims) NGRAPH_TEST(${BACKEND_NAME}, lrn_across_nw) { Shape shape{2, 3, 2, 1}; - auto A = make_shared(element::Type_t::f32, shape); - auto axes = make_shared(element::Type_t::i64, Shape{2}, vector{0, 3}); + auto A = make_shared(element::f32, shape); + auto axes = make_shared(element::i64, Shape{2}, vector{0, 3}); double alpha = 3; double beta = 0.5; double bias = 1; @@ -206,8 +205,8 @@ NGRAPH_TEST(${BACKEND_NAME}, lrn_across_nw) NGRAPH_TEST(${BACKEND_NAME}, lrn_across_empty) { Shape shape{2, 3, 2, 1}; - auto A = make_shared(element::Type_t::f32, shape); - auto axes = make_shared(element::Type_t::i64, Shape{0}, vector{}); + auto A = make_shared(element::f32, shape); + auto axes = make_shared(element::i64, Shape{0}, vector{}); double alpha = 3; double beta = 0.5; double bias = 1; @@ -239,8 +238,8 @@ NGRAPH_TEST(${BACKEND_NAME}, lrn_across_empty) NGRAPH_TEST(${BACKEND_NAME}, lrn_6D_across_2_axes) { Shape shape{2, 3, 2, 2, 1, 1}; - auto A = make_shared(element::Type_t::f32, shape); - auto axes = make_shared(element::Type_t::i64, Shape{2}, vector{2, 3}); + auto A = make_shared(element::f32, shape); + auto axes = make_shared(element::i64, Shape{2}, vector{2, 3}); double alpha = 3; double beta = 0.5; double bias = 1; @@ -265,8 +264,8 @@ NGRAPH_TEST(${BACKEND_NAME}, lrn_6D_across_2_axes) NGRAPH_TEST(${BACKEND_NAME}, lrn_2d_across_empty) { Shape shape{12}; - auto A = make_shared(element::Type_t::f32, shape); - auto axes = make_shared(element::Type_t::i64, Shape{0}, vector{}); + auto A = make_shared(element::f32, shape); + auto axes = make_shared(element::i64, Shape{0}, vector{}); double alpha = 3; double beta = 0.5; double bias = 1; @@ -297,8 +296,8 @@ NGRAPH_TEST(${BACKEND_NAME}, lrn_2d_across_empty) NGRAPH_TEST(${BACKEND_NAME}, lrn_2d_across_outermost_axis) { Shape shape{6, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto axes = make_shared(element::Type_t::i64, Shape{1}, vector{0}); + auto A = make_shared(element::f32, shape); + auto axes = make_shared(element::i64, Shape{1}, vector{0}); double alpha = 0.0002; double beta = 0.5; double bias = 2.0; diff --git a/ngraph/test/backend/matmul.in.cpp b/ngraph/test/backend/matmul.in.cpp index 827208e3aa31b2..a134de115e8309 100644 --- a/ngraph/test/backend/matmul.in.cpp +++ b/ngraph/test/backend/matmul.in.cpp @@ -46,18 +46,18 @@ NGRAPH_TEST(${BACKEND_NAME}, matmul_2x0_0x2) Shape shape_b{0, 2}; Shape shape_r{2, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); - auto B = make_shared(element::Type_t::f32, shape_b); + auto A = make_shared(element::f32, shape_a); + auto B = make_shared(element::f32, shape_b); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto b = backend->create_tensor(element::Type_t::f32, shape_b); + auto b = backend->create_tensor(element::f32, shape_b); copy_data(b, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); // Overwrite the initial result vector to make sure we're not just coincidentally getting the // right value. @@ -72,20 +72,20 @@ NGRAPH_TEST(${BACKEND_NAME}, matmul_0x2_2x0) { Shape shape_a{0, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_b{2, 0}; - auto B = make_shared(element::Type_t::f32, shape_b); + auto B = make_shared(element::f32, shape_b); Shape shape_r{0, 0}; auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto b = backend->create_tensor(element::Type_t::f32, shape_b); + auto b = backend->create_tensor(element::f32, shape_b); copy_data(b, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b}); @@ -96,20 +96,20 @@ NGRAPH_TEST(${BACKEND_NAME}, matmul_3x2_2x0) { Shape shape_a{3, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_b{2, 0}; - auto B = make_shared(element::Type_t::f32, shape_b); + auto B = make_shared(element::f32, shape_b); Shape shape_r{3, 0}; auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto b = backend->create_tensor(element::Type_t::f32, shape_b); + auto b = backend->create_tensor(element::f32, shape_b); copy_data(b, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b}); @@ -119,19 +119,19 @@ NGRAPH_TEST(${BACKEND_NAME}, matmul_3x2_2x0) NGRAPH_TEST(${BACKEND_NAME}, matmul_2x2_2x2) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); Shape shape_r{2, 2}; auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 2, 3, 4}); - auto b = backend->create_tensor(element::Type_t::f32, shape); + auto b = backend->create_tensor(element::f32, shape); copy_data(b, vector{5, 6, 7, 8}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b}); @@ -143,17 +143,17 @@ NGRAPH_TEST(${BACKEND_NAME}, matmul_2x3_3x3) Shape shape_in1{2, 3}; Shape shape_in2{3, 3}; Shape shape_out{2, 3}; - auto A = make_shared(element::Type_t::f32, shape_in1); - auto B = make_shared(element::Type_t::f32, shape_in2); + auto A = make_shared(element::f32, shape_in1); + auto B = make_shared(element::f32, shape_in2); auto matmul = make_shared(A, B, false, false); auto f = make_shared(matmul, ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - shared_ptr a = backend->create_tensor(element::Type_t::f32, shape_in1); - shared_ptr b = backend->create_tensor(element::Type_t::f32, shape_in2); - shared_ptr result = backend->create_tensor(element::Type_t::f32, shape_out); + shared_ptr a = backend->create_tensor(element::f32, shape_in1); + shared_ptr b = backend->create_tensor(element::f32, shape_in2); + shared_ptr result = backend->create_tensor(element::f32, shape_out); copy_data(a, vector{1.f, 2.f, 3.f, 4.f, 5.f, 6.f}); copy_data(b, vector{1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f, 8.f, 9.f}); @@ -170,17 +170,17 @@ NGRAPH_TEST(${BACKEND_NAME}, matmul_2x3_3x3_int64) Shape shape_in1{2, 3}; Shape shape_in2{3, 3}; Shape shape_out{2, 3}; - auto A = make_shared(element::Type_t::i64, shape_in1); - auto B = make_shared(element::Type_t::i64, shape_in2); + auto A = make_shared(element::i64, shape_in1); + auto B = make_shared(element::i64, shape_in2); auto matmul = make_shared(A, B, false, false); auto f = make_shared(matmul, ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - shared_ptr a = backend->create_tensor(element::Type_t::i64, shape_in1); - shared_ptr b = backend->create_tensor(element::Type_t::i64, shape_in2); - shared_ptr result = backend->create_tensor(element::Type_t::i64, shape_out); + shared_ptr a = backend->create_tensor(element::i64, shape_in1); + shared_ptr b = backend->create_tensor(element::i64, shape_in2); + shared_ptr result = backend->create_tensor(element::i64, shape_out); copy_data(a, vector{1, 2, 3, 4, 5, 6}); copy_data(b, vector{1, 2, 3, 4, 5, 6, 7, 8, 9}); @@ -197,17 +197,17 @@ NGRAPH_TEST(${BACKEND_NAME}, matmul_3x2_3x3_transpose) Shape shape_in1{3, 2}; Shape shape_in2{3, 3}; Shape shape_out{2, 3}; - auto A = make_shared(element::Type_t::f32, shape_in1); - auto B = make_shared(element::Type_t::f32, shape_in2); + auto A = make_shared(element::f32, shape_in1); + auto B = make_shared(element::f32, shape_in2); auto matmul = make_shared(A, B, true, false); auto f = make_shared(matmul, ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - shared_ptr a = backend->create_tensor(element::Type_t::f32, shape_in1); - shared_ptr b = backend->create_tensor(element::Type_t::f32, shape_in2); - shared_ptr result = backend->create_tensor(element::Type_t::f32, shape_out); + shared_ptr a = backend->create_tensor(element::f32, shape_in1); + shared_ptr b = backend->create_tensor(element::f32, shape_in2); + shared_ptr result = backend->create_tensor(element::f32, shape_out); copy_data(a, vector{1.f, 4.f, 2.f, 5.f, 3.f, 6.f}); copy_data(b, vector{1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f, 8.f, 9.f}); @@ -224,17 +224,17 @@ NGRAPH_TEST(${BACKEND_NAME}, matmul_3x2_2x3_transpose) Shape shape_in1{3, 2}; Shape shape_in2{2, 3}; Shape shape_out{2, 2}; - auto A = make_shared(element::Type_t::f32, shape_in1); - auto B = make_shared(element::Type_t::f32, shape_in2); + auto A = make_shared(element::f32, shape_in1); + auto B = make_shared(element::f32, shape_in2); auto matmul = make_shared(A, B, true, true); auto f = make_shared(matmul, ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - shared_ptr a = backend->create_tensor(element::Type_t::f32, shape_in1); - shared_ptr b = backend->create_tensor(element::Type_t::f32, shape_in2); - shared_ptr result = backend->create_tensor(element::Type_t::f32, shape_out); + shared_ptr a = backend->create_tensor(element::f32, shape_in1); + shared_ptr b = backend->create_tensor(element::f32, shape_in2); + shared_ptr result = backend->create_tensor(element::f32, shape_out); copy_data(a, vector{1.f, 4.f, 2.f, 5.f, 3.f, 6.f}); copy_data(b, vector{1.f, 3.f, 5.f, 2.f, 4.f, 6.f}); @@ -251,17 +251,17 @@ NGRAPH_TEST(${BACKEND_NAME}, matmul_2x3x2_3x3_transpose) Shape shape_in1{2, 3, 2}; Shape shape_in2{3, 3}; Shape shape_out{2, 2, 3}; - auto A = make_shared(element::Type_t::f32, shape_in1); - auto B = make_shared(element::Type_t::f32, shape_in2); + auto A = make_shared(element::f32, shape_in1); + auto B = make_shared(element::f32, shape_in2); auto matmul = make_shared(A, B, true, false); auto f = make_shared(matmul, ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - shared_ptr a = backend->create_tensor(element::Type_t::f32, shape_in1); - shared_ptr b = backend->create_tensor(element::Type_t::f32, shape_in2); - shared_ptr result = backend->create_tensor(element::Type_t::f32, shape_out); + shared_ptr a = backend->create_tensor(element::f32, shape_in1); + shared_ptr b = backend->create_tensor(element::f32, shape_in2); + shared_ptr result = backend->create_tensor(element::f32, shape_out); copy_data(a, vector{1.f, 4.f, 2.f, 5.f, 3.f, 6.f, 3.f, 2.f, 1.f, 4.f, 5.f, 6.f}); copy_data(b, vector{1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f, 8.f, 9.f}); @@ -279,16 +279,16 @@ NGRAPH_TEST(${BACKEND_NAME}, matmul_2_2) Shape shape_in1{2}; Shape shape_in2{2}; Shape shape_out{}; - auto A = make_shared(element::Type_t::f32, shape_in1); - auto B = make_shared(element::Type_t::f32, shape_in2); + auto A = make_shared(element::f32, shape_in1); + auto B = make_shared(element::f32, shape_in2); auto matmul = make_shared(A, B, false, false); auto f = make_shared(matmul, ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - shared_ptr a = backend->create_tensor(element::Type_t::f32, shape_in1); - shared_ptr b = backend->create_tensor(element::Type_t::f32, shape_in2); - shared_ptr result = backend->create_tensor(element::Type_t::f32, shape_out); + shared_ptr a = backend->create_tensor(element::f32, shape_in1); + shared_ptr b = backend->create_tensor(element::f32, shape_in2); + shared_ptr result = backend->create_tensor(element::f32, shape_out); copy_data(a, vector{1.f, 2.f}); copy_data(b, vector{1.f, 2.f}); @@ -304,16 +304,16 @@ NGRAPH_TEST(${BACKEND_NAME}, matmul_2x2x3_2x1x3_transpose) Shape shape_in1{2, 2, 3}; Shape shape_in2{2, 1, 3}; Shape shape_out{2, 2, 1}; - auto A = make_shared(element::Type_t::f32, shape_in1); - auto B = make_shared(element::Type_t::f32, shape_in2); + auto A = make_shared(element::f32, shape_in1); + auto B = make_shared(element::f32, shape_in2); auto matmul = make_shared(A, B, false, true); auto f = make_shared(matmul, ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - shared_ptr a = backend->create_tensor(element::Type_t::f32, shape_in1); - shared_ptr b = backend->create_tensor(element::Type_t::f32, shape_in2); - shared_ptr result = backend->create_tensor(element::Type_t::f32, shape_out); + shared_ptr a = backend->create_tensor(element::f32, shape_in1); + shared_ptr b = backend->create_tensor(element::f32, shape_in2); + shared_ptr result = backend->create_tensor(element::f32, shape_out); vector in1_vec(shape_size(shape_in1)); vector in2_vec(shape_size(shape_in2)); @@ -336,16 +336,16 @@ NGRAPH_TEST(${BACKEND_NAME}, matmul_2x2x3_2x1x3_transpose_int64) Shape shape_in1{2, 2, 3}; Shape shape_in2{2, 1, 3}; Shape shape_out{2, 2, 1}; - auto A = make_shared(element::Type_t::i64, shape_in1); - auto B = make_shared(element::Type_t::i64, shape_in2); + auto A = make_shared(element::i64, shape_in1); + auto B = make_shared(element::i64, shape_in2); auto matmul = make_shared(A, B, false, true); auto f = make_shared(matmul, ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - shared_ptr a = backend->create_tensor(element::Type_t::i64, shape_in1); - shared_ptr b = backend->create_tensor(element::Type_t::i64, shape_in2); - shared_ptr result = backend->create_tensor(element::Type_t::i64, shape_out); + shared_ptr a = backend->create_tensor(element::i64, shape_in1); + shared_ptr b = backend->create_tensor(element::i64, shape_in2); + shared_ptr result = backend->create_tensor(element::i64, shape_out); vector in1_vec(shape_size(shape_in1)); vector in2_vec(shape_size(shape_in2)); @@ -367,16 +367,16 @@ NGRAPH_TEST(${BACKEND_NAME}, matmul_2x2x3_2x3x1_int64) Shape shape_in1{2, 2, 3}; Shape shape_in2{2, 3, 1}; Shape shape_out{2, 2, 1}; - auto A = make_shared(element::Type_t::i64, shape_in1); - auto B = make_shared(element::Type_t::i64, shape_in2); + auto A = make_shared(element::i64, shape_in1); + auto B = make_shared(element::i64, shape_in2); auto matmul = make_shared(A, B, false, false); auto f = make_shared(matmul, ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - shared_ptr a = backend->create_tensor(element::Type_t::i64, shape_in1); - shared_ptr b = backend->create_tensor(element::Type_t::i64, shape_in2); - shared_ptr result = backend->create_tensor(element::Type_t::i64, shape_out); + shared_ptr a = backend->create_tensor(element::i64, shape_in1); + shared_ptr b = backend->create_tensor(element::i64, shape_in2); + shared_ptr result = backend->create_tensor(element::i64, shape_out); vector in1_vec(shape_size(shape_in1)); vector in2_vec(shape_size(shape_in2)); @@ -398,17 +398,17 @@ NGRAPH_TEST(${BACKEND_NAME}, matmul_1x2x3_1x4x3x2) Shape shape_in1{1, 2, 3}; Shape shape_in2{1, 4, 3, 2}; Shape shape_out{1, 4, 2, 2}; - auto A = make_shared(element::Type_t::f32, shape_in1); - auto B = make_shared(element::Type_t::f32, shape_in2); + auto A = make_shared(element::f32, shape_in1); + auto B = make_shared(element::f32, shape_in2); auto matmul = make_shared(A, B, false, false); auto f = make_shared(matmul, ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - shared_ptr a = backend->create_tensor(element::Type_t::f32, shape_in1); - shared_ptr b = backend->create_tensor(element::Type_t::f32, shape_in2); - shared_ptr result = backend->create_tensor(element::Type_t::f32, shape_out); + shared_ptr a = backend->create_tensor(element::f32, shape_in1); + shared_ptr b = backend->create_tensor(element::f32, shape_in2); + shared_ptr result = backend->create_tensor(element::f32, shape_out); vector in1_vec(shape_size(shape_in1)); vector in2_vec(shape_size(shape_in2)); @@ -455,8 +455,8 @@ NGRAPH_TEST(${BACKEND_NAME}, matmul_1_3_x_3_false_false_param) std::vector inputs_b{1, 2, 3}; std::vector expected_result{14.}; - auto A = make_shared(element::Type_t::f32, shape_in1); - auto B = make_shared(element::Type_t::f32, shape_in2); + auto A = make_shared(element::f32, shape_in1); + auto B = make_shared(element::f32, shape_in2); auto matmul = make_shared(A, B, transpose_a, transpose_b); auto f = make_shared(matmul, ParameterVector{A, B}); @@ -481,8 +481,8 @@ NGRAPH_TEST(${BACKEND_NAME}, matmul_3_1_x_3_true_false_param) std::vector inputs_b{1, 2, 3}; std::vector expected_result{14.}; - auto A = make_shared(element::Type_t::f32, shape_in1); - auto B = make_shared(element::Type_t::f32, shape_in2); + auto A = make_shared(element::f32, shape_in1); + auto B = make_shared(element::f32, shape_in2); auto matmul = make_shared(A, B, transpose_a, transpose_b); auto f = make_shared(matmul, ParameterVector{A, B}); @@ -508,8 +508,8 @@ NGRAPH_TEST(${BACKEND_NAME}, matmul_3_x_3_1_false_false_param) std::vector inputs_b{1, 2, 3}; std::vector expected_result{14.}; - auto A = make_shared(element::Type_t::f32, shape_in1); - auto B = make_shared(element::Type_t::f32, shape_in2); + auto A = make_shared(element::f32, shape_in1); + auto B = make_shared(element::f32, shape_in2); auto matmul = make_shared(A, B, transpose_a, transpose_b); auto f = make_shared(matmul, ParameterVector{A, B}); @@ -534,8 +534,8 @@ NGRAPH_TEST(${BACKEND_NAME}, matmul_3_x_1_3_false_true_param) std::vector inputs_b{1, 2, 3}; std::vector expected_result{14.}; - auto A = make_shared(element::Type_t::f32, shape_in1); - auto B = make_shared(element::Type_t::f32, shape_in2); + auto A = make_shared(element::f32, shape_in1); + auto B = make_shared(element::f32, shape_in2); auto matmul = make_shared(A, B, transpose_a, transpose_b); auto f = make_shared(matmul, ParameterVector{A, B}); diff --git a/ngraph/test/backend/maximum.in.cpp b/ngraph/test/backend/maximum.in.cpp index 54388daf577046..e2c597f38d01f3 100644 --- a/ngraph/test/backend/maximum.in.cpp +++ b/ngraph/test/backend/maximum.in.cpp @@ -49,18 +49,18 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, maximum) { Shape shape{2, 2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 8, -8, 17, -0.5, 0.5, 2, 1}); - auto b = backend->create_tensor(element::Type_t::f32, shape); + auto b = backend->create_tensor(element::f32, shape); copy_data(b, vector{1, 2, 4, 8, 0, 0, 1, 1.5}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b}); @@ -71,18 +71,18 @@ NGRAPH_TEST(${BACKEND_NAME}, maximum) NGRAPH_TEST(${BACKEND_NAME}, maximum_int32) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::i32, shape); - auto B = make_shared(element::Type_t::i32, shape); + auto A = make_shared(element::i32, shape); + auto B = make_shared(element::i32, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i32, shape); + auto a = backend->create_tensor(element::i32, shape); copy_data(a, vector{0x40000140, 0x40000001, -8, 17}); - auto b = backend->create_tensor(element::Type_t::i32, shape); + auto b = backend->create_tensor(element::i32, shape); copy_data(b, vector{0x40000170, 0x40000000, 4, 8}); - auto result = backend->create_tensor(element::Type_t::i32, shape); + auto result = backend->create_tensor(element::i32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b}); @@ -92,18 +92,18 @@ NGRAPH_TEST(${BACKEND_NAME}, maximum_int32) NGRAPH_TEST(${BACKEND_NAME}, maximum_int64) { Shape shape{2, 2, 2}; - auto A = make_shared(element::Type_t::i64, shape); - auto B = make_shared(element::Type_t::i64, shape); + auto A = make_shared(element::i64, shape); + auto B = make_shared(element::i64, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i64, shape); + auto a = backend->create_tensor(element::i64, shape); copy_data(a, vector{1, 8, -8, 17, -5, 67635216, 2, 17179887632}); - auto b = backend->create_tensor(element::Type_t::i64, shape); + auto b = backend->create_tensor(element::i64, shape); copy_data(b, vector{1, 2, 4, 8, 0, 18448, 1, 280592}); - auto result = backend->create_tensor(element::Type_t::i64, shape); + auto result = backend->create_tensor(element::i64, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b}); diff --git a/ngraph/test/backend/minimum.in.cpp b/ngraph/test/backend/minimum.in.cpp index 1491c11be9d0b6..6e323835c9bb95 100644 --- a/ngraph/test/backend/minimum.in.cpp +++ b/ngraph/test/backend/minimum.in.cpp @@ -46,8 +46,8 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, minimum) { Shape shape{2, 2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); std::vector a{1, 8, -8, 17, -0.5, 0.5, 2, 1}; @@ -62,8 +62,8 @@ NGRAPH_TEST(${BACKEND_NAME}, minimum) NGRAPH_TEST(${BACKEND_NAME}, minimum_int32) { Shape shape{2, 2, 2}; - auto A = make_shared(element::Type_t::i32, shape); - auto B = make_shared(element::Type_t::i32, shape); + auto A = make_shared(element::i32, shape); + auto B = make_shared(element::i32, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); std::vector a{1, 8, -8, 17, -5, 67635216, 2, 1}; @@ -78,8 +78,8 @@ NGRAPH_TEST(${BACKEND_NAME}, minimum_int32) NGRAPH_TEST(${BACKEND_NAME}, minimum_int64) { Shape shape{2, 2, 2}; - auto A = make_shared(element::Type_t::i64, shape); - auto B = make_shared(element::Type_t::i64, shape); + auto A = make_shared(element::i64, shape); + auto B = make_shared(element::i64, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); std::vector a{1, 8, -8, 17, -5, 67635216, 2, 17179887632}; diff --git a/ngraph/test/backend/multiple_backends.in.cpp b/ngraph/test/backend/multiple_backends.in.cpp index ff4d99575b2ad2..9236e76d55af9b 100644 --- a/ngraph/test/backend/multiple_backends.in.cpp +++ b/ngraph/test/backend/multiple_backends.in.cpp @@ -33,13 +33,13 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, multiple_backends) { Shape shape{2, 2}; - auto A1 = make_shared(element::Type_t::f32, shape); - auto B1 = make_shared(element::Type_t::f32, shape); + auto A1 = make_shared(element::f32, shape); + auto B1 = make_shared(element::f32, shape); auto add = std::make_shared(A1, B1); auto f = make_shared(add, ParameterVector{A1, B1}); - auto A2 = make_shared(element::Type_t::f32, shape); - auto B2 = make_shared(element::Type_t::f32, shape); + auto A2 = make_shared(element::f32, shape); + auto B2 = make_shared(element::f32, shape); auto multiply = std::make_shared(A2, B2); auto g = make_shared(multiply, ParameterVector{A2, B2}); @@ -48,13 +48,13 @@ NGRAPH_TEST(${BACKEND_NAME}, multiple_backends) auto backend2 = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - shared_ptr a1 = backend1->create_tensor(element::Type_t::f32, shape); - shared_ptr b1 = backend1->create_tensor(element::Type_t::f32, shape); - shared_ptr result1 = backend1->create_tensor(element::Type_t::f32, shape); + shared_ptr a1 = backend1->create_tensor(element::f32, shape); + shared_ptr b1 = backend1->create_tensor(element::f32, shape); + shared_ptr result1 = backend1->create_tensor(element::f32, shape); - shared_ptr a2 = backend2->create_tensor(element::Type_t::f32, shape); - shared_ptr b2 = backend2->create_tensor(element::Type_t::f32, shape); - shared_ptr result2 = backend2->create_tensor(element::Type_t::f32, shape); + shared_ptr a2 = backend2->create_tensor(element::f32, shape); + shared_ptr b2 = backend2->create_tensor(element::f32, shape); + shared_ptr result2 = backend2->create_tensor(element::f32, shape); copy_data(a1, test::NDArray({{1, 2}, {3, 4}}).get_vector()); copy_data(b1, test::NDArray({{5, 6}, {7, 8}}).get_vector()); diff --git a/ngraph/test/backend/multiple_result.in.cpp b/ngraph/test/backend/multiple_result.in.cpp index 8764aa27ad9ccd..0a3920655c5ad4 100644 --- a/ngraph/test/backend/multiple_result.in.cpp +++ b/ngraph/test/backend/multiple_result.in.cpp @@ -34,9 +34,9 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, multiple_result) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); - auto C = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); + auto C = make_shared(element::f32, shape); auto A_add_B = make_shared(A, B); auto A_add_B_mul_C = make_shared(A_add_B, C); @@ -44,15 +44,15 @@ NGRAPH_TEST(${BACKEND_NAME}, multiple_result) auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 2, 3, 4}); - auto b = backend->create_tensor(element::Type_t::f32, shape); + auto b = backend->create_tensor(element::f32, shape); copy_data(b, vector{5, 6, 7, 8}); - auto c = backend->create_tensor(element::Type_t::f32, shape); + auto c = backend->create_tensor(element::f32, shape); copy_data(c, vector{9, 10, 11, 12}); - auto r0 = backend->create_tensor(element::Type_t::f32, shape); - auto r1 = backend->create_tensor(element::Type_t::f32, shape); + auto r0 = backend->create_tensor(element::f32, shape); + auto r1 = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({r0, r1}, {a, b, c}); diff --git a/ngraph/test/backend/multiply.in.cpp b/ngraph/test/backend/multiply.in.cpp index 7282508a190781..95da6bb2fc98ae 100644 --- a/ngraph/test/backend/multiply.in.cpp +++ b/ngraph/test/backend/multiply.in.cpp @@ -48,8 +48,8 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, multiply) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); std::vector a{1, 2, 3, 4}; @@ -64,8 +64,8 @@ NGRAPH_TEST(${BACKEND_NAME}, multiply) NGRAPH_TEST(${BACKEND_NAME}, multiply_overload) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); std::vector a{1, 2, 3, 4}; diff --git a/ngraph/test/backend/negative.in.cpp b/ngraph/test/backend/negative.in.cpp index d3b45010644623..791461caacf15a 100644 --- a/ngraph/test/backend/negative.in.cpp +++ b/ngraph/test/backend/negative.in.cpp @@ -46,7 +46,7 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, negative) { Shape shape{2, 3}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared(make_shared(A), ParameterVector{A}); std::vector a{1, -2, 0, -4.75f, 8.75f, -8.75f}; @@ -60,7 +60,7 @@ NGRAPH_TEST(${BACKEND_NAME}, negative) NGRAPH_TEST(${BACKEND_NAME}, negative_i32) { auto shape_a = Shape{2, 5}; - auto A = make_shared(element::Type_t::i32, shape_a); + auto A = make_shared(element::i32, shape_a); auto relu = make_shared(A); auto shape_rt = Shape{2, 5}; auto f = make_shared(relu, ParameterVector{A}); @@ -76,7 +76,7 @@ NGRAPH_TEST(${BACKEND_NAME}, negative_i32) NGRAPH_TEST(${BACKEND_NAME}, negative_f32) { auto shape_a = Shape{2, 5}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); auto relu = make_shared(A); auto shape_rt = Shape{2, 5}; auto f = make_shared(relu, ParameterVector{A}); diff --git a/ngraph/test/backend/node_name.in.cpp b/ngraph/test/backend/node_name.in.cpp index 16056f6844a435..074c2aead0853f 100644 --- a/ngraph/test/backend/node_name.in.cpp +++ b/ngraph/test/backend/node_name.in.cpp @@ -31,8 +31,8 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, node_name) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto C = std::make_shared(A, B); C->set_friendly_name("a node name"); auto f = make_shared(C, ParameterVector{A, B}); @@ -40,9 +40,9 @@ NGRAPH_TEST(${BACKEND_NAME}, node_name) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - shared_ptr a = backend->create_tensor(element::Type_t::f32, shape); - shared_ptr b = backend->create_tensor(element::Type_t::f32, shape); - shared_ptr result = backend->create_tensor(element::Type_t::f32, shape); + shared_ptr a = backend->create_tensor(element::f32, shape); + shared_ptr b = backend->create_tensor(element::f32, shape); + shared_ptr result = backend->create_tensor(element::f32, shape); copy_data(a, test::NDArray({{1, 2}, {3, 4}}).get_vector()); copy_data(b, test::NDArray({{5, 6}, {7, 8}}).get_vector()); diff --git a/ngraph/test/backend/non_max_suppression.in.cpp b/ngraph/test/backend/non_max_suppression.in.cpp index cd7220e911aa3f..e258d272e41dcd 100644 --- a/ngraph/test/backend/non_max_suppression.in.cpp +++ b/ngraph/test/backend/non_max_suppression.in.cpp @@ -57,15 +57,14 @@ NGRAPH_TEST(${BACKEND_NAME}, nonmaxsuppression_center_point_box_format) const auto boxes_shape = Shape{1, 6, 4}; const auto scores_shape = Shape{1, 1, 6}; - const auto boxes = make_shared(element::Type_t::f32, boxes_shape); - const auto scores = make_shared(element::Type_t::f32, scores_shape); - auto max_output_boxes_per_class = op::Constant::create( - element::Type_t::i64, Shape{}, {max_output_boxes_per_class_data}); - auto iou_threshold = - op::Constant::create(element::Type_t::f32, Shape{}, {iou_threshold_data}); + const auto boxes = make_shared(element::f32, boxes_shape); + const auto scores = make_shared(element::f32, scores_shape); + auto max_output_boxes_per_class = + op::Constant::create(element::i64, Shape{}, {max_output_boxes_per_class_data}); + auto iou_threshold = op::Constant::create(element::f32, Shape{}, {iou_threshold_data}); auto score_threshold = - op::Constant::create(element::Type_t::f32, Shape{}, {score_threshold_data}); - auto soft_nms_sigma = op::Constant::create(element::Type_t::f32, Shape{}, {0.0f}); + op::Constant::create(element::f32, Shape{}, {score_threshold_data}); + auto soft_nms_sigma = op::Constant::create(element::f32, Shape{}, {0.0f}); auto nms = make_shared(boxes, scores, max_output_boxes_per_class, @@ -79,12 +78,12 @@ NGRAPH_TEST(${BACKEND_NAME}, nonmaxsuppression_center_point_box_format) auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto selected_indeces = backend->create_tensor(element::Type_t::i64, Shape{3, 3}); - auto selected_scores = backend->create_tensor(element::Type_t::f32, Shape{3, 3}); - auto valid_outputs = backend->create_tensor(element::Type_t::i64, Shape{1}); + auto selected_indeces = backend->create_tensor(element::i64, Shape{3, 3}); + auto selected_scores = backend->create_tensor(element::f32, Shape{3, 3}); + auto valid_outputs = backend->create_tensor(element::i64, Shape{1}); - auto backend_boxes = backend->create_tensor(element::Type_t::f32, boxes_shape); - auto backend_scores = backend->create_tensor(element::Type_t::f32, scores_shape); + auto backend_boxes = backend->create_tensor(element::f32, boxes_shape); + auto backend_scores = backend->create_tensor(element::f32, scores_shape); copy_data(backend_boxes, boxes_data); copy_data(backend_scores, scores_data); @@ -121,15 +120,14 @@ NGRAPH_TEST(${BACKEND_NAME}, nonmaxsuppression_flipped_coordinates) const auto boxes_shape = Shape{1, 6, 4}; const auto scores_shape = Shape{1, 1, 6}; - const auto boxes = make_shared(element::Type_t::f32, boxes_shape); - const auto scores = make_shared(element::Type_t::f32, scores_shape); - auto max_output_boxes_per_class = op::Constant::create( - element::Type_t::i64, Shape{}, {max_output_boxes_per_class_data}); - auto iou_threshold = - op::Constant::create(element::Type_t::f32, Shape{}, {iou_threshold_data}); + const auto boxes = make_shared(element::f32, boxes_shape); + const auto scores = make_shared(element::f32, scores_shape); + auto max_output_boxes_per_class = + op::Constant::create(element::i64, Shape{}, {max_output_boxes_per_class_data}); + auto iou_threshold = op::Constant::create(element::f32, Shape{}, {iou_threshold_data}); auto score_threshold = - op::Constant::create(element::Type_t::f32, Shape{}, {score_threshold_data}); - auto soft_nms_sigma = op::Constant::create(element::Type_t::f32, Shape{}, {0.0f}); + op::Constant::create(element::f32, Shape{}, {score_threshold_data}); + auto soft_nms_sigma = op::Constant::create(element::f32, Shape{}, {0.0f}); auto nms = make_shared(boxes, scores, max_output_boxes_per_class, @@ -143,12 +141,12 @@ NGRAPH_TEST(${BACKEND_NAME}, nonmaxsuppression_flipped_coordinates) auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto selected_indeces = backend->create_tensor(element::Type_t::i64, Shape{3, 3}); - auto selected_scores = backend->create_tensor(element::Type_t::f32, Shape{3, 3}); - auto valid_outputs = backend->create_tensor(element::Type_t::i64, Shape{1}); + auto selected_indeces = backend->create_tensor(element::i64, Shape{3, 3}); + auto selected_scores = backend->create_tensor(element::f32, Shape{3, 3}); + auto valid_outputs = backend->create_tensor(element::i64, Shape{1}); - auto backend_boxes = backend->create_tensor(element::Type_t::f32, boxes_shape); - auto backend_scores = backend->create_tensor(element::Type_t::f32, scores_shape); + auto backend_boxes = backend->create_tensor(element::f32, boxes_shape); + auto backend_scores = backend->create_tensor(element::f32, scores_shape); copy_data(backend_boxes, boxes_data); copy_data(backend_scores, scores_data); @@ -186,15 +184,14 @@ NGRAPH_TEST(${BACKEND_NAME}, nonmaxsuppression_identical_boxes) const auto boxes_shape = Shape{1, 10, 4}; const auto scores_shape = Shape{1, 1, 10}; - const auto boxes = make_shared(element::Type_t::f32, boxes_shape); - const auto scores = make_shared(element::Type_t::f32, scores_shape); - auto max_output_boxes_per_class = op::Constant::create( - element::Type_t::i64, Shape{}, {max_output_boxes_per_class_data}); - auto iou_threshold = - op::Constant::create(element::Type_t::f32, Shape{}, {iou_threshold_data}); + const auto boxes = make_shared(element::f32, boxes_shape); + const auto scores = make_shared(element::f32, scores_shape); + auto max_output_boxes_per_class = + op::Constant::create(element::i64, Shape{}, {max_output_boxes_per_class_data}); + auto iou_threshold = op::Constant::create(element::f32, Shape{}, {iou_threshold_data}); auto score_threshold = - op::Constant::create(element::Type_t::f32, Shape{}, {score_threshold_data}); - auto soft_nms_sigma = op::Constant::create(element::Type_t::f32, Shape{}, {0.0f}); + op::Constant::create(element::f32, Shape{}, {score_threshold_data}); + auto soft_nms_sigma = op::Constant::create(element::f32, Shape{}, {0.0f}); auto nms = make_shared(boxes, scores, max_output_boxes_per_class, @@ -208,12 +205,12 @@ NGRAPH_TEST(${BACKEND_NAME}, nonmaxsuppression_identical_boxes) auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto selected_indeces = backend->create_tensor(element::Type_t::i64, Shape{1, 3}); - auto selected_scores = backend->create_tensor(element::Type_t::f32, Shape{1, 3}); - auto valid_outputs = backend->create_tensor(element::Type_t::i64, Shape{1}); + auto selected_indeces = backend->create_tensor(element::i64, Shape{1, 3}); + auto selected_scores = backend->create_tensor(element::f32, Shape{1, 3}); + auto valid_outputs = backend->create_tensor(element::i64, Shape{1}); - auto backend_boxes = backend->create_tensor(element::Type_t::f32, boxes_shape); - auto backend_scores = backend->create_tensor(element::Type_t::f32, scores_shape); + auto backend_boxes = backend->create_tensor(element::f32, boxes_shape); + auto backend_scores = backend->create_tensor(element::f32, scores_shape); copy_data(backend_boxes, boxes_data); copy_data(backend_scores, scores_data); @@ -250,15 +247,14 @@ NGRAPH_TEST(${BACKEND_NAME}, nonmaxsuppression_limit_output_size) const auto boxes_shape = Shape{1, 6, 4}; const auto scores_shape = Shape{1, 1, 6}; - const auto boxes = make_shared(element::Type_t::f32, boxes_shape); - const auto scores = make_shared(element::Type_t::f32, scores_shape); - auto max_output_boxes_per_class = op::Constant::create( - element::Type_t::i64, Shape{}, {max_output_boxes_per_class_data}); - auto iou_threshold = - op::Constant::create(element::Type_t::f32, Shape{}, {iou_threshold_data}); + const auto boxes = make_shared(element::f32, boxes_shape); + const auto scores = make_shared(element::f32, scores_shape); + auto max_output_boxes_per_class = + op::Constant::create(element::i64, Shape{}, {max_output_boxes_per_class_data}); + auto iou_threshold = op::Constant::create(element::f32, Shape{}, {iou_threshold_data}); auto score_threshold = - op::Constant::create(element::Type_t::f32, Shape{}, {score_threshold_data}); - auto soft_nms_sigma = op::Constant::create(element::Type_t::f32, Shape{}, {0.0f}); + op::Constant::create(element::f32, Shape{}, {score_threshold_data}); + auto soft_nms_sigma = op::Constant::create(element::f32, Shape{}, {0.0f}); auto nms = make_shared(boxes, scores, max_output_boxes_per_class, @@ -272,12 +268,12 @@ NGRAPH_TEST(${BACKEND_NAME}, nonmaxsuppression_limit_output_size) auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto selected_indeces = backend->create_tensor(element::Type_t::i64, Shape{2, 3}); - auto selected_scores = backend->create_tensor(element::Type_t::f32, Shape{2, 3}); - auto valid_outputs = backend->create_tensor(element::Type_t::i64, Shape{1}); + auto selected_indeces = backend->create_tensor(element::i64, Shape{2, 3}); + auto selected_scores = backend->create_tensor(element::f32, Shape{2, 3}); + auto valid_outputs = backend->create_tensor(element::i64, Shape{1}); - auto backend_boxes = backend->create_tensor(element::Type_t::f32, boxes_shape); - auto backend_scores = backend->create_tensor(element::Type_t::f32, scores_shape); + auto backend_boxes = backend->create_tensor(element::f32, boxes_shape); + auto backend_scores = backend->create_tensor(element::f32, scores_shape); copy_data(backend_boxes, boxes_data); copy_data(backend_scores, scores_data); @@ -312,15 +308,14 @@ NGRAPH_TEST(${BACKEND_NAME}, nonmaxsuppression_single_box) const auto boxes_shape = Shape{1, 1, 4}; const auto scores_shape = Shape{1, 1, 1}; - const auto boxes = make_shared(element::Type_t::f32, boxes_shape); - const auto scores = make_shared(element::Type_t::f32, scores_shape); - auto max_output_boxes_per_class = op::Constant::create( - element::Type_t::i64, Shape{}, {max_output_boxes_per_class_data}); - auto iou_threshold = - op::Constant::create(element::Type_t::f32, Shape{}, {iou_threshold_data}); + const auto boxes = make_shared(element::f32, boxes_shape); + const auto scores = make_shared(element::f32, scores_shape); + auto max_output_boxes_per_class = + op::Constant::create(element::i64, Shape{}, {max_output_boxes_per_class_data}); + auto iou_threshold = op::Constant::create(element::f32, Shape{}, {iou_threshold_data}); auto score_threshold = - op::Constant::create(element::Type_t::f32, Shape{}, {score_threshold_data}); - auto soft_nms_sigma = op::Constant::create(element::Type_t::f32, Shape{}, {0.0f}); + op::Constant::create(element::f32, Shape{}, {score_threshold_data}); + auto soft_nms_sigma = op::Constant::create(element::f32, Shape{}, {0.0f}); auto nms = make_shared(boxes, scores, max_output_boxes_per_class, @@ -334,12 +329,12 @@ NGRAPH_TEST(${BACKEND_NAME}, nonmaxsuppression_single_box) auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto selected_indeces = backend->create_tensor(element::Type_t::i64, Shape{1, 3}); - auto selected_scores = backend->create_tensor(element::Type_t::f32, Shape{1, 3}); - auto valid_outputs = backend->create_tensor(element::Type_t::i64, Shape{1}); + auto selected_indeces = backend->create_tensor(element::i64, Shape{1, 3}); + auto selected_scores = backend->create_tensor(element::f32, Shape{1, 3}); + auto valid_outputs = backend->create_tensor(element::i64, Shape{1}); - auto backend_boxes = backend->create_tensor(element::Type_t::f32, boxes_shape); - auto backend_scores = backend->create_tensor(element::Type_t::f32, scores_shape); + auto backend_boxes = backend->create_tensor(element::f32, boxes_shape); + auto backend_scores = backend->create_tensor(element::f32, scores_shape); copy_data(backend_boxes, boxes_data); copy_data(backend_scores, scores_data); @@ -376,15 +371,14 @@ NGRAPH_TEST(${BACKEND_NAME}, nonmaxsuppression_suppress_by_IOU) const auto boxes_shape = Shape{1, 6, 4}; const auto scores_shape = Shape{1, 1, 6}; - const auto boxes = make_shared(element::Type_t::f32, boxes_shape); - const auto scores = make_shared(element::Type_t::f32, scores_shape); - auto max_output_boxes_per_class = op::Constant::create( - element::Type_t::i64, Shape{}, {max_output_boxes_per_class_data}); - auto iou_threshold = - op::Constant::create(element::Type_t::f32, Shape{}, {iou_threshold_data}); + const auto boxes = make_shared(element::f32, boxes_shape); + const auto scores = make_shared(element::f32, scores_shape); + auto max_output_boxes_per_class = + op::Constant::create(element::i64, Shape{}, {max_output_boxes_per_class_data}); + auto iou_threshold = op::Constant::create(element::f32, Shape{}, {iou_threshold_data}); auto score_threshold = - op::Constant::create(element::Type_t::f32, Shape{}, {score_threshold_data}); - auto soft_nms_sigma = op::Constant::create(element::Type_t::f32, Shape{}, {0.0f}); + op::Constant::create(element::f32, Shape{}, {score_threshold_data}); + auto soft_nms_sigma = op::Constant::create(element::f32, Shape{}, {0.0f}); auto nms = make_shared(boxes, scores, max_output_boxes_per_class, @@ -398,12 +392,12 @@ NGRAPH_TEST(${BACKEND_NAME}, nonmaxsuppression_suppress_by_IOU) auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto selected_indeces = backend->create_tensor(element::Type_t::i64, Shape{3, 3}); - auto selected_scores = backend->create_tensor(element::Type_t::f32, Shape{3, 3}); - auto valid_outputs = backend->create_tensor(element::Type_t::i64, Shape{1}); + auto selected_indeces = backend->create_tensor(element::i64, Shape{3, 3}); + auto selected_scores = backend->create_tensor(element::f32, Shape{3, 3}); + auto valid_outputs = backend->create_tensor(element::i64, Shape{1}); - auto backend_boxes = backend->create_tensor(element::Type_t::f32, boxes_shape); - auto backend_scores = backend->create_tensor(element::Type_t::f32, scores_shape); + auto backend_boxes = backend->create_tensor(element::f32, boxes_shape); + auto backend_scores = backend->create_tensor(element::f32, scores_shape); copy_data(backend_boxes, boxes_data); copy_data(backend_scores, scores_data); @@ -440,15 +434,14 @@ NGRAPH_TEST(${BACKEND_NAME}, nonmaxsuppression_suppress_by_IOU_and_scores) const auto boxes_shape = Shape{1, 6, 4}; const auto scores_shape = Shape{1, 1, 6}; - const auto boxes = make_shared(element::Type_t::f32, boxes_shape); - const auto scores = make_shared(element::Type_t::f32, scores_shape); - auto max_output_boxes_per_class = op::Constant::create( - element::Type_t::i64, Shape{}, {max_output_boxes_per_class_data}); - auto iou_threshold = - op::Constant::create(element::Type_t::f32, Shape{}, {iou_threshold_data}); + const auto boxes = make_shared(element::f32, boxes_shape); + const auto scores = make_shared(element::f32, scores_shape); + auto max_output_boxes_per_class = + op::Constant::create(element::i64, Shape{}, {max_output_boxes_per_class_data}); + auto iou_threshold = op::Constant::create(element::f32, Shape{}, {iou_threshold_data}); auto score_threshold = - op::Constant::create(element::Type_t::f32, Shape{}, {score_threshold_data}); - auto soft_nms_sigma = op::Constant::create(element::Type_t::f32, Shape{}, {0.0f}); + op::Constant::create(element::f32, Shape{}, {score_threshold_data}); + auto soft_nms_sigma = op::Constant::create(element::f32, Shape{}, {0.0f}); auto nms = make_shared(boxes, scores, max_output_boxes_per_class, @@ -462,12 +455,12 @@ NGRAPH_TEST(${BACKEND_NAME}, nonmaxsuppression_suppress_by_IOU_and_scores) auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto selected_indeces = backend->create_tensor(element::Type_t::i64, Shape{2, 3}); - auto selected_scores = backend->create_tensor(element::Type_t::f32, Shape{2, 3}); - auto valid_outputs = backend->create_tensor(element::Type_t::i64, Shape{1}); + auto selected_indeces = backend->create_tensor(element::i64, Shape{2, 3}); + auto selected_scores = backend->create_tensor(element::f32, Shape{2, 3}); + auto valid_outputs = backend->create_tensor(element::i64, Shape{1}); - auto backend_boxes = backend->create_tensor(element::Type_t::f32, boxes_shape); - auto backend_scores = backend->create_tensor(element::Type_t::f32, scores_shape); + auto backend_boxes = backend->create_tensor(element::f32, boxes_shape); + auto backend_scores = backend->create_tensor(element::f32, scores_shape); copy_data(backend_boxes, boxes_data); copy_data(backend_scores, scores_data); @@ -506,15 +499,14 @@ NGRAPH_TEST(${BACKEND_NAME}, nonmaxsuppression_two_batches) const auto boxes_shape = Shape{2, 6, 4}; const auto scores_shape = Shape{2, 1, 6}; - const auto boxes = make_shared(element::Type_t::f32, boxes_shape); - const auto scores = make_shared(element::Type_t::f32, scores_shape); - auto max_output_boxes_per_class = op::Constant::create( - element::Type_t::i64, Shape{}, {max_output_boxes_per_class_data}); - auto iou_threshold = - op::Constant::create(element::Type_t::f32, Shape{}, {iou_threshold_data}); + const auto boxes = make_shared(element::f32, boxes_shape); + const auto scores = make_shared(element::f32, scores_shape); + auto max_output_boxes_per_class = + op::Constant::create(element::i64, Shape{}, {max_output_boxes_per_class_data}); + auto iou_threshold = op::Constant::create(element::f32, Shape{}, {iou_threshold_data}); auto score_threshold = - op::Constant::create(element::Type_t::f32, Shape{}, {score_threshold_data}); - auto soft_nms_sigma = op::Constant::create(element::Type_t::f32, Shape{}, {0.0f}); + op::Constant::create(element::f32, Shape{}, {score_threshold_data}); + auto soft_nms_sigma = op::Constant::create(element::f32, Shape{}, {0.0f}); auto nms = make_shared(boxes, scores, max_output_boxes_per_class, @@ -528,12 +520,12 @@ NGRAPH_TEST(${BACKEND_NAME}, nonmaxsuppression_two_batches) auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto selected_indeces = backend->create_tensor(element::Type_t::i64, Shape{4, 3}); - auto selected_scores = backend->create_tensor(element::Type_t::f32, Shape{4, 3}); - auto valid_outputs = backend->create_tensor(element::Type_t::i64, Shape{1}); + auto selected_indeces = backend->create_tensor(element::i64, Shape{4, 3}); + auto selected_scores = backend->create_tensor(element::f32, Shape{4, 3}); + auto valid_outputs = backend->create_tensor(element::i64, Shape{1}); - auto backend_boxes = backend->create_tensor(element::Type_t::f32, boxes_shape); - auto backend_scores = backend->create_tensor(element::Type_t::f32, scores_shape); + auto backend_boxes = backend->create_tensor(element::f32, boxes_shape); + auto backend_scores = backend->create_tensor(element::f32, scores_shape); copy_data(backend_boxes, boxes_data); copy_data(backend_scores, scores_data); @@ -572,15 +564,14 @@ NGRAPH_TEST(${BACKEND_NAME}, nonmaxsuppression_two_classes) const auto boxes_shape = Shape{1, 6, 4}; const auto scores_shape = Shape{1, 2, 6}; - const auto boxes = make_shared(element::Type_t::f32, boxes_shape); - const auto scores = make_shared(element::Type_t::f32, scores_shape); - auto max_output_boxes_per_class = op::Constant::create( - element::Type_t::i64, Shape{}, {max_output_boxes_per_class_data}); - auto iou_threshold = - op::Constant::create(element::Type_t::f32, Shape{}, {iou_threshold_data}); + const auto boxes = make_shared(element::f32, boxes_shape); + const auto scores = make_shared(element::f32, scores_shape); + auto max_output_boxes_per_class = + op::Constant::create(element::i64, Shape{}, {max_output_boxes_per_class_data}); + auto iou_threshold = op::Constant::create(element::f32, Shape{}, {iou_threshold_data}); auto score_threshold = - op::Constant::create(element::Type_t::f32, Shape{}, {score_threshold_data}); - auto soft_nms_sigma = op::Constant::create(element::Type_t::f32, Shape{}, {0.0f}); + op::Constant::create(element::f32, Shape{}, {score_threshold_data}); + auto soft_nms_sigma = op::Constant::create(element::f32, Shape{}, {0.0f}); auto nms = make_shared(boxes, scores, max_output_boxes_per_class, @@ -594,12 +585,12 @@ NGRAPH_TEST(${BACKEND_NAME}, nonmaxsuppression_two_classes) auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto selected_indeces = backend->create_tensor(element::Type_t::i64, Shape{4, 3}); - auto selected_scores = backend->create_tensor(element::Type_t::f32, Shape{4, 3}); - auto valid_outputs = backend->create_tensor(element::Type_t::i64, Shape{1}); + auto selected_indeces = backend->create_tensor(element::i64, Shape{4, 3}); + auto selected_scores = backend->create_tensor(element::f32, Shape{4, 3}); + auto valid_outputs = backend->create_tensor(element::i64, Shape{1}); - auto backend_boxes = backend->create_tensor(element::Type_t::f32, boxes_shape); - auto backend_scores = backend->create_tensor(element::Type_t::f32, scores_shape); + auto backend_boxes = backend->create_tensor(element::f32, boxes_shape); + auto backend_scores = backend->create_tensor(element::f32, scores_shape); copy_data(backend_boxes, boxes_data); copy_data(backend_scores, scores_data); diff --git a/ngraph/test/backend/non_zero.in.cpp b/ngraph/test/backend/non_zero.in.cpp index f74c0e8dae126f..774513f61967a7 100644 --- a/ngraph/test/backend/non_zero.in.cpp +++ b/ngraph/test/backend/non_zero.in.cpp @@ -29,14 +29,14 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, non_zero) { PartialShape p_shape = PartialShape::dynamic(); - auto p = make_shared(element::Type_t::f32, p_shape); - auto non_zero = make_shared(p, element::Type_t::i32); + auto p = make_shared(element::f32, p_shape); + auto non_zero = make_shared(p, element::i32); auto fun = make_shared(OutputVector{non_zero}, ParameterVector{p}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); auto cfun = backend->compile(fun); - auto input = backend->create_tensor(element::Type_t::f32, Shape{3, 2}); + auto input = backend->create_tensor(element::f32, Shape{3, 2}); copy_data(input, vector{0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 3.0f}); std::vector expected_result{2, 2, 0, 1}; @@ -45,7 +45,7 @@ NGRAPH_TEST(${BACKEND_NAME}, non_zero) auto result = make_shared(); cfun->call_with_validate({result}, {input}); - EXPECT_EQ(result->get_element_type(), element::Type_t::i32); + EXPECT_EQ(result->get_element_type(), element::i32); EXPECT_EQ(result->get_shape(), expected_output_shape); auto result_data = read_vector(result); ASSERT_EQ(result_data, expected_result); @@ -54,8 +54,8 @@ NGRAPH_TEST(${BACKEND_NAME}, non_zero) NGRAPH_TEST(${BACKEND_NAME}, non_zero_all_1s) { PartialShape p_shape = PartialShape::dynamic(); - auto p = make_shared(element::Type_t::i32, p_shape); - auto non_zero = make_shared(p, element::Type_t::i64); + auto p = make_shared(element::i32, p_shape); + auto non_zero = make_shared(p, element::i64); auto fun = make_shared(OutputVector{non_zero}, ParameterVector{p}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); @@ -63,7 +63,7 @@ NGRAPH_TEST(${BACKEND_NAME}, non_zero_all_1s) Shape input_shape{3, 2}; vector input_data(shape_size(input_shape), 1); - auto input = backend->create_tensor(element::Type_t::i32, input_shape); + auto input = backend->create_tensor(element::i32, input_shape); copy_data(input, input_data); std::vector expected_result{0, 0, 1, 1, 2, 2, 0, 1, 0, 1, 0, 1}; @@ -72,7 +72,7 @@ NGRAPH_TEST(${BACKEND_NAME}, non_zero_all_1s) auto result = make_shared(); cfun->call_with_validate({result}, {input}); - EXPECT_EQ(result->get_element_type(), element::Type_t::i64); + EXPECT_EQ(result->get_element_type(), element::i64); EXPECT_EQ(result->get_shape(), expected_output_shape); auto result_data = read_vector(result); ASSERT_EQ(result_data, expected_result); @@ -81,8 +81,8 @@ NGRAPH_TEST(${BACKEND_NAME}, non_zero_all_1s) NGRAPH_TEST(${BACKEND_NAME}, non_zero_all_0s) { PartialShape p_shape = PartialShape::dynamic(); - auto p = make_shared(element::Type_t::i32, p_shape); - auto non_zero = make_shared(p, element::Type_t::i64); + auto p = make_shared(element::i32, p_shape); + auto non_zero = make_shared(p, element::i64); auto fun = make_shared(OutputVector{non_zero}, ParameterVector{p}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); @@ -90,7 +90,7 @@ NGRAPH_TEST(${BACKEND_NAME}, non_zero_all_0s) Shape input_shape{3, 2}; vector input_data(shape_size(input_shape), 0); - auto input = backend->create_tensor(element::Type_t::i32, input_shape); + auto input = backend->create_tensor(element::i32, input_shape); copy_data(input, input_data); Shape expected_output_shape{input_shape.size(), 0}; @@ -98,7 +98,7 @@ NGRAPH_TEST(${BACKEND_NAME}, non_zero_all_0s) auto result = make_shared(); cfun->call_with_validate({result}, {input}); - EXPECT_EQ(result->get_element_type(), element::Type_t::i64); + EXPECT_EQ(result->get_element_type(), element::i64); EXPECT_EQ(result->get_shape(), expected_output_shape); auto result_data = read_vector(result); ASSERT_EQ(result_data.data(), nullptr); diff --git a/ngraph/test/backend/normalize_l2.in.cpp b/ngraph/test/backend/normalize_l2.in.cpp index 4d15baf8e969ca..77e0415e632fe7 100644 --- a/ngraph/test/backend/normalize_l2.in.cpp +++ b/ngraph/test/backend/normalize_l2.in.cpp @@ -41,8 +41,8 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, normalize_l2_all_mode_add) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto axes = make_shared(element::Type_t::i64, Shape{2}, vector{0, 1}); + auto A = make_shared(element::f32, shape); + auto axes = make_shared(element::i64, Shape{2}, vector{0, 1}); float eps = 1e-7; auto f = make_shared( make_shared(A, axes, eps, ngraph::op::EpsMode::ADD), @@ -51,9 +51,9 @@ NGRAPH_TEST(${BACKEND_NAME}, normalize_l2_all_mode_add) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 2, 3, 4}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -64,8 +64,8 @@ NGRAPH_TEST(${BACKEND_NAME}, normalize_l2_all_mode_add) NGRAPH_TEST(${BACKEND_NAME}, normalize_l2_none_mode_add) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto axes = make_shared(element::Type_t::i64, Shape{0}, vector{}); + auto A = make_shared(element::f32, shape); + auto axes = make_shared(element::i64, Shape{0}, vector{}); float eps = 1e-7; auto f = make_shared( make_shared(A, axes, eps, ngraph::op::EpsMode::ADD), @@ -74,9 +74,9 @@ NGRAPH_TEST(${BACKEND_NAME}, normalize_l2_none_mode_add) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 2, 3, 4}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -87,8 +87,8 @@ NGRAPH_TEST(${BACKEND_NAME}, normalize_l2_none_mode_add) NGRAPH_TEST(${BACKEND_NAME}, normalize_l2_zero_mode_add) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto axes = make_shared(element::Type_t::i64, Shape{}, vector{0}); + auto A = make_shared(element::f32, shape); + auto axes = make_shared(element::i64, Shape{}, vector{0}); float eps = 1e-7; auto f = make_shared( make_shared(A, axes, eps, ngraph::op::EpsMode::ADD), @@ -97,9 +97,9 @@ NGRAPH_TEST(${BACKEND_NAME}, normalize_l2_zero_mode_add) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 2, 3, 4}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -110,8 +110,8 @@ NGRAPH_TEST(${BACKEND_NAME}, normalize_l2_zero_mode_add) NGRAPH_TEST(${BACKEND_NAME}, normalize_l2_one_mode_add) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto axes = make_shared(element::Type_t::i64, Shape{}, vector{1}); + auto A = make_shared(element::f32, shape); + auto axes = make_shared(element::i64, Shape{}, vector{1}); float eps = 1e-7; auto f = make_shared( make_shared(A, axes, eps, ngraph::op::EpsMode::ADD), @@ -120,9 +120,9 @@ NGRAPH_TEST(${BACKEND_NAME}, normalize_l2_one_mode_add) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 2, 3, 4}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -135,8 +135,8 @@ NGRAPH_TEST(${BACKEND_NAME}, normalize_l2_one_mode_add) NGRAPH_TEST(${BACKEND_NAME}, normalize_l2_all_mode_max) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto axes = make_shared(element::Type_t::i64, Shape{2}, vector{0, 1}); + auto A = make_shared(element::f32, shape); + auto axes = make_shared(element::i64, Shape{2}, vector{0, 1}); float eps = 1e-7; auto f = make_shared( make_shared(A, axes, eps, ngraph::op::EpsMode::ADD), @@ -145,9 +145,9 @@ NGRAPH_TEST(${BACKEND_NAME}, normalize_l2_all_mode_max) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 2, 3, 4}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -158,8 +158,8 @@ NGRAPH_TEST(${BACKEND_NAME}, normalize_l2_all_mode_max) NGRAPH_TEST(${BACKEND_NAME}, normalize_l2_none_mode_max) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto axes = make_shared(element::Type_t::i64, Shape{0}, vector{}); + auto A = make_shared(element::f32, shape); + auto axes = make_shared(element::i64, Shape{0}, vector{}); float eps = 1e-7; auto f = make_shared( make_shared(A, axes, eps, ngraph::op::EpsMode::MAX), @@ -168,9 +168,9 @@ NGRAPH_TEST(${BACKEND_NAME}, normalize_l2_none_mode_max) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 2, 3, 4}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -181,8 +181,8 @@ NGRAPH_TEST(${BACKEND_NAME}, normalize_l2_none_mode_max) NGRAPH_TEST(${BACKEND_NAME}, normalize_l2_zero_mode_max) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto axes = make_shared(element::Type_t::i64, Shape{}, vector{0}); + auto A = make_shared(element::f32, shape); + auto axes = make_shared(element::i64, Shape{}, vector{0}); float eps = 1e-7; auto f = make_shared( make_shared(A, axes, eps, ngraph::op::EpsMode::MAX), @@ -191,9 +191,9 @@ NGRAPH_TEST(${BACKEND_NAME}, normalize_l2_zero_mode_max) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 2, 3, 4}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -204,8 +204,8 @@ NGRAPH_TEST(${BACKEND_NAME}, normalize_l2_zero_mode_max) NGRAPH_TEST(${BACKEND_NAME}, normalize_l2_one_mode_max) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto axes = make_shared(element::Type_t::i64, Shape{}, vector{1}); + auto A = make_shared(element::f32, shape); + auto axes = make_shared(element::i64, Shape{}, vector{1}); float eps = 1e-7; auto f = make_shared( make_shared(A, axes, eps, ngraph::op::EpsMode::MAX), @@ -214,9 +214,9 @@ NGRAPH_TEST(${BACKEND_NAME}, normalize_l2_one_mode_max) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 2, 3, 4}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); diff --git a/ngraph/test/backend/numeric.in.cpp b/ngraph/test/backend/numeric.in.cpp index 07edfdd0a97ccd..f37371797e1678 100644 --- a/ngraph/test/backend/numeric.in.cpp +++ b/ngraph/test/backend/numeric.in.cpp @@ -31,8 +31,8 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, numeric_float_nan) { Shape shape{5}; - auto A = op::Constant::create(element::Type_t::f32, shape, {-2.5f, 25.5f, 2.25f, NAN, 6.0f}); - auto B = op::Constant::create(element::Type_t::f32, shape, {10.0f, 5.0f, 2.25f, 10.0f, NAN}); + auto A = op::Constant::create(element::f32, shape, {-2.5f, 25.5f, 2.25f, NAN, 6.0f}); + auto B = op::Constant::create(element::f32, shape, {10.0f, 5.0f, 2.25f, 10.0f, NAN}); auto f = make_shared(make_shared(A, B), ParameterVector{}); auto test_case = test::TestCase(f); @@ -43,8 +43,8 @@ NGRAPH_TEST(${BACKEND_NAME}, numeric_float_nan) NGRAPH_TEST(${BACKEND_NAME}, numeric_double_nan) { Shape shape{5}; - auto A = op::Constant::create(element::Type_t::f64, shape, {-2.5f, 25.5f, 2.25f, NAN, 6.0f}); - auto B = op::Constant::create(element::Type_t::f64, shape, {10.0f, 5.0f, 2.25f, 10.0f, NAN}); + auto A = op::Constant::create(element::f64, shape, {-2.5f, 25.5f, 2.25f, NAN, 6.0f}); + auto B = op::Constant::create(element::f64, shape, {10.0f, 5.0f, 2.25f, 10.0f, NAN}); auto f = make_shared(make_shared(A, B), ParameterVector{}); auto test_case = test::TestCase(f); @@ -55,10 +55,8 @@ NGRAPH_TEST(${BACKEND_NAME}, numeric_double_nan) NGRAPH_TEST(${BACKEND_NAME}, numeric_float_inf) { Shape shape{5}; - auto A = - op::Constant::create(element::Type_t::f32, shape, {-2.5f, 25.5f, 2.25f, INFINITY, 6.0f}); - auto B = - op::Constant::create(element::Type_t::f32, shape, {10.0f, 5.0f, 2.25f, 10.0f, -INFINITY}); + auto A = op::Constant::create(element::f32, shape, {-2.5f, 25.5f, 2.25f, INFINITY, 6.0f}); + auto B = op::Constant::create(element::f32, shape, {10.0f, 5.0f, 2.25f, 10.0f, -INFINITY}); auto f = make_shared(make_shared(A, B), ParameterVector{}); auto test_case = test::TestCase(f); @@ -69,10 +67,8 @@ NGRAPH_TEST(${BACKEND_NAME}, numeric_float_inf) NGRAPH_TEST(${BACKEND_NAME}, numeric_double_inf) { Shape shape{5}; - auto A = - op::Constant::create(element::Type_t::f64, shape, {-2.5f, 25.5f, 2.25f, INFINITY, 6.0f}); - auto B = - op::Constant::create(element::Type_t::f64, shape, {10.0f, 5.0f, 2.25f, 10.0f, -INFINITY}); + auto A = op::Constant::create(element::f64, shape, {-2.5f, 25.5f, 2.25f, INFINITY, 6.0f}); + auto B = op::Constant::create(element::f64, shape, {10.0f, 5.0f, 2.25f, 10.0f, -INFINITY}); auto f = make_shared(make_shared(A, B), ParameterVector{}); auto test_case = test::TestCase(f); diff --git a/ngraph/test/backend/one_hot.in.cpp b/ngraph/test/backend/one_hot.in.cpp index 93e54b6059bde8..47192df718f117 100644 --- a/ngraph/test/backend/one_hot.in.cpp +++ b/ngraph/test/backend/one_hot.in.cpp @@ -36,12 +36,12 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, one_hot_scalar_2_in_3) { Shape shape_a{}; - auto A = make_shared(element::Type_t::i32, shape_a); + auto A = make_shared(element::i32, shape_a); int axis = 0; Shape shape_r{3}; - auto depth = op::Constant::create(element::Type_t::i32, {}, {shape_r[axis]}); - auto on_value = op::Constant::create(element::Type_t::i32, {}, {1}); - auto off_value = op::Constant::create(element::Type_t::i32, {}, {0}); + auto depth = op::Constant::create(element::i32, {}, {shape_r[axis]}); + auto on_value = op::Constant::create(element::i32, {}, {1}); + auto off_value = op::Constant::create(element::i32, {}, {0}); auto r = make_shared(A, depth, on_value, off_value, axis); auto f = make_shared(r, ParameterVector{A}); @@ -54,12 +54,12 @@ NGRAPH_TEST(${BACKEND_NAME}, one_hot_scalar_2_in_3) NGRAPH_TEST(${BACKEND_NAME}, one_hot_scalar_1_in_3) { Shape shape_a{}; - auto A = make_shared(element::Type_t::i32, shape_a); + auto A = make_shared(element::i32, shape_a); int axis = 0; Shape shape_r{3}; - auto depth = op::Constant::create(element::Type_t::i32, {}, {shape_r[axis]}); - auto on_value = op::Constant::create(element::Type_t::i32, {}, {1}); - auto off_value = op::Constant::create(element::Type_t::i32, {}, {0}); + auto depth = op::Constant::create(element::i32, {}, {shape_r[axis]}); + auto on_value = op::Constant::create(element::i32, {}, {1}); + auto off_value = op::Constant::create(element::i32, {}, {0}); auto r = make_shared(A, depth, on_value, off_value, axis); auto f = make_shared(r, ParameterVector{A}); @@ -72,12 +72,12 @@ NGRAPH_TEST(${BACKEND_NAME}, one_hot_scalar_1_in_3) NGRAPH_TEST(${BACKEND_NAME}, one_hot_scalar_0_in_3) { Shape shape_a{}; - auto A = make_shared(element::Type_t::i32, shape_a); + auto A = make_shared(element::i32, shape_a); Shape shape_r{3}; int axis = 0; - auto depth = op::Constant::create(element::Type_t::i32, {}, {shape_r[axis]}); - auto on_value = op::Constant::create(element::Type_t::i32, {}, {1}); - auto off_value = op::Constant::create(element::Type_t::i32, {}, {0}); + auto depth = op::Constant::create(element::i32, {}, {shape_r[axis]}); + auto on_value = op::Constant::create(element::i32, {}, {1}); + auto off_value = op::Constant::create(element::i32, {}, {0}); auto r = make_shared(A, depth, on_value, off_value, axis); auto f = make_shared(r, ParameterVector{A}); @@ -90,12 +90,12 @@ NGRAPH_TEST(${BACKEND_NAME}, one_hot_scalar_0_in_3) NGRAPH_TEST(${BACKEND_NAME}, one_hot_vector_0) { Shape shape_a{8}; - auto A = make_shared(element::Type_t::i32, shape_a); + auto A = make_shared(element::i32, shape_a); Shape shape_r{3, 8}; int axis = 0; - auto depth = op::Constant::create(element::Type_t::i32, {}, {shape_r[axis]}); - auto on_value = op::Constant::create(element::Type_t::i32, {}, {1}); - auto off_value = op::Constant::create(element::Type_t::i32, {}, {0}); + auto depth = op::Constant::create(element::i32, {}, {shape_r[axis]}); + auto on_value = op::Constant::create(element::i32, {}, {1}); + auto off_value = op::Constant::create(element::i32, {}, {0}); auto r = make_shared(A, depth, on_value, off_value, axis); auto f = make_shared(r, ParameterVector{A}); @@ -109,12 +109,12 @@ NGRAPH_TEST(${BACKEND_NAME}, one_hot_vector_0) NGRAPH_TEST(${BACKEND_NAME}, one_hot_vector_1) { Shape shape_a{8}; - auto A = make_shared(element::Type_t::i32, shape_a); + auto A = make_shared(element::i32, shape_a); Shape shape_r{8, 3}; int axis = 1; - auto depth = op::Constant::create(element::Type_t::i32, {}, {shape_r[axis]}); - auto on_value = op::Constant::create(element::Type_t::i32, {}, {1}); - auto off_value = op::Constant::create(element::Type_t::i32, {}, {0}); + auto depth = op::Constant::create(element::i32, {}, {shape_r[axis]}); + auto on_value = op::Constant::create(element::i32, {}, {1}); + auto off_value = op::Constant::create(element::i32, {}, {0}); auto r = make_shared(A, depth, on_value, off_value, axis); auto f = make_shared(r, ParameterVector{A}); @@ -128,12 +128,12 @@ NGRAPH_TEST(${BACKEND_NAME}, one_hot_vector_1) NGRAPH_TEST(${BACKEND_NAME}, one_hot_vector_1_barely_oob) { Shape shape_a{8}; - auto A = make_shared(element::Type_t::i32, shape_a); + auto A = make_shared(element::i32, shape_a); Shape shape_r{8, 3}; int axis = 1; - auto depth = op::Constant::create(element::Type_t::i32, {}, {shape_r[axis]}); - auto on_value = op::Constant::create(element::Type_t::i32, {}, {1}); - auto off_value = op::Constant::create(element::Type_t::i32, {}, {0}); + auto depth = op::Constant::create(element::i32, {}, {shape_r[axis]}); + auto on_value = op::Constant::create(element::i32, {}, {1}); + auto off_value = op::Constant::create(element::i32, {}, {0}); auto r = make_shared(A, depth, on_value, off_value, axis); auto f = make_shared(r, ParameterVector{A}); @@ -148,12 +148,12 @@ NGRAPH_TEST(${BACKEND_NAME}, one_hot_vector_1_barely_oob) NGRAPH_TEST(${BACKEND_NAME}, one_hot_matrix_0) { Shape shape_a{3, 3}; - auto A = make_shared(element::Type_t::i32, shape_a); + auto A = make_shared(element::i32, shape_a); Shape shape_r{3, 3, 3}; int axis = 0; - auto depth = op::Constant::create(element::Type_t::i32, {}, {shape_r[axis]}); - auto on_value = op::Constant::create(element::Type_t::i32, {}, {1}); - auto off_value = op::Constant::create(element::Type_t::i32, {}, {0}); + auto depth = op::Constant::create(element::i32, {}, {shape_r[axis]}); + auto on_value = op::Constant::create(element::i32, {}, {1}); + auto off_value = op::Constant::create(element::i32, {}, {0}); auto r = make_shared(A, depth, on_value, off_value, axis); auto f = make_shared(r, ParameterVector{A}); @@ -169,12 +169,12 @@ NGRAPH_TEST(${BACKEND_NAME}, one_hot_vector_many_categories) // Imagenet has roughly 20,000 categories constexpr uint32_t category_count = 20000; Shape shape_a{6}; - auto A = make_shared(element::Type_t::i32, shape_a); + auto A = make_shared(element::i32, shape_a); Shape shape_r{6, category_count}; int axis = 1; - auto depth = op::Constant::create(element::Type_t::i32, {}, {shape_r[axis]}); - auto on_value = op::Constant::create(element::Type_t::i32, {}, {1}); - auto off_value = op::Constant::create(element::Type_t::i32, {}, {0}); + auto depth = op::Constant::create(element::i32, {}, {shape_r[axis]}); + auto on_value = op::Constant::create(element::i32, {}, {1}); + auto off_value = op::Constant::create(element::i32, {}, {0}); auto r = make_shared(A, depth, on_value, off_value, axis); auto f = make_shared(r, ParameterVector{A}); @@ -194,24 +194,24 @@ NGRAPH_TEST(${BACKEND_NAME}, one_hot_vector_many_categories) NGRAPH_TEST(${BACKEND_NAME}, one_hot_on_off_float) { Shape shape_a{3, 3}; - auto A = make_shared(element::Type_t::i32, shape_a); + auto A = make_shared(element::i32, shape_a); Shape shape_r{3, 3, 3}; int axis = 0; - auto depth = op::Constant::create(element::Type_t::i32, {}, {shape_r[axis]}); - auto on_value = op::Constant::create(element::Type_t::f32, {}, {2.5}); - auto off_value = op::Constant::create(element::Type_t::f32, {}, {0.5}); + auto depth = op::Constant::create(element::i32, {}, {shape_r[axis]}); + auto on_value = op::Constant::create(element::f32, {}, {2.5}); + auto off_value = op::Constant::create(element::f32, {}, {0.5}); auto r = make_shared(A, depth, on_value, off_value, axis); auto f = make_shared(r, ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i32, shape_a); + auto a = backend->create_tensor(element::i32, shape_a); copy_data(a, vector{ 0, 1, 1, 2, 1, 0, 0, 2, 1, }); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); diff --git a/ngraph/test/backend/pad.in.cpp b/ngraph/test/backend/pad.in.cpp index 99bc1a77e35fa1..7ffbd97a093c00 100644 --- a/ngraph/test/backend/pad.in.cpp +++ b/ngraph/test/backend/pad.in.cpp @@ -33,11 +33,11 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, pad_exterior_1d) { const Shape data_shape{6}; - const auto data = make_shared(element::Type_t::f32, data_shape); + const auto data = make_shared(element::f32, data_shape); - const auto pads_begin = op::Constant::create(element::Type_t::i64, Shape{1}, {4}); - const auto pads_end = op::Constant::create(element::Type_t::i64, Shape{1}, {5}); - const auto pad_val = op::Constant::create(element::Type_t::f32, Shape{}, {2112}); + const auto pads_begin = op::Constant::create(element::i64, Shape{1}, {4}); + const auto pads_end = op::Constant::create(element::i64, Shape{1}, {5}); + const auto pad_val = op::Constant::create(element::f32, Shape{}, {2112}); auto f = make_shared( make_shared(data, pads_begin, pads_end, pad_val, op::PadMode::CONSTANT), @@ -46,9 +46,9 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_exterior_1d) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, data_shape); + auto a = backend->create_tensor(element::f32, data_shape); copy_data(a, std::vector({1, 2, 3, 4, 5, 6})); - auto result = backend->create_tensor(element::Type_t::f32, Shape{15}); + auto result = backend->create_tensor(element::f32, Shape{15}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -61,11 +61,11 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_exterior_1d) NGRAPH_TEST(${BACKEND_NAME}, pad_negative_exterior_1d) { const Shape data_shape{6}; - const auto data = make_shared(element::Type_t::f32, data_shape); + const auto data = make_shared(element::f32, data_shape); - const auto pads_begin = op::Constant::create(element::Type_t::i64, Shape{1}, {4}); - const auto pads_end = op::Constant::create(element::Type_t::i64, Shape{1}, {-2}); - const auto pad_val = op::Constant::create(element::Type_t::f32, Shape{}, {2112}); + const auto pads_begin = op::Constant::create(element::i64, Shape{1}, {4}); + const auto pads_end = op::Constant::create(element::i64, Shape{1}, {-2}); + const auto pad_val = op::Constant::create(element::f32, Shape{}, {2112}); auto f = make_shared( make_shared(data, pads_begin, pads_end, pad_val, op::PadMode::CONSTANT), @@ -74,9 +74,9 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_negative_exterior_1d) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, data_shape); + auto a = backend->create_tensor(element::f32, data_shape); copy_data(a, std::vector({1, 2, 3, 4, 5, 6})); - auto result = backend->create_tensor(element::Type_t::f32, Shape{8}); + auto result = backend->create_tensor(element::f32, Shape{8}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -88,11 +88,11 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_negative_exterior_1d) NGRAPH_TEST(${BACKEND_NAME}, pad_negative_exterior_1d_check_limits) { const Shape data_shape{6}; - const auto data = make_shared(element::Type_t::f32, data_shape); + const auto data = make_shared(element::f32, data_shape); - const auto pads_begin = op::Constant::create(element::Type_t::i64, Shape{1}, {4}); - const auto pads_end = op::Constant::create(element::Type_t::i64, Shape{1}, {-7}); - const auto pad_val = op::Constant::create(element::Type_t::f32, Shape{}, {2112}); + const auto pads_begin = op::Constant::create(element::i64, Shape{1}, {4}); + const auto pads_end = op::Constant::create(element::i64, Shape{1}, {-7}); + const auto pad_val = op::Constant::create(element::f32, Shape{}, {2112}); auto f = make_shared( make_shared(data, pads_begin, pads_end, pad_val, op::PadMode::CONSTANT), @@ -101,9 +101,9 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_negative_exterior_1d_check_limits) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, data_shape); + auto a = backend->create_tensor(element::f32, data_shape); copy_data(a, std::vector({1, 2, 3, 4, 5, 6})); - auto result = backend->create_tensor(element::Type_t::f32, Shape{3}); + auto result = backend->create_tensor(element::f32, Shape{3}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -114,11 +114,11 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_negative_exterior_1d_check_limits) NGRAPH_TEST(${BACKEND_NAME}, pad_edge_1d) { const Shape data_shape{6}; - const auto data = make_shared(element::Type_t::f32, data_shape); + const auto data = make_shared(element::f32, data_shape); - const auto pads_begin = op::Constant::create(element::Type_t::i64, Shape{1}, {2}); - const auto pads_end = op::Constant::create(element::Type_t::i64, Shape{1}, {3}); - const auto pad_val = op::Constant::create(element::Type_t::f32, Shape{}, {2112}); + const auto pads_begin = op::Constant::create(element::i64, Shape{1}, {2}); + const auto pads_end = op::Constant::create(element::i64, Shape{1}, {3}); + const auto pad_val = op::Constant::create(element::f32, Shape{}, {2112}); auto f = make_shared( make_shared(data, pads_begin, pads_end, pad_val, op::PadMode::EDGE), @@ -127,9 +127,9 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_edge_1d) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, data_shape); + auto a = backend->create_tensor(element::f32, data_shape); copy_data(a, std::vector({1, 2, 3, 4, 5, 6})); - auto result = backend->create_tensor(element::Type_t::f32, Shape{11}); + auto result = backend->create_tensor(element::f32, Shape{11}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -140,11 +140,11 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_edge_1d) NGRAPH_TEST(${BACKEND_NAME}, pad_edge_1d_top_neg) { const Shape data_shape{6}; - const auto data = make_shared(element::Type_t::f32, data_shape); + const auto data = make_shared(element::f32, data_shape); - const auto pads_begin = op::Constant::create(element::Type_t::i64, Shape{1}, {2}); - const auto pads_end = op::Constant::create(element::Type_t::i64, Shape{1}, {-3}); - const auto pad_val = op::Constant::create(element::Type_t::f32, Shape{}, {2112}); + const auto pads_begin = op::Constant::create(element::i64, Shape{1}, {2}); + const auto pads_end = op::Constant::create(element::i64, Shape{1}, {-3}); + const auto pad_val = op::Constant::create(element::f32, Shape{}, {2112}); auto f = make_shared( make_shared(data, pads_begin, pads_end, pad_val, op::PadMode::EDGE), @@ -153,9 +153,9 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_edge_1d_top_neg) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, data_shape); + auto a = backend->create_tensor(element::f32, data_shape); copy_data(a, std::vector({1, 2, 3, 4, 5, 6})); - auto result = backend->create_tensor(element::Type_t::f32, Shape{5}); + auto result = backend->create_tensor(element::f32, Shape{5}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -166,11 +166,11 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_edge_1d_top_neg) NGRAPH_TEST(${BACKEND_NAME}, pad_edge_1d_top_neg_bigger_than_tensor) { const Shape data_shape{6}; - const auto data = make_shared(element::Type_t::f32, data_shape); + const auto data = make_shared(element::f32, data_shape); - const auto pads_begin = op::Constant::create(element::Type_t::i64, Shape{1}, {2}); - const auto pads_end = op::Constant::create(element::Type_t::i64, Shape{1}, {-7}); - const auto pad_val = op::Constant::create(element::Type_t::f32, Shape{}, {2112}); + const auto pads_begin = op::Constant::create(element::i64, Shape{1}, {2}); + const auto pads_end = op::Constant::create(element::i64, Shape{1}, {-7}); + const auto pad_val = op::Constant::create(element::f32, Shape{}, {2112}); auto f = make_shared( make_shared(data, pads_begin, pads_end, pad_val, op::PadMode::EDGE), @@ -179,9 +179,9 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_edge_1d_top_neg_bigger_than_tensor) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, data_shape); + auto a = backend->create_tensor(element::f32, data_shape); copy_data(a, std::vector({1, 2, 3, 4, 5, 6})); - auto result = backend->create_tensor(element::Type_t::f32, Shape{1}); + auto result = backend->create_tensor(element::f32, Shape{1}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -191,11 +191,11 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_edge_1d_top_neg_bigger_than_tensor) NGRAPH_TEST(${BACKEND_NAME}, pad_edge_1d_bottom_neg) { const Shape data_shape{6}; - const auto data = make_shared(element::Type_t::f32, data_shape); + const auto data = make_shared(element::f32, data_shape); - const auto pads_begin = op::Constant::create(element::Type_t::i64, Shape{1}, {-2}); - const auto pads_end = op::Constant::create(element::Type_t::i64, Shape{1}, {3}); - const auto pad_val = op::Constant::create(element::Type_t::f32, Shape{}, {2112}); + const auto pads_begin = op::Constant::create(element::i64, Shape{1}, {-2}); + const auto pads_end = op::Constant::create(element::i64, Shape{1}, {3}); + const auto pad_val = op::Constant::create(element::f32, Shape{}, {2112}); auto f = make_shared( make_shared(data, pads_begin, pads_end, pad_val, op::PadMode::EDGE), @@ -204,9 +204,9 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_edge_1d_bottom_neg) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, data_shape); + auto a = backend->create_tensor(element::f32, data_shape); copy_data(a, std::vector({1, 2, 3, 4, 5, 6})); - auto result = backend->create_tensor(element::Type_t::f32, Shape{7}); + auto result = backend->create_tensor(element::f32, Shape{7}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -217,11 +217,11 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_edge_1d_bottom_neg) NGRAPH_TEST(${BACKEND_NAME}, pad_edge_1d_bottom_neg_bigger_than_tensor) { const Shape data_shape{6}; - const auto data = make_shared(element::Type_t::f32, data_shape); + const auto data = make_shared(element::f32, data_shape); - const auto pads_begin = op::Constant::create(element::Type_t::i64, Shape{1}, {-7}); - const auto pads_end = op::Constant::create(element::Type_t::i64, Shape{1}, {3}); - const auto pad_val = op::Constant::create(element::Type_t::f32, Shape{}, {2112}); + const auto pads_begin = op::Constant::create(element::i64, Shape{1}, {-7}); + const auto pads_end = op::Constant::create(element::i64, Shape{1}, {3}); + const auto pad_val = op::Constant::create(element::f32, Shape{}, {2112}); auto f = make_shared( make_shared(data, pads_begin, pads_end, pad_val, op::PadMode::EDGE), @@ -230,9 +230,9 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_edge_1d_bottom_neg_bigger_than_tensor) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, data_shape); + auto a = backend->create_tensor(element::f32, data_shape); copy_data(a, std::vector({1, 2, 3, 4, 5, 6})); - auto result = backend->create_tensor(element::Type_t::f32, Shape{2}); + auto result = backend->create_tensor(element::f32, Shape{2}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -242,11 +242,11 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_edge_1d_bottom_neg_bigger_than_tensor) NGRAPH_TEST(${BACKEND_NAME}, pad_edge_2d) { const Shape data_shape{3, 4}; - const auto data = make_shared(element::Type_t::f32, data_shape); + const auto data = make_shared(element::f32, data_shape); - const auto pads_begin = op::Constant::create(element::Type_t::i64, Shape{2}, {2, 3}); - const auto pads_end = op::Constant::create(element::Type_t::i64, Shape{2}, {1, 2}); - const auto pad_val = op::Constant::create(element::Type_t::f32, Shape{}, {2112}); + const auto pads_begin = op::Constant::create(element::i64, Shape{2}, {2, 3}); + const auto pads_end = op::Constant::create(element::i64, Shape{2}, {1, 2}); + const auto pad_val = op::Constant::create(element::f32, Shape{}, {2112}); auto f = make_shared( make_shared(data, pads_begin, pads_end, pad_val, op::PadMode::EDGE), @@ -255,9 +255,9 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_edge_2d) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, data_shape); + auto a = backend->create_tensor(element::f32, data_shape); copy_data(a, std::vector({1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12})); - auto result = backend->create_tensor(element::Type_t::f32, Shape{6, 9}); + auto result = backend->create_tensor(element::f32, Shape{6, 9}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -275,11 +275,11 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_edge_2d) NGRAPH_TEST(${BACKEND_NAME}, pad_edge_2d_with_neg) { const Shape data_shape{3, 4}; - const auto data = make_shared(element::Type_t::f32, data_shape); + const auto data = make_shared(element::f32, data_shape); - const auto pads_begin = op::Constant::create(element::Type_t::i64, Shape{2}, {2, -1}); - const auto pads_end = op::Constant::create(element::Type_t::i64, Shape{2}, {1, 2}); - const auto pad_val = op::Constant::create(element::Type_t::f32, Shape{}, {2112}); + const auto pads_begin = op::Constant::create(element::i64, Shape{2}, {2, -1}); + const auto pads_end = op::Constant::create(element::i64, Shape{2}, {1, 2}); + const auto pad_val = op::Constant::create(element::f32, Shape{}, {2112}); auto f = make_shared( make_shared(data, pads_begin, pads_end, pad_val, op::PadMode::EDGE), @@ -288,9 +288,9 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_edge_2d_with_neg) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, data_shape); + auto a = backend->create_tensor(element::f32, data_shape); copy_data(a, std::vector({1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12})); - auto result = backend->create_tensor(element::Type_t::f32, Shape{6, 5}); + auto result = backend->create_tensor(element::f32, Shape{6, 5}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -308,11 +308,11 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_edge_2d_with_neg) NGRAPH_TEST(${BACKEND_NAME}, pad_reflect_1d) { const Shape data_shape{6}; - const auto data = make_shared(element::Type_t::f32, data_shape); + const auto data = make_shared(element::f32, data_shape); - const auto pads_begin = op::Constant::create(element::Type_t::i64, Shape{1}, {2}); - const auto pads_end = op::Constant::create(element::Type_t::i64, Shape{1}, {3}); - const auto pad_val = op::Constant::create(element::Type_t::f32, Shape{}, {2112}); + const auto pads_begin = op::Constant::create(element::i64, Shape{1}, {2}); + const auto pads_end = op::Constant::create(element::i64, Shape{1}, {3}); + const auto pad_val = op::Constant::create(element::f32, Shape{}, {2112}); auto f = make_shared( make_shared(data, pads_begin, pads_end, pad_val, op::PadMode::REFLECT), @@ -321,9 +321,9 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_reflect_1d) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, data_shape); + auto a = backend->create_tensor(element::f32, data_shape); copy_data(a, std::vector({1, 2, 3, 4, 5, 6})); - auto result = backend->create_tensor(element::Type_t::f32, Shape{11}); + auto result = backend->create_tensor(element::f32, Shape{11}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -335,11 +335,11 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_reflect_1d) NGRAPH_TEST(${BACKEND_NAME}, pad_reflect_1d_top_neg) { const Shape data_shape{6}; - const auto data = make_shared(element::Type_t::f32, data_shape); + const auto data = make_shared(element::f32, data_shape); - const auto pads_begin = op::Constant::create(element::Type_t::i64, Shape{1}, {2}); - const auto pads_end = op::Constant::create(element::Type_t::i64, Shape{1}, {-3}); - const auto pad_val = op::Constant::create(element::Type_t::f32, Shape{}, {2112}); + const auto pads_begin = op::Constant::create(element::i64, Shape{1}, {2}); + const auto pads_end = op::Constant::create(element::i64, Shape{1}, {-3}); + const auto pad_val = op::Constant::create(element::f32, Shape{}, {2112}); auto f = make_shared( make_shared(data, pads_begin, pads_end, pad_val, op::PadMode::REFLECT), @@ -348,9 +348,9 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_reflect_1d_top_neg) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, data_shape); + auto a = backend->create_tensor(element::f32, data_shape); copy_data(a, std::vector({1, 2, 3, 4, 5, 6})); - auto result = backend->create_tensor(element::Type_t::f32, Shape{5}); + auto result = backend->create_tensor(element::f32, Shape{5}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -361,11 +361,11 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_reflect_1d_top_neg) NGRAPH_TEST(${BACKEND_NAME}, pad_reflect_1d_top_neg_bigger_than_tensor) { const Shape data_shape{6}; - const auto data = make_shared(element::Type_t::f32, data_shape); + const auto data = make_shared(element::f32, data_shape); - const auto pads_begin = op::Constant::create(element::Type_t::i64, Shape{1}, {2}); - const auto pads_end = op::Constant::create(element::Type_t::i64, Shape{1}, {-7}); - const auto pad_val = op::Constant::create(element::Type_t::f32, Shape{}, {2112}); + const auto pads_begin = op::Constant::create(element::i64, Shape{1}, {2}); + const auto pads_end = op::Constant::create(element::i64, Shape{1}, {-7}); + const auto pad_val = op::Constant::create(element::f32, Shape{}, {2112}); auto f = make_shared( make_shared(data, pads_begin, pads_end, pad_val, op::PadMode::REFLECT), @@ -374,9 +374,9 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_reflect_1d_top_neg_bigger_than_tensor) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, data_shape); + auto a = backend->create_tensor(element::f32, data_shape); copy_data(a, std::vector({1, 2, 3, 4, 5, 6})); - auto result = backend->create_tensor(element::Type_t::f32, Shape{1}); + auto result = backend->create_tensor(element::f32, Shape{1}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -387,11 +387,11 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_reflect_1d_top_neg_bigger_than_tensor) NGRAPH_TEST(${BACKEND_NAME}, pad_reflect_1d_bottom_neg) { const Shape data_shape{6}; - const auto data = make_shared(element::Type_t::f32, data_shape); + const auto data = make_shared(element::f32, data_shape); - const auto pads_begin = op::Constant::create(element::Type_t::i64, Shape{1}, {-2}); - const auto pads_end = op::Constant::create(element::Type_t::i64, Shape{1}, {3}); - const auto pad_val = op::Constant::create(element::Type_t::f32, Shape{}, {2112}); + const auto pads_begin = op::Constant::create(element::i64, Shape{1}, {-2}); + const auto pads_end = op::Constant::create(element::i64, Shape{1}, {3}); + const auto pad_val = op::Constant::create(element::f32, Shape{}, {2112}); auto f = make_shared( make_shared(data, pads_begin, pads_end, pad_val, op::PadMode::REFLECT), @@ -400,9 +400,9 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_reflect_1d_bottom_neg) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, data_shape); + auto a = backend->create_tensor(element::f32, data_shape); copy_data(a, std::vector({1, 2, 3, 4, 5, 6})); - auto result = backend->create_tensor(element::Type_t::f32, Shape{7}); + auto result = backend->create_tensor(element::f32, Shape{7}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -414,11 +414,11 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_reflect_1d_bottom_neg) NGRAPH_TEST(${BACKEND_NAME}, pad_reflect_1d_bottom_neg_bigger_than_tensor) { const Shape data_shape{6}; - const auto data = make_shared(element::Type_t::f32, data_shape); + const auto data = make_shared(element::f32, data_shape); - const auto pads_begin = op::Constant::create(element::Type_t::i64, Shape{1}, {-7}); - const auto pads_end = op::Constant::create(element::Type_t::i64, Shape{1}, {3}); - const auto pad_val = op::Constant::create(element::Type_t::f32, Shape{}, {2112}); + const auto pads_begin = op::Constant::create(element::i64, Shape{1}, {-7}); + const auto pads_end = op::Constant::create(element::i64, Shape{1}, {3}); + const auto pad_val = op::Constant::create(element::f32, Shape{}, {2112}); auto f = make_shared( make_shared(data, pads_begin, pads_end, pad_val, op::PadMode::REFLECT), @@ -427,9 +427,9 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_reflect_1d_bottom_neg_bigger_than_tensor) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, data_shape); + auto a = backend->create_tensor(element::f32, data_shape); copy_data(a, std::vector({1, 2, 3, 4, 5, 6})); - auto result = backend->create_tensor(element::Type_t::f32, Shape{2}); + auto result = backend->create_tensor(element::f32, Shape{2}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -440,11 +440,11 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_reflect_1d_bottom_neg_bigger_than_tensor) NGRAPH_TEST(${BACKEND_NAME}, pad_reflect_1d_multi_reflect) { const Shape data_shape{3}; - const auto data = make_shared(element::Type_t::f32, data_shape); + const auto data = make_shared(element::f32, data_shape); - const auto pads_begin = op::Constant::create(element::Type_t::i64, Shape{1}, {10}); - const auto pads_end = op::Constant::create(element::Type_t::i64, Shape{1}, {9}); - const auto pad_val = op::Constant::create(element::Type_t::f32, Shape{}, {2112}); + const auto pads_begin = op::Constant::create(element::i64, Shape{1}, {10}); + const auto pads_end = op::Constant::create(element::i64, Shape{1}, {9}); + const auto pad_val = op::Constant::create(element::f32, Shape{}, {2112}); auto f = make_shared( make_shared(data, pads_begin, pads_end, pad_val, op::PadMode::REFLECT), @@ -453,9 +453,9 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_reflect_1d_multi_reflect) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, data_shape); + auto a = backend->create_tensor(element::f32, data_shape); copy_data(a, std::vector({1, 2, 3})); - auto result = backend->create_tensor(element::Type_t::f32, Shape{22}); + auto result = backend->create_tensor(element::f32, Shape{22}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -468,11 +468,11 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_reflect_1d_multi_reflect) NGRAPH_TEST(${BACKEND_NAME}, pad_reflect_2d) { const Shape data_shape{3, 4}; - const auto data = make_shared(element::Type_t::f32, data_shape); + const auto data = make_shared(element::f32, data_shape); - const auto pads_begin = op::Constant::create(element::Type_t::i64, Shape{2}, {2, 3}); - const auto pads_end = op::Constant::create(element::Type_t::i64, Shape{2}, {1, 2}); - const auto pad_val = op::Constant::create(element::Type_t::f32, Shape{}, {2112}); + const auto pads_begin = op::Constant::create(element::i64, Shape{2}, {2, 3}); + const auto pads_end = op::Constant::create(element::i64, Shape{2}, {1, 2}); + const auto pad_val = op::Constant::create(element::f32, Shape{}, {2112}); auto f = make_shared( make_shared(data, pads_begin, pads_end, pad_val, op::PadMode::REFLECT), @@ -481,10 +481,10 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_reflect_2d) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, data_shape); + auto a = backend->create_tensor(element::f32, data_shape); copy_data(a, test::NDArray({{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}}).get_vector()); - auto result = backend->create_tensor(element::Type_t::f32, Shape{6, 9}); + auto result = backend->create_tensor(element::f32, Shape{6, 9}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -502,11 +502,11 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_reflect_2d) NGRAPH_TEST(${BACKEND_NAME}, pad_reflect_2d_with_neg) { const Shape data_shape{3, 4}; - const auto data = make_shared(element::Type_t::f32, data_shape); + const auto data = make_shared(element::f32, data_shape); - const auto pads_begin = op::Constant::create(element::Type_t::i64, Shape{2}, {2, -1}); - const auto pads_end = op::Constant::create(element::Type_t::i64, Shape{2}, {1, 2}); - const auto pad_val = op::Constant::create(element::Type_t::f32, Shape{}, {2112}); + const auto pads_begin = op::Constant::create(element::i64, Shape{2}, {2, -1}); + const auto pads_end = op::Constant::create(element::i64, Shape{2}, {1, 2}); + const auto pad_val = op::Constant::create(element::f32, Shape{}, {2112}); auto f = make_shared( make_shared(data, pads_begin, pads_end, pad_val, op::PadMode::REFLECT), @@ -515,10 +515,10 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_reflect_2d_with_neg) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, data_shape); + auto a = backend->create_tensor(element::f32, data_shape); copy_data(a, test::NDArray({{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}}).get_vector()); - auto result = backend->create_tensor(element::Type_t::f32, Shape{6, 5}); + auto result = backend->create_tensor(element::f32, Shape{6, 5}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -536,11 +536,11 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_reflect_2d_with_neg) NGRAPH_TEST(${BACKEND_NAME}, pad_negative_exterior_2d) { const Shape data_shape{2, 3}; - const auto data = make_shared(element::Type_t::f32, data_shape); + const auto data = make_shared(element::f32, data_shape); - const auto pads_begin = op::Constant::create(element::Type_t::i64, Shape{2}, {1, -1}); - const auto pads_end = op::Constant::create(element::Type_t::i64, Shape{2}, {2, 0}); - const auto pad_val = op::Constant::create(element::Type_t::f32, Shape{}, {9}); + const auto pads_begin = op::Constant::create(element::i64, Shape{2}, {1, -1}); + const auto pads_end = op::Constant::create(element::i64, Shape{2}, {2, 0}); + const auto pad_val = op::Constant::create(element::f32, Shape{}, {9}); auto f = make_shared( make_shared(data, pads_begin, pads_end, pad_val, op::PadMode::CONSTANT), @@ -549,9 +549,9 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_negative_exterior_2d) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, data_shape); + auto a = backend->create_tensor(element::f32, data_shape); copy_data(a, test::NDArray({{1, 2, 3}, {4, 5, 6}}).get_vector()); - auto result = backend->create_tensor(element::Type_t::f32, Shape{5, 2}); + auto result = backend->create_tensor(element::f32, Shape{5, 2}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -564,11 +564,11 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_negative_exterior_2d) NGRAPH_TEST(${BACKEND_NAME}, pad_negative_exterior_2d_all_negative) { const Shape data_shape{3, 3}; - const auto data = make_shared(element::Type_t::f32, data_shape); + const auto data = make_shared(element::f32, data_shape); - const auto pads_begin = op::Constant::create(element::Type_t::i64, Shape{2}, {-1, -1}); - const auto pads_end = op::Constant::create(element::Type_t::i64, Shape{2}, {-1, -1}); - const auto pad_val = op::Constant::create(element::Type_t::f32, Shape{}, {9}); + const auto pads_begin = op::Constant::create(element::i64, Shape{2}, {-1, -1}); + const auto pads_end = op::Constant::create(element::i64, Shape{2}, {-1, -1}); + const auto pad_val = op::Constant::create(element::f32, Shape{}, {9}); auto f = make_shared( make_shared(data, pads_begin, pads_end, pad_val, op::PadMode::CONSTANT), @@ -577,9 +577,9 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_negative_exterior_2d_all_negative) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, data_shape); + auto a = backend->create_tensor(element::f32, data_shape); copy_data(a, test::NDArray({{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}).get_vector()); - auto result = backend->create_tensor(element::Type_t::f32, Shape{1, 1}); + auto result = backend->create_tensor(element::f32, Shape{1, 1}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -591,11 +591,11 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_negative_exterior_2d_all_negative) NGRAPH_TEST(${BACKEND_NAME}, pad_exterior_2d_0x0) { const Shape data_shape{0, 0}; - const auto data = make_shared(element::Type_t::f32, data_shape); + const auto data = make_shared(element::f32, data_shape); - const auto pads_begin = op::Constant::create(element::Type_t::i64, Shape{2}, {2, 3}); - const auto pads_end = op::Constant::create(element::Type_t::i64, Shape{2}, {3, 2}); - const auto pad_val = op::Constant::create(element::Type_t::f32, Shape{}, {2112}); + const auto pads_begin = op::Constant::create(element::i64, Shape{2}, {2, 3}); + const auto pads_end = op::Constant::create(element::i64, Shape{2}, {3, 2}); + const auto pad_val = op::Constant::create(element::f32, Shape{}, {2112}); auto f = make_shared( make_shared(data, pads_begin, pads_end, pad_val, op::PadMode::CONSTANT), @@ -604,8 +604,8 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_exterior_2d_0x0) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, data_shape); - auto result = backend->create_tensor(element::Type_t::f32, Shape{5, 5}); + auto a = backend->create_tensor(element::f32, data_shape); + auto result = backend->create_tensor(element::f32, Shape{5, 5}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -622,11 +622,11 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_exterior_2d_0x0) NGRAPH_TEST(${BACKEND_NAME}, pad_exterior_2d_0x3) { const Shape data_shape{0, 3}; - const auto data = make_shared(element::Type_t::f32, data_shape); + const auto data = make_shared(element::f32, data_shape); - const auto pads_begin = op::Constant::create(element::Type_t::i64, Shape{2}, {2, 1}); - const auto pads_end = op::Constant::create(element::Type_t::i64, Shape{2}, {3, 1}); - const auto pad_val = op::Constant::create(element::Type_t::f32, Shape{}, {2112}); + const auto pads_begin = op::Constant::create(element::i64, Shape{2}, {2, 1}); + const auto pads_end = op::Constant::create(element::i64, Shape{2}, {3, 1}); + const auto pad_val = op::Constant::create(element::f32, Shape{}, {2112}); auto f = make_shared( make_shared(data, pads_begin, pads_end, pad_val, op::PadMode::CONSTANT), @@ -635,8 +635,8 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_exterior_2d_0x3) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, data_shape); - auto result = backend->create_tensor(element::Type_t::f32, Shape{5, 5}); + auto a = backend->create_tensor(element::f32, data_shape); + auto result = backend->create_tensor(element::f32, Shape{5, 5}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -653,11 +653,11 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_exterior_2d_0x3) NGRAPH_TEST(${BACKEND_NAME}, pad_exterior_2d_3x0) { const Shape data_shape{3, 0}; - const auto data = make_shared(element::Type_t::f32, data_shape); + const auto data = make_shared(element::f32, data_shape); - const auto pads_begin = op::Constant::create(element::Type_t::i64, Shape{2}, {1, 3}); - const auto pads_end = op::Constant::create(element::Type_t::i64, Shape{2}, {1, 2}); - const auto pad_val = op::Constant::create(element::Type_t::f32, Shape{}, {2112}); + const auto pads_begin = op::Constant::create(element::i64, Shape{2}, {1, 3}); + const auto pads_end = op::Constant::create(element::i64, Shape{2}, {1, 2}); + const auto pad_val = op::Constant::create(element::f32, Shape{}, {2112}); auto f = make_shared( make_shared(data, pads_begin, pads_end, pad_val, op::PadMode::CONSTANT), @@ -666,8 +666,8 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_exterior_2d_3x0) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, data_shape); - auto result = backend->create_tensor(element::Type_t::f32, Shape{5, 5}); + auto a = backend->create_tensor(element::f32, data_shape); + auto result = backend->create_tensor(element::f32, Shape{5, 5}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -684,11 +684,11 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_exterior_2d_3x0) NGRAPH_TEST(${BACKEND_NAME}, pad_exterior_4d_1x2x2x2) { const Shape data_shape{1, 2, 2, 2}; - const auto data = make_shared(element::Type_t::f32, data_shape); + const auto data = make_shared(element::f32, data_shape); - const auto pads_begin = op::Constant::create(element::Type_t::i64, Shape{4}, {0, 0, 1, 1}); - const auto pads_end = op::Constant::create(element::Type_t::i64, Shape{4}, {0, 0, 1, 1}); - const auto pad_val = op::Constant::create(element::Type_t::f32, Shape{}, {42}); + const auto pads_begin = op::Constant::create(element::i64, Shape{4}, {0, 0, 1, 1}); + const auto pads_end = op::Constant::create(element::i64, Shape{4}, {0, 0, 1, 1}); + const auto pad_val = op::Constant::create(element::f32, Shape{}, {42}); auto f = make_shared( make_shared(data, pads_begin, pads_end, pad_val, op::PadMode::CONSTANT), @@ -697,7 +697,7 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_exterior_4d_1x2x2x2) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, data_shape); + auto a = backend->create_tensor(element::f32, data_shape); // clang-format off copy_data(a, test::NDArray( { @@ -713,7 +713,7 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_exterior_4d_1x2x2x2) } }).get_vector()); // clang-format on - auto result = backend->create_tensor(element::Type_t::f32, Shape{1, 2, 4, 4}); + auto result = backend->create_tensor(element::f32, Shape{1, 2, 4, 4}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -742,11 +742,11 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_exterior_4d_1x2x2x2) NGRAPH_TEST(${BACKEND_NAME}, pad_negative_exterior_4d) { const Shape data_shape{1, 3, 2, 2}; - const auto data = make_shared(element::Type_t::f32, data_shape); + const auto data = make_shared(element::f32, data_shape); - const auto pads_begin = op::Constant::create(element::Type_t::i64, Shape{4}, {0, -1, 1, 1}); - const auto pads_end = op::Constant::create(element::Type_t::i64, Shape{4}, {0, -1, 1, 1}); - const auto pad_val = op::Constant::create(element::Type_t::f32, Shape{}, {42}); + const auto pads_begin = op::Constant::create(element::i64, Shape{4}, {0, -1, 1, 1}); + const auto pads_end = op::Constant::create(element::i64, Shape{4}, {0, -1, 1, 1}); + const auto pad_val = op::Constant::create(element::f32, Shape{}, {42}); auto f = make_shared( make_shared(data, pads_begin, pads_end, pad_val, op::PadMode::CONSTANT), @@ -755,7 +755,7 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_negative_exterior_4d) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, data_shape); + auto a = backend->create_tensor(element::f32, data_shape); // clang-format off copy_data(a, test::NDArray( { @@ -776,7 +776,7 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_negative_exterior_4d) }).get_vector()); // clang-format on - auto result = backend->create_tensor(element::Type_t::f32, Shape{1, 1, 4, 4}); + auto result = backend->create_tensor(element::f32, Shape{1, 1, 4, 4}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -803,11 +803,11 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_2channel_2image_asym) { const Shape data_shape{2, 2, 4, 4}; const auto window_movement_strides = Strides{2, 2}; - const auto data = make_shared(element::Type_t::f32, data_shape); + const auto data = make_shared(element::f32, data_shape); - const auto pads_begin = op::Constant::create(element::Type_t::i64, Shape{4}, {0, 0, 0, 0}); - const auto pads_end = op::Constant::create(element::Type_t::i64, Shape{4}, {0, 0, 2, 2}); - const auto pad_val = op::Constant::create(element::Type_t::f32, Shape{}, {42}); + const auto pads_begin = op::Constant::create(element::i64, Shape{4}, {0, 0, 0, 0}); + const auto pads_end = op::Constant::create(element::i64, Shape{4}, {0, 0, 2, 2}); + const auto pad_val = op::Constant::create(element::f32, Shape{}, {42}); auto f = make_shared( make_shared(data, pads_begin, pads_end, pad_val, op::PadMode::CONSTANT), @@ -816,7 +816,7 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_2channel_2image_asym) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, data_shape); + auto a = backend->create_tensor(element::f32, data_shape); copy_data(a, test::NDArray({{{{0, 1, 0, 2}, // img 0 chan 0 {0, 3, 2, 0}, @@ -839,7 +839,7 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_2channel_2image_asym) {1, 0, 0, 0}}}}) .get_vector()); - auto result = backend->create_tensor(element::Type_t::f32, Shape{2, 2, 6, 6}); + auto result = backend->create_tensor(element::f32, Shape{2, 2, 6, 6}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -879,11 +879,11 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_2channel_2image_asym) NGRAPH_TEST(${BACKEND_NAME}, pad_symmetric) { const Shape data_shape{2, 3}; - const auto data = make_shared(element::Type_t::f32, data_shape); + const auto data = make_shared(element::f32, data_shape); - const auto pads_begin = op::Constant::create(element::Type_t::i64, Shape{2}, {1, 2}); - const auto pads_end = op::Constant::create(element::Type_t::i64, Shape{2}, {1, 2}); - const auto pad_val = op::Constant::create(element::Type_t::f32, Shape{}, {2112}); + const auto pads_begin = op::Constant::create(element::i64, Shape{2}, {1, 2}); + const auto pads_end = op::Constant::create(element::i64, Shape{2}, {1, 2}); + const auto pad_val = op::Constant::create(element::f32, Shape{}, {2112}); auto f = make_shared( make_shared(data, pads_begin, pads_end, pad_val, op::PadMode::SYMMETRIC), @@ -892,9 +892,9 @@ NGRAPH_TEST(${BACKEND_NAME}, pad_symmetric) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, data_shape); + auto a = backend->create_tensor(element::f32, data_shape); copy_data(a, test::NDArray({{1, 2, 3}, {4, 5, 6}}).get_vector()); - auto result = backend->create_tensor(element::Type_t::f32, Shape{4, 7}); + auto result = backend->create_tensor(element::f32, Shape{4, 7}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); diff --git a/ngraph/test/backend/parameter_as_output.in.cpp b/ngraph/test/backend/parameter_as_output.in.cpp index 898c24691ff671..b2b84e0e875678 100644 --- a/ngraph/test/backend/parameter_as_output.in.cpp +++ b/ngraph/test/backend/parameter_as_output.in.cpp @@ -31,14 +31,14 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, parameter_as_output) { Shape shape{3, 4}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared(A, ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - shared_ptr a = backend->create_tensor(element::Type_t::f32, shape); - shared_ptr result = backend->create_tensor(element::Type_t::f32, shape); + shared_ptr a = backend->create_tensor(element::f32, shape); + shared_ptr result = backend->create_tensor(element::f32, shape); vector expected{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}; vector zero(shape_size(shape), 0); diff --git a/ngraph/test/backend/partial_slice.in.cpp b/ngraph/test/backend/partial_slice.in.cpp index 4416bb21631df5..61a322f9b31128 100644 --- a/ngraph/test/backend/partial_slice.in.cpp +++ b/ngraph/test/backend/partial_slice.in.cpp @@ -49,7 +49,7 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, partial_slice_static) { Shape shape_x{2, 3, 2}; - auto x = make_shared(element::Type_t::f32, shape_x); + auto x = make_shared(element::f32, shape_x); AxisVector axes{0, 1}; vector lower_bounds{1, 0}; vector upper_bounds{2, 2}; @@ -61,10 +61,10 @@ NGRAPH_TEST(${BACKEND_NAME}, partial_slice_static) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto t_x = backend->create_tensor(element::Type_t::f32, shape_x); + auto t_x = backend->create_tensor(element::f32, shape_x); vector v_x{0.f, 1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f, 8.f, 9.f, 10.f, 11.f}; copy_data(t_x, v_x); - auto t_r = backend->create_tensor(element::Type_t::f32, Shape{1, 2, 2}); + auto t_r = backend->create_tensor(element::f32, Shape{1, 2, 2}); auto handle = backend->compile(f); handle->call_with_validate({t_r}, {t_x}); @@ -76,7 +76,7 @@ NGRAPH_TEST(${BACKEND_NAME}, partial_slice_static) NGRAPH_TEST(${BACKEND_NAME}, partial_slice_partial_shape) { auto pshape_x = PartialShape{Dimension::dynamic(), 3, Dimension::dynamic()}; - auto x = make_shared(element::Type_t::f32, pshape_x); + auto x = make_shared(element::f32, pshape_x); AxisVector axes{0, 1}; vector lower_bounds{1, 0}; vector upper_bounds{2, 2}; @@ -89,10 +89,10 @@ NGRAPH_TEST(${BACKEND_NAME}, partial_slice_partial_shape) // Create some tensors for input/output Shape shape_x{2, 3, 2}; - auto t_x = backend->create_tensor(element::Type_t::f32, shape_x); + auto t_x = backend->create_tensor(element::f32, shape_x); vector v_x{0.f, 1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f, 8.f, 9.f, 10.f, 11.f}; copy_data(t_x, v_x); - auto t_r = backend->create_dynamic_tensor(element::Type_t::f32, PartialShape::dynamic()); + auto t_r = backend->create_dynamic_tensor(element::f32, PartialShape::dynamic()); auto handle = backend->compile(f); handle->call_with_validate({t_r}, {t_x}); @@ -104,7 +104,7 @@ NGRAPH_TEST(${BACKEND_NAME}, partial_slice_partial_shape) NGRAPH_TEST(${BACKEND_NAME}, partial_slice_unkown_rank) { auto pshape_x = PartialShape::dynamic(); - auto x = make_shared(element::Type_t::f32, pshape_x); + auto x = make_shared(element::f32, pshape_x); AxisVector axes{0, 1}; vector lower_bounds{1, 0}; vector upper_bounds{2, 2}; @@ -117,10 +117,10 @@ NGRAPH_TEST(${BACKEND_NAME}, partial_slice_unkown_rank) // Create some tensors for input/output Shape shape_x{2, 3, 2}; - auto t_x = backend->create_tensor(element::Type_t::f32, shape_x); + auto t_x = backend->create_tensor(element::f32, shape_x); vector v_x{0.f, 1.f, 2.f, 3.f, 4.f, 5.f, 6.f, 7.f, 8.f, 9.f, 10.f, 11.f}; copy_data(t_x, v_x); - auto t_r = backend->create_dynamic_tensor(element::Type_t::f32, PartialShape::dynamic()); + auto t_r = backend->create_dynamic_tensor(element::f32, PartialShape::dynamic()); auto handle = backend->compile(f); handle->call_with_validate({t_r}, {t_x}); diff --git a/ngraph/test/backend/power.in.cpp b/ngraph/test/backend/power.in.cpp index 46396c618572fb..e64572edac2e95 100644 --- a/ngraph/test/backend/power.in.cpp +++ b/ngraph/test/backend/power.in.cpp @@ -48,8 +48,8 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, power) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); std::vector a{1, 2, 3, 5}; diff --git a/ngraph/test/backend/quantize_dequantize.in.cpp b/ngraph/test/backend/quantize_dequantize.in.cpp index 98c7779cbb844d..0da1e807c03f48 100644 --- a/ngraph/test/backend/quantize_dequantize.in.cpp +++ b/ngraph/test/backend/quantize_dequantize.in.cpp @@ -34,8 +34,8 @@ NGRAPH_TEST(${BACKEND_NAME}, quantize) Shape scale_offset_shape; AxisSet quantization_axes; - auto input_type = element::Type_t::f32; - auto output_type = element::Type_t::u8; + auto input_type = element::f32; + auto output_type = element::u8; typedef float input_c_type; typedef uint8_t output_c_type; @@ -67,8 +67,8 @@ NGRAPH_TEST(${BACKEND_NAME}, quantize_zero_offset) Shape scale_offset_shape; AxisSet quantization_axes; - auto input_type = element::Type_t::f32; - auto output_type = element::Type_t::u8; + auto input_type = element::f32; + auto output_type = element::u8; typedef float input_c_type; typedef uint8_t output_c_type; @@ -100,8 +100,8 @@ NGRAPH_TEST(${BACKEND_NAME}, quantize_axes) Shape scale_offset_shape{4}; AxisSet quantization_axes{0}; - auto input_type = element::Type_t::f32; - auto output_type = element::Type_t::u8; + auto input_type = element::f32; + auto output_type = element::u8; typedef float input_c_type; typedef uint8_t output_c_type; @@ -134,8 +134,8 @@ NGRAPH_TEST(${BACKEND_NAME}, quantize_int8) Shape scale_offset_shape; AxisSet quantization_axes; - auto input_type = element::Type_t::f32; - auto output_type = element::Type_t::i8; + auto input_type = element::f32; + auto output_type = element::i8; typedef float input_c_type; typedef int8_t output_c_type; @@ -168,8 +168,8 @@ NGRAPH_TEST(${BACKEND_NAME}, quantize_int8_zero_offset) Shape scale_offset_shape; AxisSet quantization_axes; - auto input_type = element::Type_t::f32; - auto output_type = element::Type_t::i8; + auto input_type = element::f32; + auto output_type = element::i8; typedef float input_c_type; typedef int8_t output_c_type; @@ -202,8 +202,8 @@ NGRAPH_TEST(${BACKEND_NAME}, quantize_int32) Shape scale_offset_shape; AxisSet quantization_axes; - auto input_type = element::Type_t::f32; - auto output_type = element::Type_t::i32; + auto input_type = element::f32; + auto output_type = element::i32; typedef float input_c_type; typedef int32_t output_c_type; @@ -236,8 +236,8 @@ NGRAPH_TEST(${BACKEND_NAME}, quantize_int32_zero_offset) Shape scale_offset_shape; AxisSet quantization_axes; - auto input_type = element::Type_t::f32; - auto output_type = element::Type_t::i32; + auto input_type = element::f32; + auto output_type = element::i32; typedef float input_c_type; typedef int32_t output_c_type; @@ -270,8 +270,8 @@ NGRAPH_TEST(${BACKEND_NAME}, quantize_clamp_uint8) Shape scale_offset_shape; AxisSet quantization_axes; - auto input_type = element::Type_t::f32; - auto output_type = element::Type_t::u8; + auto input_type = element::f32; + auto output_type = element::u8; typedef float input_c_type; typedef uint8_t output_c_type; @@ -302,8 +302,8 @@ NGRAPH_TEST(${BACKEND_NAME}, quantize_clamp_int8) Shape scale_offset_shape; AxisSet quantization_axes; - auto input_type = element::Type_t::f32; - auto output_type = element::Type_t::i8; + auto input_type = element::f32; + auto output_type = element::i8; typedef float input_c_type; typedef int8_t output_c_type; @@ -335,8 +335,8 @@ NGRAPH_TEST(${BACKEND_NAME}, quantize_clamp_int32) Shape scale_offset_shape; AxisSet quantization_axes; - auto input_type = element::Type_t::f64; - auto output_type = element::Type_t::i32; + auto input_type = element::f64; + auto output_type = element::i32; // TODO: fails with input due to 32 bits typedef double input_c_type; @@ -369,8 +369,8 @@ NGRAPH_TEST(${BACKEND_NAME}, quantize_ROUND_NEAREST_TOWARD_ZERO) Shape scale_offset_shape; AxisSet quantization_axes; - auto input_type = element::Type_t::f32; - auto output_type = element::Type_t::i8; + auto input_type = element::f32; + auto output_type = element::i8; typedef float input_c_type; typedef int8_t output_c_type; @@ -401,8 +401,8 @@ NGRAPH_TEST(${BACKEND_NAME}, quantize_ROUND_NEAREST_TOWARD_INFINITY) Shape scale_offset_shape; AxisSet quantization_axes; - auto input_type = element::Type_t::f32; - auto output_type = element::Type_t::i8; + auto input_type = element::f32; + auto output_type = element::i8; typedef float input_c_type; typedef int8_t output_c_type; @@ -433,8 +433,8 @@ NGRAPH_TEST(${BACKEND_NAME}, quantize_ROUND_NEAREST_UPWARD) Shape scale_offset_shape; AxisSet quantization_axes; - auto input_type = element::Type_t::f32; - auto output_type = element::Type_t::i8; + auto input_type = element::f32; + auto output_type = element::i8; typedef float input_c_type; typedef int8_t output_c_type; @@ -465,8 +465,8 @@ NGRAPH_TEST(${BACKEND_NAME}, quantize_ROUND_NEAREST_DOWNWARD) Shape scale_offset_shape; AxisSet quantization_axes; - auto input_type = element::Type_t::f32; - auto output_type = element::Type_t::i8; + auto input_type = element::f32; + auto output_type = element::i8; typedef float input_c_type; typedef int8_t output_c_type; @@ -497,8 +497,8 @@ NGRAPH_TEST(${BACKEND_NAME}, quantize_ROUND_NEAREST_TOWARD_EVEN) Shape scale_offset_shape; AxisSet quantization_axes; - auto input_type = element::Type_t::f32; - auto output_type = element::Type_t::i8; + auto input_type = element::f32; + auto output_type = element::i8; typedef float input_c_type; typedef int8_t output_c_type; @@ -529,8 +529,8 @@ NGRAPH_TEST(${BACKEND_NAME}, quantize_ROUND_TOWARD_INFINITY) Shape scale_offset_shape; AxisSet quantization_axes; - auto input_type = element::Type_t::f32; - auto output_type = element::Type_t::i8; + auto input_type = element::f32; + auto output_type = element::i8; typedef float input_c_type; typedef int8_t output_c_type; @@ -566,8 +566,8 @@ NGRAPH_TEST(${BACKEND_NAME}, quantize_ROUND_TOWARD_ZERO) Shape scale_offset_shape; AxisSet quantization_axes; - auto input_type = element::Type_t::f32; - auto output_type = element::Type_t::i8; + auto input_type = element::f32; + auto output_type = element::i8; typedef float input_c_type; typedef int8_t output_c_type; @@ -603,8 +603,8 @@ NGRAPH_TEST(${BACKEND_NAME}, quantize_ROUND_UP) Shape scale_offset_shape; AxisSet quantization_axes; - auto input_type = element::Type_t::f32; - auto output_type = element::Type_t::i8; + auto input_type = element::f32; + auto output_type = element::i8; typedef float input_c_type; typedef int8_t output_c_type; @@ -635,8 +635,8 @@ NGRAPH_TEST(${BACKEND_NAME}, quantize_ROUND_DOWN) Shape scale_offset_shape; AxisSet quantization_axes; - auto input_type = element::Type_t::f32; - auto output_type = element::Type_t::i8; + auto input_type = element::f32; + auto output_type = element::i8; typedef float input_c_type; typedef int8_t output_c_type; @@ -667,8 +667,8 @@ NGRAPH_TEST(${BACKEND_NAME}, quantize_dynamic_offset) Shape scale_offset_shape = {}; AxisSet quantization_axes; - auto input_type = element::Type_t::f32; - auto output_type = element::Type_t::u8; + auto input_type = element::f32; + auto output_type = element::u8; typedef float input_c_type; typedef uint8_t output_c_type; diff --git a/ngraph/test/backend/range.in.cpp b/ngraph/test/backend/range.in.cpp index 5fa671bf6fa786..8aa970796528bd 100644 --- a/ngraph/test/backend/range.in.cpp +++ b/ngraph/test/backend/range.in.cpp @@ -42,9 +42,9 @@ struct RangeTest NGRAPH_TEST(${BACKEND_NAME}, range) { // Create a graph for f(start,stop,step) = Range(start,stop,step). - auto start = make_shared(element::Type_t::i32, Shape{}); - auto stop = make_shared(element::Type_t::i32, Shape{}); - auto step = make_shared(element::Type_t::i32, Shape{}); + auto start = make_shared(element::i32, Shape{}); + auto stop = make_shared(element::i32, Shape{}); + auto step = make_shared(element::i32, Shape{}); auto range = make_shared(start, stop, step); ASSERT_TRUE(range->get_output_partial_shape(0).same_scheme(PartialShape::dynamic(1))); @@ -55,7 +55,7 @@ NGRAPH_TEST(${BACKEND_NAME}, range) auto ex = backend->compile(f); - auto t_r = backend->create_dynamic_tensor(element::Type_t::i32, PartialShape::dynamic()); + auto t_r = backend->create_dynamic_tensor(element::i32, PartialShape::dynamic()); std::vector> int32_tests = { RangeTest{0, 10, 1, Shape{10}, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}}, @@ -65,9 +65,9 @@ NGRAPH_TEST(${BACKEND_NAME}, range) for (auto& test : int32_tests) { - auto t_start = backend->create_tensor(element::Type_t::i32, Shape{}); - auto t_stop = backend->create_tensor(element::Type_t::i32, Shape{}); - auto t_step = backend->create_tensor(element::Type_t::i32, Shape{}); + auto t_start = backend->create_tensor(element::i32, Shape{}); + auto t_stop = backend->create_tensor(element::i32, Shape{}); + auto t_step = backend->create_tensor(element::i32, Shape{}); copy_data(t_start, std::vector{test.start}); copy_data(t_stop, std::vector{test.stop}); @@ -75,7 +75,7 @@ NGRAPH_TEST(${BACKEND_NAME}, range) ex->call_with_validate({t_r}, {t_start, t_stop, t_step}); - ASSERT_EQ(t_r->get_element_type(), element::Type_t::i32); + ASSERT_EQ(t_r->get_element_type(), element::i32); ASSERT_EQ(t_r->get_shape(), test.expected_result_shape); auto results = read_vector(t_r); diff --git a/ngraph/test/backend/reduce_max.in.cpp b/ngraph/test/backend/reduce_max.in.cpp index 8a4022af26f4b8..efd3bc68b24bc3 100644 --- a/ngraph/test/backend/reduce_max.in.cpp +++ b/ngraph/test/backend/reduce_max.in.cpp @@ -31,8 +31,8 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, reduce_max_to_scalar) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto A = make_shared(element::f32, shape); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); @@ -48,8 +48,8 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_to_scalar) NGRAPH_TEST(${BACKEND_NAME}, reduce_max_to_scalar_int8) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::i8, shape); - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto A = make_shared(element::i8, shape); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); @@ -65,9 +65,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_to_scalar_int8) NGRAPH_TEST(${BACKEND_NAME}, reduce_max_matrix_columns) { Shape shape_a{3, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{2}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); @@ -83,9 +83,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_matrix_columns) NGRAPH_TEST(${BACKEND_NAME}, reduce_max_matrix_rows) { Shape shape_a{3, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); @@ -101,9 +101,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_matrix_rows) NGRAPH_TEST(${BACKEND_NAME}, reduce_max_matrix_rows_int32) { Shape shape_a{3, 2}; - auto A = make_shared(element::Type_t::i32, shape_a); + auto A = make_shared(element::i32, shape_a); Shape shape_rt{3}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); @@ -119,9 +119,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_matrix_rows_int32) NGRAPH_TEST(${BACKEND_NAME}, reduce_max_matrix_rows_zero) { Shape shape_a{3, 0}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); @@ -140,18 +140,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_matrix_rows_zero) NGRAPH_TEST(${BACKEND_NAME}, reduce_max_matrix_rows_zero_int32) { Shape shape_a{3, 0}; - auto A = make_shared(element::Type_t::i32, shape_a); + auto A = make_shared(element::i32, shape_a); Shape shape_rt{3}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i32, shape_a); + auto a = backend->create_tensor(element::i32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::i32, shape_rt); + auto result = backend->create_tensor(element::i32, shape_rt); copy_data(result, vector({3, 3, 3})); int32_t minval = std::numeric_limits::has_infinity @@ -168,18 +168,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_matrix_cols_zero) { // Now the reduction (g(x:float32[2,2],y:float32[]) = reduce(x,y,f,axes={})). Shape shape_a{0, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{2}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); copy_data(result, vector({3, 3})); auto handle = backend->compile(f); @@ -192,18 +192,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_matrix_cols_zero) NGRAPH_TEST(${BACKEND_NAME}, reduce_max_vector_zero) { Shape shape_a{0}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); copy_data(result, vector({3})); auto handle = backend->compile(f); @@ -214,18 +214,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_vector_zero) NGRAPH_TEST(${BACKEND_NAME}, reduce_max_matrix_to_scalar_zero_by_zero) { Shape shape_a{0, 0}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{}; - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); copy_data(result, vector({3})); auto handle = backend->compile(f); @@ -236,9 +236,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_matrix_to_scalar_zero_by_zero) NGRAPH_TEST(${BACKEND_NAME}, reduce_max_3d_to_matrix_most_sig) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3, 3}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); @@ -255,9 +255,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_3d_to_matrix_most_sig) NGRAPH_TEST(${BACKEND_NAME}, reduce_max_3d_to_matrix_least_sig) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3, 3}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 2); + auto axes = make_shared(element::i32, Shape{}, 2); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); @@ -274,9 +274,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_3d_to_matrix_least_sig) NGRAPH_TEST(${BACKEND_NAME}, reduce_max_3d_to_vector) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3}; - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); @@ -293,9 +293,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_3d_to_vector) NGRAPH_TEST(${BACKEND_NAME}, reduce_max_3d_to_scalar) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{}; - auto axes = make_shared(element::Type_t::i32, Shape{3}, vector{0, 1, 2}); + auto axes = make_shared(element::i32, Shape{3}, vector{0, 1, 2}); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); @@ -312,19 +312,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_3d_to_scalar) NGRAPH_TEST(${BACKEND_NAME}, reduce_max_3d_to_scalar_int32) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::i32, shape_a); + auto A = make_shared(element::i32, shape_a); Shape shape_rt{}; - auto axes = make_shared(element::Type_t::i32, Shape{3}, vector{0, 1, 2}); + auto axes = make_shared(element::i32, Shape{3}, vector{0, 1, 2}); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i32, shape_a); + auto a = backend->create_tensor(element::i32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1}); - auto result = backend->create_tensor(element::Type_t::i32, shape_rt); + auto result = backend->create_tensor(element::i32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -334,19 +334,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_3d_to_scalar_int32) NGRAPH_TEST(${BACKEND_NAME}, reduce_max_3d_to_scalar_double) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::f64, shape_a); + auto A = make_shared(element::f64, shape_a); Shape shape_rt{}; - auto axes = make_shared(element::Type_t::i32, Shape{3}, vector{0, 1, 2}); + auto axes = make_shared(element::i32, Shape{3}, vector{0, 1, 2}); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f64, shape_a); + auto a = backend->create_tensor(element::f64, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1}); - auto result = backend->create_tensor(element::Type_t::f64, shape_rt); + auto result = backend->create_tensor(element::f64, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -356,18 +356,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_3d_to_scalar_double) NGRAPH_TEST(${BACKEND_NAME}, reduce_max_3d_eliminate_zero_dim) { Shape shape_a{3, 0, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3, 2}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); // Overwrite the initial result vector to make sure we're not just coincidentally getting the // right value. @@ -385,17 +385,17 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_3d_eliminate_zero_dim) NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_to_scalar) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto A = make_shared(element::f32, shape); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 2, 3, 4}); - auto result = backend->create_tensor(element::Type_t::f32, Shape{1, 1}); + auto result = backend->create_tensor(element::f32, Shape{1, 1}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -405,17 +405,17 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_to_scalar) NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_to_scalar_int8) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::i8, shape); - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto A = make_shared(element::i8, shape); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i8, shape); + auto a = backend->create_tensor(element::i8, shape); copy_data(a, vector{1, 2, 3, 4}); - auto result = backend->create_tensor(element::Type_t::i8, Shape{1, 1}); + auto result = backend->create_tensor(element::i8, Shape{1, 1}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -425,18 +425,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_to_scalar_int8) NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_matrix_columns) { Shape shape_a{3, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{1, 2}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -446,18 +446,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_matrix_columns) NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_matrix_rows) { Shape shape_a{3, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3, 1}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -467,18 +467,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_matrix_rows) NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_matrix_rows_int32) { Shape shape_a{3, 2}; - auto A = make_shared(element::Type_t::i32, shape_a); + auto A = make_shared(element::i32, shape_a); Shape shape_rt{3, 1}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i32, shape_a); + auto a = backend->create_tensor(element::i32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_tensor(element::Type_t::i32, shape_rt); + auto result = backend->create_tensor(element::i32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -488,18 +488,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_matrix_rows_int32) NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_matrix_rows_zero) { Shape shape_a{3, 0}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3, 1}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); copy_data(result, vector({3, 3, 3})); auto handle = backend->compile(f); @@ -513,18 +513,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_matrix_rows_zero) NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_matrix_rows_zero_int32) { Shape shape_a{3, 0}; - auto A = make_shared(element::Type_t::i32, shape_a); + auto A = make_shared(element::i32, shape_a); Shape shape_rt{3, 1}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i32, shape_a); + auto a = backend->create_tensor(element::i32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::i32, shape_rt); + auto result = backend->create_tensor(element::i32, shape_rt); copy_data(result, vector({3, 3, 3})); int32_t minval = std::numeric_limits::has_infinity @@ -541,18 +541,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_matrix_cols_zero) { // Now the reduction (g(x:float32[2,2],y:float32[]) = reduce(x,y,f,axes={})). Shape shape_a{0, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{1, 2}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); copy_data(result, vector({3, 3})); auto handle = backend->compile(f); @@ -565,18 +565,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_matrix_cols_zero) NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_vector_zero) { Shape shape_a{0}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{1}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); copy_data(result, vector({3})); auto handle = backend->compile(f); @@ -587,18 +587,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_vector_zero) NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_matrix_to_scalar_zero_by_zero) { Shape shape_a{0, 0}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{1, 1}; - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); copy_data(result, vector({3})); auto handle = backend->compile(f); @@ -609,19 +609,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_matrix_to_scalar_zero_by_zero) NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_3d_to_matrix_most_sig) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{1, 3, 3}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -633,19 +633,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_3d_to_matrix_most_sig) NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_3d_to_matrix_least_sig) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3, 3, 1}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 2); + auto axes = make_shared(element::i32, Shape{}, 2); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -657,19 +657,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_3d_to_matrix_least_sig) NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_3d_to_vector) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{1, 1, 3}; - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -681,19 +681,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_3d_to_vector) NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_3d_to_scalar) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{1, 1, 1}; - auto axes = make_shared(element::Type_t::i32, Shape{3}, vector{0, 1, 2}); + auto axes = make_shared(element::i32, Shape{3}, vector{0, 1, 2}); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -704,19 +704,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_3d_to_scalar) NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_3d_to_scalar_int32) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::i32, shape_a); + auto A = make_shared(element::i32, shape_a); Shape shape_rt{1, 1, 1}; - auto axes = make_shared(element::Type_t::i32, Shape{3}, vector{0, 1, 2}); + auto axes = make_shared(element::i32, Shape{3}, vector{0, 1, 2}); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i32, shape_a); + auto a = backend->create_tensor(element::i32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1}); - auto result = backend->create_tensor(element::Type_t::i32, shape_rt); + auto result = backend->create_tensor(element::i32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -726,19 +726,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_3d_to_scalar_int32) NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_3d_to_scalar_double) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::f64, shape_a); + auto A = make_shared(element::f64, shape_a); Shape shape_rt{1, 1, 1}; - auto axes = make_shared(element::Type_t::i32, Shape{3}, vector{0, 1, 2}); + auto axes = make_shared(element::i32, Shape{3}, vector{0, 1, 2}); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f64, shape_a); + auto a = backend->create_tensor(element::f64, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1}); - auto result = backend->create_tensor(element::Type_t::f64, shape_rt); + auto result = backend->create_tensor(element::f64, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -748,18 +748,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_3d_to_scalar_double) NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_3d_eliminate_zero_dim) { Shape shape_a{3, 0, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3, 1, 2}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); // Overwrite the initial result vector to make sure we're not just coincidentally getting the // right value. @@ -776,8 +776,8 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_3d_eliminate_zero_dim) NGRAPH_TEST(${BACKEND_NAME}, reduce_max_matrix_columns_dynamic) { - auto A = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto A = make_shared(element::f32, PartialShape::dynamic()); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); @@ -785,9 +785,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_matrix_columns_dynamic) // Create some tensors for input/output Shape shape_a{3, 2}; - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_dynamic_tensor(element::Type_t::f32, PartialShape::dynamic()); + auto result = backend->create_dynamic_tensor(element::f32, PartialShape::dynamic()); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -796,8 +796,8 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_matrix_columns_dynamic) NGRAPH_TEST(${BACKEND_NAME}, reduce_max_matrix_rows_dynamic) { - auto A = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto A = make_shared(element::f32, PartialShape::dynamic()); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); @@ -805,9 +805,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_matrix_rows_dynamic) // Create some tensors for input/output Shape shape_a{3, 2}; - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_dynamic_tensor(element::Type_t::f32, PartialShape::dynamic()); + auto result = backend->create_dynamic_tensor(element::f32, PartialShape::dynamic()); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -816,8 +816,8 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_matrix_rows_dynamic) NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_matrix_columns_dynamic) { - auto A = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto A = make_shared(element::f32, PartialShape::dynamic()); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); @@ -825,9 +825,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_matrix_columns_dynamic) // Create some tensors for input/output Shape shape_a{3, 2}; - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_dynamic_tensor(element::Type_t::f32, PartialShape::dynamic()); + auto result = backend->create_dynamic_tensor(element::f32, PartialShape::dynamic()); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -836,8 +836,8 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_matrix_columns_dynamic) NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_matrix_rows_dynamic) { - auto A = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto A = make_shared(element::f32, PartialShape::dynamic()); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); @@ -845,11 +845,11 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_max_keep_matrix_rows_dynamic) // Create some tensors for input/output Shape shape_a{3, 2}; - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_dynamic_tensor(element::Type_t::f32, PartialShape::dynamic()); + auto result = backend->create_dynamic_tensor(element::f32, PartialShape::dynamic()); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); EXPECT_TRUE(test::all_close_f((vector{2, 4, 6}), read_vector(result))); -} +} \ No newline at end of file diff --git a/ngraph/test/backend/reduce_mean.in.cpp b/ngraph/test/backend/reduce_mean.in.cpp index fc268aa88d8d3a..242f6907ea7b0d 100644 --- a/ngraph/test/backend/reduce_mean.in.cpp +++ b/ngraph/test/backend/reduce_mean.in.cpp @@ -33,17 +33,17 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, reduce_mean_to_scalar) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto A = make_shared(element::f32, shape); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 2, 3, 4}); - auto result = backend->create_tensor(element::Type_t::f32, Shape{}); + auto result = backend->create_tensor(element::f32, Shape{}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -54,17 +54,17 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_mean_to_scalar) NGRAPH_TEST(${BACKEND_NAME}, reduce_mean_to_scalar_int8) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::i8, shape); - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto A = make_shared(element::i8, shape); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i8, shape); + auto a = backend->create_tensor(element::i8, shape); copy_data(a, vector{1, 2, 3, 4}); - auto result = backend->create_tensor(element::Type_t::i8, Shape{}); + auto result = backend->create_tensor(element::i8, Shape{}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -74,18 +74,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_mean_to_scalar_int8) NGRAPH_TEST(${BACKEND_NAME}, reduce_mean_matrix_columns) { Shape shape_a{3, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{2}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -96,18 +96,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_mean_matrix_columns) NGRAPH_TEST(${BACKEND_NAME}, reduce_mean_matrix_rows) { Shape shape_a{3, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -118,18 +118,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_mean_matrix_rows) NGRAPH_TEST(${BACKEND_NAME}, reduce_mean_matrix_rows_int32) { Shape shape_a{3, 2}; - auto A = make_shared(element::Type_t::i32, shape_a); + auto A = make_shared(element::i32, shape_a); Shape shape_rt{3}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i32, shape_a); + auto a = backend->create_tensor(element::i32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_tensor(element::Type_t::i32, shape_rt); + auto result = backend->create_tensor(element::i32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -141,17 +141,17 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_mean_matrix_rows_int32) NGRAPH_TEST(${BACKEND_NAME}, reduce_mean_keep_to_scalar) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto A = make_shared(element::f32, shape); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 2, 3, 4}); - auto result = backend->create_tensor(element::Type_t::f32, Shape{1, 1}); + auto result = backend->create_tensor(element::f32, Shape{1, 1}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -162,17 +162,17 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_mean_keep_to_scalar) NGRAPH_TEST(${BACKEND_NAME}, reduce_mean_keep_to_scalar_int8) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::i8, shape); - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto A = make_shared(element::i8, shape); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i8, shape); + auto a = backend->create_tensor(element::i8, shape); copy_data(a, vector{1, 2, 3, 4}); - auto result = backend->create_tensor(element::Type_t::i8, Shape{1, 1}); + auto result = backend->create_tensor(element::i8, Shape{1, 1}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -182,18 +182,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_mean_keep_to_scalar_int8) NGRAPH_TEST(${BACKEND_NAME}, reduce_mean_keep_matrix_columns) { Shape shape_a{3, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{1, 2}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -204,18 +204,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_mean_keep_matrix_columns) NGRAPH_TEST(${BACKEND_NAME}, reduce_mean_keep_matrix_rows) { Shape shape_a{3, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3, 1}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -226,18 +226,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_mean_keep_matrix_rows) NGRAPH_TEST(${BACKEND_NAME}, reduce_mean_keep_matrix_rows_int32) { Shape shape_a{3, 2}; - auto A = make_shared(element::Type_t::i32, shape_a); + auto A = make_shared(element::i32, shape_a); Shape shape_rt{3, 1}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i32, shape_a); + auto a = backend->create_tensor(element::i32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_tensor(element::Type_t::i32, shape_rt); + auto result = backend->create_tensor(element::i32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -248,8 +248,8 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_mean_keep_matrix_rows_int32) NGRAPH_TEST(${BACKEND_NAME}, reduce_mean_matrix_columns_dynamic) { - auto A = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto A = make_shared(element::f32, PartialShape::dynamic()); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); @@ -257,9 +257,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_mean_matrix_columns_dynamic) // Create some tensors for input/output Shape shape_a{3, 2}; - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_dynamic_tensor(element::Type_t::f32, PartialShape::dynamic()); + auto result = backend->create_dynamic_tensor(element::f32, PartialShape::dynamic()); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -269,8 +269,8 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_mean_matrix_columns_dynamic) NGRAPH_TEST(${BACKEND_NAME}, reduce_mean_matrix_rows_dynamic) { - auto A = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto A = make_shared(element::f32, PartialShape::dynamic()); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); @@ -278,9 +278,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_mean_matrix_rows_dynamic) // Create some tensors for input/output Shape shape_a{3, 2}; - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_dynamic_tensor(element::Type_t::f32, PartialShape::dynamic()); + auto result = backend->create_dynamic_tensor(element::f32, PartialShape::dynamic()); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -290,8 +290,8 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_mean_matrix_rows_dynamic) NGRAPH_TEST(${BACKEND_NAME}, reduce_mean_keep_matrix_columns_dynamic) { - auto A = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto A = make_shared(element::f32, PartialShape::dynamic()); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); @@ -299,9 +299,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_mean_keep_matrix_columns_dynamic) // Create some tensors for input/output Shape shape_a{3, 2}; - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_dynamic_tensor(element::Type_t::f32, PartialShape::dynamic()); + auto result = backend->create_dynamic_tensor(element::f32, PartialShape::dynamic()); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -311,8 +311,8 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_mean_keep_matrix_columns_dynamic) NGRAPH_TEST(${BACKEND_NAME}, reduce_mean_keep_matrix_rows_dynamic) { - auto A = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto A = make_shared(element::f32, PartialShape::dynamic()); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); @@ -320,9 +320,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_mean_keep_matrix_rows_dynamic) // Create some tensors for input/output Shape shape_a{3, 2}; - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_dynamic_tensor(element::Type_t::f32, PartialShape::dynamic()); + auto result = backend->create_dynamic_tensor(element::f32, PartialShape::dynamic()); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); diff --git a/ngraph/test/backend/reduce_min.in.cpp b/ngraph/test/backend/reduce_min.in.cpp index 31ed9a00de6c37..ca95bacaf67b21 100644 --- a/ngraph/test/backend/reduce_min.in.cpp +++ b/ngraph/test/backend/reduce_min.in.cpp @@ -33,17 +33,17 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, reduce_min_to_scalar) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto A = make_shared(element::f32, shape); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 2, 3, 4}); - auto result = backend->create_tensor(element::Type_t::f32, Shape{}); + auto result = backend->create_tensor(element::f32, Shape{}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -54,17 +54,17 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_to_scalar) NGRAPH_TEST(${BACKEND_NAME}, reduce_min_to_scalar_int8) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::i8, shape); - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto A = make_shared(element::i8, shape); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i8, shape); + auto a = backend->create_tensor(element::i8, shape); copy_data(a, vector{1, 2, 3, 4}); - auto result = backend->create_tensor(element::Type_t::i8, Shape{}); + auto result = backend->create_tensor(element::i8, Shape{}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -74,18 +74,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_to_scalar_int8) NGRAPH_TEST(${BACKEND_NAME}, reduce_min_matrix_columns) { Shape shape_a{3, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{2}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -96,18 +96,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_matrix_columns) NGRAPH_TEST(${BACKEND_NAME}, reduce_min_matrix_rows) { Shape shape_a{3, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -118,18 +118,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_matrix_rows) NGRAPH_TEST(${BACKEND_NAME}, reduce_min_matrix_rows_int32) { Shape shape_a{3, 2}; - auto A = make_shared(element::Type_t::i32, shape_a); + auto A = make_shared(element::i32, shape_a); Shape shape_rt{3}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i32, shape_a); + auto a = backend->create_tensor(element::i32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_tensor(element::Type_t::i32, shape_rt); + auto result = backend->create_tensor(element::i32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -139,18 +139,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_matrix_rows_int32) NGRAPH_TEST(${BACKEND_NAME}, reduce_min_matrix_rows_zero) { Shape shape_a{3, 0}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); copy_data(result, vector({3, 3, 3})); auto handle = backend->compile(f); @@ -165,18 +165,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_matrix_cols_zero) { // Now the reduction (g(x:float32[2,2],y:float32[]) = reduce(x,y,f,axes={})). Shape shape_a{0, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{2}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); copy_data(result, vector({3, 3})); auto handle = backend->compile(f); @@ -189,18 +189,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_matrix_cols_zero) NGRAPH_TEST(${BACKEND_NAME}, reduce_min_vector_zero) { Shape shape_a{0}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); copy_data(result, vector({3})); auto handle = backend->compile(f); @@ -211,18 +211,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_vector_zero) NGRAPH_TEST(${BACKEND_NAME}, reduce_min_matrix_to_scalar_zero_by_zero) { Shape shape_a{0, 0}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{}; - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); copy_data(result, vector({3})); auto handle = backend->compile(f); @@ -233,19 +233,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_matrix_to_scalar_zero_by_zero) NGRAPH_TEST(${BACKEND_NAME}, reduce_min_3d_to_matrix_most_sig) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3, 3}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -257,19 +257,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_3d_to_matrix_most_sig) NGRAPH_TEST(${BACKEND_NAME}, reduce_min_3d_to_matrix_least_sig) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3, 3}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 2); + auto axes = make_shared(element::i32, Shape{}, 2); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -281,19 +281,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_3d_to_matrix_least_sig) NGRAPH_TEST(${BACKEND_NAME}, reduce_min_3d_to_vector) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3}; - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -304,19 +304,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_3d_to_vector) NGRAPH_TEST(${BACKEND_NAME}, reduce_min_3d_to_scalar) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{}; - auto axes = make_shared(element::Type_t::i32, Shape{3}, vector{0, 1, 2}); + auto axes = make_shared(element::i32, Shape{3}, vector{0, 1, 2}); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -327,19 +327,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_3d_to_scalar) NGRAPH_TEST(${BACKEND_NAME}, reduce_min_3d_to_scalar_int32) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::i32, shape_a); + auto A = make_shared(element::i32, shape_a); Shape shape_rt{}; - auto axes = make_shared(element::Type_t::i32, Shape{3}, vector{0, 1, 2}); + auto axes = make_shared(element::i32, Shape{3}, vector{0, 1, 2}); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i32, shape_a); + auto a = backend->create_tensor(element::i32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1}); - auto result = backend->create_tensor(element::Type_t::i32, shape_rt); + auto result = backend->create_tensor(element::i32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -349,18 +349,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_3d_to_scalar_int32) NGRAPH_TEST(${BACKEND_NAME}, reduce_min_3d_eliminate_zero_dim) { Shape shape_a{3, 0, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3, 2}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); // Overwrite the initial result vector to make sure we're not just coincidentally getting the // right value. @@ -378,17 +378,17 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_3d_eliminate_zero_dim) NGRAPH_TEST(${BACKEND_NAME}, reduce_min_keep_to_scalar) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto A = make_shared(element::f32, shape); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 2, 3, 4}); - auto result = backend->create_tensor(element::Type_t::f32, Shape{1, 1}); + auto result = backend->create_tensor(element::f32, Shape{1, 1}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -399,17 +399,17 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_keep_to_scalar) NGRAPH_TEST(${BACKEND_NAME}, reduce_min_keep_to_scalar_int8) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::i8, shape); - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto A = make_shared(element::i8, shape); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i8, shape); + auto a = backend->create_tensor(element::i8, shape); copy_data(a, vector{1, 2, 3, 4}); - auto result = backend->create_tensor(element::Type_t::i8, Shape{1, 1}); + auto result = backend->create_tensor(element::i8, Shape{1, 1}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -419,18 +419,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_keep_to_scalar_int8) NGRAPH_TEST(${BACKEND_NAME}, reduce_min_keep_matrix_columns) { Shape shape_a{3, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{1, 2}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -441,18 +441,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_keep_matrix_columns) NGRAPH_TEST(${BACKEND_NAME}, reduce_min_keep_matrix_rows) { Shape shape_a{3, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3, 1}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -463,18 +463,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_keep_matrix_rows) NGRAPH_TEST(${BACKEND_NAME}, reduce_min_keep_matrix_rows_int32) { Shape shape_a{3, 2}; - auto A = make_shared(element::Type_t::i32, shape_a); + auto A = make_shared(element::i32, shape_a); Shape shape_rt{3, 1}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i32, shape_a); + auto a = backend->create_tensor(element::i32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_tensor(element::Type_t::i32, shape_rt); + auto result = backend->create_tensor(element::i32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -484,18 +484,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_keep_matrix_rows_int32) NGRAPH_TEST(${BACKEND_NAME}, reduce_min_keep_matrix_rows_zero) { Shape shape_a{3, 0}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3, 1}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); copy_data(result, vector({3, 3, 3})); auto handle = backend->compile(f); @@ -510,18 +510,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_keep_matrix_cols_zero) { // Now the reduction (g(x:float32[2,2],y:float32[]) = reduce(x,y,f,axes={})). Shape shape_a{0, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{1, 2}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); copy_data(result, vector({3, 3})); auto handle = backend->compile(f); @@ -534,18 +534,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_keep_matrix_cols_zero) NGRAPH_TEST(${BACKEND_NAME}, reduce_min_keep_vector_zero) { Shape shape_a{0}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{1}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); copy_data(result, vector({3})); auto handle = backend->compile(f); @@ -556,18 +556,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_keep_vector_zero) NGRAPH_TEST(${BACKEND_NAME}, reduce_min_keep_matrix_to_scalar_zero_by_zero) { Shape shape_a{0, 0}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{1, 1}; - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); copy_data(result, vector({3})); auto handle = backend->compile(f); @@ -578,19 +578,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_keep_matrix_to_scalar_zero_by_zero) NGRAPH_TEST(${BACKEND_NAME}, reduce_min_keep_3d_to_matrix_most_sig) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{1, 3, 3}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -602,19 +602,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_keep_3d_to_matrix_most_sig) NGRAPH_TEST(${BACKEND_NAME}, reduce_min_keep_3d_to_matrix_least_sig) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3, 3, 1}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 2); + auto axes = make_shared(element::i32, Shape{}, 2); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -626,19 +626,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_keep_3d_to_matrix_least_sig) NGRAPH_TEST(${BACKEND_NAME}, reduce_min_keep_3d_to_vector) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{1, 1, 3}; - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -649,19 +649,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_keep_3d_to_vector) NGRAPH_TEST(${BACKEND_NAME}, reduce_min_keep_3d_to_scalar) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{1, 1, 1}; - auto axes = make_shared(element::Type_t::i32, Shape{3}, vector{0, 1, 2}); + auto axes = make_shared(element::i32, Shape{3}, vector{0, 1, 2}); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -672,19 +672,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_keep_3d_to_scalar) NGRAPH_TEST(${BACKEND_NAME}, reduce_min_keep_3d_to_scalar_int32) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::i32, shape_a); + auto A = make_shared(element::i32, shape_a); Shape shape_rt{1, 1, 1}; - auto axes = make_shared(element::Type_t::i32, Shape{3}, vector{0, 1, 2}); + auto axes = make_shared(element::i32, Shape{3}, vector{0, 1, 2}); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i32, shape_a); + auto a = backend->create_tensor(element::i32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1}); - auto result = backend->create_tensor(element::Type_t::i32, shape_rt); + auto result = backend->create_tensor(element::i32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -694,18 +694,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_keep_3d_to_scalar_int32) NGRAPH_TEST(${BACKEND_NAME}, reduce_min_keep_3d_eliminate_zero_dim) { Shape shape_a{3, 0, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3, 1, 2}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); // Overwrite the initial result vector to make sure we're not just coincidentally getting the // right value. @@ -722,8 +722,8 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_keep_3d_eliminate_zero_dim) NGRAPH_TEST(${BACKEND_NAME}, reduce_min_matrix_columns_dynamic) { - auto A = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto A = make_shared(element::f32, PartialShape::dynamic()); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); @@ -731,9 +731,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_matrix_columns_dynamic) // Create some tensors for input/output Shape shape_a{3, 2}; - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_dynamic_tensor(element::Type_t::f32, PartialShape::dynamic()); + auto result = backend->create_dynamic_tensor(element::f32, PartialShape::dynamic()); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -743,8 +743,8 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_matrix_columns_dynamic) NGRAPH_TEST(${BACKEND_NAME}, reduce_min_matrix_rows_dynamic) { - auto A = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto A = make_shared(element::f32, PartialShape::dynamic()); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); @@ -752,9 +752,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_matrix_rows_dynamic) // Create some tensors for input/output Shape shape_a{3, 2}; - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_dynamic_tensor(element::Type_t::f32, PartialShape::dynamic()); + auto result = backend->create_dynamic_tensor(element::f32, PartialShape::dynamic()); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -764,8 +764,8 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_matrix_rows_dynamic) NGRAPH_TEST(${BACKEND_NAME}, reduce_min_keep_matrix_columns_dynamic) { - auto A = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto A = make_shared(element::f32, PartialShape::dynamic()); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); @@ -773,9 +773,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_keep_matrix_columns_dynamic) // Create some tensors for input/output Shape shape_a{3, 2}; - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_dynamic_tensor(element::Type_t::f32, PartialShape::dynamic()); + auto result = backend->create_dynamic_tensor(element::f32, PartialShape::dynamic()); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -785,8 +785,8 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_keep_matrix_columns_dynamic) NGRAPH_TEST(${BACKEND_NAME}, reduce_min_keep_matrix_rows_dynamic) { - auto A = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto A = make_shared(element::f32, PartialShape::dynamic()); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); @@ -794,9 +794,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_min_keep_matrix_rows_dynamic) // Create some tensors for input/output Shape shape_a{3, 2}; - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_dynamic_tensor(element::Type_t::f32, PartialShape::dynamic()); + auto result = backend->create_dynamic_tensor(element::f32, PartialShape::dynamic()); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); diff --git a/ngraph/test/backend/reduce_prod.in.cpp b/ngraph/test/backend/reduce_prod.in.cpp index 87df2a5753566a..46d7427b1d4a06 100644 --- a/ngraph/test/backend/reduce_prod.in.cpp +++ b/ngraph/test/backend/reduce_prod.in.cpp @@ -33,17 +33,17 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, reduce_product_to_scalar) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto A = make_shared(element::f32, shape); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 2, 3, 4}); - auto result = backend->create_tensor(element::Type_t::f32, Shape{}); + auto result = backend->create_tensor(element::f32, Shape{}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -53,18 +53,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_to_scalar) NGRAPH_TEST(${BACKEND_NAME}, reduce_product_matrix_columns) { Shape shape_a{3, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{2}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -74,18 +74,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_matrix_columns) NGRAPH_TEST(${BACKEND_NAME}, reduce_product_matrix_rows) { Shape shape_a{3, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -95,18 +95,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_matrix_rows) NGRAPH_TEST(${BACKEND_NAME}, reduce_product_matrix_rows_zero) { Shape shape_a{3, 0}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); copy_data(result, vector({3, 3, 3})); auto handle = backend->compile(f); @@ -118,18 +118,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_matrix_cols_zero) { // Now the reduction (g(x:float32[2,2],y:float32[]) = reduce(x,y,f,axes={})). Shape shape_a{0, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{2}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); copy_data(result, vector({3, 3})); auto handle = backend->compile(f); @@ -140,18 +140,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_matrix_cols_zero) NGRAPH_TEST(${BACKEND_NAME}, reduce_product_vector_zero) { Shape shape_a{0}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); copy_data(result, vector({3})); auto handle = backend->compile(f); @@ -162,18 +162,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_vector_zero) NGRAPH_TEST(${BACKEND_NAME}, reduce_product_matrix_to_scalar_zero_by_zero) { Shape shape_a{0, 0}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{}; - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); copy_data(result, vector({3})); auto handle = backend->compile(f); @@ -184,19 +184,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_matrix_to_scalar_zero_by_zero) NGRAPH_TEST(${BACKEND_NAME}, reduce_product_3d_to_matrix_most_sig) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3, 3}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -215,19 +215,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_3d_to_matrix_most_sig) NGRAPH_TEST(${BACKEND_NAME}, reduce_product_3d_to_matrix_least_sig) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3, 3}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 2); + auto axes = make_shared(element::i32, Shape{}, 2); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -246,19 +246,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_3d_to_matrix_least_sig) NGRAPH_TEST(${BACKEND_NAME}, reduce_product_3d_to_vector) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3}; - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -272,19 +272,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_3d_to_vector) NGRAPH_TEST(${BACKEND_NAME}, reduce_product_3d_to_scalar) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{}; - auto axes = make_shared(element::Type_t::i32, Shape{3}, vector{0, 1, 2}); + auto axes = make_shared(element::i32, Shape{3}, vector{0, 1, 2}); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -298,18 +298,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_3d_to_scalar) NGRAPH_TEST(${BACKEND_NAME}, reduce_product_3d_eliminate_zero_dim) { Shape shape_a{3, 0, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3, 2}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); // Overwrite the initial result vector to make sure we're not just coincidentally getting the // right value. @@ -323,18 +323,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_3d_eliminate_zero_dim) NGRAPH_TEST(${BACKEND_NAME}, reduce_product_2d_to_scalar_int32) { Shape shape_a{3, 3}; - auto A = make_shared(element::Type_t::i32, shape_a); + auto A = make_shared(element::i32, shape_a); Shape shape_rt{}; - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i32, shape_a); + auto a = backend->create_tensor(element::i32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9}); - auto result = backend->create_tensor(element::Type_t::i32, shape_rt); + auto result = backend->create_tensor(element::i32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -344,17 +344,17 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_2d_to_scalar_int32) NGRAPH_TEST(${BACKEND_NAME}, reduce_product_to_scalar_int32) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::i32, shape); - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto A = make_shared(element::i32, shape); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i32, shape); + auto a = backend->create_tensor(element::i32, shape); copy_data(a, vector{1, 2, 3, 4}); - auto result = backend->create_tensor(element::Type_t::i32, Shape{}); + auto result = backend->create_tensor(element::i32, Shape{}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -364,17 +364,17 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_to_scalar_int32) NGRAPH_TEST(${BACKEND_NAME}, reduce_product_to_scalar_int8) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::i8, shape); - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto A = make_shared(element::i8, shape); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i8, shape); + auto a = backend->create_tensor(element::i8, shape); copy_data(a, vector{1, 2, 3, 4}); - auto result = backend->create_tensor(element::Type_t::i8, Shape{}); + auto result = backend->create_tensor(element::i8, Shape{}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -386,17 +386,17 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_to_scalar_int8) NGRAPH_TEST(${BACKEND_NAME}, reduce_product_keep_to_scalar) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto A = make_shared(element::f32, shape); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 2, 3, 4}); - auto result = backend->create_tensor(element::Type_t::f32, Shape{1, 1}); + auto result = backend->create_tensor(element::f32, Shape{1, 1}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -406,18 +406,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_keep_to_scalar) NGRAPH_TEST(${BACKEND_NAME}, reduce_product_keep_matrix_columns) { Shape shape_a{3, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{1, 2}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -427,18 +427,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_keep_matrix_columns) NGRAPH_TEST(${BACKEND_NAME}, reduce_product_keep_matrix_rows) { Shape shape_a{3, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3, 1}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -448,18 +448,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_keep_matrix_rows) NGRAPH_TEST(${BACKEND_NAME}, reduce_product_keep_matrix_rows_zero) { Shape shape_a{3, 0}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3, 1}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); copy_data(result, vector({3, 3, 3})); auto handle = backend->compile(f); @@ -471,18 +471,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_keep_matrix_cols_zero) { // Now the reduction (g(x:float32[2,2],y:float32[]) = reduce(x,y,f,axes={})). Shape shape_a{0, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{1, 2}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); copy_data(result, vector({3, 3})); auto handle = backend->compile(f); @@ -493,18 +493,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_keep_matrix_cols_zero) NGRAPH_TEST(${BACKEND_NAME}, reduce_product_keep_vector_zero) { Shape shape_a{0}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{1}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); copy_data(result, vector({3})); auto handle = backend->compile(f); @@ -515,18 +515,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_keep_vector_zero) NGRAPH_TEST(${BACKEND_NAME}, reduce_product_keep_matrix_to_scalar_zero_by_zero) { Shape shape_a{0, 0}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{1, 1}; - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); copy_data(result, vector({3})); auto handle = backend->compile(f); @@ -537,19 +537,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_keep_matrix_to_scalar_zero_by_zero) NGRAPH_TEST(${BACKEND_NAME}, reduce_product_keep_3d_to_matrix_most_sig) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{1, 3, 3}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -568,19 +568,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_keep_3d_to_matrix_most_sig) NGRAPH_TEST(${BACKEND_NAME}, reduce_product_keep_3d_to_matrix_least_sig) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3, 3, 1}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 2); + auto axes = make_shared(element::i32, Shape{}, 2); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -599,19 +599,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_keep_3d_to_matrix_least_sig) NGRAPH_TEST(${BACKEND_NAME}, reduce_product_keep_3d_to_vector) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{1, 1, 3}; - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -625,19 +625,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_keep_3d_to_vector) NGRAPH_TEST(${BACKEND_NAME}, reduce_product_keep_3d_to_scalar) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{1, 1, 1}; - auto axes = make_shared(element::Type_t::i32, Shape{3}, vector{0, 1, 2}); + auto axes = make_shared(element::i32, Shape{3}, vector{0, 1, 2}); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -651,18 +651,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_keep_3d_to_scalar) NGRAPH_TEST(${BACKEND_NAME}, reduce_product_keep_3d_eliminate_zero_dim) { Shape shape_a{3, 0, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3, 1, 2}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); // Overwrite the initial result vector to make sure we're not just coincidentally getting the // right value. @@ -676,18 +676,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_keep_3d_eliminate_zero_dim) NGRAPH_TEST(${BACKEND_NAME}, reduce_product_keep_2d_to_scalar_int32) { Shape shape_a{3, 3}; - auto A = make_shared(element::Type_t::i32, shape_a); + auto A = make_shared(element::i32, shape_a); Shape shape_rt{1, 1}; - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i32, shape_a); + auto a = backend->create_tensor(element::i32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9}); - auto result = backend->create_tensor(element::Type_t::i32, shape_rt); + auto result = backend->create_tensor(element::i32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -697,17 +697,17 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_keep_2d_to_scalar_int32) NGRAPH_TEST(${BACKEND_NAME}, reduce_product_keep_to_scalar_int32) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::i32, shape); - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto A = make_shared(element::i32, shape); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i32, shape); + auto a = backend->create_tensor(element::i32, shape); copy_data(a, vector{1, 2, 3, 4}); - auto result = backend->create_tensor(element::Type_t::i32, Shape{1, 1}); + auto result = backend->create_tensor(element::i32, Shape{1, 1}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -717,17 +717,17 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_keep_to_scalar_int32) NGRAPH_TEST(${BACKEND_NAME}, reduce_product_keep_to_scalar_int8) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::i8, shape); - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto A = make_shared(element::i8, shape); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i8, shape); + auto a = backend->create_tensor(element::i8, shape); copy_data(a, vector{1, 2, 3, 4}); - auto result = backend->create_tensor(element::Type_t::i8, Shape{1, 1}); + auto result = backend->create_tensor(element::i8, Shape{1, 1}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -738,8 +738,8 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_keep_to_scalar_int8) NGRAPH_TEST(${BACKEND_NAME}, reduce_product_matrix_columns_dynamic) { - auto A = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto A = make_shared(element::f32, PartialShape::dynamic()); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); @@ -747,9 +747,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_matrix_columns_dynamic) // Create some tensors for input/output Shape shape_a{3, 2}; - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_dynamic_tensor(element::Type_t::f32, PartialShape::dynamic()); + auto result = backend->create_dynamic_tensor(element::f32, PartialShape::dynamic()); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -758,8 +758,8 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_matrix_columns_dynamic) NGRAPH_TEST(${BACKEND_NAME}, reduce_product_matrix_rows_dynamic) { - auto A = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto A = make_shared(element::f32, PartialShape::dynamic()); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); @@ -767,9 +767,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_matrix_rows_dynamic) // Create some tensors for input/output Shape shape_a{3, 2}; - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_dynamic_tensor(element::Type_t::f32, PartialShape::dynamic()); + auto result = backend->create_dynamic_tensor(element::f32, PartialShape::dynamic()); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -778,8 +778,8 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_matrix_rows_dynamic) NGRAPH_TEST(${BACKEND_NAME}, reduce_product_keep_matrix_columns_dynamic) { - auto A = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto A = make_shared(element::f32, PartialShape::dynamic()); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); @@ -787,9 +787,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_keep_matrix_columns_dynamic) // Create some tensors for input/output Shape shape_a{3, 2}; - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_dynamic_tensor(element::Type_t::f32, PartialShape::dynamic()); + auto result = backend->create_dynamic_tensor(element::f32, PartialShape::dynamic()); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -798,8 +798,8 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_keep_matrix_columns_dynamic) NGRAPH_TEST(${BACKEND_NAME}, reduce_product_keep_matrix_rows_dynamic) { - auto A = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto A = make_shared(element::f32, PartialShape::dynamic()); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); @@ -807,9 +807,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_product_keep_matrix_rows_dynamic) // Create some tensors for input/output Shape shape_a{3, 2}; - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_dynamic_tensor(element::Type_t::f32, PartialShape::dynamic()); + auto result = backend->create_dynamic_tensor(element::f32, PartialShape::dynamic()); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); diff --git a/ngraph/test/backend/reduce_sum.in.cpp b/ngraph/test/backend/reduce_sum.in.cpp index 0f93b0c1efdf00..9d49ae671d1d34 100644 --- a/ngraph/test/backend/reduce_sum.in.cpp +++ b/ngraph/test/backend/reduce_sum.in.cpp @@ -43,17 +43,17 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_to_scalar) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto A = make_shared(element::f32, shape); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 2, 3, 4}); - auto result = backend->create_tensor(element::Type_t::f32, Shape{}); + auto result = backend->create_tensor(element::f32, Shape{}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -63,8 +63,8 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_to_scalar) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_large_1d_to_scalar) { Shape shape{1000000}; - auto A = make_shared(element::Type_t::f32, shape); - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto A = make_shared(element::f32, shape); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); @@ -79,9 +79,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_large_1d_to_scalar) v_a[i] = static_cast(random_generator() % 255); r += static_cast(v_a[i]); } - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, v_a); - auto result = backend->create_tensor(element::Type_t::f32, Shape{}); + auto result = backend->create_tensor(element::f32, Shape{}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -93,18 +93,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_large_1d_to_scalar) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_matrix_columns) { Shape shape_a{3, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{2}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -114,9 +114,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_matrix_columns) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_matrix_6d) { Shape shape_a{2, 6, 4, 5, 7, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{2, 4, 5, 3}; - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{1, 4}); + auto axes = make_shared(element::i32, Shape{2}, vector{1, 4}); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); @@ -124,10 +124,10 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_matrix_6d) auto backend_ref = runtime::Backend::create("INTERPRETER"); // Create some tensors for input/output - auto a_wrk = backend_wrk->create_tensor(element::Type_t::f32, shape_a); - auto a_ref = backend_ref->create_tensor(element::Type_t::f32, shape_a); - auto result_wrk = backend_wrk->create_tensor(element::Type_t::f32, shape_rt); - auto result_ref = backend_ref->create_tensor(element::Type_t::f32, shape_rt); + auto a_wrk = backend_wrk->create_tensor(element::f32, shape_a); + auto a_ref = backend_ref->create_tensor(element::f32, shape_a); + auto result_wrk = backend_wrk->create_tensor(element::f32, shape_rt); + auto result_ref = backend_ref->create_tensor(element::f32, shape_rt); vector inp_data(shape_size(shape_a)); iota(inp_data.begin(), inp_data.end(), 1.f); @@ -145,18 +145,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_matrix_6d) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_matrix_rows) { Shape shape_a{3, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -166,18 +166,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_matrix_rows) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_matrix_rows_zero) { Shape shape_a{3, 0}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); copy_data(result, vector({3, 3, 3})); auto handle = backend->compile(f); @@ -189,18 +189,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_matrix_cols_zero) { // Now the reduction (g(x:float32[2,2],y:float32[]) = reduce(x,y,f,axes={})). Shape shape_a{0, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{2}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); copy_data(result, vector({3, 3})); auto handle = backend->compile(f); @@ -211,18 +211,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_matrix_cols_zero) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_vector_zero) { Shape shape_a{0}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); copy_data(result, vector({3})); auto handle = backend->compile(f); @@ -233,18 +233,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_vector_zero) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_matrix_to_scalar_zero_by_zero) { Shape shape_a{0, 0}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{}; - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); copy_data(result, vector({3})); auto handle = backend->compile(f); @@ -255,19 +255,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_matrix_to_scalar_zero_by_zero) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_3d_to_matrix_most_sig) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3, 3}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -286,19 +286,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_3d_to_matrix_most_sig) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_3d_to_matrix_least_sig) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3, 3}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 2); + auto axes = make_shared(element::i32, Shape{}, 2); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -317,19 +317,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_3d_to_matrix_least_sig) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_3d_to_vector) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3}; - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -342,19 +342,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_3d_to_vector) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_3d_to_scalar) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{}; - auto axes = make_shared(element::Type_t::i32, Shape{3}, vector{0, 1, 2}); + auto axes = make_shared(element::i32, Shape{3}, vector{0, 1, 2}); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -367,19 +367,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_3d_to_scalar) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_3d_to_scalar_int32) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::i32, shape_a); + auto A = make_shared(element::i32, shape_a); Shape shape_rt{}; - auto axes = make_shared(element::Type_t::i32, Shape{3}, vector{0, 1, 2}); + auto axes = make_shared(element::i32, Shape{3}, vector{0, 1, 2}); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i32, shape_a); + auto a = backend->create_tensor(element::i32, shape_a); copy_data(a, vector{0x40000001, 10, 19, 4, 13, 22, 7, 16, 25, 2, 11, 20, 5, 14, 23, 8, 17, 26, 3, 12, 21, 6, 15, 24, 9, 18, 27}); - auto result = backend->create_tensor(element::Type_t::i32, shape_rt); + auto result = backend->create_tensor(element::i32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -391,18 +391,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_3d_to_scalar_int32) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_3d_eliminate_zero_dim) { Shape shape_a{3, 0, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3, 2}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); // Overwrite the initial result vector to make sure we're not just coincidentally getting the // right value. @@ -416,18 +416,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_3d_eliminate_zero_dim) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_3d_eliminate_zero_dim_int32) { Shape shape_a{3, 0, 2}; - auto A = make_shared(element::Type_t::i32, shape_a); + auto A = make_shared(element::i32, shape_a); Shape shape_rt{3, 2}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i32, shape_a); + auto a = backend->create_tensor(element::i32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::i32, shape_rt); + auto result = backend->create_tensor(element::i32, shape_rt); // Overwrite the initial result vector to make sure we're not just coincidentally getting the // right value. @@ -441,19 +441,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_3d_eliminate_zero_dim_int32) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_5d_to_scalar) { Shape shape_a{3, 3, 3, 3, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{}; - auto axes = - make_shared(element::Type_t::i32, Shape{5}, vector{0, 1, 2, 3, 4}); + auto axes = make_shared(element::i32, Shape{5}, vector{0, 1, 2, 3, 4}); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, std::vector(std::pow(3, 5), 1)); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -463,19 +462,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_5d_to_scalar) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_5d_to_scalar_int32) { Shape shape_a{3, 3, 3, 3, 3}; - auto A = make_shared(element::Type_t::i32, shape_a); + auto A = make_shared(element::i32, shape_a); Shape shape_rt{}; - auto axes = - make_shared(element::Type_t::i32, Shape{5}, vector{0, 1, 2, 3, 4}); + auto axes = make_shared(element::i32, Shape{5}, vector{0, 1, 2, 3, 4}); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i32, shape_a); + auto a = backend->create_tensor(element::i32, shape_a); copy_data(a, std::vector(std::pow(3, 5), 1)); - auto result = backend->create_tensor(element::Type_t::i32, shape_rt); + auto result = backend->create_tensor(element::i32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -485,18 +483,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_5d_to_scalar_int32) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_2d_to_scalar_int8) { Shape shape_a{3, 3}; - auto A = make_shared(element::Type_t::i8, shape_a); + auto A = make_shared(element::i8, shape_a); Shape shape_rt{}; - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i8, shape_a); + auto a = backend->create_tensor(element::i8, shape_a); copy_data(a, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9}); - auto result = backend->create_tensor(element::Type_t::i8, shape_rt); + auto result = backend->create_tensor(element::i8, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -507,17 +505,17 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_trivial_in_double) { Shape shape{4, 3}; Shape rshape{3}; - auto A = make_shared(element::Type_t::f64, shape); - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto A = make_shared(element::f64, shape); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f64, shape); + auto a = backend->create_tensor(element::f64, shape); copy_data(a, vector{12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7}); - auto result = backend->create_tensor(element::Type_t::f64, rshape); + auto result = backend->create_tensor(element::f64, rshape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -535,10 +533,10 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_stable_acc) return; } Shape shape_a{10, 10, 10, 30}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{10}; - auto axes = make_shared(element::Type_t::i32, Shape{3}, vector{1, 2, 3}); + auto axes = make_shared(element::i32, Shape{3}, vector{1, 2, 3}); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); @@ -570,10 +568,10 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_stable_acc_double) return; } Shape shape_a{10, 10, 20, 300}; - auto A = make_shared(element::Type_t::f64, shape_a); + auto A = make_shared(element::f64, shape_a); Shape shape_rt{10}; - auto axes = make_shared(element::Type_t::i32, Shape{3}, vector{1, 2, 3}); + auto axes = make_shared(element::i32, Shape{3}, vector{1, 2, 3}); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); @@ -603,10 +601,10 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_stable_simple_float) return; } Shape shape_a{20}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); @@ -634,10 +632,10 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_stable_simple_double) return; } Shape shape_a{20}; - auto A = make_shared(element::Type_t::f64, shape_a); + auto A = make_shared(element::f64, shape_a); Shape shape_rt{}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); @@ -678,10 +676,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_stable_simple_double) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_dynamic) { // Create a graph for f(x,axes:int32) = Sum(x,Convert(axes)). - auto x = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto axes = - make_shared(element::Type_t::i32, PartialShape{Dimension::dynamic()}); - auto axes_i64 = make_shared(axes, element::Type_t::i64); + auto x = make_shared(element::f32, PartialShape::dynamic()); + auto axes = make_shared(element::i32, PartialShape{Dimension::dynamic()}); + auto axes_i64 = make_shared(axes, element::i64); auto sum = make_shared(x, axes_i64, false); ASSERT_TRUE(sum->get_output_partial_shape(0).rank().is_dynamic()); @@ -692,7 +689,7 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_dynamic) auto ex = backend->compile(f); - auto t_r = backend->create_dynamic_tensor(element::Type_t::f32, PartialShape::dynamic()); + auto t_r = backend->create_dynamic_tensor(element::f32, PartialShape::dynamic()); std::vector x_shapes{ Shape{2, 3}, Shape{2, 3}, Shape{2, 3}, Shape{2, 3}, Shape{5}, Shape{5}}; @@ -710,8 +707,8 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_dynamic) for (size_t i = 0; i < x_shapes.size(); i++) { - auto t_x = backend->create_tensor(element::Type_t::f32, x_shapes[i]); - auto t_axes = backend->create_tensor(element::Type_t::i32, Shape{axeses[i].size()}); + auto t_x = backend->create_tensor(element::f32, x_shapes[i]); + auto t_axes = backend->create_tensor(element::i32, Shape{axeses[i].size()}); copy_data(t_x, inputs[i]); copy_data(t_axes, axeses[i]); @@ -729,8 +726,8 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_dynamic) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_inf) { Shape shape{7, 4}; - auto A = make_shared(element::Type_t::f32, shape); - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto A = make_shared(element::f32, shape); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); @@ -739,7 +736,7 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_inf) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, test::NDArray({{-infi, 0, 0, infi}, {infi, 100, -100, -infi}, @@ -749,7 +746,7 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_inf) {infi, infi, infi, -infi}, {infi, std::nanf(""), 42, infi}}) .get_vector()); - auto result = backend->create_tensor(element::Type_t::f32, Shape{7}); + auto result = backend->create_tensor(element::f32, Shape{7}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -769,17 +766,17 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_inf) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_to_scalar) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto A = make_shared(element::f32, shape); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 2, 3, 4}); - auto result = backend->create_tensor(element::Type_t::f32, Shape{1, 1}); + auto result = backend->create_tensor(element::f32, Shape{1, 1}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -789,8 +786,8 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_to_scalar) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_large_1d_to_scalar) { Shape shape{1000000}; - auto A = make_shared(element::Type_t::f32, shape); - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto A = make_shared(element::f32, shape); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); @@ -805,9 +802,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_large_1d_to_scalar) v_a[i] = static_cast(random_generator() % 255); r += static_cast(v_a[i]); } - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, v_a); - auto result = backend->create_tensor(element::Type_t::f32, Shape{1}); + auto result = backend->create_tensor(element::f32, Shape{1}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -819,18 +816,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_large_1d_to_scalar) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_matrix_columns) { Shape shape_a{3, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{1, 2}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -840,9 +837,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_matrix_columns) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_matrix_6d) { Shape shape_a{2, 6, 4, 5, 7, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{2, 1, 4, 5, 1, 3}; - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{1, 4}); + auto axes = make_shared(element::i32, Shape{2}, vector{1, 4}); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); @@ -850,10 +847,10 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_matrix_6d) auto backend_ref = runtime::Backend::create("INTERPRETER"); // Create some tensors for input/output - auto a_wrk = backend_wrk->create_tensor(element::Type_t::f32, shape_a); - auto a_ref = backend_ref->create_tensor(element::Type_t::f32, shape_a); - auto result_wrk = backend_wrk->create_tensor(element::Type_t::f32, shape_rt); - auto result_ref = backend_ref->create_tensor(element::Type_t::f32, shape_rt); + auto a_wrk = backend_wrk->create_tensor(element::f32, shape_a); + auto a_ref = backend_ref->create_tensor(element::f32, shape_a); + auto result_wrk = backend_wrk->create_tensor(element::f32, shape_rt); + auto result_ref = backend_ref->create_tensor(element::f32, shape_rt); vector inp_data(shape_size(shape_a)); iota(inp_data.begin(), inp_data.end(), 1.f); @@ -871,18 +868,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_matrix_6d) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_matrix_rows) { Shape shape_a{3, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3, 1}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -892,18 +889,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_matrix_rows) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_matrix_rows_zero) { Shape shape_a{3, 0}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3, 1}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); copy_data(result, vector({3, 3, 3})); auto handle = backend->compile(f); @@ -915,18 +912,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_matrix_cols_zero) { // Now the reduction (g(x:float32[2,2],y:float32[]) = reduce(x,y,f,axes={})). Shape shape_a{0, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{1, 2}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); copy_data(result, vector({3, 3})); auto handle = backend->compile(f); @@ -937,18 +934,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_matrix_cols_zero) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_vector_zero) { Shape shape_a{0}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{1}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); copy_data(result, vector({3})); auto handle = backend->compile(f); @@ -959,18 +956,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_vector_zero) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_matrix_to_scalar_zero_by_zero) { Shape shape_a{0, 0}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{1, 1}; - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); copy_data(result, vector({3})); auto handle = backend->compile(f); @@ -981,19 +978,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_matrix_to_scalar_zero_by_zero) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_3d_to_matrix_most_sig) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{1, 3, 3}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -1012,19 +1009,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_3d_to_matrix_most_sig) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_3d_to_matrix_least_sig) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3, 3, 1}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 2); + auto axes = make_shared(element::i32, Shape{}, 2); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -1043,19 +1040,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_3d_to_matrix_least_sig) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_3d_to_vector) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{1, 1, 3}; - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -1068,19 +1065,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_3d_to_vector) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_3d_to_scalar) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{1, 1, 1}; - auto axes = make_shared(element::Type_t::i32, Shape{3}, vector{0, 1, 2}); + auto axes = make_shared(element::i32, Shape{3}, vector{0, 1, 2}); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -1093,19 +1090,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_3d_to_scalar) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_3d_to_scalar_int32) { Shape shape_a{3, 3, 3}; - auto A = make_shared(element::Type_t::i32, shape_a); + auto A = make_shared(element::i32, shape_a); Shape shape_rt{1, 1, 1}; - auto axes = make_shared(element::Type_t::i32, Shape{3}, vector{0, 1, 2}); + auto axes = make_shared(element::i32, Shape{3}, vector{0, 1, 2}); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i32, shape_a); + auto a = backend->create_tensor(element::i32, shape_a); copy_data(a, vector{0x40000001, 10, 19, 4, 13, 22, 7, 16, 25, 2, 11, 20, 5, 14, 23, 8, 17, 26, 3, 12, 21, 6, 15, 24, 9, 18, 27}); - auto result = backend->create_tensor(element::Type_t::i32, shape_rt); + auto result = backend->create_tensor(element::i32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -1117,18 +1114,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_3d_to_scalar_int32) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_3d_eliminate_zero_dim) { Shape shape_a{3, 0, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{3, 1, 2}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); // Overwrite the initial result vector to make sure we're not just coincidentally getting the // right value. @@ -1142,18 +1139,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_3d_eliminate_zero_dim) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_3d_eliminate_zero_dim_int32) { Shape shape_a{3, 0, 2}; - auto A = make_shared(element::Type_t::i32, shape_a); + auto A = make_shared(element::i32, shape_a); Shape shape_rt{3, 1, 2}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i32, shape_a); + auto a = backend->create_tensor(element::i32, shape_a); copy_data(a, vector{}); - auto result = backend->create_tensor(element::Type_t::i32, shape_rt); + auto result = backend->create_tensor(element::i32, shape_rt); // Overwrite the initial result vector to make sure we're not just coincidentally getting the // right value. @@ -1167,19 +1164,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_3d_eliminate_zero_dim_int32) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_5d_to_scalar) { Shape shape_a{3, 3, 3, 3, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{1, 1, 1, 1, 1}; - auto axes = - make_shared(element::Type_t::i32, Shape{5}, vector{0, 1, 2, 3, 4}); + auto axes = make_shared(element::i32, Shape{5}, vector{0, 1, 2, 3, 4}); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, std::vector(std::pow(3, 5), 1)); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -1189,19 +1185,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_5d_to_scalar) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_5d_to_scalar_int32) { Shape shape_a{3, 3, 3, 3, 3}; - auto A = make_shared(element::Type_t::i32, shape_a); + auto A = make_shared(element::i32, shape_a); Shape shape_rt{1, 1, 1, 1, 1}; - auto axes = - make_shared(element::Type_t::i32, Shape{5}, vector{0, 1, 2, 3, 4}); + auto axes = make_shared(element::i32, Shape{5}, vector{0, 1, 2, 3, 4}); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i32, shape_a); + auto a = backend->create_tensor(element::i32, shape_a); copy_data(a, std::vector(std::pow(3, 5), 1)); - auto result = backend->create_tensor(element::Type_t::i32, shape_rt); + auto result = backend->create_tensor(element::i32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -1211,18 +1206,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_5d_to_scalar_int32) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_2d_to_scalar_int8) { Shape shape_a{3, 3}; - auto A = make_shared(element::Type_t::i8, shape_a); + auto A = make_shared(element::i8, shape_a); Shape shape_rt{1, 1}; - auto axes = make_shared(element::Type_t::i32, Shape{2}, vector{0, 1}); + auto axes = make_shared(element::i32, Shape{2}, vector{0, 1}); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i8, shape_a); + auto a = backend->create_tensor(element::i8, shape_a); copy_data(a, std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9}); - auto result = backend->create_tensor(element::Type_t::i8, shape_rt); + auto result = backend->create_tensor(element::i8, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -1233,17 +1228,17 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_trivial_in_double) { Shape shape{4, 3}; Shape rshape{1, 3}; - auto A = make_shared(element::Type_t::f64, shape); - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto A = make_shared(element::f64, shape); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f64, shape); + auto a = backend->create_tensor(element::f64, shape); copy_data(a, vector{12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7}); - auto result = backend->create_tensor(element::Type_t::f64, rshape); + auto result = backend->create_tensor(element::f64, rshape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -1261,10 +1256,10 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_stable_acc) return; } Shape shape_a{10, 10, 10, 30}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{10, 1, 1, 1}; - auto axes = make_shared(element::Type_t::i32, Shape{3}, vector{1, 2, 3}); + auto axes = make_shared(element::i32, Shape{3}, vector{1, 2, 3}); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); @@ -1296,10 +1291,10 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_stable_acc_double) return; } Shape shape_a{10, 10, 20, 300}; - auto A = make_shared(element::Type_t::f64, shape_a); + auto A = make_shared(element::f64, shape_a); Shape shape_rt{10, 1, 1, 1}; - auto axes = make_shared(element::Type_t::i32, Shape{3}, vector{1, 2, 3}); + auto axes = make_shared(element::i32, Shape{3}, vector{1, 2, 3}); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); @@ -1329,10 +1324,10 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_stable_simple_float) return; } Shape shape_a{20}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{1}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); @@ -1360,10 +1355,10 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_stable_simple_double) return; } Shape shape_a{20}; - auto A = make_shared(element::Type_t::f64, shape_a); + auto A = make_shared(element::f64, shape_a); Shape shape_rt{1}; - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); @@ -1404,10 +1399,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_stable_simple_double) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_dynamic) { // Create a graph for f(x,axes:int32) = Sum(x,Convert(axes)). - auto x = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto axes = - make_shared(element::Type_t::i32, PartialShape{Dimension::dynamic()}); - auto axes_i64 = make_shared(axes, element::Type_t::i64); + auto x = make_shared(element::f32, PartialShape::dynamic()); + auto axes = make_shared(element::i32, PartialShape{Dimension::dynamic()}); + auto axes_i64 = make_shared(axes, element::i64); auto sum = make_shared(x, axes_i64, true); ASSERT_TRUE(sum->get_output_partial_shape(0).rank().is_dynamic()); @@ -1418,7 +1412,7 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_dynamic) auto ex = backend->compile(f); - auto t_r = backend->create_dynamic_tensor(element::Type_t::f32, PartialShape::dynamic()); + auto t_r = backend->create_dynamic_tensor(element::f32, PartialShape::dynamic()); std::vector x_shapes{ Shape{2, 3}, Shape{2, 3}, Shape{2, 3}, Shape{2, 3}, Shape{5}, Shape{5}}; @@ -1436,8 +1430,8 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_dynamic) for (size_t i = 0; i < x_shapes.size(); i++) { - auto t_x = backend->create_tensor(element::Type_t::f32, x_shapes[i]); - auto t_axes = backend->create_tensor(element::Type_t::i32, Shape{axeses[i].size()}); + auto t_x = backend->create_tensor(element::f32, x_shapes[i]); + auto t_axes = backend->create_tensor(element::i32, Shape{axeses[i].size()}); copy_data(t_x, inputs[i]); copy_data(t_axes, axeses[i]); @@ -1455,8 +1449,8 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_dynamic) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_inf) { Shape shape{7, 4}; - auto A = make_shared(element::Type_t::f32, shape); - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto A = make_shared(element::f32, shape); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); @@ -1465,7 +1459,7 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_inf) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, test::NDArray({{-infi, 0, 0, infi}, {infi, 100, -100, -infi}, @@ -1475,7 +1469,7 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_inf) {infi, infi, infi, -infi}, {infi, std::nanf(""), 42, infi}}) .get_vector()); - auto result = backend->create_tensor(element::Type_t::f32, Shape{7, 1}); + auto result = backend->create_tensor(element::f32, Shape{7, 1}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -1494,8 +1488,8 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_inf) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_matrix_columns_dynamic) { - auto A = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto A = make_shared(element::f32, PartialShape::dynamic()); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); @@ -1503,9 +1497,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_matrix_columns_dynamic) // Create some tensors for input/output Shape shape_a{3, 2}; - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_dynamic_tensor(element::Type_t::f32, PartialShape::dynamic()); + auto result = backend->create_dynamic_tensor(element::f32, PartialShape::dynamic()); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -1514,8 +1508,8 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_matrix_columns_dynamic) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_matrix_rows_dynamic) { - auto A = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto A = make_shared(element::f32, PartialShape::dynamic()); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, false), ParameterVector{A}); @@ -1523,9 +1517,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_matrix_rows_dynamic) // Create some tensors for input/output Shape shape_a{3, 2}; - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_dynamic_tensor(element::Type_t::f32, PartialShape::dynamic()); + auto result = backend->create_dynamic_tensor(element::f32, PartialShape::dynamic()); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -1534,8 +1528,8 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_matrix_rows_dynamic) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_matrix_columns_dynamic) { - auto A = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto axes = make_shared(element::Type_t::i32, Shape{}, 0); + auto A = make_shared(element::f32, PartialShape::dynamic()); + auto axes = make_shared(element::i32, Shape{}, 0); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); @@ -1543,9 +1537,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_matrix_columns_dynamic) // Create some tensors for input/output Shape shape_a{3, 2}; - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_dynamic_tensor(element::Type_t::f32, PartialShape::dynamic()); + auto result = backend->create_dynamic_tensor(element::f32, PartialShape::dynamic()); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -1554,8 +1548,8 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_matrix_columns_dynamic) NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_matrix_rows_dynamic) { - auto A = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto axes = make_shared(element::Type_t::i32, Shape{}, 1); + auto A = make_shared(element::f32, PartialShape::dynamic()); + auto axes = make_shared(element::i32, Shape{}, 1); auto f = make_shared(make_shared(A, axes, true), ParameterVector{A}); @@ -1563,9 +1557,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reduce_sum_keep_matrix_rows_dynamic) // Create some tensors for input/output Shape shape_a{3, 2}; - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_dynamic_tensor(element::Type_t::f32, PartialShape::dynamic()); + auto result = backend->create_dynamic_tensor(element::f32, PartialShape::dynamic()); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); diff --git a/ngraph/test/backend/region_yolo.in.cpp b/ngraph/test/backend/region_yolo.in.cpp index 74fb92423910a4..8d520c4929acc1 100644 --- a/ngraph/test/backend/region_yolo.in.cpp +++ b/ngraph/test/backend/region_yolo.in.cpp @@ -45,7 +45,7 @@ NGRAPH_TEST(${BACKEND_NAME}, region_yolo_v2_caffe) Shape input_shape{batch, channels, height, width}; Shape output_shape{batch, channels * height * width}; - auto A = make_shared(element::Type_t::f32, input_shape); + auto A = make_shared(element::f32, input_shape); auto R = make_shared(A, coords, classes, num, true, mask, 1, 3); auto f = make_shared(R, ParameterVector{A}); @@ -71,7 +71,7 @@ NGRAPH_TEST(${BACKEND_NAME}, region_yolo_v3_mxnet) Shape shape{batch, channels, height, width}; const auto count = shape_size(shape); - const auto A = make_shared(element::Type_t::f32, shape); + const auto A = make_shared(element::f32, shape); const auto R = make_shared(A, coords, classes, num, false, mask, 1, 3); const auto f = make_shared(R, ParameterVector{A}); diff --git a/ngraph/test/backend/relu.in.cpp b/ngraph/test/backend/relu.in.cpp index 028f7a5dda458c..e1414bca9ff1b2 100644 --- a/ngraph/test/backend/relu.in.cpp +++ b/ngraph/test/backend/relu.in.cpp @@ -33,16 +33,16 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, relu_2Dfprop) { auto shape_a = Shape{2, 5}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); auto relu = make_shared(A); auto shape_rt = Shape{2, 5}; auto f = make_shared(relu, ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 8, -8, 17, -0.5, 1, 8, -8, 17, -0.5}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); vector expected{1, 8, 0, 17, 0, 1, 8, 0, 17, 0}; auto handle = backend->compile(f); @@ -53,16 +53,16 @@ NGRAPH_TEST(${BACKEND_NAME}, relu_2Dfprop) NGRAPH_TEST(${BACKEND_NAME}, relu_2Dfprop_i32) { auto shape_a = Shape{2, 5}; - auto A = make_shared(element::Type_t::i32, shape_a); + auto A = make_shared(element::i32, shape_a); auto relu = make_shared(A); auto shape_rt = Shape{2, 5}; auto f = make_shared(relu, ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto a = backend->create_tensor(element::Type_t::i32, shape_a); + auto a = backend->create_tensor(element::i32, shape_a); copy_data(a, vector{1, 8, -8, 17, -2, 1, 8, -8, 17, -1}); - auto result = backend->create_tensor(element::Type_t::i32, shape_rt); + auto result = backend->create_tensor(element::i32, shape_rt); vector expected{1, 8, 0, 17, 0, 1, 8, 0, 17, 0}; auto handle = backend->compile(f); @@ -73,16 +73,16 @@ NGRAPH_TEST(${BACKEND_NAME}, relu_2Dfprop_i32) NGRAPH_TEST(${BACKEND_NAME}, relu_4Dfprop) { auto shape_a = Shape{2, 2, 2, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); auto relu = make_shared(A); auto shape_rt = Shape{2, 2, 2, 2}; auto f = make_shared(relu, ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 8, -8, 17, -0.5, 1, 8, -8, 17, -0.5, 1, 8, -8, 17, -0.5, 1}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); vector expected{1, 8, 0, 17, 0, 1, 8, 0, 17, 0, 1, 8, 0, 17, 0, 1}; auto handle = backend->compile(f); @@ -93,17 +93,17 @@ NGRAPH_TEST(${BACKEND_NAME}, relu_4Dfprop) NGRAPH_TEST(${BACKEND_NAME}, fuse_max_with_constant_zero_input_as_relu) { auto shape_a = Shape{2, 5}; - auto A = op::Constant::create(element::Type_t::f32, shape_a, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}); - auto B = make_shared(element::Type_t::f32, shape_a); + auto A = op::Constant::create(element::f32, shape_a, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}); + auto B = make_shared(element::f32, shape_a); auto max = make_shared(A, B); auto shape_rt = Shape{2, 5}; auto f = make_shared(max, ParameterVector{B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto b = backend->create_tensor(element::Type_t::f32, shape_a); + auto b = backend->create_tensor(element::f32, shape_a); copy_data(b, vector{1, 8, -8, 17, -0.5, 1, 8, -8, 17, -0.5}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); vector expected{1, 8, 0, 17, 0, 1, 8, 0, 17, 0}; auto handle = backend->compile(f); diff --git a/ngraph/test/backend/reorg_yolo.in.cpp b/ngraph/test/backend/reorg_yolo.in.cpp index 229407e8a85234..0389a2c4b25cc4 100644 --- a/ngraph/test/backend/reorg_yolo.in.cpp +++ b/ngraph/test/backend/reorg_yolo.in.cpp @@ -48,7 +48,7 @@ NGRAPH_TEST(${BACKEND_NAME}, reorg_yolo_stride_2) { // in_shape [N,C,H,W] const auto in_shape = Shape{1, 8, 4, 4}; - auto p = make_shared(element::Type_t::f32, in_shape); + auto p = make_shared(element::f32, in_shape); size_t stride = 2; auto reorg_yolo = make_shared(p, Strides{stride}); auto fun = make_shared(OutputVector{reorg_yolo}, ParameterVector{p}); @@ -78,7 +78,7 @@ NGRAPH_TEST(${BACKEND_NAME}, reorg_yolo_stride_3) { // in_shape [N,C,H,W] const auto in_shape = Shape{1, 9, 3, 3}; - auto p = make_shared(element::Type_t::f32, in_shape); + auto p = make_shared(element::f32, in_shape); size_t stride = 3; auto reorg_yolo = make_shared(p, Strides{stride}); auto fun = make_shared(OutputVector{reorg_yolo}, ParameterVector{p}); diff --git a/ngraph/test/backend/reshape.in.cpp b/ngraph/test/backend/reshape.in.cpp index 5034e8e20ecc3d..130629430b54e4 100644 --- a/ngraph/test/backend/reshape.in.cpp +++ b/ngraph/test/backend/reshape.in.cpp @@ -47,18 +47,18 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, reshape_t2v_012) { Shape shape_a{2, 2, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_r{12}; auto r = make_shared( - A, op::Constant::create(element::Type_t::u64, {shape_r.size()}, shape_r), false); + A, op::Constant::create(element::u64, {shape_r.size()}, shape_r), false); auto f = make_shared(r, ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -70,18 +70,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reshape_t2v_012) NGRAPH_TEST(${BACKEND_NAME}, reshape_t2s_012) { Shape shape_a{1, 1, 1}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_r{}; auto r = make_shared( - A, op::Constant::create(element::Type_t::u64, {shape_r.size()}, shape_r), false); + A, op::Constant::create(element::u64, {shape_r.size()}, shape_r), false); auto f = make_shared(r, ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{6}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -92,18 +92,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reshape_t2s_012) NGRAPH_TEST(${BACKEND_NAME}, reshape_t2s_120) { Shape shape_a{1, 1, 1}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_r{}; auto r = make_shared( - A, op::Constant::create(element::Type_t::u64, {shape_r.size()}, shape_r), false); + A, op::Constant::create(element::u64, {shape_r.size()}, shape_r), false); auto f = make_shared(r, ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{6}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -114,18 +114,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reshape_t2s_120) NGRAPH_TEST(${BACKEND_NAME}, reshape_s2t) { Shape shape_a{}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_r{1, 1, 1, 1, 1, 1}; auto r = make_shared( - A, op::Constant::create(element::Type_t::u64, {shape_r.size()}, shape_r), false); + A, op::Constant::create(element::u64, {shape_r.size()}, shape_r), false); auto f = make_shared(r, ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{42}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -136,18 +136,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reshape_s2t) NGRAPH_TEST(${BACKEND_NAME}, reshape_s2t1) { Shape shape_a{}; - auto A = make_shared(element::Type_t::boolean, shape_a); + auto A = make_shared(element::boolean, shape_a); Shape shape_r{1}; auto r = make_shared( - A, op::Constant::create(element::Type_t::u64, {shape_r.size()}, shape_r), false); + A, op::Constant::create(element::u64, {shape_r.size()}, shape_r), false); auto f = make_shared(r, ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::boolean, shape_a); + auto a = backend->create_tensor(element::boolean, shape_a); copy_data(a, vector{42}); - auto result = backend->create_tensor(element::Type_t::boolean, shape_r); + auto result = backend->create_tensor(element::boolean, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -157,18 +157,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reshape_s2t1) NGRAPH_TEST(${BACKEND_NAME}, reshape_v2m_col) { Shape shape_a{3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_r{3, 1}; auto r = make_shared( - A, op::Constant::create(element::Type_t::u64, {shape_r.size()}, shape_r), false); + A, op::Constant::create(element::u64, {shape_r.size()}, shape_r), false); auto f = make_shared(r, ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -179,18 +179,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reshape_v2m_col) NGRAPH_TEST(${BACKEND_NAME}, reshape_v2m_row) { Shape shape_a{3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_r{1, 3}; auto r = make_shared( - A, op::Constant::create(element::Type_t::u64, {shape_r.size()}, shape_r), false); + A, op::Constant::create(element::u64, {shape_r.size()}, shape_r), false); auto f = make_shared(r, ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -201,18 +201,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reshape_v2m_row) NGRAPH_TEST(${BACKEND_NAME}, reshape_v2t_middle) { Shape shape_a{3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_r{1, 3, 1}; auto r = make_shared( - A, op::Constant::create(element::Type_t::u64, {shape_r.size()}, shape_r), false); + A, op::Constant::create(element::u64, {shape_r.size()}, shape_r), false); auto f = make_shared(r, ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -223,18 +223,18 @@ NGRAPH_TEST(${BACKEND_NAME}, reshape_v2t_middle) NGRAPH_TEST(${BACKEND_NAME}, reshape_m2m_same) { Shape shape_a{3, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_r{3, 3}; auto r = make_shared( - A, op::Constant::create(element::Type_t::u64, {shape_r.size()}, shape_r), false); + A, op::Constant::create(element::u64, {shape_r.size()}, shape_r), false); auto f = make_shared(r, ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -247,9 +247,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reshape_special_zero) { Shape shape_a{2, 2, 5, 5}; Shape shape_r{2, 5, 5, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); auto r = make_shared( - A, op::Constant::create(element::Type_t::u64, {4}, Shape{0, 5, 0, 2}), true); + A, op::Constant::create(element::u64, {4}, Shape{0, 5, 0, 2}), true); auto f = make_shared(r, ParameterVector{A}); vector a_data(shape_size(shape_a)); @@ -258,9 +258,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reshape_special_zero) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, a_data); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -311,23 +311,23 @@ NGRAPH_TEST(${BACKEND_NAME}, reshape_special_zero) NGRAPH_TEST(${BACKEND_NAME}, reshape_6d) { Shape shape_a{2, 2, 3, 3, 2, 4}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_r{3, 2, 2, 4, 3, 2}; vector a_data(shape_size(shape_a)); iota(a_data.begin(), a_data.end(), 1.f); auto r = make_shared( - A, op::Constant::create(element::Type_t::u64, {shape_r.size()}, shape_r), false); + A, op::Constant::create(element::u64, {shape_r.size()}, shape_r), false); auto f = make_shared(r, ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, a_data); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -338,7 +338,7 @@ NGRAPH_TEST(${BACKEND_NAME}, reshape_6d) NGRAPH_TEST(${BACKEND_NAME}, builder_reshape_1D_to_scalar) { const Shape input_shape{1}; - const auto input = make_shared(element::Type_t::f32, input_shape); + const auto input = make_shared(element::f32, input_shape); const auto reshape_builder = builder::opset1::reshape(input, Shape{}); auto function = make_shared(reshape_builder, ParameterVector{input}); @@ -353,7 +353,7 @@ NGRAPH_TEST(${BACKEND_NAME}, builder_reshape_1D_to_scalar) NGRAPH_TEST(${BACKEND_NAME}, builder_reshape_3D_to_scalar) { const Shape input_shape{1, 1, 1}; - const auto input = make_shared(element::Type_t::f32, input_shape); + const auto input = make_shared(element::f32, input_shape); const auto reshape_builder = builder::opset1::reshape(input, Shape{}); auto function = make_shared(reshape_builder, ParameterVector{input}); @@ -370,22 +370,22 @@ NGRAPH_TEST(${BACKEND_NAME}, builder_reshape_3D_to_scalar) NGRAPH_TEST(${BACKEND_NAME}, reshape_shufflenet_5d) { Shape shape_a{1, 112, 56, 56}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_b{1, 4, 28, 56, 56}; - auto B = make_shared(element::Type_t::f32, shape_b); + auto B = make_shared(element::f32, shape_b); Shape shape_c{1, 28, 4, 56, 56}; - auto C = make_shared(element::Type_t::f32, shape_c); + auto C = make_shared(element::f32, shape_c); Shape shape_r{1, 112, 56, 56}; vector a_data(shape_size(shape_a)); iota(a_data.begin(), a_data.end(), 1.f); auto r0 = make_shared( - A, op::Constant::create(element::Type_t::u64, {shape_b.size()}, shape_b), false); + A, op::Constant::create(element::u64, {shape_b.size()}, shape_b), false); auto r1 = make_shared( - r0, op::Constant::create(element::Type_t::u64, {shape_c.size()}, shape_c), false); + r0, op::Constant::create(element::u64, {shape_c.size()}, shape_c), false); auto r2 = make_shared( - r1, op::Constant::create(element::Type_t::u64, {shape_r.size()}, shape_r), false); + r1, op::Constant::create(element::u64, {shape_r.size()}, shape_r), false); auto f = make_shared(r2, ParameterVector{A}); auto ref_func = clone_function(*f); diff --git a/ngraph/test/backend/reverse.in.cpp b/ngraph/test/backend/reverse.in.cpp index e8e21cfe3418e6..90caa46a9b9d6b 100644 --- a/ngraph/test/backend/reverse.in.cpp +++ b/ngraph/test/backend/reverse.in.cpp @@ -32,18 +32,18 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, reverse_1d) { Shape shape{8}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared( make_shared( - A, op::Constant::create(element::Type_t::i64, {1}, {0}), op::v1::Reverse::Mode::INDEX), + A, op::Constant::create(element::i64, {1}, {0}), op::v1::Reverse::Mode::INDEX), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{0, 1, 2, 3, 4, 5, 6, 7}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -55,19 +55,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reverse_1d) NGRAPH_TEST(${BACKEND_NAME}, reverse_2d_0) { Shape shape{4, 3}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared( make_shared( - A, op::Constant::create(element::Type_t::i64, {1}, {0}), op::v1::Reverse::Mode::INDEX), + A, op::Constant::create(element::i64, {1}, {0}), op::v1::Reverse::Mode::INDEX), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, test::NDArray({{0, 1, 2}, {3, 4, 5}, {6, 7, 8}, {9, 10, 11}}).get_vector()); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -80,19 +80,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reverse_2d_0) NGRAPH_TEST(${BACKEND_NAME}, reverse_2d_1) { Shape shape{4, 3}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared( make_shared( - A, op::Constant::create(element::Type_t::i64, {1}, {1}), op::v1::Reverse::Mode::INDEX), + A, op::Constant::create(element::i64, {1}, {1}), op::v1::Reverse::Mode::INDEX), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, test::NDArray({{0, 1, 2}, {3, 4, 5}, {6, 7, 8}, {9, 10, 11}}).get_vector()); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -105,21 +105,20 @@ NGRAPH_TEST(${BACKEND_NAME}, reverse_2d_1) NGRAPH_TEST(${BACKEND_NAME}, reverse_2d_1_mask) { Shape shape{4, 3}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared( - make_shared( - A, - op::Constant::create(element::Type_t::boolean, {2}, {false, true}), - op::v1::Reverse::Mode::MASK), + make_shared(A, + op::Constant::create(element::boolean, {2}, {false, true}), + op::v1::Reverse::Mode::MASK), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, test::NDArray({{0, 1, 2}, {3, 4, 5}, {6, 7, 8}, {9, 10, 11}}).get_vector()); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -132,20 +131,19 @@ NGRAPH_TEST(${BACKEND_NAME}, reverse_2d_1_mask) NGRAPH_TEST(${BACKEND_NAME}, reverse_2d_01) { Shape shape{4, 3}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared( - make_shared(A, - op::Constant::create(element::Type_t::i64, {2}, {0, 1}), - op::v1::Reverse::Mode::INDEX), + make_shared( + A, op::Constant::create(element::i64, {2}, {0, 1}), op::v1::Reverse::Mode::INDEX), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, test::NDArray({{0, 1, 2}, {3, 4, 5}, {6, 7, 8}, {9, 10, 11}}).get_vector()); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -158,21 +156,20 @@ NGRAPH_TEST(${BACKEND_NAME}, reverse_2d_01) NGRAPH_TEST(${BACKEND_NAME}, reverse_2d_01_mask) { Shape shape{4, 3}; - auto A = make_shared(element::Type_t::f32, shape); - auto f = - make_shared(make_shared( - A, - op::Constant::create(element::Type_t::boolean, {2}, {true, true}), - op::v1::Reverse::Mode::MASK), - ParameterVector{A}); + auto A = make_shared(element::f32, shape); + auto f = make_shared( + make_shared(A, + op::Constant::create(element::boolean, {2}, {true, true}), + op::v1::Reverse::Mode::MASK), + ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, test::NDArray({{0, 1, 2}, {3, 4, 5}, {6, 7, 8}, {9, 10, 11}}).get_vector()); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -185,21 +182,21 @@ NGRAPH_TEST(${BACKEND_NAME}, reverse_2d_01_mask) NGRAPH_TEST(${BACKEND_NAME}, reverse_3d_0) { Shape shape{2, 4, 3}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared( make_shared( - A, op::Constant::create(element::Type_t::i64, {1}, {0}), op::v1::Reverse::Mode::INDEX), + A, op::Constant::create(element::i64, {1}, {0}), op::v1::Reverse::Mode::INDEX), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, test::NDArray({{{0, 1, 2}, {3, 4, 5}, {6, 7, 8}, {9, 10, 11}}, {{12, 13, 14}, {15, 16, 17}, {18, 19, 20}, {21, 22, 23}}}) .get_vector()); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -214,21 +211,21 @@ NGRAPH_TEST(${BACKEND_NAME}, reverse_3d_0) NGRAPH_TEST(${BACKEND_NAME}, reverse_3d_1) { Shape shape{2, 4, 3}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared( make_shared( - A, op::Constant::create(element::Type_t::i64, {1}, {1}), op::v1::Reverse::Mode::INDEX), + A, op::Constant::create(element::i64, {1}, {1}), op::v1::Reverse::Mode::INDEX), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, test::NDArray({{{0, 1, 2}, {3, 4, 5}, {6, 7, 8}, {9, 10, 11}}, {{12, 13, 14}, {15, 16, 17}, {18, 19, 20}, {21, 22, 23}}}) .get_vector()); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -243,21 +240,21 @@ NGRAPH_TEST(${BACKEND_NAME}, reverse_3d_1) NGRAPH_TEST(${BACKEND_NAME}, reverse_3d_2) { Shape shape{2, 4, 3}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared( make_shared( - A, op::Constant::create(element::Type_t::i64, {1}, {2}), op::v1::Reverse::Mode::INDEX), + A, op::Constant::create(element::i64, {1}, {2}), op::v1::Reverse::Mode::INDEX), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, test::NDArray({{{0, 1, 2}, {3, 4, 5}, {6, 7, 8}, {9, 10, 11}}, {{12, 13, 14}, {15, 16, 17}, {18, 19, 20}, {21, 22, 23}}}) .get_vector()); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -272,22 +269,21 @@ NGRAPH_TEST(${BACKEND_NAME}, reverse_3d_2) NGRAPH_TEST(${BACKEND_NAME}, reverse_3d_01) { Shape shape{2, 4, 3}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared( - make_shared(A, - op::Constant::create(element::Type_t::i64, {2}, {0, 1}), - op::v1::Reverse::Mode::INDEX), + make_shared( + A, op::Constant::create(element::i64, {2}, {0, 1}), op::v1::Reverse::Mode::INDEX), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, test::NDArray({{{0, 1, 2}, {3, 4, 5}, {6, 7, 8}, {9, 10, 11}}, {{12, 13, 14}, {15, 16, 17}, {18, 19, 20}, {21, 22, 23}}}) .get_vector()); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -302,22 +298,21 @@ NGRAPH_TEST(${BACKEND_NAME}, reverse_3d_01) NGRAPH_TEST(${BACKEND_NAME}, reverse_3d_02) { Shape shape{2, 4, 3}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared( - make_shared(A, - op::Constant::create(element::Type_t::i64, {2}, {0, 2}), - op::v1::Reverse::Mode::INDEX), + make_shared( + A, op::Constant::create(element::i64, {2}, {0, 2}), op::v1::Reverse::Mode::INDEX), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, test::NDArray({{{0, 1, 2}, {3, 4, 5}, {6, 7, 8}, {9, 10, 11}}, {{12, 13, 14}, {15, 16, 17}, {18, 19, 20}, {21, 22, 23}}}) .get_vector()); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -332,22 +327,21 @@ NGRAPH_TEST(${BACKEND_NAME}, reverse_3d_02) NGRAPH_TEST(${BACKEND_NAME}, reverse_3d_12) { Shape shape{2, 4, 3}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared( - make_shared(A, - op::Constant::create(element::Type_t::i64, {2}, {1, 2}), - op::v1::Reverse::Mode::INDEX), + make_shared( + A, op::Constant::create(element::i64, {2}, {1, 2}), op::v1::Reverse::Mode::INDEX), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, test::NDArray({{{0, 1, 2}, {3, 4, 5}, {6, 7, 8}, {9, 10, 11}}, {{12, 13, 14}, {15, 16, 17}, {18, 19, 20}, {21, 22, 23}}}) .get_vector()); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -362,22 +356,21 @@ NGRAPH_TEST(${BACKEND_NAME}, reverse_3d_12) NGRAPH_TEST(${BACKEND_NAME}, reverse_3d_012) { Shape shape{2, 4, 3}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared( - make_shared(A, - op::Constant::create(element::Type_t::i64, {3}, {0, 1, 2}), - op::v1::Reverse::Mode::INDEX), + make_shared( + A, op::Constant::create(element::i64, {3}, {0, 1, 2}), op::v1::Reverse::Mode::INDEX), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, test::NDArray({{{0, 1, 2}, {3, 4, 5}, {6, 7, 8}, {9, 10, 11}}, {{12, 13, 14}, {15, 16, 17}, {18, 19, 20}, {21, 22, 23}}}) .get_vector()); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -391,9 +384,8 @@ NGRAPH_TEST(${BACKEND_NAME}, reverse_3d_012) NGRAPH_TEST(${BACKEND_NAME}, reverse_v1_incorrect_rev_axes_rank_index_mode) { - const auto Data = make_shared(element::Type_t::f32, Shape{2, 2, 2}); - const auto Rev_Axes = - make_shared(element::Type_t::i64, Shape{1, 1}); // correct: 1D + const auto Data = make_shared(element::f32, Shape{2, 2, 2}); + const auto Rev_Axes = make_shared(element::i64, Shape{1, 1}); // correct: 1D EXPECT_THROW(make_shared( make_shared(Data, Rev_Axes, op::v1::Reverse::Mode::INDEX), @@ -403,9 +395,8 @@ NGRAPH_TEST(${BACKEND_NAME}, reverse_v1_incorrect_rev_axes_rank_index_mode) NGRAPH_TEST(${BACKEND_NAME}, reverse_v1_incorrect_rev_axes_elems_mask_mode) { - const auto Data = make_shared(element::Type_t::f32, Shape{2, 2, 2}); - const auto Rev_Axes = - make_shared(element::Type_t::boolean, Shape{2}); // correct: 3 + const auto Data = make_shared(element::f32, Shape{2, 2, 2}); + const auto Rev_Axes = make_shared(element::boolean, Shape{2}); // correct: 3 EXPECT_THROW(make_shared(Data, Rev_Axes, op::v1::Reverse::Mode::MASK), ngraph::NodeValidationFailure); @@ -413,8 +404,8 @@ NGRAPH_TEST(${BACKEND_NAME}, reverse_v1_incorrect_rev_axes_elems_mask_mode) NGRAPH_TEST(${BACKEND_NAME}, reverse_v1_axes_out_of_bounds) { - const auto Data = make_shared(element::Type_t::f32, Shape{2, 2, 2}); - const auto Rev_Axes = op::Constant::create(element::Type_t::i64, Shape{2}, {1, 10}); + const auto Data = make_shared(element::f32, Shape{2, 2, 2}); + const auto Rev_Axes = op::Constant::create(element::i64, Shape{2}, {1, 10}); EXPECT_THROW(make_shared(Data, Rev_Axes, op::v1::Reverse::Mode::INDEX), ngraph::NodeValidationFailure); @@ -422,8 +413,8 @@ NGRAPH_TEST(${BACKEND_NAME}, reverse_v1_axes_out_of_bounds) NGRAPH_TEST(${BACKEND_NAME}, reverse_v1_too_many_axes) { - const auto Data = make_shared(element::Type_t::f32, Shape{2, 2, 2}); - const auto Rev_Axes = op::Constant::create(element::Type_t::i64, Shape{4}, {0, 1, 2, 3}); + const auto Data = make_shared(element::f32, Shape{2, 2, 2}); + const auto Rev_Axes = op::Constant::create(element::i64, Shape{4}, {0, 1, 2, 3}); EXPECT_THROW(make_shared(Data, Rev_Axes, op::v1::Reverse::Mode::INDEX), ngraph::NodeValidationFailure); diff --git a/ngraph/test/backend/reverse_sequence.in.cpp b/ngraph/test/backend/reverse_sequence.in.cpp index aa76919bf4e693..1fcca9cf820a07 100644 --- a/ngraph/test/backend/reverse_sequence.in.cpp +++ b/ngraph/test/backend/reverse_sequence.in.cpp @@ -34,8 +34,8 @@ NGRAPH_TEST(${BACKEND_NAME}, reverse_sequence_n2c3h4w2) { Shape shape{2, 3, 4, 2}; Shape seq_len_shape{4}; - auto A = make_shared(element::Type_t::i32, shape); - auto B = make_shared(element::Type_t::i32, seq_len_shape); + auto A = make_shared(element::i32, shape); + auto B = make_shared(element::i32, seq_len_shape); size_t batch_axis = 2; size_t sequence_axis = 1; @@ -46,10 +46,10 @@ NGRAPH_TEST(${BACKEND_NAME}, reverse_sequence_n2c3h4w2) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - shared_ptr a = backend->create_tensor(element::Type_t::i32, shape); - shared_ptr b = backend->create_tensor(element::Type_t::i32, seq_len_shape); + shared_ptr a = backend->create_tensor(element::i32, shape); + shared_ptr b = backend->create_tensor(element::i32, seq_len_shape); - shared_ptr result = backend->create_tensor(element::Type_t::i32, shape); + shared_ptr result = backend->create_tensor(element::i32, shape); std::vector input{ 0, 0, 3, 0, 6, 0, 9, 0, 1, 0, 4, 0, 7, 0, 10, 0, 2, 0, 5, 0, 8, 0, 11, 0, @@ -74,9 +74,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reverse_sequence_n2c3h4w2) NGRAPH_TEST(${BACKEND_NAME}, reverse_sequence_n4c3h2w2) { Shape shape{4, 3, 2, 2}; - auto A = make_shared(element::Type_t::i32, shape); + auto A = make_shared(element::i32, shape); Shape seq_len_shape{4}; - auto B = make_shared(element::Type_t::i32, seq_len_shape); + auto B = make_shared(element::i32, seq_len_shape); size_t batch_axis = 0; size_t sequence_axis = 1; @@ -88,10 +88,10 @@ NGRAPH_TEST(${BACKEND_NAME}, reverse_sequence_n4c3h2w2) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - shared_ptr a = backend->create_tensor(element::Type_t::i32, shape); - shared_ptr b = backend->create_tensor(element::Type_t::i32, seq_len_shape); + shared_ptr a = backend->create_tensor(element::i32, shape); + shared_ptr b = backend->create_tensor(element::i32, seq_len_shape); - shared_ptr result = backend->create_tensor(element::Type_t::i32, shape); + shared_ptr result = backend->create_tensor(element::i32, shape); std::vector seq_lenghts{1, 2, 3, 3}; copy_data(b, seq_lenghts); @@ -114,9 +114,9 @@ NGRAPH_TEST(${BACKEND_NAME}, reverse_sequence_n4c3h2w2) NGRAPH_TEST(${BACKEND_NAME}, reverse_sequence_n4d2c3h2w2) { Shape shape{4, 2, 3, 2, 2}; - auto A = make_shared(element::Type_t::i32, shape); + auto A = make_shared(element::i32, shape); Shape seq_len_shape{4}; - auto B = make_shared(element::Type_t::i32, seq_len_shape); + auto B = make_shared(element::i32, seq_len_shape); size_t batch_axis = 0; size_t sequence_axis = 2; @@ -128,10 +128,10 @@ NGRAPH_TEST(${BACKEND_NAME}, reverse_sequence_n4d2c3h2w2) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - shared_ptr a = backend->create_tensor(element::Type_t::i32, shape); - shared_ptr b = backend->create_tensor(element::Type_t::i32, seq_len_shape); + shared_ptr a = backend->create_tensor(element::i32, shape); + shared_ptr b = backend->create_tensor(element::i32, seq_len_shape); - shared_ptr result = backend->create_tensor(element::Type_t::i32, shape); + shared_ptr result = backend->create_tensor(element::i32, shape); std::vector input{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, @@ -161,8 +161,8 @@ NGRAPH_TEST(${BACKEND_NAME}, reverse_sequence_negative_axes) { Shape shape{2, 3, 4, 2}; Shape seq_len_shape{4}; - auto A = make_shared(element::Type_t::i32, shape); - auto B = make_shared(element::Type_t::i32, seq_len_shape); + auto A = make_shared(element::i32, shape); + auto B = make_shared(element::i32, seq_len_shape); int64_t batch_axis = -2; int64_t sequence_axis = -3; @@ -173,10 +173,10 @@ NGRAPH_TEST(${BACKEND_NAME}, reverse_sequence_negative_axes) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - shared_ptr a = backend->create_tensor(element::Type_t::i32, shape); - shared_ptr b = backend->create_tensor(element::Type_t::i32, seq_len_shape); + shared_ptr a = backend->create_tensor(element::i32, shape); + shared_ptr b = backend->create_tensor(element::i32, seq_len_shape); - shared_ptr result = backend->create_tensor(element::Type_t::i32, shape); + shared_ptr result = backend->create_tensor(element::i32, shape); std::vector input{ 0, 0, 3, 0, 6, 0, 9, 0, 1, 0, 4, 0, 7, 0, 10, 0, 2, 0, 5, 0, 8, 0, 11, 0, diff --git a/ngraph/test/backend/roi_pooling.in.cpp b/ngraph/test/backend/roi_pooling.in.cpp index cd1814b202429a..37004ba1d4169d 100644 --- a/ngraph/test/backend/roi_pooling.in.cpp +++ b/ngraph/test/backend/roi_pooling.in.cpp @@ -45,8 +45,8 @@ NGRAPH_TEST(${BACKEND_NAME}, roi_pooling_1x1_max) Shape pooled_shape{pooled_h, pooled_w}; Shape output_shape{num_rois, channels, pooled_h, pooled_w}; - const auto feat_maps = make_shared(element::Type_t::f32, feat_maps_shape); - const auto rois = make_shared(element::Type_t::f32, rois_shape); + const auto feat_maps = make_shared(element::f32, feat_maps_shape); + const auto rois = make_shared(element::f32, rois_shape); const auto roi_pooling = make_shared(feat_maps, rois, pooled_shape, spatial_scale, "max"); const auto f = make_shared(roi_pooling, ParameterVector{feat_maps, rois}); @@ -85,8 +85,8 @@ NGRAPH_TEST(${BACKEND_NAME}, roi_pooling_2x2_max) Shape pooled_shape{pooled_h, pooled_w}; Shape output_shape{num_rois, channels, pooled_h, pooled_w}; - const auto feat_maps = make_shared(element::Type_t::f32, feat_maps_shape); - const auto rois = make_shared(element::Type_t::f32, rois_shape); + const auto feat_maps = make_shared(element::f32, feat_maps_shape); + const auto rois = make_shared(element::f32, rois_shape); const auto roi_pooling = make_shared(feat_maps, rois, pooled_shape, spatial_scale, "max"); const auto f = make_shared(roi_pooling, ParameterVector{feat_maps, rois}); @@ -126,8 +126,8 @@ NGRAPH_TEST(${BACKEND_NAME}, roi_pooling_1x1_bilinear) Shape pooled_shape{pooled_h, pooled_w}; Shape output_shape{num_rois, channels, pooled_h, pooled_w}; - const auto feat_maps = make_shared(element::Type_t::f32, feat_maps_shape); - const auto rois = make_shared(element::Type_t::f32, rois_shape); + const auto feat_maps = make_shared(element::f32, feat_maps_shape); + const auto rois = make_shared(element::f32, rois_shape); const auto roi_pooling = make_shared(feat_maps, rois, pooled_shape, spatial_scale, "bilinear"); const auto f = make_shared(roi_pooling, ParameterVector{feat_maps, rois}); @@ -166,8 +166,8 @@ NGRAPH_TEST(${BACKEND_NAME}, roi_pooling_2x2_bilinear) Shape pooled_shape{pooled_h, pooled_w}; Shape output_shape{num_rois, channels, pooled_h, pooled_w}; - const auto feat_maps = make_shared(element::Type_t::f32, feat_maps_shape); - const auto rois = make_shared(element::Type_t::f32, rois_shape); + const auto feat_maps = make_shared(element::f32, feat_maps_shape); + const auto rois = make_shared(element::f32, rois_shape); const auto roi_pooling = make_shared(feat_maps, rois, pooled_shape, spatial_scale, "bilinear"); const auto f = make_shared(roi_pooling, ParameterVector{feat_maps, rois}); diff --git a/ngraph/test/backend/round.in.cpp b/ngraph/test/backend/round.in.cpp index 392492b4a53461..3e23132ef35b2b 100644 --- a/ngraph/test/backend/round.in.cpp +++ b/ngraph/test/backend/round.in.cpp @@ -34,15 +34,15 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, round) { Shape shape{5}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared( make_shared(A, op::v5::Round::RoundMode::HALF_TO_EVEN), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{0.9f, 2.5f, 2.3f, 1.5f, -4.5f}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -54,16 +54,16 @@ NGRAPH_TEST(${BACKEND_NAME}, round) NGRAPH_TEST(${BACKEND_NAME}, round_away_from_zero) { Shape shape{5}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared( make_shared(A, op::v5::Round::RoundMode::HALF_AWAY_FROM_ZERO), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{0.9f, 2.5f, 2.3f, 1.5f, -4.5f}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -75,13 +75,13 @@ NGRAPH_TEST(${BACKEND_NAME}, round_away_from_zero) NGRAPH_TEST(${BACKEND_NAME}, round_2D) { Shape shape{3, 5}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared( make_shared(A, op::v5::Round::RoundMode::HALF_TO_EVEN), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{0.1f, 0.5f, @@ -98,7 +98,7 @@ NGRAPH_TEST(${BACKEND_NAME}, round_2D) -2.2f, -2.5f, -2.8f}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -113,16 +113,16 @@ NGRAPH_TEST(${BACKEND_NAME}, round_int64) { // This tests large numbers that will not fit in a double Shape shape{3}; - auto A = make_shared(element::Type_t::i64, shape); + auto A = make_shared(element::i64, shape); auto f = make_shared( make_shared(A, op::v5::Round::RoundMode::HALF_TO_EVEN), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto a = backend->create_tensor(element::Type_t::i64, shape); + auto a = backend->create_tensor(element::i64, shape); vector expected{0, 1, 0x4000000000000001}; copy_data(a, expected); - auto result = backend->create_tensor(element::Type_t::i64, shape); + auto result = backend->create_tensor(element::i64, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); diff --git a/ngraph/test/backend/select.in.cpp b/ngraph/test/backend/select.in.cpp index d7e24500bf6bf4..2823230941e6cc 100644 --- a/ngraph/test/backend/select.in.cpp +++ b/ngraph/test/backend/select.in.cpp @@ -34,21 +34,21 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, select) { Shape shape{2, 2, 2}; - auto A = make_shared(element::Type_t::boolean, shape); - auto B = make_shared(element::Type_t::f32, shape); - auto C = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::boolean, shape); + auto B = make_shared(element::f32, shape); + auto C = make_shared(element::f32, shape); auto f = make_shared(make_shared(A, B, C), ParameterVector{A, B, C}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::boolean, shape); + auto a = backend->create_tensor(element::boolean, shape); copy_data(a, vector{0, 1, 1, 0, 0, 1, 0, 1}); - auto b = backend->create_tensor(element::Type_t::f32, shape); + auto b = backend->create_tensor(element::f32, shape); copy_data(b, vector{1, 2, 3, 4, 5, 6, 7, 8}); - auto c = backend->create_tensor(element::Type_t::f32, shape); + auto c = backend->create_tensor(element::f32, shape); copy_data(c, vector{11, 12, 13, 14, 15, 16, 17, 18}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b, c}); @@ -59,21 +59,21 @@ NGRAPH_TEST(${BACKEND_NAME}, select) NGRAPH_TEST(${BACKEND_NAME}, select_v1) { - auto A = make_shared(element::Type_t::boolean, Shape{4}); - auto B = make_shared(element::Type_t::f32, Shape{4}); - auto C = make_shared(element::Type_t::f32, Shape{2, 4}); + auto A = make_shared(element::boolean, Shape{4}); + auto B = make_shared(element::f32, Shape{4}); + auto C = make_shared(element::f32, Shape{2, 4}); auto f = make_shared(make_shared(A, B, C), ParameterVector{A, B, C}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::boolean, Shape{4}); + auto a = backend->create_tensor(element::boolean, Shape{4}); copy_data(a, vector{0, 1, 1, 0}); - auto b = backend->create_tensor(element::Type_t::f32, Shape{4}); + auto b = backend->create_tensor(element::f32, Shape{4}); copy_data(b, vector{1, 2, 3, 4}); - auto c = backend->create_tensor(element::Type_t::f32, Shape{2, 4}); + auto c = backend->create_tensor(element::f32, Shape{2, 4}); copy_data(c, vector{11, 12, 13, 14, 15, 16, 17, 18}); - auto result = backend->create_tensor(element::Type_t::f32, Shape{2, 4}); + auto result = backend->create_tensor(element::f32, Shape{2, 4}); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b, c}); @@ -84,21 +84,21 @@ NGRAPH_TEST(${BACKEND_NAME}, select_v1) NGRAPH_TEST(${BACKEND_NAME}, select_double) { Shape shape{2, 2, 2}; - auto A = make_shared(element::Type_t::boolean, shape); - auto B = make_shared(element::Type_t::f64, shape); - auto C = make_shared(element::Type_t::f64, shape); + auto A = make_shared(element::boolean, shape); + auto B = make_shared(element::f64, shape); + auto C = make_shared(element::f64, shape); auto f = make_shared(make_shared(A, B, C), ParameterVector{A, B, C}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::boolean, shape); + auto a = backend->create_tensor(element::boolean, shape); copy_data(a, vector{0, 1, 1, 0, 0, 1, 0, 1}); - auto b = backend->create_tensor(element::Type_t::f64, shape); + auto b = backend->create_tensor(element::f64, shape); copy_data(b, vector{1, 2, 3, 4, 5, 6, 7, 8}); - auto c = backend->create_tensor(element::Type_t::f64, shape); + auto c = backend->create_tensor(element::f64, shape); copy_data(c, vector{11, 12, 13, 14, 15, 16, 17, 18}); - auto result = backend->create_tensor(element::Type_t::f64, shape); + auto result = backend->create_tensor(element::f64, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b, c}); diff --git a/ngraph/test/backend/shape_of.in.cpp b/ngraph/test/backend/shape_of.in.cpp index 076efcce153445..05a1269f26965e 100644 --- a/ngraph/test/backend/shape_of.in.cpp +++ b/ngraph/test/backend/shape_of.in.cpp @@ -35,14 +35,14 @@ NGRAPH_TEST(${BACKEND_NAME}, shape_of_scalar_v0) Shape input_shape{}; Shape output_shape{0}; - auto A = std::make_shared(element::Type_t::f32, input_shape); + auto A = std::make_shared(element::f32, input_shape); auto f = std::make_shared(std::make_shared(A), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto a = backend->create_tensor(element::Type_t::f32, input_shape); + auto a = backend->create_tensor(element::f32, input_shape); copy_data(a, vector{0}); - auto result = backend->create_tensor(element::Type_t::i64, output_shape); + auto result = backend->create_tensor(element::i64, output_shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -55,18 +55,18 @@ NGRAPH_TEST(${BACKEND_NAME}, shape_of_scalar_v3) Shape input_shape{}; Shape output_shape{0}; - auto A = std::make_shared(element::Type_t::f32, input_shape); - auto f = std::make_shared( - OutputVector{std::make_shared(A), - std::make_shared(A, element::Type_t::i32)}, - ParameterVector{A}); + auto A = std::make_shared(element::f32, input_shape); + auto f = + std::make_shared(OutputVector{std::make_shared(A), + std::make_shared(A, element::i32)}, + ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto a = backend->create_tensor(element::Type_t::f32, input_shape); + auto a = backend->create_tensor(element::f32, input_shape); copy_data(a, vector{0}); - auto result64 = backend->create_tensor(element::Type_t::i64, output_shape); - auto result32 = backend->create_tensor(element::Type_t::i32, output_shape); + auto result64 = backend->create_tensor(element::i64, output_shape); + auto result32 = backend->create_tensor(element::i32, output_shape); auto handle = backend->compile(f); handle->call_with_validate({result64, result32}, {a}); @@ -81,14 +81,14 @@ NGRAPH_TEST(${BACKEND_NAME}, shape_of_vector_v0) Shape input_shape{2}; Shape output_shape{1}; - auto A = std::make_shared(element::Type_t::f32, input_shape); + auto A = std::make_shared(element::f32, input_shape); auto f = std::make_shared(std::make_shared(A), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto a = backend->create_tensor(element::Type_t::f32, input_shape); + auto a = backend->create_tensor(element::f32, input_shape); copy_data(a, vector(2, 0)); - auto result = backend->create_tensor(element::Type_t::i64, output_shape); + auto result = backend->create_tensor(element::i64, output_shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -101,18 +101,18 @@ NGRAPH_TEST(${BACKEND_NAME}, shape_of_vector_v3) Shape input_shape{2}; Shape output_shape{1}; - auto A = std::make_shared(element::Type_t::f32, input_shape); - auto f = std::make_shared( - OutputVector{std::make_shared(A), - std::make_shared(A, element::Type_t::i32)}, - ParameterVector{A}); + auto A = std::make_shared(element::f32, input_shape); + auto f = + std::make_shared(OutputVector{std::make_shared(A), + std::make_shared(A, element::i32)}, + ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto a = backend->create_tensor(element::Type_t::f32, input_shape); + auto a = backend->create_tensor(element::f32, input_shape); copy_data(a, vector{2, 0}); - auto result64 = backend->create_tensor(element::Type_t::i64, output_shape); - auto result32 = backend->create_tensor(element::Type_t::i32, output_shape); + auto result64 = backend->create_tensor(element::i64, output_shape); + auto result32 = backend->create_tensor(element::i32, output_shape); auto handle = backend->compile(f); handle->call_with_validate({result64, result32}, {a}); @@ -127,14 +127,14 @@ NGRAPH_TEST(${BACKEND_NAME}, shape_of_matrix_v0) Shape input_shape{2, 4}; Shape output_shape{2}; - auto A = std::make_shared(element::Type_t::f32, input_shape); + auto A = std::make_shared(element::f32, input_shape); auto f = std::make_shared(std::make_shared(A), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto a = backend->create_tensor(element::Type_t::f32, input_shape); + auto a = backend->create_tensor(element::f32, input_shape); copy_data(a, vector(2 * 4, 0)); - auto result = backend->create_tensor(element::Type_t::i64, output_shape); + auto result = backend->create_tensor(element::i64, output_shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -147,18 +147,18 @@ NGRAPH_TEST(${BACKEND_NAME}, shape_of_matrix_v3) Shape input_shape{2, 4}; Shape output_shape{2}; - auto A = std::make_shared(element::Type_t::f32, input_shape); - auto f = std::make_shared( - OutputVector{std::make_shared(A), - std::make_shared(A, element::Type_t::i32)}, - ParameterVector{A}); + auto A = std::make_shared(element::f32, input_shape); + auto f = + std::make_shared(OutputVector{std::make_shared(A), + std::make_shared(A, element::i32)}, + ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto a = backend->create_tensor(element::Type_t::f32, input_shape); + auto a = backend->create_tensor(element::f32, input_shape); copy_data(a, vector(2 * 4, 0)); - auto result64 = backend->create_tensor(element::Type_t::i64, output_shape); - auto result32 = backend->create_tensor(element::Type_t::i32, output_shape); + auto result64 = backend->create_tensor(element::i64, output_shape); + auto result32 = backend->create_tensor(element::i32, output_shape); auto handle = backend->compile(f); handle->call_with_validate({result64, result32}, {a}); @@ -173,14 +173,14 @@ NGRAPH_TEST(${BACKEND_NAME}, shape_of_5d_v0) Shape input_shape{2, 4, 8, 16, 32}; Shape output_shape{5}; - auto A = std::make_shared(element::Type_t::f32, input_shape); + auto A = std::make_shared(element::f32, input_shape); auto f = std::make_shared(std::make_shared(A), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto a = backend->create_tensor(element::Type_t::f32, input_shape); + auto a = backend->create_tensor(element::f32, input_shape); copy_data(a, vector(2 * 4 * 8 * 16 * 32, 0)); - auto result = backend->create_tensor(element::Type_t::i64, output_shape); + auto result = backend->create_tensor(element::i64, output_shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -193,18 +193,18 @@ NGRAPH_TEST(${BACKEND_NAME}, shape_of_5d_v3) Shape input_shape{2, 4, 8, 16, 32}; Shape output_shape{5}; - auto A = std::make_shared(element::Type_t::f32, input_shape); - auto f = std::make_shared( - OutputVector{std::make_shared(A), - std::make_shared(A, element::Type_t::i32)}, - ParameterVector{A}); + auto A = std::make_shared(element::f32, input_shape); + auto f = + std::make_shared(OutputVector{std::make_shared(A), + std::make_shared(A, element::i32)}, + ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto a = backend->create_tensor(element::Type_t::f32, input_shape); + auto a = backend->create_tensor(element::f32, input_shape); copy_data(a, vector(2 * 4 * 8 * 16 * 32, 0)); - auto result64 = backend->create_tensor(element::Type_t::i64, output_shape); - auto result32 = backend->create_tensor(element::Type_t::i32, output_shape); + auto result64 = backend->create_tensor(element::i64, output_shape); + auto result32 = backend->create_tensor(element::i32, output_shape); auto handle = backend->compile(f); handle->call_with_validate({result64, result32}, {a}); diff --git a/ngraph/test/backend/sigmoid.in.cpp b/ngraph/test/backend/sigmoid.in.cpp index 931359da6a45ec..23bdc501e54cfc 100644 --- a/ngraph/test/backend/sigmoid.in.cpp +++ b/ngraph/test/backend/sigmoid.in.cpp @@ -42,16 +42,14 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, sigmoid_n1c1h2w2) { - auto input = make_shared(element::Type_t::f32, Shape{1, 1, 2, 2}); + auto input = make_shared(element::f32, Shape{1, 1, 2, 2}); auto sigmoid_node = make_shared(input); auto func = make_shared(sigmoid_node, ParameterVector{input}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - shared_ptr a = - backend->create_tensor(element::Type_t::f32, input->get_shape()); - shared_ptr result = - backend->create_tensor(element::Type_t::f32, input->get_shape()); + shared_ptr a = backend->create_tensor(element::f32, input->get_shape()); + shared_ptr result = backend->create_tensor(element::f32, input->get_shape()); float x1 = 1.0f; float x2 = 4.0f; @@ -69,16 +67,14 @@ NGRAPH_TEST(${BACKEND_NAME}, sigmoid_n1c1h2w2) NGRAPH_TEST(${BACKEND_NAME}, sigmoid_n1c1h4) { - auto input = make_shared(element::Type_t::f32, Shape{1, 1, 4}); + auto input = make_shared(element::f32, Shape{1, 1, 4}); auto sigmoid_node = make_shared(input); auto func = make_shared(sigmoid_node, ParameterVector{input}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - shared_ptr a = - backend->create_tensor(element::Type_t::f32, input->get_shape()); - shared_ptr result = - backend->create_tensor(element::Type_t::f32, input->get_shape()); + shared_ptr a = backend->create_tensor(element::f32, input->get_shape()); + shared_ptr result = backend->create_tensor(element::f32, input->get_shape()); float x1 = 1.0f; float x2 = 4.0f; diff --git a/ngraph/test/backend/sign.in.cpp b/ngraph/test/backend/sign.in.cpp index 751801831df152..20e3dbf3f89876 100644 --- a/ngraph/test/backend/sign.in.cpp +++ b/ngraph/test/backend/sign.in.cpp @@ -49,15 +49,15 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, sign) { Shape shape{2, 3}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared(make_shared(A), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, -2, 0, -4.8f, 4.8f, -0.0f}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); diff --git a/ngraph/test/backend/sin.in.cpp b/ngraph/test/backend/sin.in.cpp index 3b69a5cbdd6be8..f424bc5e5807ca 100644 --- a/ngraph/test/backend/sin.in.cpp +++ b/ngraph/test/backend/sin.in.cpp @@ -49,16 +49,16 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, sin) { Shape shape{11}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared(make_shared(A), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); vector input{0.f, 0.25f, -0.25f, 0.5f, -0.5f, 1.f, -1.f, 2.f, -2.f, 4.f, -4.f}; copy_data(a, input); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); EXPECT_TRUE(test::all_close_f(vector{0.00000000f, diff --git a/ngraph/test/backend/sinh.in.cpp b/ngraph/test/backend/sinh.in.cpp index 85a9e5caa648c0..b2dca5b21756f3 100644 --- a/ngraph/test/backend/sinh.in.cpp +++ b/ngraph/test/backend/sinh.in.cpp @@ -49,16 +49,16 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, sinh) { Shape shape{6}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared(make_shared(A), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); vector input{1.0f, 0.0f, -0.0f, -1.0f, 5.0f, -5.0f}; copy_data(a, input); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); std::transform( input.begin(), input.end(), input.begin(), [](float x) -> float { return sinhf(x); }); diff --git a/ngraph/test/backend/slice.in.cpp b/ngraph/test/backend/slice.in.cpp index 1eee81d551a4b8..533c5a7b8e6fd6 100644 --- a/ngraph/test/backend/slice.in.cpp +++ b/ngraph/test/backend/slice.in.cpp @@ -35,7 +35,7 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, slice_scalar) { Shape shape_a{}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_r{}; auto r = make_shared(A, Coordinate{}, Coordinate{}); auto f = make_shared(make_shared(r), ParameterVector{A}); @@ -43,9 +43,9 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_scalar) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{312}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -56,7 +56,7 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_scalar) NGRAPH_TEST(${BACKEND_NAME}, slice_matrix) { Shape shape_a{4, 4}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_r{3, 2}; auto r = make_shared(A, Coordinate{0, 1}, Coordinate{3, 3}); auto f = make_shared(r, ParameterVector{A}); @@ -64,9 +64,9 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_matrix) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -77,7 +77,7 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_matrix) NGRAPH_TEST(${BACKEND_NAME}, slice_vector) { Shape shape_a{16}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_r{12}; auto r = make_shared(A, Coordinate{2}, Coordinate{14}); auto f = make_shared(r, ParameterVector{A}); @@ -85,9 +85,9 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_vector) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -99,8 +99,8 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_vector) NGRAPH_TEST(${BACKEND_NAME}, slice_matrix_axis_0_overlap) { Shape shape_a{4, 4}; - auto A = make_shared(element::Type_t::f32, shape_a); - auto B = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); + auto B = make_shared(element::f32, shape_a); auto C = make_shared(A, B); Shape shape_r{2, 4}; auto D = make_shared(C, Coordinate{0, 0}, Coordinate{2, 4}); @@ -111,11 +111,11 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_matrix_axis_0_overlap) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}); - auto b = backend->create_tensor(element::Type_t::f32, shape_a); + auto b = backend->create_tensor(element::f32, shape_a); copy_data(b, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b}); @@ -127,7 +127,7 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_matrix_axis_0_overlap) NGRAPH_TEST(${BACKEND_NAME}, slice_matrix_axis_0_in_place) { Shape shape_a{4, 4}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_r{2, 4}; auto D = make_shared(A, Coordinate{0, 0}, Coordinate{2, 4}); auto E = make_shared(A, Coordinate{2, 0}, Coordinate{4, 4}); @@ -137,9 +137,9 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_matrix_axis_0_in_place) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -151,7 +151,7 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_matrix_axis_0_in_place) NGRAPH_TEST(${BACKEND_NAME}, slice_matrix_axis_0_in_place_twice) { Shape shape_a{4, 4}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_r{1, 4}; auto B = make_shared(A, Coordinate{0, 0}, Coordinate{2, 4}); auto D = make_shared(B, Coordinate{1, 0}, Coordinate{2, 4}); @@ -162,9 +162,9 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_matrix_axis_0_in_place_twice) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -175,7 +175,7 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_matrix_axis_0_in_place_twice) NGRAPH_TEST(${BACKEND_NAME}, slice_matrix_axis_0_in_place_twice_overlap) { Shape shape_a{5, 4}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_r{2, 4}; auto B = make_shared(A, Coordinate{1, 0}, Coordinate{5, 4}); auto D = make_shared(B, Coordinate{1, 0}, Coordinate{3, 4}); @@ -186,10 +186,10 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_matrix_axis_0_in_place_twice_overlap) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -201,7 +201,7 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_matrix_axis_0_in_place_twice_overlap) NGRAPH_TEST(${BACKEND_NAME}, slice_matrix_axis_0_in_place_with_transpose) { Shape shape_a{4, 5}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_r{2, 4}; auto B = make_shared(A, Coordinate{1, 0}, Coordinate{4, 5}); auto C = builder::opset1::transpose(B); @@ -213,10 +213,10 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_matrix_axis_0_in_place_with_transpose) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -228,7 +228,7 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_matrix_axis_0_in_place_with_transpose) NGRAPH_TEST(${BACKEND_NAME}, slice_matrix_strided) { Shape shape_a{4, 4}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_r{2, 2}; auto r = make_shared(A, Coordinate{1, 0}, Coordinate{4, 4}, Strides{2, 3}); auto f = make_shared(r, ParameterVector{A}); @@ -236,9 +236,9 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_matrix_strided) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -249,7 +249,7 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_matrix_strided) NGRAPH_TEST(${BACKEND_NAME}, slice_3d) { Shape shape_a{4, 4, 4}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_r{2, 2, 2}; auto r = make_shared(A, Coordinate{1, 1, 1}, Coordinate{3, 3, 3}); auto f = make_shared(r, ParameterVector{A}); @@ -257,7 +257,7 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_3d) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, @@ -265,7 +265,7 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_3d) 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -277,7 +277,7 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_3d) NGRAPH_TEST(${BACKEND_NAME}, slice_3d_strided) { Shape shape_a{4, 4, 4}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_r{2, 2, 2}; auto r = make_shared(A, Coordinate{0, 0, 0}, Coordinate{4, 4, 4}, Strides{2, 2, 2}); auto f = make_shared(r, ParameterVector{A}); @@ -285,7 +285,7 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_3d_strided) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, @@ -293,7 +293,7 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_3d_strided) 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -305,7 +305,7 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_3d_strided) NGRAPH_TEST(${BACKEND_NAME}, slice_3d_strided_different_strides) { Shape shape_a{4, 4, 4}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_r{2, 2, 2}; auto r = make_shared(A, Coordinate{0, 0, 0}, Coordinate{4, 4, 4}, Strides{2, 2, 3}); auto f = make_shared(r, ParameterVector{A}); @@ -313,7 +313,7 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_3d_strided_different_strides) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, @@ -321,7 +321,7 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_3d_strided_different_strides) 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -333,7 +333,7 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_3d_strided_different_strides) NGRAPH_TEST(${BACKEND_NAME}, slice_3d_strided_different_strides_int64) { Shape shape_a{4, 4, 4}; - auto A = make_shared(element::Type_t::i64, shape_a); + auto A = make_shared(element::i64, shape_a); Shape shape_r{2, 2, 2}; auto r = make_shared(A, Coordinate{0, 0, 0}, Coordinate{4, 4, 4}, Strides{2, 2, 3}); auto f = make_shared(r, ParameterVector{A}); @@ -341,7 +341,7 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_3d_strided_different_strides_int64) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i64, shape_a); + auto a = backend->create_tensor(element::i64, shape_a); copy_data(a, vector{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, @@ -349,7 +349,7 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_3d_strided_different_strides_int64) 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63}); - auto result = backend->create_tensor(element::Type_t::i64, shape_r); + auto result = backend->create_tensor(element::i64, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -359,7 +359,7 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_3d_strided_different_strides_int64) NGRAPH_TEST(${BACKEND_NAME}, slice_3d_start_just_oob) { Shape shape_a{20, 10, 5}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_r{20, 0, 5}; auto r = make_shared(A, Coordinate{0, 10, 0}, Coordinate{20, 10, 5}, Strides{1, 1, 1}); @@ -368,10 +368,10 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_3d_start_just_oob) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); vector a_data(20 * 10 * 5, 222.0f); copy_data(a, a_data); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); diff --git a/ngraph/test/backend/softmax.in.cpp b/ngraph/test/backend/softmax.in.cpp index b649e5dfc45cc8..9645ca066e2a17 100644 --- a/ngraph/test/backend/softmax.in.cpp +++ b/ngraph/test/backend/softmax.in.cpp @@ -43,14 +43,14 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, softmax_axis_3d) { Shape shape{2, 2, 3}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared(make_shared(A, 0), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{-10, -20, -30, -40, -50, -60, -1, -2, -3, -4, -5, -6}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto d0 = expf(-10) + expf(-1); auto d1 = expf(-20) + expf(-2); @@ -80,14 +80,14 @@ NGRAPH_TEST(${BACKEND_NAME}, softmax_axis_3d) NGRAPH_TEST(${BACKEND_NAME}, softmax_axis_3d_double) { Shape shape{2, 2, 3}; - auto A = make_shared(element::Type_t::f64, shape); + auto A = make_shared(element::f64, shape); auto f = make_shared(make_shared(A, 0), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto a = backend->create_tensor(element::Type_t::f64, shape); + auto a = backend->create_tensor(element::f64, shape); copy_data(a, vector{-10, -20, -30, -40, -50, -60, -1, -2, -3, -4, -5, -6}); - auto result = backend->create_tensor(element::Type_t::f64, shape); + auto result = backend->create_tensor(element::f64, shape); auto d0 = exp(-10) + exp(-1); auto d1 = exp(-20) + exp(-2); @@ -117,14 +117,14 @@ NGRAPH_TEST(${BACKEND_NAME}, softmax_axis_3d_double) NGRAPH_TEST(${BACKEND_NAME}, softmax_2d_axis_1) { Shape shape{2, 3}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared(make_shared(A, 1), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{-10, -20, -30, -40, -50, -60}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto d0 = expf(-10) + expf(-20) + expf(-30); auto d1 = expf(-40) + expf(-50) + expf(-60); @@ -143,14 +143,14 @@ NGRAPH_TEST(${BACKEND_NAME}, softmax_2d_axis_1) NGRAPH_TEST(${BACKEND_NAME}, softmax_2d_axis_0) { Shape shape{2, 3}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared(make_shared(A, 0), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{-10, -20, -30, -40, -50, -60}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto d0 = expf(-10) + expf(-40); auto d1 = expf(-20) + expf(-50); @@ -170,14 +170,14 @@ NGRAPH_TEST(${BACKEND_NAME}, softmax_2d_axis_0) NGRAPH_TEST(${BACKEND_NAME}, softmax_axis_3d_trivial) { Shape shape{1, 2, 3}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared(make_shared(A, 0), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{-10, -20, -30, -40, -50, -60}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -188,16 +188,16 @@ NGRAPH_TEST(${BACKEND_NAME}, softmax_axis_3d_trivial) NGRAPH_TEST(${BACKEND_NAME}, softmax_underflow) { Shape shape{2, 3}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared(make_shared(A, 0), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); auto low = std::numeric_limits::lowest(); - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{low, 1, 2, 3, 4, 5}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto d0 = expf(low) + expf(3); auto d1 = expf(1) + expf(4); @@ -213,16 +213,16 @@ NGRAPH_TEST(${BACKEND_NAME}, softmax_underflow) NGRAPH_TEST(${BACKEND_NAME}, softmax_overflow) { Shape shape{2, 3}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared(make_shared(A, 0), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); auto high = std::numeric_limits::max(); - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{high, 1, 2, 3, 4, 5}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto d0 = expf(high - high) + expf(3 - high); auto d1 = expf(1) + expf(4); diff --git a/ngraph/test/backend/split.in.cpp b/ngraph/test/backend/split.in.cpp index ce0642bd0413b5..953295d07b110b 100644 --- a/ngraph/test/backend/split.in.cpp +++ b/ngraph/test/backend/split.in.cpp @@ -28,8 +28,8 @@ using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); NGRAPH_TEST(${BACKEND_NAME}, split_1d) { - const auto data = make_shared(element::Type_t::i32, Shape{6}); - const auto axis = op::Constant::create(element::Type_t::i64, Shape{}, {0}); + const auto data = make_shared(element::i32, Shape{6}); + const auto axis = op::Constant::create(element::i64, Shape{}, {0}); const auto tested_op = make_shared(data, axis, 3); const auto function = make_shared(tested_op, ParameterVector{data}); @@ -47,8 +47,8 @@ NGRAPH_TEST(${BACKEND_NAME}, split_1d) NGRAPH_TEST(${BACKEND_NAME}, split_2d_axis_0) { Shape shape{6, 2}; - const auto data = make_shared(element::Type_t::f32, shape); - const auto axis = op::Constant::create(element::Type_t::i64, Shape{}, {0}); + const auto data = make_shared(element::f32, shape); + const auto axis = op::Constant::create(element::i64, Shape{}, {0}); const auto tested_op = make_shared(data, axis, 2); const auto function = make_shared(tested_op, ParameterVector{data}); @@ -67,8 +67,8 @@ NGRAPH_TEST(${BACKEND_NAME}, split_2d_axis_0) NGRAPH_TEST(${BACKEND_NAME}, split_2d_axis_1) { Shape shape{6, 2}; - const auto data = make_shared(element::Type_t::f32, shape); - const auto axis = op::Constant::create(element::Type_t::i64, Shape{}, {1}); + const auto data = make_shared(element::f32, shape); + const auto axis = op::Constant::create(element::i64, Shape{}, {1}); const auto tested_op = make_shared(data, axis, 2); const auto function = make_shared(tested_op, ParameterVector{data}); @@ -87,8 +87,8 @@ NGRAPH_TEST(${BACKEND_NAME}, split_2d_axis_1) NGRAPH_TEST(${BACKEND_NAME}, split_3d_axis_0) { Shape shape{2, 2, 3}; - const auto data = make_shared(element::Type_t::f32, shape); - const auto axis = op::Constant::create(element::Type_t::i64, Shape{}, {0}); + const auto data = make_shared(element::f32, shape); + const auto axis = op::Constant::create(element::i64, Shape{}, {0}); const auto tested_op = make_shared(data, axis, 2); const auto function = make_shared(tested_op, ParameterVector{data}); @@ -107,8 +107,8 @@ NGRAPH_TEST(${BACKEND_NAME}, split_3d_axis_0) NGRAPH_TEST(${BACKEND_NAME}, split_3d_axis_1) { Shape shape{2, 8, 2}; - const auto data = make_shared(element::Type_t::f32, shape); - const auto axis = op::Constant::create(element::Type_t::i64, Shape{}, {1}); + const auto data = make_shared(element::f32, shape); + const auto axis = op::Constant::create(element::i64, Shape{}, {1}); const auto tested_op = make_shared(data, axis, 4); const auto function = make_shared(tested_op, ParameterVector{data}); @@ -129,8 +129,8 @@ NGRAPH_TEST(${BACKEND_NAME}, split_3d_axis_1) NGRAPH_TEST(${BACKEND_NAME}, split_3d_axis_2) { Shape shape{2, 1, 6}; - const auto data = make_shared(element::Type_t::f32, shape); - const auto axis = op::Constant::create(element::Type_t::i64, Shape{}, {2}); + const auto data = make_shared(element::f32, shape); + const auto axis = op::Constant::create(element::i64, Shape{}, {2}); const auto tested_op = make_shared(data, axis, 2); const auto function = make_shared(tested_op, ParameterVector{data}); @@ -149,8 +149,8 @@ NGRAPH_TEST(${BACKEND_NAME}, split_3d_axis_2) NGRAPH_TEST(${BACKEND_NAME}, split_4d_axis_0) { Shape shape{3, 2, 3, 1}; - const auto data = make_shared(element::Type_t::f32, shape); - const auto axis = op::Constant::create(element::Type_t::i64, Shape{}, {0}); + const auto data = make_shared(element::f32, shape); + const auto axis = op::Constant::create(element::i64, Shape{}, {0}); const auto tested_op = make_shared(data, axis, 3); const auto function = make_shared(tested_op, ParameterVector{data}); @@ -170,8 +170,8 @@ NGRAPH_TEST(${BACKEND_NAME}, split_4d_axis_0) NGRAPH_TEST(${BACKEND_NAME}, split_4d_axis_1) { Shape shape{2, 8, 2, 2}; - const auto data = make_shared(element::Type_t::f32, shape); - const auto axis = op::Constant::create(element::Type_t::i64, Shape{}, {1}); + const auto data = make_shared(element::f32, shape); + const auto axis = op::Constant::create(element::i64, Shape{}, {1}); const auto tested_op = make_shared(data, axis, 4); const auto function = make_shared(tested_op, ParameterVector{data}); @@ -196,8 +196,8 @@ NGRAPH_TEST(${BACKEND_NAME}, split_4d_axis_1) NGRAPH_TEST(${BACKEND_NAME}, split_4d_axis_2) { Shape shape{2, 1, 6, 2}; - const auto data = make_shared(element::Type_t::f32, shape); - const auto axis = op::Constant::create(element::Type_t::i64, Shape{}, {2}); + const auto data = make_shared(element::f32, shape); + const auto axis = op::Constant::create(element::i64, Shape{}, {2}); const auto tested_op = make_shared(data, axis, 3); const auto function = make_shared(tested_op, ParameterVector{data}); @@ -217,8 +217,8 @@ NGRAPH_TEST(${BACKEND_NAME}, split_4d_axis_2) NGRAPH_TEST(${BACKEND_NAME}, split_4d_axis_3) { Shape shape{2, 1, 2, 6}; - const auto data = make_shared(element::Type_t::f32, shape); - const auto axis = op::Constant::create(element::Type_t::i64, Shape{}, {3}); + const auto data = make_shared(element::f32, shape); + const auto axis = op::Constant::create(element::i64, Shape{}, {3}); const auto tested_op = make_shared(data, axis, 3); const auto function = make_shared(tested_op, ParameterVector{data}); diff --git a/ngraph/test/backend/sqrt.in.cpp b/ngraph/test/backend/sqrt.in.cpp index f6d5b6b17b26de..6c4b85aa09f477 100644 --- a/ngraph/test/backend/sqrt.in.cpp +++ b/ngraph/test/backend/sqrt.in.cpp @@ -49,15 +49,15 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, sqrt) { Shape shape{2, 3}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared(make_shared(A), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{16, 4, 81, 100, 10000, 0}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -67,15 +67,15 @@ NGRAPH_TEST(${BACKEND_NAME}, sqrt) NGRAPH_TEST(${BACKEND_NAME}, sqrt_negative_inputs) { Shape shape{4}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared(make_shared(A), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{-1, 4, -81, 100}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); diff --git a/ngraph/test/backend/strided_slice.in.cpp b/ngraph/test/backend/strided_slice.in.cpp index 2a0b2e54d43410..192a0f505ef4fd 100644 --- a/ngraph/test/backend/strided_slice.in.cpp +++ b/ngraph/test/backend/strided_slice.in.cpp @@ -44,12 +44,10 @@ void check_strided_slice_success(const element::Type& input_element_type, const std::vector& expected_values) { auto arg = std::make_shared(input_element_type, input_shape); - auto begin_op = - make_shared(element::Type_t::i64, Shape{begin_values.size()}); - auto end_op = - make_shared(element::Type_t::i64, Shape{end_values.size()}); + auto begin_op = make_shared(element::i64, Shape{begin_values.size()}); + auto end_op = make_shared(element::i64, Shape{end_values.size()}); auto strides_op = - make_shared(element::Type_t::i64, Shape{strides_values.size()}); + make_shared(element::i64, Shape{strides_values.size()}); std::vector input_values(shape_size(input_shape)); std::iota(input_values.begin(), input_values.end(), static_cast(0)); @@ -71,10 +69,9 @@ void check_strided_slice_success(const element::Type& input_element_type, auto ex = backend->compile(f); auto arg_tensor = backend->create_tensor(input_element_type, input_shape); - auto begin_tensor = backend->create_tensor(element::Type_t::i64, Shape{begin_values.size()}); - auto end_tensor = backend->create_tensor(element::Type_t::i64, Shape{end_values.size()}); - auto strides_tensor = - backend->create_tensor(element::Type_t::i64, Shape{strides_values.size()}); + auto begin_tensor = backend->create_tensor(element::i64, Shape{begin_values.size()}); + auto end_tensor = backend->create_tensor(element::i64, Shape{end_values.size()}); + auto strides_tensor = backend->create_tensor(element::i64, Shape{strides_values.size()}); copy_data(arg_tensor, input_values); copy_data(begin_tensor, begin_values); copy_data(end_tensor, end_values); @@ -106,10 +103,8 @@ void check_strided_slice_stride_optional_success(const element::Type& input_elem const std::vector& expected_values) { auto arg = std::make_shared(input_element_type, input_shape); - auto begin_op = - make_shared(element::Type_t::i64, Shape{begin_values.size()}); - auto end_op = - make_shared(element::Type_t::i64, Shape{end_values.size()}); + auto begin_op = make_shared(element::i64, Shape{begin_values.size()}); + auto end_op = make_shared(element::i64, Shape{end_values.size()}); std::vector input_values(shape_size(input_shape)); std::iota(input_values.begin(), input_values.end(), static_cast(0)); @@ -130,8 +125,8 @@ void check_strided_slice_stride_optional_success(const element::Type& input_elem auto ex = backend->compile(f); auto arg_tensor = backend->create_tensor(input_element_type, input_shape); - auto begin_tensor = backend->create_tensor(element::Type_t::i64, Shape{begin_values.size()}); - auto end_tensor = backend->create_tensor(element::Type_t::i64, Shape{end_values.size()}); + auto begin_tensor = backend->create_tensor(element::i64, Shape{begin_values.size()}); + auto end_tensor = backend->create_tensor(element::i64, Shape{end_values.size()}); copy_data(arg_tensor, input_values); copy_data(begin_tensor, begin_values); copy_data(end_tensor, end_values); @@ -155,7 +150,7 @@ void check_strided_slice_stride_optional_success(const element::Type& input_elem NGRAPH_TEST(${BACKEND_NAME}, strided_slice_0) { check_strided_slice_success( - element::Type_t::u32, + element::u32, Shape{2, 3, 4}, std::vector{1, 0}, std::vector{0, 0}, @@ -176,7 +171,7 @@ NGRAPH_TEST(${BACKEND_NAME}, strided_slice_0) NGRAPH_TEST(${BACKEND_NAME}, strided_slice_1) { check_strided_slice_success( - element::Type_t::u32, + element::u32, Shape{2, 4, 6, 8, 2, 2, 2}, std::vector{0, 0, 2, 7, 0, 0, 1}, std::vector{0, 4, 6, 3, 0, 0, 0}, @@ -206,7 +201,7 @@ NGRAPH_TEST(${BACKEND_NAME}, strided_slice_1) // expected output shape is Shape{1,4} NGRAPH_TEST(${BACKEND_NAME}, strided_slice_stride_optional) { - check_strided_slice_stride_optional_success(element::Type_t::u32, + check_strided_slice_stride_optional_success(element::u32, Shape{2, 3, 4}, std::vector{-1, -1, 0}, std::vector{0, 0, 0}, diff --git a/ngraph/test/backend/subtract.in.cpp b/ngraph/test/backend/subtract.in.cpp index e648d47e746104..dbf2543991cdae 100644 --- a/ngraph/test/backend/subtract.in.cpp +++ b/ngraph/test/backend/subtract.in.cpp @@ -49,18 +49,18 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, subtract) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{2, 4, 8, 16}); - auto b = backend->create_tensor(element::Type_t::f32, shape); + auto b = backend->create_tensor(element::f32, shape); copy_data(b, vector{1, 2, 4, 8}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b}); @@ -70,18 +70,18 @@ NGRAPH_TEST(${BACKEND_NAME}, subtract) NGRAPH_TEST(${BACKEND_NAME}, subtract_overload) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto f = make_shared(std::make_shared(A, B), ParameterVector{A, B}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{2, 4, 8, 16}); - auto b = backend->create_tensor(element::Type_t::f32, shape); + auto b = backend->create_tensor(element::f32, shape); copy_data(b, vector{1, 2, 4, 8}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a, b}); diff --git a/ngraph/test/backend/tan.in.cpp b/ngraph/test/backend/tan.in.cpp index abbe7c25c9dd25..93a3600be2b70f 100644 --- a/ngraph/test/backend/tan.in.cpp +++ b/ngraph/test/backend/tan.in.cpp @@ -49,16 +49,16 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, tan) { Shape shape{11}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared(make_shared(A), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); vector input{0.f, 0.25f, -0.25f, 0.5f, -0.5f, 1.f, -1.f, 2.f, -2.f, 4.f, -4.f}; copy_data(a, input); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); EXPECT_TRUE(test::all_close_f(vector{0.00000000f, diff --git a/ngraph/test/backend/tanh.in.cpp b/ngraph/test/backend/tanh.in.cpp index 08e5db9a49c3d9..404c0b6d6c4cf1 100644 --- a/ngraph/test/backend/tanh.in.cpp +++ b/ngraph/test/backend/tanh.in.cpp @@ -49,16 +49,16 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, tanh) { Shape shape{6}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto f = make_shared(make_shared(A), ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); vector input{1.0f, 0.0f, -0.0f, -1.0f, 0.5f, -0.5f}; copy_data(a, input); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); std::transform( input.begin(), input.end(), input.begin(), [](float x) -> float { return tanhf(x); }); diff --git a/ngraph/test/backend/tile.in.cpp b/ngraph/test/backend/tile.in.cpp index bf1c2b9d6769e7..d9b4b5d520e7a1 100644 --- a/ngraph/test/backend/tile.in.cpp +++ b/ngraph/test/backend/tile.in.cpp @@ -39,9 +39,9 @@ static string s_manifest = "${MANIFEST}"; NGRAPH_TEST(${BACKEND_NAME}, tile_3d_small_data_rank) { Shape shape_a{3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_re{3}; - auto repeats = make_shared(element::Type_t::i64, shape_re, vector{2, 2, 1}); + auto repeats = make_shared(element::i64, shape_re, vector{2, 2, 1}); Shape shape_r{2, 2, 3}; auto tile = make_shared(A, repeats); @@ -51,10 +51,10 @@ NGRAPH_TEST(${BACKEND_NAME}, tile_3d_small_data_rank) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -66,9 +66,9 @@ NGRAPH_TEST(${BACKEND_NAME}, tile_3d_small_data_rank) NGRAPH_TEST(${BACKEND_NAME}, tile_3d_few_repeats) { Shape shape_a{2, 1, 3}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_re{2}; - auto repeats = make_shared(element::Type_t::i64, shape_re, vector{2, 1}); + auto repeats = make_shared(element::i64, shape_re, vector{2, 1}); Shape shape_r{2, 2, 3}; auto tile = make_shared(A, repeats); @@ -78,10 +78,10 @@ NGRAPH_TEST(${BACKEND_NAME}, tile_3d_few_repeats) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_tensor(element::Type_t::f32, shape_r); + auto result = backend->create_tensor(element::f32, shape_r); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); diff --git a/ngraph/test/backend/topk.in.cpp b/ngraph/test/backend/topk.in.cpp index 288512b8db404a..e61451b8bc10fb 100644 --- a/ngraph/test/backend/topk.in.cpp +++ b/ngraph/test/backend/topk.in.cpp @@ -64,14 +64,14 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_resnet50) Shape shape{128, 1000}; Shape rshape5{128, 5}; Shape rshape1{128, 1}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto B = make_shared(A, - op::Constant::create(element::Type_t::i64, {}, {5}), + op::Constant::create(element::i64, {}, {5}), 1, op::v1::TopK::Mode::MAX, op::v1::TopK::SortType::SORT_VALUES); auto C = make_shared(A, - op::Constant::create(element::Type_t::i64, {}, {1}), + op::Constant::create(element::i64, {}, {1}), 1, op::v1::TopK::Mode::MAX, op::v1::TopK::SortType::SORT_VALUES); @@ -86,7 +86,7 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_resnet50) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); vector data; for (size_t i = 0; i < shape[0]; i++) { @@ -97,10 +97,10 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_resnet50) } copy_data(a, data); - auto result5_value = backend->create_tensor(element::Type_t::f32, rshape5); - auto result5_index = backend->create_tensor(element::Type_t::i32, rshape5); - auto result1_value = backend->create_tensor(element::Type_t::f32, rshape1); - auto result1_index = backend->create_tensor(element::Type_t::i32, rshape1); + auto result5_value = backend->create_tensor(element::f32, rshape5); + auto result5_index = backend->create_tensor(element::i32, rshape5); + auto result1_value = backend->create_tensor(element::f32, rshape1); + auto result1_index = backend->create_tensor(element::i32, rshape1); auto exec = backend->compile(f); exec->call({result5_value, result5_index, result1_value, result1_index}, {a}); @@ -142,8 +142,8 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_max_sort_none) { Shape shape{128, 1000}; Shape rshape{128, 5}; - auto A = make_shared(element::Type_t::f32, shape); - auto k = op::Constant::create(element::Type_t::i64, {}, {5}); + auto A = make_shared(element::f32, shape); + auto k = op::Constant::create(element::i64, {}, {5}); int64_t axis = 1; auto B = make_shared( A, k, axis, op::v1::TopK::Mode::MAX, op::v1::TopK::SortType::NONE); @@ -154,7 +154,7 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_max_sort_none) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); vector data; for (size_t i = 0; i < shape[0]; i++) { @@ -165,8 +165,8 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_max_sort_none) } copy_data(a, data); - auto result_value = backend->create_tensor(element::Type_t::f32, rshape); - auto result_index = backend->create_tensor(element::Type_t::i32, rshape); + auto result_value = backend->create_tensor(element::f32, rshape); + auto result_index = backend->create_tensor(element::i32, rshape); auto exec = backend->compile(f); exec->call({result_value, result_index}, {a}); @@ -196,8 +196,8 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_min_sort_none) { Shape shape{128, 1000}; Shape rshape{128, 5}; - auto A = make_shared(element::Type_t::f32, shape); - auto k = op::Constant::create(element::Type_t::i64, {}, {5}); + auto A = make_shared(element::f32, shape); + auto k = op::Constant::create(element::i64, {}, {5}); int64_t axis = 1; auto B = make_shared( A, k, axis, op::v1::TopK::Mode::MIN, op::v1::TopK::SortType::NONE); @@ -208,7 +208,7 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_min_sort_none) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); vector data; for (size_t i = 0; i < shape[0]; i++) { @@ -219,8 +219,8 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_min_sort_none) } copy_data(a, data); - auto result_value = backend->create_tensor(element::Type_t::f32, rshape); - auto result_index = backend->create_tensor(element::Type_t::i32, rshape); + auto result_value = backend->create_tensor(element::f32, rshape); + auto result_index = backend->create_tensor(element::i32, rshape); auto exec = backend->compile(f); exec->call({result_value, result_index}, {a}); @@ -250,8 +250,8 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_max_sort_value) { Shape shape{128, 1000}; Shape rshape{128, 5}; - auto A = make_shared(element::Type_t::f32, shape); - auto k = op::Constant::create(element::Type_t::i64, {}, {5}); + auto A = make_shared(element::f32, shape); + auto k = op::Constant::create(element::i64, {}, {5}); int64_t axis = 1; auto B = make_shared( A, k, axis, op::v1::TopK::Mode::MAX, op::v1::TopK::SortType::SORT_VALUES); @@ -262,7 +262,7 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_max_sort_value) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); vector data; for (size_t i = 0; i < shape[0]; i++) { @@ -273,8 +273,8 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_max_sort_value) } copy_data(a, data); - auto result_value = backend->create_tensor(element::Type_t::f32, rshape); - auto result_index = backend->create_tensor(element::Type_t::i32, rshape); + auto result_value = backend->create_tensor(element::f32, rshape); + auto result_index = backend->create_tensor(element::i32, rshape); auto exec = backend->compile(f); exec->call({result_value, result_index}, {a}); @@ -300,8 +300,8 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_min_sort_value) { Shape shape{128, 1000}; Shape rshape{128, 5}; - auto A = make_shared(element::Type_t::f32, shape); - auto k = op::Constant::create(element::Type_t::i64, {}, {5}); + auto A = make_shared(element::f32, shape); + auto k = op::Constant::create(element::i64, {}, {5}); int64_t axis = 1; auto B = make_shared( A, k, axis, op::v1::TopK::Mode::MIN, op::v1::TopK::SortType::SORT_VALUES); @@ -312,7 +312,7 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_min_sort_value) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); vector data; for (size_t i = 0; i < shape[0]; i++) { @@ -323,8 +323,8 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_min_sort_value) } copy_data(a, data); - auto result_value = backend->create_tensor(element::Type_t::f32, rshape); - auto result_index = backend->create_tensor(element::Type_t::i32, rshape); + auto result_value = backend->create_tensor(element::f32, rshape); + auto result_index = backend->create_tensor(element::i32, rshape); auto exec = backend->compile(f); exec->call({result_value, result_index}, {a}); @@ -354,8 +354,8 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_max_sort_index) { Shape shape{128, 1000}; Shape rshape{128, 5}; - auto A = make_shared(element::Type_t::f32, shape); - auto k = op::Constant::create(element::Type_t::i64, {}, {5}); + auto A = make_shared(element::f32, shape); + auto k = op::Constant::create(element::i64, {}, {5}); int64_t axis = 1; auto B = make_shared( A, k, axis, op::v1::TopK::Mode::MAX, op::v1::TopK::SortType::SORT_INDICES); @@ -366,7 +366,7 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_max_sort_index) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); vector data; for (size_t i = 0; i < shape[0]; i++) { @@ -377,8 +377,8 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_max_sort_index) } copy_data(a, data); - auto result_value = backend->create_tensor(element::Type_t::f32, rshape); - auto result_index = backend->create_tensor(element::Type_t::i32, rshape); + auto result_value = backend->create_tensor(element::f32, rshape); + auto result_index = backend->create_tensor(element::i32, rshape); auto exec = backend->compile(f); exec->call({result_value, result_index}, {a}); @@ -408,8 +408,8 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_min_sort_index) { Shape shape{128, 1000}; Shape rshape{128, 5}; - auto A = make_shared(element::Type_t::f32, shape); - auto k = op::Constant::create(element::Type_t::i64, {}, {5}); + auto A = make_shared(element::f32, shape); + auto k = op::Constant::create(element::i64, {}, {5}); int64_t axis = 1; auto B = make_shared( A, k, axis, op::v1::TopK::Mode::MIN, op::v1::TopK::SortType::SORT_INDICES); @@ -420,7 +420,7 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_min_sort_index) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); vector data; for (size_t i = 0; i < shape[0]; i++) { @@ -431,8 +431,8 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_min_sort_index) } copy_data(a, data); - auto result_value = backend->create_tensor(element::Type_t::f32, rshape); - auto result_index = backend->create_tensor(element::Type_t::i32, rshape); + auto result_value = backend->create_tensor(element::f32, rshape); + auto result_index = backend->create_tensor(element::i32, rshape); auto exec = backend->compile(f); exec->call({result_value, result_index}, {a}); @@ -462,8 +462,8 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_1d_max_all) { Shape shape{6}; Shape rshape{6}; - auto A = make_shared(element::Type_t::f32, shape); - auto k = op::Constant::create(element::Type_t::i64, {}, {6}); + auto A = make_shared(element::f32, shape); + auto k = op::Constant::create(element::i64, {}, {6}); int64_t axis = 0; auto B = make_shared( A, k, axis, op::v1::TopK::Mode::MAX, op::v1::TopK::SortType::SORT_VALUES); @@ -473,10 +473,10 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_1d_max_all) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result0 = backend->create_tensor(element::Type_t::f32, rshape); - auto result1 = backend->create_tensor(element::Type_t::i32, rshape); + auto result0 = backend->create_tensor(element::f32, rshape); + auto result1 = backend->create_tensor(element::i32, rshape); auto h0 = backend->compile(f0); h0->call_with_validate({result0}, {a}); @@ -491,8 +491,8 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_1d_i32_max_all) { Shape shape{6}; Shape rshape{6}; - auto A = make_shared(element::Type_t::i32, shape); - auto k = op::Constant::create(element::Type_t::i64, {}, {6}); + auto A = make_shared(element::i32, shape); + auto k = op::Constant::create(element::i64, {}, {6}); int64_t axis = 0; auto B = make_shared( A, k, axis, op::v1::TopK::Mode::MAX, op::v1::TopK::SortType::SORT_VALUES); @@ -502,10 +502,10 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_1d_i32_max_all) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::i32, shape); + auto a = backend->create_tensor(element::i32, shape); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result0 = backend->create_tensor(element::Type_t::i32, rshape); - auto result1 = backend->create_tensor(element::Type_t::i32, rshape); + auto result0 = backend->create_tensor(element::i32, rshape); + auto result1 = backend->create_tensor(element::i32, rshape); auto h0 = backend->compile(f0); h0->call_with_validate({result0}, {a}); @@ -519,8 +519,8 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_1d_max_partial) { Shape shape{6}; Shape rshape{3}; - auto A = make_shared(element::Type_t::f32, shape); - auto k = op::Constant::create(element::Type_t::i64, {}, {3}); + auto A = make_shared(element::f32, shape); + auto k = op::Constant::create(element::i64, {}, {3}); int64_t axis = 0; auto B = make_shared( A, k, axis, op::v1::TopK::Mode::MAX, op::v1::TopK::SortType::SORT_VALUES); @@ -530,10 +530,10 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_1d_max_partial) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result0 = backend->create_tensor(element::Type_t::f32, rshape); - auto result1 = backend->create_tensor(element::Type_t::i32, rshape); + auto result0 = backend->create_tensor(element::f32, rshape); + auto result1 = backend->create_tensor(element::i32, rshape); auto h0 = backend->compile(f0); h0->call_with_validate({result0}, {a}); @@ -548,8 +548,8 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_1d_max_one) { Shape shape{6}; Shape rshape{1}; - auto A = make_shared(element::Type_t::f32, shape); - auto k = op::Constant::create(element::Type_t::i64, {}, {1}); + auto A = make_shared(element::f32, shape); + auto k = op::Constant::create(element::i64, {}, {1}); int64_t axis = 0; auto B = make_shared( A, k, axis, op::v1::TopK::Mode::MAX, op::v1::TopK::SortType::SORT_VALUES); @@ -559,10 +559,10 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_1d_max_one) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result0 = backend->create_tensor(element::Type_t::f32, rshape); - auto result1 = backend->create_tensor(element::Type_t::i32, rshape); + auto result0 = backend->create_tensor(element::f32, rshape); + auto result1 = backend->create_tensor(element::i32, rshape); auto h0 = backend->compile(f0); h0->call_with_validate({result0}, {a}); @@ -577,8 +577,8 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_1d_min_all) { Shape shape{6}; Shape rshape{6}; - auto A = make_shared(element::Type_t::f32, shape); - auto k = op::Constant::create(element::Type_t::i64, {}, {6}); + auto A = make_shared(element::f32, shape); + auto k = op::Constant::create(element::i64, {}, {6}); int64_t axis = 0; auto B = make_shared( A, k, axis, op::v1::TopK::Mode::MIN, op::v1::TopK::SortType::SORT_VALUES); @@ -588,10 +588,10 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_1d_min_all) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{6, 5, 4, 3, 2, 1}); - auto result0 = backend->create_tensor(element::Type_t::f32, rshape); - auto result1 = backend->create_tensor(element::Type_t::i32, rshape); + auto result0 = backend->create_tensor(element::f32, rshape); + auto result1 = backend->create_tensor(element::i32, rshape); auto h0 = backend->compile(f0); h0->call_with_validate({result0}, {a}); @@ -606,8 +606,8 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_1d_min_partial) { Shape shape{6}; Shape rshape{3}; - auto A = make_shared(element::Type_t::f32, shape); - auto k = op::Constant::create(element::Type_t::i64, {}, {3}); + auto A = make_shared(element::f32, shape); + auto k = op::Constant::create(element::i64, {}, {3}); int64_t axis = 0; auto B = make_shared( A, k, axis, op::v1::TopK::Mode::MIN, op::v1::TopK::SortType::SORT_VALUES); @@ -617,10 +617,10 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_1d_min_partial) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{6, 5, 4, 3, 2, 1}); - auto result0 = backend->create_tensor(element::Type_t::f32, rshape); - auto result1 = backend->create_tensor(element::Type_t::i32, rshape); + auto result0 = backend->create_tensor(element::f32, rshape); + auto result1 = backend->create_tensor(element::i32, rshape); auto h0 = backend->compile(f0); h0->call_with_validate({result0}, {a}); @@ -635,8 +635,8 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_1d_min_one) { Shape shape{6}; Shape rshape{1}; - auto A = make_shared(element::Type_t::f32, shape); - auto k = op::Constant::create(element::Type_t::i64, {}, {1}); + auto A = make_shared(element::f32, shape); + auto k = op::Constant::create(element::i64, {}, {1}); int64_t axis = 0; auto B = make_shared( A, k, axis, op::v1::TopK::Mode::MIN, op::v1::TopK::SortType::SORT_VALUES); @@ -646,10 +646,10 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_1d_min_one) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{6, 5, 4, 3, 2, 1}); - auto result0 = backend->create_tensor(element::Type_t::f32, rshape); - auto result1 = backend->create_tensor(element::Type_t::i32, rshape); + auto result0 = backend->create_tensor(element::f32, rshape); + auto result1 = backend->create_tensor(element::i32, rshape); auto h0 = backend->compile(f0); h0->call_with_validate({result0}, {a}); @@ -664,8 +664,8 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_3d_max_all) { Shape shape{2, 3, 2}; Shape rshape{2, 3, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto k = op::Constant::create(element::Type_t::i64, {}, {3}); + auto A = make_shared(element::f32, shape); + auto k = op::Constant::create(element::i64, {}, {3}); int64_t axis = 1; auto B = make_shared( A, k, axis, op::v1::TopK::Mode::MAX, op::v1::TopK::SortType::SORT_VALUES); @@ -675,10 +675,10 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_3d_max_all) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{9, 2, 10, 12, 8, 4, 6, 1, 5, 3, 11, 7}); - auto result0 = backend->create_tensor(element::Type_t::f32, rshape); - auto result1 = backend->create_tensor(element::Type_t::i32, rshape); + auto result0 = backend->create_tensor(element::f32, rshape); + auto result1 = backend->create_tensor(element::i32, rshape); auto h0 = backend->compile(f0); h0->call_with_validate({result0}, {a}); @@ -694,25 +694,21 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_int64) { Shape shape{2, 3, 2}; Shape rshape{2, 3, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto k = op::Constant::create(element::Type_t::i64, {}, {3}); + auto A = make_shared(element::f32, shape); + auto k = op::Constant::create(element::i64, {}, {3}); int64_t axis = 1; - auto B = make_shared(A, - k, - axis, - op::v1::TopK::Mode::MAX, - op::v1::TopK::SortType::SORT_VALUES, - element::Type_t::i64); + auto B = make_shared( + A, k, axis, op::v1::TopK::Mode::MAX, op::v1::TopK::SortType::SORT_VALUES, element::i64); auto f0 = make_shared(OutputVector{B->output(0)}, ParameterVector{A}); auto f1 = make_shared(OutputVector{B->output(1)}, ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{9, 2, 10, 12, 8, 4, 6, 1, 5, 3, 11, 7}); - auto result0 = backend->create_tensor(element::Type_t::f32, rshape); - auto result1 = backend->create_tensor(element::Type_t::i64, rshape); + auto result0 = backend->create_tensor(element::f32, rshape); + auto result1 = backend->create_tensor(element::i64, rshape); auto h0 = backend->compile(f0); h0->call_with_validate({result0}, {a}); @@ -728,8 +724,8 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_5d_max_partial) { Shape shape{2, 6, 3, 2, 4}; Shape rshape{2, 2, 3, 2, 4}; - auto A = make_shared(element::Type_t::f32, shape); - auto k = op::Constant::create(element::Type_t::i64, {}, {2}); + auto A = make_shared(element::f32, shape); + auto k = op::Constant::create(element::i64, {}, {2}); int64_t axis = 1; auto B = make_shared( A, k, axis, op::v1::TopK::Mode::MAX, op::v1::TopK::SortType::SORT_VALUES); @@ -739,7 +735,7 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_5d_max_partial) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data( a, vector{ @@ -765,8 +761,8 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_5d_max_partial) 205., 277., 213., 285., 198., 270., 206., 278., 214., 286., 199., 271., 207., 279., 215., 287., 200., 272., 208., 280., 216., 288.}); - auto result0 = backend->create_tensor(element::Type_t::f32, rshape); - auto result1 = backend->create_tensor(element::Type_t::i32, rshape); + auto result0 = backend->create_tensor(element::f32, rshape); + auto result1 = backend->create_tensor(element::i32, rshape); auto h0 = backend->compile(f0); h0->call_with_validate({result0}, {a}); @@ -794,8 +790,8 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_3d_max_partial) { Shape shape{2, 3, 2}; Shape rshape{2, 2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto k = op::Constant::create(element::Type_t::i64, {}, {2}); + auto A = make_shared(element::f32, shape); + auto k = op::Constant::create(element::i64, {}, {2}); int64_t axis = 1; auto B = make_shared( A, k, axis, op::v1::TopK::Mode::MAX, op::v1::TopK::SortType::SORT_VALUES); @@ -805,10 +801,10 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_3d_max_partial) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{9, 2, 10, 12, 8, 4, 6, 1, 5, 3, 11, 7}); - auto result0 = backend->create_tensor(element::Type_t::f32, rshape); - auto result1 = backend->create_tensor(element::Type_t::i32, rshape); + auto result0 = backend->create_tensor(element::f32, rshape); + auto result1 = backend->create_tensor(element::i32, rshape); auto h0 = backend->compile(f0); h0->call_with_validate({result0}, {a}); @@ -824,8 +820,8 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_3d_max_one) { Shape shape{2, 3, 2}; Shape rshape{2, 1, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto k = op::Constant::create(element::Type_t::i64, {}, {1}); + auto A = make_shared(element::f32, shape); + auto k = op::Constant::create(element::i64, {}, {1}); int64_t axis = 1; auto B = make_shared( A, k, axis, op::v1::TopK::Mode::MAX, op::v1::TopK::SortType::SORT_VALUES); @@ -835,10 +831,10 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_3d_max_one) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{9, 2, 10, 12, 8, 4, 6, 1, 5, 3, 11, 7}); - auto result0 = backend->create_tensor(element::Type_t::f32, rshape); - auto result1 = backend->create_tensor(element::Type_t::i32, rshape); + auto result0 = backend->create_tensor(element::f32, rshape); + auto result1 = backend->create_tensor(element::i32, rshape); auto h0 = backend->compile(f0); h0->call_with_validate({result0}, {a}); @@ -853,8 +849,8 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_3d_min_all) { Shape shape{2, 3, 2}; Shape rshape{2, 3, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto k = op::Constant::create(element::Type_t::i64, {}, {3}); + auto A = make_shared(element::f32, shape); + auto k = op::Constant::create(element::i64, {}, {3}); int64_t axis = 1; auto B = make_shared( A, k, axis, op::v1::TopK::Mode::MIN, op::v1::TopK::SortType::SORT_VALUES); @@ -864,10 +860,10 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_3d_min_all) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7}); - auto result0 = backend->create_tensor(element::Type_t::f32, rshape); - auto result1 = backend->create_tensor(element::Type_t::i32, rshape); + auto result0 = backend->create_tensor(element::f32, rshape); + auto result1 = backend->create_tensor(element::i32, rshape); auto h0 = backend->compile(f0); h0->call_with_validate({result0}, {a}); @@ -883,8 +879,8 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_3d_min_partial) { Shape shape{2, 3, 2}; Shape rshape{2, 2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto k = op::Constant::create(element::Type_t::i64, {}, {2}); + auto A = make_shared(element::f32, shape); + auto k = op::Constant::create(element::i64, {}, {2}); int64_t axis = 1; auto B = make_shared( A, k, axis, op::v1::TopK::Mode::MIN, op::v1::TopK::SortType::SORT_VALUES); @@ -894,10 +890,10 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_3d_min_partial) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7}); - auto result0 = backend->create_tensor(element::Type_t::f32, rshape); - auto result1 = backend->create_tensor(element::Type_t::i32, rshape); + auto result0 = backend->create_tensor(element::f32, rshape); + auto result1 = backend->create_tensor(element::i32, rshape); auto h0 = backend->compile(f0); h0->call_with_validate({result0}, {a}); @@ -913,8 +909,8 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_3d_min_one) { Shape shape{2, 3, 2}; Shape rshape{2, 1, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto k = op::Constant::create(element::Type_t::i64, {}, {1}); + auto A = make_shared(element::f32, shape); + auto k = op::Constant::create(element::i64, {}, {1}); int64_t axis = 1; auto B = make_shared( A, k, axis, op::v1::TopK::Mode::MIN, op::v1::TopK::SortType::SORT_VALUES); @@ -924,10 +920,10 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_3d_min_one) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7}); - auto result0 = backend->create_tensor(element::Type_t::f32, rshape); - auto result1 = backend->create_tensor(element::Type_t::i32, rshape); + auto result0 = backend->create_tensor(element::f32, rshape); + auto result1 = backend->create_tensor(element::i32, rshape); auto h0 = backend->compile(f0); h0->call_with_validate({result0}, {a}); @@ -942,8 +938,8 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_2d_max_all) { Shape shape{4, 3}; Shape rshape{4, 3}; - auto A = make_shared(element::Type_t::f32, shape); - auto k = op::Constant::create(element::Type_t::i64, {}, {4}); + auto A = make_shared(element::f32, shape); + auto k = op::Constant::create(element::i64, {}, {4}); int64_t axis = 0; auto B = make_shared( A, k, axis, op::v1::TopK::Mode::MAX, op::v1::TopK::SortType::SORT_VALUES); @@ -953,10 +949,10 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_2d_max_all) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{9, 2, 10, 12, 8, 4, 6, 1, 5, 3, 11, 7}); - auto result0 = backend->create_tensor(element::Type_t::f32, rshape); - auto result1 = backend->create_tensor(element::Type_t::i32, rshape); + auto result0 = backend->create_tensor(element::f32, rshape); + auto result1 = backend->create_tensor(element::i32, rshape); auto h0 = backend->compile(f0); h0->call_with_validate({result0}, {a}); @@ -972,8 +968,8 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_2d_max_partial) { Shape shape{4, 3}; Shape rshape{2, 3}; - auto A = make_shared(element::Type_t::f32, shape); - auto k = op::Constant::create(element::Type_t::i64, {}, {2}); + auto A = make_shared(element::f32, shape); + auto k = op::Constant::create(element::i64, {}, {2}); int64_t axis = 0; auto B = make_shared( A, k, axis, op::v1::TopK::Mode::MAX, op::v1::TopK::SortType::SORT_VALUES); @@ -983,10 +979,10 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_2d_max_partial) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{9, 2, 10, 12, 8, 4, 6, 1, 5, 3, 11, 7}); - auto result0 = backend->create_tensor(element::Type_t::f32, rshape); - auto result1 = backend->create_tensor(element::Type_t::i32, rshape); + auto result0 = backend->create_tensor(element::f32, rshape); + auto result1 = backend->create_tensor(element::i32, rshape); auto h0 = backend->compile(f0); h0->call_with_validate({result0}, {a}); @@ -1002,8 +998,8 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_2d_max_one) { Shape shape{4, 3}; Shape rshape{1, 3}; - auto A = make_shared(element::Type_t::f32, shape); - auto k = op::Constant::create(element::Type_t::i64, {}, {1}); + auto A = make_shared(element::f32, shape); + auto k = op::Constant::create(element::i64, {}, {1}); int64_t axis = 0; auto B = make_shared( A, k, axis, op::v1::TopK::Mode::MAX, op::v1::TopK::SortType::SORT_VALUES); @@ -1013,10 +1009,10 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_2d_max_one) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{9, 2, 10, 12, 8, 4, 6, 1, 5, 3, 11, 7}); - auto result0 = backend->create_tensor(element::Type_t::f32, rshape); - auto result1 = backend->create_tensor(element::Type_t::i32, rshape); + auto result0 = backend->create_tensor(element::f32, rshape); + auto result1 = backend->create_tensor(element::i32, rshape); auto h0 = backend->compile(f0); h0->call_with_validate({result0}, {a}); @@ -1031,8 +1027,8 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_2d_max_one_with_equal_values) { Shape shape{2, 4}; Shape rshape{2, 1}; - auto A = make_shared(element::Type_t::f32, shape); - auto k = op::Constant::create(element::Type_t::i64, {}, {1}); + auto A = make_shared(element::f32, shape); + auto k = op::Constant::create(element::i64, {}, {1}); int64_t axis = 1; auto B = make_shared( A, k, axis, op::v1::TopK::Mode::MAX, op::v1::TopK::SortType::SORT_VALUES); @@ -1042,10 +1038,10 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_2d_max_one_with_equal_values) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{1, 3, 2, 4, 1, 3, 3, 2}); - auto result0 = backend->create_tensor(element::Type_t::f32, rshape); - auto result1 = backend->create_tensor(element::Type_t::i32, rshape); + auto result0 = backend->create_tensor(element::f32, rshape); + auto result1 = backend->create_tensor(element::i32, rshape); auto h0 = backend->compile(f0); h0->call_with_validate({result0}, {a}); @@ -1060,8 +1056,8 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_2d_min_all) { Shape shape{4, 3}; Shape rshape{4, 3}; - auto A = make_shared(element::Type_t::f32, shape); - auto k = op::Constant::create(element::Type_t::i64, {}, {4}); + auto A = make_shared(element::f32, shape); + auto k = op::Constant::create(element::i64, {}, {4}); int64_t axis = 0; auto B = make_shared( A, k, axis, op::v1::TopK::Mode::MIN, op::v1::TopK::SortType::SORT_VALUES); @@ -1071,10 +1067,10 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_2d_min_all) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7}); - auto result0 = backend->create_tensor(element::Type_t::f32, rshape); - auto result1 = backend->create_tensor(element::Type_t::i32, rshape); + auto result0 = backend->create_tensor(element::f32, rshape); + auto result1 = backend->create_tensor(element::i32, rshape); auto h0 = backend->compile(f0); h0->call_with_validate({result0}, {a}); @@ -1090,8 +1086,8 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_2d_min_partial) { Shape shape{4, 3}; Shape rshape{2, 3}; - auto A = make_shared(element::Type_t::f32, shape); - auto k = op::Constant::create(element::Type_t::i64, {}, {2}); + auto A = make_shared(element::f32, shape); + auto k = op::Constant::create(element::i64, {}, {2}); int64_t axis = 0; auto B = make_shared( A, k, axis, op::v1::TopK::Mode::MIN, op::v1::TopK::SortType::SORT_VALUES); @@ -1101,10 +1097,10 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_2d_min_partial) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7}); - auto result0 = backend->create_tensor(element::Type_t::f32, rshape); - auto result1 = backend->create_tensor(element::Type_t::i32, rshape); + auto result0 = backend->create_tensor(element::f32, rshape); + auto result1 = backend->create_tensor(element::i32, rshape); auto h0 = backend->compile(f0); h0->call_with_validate({result0}, {a}); @@ -1119,8 +1115,8 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_2d_min_one) { Shape shape{4, 3}; Shape rshape{1, 3}; - auto A = make_shared(element::Type_t::f32, shape); - auto k = op::Constant::create(element::Type_t::i64, {}, {1}); + auto A = make_shared(element::f32, shape); + auto k = op::Constant::create(element::i64, {}, {1}); int64_t axis = 0; auto B = make_shared( A, k, axis, op::v1::TopK::Mode::MIN, op::v1::TopK::SortType::NONE); @@ -1130,10 +1126,10 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_2d_min_one) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7}); - auto result0 = backend->create_tensor(element::Type_t::f32, rshape); - auto result1 = backend->create_tensor(element::Type_t::i32, rshape); + auto result0 = backend->create_tensor(element::f32, rshape); + auto result1 = backend->create_tensor(element::i32, rshape); auto h0 = backend->compile(f0); h0->call_with_validate({result0}, {a}); @@ -1147,9 +1143,9 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_2d_min_one) NGRAPH_TEST(${BACKEND_NAME}, topk_3d_large_input_max) { Shape shape{4, 8192, 5}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); - auto k = op::Constant::create(element::Type_t::i64, {}, {10}); + auto k = op::Constant::create(element::i64, {}, {10}); int64_t axis = 1; auto B = make_shared( A, k, axis, op::v1::TopK::Mode::MAX, op::v1::TopK::SortType::SORT_VALUES); @@ -1187,9 +1183,9 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_3d_large_input_max) NGRAPH_TEST(${BACKEND_NAME}, topk_3d_large_input_min) { Shape shape{4, 8192, 5}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); - auto k = op::Constant::create(element::Type_t::i64, {}, {10}); + auto k = op::Constant::create(element::i64, {}, {10}); int64_t axis = 1; auto B = make_shared( A, k, axis, op::v1::TopK::Mode::MIN, op::v1::TopK::SortType::SORT_VALUES); @@ -1228,8 +1224,8 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_3d_single_output) { Shape shape{2, 3, 2}; Shape rshape{2, 2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto k = op::Constant::create(element::Type_t::i64, {}, {2}); + auto A = make_shared(element::f32, shape); + auto k = op::Constant::create(element::i64, {}, {2}); int64_t axis = 1; auto B = make_shared( A, k, axis, op::v1::TopK::Mode::MIN, op::v1::TopK::SortType::SORT_VALUES); @@ -1238,9 +1234,9 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_3d_single_output) auto backend = runtime::Backend::create("${BACKEND_NAME}"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7}); - auto result0 = backend->create_tensor(element::Type_t::i32, rshape); + auto result0 = backend->create_tensor(element::i32, rshape); auto h0 = backend->compile(f0); h0->call_with_validate({result0}, {a}); @@ -1249,27 +1245,27 @@ NGRAPH_TEST(${BACKEND_NAME}, topk_3d_single_output) NGRAPH_TEST(${BACKEND_NAME}, topk_v1_invalid_strings) { - const auto data = make_shared(element::Type_t::f32, Shape{1, 2, 3}); - const auto k = op::Constant::create(element::Type_t::i64, Shape{}, {1}); + const auto data = make_shared(element::f32, Shape{1, 2, 3}); + const auto k = op::Constant::create(element::i64, Shape{}, {1}); EXPECT_THROW(op::v1::TopK(data, k, 0, "max", "invalid_mode"), ngraph::CheckFailure); EXPECT_THROW(op::v1::TopK(data, k, 0, "invalid_sort", "index"), ngraph::CheckFailure); } NGRAPH_TEST(${BACKEND_NAME}, topk_v1_invalid_k) { - const auto data = make_shared(element::Type_t::f32, Shape{1, 2, 3}); + const auto data = make_shared(element::f32, Shape{1, 2, 3}); // K must be a scalar - const auto k_non_scalar = op::Constant::create(element::Type_t::i64, Shape{2}, {1, 2}); + const auto k_non_scalar = op::Constant::create(element::i64, Shape{2}, {1, 2}); EXPECT_THROW(op::v1::TopK(data, k_non_scalar, 0, "max", "index"), ngraph::NodeValidationFailure); // K can only be i8, i32 or i64 - const auto k_float = op::Constant::create(element::Type_t::f32, Shape{}, {1.0f}); + const auto k_float = op::Constant::create(element::f32, Shape{}, {1.0f}); EXPECT_THROW(op::v1::TopK(data, k_float, 0, "max", "index"), ngraph::NodeValidationFailure); // the value of K must be positive - const auto k_negative = op::Constant::create(element::Type_t::i8, Shape{}, {-1}); + const auto k_negative = op::Constant::create(element::i8, Shape{}, {-1}); EXPECT_THROW(op::v1::TopK(data, k_negative, 0, "max", "index"), ngraph::NodeValidationFailure); } @@ -1303,8 +1299,8 @@ TYPED_TEST_P(topk_backend, topk_mode_sort_order) { const Shape shape{5}; const Shape rshape{3}; - const auto data = make_shared(element::Type_t::f32, shape); - const auto k = op::Constant::create(element::Type_t::i64, {}, {3}); + const auto data = make_shared(element::f32, shape); + const auto k = op::Constant::create(element::i64, {}, {3}); const int64_t axis = 0; // helpers to reduce code verbosity diff --git a/ngraph/test/backend/transpose.in.cpp b/ngraph/test/backend/transpose.in.cpp index 000f86f27a24c9..a7ebbf2a816680 100644 --- a/ngraph/test/backend/transpose.in.cpp +++ b/ngraph/test/backend/transpose.in.cpp @@ -33,10 +33,9 @@ NGRAPH_TEST(${BACKEND_NAME}, transpose) // Create a graph for f(x,perm) = Transpose(x,Convert(perm)). We'll do the permutation in // i32 and cast it to i64, just for fun (and to mirror the TensorFlow test I am porting here). // - auto x = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto perm = - make_shared(element::Type_t::i32, PartialShape{Dimension::dynamic()}); - auto perm_i64 = make_shared(perm, element::Type_t::i64); + auto x = make_shared(element::f32, PartialShape::dynamic()); + auto perm = make_shared(element::i32, PartialShape{Dimension::dynamic()}); + auto perm_i64 = make_shared(perm, element::i64); auto x_transpose = make_shared(x, perm_i64); @@ -46,7 +45,7 @@ NGRAPH_TEST(${BACKEND_NAME}, transpose) auto ex = backend->compile(f); - auto t_r = backend->create_dynamic_tensor(element::Type_t::f32, PartialShape::dynamic()); + auto t_r = backend->create_dynamic_tensor(element::f32, PartialShape::dynamic()); std::vector x_shapes{Shape{2, 3}, Shape{2, 3}, Shape{2, 2, 3}}; std::vector> perms{{0, 1}, {1, 0}, {2, 1, 0}}; @@ -59,8 +58,8 @@ NGRAPH_TEST(${BACKEND_NAME}, transpose) for (size_t i = 0; i < x_shapes.size(); i++) { - auto t_x = backend->create_tensor(element::Type_t::f32, x_shapes[i]); - auto t_perm = backend->create_tensor(element::Type_t::i32, Shape{perms[i].size()}); + auto t_x = backend->create_tensor(element::f32, x_shapes[i]); + auto t_perm = backend->create_tensor(element::i32, Shape{perms[i].size()}); copy_data(t_x, inputs[i]); copy_data(t_perm, perms[i]); diff --git a/ngraph/test/backend/unhandled_op.in.cpp b/ngraph/test/backend/unhandled_op.in.cpp index d3264b54416a28..ad243408ae6d6d 100644 --- a/ngraph/test/backend/unhandled_op.in.cpp +++ b/ngraph/test/backend/unhandled_op.in.cpp @@ -56,7 +56,7 @@ namespace NGRAPH_TEST(${BACKEND_NAME}, unhandled_op) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto unhandled = make_shared(A); auto f = make_shared(unhandled, ParameterVector{A}); auto backend = runtime::Backend::create("${BACKEND_NAME}"); diff --git a/ngraph/test/backend/validate_call.in.cpp b/ngraph/test/backend/validate_call.in.cpp index ea245dff63e711..89537fc9fd65c5 100644 --- a/ngraph/test/backend/validate_call.in.cpp +++ b/ngraph/test/backend/validate_call.in.cpp @@ -38,13 +38,13 @@ NGRAPH_TEST(${BACKEND_NAME}, validate_call_input_count) Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); - auto a = backend->create_tensor(element::Type_t::f32, shape); - auto b = backend->create_tensor(element::Type_t::f32, shape); - auto c = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); + auto b = backend->create_tensor(element::f32, shape); + auto c = backend->create_tensor(element::f32, shape); EXPECT_ANY_THROW(auto handle = backend->compile(f); handle->call_with_validate({c}, {a})); } @@ -55,13 +55,13 @@ NGRAPH_TEST(${BACKEND_NAME}, validate_call_input_type) Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); - auto a = backend->create_tensor(element::Type_t::i32, shape); - auto b = backend->create_tensor(element::Type_t::f32, shape); - auto c = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::i32, shape); + auto b = backend->create_tensor(element::f32, shape); + auto c = backend->create_tensor(element::f32, shape); EXPECT_ANY_THROW(auto handle = backend->compile(f); handle->call_with_validate({c}, {a, b})); } @@ -72,13 +72,13 @@ NGRAPH_TEST(${BACKEND_NAME}, validate_call_input_shape) Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); - auto a = backend->create_tensor(element::Type_t::f32, {2, 3}); - auto b = backend->create_tensor(element::Type_t::f32, shape); - auto c = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, {2, 3}); + auto b = backend->create_tensor(element::f32, shape); + auto c = backend->create_tensor(element::f32, shape); EXPECT_ANY_THROW(auto handle = backend->compile(f); handle->call_with_validate({c}, {a, b})); } @@ -89,14 +89,14 @@ NGRAPH_TEST(${BACKEND_NAME}, validate_call_output_count) Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); - auto a = backend->create_tensor(element::Type_t::f32, shape); - auto b = backend->create_tensor(element::Type_t::f32, shape); - auto c = backend->create_tensor(element::Type_t::f32, shape); - auto d = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); + auto b = backend->create_tensor(element::f32, shape); + auto c = backend->create_tensor(element::f32, shape); + auto d = backend->create_tensor(element::f32, shape); EXPECT_ANY_THROW(auto handle = backend->compile(f); handle->call_with_validate({c, d}, {a, b})); } @@ -107,13 +107,13 @@ NGRAPH_TEST(${BACKEND_NAME}, validate_call_output_type) Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); - auto a = backend->create_tensor(element::Type_t::i32, shape); - auto b = backend->create_tensor(element::Type_t::f32, shape); - auto c = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::i32, shape); + auto b = backend->create_tensor(element::f32, shape); + auto c = backend->create_tensor(element::f32, shape); EXPECT_ANY_THROW(auto handle = backend->compile(f); handle->call_with_validate({a}, {b, c})); } @@ -124,13 +124,13 @@ NGRAPH_TEST(${BACKEND_NAME}, validate_call_output_shape) Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); - auto a = backend->create_tensor(element::Type_t::f32, {2, 3}); - auto b = backend->create_tensor(element::Type_t::f32, shape); - auto c = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, {2, 3}); + auto b = backend->create_tensor(element::f32, shape); + auto c = backend->create_tensor(element::f32, shape); EXPECT_ANY_THROW(auto handle = backend->compile(f); handle->call_with_validate({a}, {c, b})); } diff --git a/ngraph/test/backend_debug_api.cpp b/ngraph/test/backend_debug_api.cpp index 20901c782c0199..aefd89732dc940 100644 --- a/ngraph/test/backend_debug_api.cpp +++ b/ngraph/test/backend_debug_api.cpp @@ -33,18 +33,18 @@ using namespace ngraph; TEST(INTERPRETER, nan_check_input) { Shape shape{4}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); shared_ptr backend = runtime::Backend::create("INTERPRETER"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{2, 4, NAN, 16}); - auto b = backend->create_tensor(element::Type_t::f32, shape); + auto b = backend->create_tensor(element::f32, shape); copy_data(b, vector{1, 2, 1, 8}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); shared_ptr handle = backend->compile(f); @@ -57,18 +57,18 @@ TEST(INTERPRETER, nan_check_input) TEST(INTERPRETER, nan_check_output) { Shape shape{4}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); shared_ptr backend = runtime::Backend::create("INTERPRETER"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape); + auto a = backend->create_tensor(element::f32, shape); copy_data(a, vector{2, 4, 0, 16}); - auto b = backend->create_tensor(element::Type_t::f32, shape); + auto b = backend->create_tensor(element::f32, shape); copy_data(b, vector{1, 2, 0, 8}); - auto result = backend->create_tensor(element::Type_t::f32, shape); + auto result = backend->create_tensor(element::f32, shape); shared_ptr handle = backend->compile(f); shared_ptr ihandle = diff --git a/ngraph/test/build_graph.cpp b/ngraph/test/build_graph.cpp index 7da57d8940af0b..f43fa79bd12423 100644 --- a/ngraph/test/build_graph.cpp +++ b/ngraph/test/build_graph.cpp @@ -31,10 +31,10 @@ using namespace ngraph; TEST(build_graph, build_simple) { // Function with 4 parameters - auto arg0 = make_shared(element::Type_t::f32, Shape{7, 3}); - auto arg1 = make_shared(element::Type_t::f32, Shape{3}); - auto arg2 = make_shared(element::Type_t::f32, Shape{32, 7}); - auto arg3 = make_shared(element::Type_t::f32, Shape{32, 7}); + auto arg0 = make_shared(element::f32, Shape{7, 3}); + auto arg1 = make_shared(element::f32, Shape{3}); + auto arg2 = make_shared(element::f32, Shape{32, 7}); + auto arg3 = make_shared(element::f32, Shape{32, 7}); auto broadcast_1 = builder::opset1::make_broadcast(arg3, Shape{10, 32, 7}, AxisSet{0}); auto b1 = builder::opset1::make_broadcast(arg3, Shape{10, 32, 7}, AxisSet{0}); auto dot = make_shared(arg2, arg0); @@ -51,18 +51,18 @@ TEST(build_graph, literal) // float scalar from a float // auto float0 = FloatConstant::make(3.0); vector float_t{3.0}; - auto float0 = make_shared(element::Type_t::f32, Shape{1}, float_t); + auto float0 = make_shared(element::f32, Shape{1}, float_t); ASSERT_EQ(float0->get_vector(), std::vector{3.0}); - ASSERT_EQ(float0->get_element_type(), element::Type_t::f32); + ASSERT_EQ(float0->get_element_type(), element::f32); ASSERT_EQ(float0->get_shape(), Shape{1}); auto d = make_shared(float0, float0); ASSERT_EQ(d->input_values().at(0).get_node_shared_ptr(), float0); ASSERT_EQ(d->input_values().at(1).get_node_shared_ptr(), float0); vector int32{3}; - auto int32_0 = make_shared(element::Type_t::i32, Shape{}, int32); + auto int32_0 = make_shared(element::i32, Shape{}, int32); ASSERT_EQ(int32_0->get_vector(), std::vector{3}); - ASSERT_EQ(int32_0->get_element_type(), element::Type_t::i32); + ASSERT_EQ(int32_0->get_element_type(), element::i32); ASSERT_EQ(int32_0->get_shape(), Shape{}); } @@ -72,8 +72,8 @@ TEST(build_graph, tensor) // auto float0 = FloatConstant::make(3.0); Shape shape{2, 3}; vector float_t(shape_size(shape), 0); - auto float0 = make_shared(element::Type_t::f32, shape, float_t); - ASSERT_EQ(float0->get_element_type(), element::Type_t::f32); + auto float0 = make_shared(element::f32, shape, float_t); + ASSERT_EQ(float0->get_element_type(), element::f32); ASSERT_EQ(float0->get_shape(), shape); auto d = make_shared(float0, float0); ASSERT_EQ(d->input_values().at(0).get_node_shared_ptr(), float0); @@ -81,8 +81,8 @@ TEST(build_graph, tensor) Shape ishape{3, 5}; vector idata(shape_size(ishape), 0); - auto int32_0 = make_shared(element::Type_t::i32, ishape, idata); - ASSERT_EQ(int32_0->get_element_type(), element::Type_t::i32); + auto int32_0 = make_shared(element::i32, ishape, idata); + ASSERT_EQ(int32_0->get_element_type(), element::i32); ASSERT_EQ(int32_0->get_shape(), ishape); } @@ -90,10 +90,10 @@ TEST(build_graph, tensor) TEST(build_graph, function_undeclared_parameters) { // Function with 4 parameters - auto arg0 = make_shared(element::Type_t::f32, Shape{7, 3}); - auto arg1 = make_shared(element::Type_t::f32, Shape{3}); - auto arg2 = make_shared(element::Type_t::f32, Shape{32, 7}); - auto arg3 = make_shared(element::Type_t::f32, Shape{32, 7}); + auto arg0 = make_shared(element::f32, Shape{7, 3}); + auto arg1 = make_shared(element::f32, Shape{3}); + auto arg2 = make_shared(element::f32, Shape{32, 7}); + auto arg3 = make_shared(element::f32, Shape{32, 7}); auto broadcast_1 = builder::opset1::make_broadcast(arg3, Shape{10, 32, 7}, AxisSet{0}); auto b1 = builder::opset1::make_broadcast(arg3, Shape{10, 32, 7}, AxisSet{0}); auto dot = make_shared(arg2, arg0); @@ -121,10 +121,10 @@ TEST(build_graph, no_arg_construction) { // The ops // Parameters aren't converted yet - auto arg0 = make_shared(element::Type_t::f32, Shape{7}); - auto arg1 = make_shared(element::Type_t::f32, Shape{7}); - auto arg2 = make_shared(element::Type_t::f32, Shape{7}); - auto arg3 = make_shared(element::Type_t::f32, Shape{7}); + auto arg0 = make_shared(element::f32, Shape{7}); + auto arg1 = make_shared(element::f32, Shape{7}); + auto arg2 = make_shared(element::f32, Shape{7}); + auto arg3 = make_shared(element::f32, Shape{7}); auto add0 = make_shared(); auto abs0 = make_shared(); auto acos0 = make_shared(); @@ -142,13 +142,13 @@ TEST(build_graph, no_arg_construction) TEST(build_graph, multi_output_split_dynamic) { - const auto data = make_shared(element::Type_t::f32, PartialShape::dynamic()); - const auto axis = op::Constant::create(element::Type_t::i64, Shape{}, {1}); + const auto data = make_shared(element::f32, PartialShape::dynamic()); + const auto axis = op::Constant::create(element::i64, Shape{}, {1}); const auto split = make_shared(data, axis, 2); auto abs = make_shared(split->output(1)); EXPECT_TRUE(abs->get_output_partial_shape(0).same_scheme(PartialShape::dynamic())); - auto new_parameter = make_shared(element::Type_t::f32, Shape{2, 4}); + auto new_parameter = make_shared(element::f32, Shape{2, 4}); split->input(0).replace_source_output(new_parameter->output(0)); auto f = make_shared(abs, ParameterVector{new_parameter}); @@ -159,18 +159,18 @@ TEST(build_graph, multi_output_split_dynamic) TEST(build_graph, function_revalidate_and_infer) { - auto arg = make_shared(element::Type_t::f32, Shape{2, 4, 6, 8}); - auto pattern = op::Constant::create(element::Type_t::i64, Shape{6}, {1, 3, 16, 2, 2, 2}); + auto arg = make_shared(element::f32, Shape{2, 4, 6, 8}); + auto pattern = op::Constant::create(element::i64, Shape{6}, {1, 3, 16, 2, 2, 2}); auto r = make_shared(arg, pattern, true); auto relu = make_shared(r); auto f = make_shared(relu, ParameterVector{arg}); - EXPECT_EQ(r->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(r->get_output_element_type(0), element::f32); EXPECT_EQ(r->get_output_shape(0), (Shape{1, 3, 16, 2, 2, 2})); EXPECT_EQ(f->get_output_shape(0), (Shape{1, 3, 16, 2, 2, 2})); - auto new_pattern = op::Constant::create(element::Type_t::i64, Shape{2}, {32, 12}); + auto new_pattern = op::Constant::create(element::i64, Shape{2}, {32, 12}); r->input(1).replace_source_output(new_pattern->output(0)); f->validate_nodes_and_infer_types(); @@ -193,13 +193,13 @@ TEST(build_graph, default_output_checks) TEST(build_graph, build_graph_with_sink) { - auto arg = make_shared(element::Type_t::f32, Shape{2, 4}); - auto init_const = op::Constant::create(element::Type_t::f32, Shape{2, 2}, {0, 0, 0, 0}); + auto arg = make_shared(element::f32, Shape{2, 4}); + auto init_const = op::Constant::create(element::f32, Shape{2, 2}, {0, 0, 0, 0}); auto read = make_shared(init_const, "v0"); std::vector> args = {arg, read}; auto pattern = make_shared(args, 1); auto res = make_shared(pattern); - const auto axis = op::Constant::create(element::Type_t::i64, Shape{}, {1}); + const auto axis = op::Constant::create(element::i64, Shape{}, {1}); auto crop = make_shared(pattern, axis, 3); auto assign = make_shared(crop, "v0"); @@ -214,13 +214,13 @@ TEST(build_graph, build_graph_with_sink) TEST(build_graph, build_graph_with_sink_output_ctor) { - auto arg = make_shared(element::Type_t::f32, Shape{2, 4}); - auto init_const = op::Constant::create(element::Type_t::f32, Shape{2, 2}, {0, 0, 0, 0}); + auto arg = make_shared(element::f32, Shape{2, 4}); + auto init_const = op::Constant::create(element::f32, Shape{2, 2}, {0, 0, 0, 0}); auto read = make_shared(init_const, "v0"); std::vector> args = {arg, read}; auto pattern = make_shared(args, 1); auto res = make_shared(pattern); - const auto axis = op::Constant::create(element::Type_t::i64, Shape{}, {1}); + const auto axis = op::Constant::create(element::i64, Shape{}, {1}); auto crop = make_shared(pattern, axis, 3); auto assign = make_shared(crop, "v0"); @@ -236,13 +236,13 @@ TEST(build_graph, build_graph_with_sink_output_ctor) TEST(build_graph, build_graph_with_add_sink) { - auto arg = make_shared(element::Type_t::f32, Shape{2, 4}); - auto init_const = op::Constant::create(element::Type_t::f32, Shape{2, 2}, {0, 0, 0, 0}); + auto arg = make_shared(element::f32, Shape{2, 4}); + auto init_const = op::Constant::create(element::f32, Shape{2, 2}, {0, 0, 0, 0}); auto read = make_shared(init_const, "v0"); std::vector> args = {arg, read}; auto pattern = make_shared(args, 1); auto res = make_shared(pattern); - const auto axis = op::Constant::create(element::Type_t::i64, Shape{}, {1}); + const auto axis = op::Constant::create(element::i64, Shape{}, {1}); auto crop = make_shared(pattern, axis, 3); auto assign = make_shared(crop, "v0"); @@ -263,13 +263,13 @@ TEST(build_graph, build_graph_with_add_sink) TEST(build_graph, build_graph_with_wrong_remove_sink) { - auto arg = make_shared(element::Type_t::f32, Shape{2, 4}); - auto init_const = op::Constant::create(element::Type_t::f32, Shape{2, 2}, {0, 0, 0, 0}); + auto arg = make_shared(element::f32, Shape{2, 4}); + auto init_const = op::Constant::create(element::f32, Shape{2, 2}, {0, 0, 0, 0}); auto read = make_shared(init_const, "v0"); std::vector> args = {arg, read}; auto pattern = make_shared(args, 1); auto res = make_shared(pattern); - const auto axis = op::Constant::create(element::Type_t::i64, Shape{}, {1}); + const auto axis = op::Constant::create(element::i64, Shape{}, {1}); auto crop = make_shared(pattern, axis, 3); auto assign = make_shared(crop, "v0"); @@ -287,13 +287,13 @@ TEST(build_graph, build_graph_with_wrong_remove_sink) TEST(build_graph, build_graph_with_remove_sink) { - auto arg = make_shared(element::Type_t::f32, Shape{2, 4}); - auto init_const = op::Constant::create(element::Type_t::f32, Shape{2, 2}, {0, 0, 0, 0}); + auto arg = make_shared(element::f32, Shape{2, 4}); + auto init_const = op::Constant::create(element::f32, Shape{2, 2}, {0, 0, 0, 0}); auto read = make_shared(init_const, "v0"); std::vector> args = {arg, read}; auto pattern = make_shared(args, 1); auto res = make_shared(pattern); - const auto axis = op::Constant::create(element::Type_t::i64, Shape{}, {1}); + const auto axis = op::Constant::create(element::i64, Shape{}, {1}); auto crop = make_shared(pattern, axis, 3); auto assign = make_shared(crop, "v0"); @@ -313,13 +313,13 @@ TEST(build_graph, build_graph_with_remove_sink) TEST(build_graph, build_graph_with_add_result) { - auto arg = make_shared(element::Type_t::f32, Shape{2, 4}); - auto init_const = op::Constant::create(element::Type_t::f32, Shape{2, 2}, {0, 0, 0, 0}); + auto arg = make_shared(element::f32, Shape{2, 4}); + auto init_const = op::Constant::create(element::f32, Shape{2, 2}, {0, 0, 0, 0}); auto read = make_shared(init_const, "v0"); std::vector> args = {arg, read}; auto pattern = make_shared(args, 1); auto res = make_shared(pattern); - const auto axis = op::Constant::create(element::Type_t::i64, Shape{}, {1}); + const auto axis = op::Constant::create(element::i64, Shape{}, {1}); auto crop = make_shared(pattern, axis, 3); auto res2 = make_shared(crop, "v0"); @@ -340,13 +340,13 @@ TEST(build_graph, build_graph_with_add_result) TEST(build_graph, build_graph_with_remove_result) { - auto arg = make_shared(element::Type_t::f32, Shape{2, 4}); - auto init_const = op::Constant::create(element::Type_t::f32, Shape{2, 2}, {0, 0, 0, 0}); + auto arg = make_shared(element::f32, Shape{2, 4}); + auto init_const = op::Constant::create(element::f32, Shape{2, 2}, {0, 0, 0, 0}); auto read = make_shared(init_const, "v0"); std::vector> args = {arg, read}; auto pattern = make_shared(args, 1); auto res = make_shared(pattern); - const auto axis = op::Constant::create(element::Type_t::i64, Shape{}, {1}); + const auto axis = op::Constant::create(element::i64, Shape{}, {1}); auto crop = make_shared(pattern, axis, 3); auto res2 = make_shared(crop, "v0"); diff --git a/ngraph/test/builder.cpp b/ngraph/test/builder.cpp index 165508203434ec..8658b0cbed8380 100644 --- a/ngraph/test/builder.cpp +++ b/ngraph/test/builder.cpp @@ -26,14 +26,14 @@ shared_ptr make_reduce_result(function(const shared_ptr&, const AxisSet&)> func) { Shape shape_a{3, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{2}; auto f = make_shared(func(A, {0}), ParameterVector{A}); auto backend = runtime::Backend::create("INTERPRETER"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -44,14 +44,14 @@ shared_ptr make_reduce_result_true( function(const shared_ptr&, const AxisSet&, bool)> func) { Shape shape_a{3, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{2}; auto f = make_shared(func(A, {0}, true), ParameterVector{A}); auto backend = runtime::Backend::create("INTERPRETER"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); @@ -62,14 +62,14 @@ shared_ptr make_reduce_result_false( function(const shared_ptr&, const AxisSet&, bool)> func) { Shape shape_a{3, 2}; - auto A = make_shared(element::Type_t::f32, shape_a); + auto A = make_shared(element::f32, shape_a); Shape shape_rt{2}; auto f = make_shared(func(A, {0}, false), ParameterVector{A}); auto backend = runtime::Backend::create("INTERPRETER"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, shape_a); + auto a = backend->create_tensor(element::f32, shape_a); copy_data(a, vector{1, 2, 3, 4, 5, 6}); - auto result = backend->create_tensor(element::Type_t::f32, shape_rt); + auto result = backend->create_tensor(element::f32, shape_rt); auto handle = backend->compile(f); handle->call_with_validate({result}, {a}); diff --git a/ngraph/test/builder_autobroadcast.cpp b/ngraph/test/builder_autobroadcast.cpp index ea412bcb5f39b2..a9b1bdf23a8436 100644 --- a/ngraph/test/builder_autobroadcast.cpp +++ b/ngraph/test/builder_autobroadcast.cpp @@ -26,7 +26,7 @@ using namespace ngraph; shared_ptr getParamFromShape(const Shape& shape) { - return make_shared(element::Type_t::f32, shape); + return make_shared(element::f32, shape); } inline const Shape& getShapeFromParam(const shared_ptr& node) @@ -217,8 +217,8 @@ TEST(autobroadcast, numpy_broadcast_for_matmul_op_2d) { const Shape lhs{3, 1, 4, 6}; const Shape rhs{6, 5}; - const auto lhs_node = make_shared(element::Type_t::f32, lhs); - const auto rhs_node = make_shared(element::Type_t::f32, rhs); + const auto lhs_node = make_shared(element::f32, lhs); + const auto rhs_node = make_shared(element::f32, rhs); const OutputVector result = builder::numpy_broadcast_for_matmul_operation(lhs_node, rhs_node); @@ -230,8 +230,8 @@ TEST(autobroadcast, numpy_broadcast_for_matmul_op_3d) { const Shape lhs{3, 1, 4, 6}; const Shape rhs{2, 6, 5}; - const auto lhs_node = make_shared(element::Type_t::f32, lhs); - const auto rhs_node = make_shared(element::Type_t::f32, rhs); + const auto lhs_node = make_shared(element::f32, lhs); + const auto rhs_node = make_shared(element::f32, rhs); const OutputVector result = builder::numpy_broadcast_for_matmul_operation(lhs_node, rhs_node); @@ -243,8 +243,8 @@ TEST(autobroadcast, numpy_broadcast_for_matmul_op_nop) { const Shape lhs{4, 6}; const Shape rhs{6, 5}; - const auto lhs_node = make_shared(element::Type_t::f32, lhs); - const auto rhs_node = make_shared(element::Type_t::f32, rhs); + const auto lhs_node = make_shared(element::f32, lhs); + const auto rhs_node = make_shared(element::f32, rhs); const OutputVector result = builder::numpy_broadcast_for_matmul_operation(lhs_node, rhs_node); @@ -257,8 +257,8 @@ TEST(autobroadcast, opset1_legacy_broadcast_scalar) const Shape lhs{2, 3, 4, 5}; const Shape rhs{}; size_t start_match_axis{3}; - const auto lhs_node = make_shared(element::Type_t::f32, lhs); - const auto rhs_node = make_shared(element::Type_t::f32, rhs); + const auto lhs_node = make_shared(element::f32, lhs); + const auto rhs_node = make_shared(element::f32, rhs); const Output result = builder::opset1::legacy_broadcast_for_binary_operation( lhs_node, rhs_node, start_match_axis); @@ -271,8 +271,8 @@ TEST(autobroadcast, opset1_legacy_broadcast_1elem_tensor) const Shape lhs{2, 3, 4, 5}; const Shape rhs{1, 1, 1}; size_t start_match_axis{1}; - const auto lhs_node = make_shared(element::Type_t::f32, lhs); - const auto rhs_node = make_shared(element::Type_t::f32, rhs); + const auto lhs_node = make_shared(element::f32, lhs); + const auto rhs_node = make_shared(element::f32, rhs); const Output result = builder::opset1::legacy_broadcast_for_binary_operation( lhs_node, rhs_node, start_match_axis); @@ -285,8 +285,8 @@ TEST(autobroadcast, opset1_legacy_broadcast_1d) const Shape lhs{2, 3, 4, 5}; const Shape rhs{5}; size_t start_match_axis{3}; - const auto lhs_node = make_shared(element::Type_t::f32, lhs); - const auto rhs_node = make_shared(element::Type_t::f32, rhs); + const auto lhs_node = make_shared(element::f32, lhs); + const auto rhs_node = make_shared(element::f32, rhs); const Output result = builder::opset1::legacy_broadcast_for_binary_operation( lhs_node, rhs_node, start_match_axis); @@ -299,8 +299,8 @@ TEST(autobroadcast, opset1_legacy_broadcast_2d) const Shape lhs{2, 3, 4, 5}; const Shape rhs{4, 5}; size_t start_match_axis{2}; - const auto lhs_node = make_shared(element::Type_t::f32, lhs); - const auto rhs_node = make_shared(element::Type_t::f32, rhs); + const auto lhs_node = make_shared(element::f32, lhs); + const auto rhs_node = make_shared(element::f32, rhs); const Output result = builder::opset1::legacy_broadcast_for_binary_operation( lhs_node, rhs_node, start_match_axis); @@ -313,8 +313,8 @@ TEST(autobroadcast, opset1_legacy_broadcast_2d_inside) const Shape lhs{2, 3, 4, 5}; const Shape rhs{3, 4}; size_t start_match_axis{1}; - const auto lhs_node = make_shared(element::Type_t::f32, lhs); - const auto rhs_node = make_shared(element::Type_t::f32, rhs); + const auto lhs_node = make_shared(element::f32, lhs); + const auto rhs_node = make_shared(element::f32, rhs); const Output result = builder::opset1::legacy_broadcast_for_binary_operation( lhs_node, rhs_node, start_match_axis); @@ -327,8 +327,8 @@ TEST(autobroadcast, opset1_legacy_broadcast_1d_left) const Shape lhs{2, 3, 4, 5}; const Shape rhs{2}; size_t start_match_axis{0}; - const auto lhs_node = make_shared(element::Type_t::f32, lhs); - const auto rhs_node = make_shared(element::Type_t::f32, rhs); + const auto lhs_node = make_shared(element::f32, lhs); + const auto rhs_node = make_shared(element::f32, rhs); const Output result = builder::opset1::legacy_broadcast_for_binary_operation( lhs_node, rhs_node, start_match_axis); @@ -340,8 +340,8 @@ TEST(autobroadcast, opset1_legacy_broadcast_identical) { const Shape lhs{2, 3, 4, 5}; size_t start_match_axis{0}; - const auto lhs_node = make_shared(element::Type_t::f32, lhs); - const auto rhs_node = make_shared(element::Type_t::f32, lhs); + const auto lhs_node = make_shared(element::f32, lhs); + const auto rhs_node = make_shared(element::f32, lhs); const Output result = builder::opset1::legacy_broadcast_for_binary_operation( lhs_node, rhs_node, start_match_axis); diff --git a/ngraph/test/constant.cpp b/ngraph/test/constant.cpp index a0e20110e141e1..b11934ff342fdc 100644 --- a/ngraph/test/constant.cpp +++ b/ngraph/test/constant.cpp @@ -31,7 +31,7 @@ using namespace std; TEST(constant, boolean_string) { Shape shape{4}; - op::Constant c(element::Type_t::boolean, shape, vector{"1", "0", "1", "0"}); + op::Constant c(element::boolean, shape, vector{"1", "0", "1", "0"}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -49,7 +49,7 @@ TEST(constant, boolean_string) TEST(constant, boolean_string_broadcast) { Shape shape{4}; - op::Constant c(element::Type_t::boolean, shape, vector{"1"}); + op::Constant c(element::boolean, shape, vector{"1"}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -67,7 +67,7 @@ TEST(constant, boolean_string_broadcast) TEST(constant, boolean_vector) { Shape shape{4}; - op::Constant c(element::Type_t::boolean, shape, vector{1, 0, 1, 0}); + op::Constant c(element::boolean, shape, vector{1, 0, 1, 0}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -85,7 +85,7 @@ TEST(constant, boolean_vector) TEST(constant, boolean_vector_broadcast) { Shape shape{4}; - op::Constant c(element::Type_t::boolean, shape, vector{1}); + op::Constant c(element::boolean, shape, vector{1}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -107,7 +107,7 @@ TEST(constant, boolean_vector_broadcast) TEST(constant, float_string) { Shape shape{4}; - op::Constant c(element::Type_t::f32, shape, vector{"1", "0", "1", "0"}); + op::Constant c(element::f32, shape, vector{"1", "0", "1", "0"}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -125,7 +125,7 @@ TEST(constant, float_string) TEST(constant, float_string_broadcast) { Shape shape{4}; - op::Constant c(element::Type_t::f32, shape, vector{"1"}); + op::Constant c(element::f32, shape, vector{"1"}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -143,7 +143,7 @@ TEST(constant, float_string_broadcast) TEST(constant, float_vector) { Shape shape{4}; - op::Constant c(element::Type_t::f32, shape, vector{1, 0, 1, 0}); + op::Constant c(element::f32, shape, vector{1, 0, 1, 0}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -161,7 +161,7 @@ TEST(constant, float_vector) TEST(constant, float_vector_broadcast) { Shape shape{4}; - op::Constant c(element::Type_t::f32, shape, vector{1}); + op::Constant c(element::f32, shape, vector{1}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -183,7 +183,7 @@ TEST(constant, float_vector_broadcast) TEST(constant, double_string) { Shape shape{4}; - op::Constant c(element::Type_t::f64, shape, vector{"1", "0", "1", "0"}); + op::Constant c(element::f64, shape, vector{"1", "0", "1", "0"}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -201,7 +201,7 @@ TEST(constant, double_string) TEST(constant, double_string_broadcast) { Shape shape{4}; - op::Constant c(element::Type_t::f64, shape, vector{"1"}); + op::Constant c(element::f64, shape, vector{"1"}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -219,7 +219,7 @@ TEST(constant, double_string_broadcast) TEST(constant, double_vector) { Shape shape{4}; - op::Constant c(element::Type_t::f64, shape, vector{1, 0, 1, 0}); + op::Constant c(element::f64, shape, vector{1, 0, 1, 0}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -237,7 +237,7 @@ TEST(constant, double_vector) TEST(constant, double_vector_broadcast) { Shape shape{4}; - op::Constant c(element::Type_t::f64, shape, vector{1}); + op::Constant c(element::f64, shape, vector{1}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -259,7 +259,7 @@ TEST(constant, double_vector_broadcast) TEST(constant, int8_string) { Shape shape{4}; - op::Constant c(element::Type_t::i8, shape, vector{"1", "0", "1", "0"}); + op::Constant c(element::i8, shape, vector{"1", "0", "1", "0"}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -277,7 +277,7 @@ TEST(constant, int8_string) TEST(constant, int8_string_broadcast) { Shape shape{4}; - op::Constant c(element::Type_t::i8, shape, vector{"1"}); + op::Constant c(element::i8, shape, vector{"1"}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -295,7 +295,7 @@ TEST(constant, int8_string_broadcast) TEST(constant, int8_vector) { Shape shape{4}; - op::Constant c(element::Type_t::i8, shape, vector{1, 0, 1, 0}); + op::Constant c(element::i8, shape, vector{1, 0, 1, 0}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -313,7 +313,7 @@ TEST(constant, int8_vector) TEST(constant, int8_vector_broadcast) { Shape shape{4}; - op::Constant c(element::Type_t::i8, shape, vector{1}); + op::Constant c(element::i8, shape, vector{1}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -335,7 +335,7 @@ TEST(constant, int8_vector_broadcast) TEST(constant, int16_string) { Shape shape{4}; - op::Constant c(element::Type_t::i16, shape, vector{"1", "0", "1", "0"}); + op::Constant c(element::i16, shape, vector{"1", "0", "1", "0"}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -353,7 +353,7 @@ TEST(constant, int16_string) TEST(constant, int16_string_broadcast) { Shape shape{4}; - op::Constant c(element::Type_t::i16, shape, vector{"1"}); + op::Constant c(element::i16, shape, vector{"1"}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -371,7 +371,7 @@ TEST(constant, int16_string_broadcast) TEST(constant, int16_vector) { Shape shape{4}; - op::Constant c(element::Type_t::i16, shape, vector{1, 0, 1, 0}); + op::Constant c(element::i16, shape, vector{1, 0, 1, 0}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -389,7 +389,7 @@ TEST(constant, int16_vector) TEST(constant, int16_vector_broadcast) { Shape shape{4}; - op::Constant c(element::Type_t::i16, shape, vector{1}); + op::Constant c(element::i16, shape, vector{1}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -411,7 +411,7 @@ TEST(constant, int16_vector_broadcast) TEST(constant, int32_string) { Shape shape{4}; - op::Constant c(element::Type_t::i32, shape, vector{"1", "0", "1", "0"}); + op::Constant c(element::i32, shape, vector{"1", "0", "1", "0"}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -429,7 +429,7 @@ TEST(constant, int32_string) TEST(constant, int32_string_broadcast) { Shape shape{4}; - op::Constant c(element::Type_t::i32, shape, vector{"1"}); + op::Constant c(element::i32, shape, vector{"1"}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -447,7 +447,7 @@ TEST(constant, int32_string_broadcast) TEST(constant, int32_vector) { Shape shape{4}; - op::Constant c(element::Type_t::i32, shape, vector{1, 0, 1, 0}); + op::Constant c(element::i32, shape, vector{1, 0, 1, 0}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -465,7 +465,7 @@ TEST(constant, int32_vector) TEST(constant, int32_vector_broadcast) { Shape shape{4}; - op::Constant c(element::Type_t::i32, shape, vector{1}); + op::Constant c(element::i32, shape, vector{1}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -487,7 +487,7 @@ TEST(constant, int32_vector_broadcast) TEST(constant, int64_string) { Shape shape{4}; - op::Constant c(element::Type_t::i64, shape, vector{"1", "0", "1", "0"}); + op::Constant c(element::i64, shape, vector{"1", "0", "1", "0"}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -505,7 +505,7 @@ TEST(constant, int64_string) TEST(constant, int64_string_broadcast) { Shape shape{4}; - op::Constant c(element::Type_t::i64, shape, vector{"1"}); + op::Constant c(element::i64, shape, vector{"1"}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -523,7 +523,7 @@ TEST(constant, int64_string_broadcast) TEST(constant, int64_vector) { Shape shape{4}; - op::Constant c(element::Type_t::i64, shape, vector{1, 0, 1, 0}); + op::Constant c(element::i64, shape, vector{1, 0, 1, 0}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -541,7 +541,7 @@ TEST(constant, int64_vector) TEST(constant, int64_vector_broadcast) { Shape shape{4}; - op::Constant c(element::Type_t::i64, shape, vector{1}); + op::Constant c(element::i64, shape, vector{1}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -563,7 +563,7 @@ TEST(constant, int64_vector_broadcast) TEST(constant, uint8_string) { Shape shape{4}; - op::Constant c(element::Type_t::u8, shape, vector{"1", "0", "1", "0"}); + op::Constant c(element::u8, shape, vector{"1", "0", "1", "0"}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -581,7 +581,7 @@ TEST(constant, uint8_string) TEST(constant, uint8_string_broadcast) { Shape shape{4}; - op::Constant c(element::Type_t::u8, shape, vector{"1"}); + op::Constant c(element::u8, shape, vector{"1"}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -599,7 +599,7 @@ TEST(constant, uint8_string_broadcast) TEST(constant, uint8_vector) { Shape shape{4}; - op::Constant c(element::Type_t::u8, shape, vector{1, 0, 1, 0}); + op::Constant c(element::u8, shape, vector{1, 0, 1, 0}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -617,7 +617,7 @@ TEST(constant, uint8_vector) TEST(constant, uint8_vector_broadcast) { Shape shape{4}; - op::Constant c(element::Type_t::u8, shape, vector{1}); + op::Constant c(element::u8, shape, vector{1}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -639,7 +639,7 @@ TEST(constant, uint8_vector_broadcast) TEST(constant, uint16_string) { Shape shape{4}; - op::Constant c(element::Type_t::u16, shape, vector{"1", "0", "1", "0"}); + op::Constant c(element::u16, shape, vector{"1", "0", "1", "0"}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -657,7 +657,7 @@ TEST(constant, uint16_string) TEST(constant, uint16_string_broadcast) { Shape shape{4}; - op::Constant c(element::Type_t::u16, shape, vector{"1"}); + op::Constant c(element::u16, shape, vector{"1"}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -675,7 +675,7 @@ TEST(constant, uint16_string_broadcast) TEST(constant, uint16_vector) { Shape shape{4}; - op::Constant c(element::Type_t::u16, shape, vector{1, 0, 1, 0}); + op::Constant c(element::u16, shape, vector{1, 0, 1, 0}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -693,7 +693,7 @@ TEST(constant, uint16_vector) TEST(constant, uint16_vector_broadcast) { Shape shape{4}; - op::Constant c(element::Type_t::u16, shape, vector{1}); + op::Constant c(element::u16, shape, vector{1}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -715,7 +715,7 @@ TEST(constant, uint16_vector_broadcast) TEST(constant, uint32_string) { Shape shape{4}; - op::Constant c(element::Type_t::u32, shape, vector{"1", "0", "1", "0"}); + op::Constant c(element::u32, shape, vector{"1", "0", "1", "0"}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -733,7 +733,7 @@ TEST(constant, uint32_string) TEST(constant, uint32_string_broadcast) { Shape shape{4}; - op::Constant c(element::Type_t::u32, shape, vector{"1"}); + op::Constant c(element::u32, shape, vector{"1"}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -751,7 +751,7 @@ TEST(constant, uint32_string_broadcast) TEST(constant, uint32_vector) { Shape shape{4}; - op::Constant c(element::Type_t::u32, shape, vector{1, 0, 1, 0}); + op::Constant c(element::u32, shape, vector{1, 0, 1, 0}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -769,7 +769,7 @@ TEST(constant, uint32_vector) TEST(constant, uint32_vector_broadcast) { Shape shape{4}; - op::Constant c(element::Type_t::u32, shape, vector{1}); + op::Constant c(element::u32, shape, vector{1}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -791,7 +791,7 @@ TEST(constant, uint32_vector_broadcast) TEST(constant, uint64_string) { Shape shape{4}; - op::Constant c(element::Type_t::u64, shape, vector{"1", "0", "1", "0"}); + op::Constant c(element::u64, shape, vector{"1", "0", "1", "0"}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -809,7 +809,7 @@ TEST(constant, uint64_string) TEST(constant, uint64_string_broadcast) { Shape shape{4}; - op::Constant c(element::Type_t::u64, shape, vector{"1"}); + op::Constant c(element::u64, shape, vector{"1"}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -827,7 +827,7 @@ TEST(constant, uint64_string_broadcast) TEST(constant, uint64_vector) { Shape shape{4}; - op::Constant c(element::Type_t::u64, shape, vector{1, 0, 1, 0}); + op::Constant c(element::u64, shape, vector{1, 0, 1, 0}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -845,7 +845,7 @@ TEST(constant, uint64_vector) TEST(constant, uint64_vector_broadcast) { Shape shape{4}; - op::Constant c(element::Type_t::u64, shape, vector{1}); + op::Constant c(element::u64, shape, vector{1}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], 1); @@ -867,7 +867,7 @@ TEST(constant, uint64_vector_broadcast) TEST(constant, bfloat16_string) { Shape shape{4}; - op::Constant c(element::Type_t::bf16, shape, vector{"1", "0", "1", "0"}); + op::Constant c(element::bf16, shape, vector{"1", "0", "1", "0"}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], bfloat16(1)); @@ -885,7 +885,7 @@ TEST(constant, bfloat16_string) TEST(constant, bfloat16_string_broadcast) { Shape shape{4}; - op::Constant c(element::Type_t::bf16, shape, vector{"1"}); + op::Constant c(element::bf16, shape, vector{"1"}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], bfloat16(1)); @@ -903,7 +903,7 @@ TEST(constant, bfloat16_string_broadcast) TEST(constant, bfloat16_vector) { Shape shape{4}; - op::Constant c(element::Type_t::bf16, shape, vector{1, 0, 1, 0}); + op::Constant c(element::bf16, shape, vector{1, 0, 1, 0}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], bfloat16(1)); @@ -921,7 +921,7 @@ TEST(constant, bfloat16_vector) TEST(constant, bfloat16_vector_broadcast) { Shape shape{4}; - op::Constant c(element::Type_t::bf16, shape, vector{1}); + op::Constant c(element::bf16, shape, vector{1}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], bfloat16(1)); @@ -943,7 +943,7 @@ TEST(constant, bfloat16_vector_broadcast) TEST(constant, float16_string) { Shape shape{4}; - op::Constant c(element::Type_t::f16, shape, vector{"1", "0", "1", "0"}); + op::Constant c(element::f16, shape, vector{"1", "0", "1", "0"}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], float16(1)); @@ -961,7 +961,7 @@ TEST(constant, float16_string) TEST(constant, float16_string_broadcast) { Shape shape{4}; - op::Constant c(element::Type_t::f16, shape, vector{"1"}); + op::Constant c(element::f16, shape, vector{"1"}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], float16(1)); @@ -979,7 +979,7 @@ TEST(constant, float16_string_broadcast) TEST(constant, float16_vector) { Shape shape{4}; - op::Constant c(element::Type_t::f16, shape, vector{1, 0, 1, 0}); + op::Constant c(element::f16, shape, vector{1, 0, 1, 0}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], float16(1)); @@ -997,7 +997,7 @@ TEST(constant, float16_vector) TEST(constant, float16_vector_broadcast) { Shape shape{4}; - op::Constant c(element::Type_t::f16, shape, vector{1}); + op::Constant c(element::f16, shape, vector{1}); auto v = c.get_vector(); ASSERT_EQ(v.size(), shape_size(shape)); EXPECT_EQ(v[0], float16(1)); @@ -1015,7 +1015,7 @@ TEST(constant, float16_vector_broadcast) TEST(constant, shared_data) { Shape shape{100, 200}; - auto c1 = make_shared(element::Type_t::f16, shape, vector{123}); + auto c1 = make_shared(element::f16, shape, vector{123}); auto c2 = static_pointer_cast(c1->clone_with_new_inputs({})); const int16_t* p1 = c1->get_data_ptr(); const int16_t* p2 = c2->get_data_ptr(); @@ -1368,7 +1368,7 @@ TEST(constant, construct_uniform) TEST(constant, bad_get_data_ptr) { - op::Constant c(element::Type_t::f32, Shape{}, vector{1.0}); + op::Constant c(element::f32, Shape{}, vector{1.0}); EXPECT_EQ(*c.get_data_ptr(), 1.0); try { diff --git a/ngraph/test/constant_folding.cpp b/ngraph/test/constant_folding.cpp index 23dec3cd5c5a38..ed315acac9e8e7 100644 --- a/ngraph/test/constant_folding.cpp +++ b/ngraph/test/constant_folding.cpp @@ -60,7 +60,7 @@ TEST(constant_folding, acosh) { expected.push_back(std::acosh(f)); } - auto constant = make_shared(element::Type_t::f32, shape_in, values_in); + auto constant = make_shared(element::f32, shape_in, values_in); auto acosh = make_shared(constant); acosh->set_friendly_name("test"); auto f = make_shared(acosh, ParameterVector{}); @@ -92,7 +92,7 @@ TEST(constant_folding, asinh) { expected.push_back(std::asinh(f)); } - auto constant = make_shared(element::Type_t::f32, shape_in, values_in); + auto constant = make_shared(element::f32, shape_in, values_in); auto asinh = make_shared(constant); asinh->set_friendly_name("test"); auto f = make_shared(asinh, ParameterVector{}); @@ -124,7 +124,7 @@ TEST(constant_folding, atanh) { expected.push_back(std::atanh(f)); } - auto constant = make_shared(element::Type_t::f32, shape_in, values_in); + auto constant = make_shared(element::f32, shape_in, values_in); auto atanh = make_shared(constant); atanh->set_friendly_name("test"); auto f = make_shared(atanh, ParameterVector{}); @@ -153,9 +153,9 @@ TEST(constant_folding, constant_squeeze) Shape axes_shape{1}; vector values_in{0, 1, 2, 3, 4, 5, 6, 7}; - auto constant = make_shared(element::Type_t::f32, shape_in, values_in); + auto constant = make_shared(element::f32, shape_in, values_in); vector values_axes{2}; - auto constant_axes = op::Constant::create(element::Type_t::i64, axes_shape, values_axes); + auto constant_axes = op::Constant::create(element::i64, axes_shape, values_axes); auto squeeze = make_shared(constant, constant_axes); squeeze->set_friendly_name("test"); auto f = make_shared(squeeze, ParameterVector{}); @@ -184,9 +184,9 @@ TEST(constant_folding, constant_unsqueeze) Shape axes_shape{2}; vector values_in{0, 1, 2, 3, 4, 5, 6, 7}; - auto constant = make_shared(element::Type_t::f32, shape_in, values_in); + auto constant = make_shared(element::f32, shape_in, values_in); vector values_axes{2, 3}; - auto constant_axes = op::Constant::create(element::Type_t::i64, axes_shape, values_axes); + auto constant_axes = op::Constant::create(element::i64, axes_shape, values_axes); auto unsqueeze = make_shared(constant, constant_axes); unsqueeze->set_friendly_name("test"); auto f = make_shared(unsqueeze, ParameterVector{}); @@ -211,11 +211,11 @@ TEST(constant_folding, constant_unsqueeze) TEST(constant_folding, constant_broadcast_v1) { vector values_in{0, 1}; - auto constant_in = make_shared(element::Type_t::i32, Shape{2}, values_in); + auto constant_in = make_shared(element::i32, Shape{2}, values_in); vector shape_in{2, 4}; - auto constant_shape = make_shared(element::Type_t::i64, Shape{2}, shape_in); + auto constant_shape = make_shared(element::i64, Shape{2}, shape_in); vector axes_in{0}; - auto constant_axes = make_shared(element::Type_t::i64, Shape{1}, axes_in); + auto constant_axes = make_shared(element::i64, Shape{1}, axes_in); auto broadcast_v1 = make_shared(constant_in, constant_shape, constant_axes); broadcast_v1->set_friendly_name("test"); auto f = make_shared(broadcast_v1, ParameterVector{}); @@ -240,10 +240,9 @@ TEST(constant_folding, constant_broadcast_v1) TEST(constant_folding, constant_broadcast_v1_with_target_shape) { vector values_in{1}; - auto constant_in = - make_shared(element::Type_t::i32, Shape{1, 1, 1, 1}, values_in); + auto constant_in = make_shared(element::i32, Shape{1, 1, 1, 1}, values_in); vector shape_in{1, 3, 1, 1}; - auto target_shape = make_shared(element::Type_t::i64, Shape{4}, shape_in); + auto target_shape = make_shared(element::i64, Shape{4}, shape_in); auto broadcast_v1 = make_shared(constant_in, target_shape); broadcast_v1->set_friendly_name("test"); auto f = make_shared(broadcast_v1, ParameterVector{}); @@ -268,9 +267,9 @@ TEST(constant_folding, constant_broadcast_v1_with_target_shape) TEST(constant_folding, constant_broadcast_v1_numpy) { vector values_in{0, 1}; - auto constant_in = make_shared(element::Type_t::i32, Shape{2}, values_in); + auto constant_in = make_shared(element::i32, Shape{2}, values_in); vector shape_in{4, 2}; - auto constant_shape = make_shared(element::Type_t::i64, Shape{2}, shape_in); + auto constant_shape = make_shared(element::i64, Shape{2}, shape_in); auto broadcast_v1 = make_shared(constant_in, constant_shape); broadcast_v1->set_friendly_name("test"); auto f = make_shared(broadcast_v1, ParameterVector{}); @@ -303,15 +302,15 @@ TEST(constant_folding, constant_unary_binary) vector values_g{1, 4}; vector values_h{0, 0, 1, 1}; vector values_i{0, 1}; - auto a = make_shared(element::Type_t::i32, Shape{2, 2}, values_a); - auto b = make_shared(element::Type_t::i32, Shape{2, 2}, values_b); - auto c = make_shared(element::Type_t::i32, Shape{2, 2}, values_c); - auto d = make_shared(element::Type_t::i32, Shape{2, 2}, values_d); - auto e = make_shared(element::Type_t::i32, Shape{2}, values_e); - auto f = make_shared(element::Type_t::i32, Shape{2}, values_f); - auto g = make_shared(element::Type_t::i32, Shape{2}, values_g); - auto h = make_shared(element::Type_t::boolean, Shape{2, 2}, values_h); - auto i = make_shared(element::Type_t::boolean, Shape{2}, values_i); + auto a = make_shared(element::i32, Shape{2, 2}, values_a); + auto b = make_shared(element::i32, Shape{2, 2}, values_b); + auto c = make_shared(element::i32, Shape{2, 2}, values_c); + auto d = make_shared(element::i32, Shape{2, 2}, values_d); + auto e = make_shared(element::i32, Shape{2}, values_e); + auto f = make_shared(element::i32, Shape{2}, values_f); + auto g = make_shared(element::i32, Shape{2}, values_g); + auto h = make_shared(element::boolean, Shape{2, 2}, values_h); + auto i = make_shared(element::boolean, Shape{2}, values_i); auto add = make_shared(a, b); auto sub = make_shared(a, b); @@ -434,8 +433,8 @@ TEST(constant_folding, const_convert) Shape input_shape{3, 4}; vector values_in{1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7}; - auto constant = op::Constant::create(element::Type_t::f32, input_shape, values_in); - auto convert = make_shared(constant, element::Type_t::u64); + auto constant = op::Constant::create(element::f32, input_shape, values_in); + auto convert = make_shared(constant, element::u64); convert->set_friendly_name("test"); auto f = make_shared(convert, ParameterVector{}); @@ -450,7 +449,7 @@ TEST(constant_folding, const_convert) as_type_ptr(f->get_results().at(0)->input_value(0).get_node_shared_ptr()); ASSERT_TRUE(new_const); ASSERT_EQ(new_const->get_friendly_name(), "test"); - ASSERT_EQ(new_const->get_output_element_type(0), element::Type_t::u64); + ASSERT_EQ(new_const->get_output_element_type(0), element::u64); auto values_out = new_const->get_vector(); vector values_expected{1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7}; @@ -461,7 +460,7 @@ TEST(constant_folding, shape_of_v0) { Shape input_shape{3, 4, 0, 22, 608, 909, 3}; - auto param = make_shared(element::Type_t::boolean, input_shape); + auto param = make_shared(element::boolean, input_shape); auto shape_of = make_shared(param); shape_of->set_friendly_name("test"); auto f = make_shared(shape_of, ParameterVector{param}); @@ -477,7 +476,7 @@ TEST(constant_folding, shape_of_v0) as_type_ptr(f->get_results().at(0)->input_value(0).get_node_shared_ptr()); ASSERT_TRUE(new_const); ASSERT_EQ(new_const->get_friendly_name(), "test"); - ASSERT_EQ(new_const->get_output_element_type(0), element::Type_t::i64); + ASSERT_EQ(new_const->get_output_element_type(0), element::i64); auto values_out = new_const->get_vector(); ASSERT_EQ((vector{3, 4, 0, 22, 608, 909, 3}), values_out); @@ -487,7 +486,7 @@ TEST(constant_folding, shape_of_v3) { Shape input_shape{3, 4, 0, 22, 608, 909, 3}; - auto param = make_shared(element::Type_t::boolean, input_shape); + auto param = make_shared(element::boolean, input_shape); auto shape_of = make_shared(param); shape_of->set_friendly_name("test"); auto f = make_shared(shape_of, ParameterVector{param}); @@ -503,7 +502,7 @@ TEST(constant_folding, shape_of_v3) as_type_ptr(f->get_results().at(0)->input_value(0).get_node_shared_ptr()); ASSERT_TRUE(new_const); ASSERT_EQ(new_const->get_friendly_name(), "test"); - ASSERT_EQ(new_const->get_output_element_type(0), element::Type_t::i64); + ASSERT_EQ(new_const->get_output_element_type(0), element::i64); auto values_out = new_const->get_vector(); ASSERT_EQ((vector{3, 4, 0, 22, 608, 909, 3}), values_out); @@ -513,8 +512,8 @@ TEST(constant_folding, shape_of_i32_v3) { Shape input_shape{3, 4, 0, 22, 608, 909, 3}; - auto param = make_shared(element::Type_t::boolean, input_shape); - auto shape_of = make_shared(param, element::Type_t::i32); + auto param = make_shared(element::boolean, input_shape); + auto shape_of = make_shared(param, element::i32); shape_of->set_friendly_name("test"); auto f = make_shared(shape_of, ParameterVector{param}); @@ -529,7 +528,7 @@ TEST(constant_folding, shape_of_i32_v3) as_type_ptr(f->get_results().at(0)->input_value(0).get_node_shared_ptr()); ASSERT_TRUE(new_const); ASSERT_EQ(new_const->get_friendly_name(), "test"); - ASSERT_EQ(new_const->get_output_element_type(0), element::Type_t::i32); + ASSERT_EQ(new_const->get_output_element_type(0), element::i32); auto values_out = new_const->get_vector(); ASSERT_EQ((vector{3, 4, 0, 22, 608, 909, 3}), values_out); @@ -539,7 +538,7 @@ TEST(constant_folding, shape_of_dynamic_v0) { PartialShape input_shape{3, 4, Dimension::dynamic(), 22, 608, 909, 3}; - auto param = make_shared(element::Type_t::boolean, input_shape); + auto param = make_shared(element::boolean, input_shape); auto shape_of = make_shared(param); shape_of->set_friendly_name("test"); auto f = make_shared(shape_of, ParameterVector{param}); @@ -564,7 +563,7 @@ TEST(constant_folding, shape_of_dynamic_v3) { PartialShape input_shape{3, 4, Dimension::dynamic(), 22, 608, 909, 3}; - auto param = make_shared(element::Type_t::boolean, input_shape); + auto param = make_shared(element::boolean, input_shape); auto shape_of = make_shared(param); shape_of->set_friendly_name("test"); auto f = make_shared(shape_of, ParameterVector{param}); @@ -583,15 +582,15 @@ TEST(constant_folding, shape_of_dynamic_v3) ASSERT_TRUE(result_as_concat); ASSERT_EQ(result_as_concat->get_friendly_name(), "test"); ASSERT_EQ(result_as_concat->get_output_shape(0), Shape{7}); - ASSERT_EQ(result_as_concat->get_output_element_type(0), element::Type_t::i64); + ASSERT_EQ(result_as_concat->get_output_element_type(0), element::i64); } TEST(constant_folding, shape_of_dynamic_i32_v3) { PartialShape input_shape{3, 4, Dimension::dynamic(), 22, 608, 909, 3}; - auto param = make_shared(element::Type_t::boolean, input_shape); - auto shape_of = make_shared(param, element::Type_t::i32); + auto param = make_shared(element::boolean, input_shape); + auto shape_of = make_shared(param, element::i32); shape_of->set_friendly_name("test"); auto f = make_shared(shape_of, ParameterVector{param}); @@ -609,7 +608,7 @@ TEST(constant_folding, shape_of_dynamic_i32_v3) ASSERT_TRUE(result_as_concat); ASSERT_EQ(result_as_concat->get_friendly_name(), "test"); ASSERT_EQ(result_as_concat->get_output_shape(0), Shape{7}); - ASSERT_EQ(result_as_concat->get_output_element_type(0), element::Type_t::i32); + ASSERT_EQ(result_as_concat->get_output_element_type(0), element::i32); } // We need to be sure that constant folding won't be calculated endlessly. @@ -617,7 +616,7 @@ TEST(constant_folding, shape_of_dynamic_double_folding_v0) { PartialShape input_shape{3, 4, Dimension::dynamic(), 22, 608, 909, 3}; - auto param = make_shared(element::Type_t::boolean, input_shape); + auto param = make_shared(element::boolean, input_shape); auto shape_of = make_shared(param); shape_of->set_friendly_name("test"); auto f = make_shared(shape_of, ParameterVector{param}); @@ -643,7 +642,7 @@ TEST(constant_folding, shape_of_dynamic_double_folding_v3) { PartialShape input_shape{3, 4, Dimension::dynamic(), 22, 608, 909, 3}; - auto param = make_shared(element::Type_t::boolean, input_shape); + auto param = make_shared(element::boolean, input_shape); auto shape_of = make_shared(param); shape_of->set_friendly_name("test"); auto f = make_shared(shape_of, ParameterVector{param}); @@ -671,7 +670,7 @@ TEST(constant_folding, shape_of_rank_dynamic_v0) { PartialShape input_shape{PartialShape::dynamic()}; - auto param = make_shared(element::Type_t::boolean, input_shape); + auto param = make_shared(element::boolean, input_shape); auto shape_of = make_shared(param); shape_of->set_friendly_name("test"); auto f = make_shared(shape_of, ParameterVector{param}); @@ -692,7 +691,7 @@ TEST(constant_folding, shape_of_rank_dynamic_v3) { PartialShape input_shape{PartialShape::dynamic()}; - auto param = make_shared(element::Type_t::boolean, input_shape); + auto param = make_shared(element::boolean, input_shape); auto shape_of = make_shared(param); shape_of->set_friendly_name("test"); auto f = make_shared(shape_of, ParameterVector{param}); @@ -714,7 +713,7 @@ void const_reverse(const element::Type& axes_elem_type) Shape input_shape{3, 3}; vector values_in{1, 2, 3, 4, 5, 6, 7, 8, 9}; - auto constant = op::Constant::create(element::Type_t::i32, input_shape, values_in); + auto constant = op::Constant::create(element::i32, input_shape, values_in); auto axes = op::Constant::create(axes_elem_type, {1}, {1}); auto convert = make_shared(constant, axes, op::v1::Reverse::Mode::INDEX); convert->set_friendly_name("test"); @@ -739,14 +738,14 @@ void const_reverse(const element::Type& axes_elem_type) TEST(constant_folding, const_reverse) { - for (auto&& axes_elem_type : {element::Type_t::i8, - element::Type_t::u8, - element::Type_t::i16, - element::Type_t::u16, - element::Type_t::i32, - element::Type_t::u32, - element::Type_t::i64, - element::Type_t::u64}) + for (auto&& axes_elem_type : {element::i8, + element::u8, + element::i16, + element::u16, + element::i32, + element::u32, + element::i64, + element::u64}) { const_reverse(axes_elem_type); } @@ -758,10 +757,10 @@ TEST(constant_folding, const_reduceprod) Shape output_shape{3}; vector values_in{1, 2, 3, 4, 5, 6, 7, 8, 9}; - auto constant = op::Constant::create(element::Type_t::i32, input_shape, values_in); + auto constant = op::Constant::create(element::i32, input_shape, values_in); Shape axes_shape{1}; vector values_axes{1}; - auto constant_axes = op::Constant::create(element::Type_t::i64, axes_shape, values_axes); + auto constant_axes = op::Constant::create(element::i64, axes_shape, values_axes); auto convert = make_shared(constant, constant_axes); convert->set_friendly_name("test"); auto f = make_shared(convert, ParameterVector{}); @@ -792,10 +791,10 @@ TEST(constant_folding, const_reduceprod_keepdims) Shape output_shape{3, 1}; vector values_in{1, 2, 3, 4, 5, 6, 7, 8, 9}; - auto constant = op::Constant::create(element::Type_t::i32, input_shape, values_in); + auto constant = op::Constant::create(element::i32, input_shape, values_in); Shape axes_shape{1}; vector values_axes{1}; - auto constant_axes = op::Constant::create(element::Type_t::i64, axes_shape, values_axes); + auto constant_axes = op::Constant::create(element::i64, axes_shape, values_axes); auto convert = make_shared(constant, constant_axes, true); convert->set_friendly_name("test"); auto f = make_shared(convert, ParameterVector{}); @@ -826,10 +825,10 @@ TEST(constant_folding, const_reducesum) Shape output_shape{3}; vector values_in{1, 2, 3, 4, 5, 6, 7, 8, 9}; - auto constant = op::Constant::create(element::Type_t::i32, input_shape, values_in); + auto constant = op::Constant::create(element::i32, input_shape, values_in); Shape axes_shape{1}; vector values_axes{1}; - auto constant_axes = op::Constant::create(element::Type_t::i64, axes_shape, values_axes); + auto constant_axes = op::Constant::create(element::i64, axes_shape, values_axes); auto convert = make_shared(constant, constant_axes); convert->set_friendly_name("test"); auto f = make_shared(convert, ParameterVector{}); @@ -860,10 +859,10 @@ TEST(constant_folding, const_reducesum_keepdims) Shape output_shape{3, 1}; vector values_in{1, 2, 3, 4, 5, 6, 7, 8, 9}; - auto constant = op::Constant::create(element::Type_t::i32, input_shape, values_in); + auto constant = op::Constant::create(element::i32, input_shape, values_in); Shape axes_shape{1}; vector values_axes{1}; - auto constant_axes = op::Constant::create(element::Type_t::i64, axes_shape, values_axes); + auto constant_axes = op::Constant::create(element::i64, axes_shape, values_axes); auto convert = make_shared(constant, constant_axes, true); convert->set_friendly_name("test"); auto f = make_shared(convert, ParameterVector{}); @@ -894,10 +893,10 @@ TEST(constant_folding, const_reducemax) Shape output_shape{3}; vector values_in{1, 2, 3, 4, 5, 6}; - auto constant = op::Constant::create(element::Type_t::i32, input_shape, values_in); + auto constant = op::Constant::create(element::i32, input_shape, values_in); Shape axes_shape{1}; vector values_axes{1}; - auto constant_axes = op::Constant::create(element::Type_t::i64, axes_shape, values_axes); + auto constant_axes = op::Constant::create(element::i64, axes_shape, values_axes); auto convert = make_shared(constant, constant_axes); convert->set_friendly_name("test"); auto f = make_shared(convert, ParameterVector{}); @@ -928,10 +927,10 @@ TEST(constant_folding, const_reducemax_keepdims) Shape output_shape{3, 1}; vector values_in{1, 2, 3, 4, 5, 6}; - auto constant = op::Constant::create(element::Type_t::i32, input_shape, values_in); + auto constant = op::Constant::create(element::i32, input_shape, values_in); Shape axes_shape{1}; vector values_axes{1}; - auto constant_axes = op::Constant::create(element::Type_t::i64, axes_shape, values_axes); + auto constant_axes = op::Constant::create(element::i64, axes_shape, values_axes); auto convert = make_shared(constant, constant_axes, true); convert->set_friendly_name("test"); auto f = make_shared(convert, ParameterVector{}); @@ -962,10 +961,10 @@ TEST(constant_folding, const_reducemin) Shape output_shape{3}; vector values_in{1, 2, 3, 4, 5, 6}; - auto constant = op::Constant::create(element::Type_t::i32, input_shape, values_in); + auto constant = op::Constant::create(element::i32, input_shape, values_in); Shape axes_shape{1}; vector values_axes{1}; - auto constant_axes = op::Constant::create(element::Type_t::i64, axes_shape, values_axes); + auto constant_axes = op::Constant::create(element::i64, axes_shape, values_axes); auto convert = make_shared(constant, constant_axes); convert->set_friendly_name("test"); auto f = make_shared(convert, ParameterVector{}); @@ -996,10 +995,10 @@ TEST(constant_folding, const_reducemin_keepdims) Shape output_shape{3, 1}; vector values_in{1, 2, 3, 4, 5, 6}; - auto constant = op::Constant::create(element::Type_t::i32, input_shape, values_in); + auto constant = op::Constant::create(element::i32, input_shape, values_in); Shape axes_shape{1}; vector values_axes{1}; - auto constant_axes = op::Constant::create(element::Type_t::i64, axes_shape, values_axes); + auto constant_axes = op::Constant::create(element::i64, axes_shape, values_axes); auto convert = make_shared(constant, constant_axes, true); convert->set_friendly_name("test"); auto f = make_shared(convert, ParameterVector{}); @@ -1030,10 +1029,10 @@ TEST(constant_folding, const_reducemean) Shape output_shape{3}; vector values_in{1, 2, 3, 4, 5, 6, 7, 8, 9}; - auto constant = op::Constant::create(element::Type_t::i32, input_shape, values_in); + auto constant = op::Constant::create(element::i32, input_shape, values_in); Shape axes_shape{1}; vector values_axes{1}; - auto constant_axes = op::Constant::create(element::Type_t::i64, axes_shape, values_axes); + auto constant_axes = op::Constant::create(element::i64, axes_shape, values_axes); auto convert = make_shared(constant, constant_axes); convert->set_friendly_name("test"); auto f = make_shared(convert, ParameterVector{}); @@ -1064,10 +1063,10 @@ TEST(constant_folding, const_reducemean_keepdims) Shape output_shape{3, 1}; vector values_in{1, 2, 3, 4, 5, 6, 7, 8, 9}; - auto constant = op::Constant::create(element::Type_t::i32, input_shape, values_in); + auto constant = op::Constant::create(element::i32, input_shape, values_in); Shape axes_shape{1}; vector values_axes{1}; - auto constant_axes = op::Constant::create(element::Type_t::i64, axes_shape, values_axes); + auto constant_axes = op::Constant::create(element::i64, axes_shape, values_axes); auto convert = make_shared(constant, constant_axes, true); convert->set_friendly_name("test"); auto f = make_shared(convert, ParameterVector{}); @@ -1097,8 +1096,8 @@ TEST(constant_folding, const_reduce_logical_and__no_keepdims) const Shape input_shape{3, 3}; const vector values_in{0, 1, 1, 0, 1, 0, 1, 1, 1}; - const auto data = op::Constant::create(element::Type_t::boolean, input_shape, values_in); - const auto axes = op::Constant::create(element::Type_t::i64, {1}, {1}); + const auto data = op::Constant::create(element::boolean, input_shape, values_in); + const auto axes = op::Constant::create(element::i64, {1}, {1}); const auto convert = make_shared(data, axes, false); convert->set_friendly_name("test"); auto f = make_shared(convert, ParameterVector{}); @@ -1130,8 +1129,8 @@ TEST(constant_folding, const_reduce_logical_and__keepdims) const Shape input_shape{3, 3}; const vector values_in{0, 1, 1, 0, 1, 0, 1, 1, 1}; - const auto data = op::Constant::create(element::Type_t::boolean, input_shape, values_in); - const auto axes = op::Constant::create(element::Type_t::i64, {1}, {1}); + const auto data = op::Constant::create(element::boolean, input_shape, values_in); + const auto axes = op::Constant::create(element::i64, {1}, {1}); const auto convert = make_shared(data, axes, true); convert->set_friendly_name("test"); auto f = make_shared(convert, ParameterVector{}); @@ -1165,8 +1164,8 @@ TEST(constant_folding, const_reduce_logical_and__keepdims_3d) const Shape input_shape{2, 2, 2}; const vector values_in{1, 1, 0, 0, 1, 0, 0, 1}; - const auto data = op::Constant::create(element::Type_t::boolean, input_shape, values_in); - const auto axes = op::Constant::create(element::Type_t::i64, {2}, {0, 2}); + const auto data = op::Constant::create(element::boolean, input_shape, values_in); + const auto axes = op::Constant::create(element::i64, {2}, {0, 2}); const auto convert = make_shared(data, axes, true); convert->set_friendly_name("test"); auto f = make_shared(convert, ParameterVector{}); @@ -1198,8 +1197,8 @@ TEST(constant_folding, const_reduce_logical_or__no_keepdims) const Shape input_shape{3, 3}; const vector values_in{1, 0, 0, 1, 0, 1, 0, 0, 0}; - const auto data = op::Constant::create(element::Type_t::boolean, input_shape, values_in); - const auto axes = op::Constant::create(element::Type_t::i64, {1}, {1}); + const auto data = op::Constant::create(element::boolean, input_shape, values_in); + const auto axes = op::Constant::create(element::i64, {1}, {1}); const auto convert = make_shared(data, axes, false); convert->set_friendly_name("test"); auto f = make_shared(convert, ParameterVector{}); @@ -1229,8 +1228,8 @@ TEST(constant_folding, const_reduce_logical_or__no_keepdims) TEST(constant_folding, const_concat) { auto constant0 = - op::Constant::create(element::Type_t::i32, Shape{2, 3}, vector{1, 2, 3, 4, 5, 6}); - auto constant1 = op::Constant::create(element::Type_t::i32, Shape{2, 1}, vector{7, 8}); + op::Constant::create(element::i32, Shape{2, 3}, vector{1, 2, 3, 4, 5, 6}); + auto constant1 = op::Constant::create(element::i32, Shape{2, 1}, vector{7, 8}); auto concat = make_shared(NodeVector{constant0, constant1}, 1); concat->set_friendly_name("test"); auto f = make_shared(concat, ParameterVector{}); @@ -1255,10 +1254,8 @@ TEST(constant_folding, const_concat) TEST(constant_folding, const_concat_3d_single_elem) { - auto constant_1 = - op::Constant::create(element::Type_t::i32, Shape{1, 1, 1}, vector{1}); - auto constant_2 = - op::Constant::create(element::Type_t::i32, Shape{1, 1, 1}, vector{2}); + auto constant_1 = op::Constant::create(element::i32, Shape{1, 1, 1}, vector{1}); + auto constant_2 = op::Constant::create(element::i32, Shape{1, 1, 1}, vector{2}); auto concat = make_shared(NodeVector{constant_1, constant_2}, 0); concat->set_friendly_name("test"); auto f = make_shared(concat, ParameterVector{}); @@ -1284,12 +1281,10 @@ TEST(constant_folding, const_concat_3d_single_elem) TEST(constant_folding, const_concat_axis_2) { - auto constant_1 = op::Constant::create( - element::Type_t::i32, Shape{3, 1, 2}, vector{1, 2, 3, 4, 5, 6}); - auto constant_2 = - op::Constant::create(element::Type_t::i32, - Shape{3, 1, 4}, - vector{7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18}); + auto constant_1 = + op::Constant::create(element::i32, Shape{3, 1, 2}, vector{1, 2, 3, 4, 5, 6}); + auto constant_2 = op::Constant::create( + element::i32, Shape{3, 1, 4}, vector{7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18}); auto concat = make_shared(NodeVector{constant_1, constant_2}, 2); concat->set_friendly_name("test"); auto f = make_shared(concat, ParameterVector{}); @@ -1316,12 +1311,11 @@ TEST(constant_folding, const_concat_axis_2) TEST(constant_folding, const_concat_axis_1_bool_type) { auto constant_1 = - op::Constant::create(element::Type_t::boolean, Shape{1, 1, 2}, vector{true, true}); + op::Constant::create(element::boolean, Shape{1, 1, 2}, vector{true, true}); auto constant_2 = op::Constant::create( - element::Type_t::boolean, Shape{1, 2, 2}, vector{true, false, true, false}); - auto constant_3 = op::Constant::create(element::Type_t::boolean, - Shape{1, 3, 2}, - vector{true, false, true, false, true, false}); + element::boolean, Shape{1, 2, 2}, vector{true, false, true, false}); + auto constant_3 = op::Constant::create( + element::boolean, Shape{1, 3, 2}, vector{true, false, true, false, true, false}); auto concat = make_shared(NodeVector{constant_1, constant_2, constant_3}, 1); concat->set_friendly_name("test"); auto f = make_shared(concat, ParameterVector{}); @@ -1349,7 +1343,7 @@ TEST(constant_folding, const_concat_axis_1_bool_type) TEST(constant_folding, const_logical_not) { auto constant = - op::Constant::create(element::Type_t::boolean, Shape{2, 3}, vector{0, 1, 0, 0, 1, 1}); + op::Constant::create(element::boolean, Shape{2, 3}, vector{0, 1, 0, 0, 1, 1}); auto logical_not = make_shared(constant); logical_not->set_friendly_name("test"); auto f = make_shared(logical_not, ParameterVector{}); @@ -1375,9 +1369,9 @@ TEST(constant_folding, const_logical_not) TEST(constant_folding, const_equal) { auto constant0 = - op::Constant::create(element::Type_t::i32, Shape{2, 3}, vector{1, 2, 3, 4, 5, 6}); + op::Constant::create(element::i32, Shape{2, 3}, vector{1, 2, 3, 4, 5, 6}); auto constant1 = - op::Constant::create(element::Type_t::i32, Shape{2, 3}, vector{1, 2, 2, 3, 5, 6}); + op::Constant::create(element::i32, Shape{2, 3}, vector{1, 2, 2, 3, 5, 6}); auto eq = make_shared(constant0, constant1); eq->set_friendly_name("test"); auto f = make_shared(eq, ParameterVector{}); @@ -1403,9 +1397,9 @@ TEST(constant_folding, const_equal) TEST(constant_folding, const_not_equal) { auto constant0 = - op::Constant::create(element::Type_t::i32, Shape{2, 3}, vector{1, 2, 3, 4, 5, 6}); + op::Constant::create(element::i32, Shape{2, 3}, vector{1, 2, 3, 4, 5, 6}); auto constant1 = - op::Constant::create(element::Type_t::i32, Shape{2, 3}, vector{1, 2, 2, 3, 5, 6}); + op::Constant::create(element::i32, Shape{2, 3}, vector{1, 2, 2, 3, 5, 6}); auto eq = make_shared(constant0, constant1); eq->set_friendly_name("test"); auto f = make_shared(eq, ParameterVector{}); @@ -1431,9 +1425,9 @@ TEST(constant_folding, const_not_equal) TEST(constant_folding, const_greater) { auto constant0 = - op::Constant::create(element::Type_t::i32, Shape{2, 3}, vector{1, 2, 3, 4, 5, 6}); + op::Constant::create(element::i32, Shape{2, 3}, vector{1, 2, 3, 4, 5, 6}); auto constant1 = - op::Constant::create(element::Type_t::i32, Shape{2, 3}, vector{2, 2, 2, 5, 5, 5}); + op::Constant::create(element::i32, Shape{2, 3}, vector{2, 2, 2, 5, 5, 5}); auto eq = make_shared(constant0, constant1); eq->set_friendly_name("test"); auto f = make_shared(eq, ParameterVector{}); @@ -1459,9 +1453,9 @@ TEST(constant_folding, const_greater) TEST(constant_folding, const_greater_eq) { auto constant0 = - op::Constant::create(element::Type_t::i32, Shape{2, 3}, vector{1, 2, 3, 4, 5, 6}); + op::Constant::create(element::i32, Shape{2, 3}, vector{1, 2, 3, 4, 5, 6}); auto constant1 = - op::Constant::create(element::Type_t::i32, Shape{2, 3}, vector{2, 2, 2, 5, 5, 5}); + op::Constant::create(element::i32, Shape{2, 3}, vector{2, 2, 2, 5, 5, 5}); auto eq = make_shared(constant0, constant1); eq->set_friendly_name("test"); auto f = make_shared(eq, ParameterVector{}); @@ -1487,9 +1481,9 @@ TEST(constant_folding, const_greater_eq) TEST(constant_folding, const_less) { auto constant0 = - op::Constant::create(element::Type_t::i32, Shape{2, 3}, vector{1, 2, 3, 4, 5, 6}); + op::Constant::create(element::i32, Shape{2, 3}, vector{1, 2, 3, 4, 5, 6}); auto constant1 = - op::Constant::create(element::Type_t::i32, Shape{2, 3}, vector{2, 2, 2, 5, 5, 5}); + op::Constant::create(element::i32, Shape{2, 3}, vector{2, 2, 2, 5, 5, 5}); auto eq = make_shared(constant0, constant1); eq->set_friendly_name("test"); auto f = make_shared(eq, ParameterVector{}); @@ -1515,9 +1509,9 @@ TEST(constant_folding, const_less) TEST(constant_folding, const_less_eq) { auto constant0 = - op::Constant::create(element::Type_t::i32, Shape{2, 3}, vector{1, 2, 3, 4, 5, 6}); + op::Constant::create(element::i32, Shape{2, 3}, vector{1, 2, 3, 4, 5, 6}); auto constant1 = - op::Constant::create(element::Type_t::i32, Shape{2, 3}, vector{2, 2, 2, 5, 5, 5}); + op::Constant::create(element::i32, Shape{2, 3}, vector{2, 2, 2, 5, 5, 5}); auto eq = make_shared(constant0, constant1); eq->set_friendly_name("test"); auto f = make_shared(eq, ParameterVector{}); @@ -1542,10 +1536,10 @@ TEST(constant_folding, const_less_eq) TEST(constant_folding, const_or) { - auto constant0 = op::Constant::create( - element::Type_t::boolean, Shape{2, 3}, vector{0, 0, 1, 0, 1, 1}); - auto constant1 = op::Constant::create( - element::Type_t::boolean, Shape{2, 3}, vector{0, 1, 1, 1, 0, 1}); + auto constant0 = + op::Constant::create(element::boolean, Shape{2, 3}, vector{0, 0, 1, 0, 1, 1}); + auto constant1 = + op::Constant::create(element::boolean, Shape{2, 3}, vector{0, 1, 1, 1, 0, 1}); auto eq = make_shared(constant0, constant1); eq->set_friendly_name("test"); auto f = make_shared(eq, ParameterVector{}); @@ -1570,10 +1564,10 @@ TEST(constant_folding, const_or) TEST(constant_folding, const_xor) { - auto constant0 = op::Constant::create( - element::Type_t::boolean, Shape{2, 3}, vector{0, 0, 1, 0, 1, 1}); - auto constant1 = op::Constant::create( - element::Type_t::boolean, Shape{2, 3}, vector{0, 1, 1, 1, 0, 1}); + auto constant0 = + op::Constant::create(element::boolean, Shape{2, 3}, vector{0, 0, 1, 0, 1, 1}); + auto constant1 = + op::Constant::create(element::boolean, Shape{2, 3}, vector{0, 1, 1, 1, 0, 1}); auto eq = make_shared(constant0, constant1); eq->set_friendly_name("test"); auto f = make_shared(eq, ParameterVector{}); @@ -1599,7 +1593,7 @@ TEST(constant_folding, const_xor) TEST(constant_folding, const_ceiling) { auto constant = op::Constant::create( - element::Type_t::f32, Shape{2, 3}, vector{0.0f, 0.1f, -0.1f, -2.5f, 2.5f, 3.0f}); + element::f32, Shape{2, 3}, vector{0.0f, 0.1f, -0.1f, -2.5f, 2.5f, 3.0f}); auto ceil = make_shared(constant); ceil->set_friendly_name("test"); auto f = make_shared(ceil, ParameterVector{}); @@ -1625,7 +1619,7 @@ TEST(constant_folding, const_ceiling) TEST(constant_folding, const_floor) { auto constant = op::Constant::create( - element::Type_t::f32, Shape{2, 3}, vector{0.0f, 0.1f, -0.1f, -2.5f, 2.5f, 3.0f}); + element::f32, Shape{2, 3}, vector{0.0f, 0.1f, -0.1f, -2.5f, 2.5f, 3.0f}); auto floor = make_shared(constant); floor->set_friendly_name("test"); auto f = make_shared(floor, ParameterVector{}); @@ -1651,12 +1645,12 @@ TEST(constant_folding, const_floor) TEST(constant_folding, const_gather_v1) { auto constant_data = op::Constant::create( - element::Type_t::f32, + element::f32, Shape{2, 5}, vector{1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}); auto constant_indices = - op::Constant::create(element::Type_t::i64, Shape{4}, vector{0, 3, 2, 2}); - auto constant_axis = op::Constant::create(element::Type_t::i64, Shape{1}, vector{1}); + op::Constant::create(element::i64, Shape{4}, vector{0, 3, 2, 2}); + auto constant_axis = op::Constant::create(element::i64, Shape{1}, vector{1}); auto gather = make_shared(constant_data, constant_indices, constant_axis); gather->set_friendly_name("test"); auto f = make_shared(gather, ParameterVector{}); @@ -1682,12 +1676,12 @@ TEST(constant_folding, const_gather_v1) TEST(constant_folding, const_gather_v1_scalar) { auto constant_data = op::Constant::create( - element::Type_t::f32, + element::f32, Shape{2, 5}, vector{1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}); auto constant_indices = - op::Constant::create(element::Type_t::i64, Shape{4}, vector{0, 3, 2, 2}); - auto constant_axis = op::Constant::create(element::Type_t::i64, Shape{}, vector{1}); + op::Constant::create(element::i64, Shape{4}, vector{0, 3, 2, 2}); + auto constant_axis = op::Constant::create(element::i64, Shape{}, vector{1}); auto gather = make_shared(constant_data, constant_indices, constant_axis); gather->set_friendly_name("test"); auto f = make_shared(gather, ParameterVector{}); @@ -1712,18 +1706,17 @@ TEST(constant_folding, const_gather_v1_scalar) TEST(constant_folding, const_gather_v1_subgraph) { - const auto A = make_shared(element::Type_t::f32, Shape{1}); + const auto A = make_shared(element::f32, Shape{1}); const float b_value = 3.21f; - const auto B_const = op::Constant::create(element::Type_t::f32, {1}, {b_value}); - const auto C = make_shared(element::Type_t::f32, Shape{1}); + const auto B_const = op::Constant::create(element::f32, {1}, {b_value}); + const auto C = make_shared(element::f32, Shape{1}); const int64_t axis = 0; - const auto axis_const = op::Constant::create(element::Type_t::i64, {}, {axis}); + const auto axis_const = op::Constant::create(element::i64, {}, {axis}); const auto concat = make_shared(NodeVector{A, B_const, C}, axis); const vector indices{1}; - const auto indices_const = - op::Constant::create(element::Type_t::i64, {indices.size()}, indices); + const auto indices_const = op::Constant::create(element::i64, {indices.size()}, indices); const auto gather = make_shared(concat, indices_const, axis_const); gather->set_friendly_name("test"); auto f = make_shared(gather, ParameterVector{A, C}); @@ -1747,18 +1740,17 @@ TEST(constant_folding, const_gather_v1_subgraph) TEST(constant_folding, const_gather_v1_subgraph_neg_axis) { - const auto A = make_shared(element::Type_t::f32, Shape{1}); + const auto A = make_shared(element::f32, Shape{1}); const float b_value = 1.23f; - const auto B = make_shared(element::Type_t::f32, Shape{1}); - const auto C_const = op::Constant::create(element::Type_t::f32, {1}, {b_value}); + const auto B = make_shared(element::f32, Shape{1}); + const auto C_const = op::Constant::create(element::f32, {1}, {b_value}); const int64_t axis = 0; - const auto axis_const = op::Constant::create(element::Type_t::i64, {}, {axis}); + const auto axis_const = op::Constant::create(element::i64, {}, {axis}); const auto concat = make_shared(NodeVector{A, B, C_const}, axis); const vector indices{-1}; - const auto indices_const = - op::Constant::create(element::Type_t::i64, {indices.size()}, indices); + const auto indices_const = op::Constant::create(element::i64, {indices.size()}, indices); const auto gather = make_shared(concat, indices_const, axis_const); gather->set_friendly_name("test"); auto f = make_shared(gather, ParameterVector{A, B}); @@ -1782,17 +1774,16 @@ TEST(constant_folding, const_gather_v1_subgraph_neg_axis) TEST(constant_folding, const_gather_v1_subgraph_no_constant_input) { - const auto A = make_shared(element::Type_t::f32, Shape{1}); - const auto B = make_shared(element::Type_t::f32, Shape{1}); - const auto C = make_shared(element::Type_t::f32, Shape{1}); + const auto A = make_shared(element::f32, Shape{1}); + const auto B = make_shared(element::f32, Shape{1}); + const auto C = make_shared(element::f32, Shape{1}); const int64_t axis = 0; - const auto axis_const = op::Constant::create(element::Type_t::i64, {}, {axis}); + const auto axis_const = op::Constant::create(element::i64, {}, {axis}); const auto concat = make_shared(NodeVector{A, B, C}, axis); const vector indices{1}; - const auto indices_const = - op::Constant::create(element::Type_t::i64, {indices.size()}, indices); + const auto indices_const = op::Constant::create(element::i64, {indices.size()}, indices); const auto gather = make_shared(concat, indices_const, axis_const); gather->set_friendly_name("test"); auto f = make_shared(gather, ParameterVector{A, B, C}); @@ -1807,16 +1798,16 @@ TEST(constant_folding, const_gather_v1_subgraph_no_constant_input) TEST(constant_folding, const_gather_v1_subgraph_no_constant_input_scalar) { - const auto A = make_shared(element::Type_t::f32, Shape{1}); - const auto B = make_shared(element::Type_t::f32, Shape{1}); - const auto C = make_shared(element::Type_t::f32, Shape{1}); + const auto A = make_shared(element::f32, Shape{1}); + const auto B = make_shared(element::f32, Shape{1}); + const auto C = make_shared(element::f32, Shape{1}); const int64_t axis = 0; - const auto axis_const = op::Constant::create(element::Type_t::i64, {}, {axis}); + const auto axis_const = op::Constant::create(element::i64, {}, {axis}); const auto concat = make_shared(NodeVector{A, B, C}, axis); const vector indices{1}; - const auto indices_const = op::Constant::create(element::Type_t::i64, {}, indices); + const auto indices_const = op::Constant::create(element::i64, {}, indices); const auto gather = make_shared(concat, indices_const, axis_const); auto f = make_shared(gather, ParameterVector{A, B, C}); @@ -1831,17 +1822,16 @@ TEST(constant_folding, const_gather_v1_subgraph_no_constant_input_scalar) TEST(constant_folding, const_gather_v1_subgraph_skip_if_non_zero_axis) { - const auto A = make_shared(element::Type_t::f32, Shape{2, 2}); - const auto B = make_shared(element::Type_t::f32, Shape{2, 2}); - const auto C = make_shared(element::Type_t::f32, Shape{2, 2}); + const auto A = make_shared(element::f32, Shape{2, 2}); + const auto B = make_shared(element::f32, Shape{2, 2}); + const auto C = make_shared(element::f32, Shape{2, 2}); const int64_t axis = 1; - const auto axis_const = op::Constant::create(element::Type_t::i64, {}, {axis}); + const auto axis_const = op::Constant::create(element::i64, {}, {axis}); const auto concat = make_shared(NodeVector{A, B, C}, axis); const vector indices{1}; - const auto indices_const = - op::Constant::create(element::Type_t::i64, {indices.size()}, indices); + const auto indices_const = op::Constant::create(element::i64, {indices.size()}, indices); const auto gather = make_shared(concat, indices_const, axis_const); auto f = make_shared(gather, ParameterVector{A, B, C}); @@ -1855,17 +1845,16 @@ TEST(constant_folding, const_gather_v1_subgraph_skip_if_non_zero_axis) TEST(constant_folding, const_gather_v1_subgraph_skip_if_non_single_indices) { - const auto A = make_shared(element::Type_t::f32, Shape{1}); - const auto B = make_shared(element::Type_t::f32, Shape{1}); - const auto C = make_shared(element::Type_t::f32, Shape{1}); + const auto A = make_shared(element::f32, Shape{1}); + const auto B = make_shared(element::f32, Shape{1}); + const auto C = make_shared(element::f32, Shape{1}); const int64_t axis = 0; - const auto axis_const = op::Constant::create(element::Type_t::i64, {}, {axis}); + const auto axis_const = op::Constant::create(element::i64, {}, {axis}); const auto concat = make_shared(NodeVector{A, B, C}, axis); const vector indices{0, 1}; - const auto indices_const = - op::Constant::create(element::Type_t::i64, {indices.size()}, indices); + const auto indices_const = op::Constant::create(element::i64, {indices.size()}, indices); const auto gather = make_shared(concat, indices_const, axis_const); auto f = make_shared(gather, ParameterVector{A, B, C}); @@ -1879,17 +1868,16 @@ TEST(constant_folding, const_gather_v1_subgraph_skip_if_non_single_indices) TEST(constant_folding, const_gather_v1_subgraph_skip_if_concat_output_shape_dynamic) { - const auto A = make_shared(element::Type_t::f32, PartialShape::dynamic()); - const auto B = make_shared(element::Type_t::f32, Shape{1}); - const auto C = make_shared(element::Type_t::f32, Shape{1}); + const auto A = make_shared(element::f32, PartialShape::dynamic()); + const auto B = make_shared(element::f32, Shape{1}); + const auto C = make_shared(element::f32, Shape{1}); const int64_t axis = 0; - const auto axis_const = op::Constant::create(element::Type_t::i64, {}, {axis}); + const auto axis_const = op::Constant::create(element::i64, {}, {axis}); const auto concat = make_shared(NodeVector{A, B, C}, axis); const vector indices{1}; - const auto indices_const = - op::Constant::create(element::Type_t::i64, {indices.size()}, indices); + const auto indices_const = op::Constant::create(element::i64, {indices.size()}, indices); const auto gather = make_shared(concat, indices_const, axis_const); auto f = make_shared(gather, ParameterVector{A, B, C}); @@ -1903,17 +1891,16 @@ TEST(constant_folding, const_gather_v1_subgraph_skip_if_concat_output_shape_dyna TEST(constant_folding, const_gather_v1_subgraph_skip_if_not_single_input) { - const auto A = make_shared(element::Type_t::f32, Shape{2}); - const auto B = make_shared(element::Type_t::f32, Shape{1}); - const auto C = make_shared(element::Type_t::f32, Shape{1}); + const auto A = make_shared(element::f32, Shape{2}); + const auto B = make_shared(element::f32, Shape{1}); + const auto C = make_shared(element::f32, Shape{1}); const int64_t axis = 0; - const auto axis_const = op::Constant::create(element::Type_t::i64, {}, {axis}); + const auto axis_const = op::Constant::create(element::i64, {}, {axis}); const auto concat = make_shared(NodeVector{A, B, C}, axis); const vector indices{1}; - const auto indices_const = - op::Constant::create(element::Type_t::i64, {indices.size()}, indices); + const auto indices_const = op::Constant::create(element::i64, {indices.size()}, indices); const auto gather = make_shared(concat, indices_const, axis_const); auto f = make_shared(gather, ParameterVector{A, B, C}); @@ -1930,10 +1917,10 @@ TEST(constant_folding, const_strided_slice) Shape shape_in{16}; vector values_in{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - auto constant = make_shared(element::Type_t::i32, shape_in, values_in); - auto begin = op::Constant::create(element::Type_t::i64, {1}, {2}); - auto end = op::Constant::create(element::Type_t::i64, {1}, {15}); - auto stride = op::Constant::create(element::Type_t::i64, {1}, {3}); + auto constant = make_shared(element::i32, shape_in, values_in); + auto begin = op::Constant::create(element::i64, {1}, {2}); + auto end = op::Constant::create(element::i64, {1}, {15}); + auto stride = op::Constant::create(element::i64, {1}, {3}); auto slice = make_shared( constant, begin, end, stride, std::vector{0}, std::vector{0}); slice->set_friendly_name("test"); @@ -1965,9 +1952,8 @@ TEST(constant_folding, constant_dyn_reshape) Shape shape_shape{3}; vector values_shape{2, 4, 1}; - auto constant_in = make_shared(element::Type_t::f32, shape_in, values_in); - auto constant_shape = - make_shared(element::Type_t::i64, shape_shape, values_shape); + auto constant_in = make_shared(element::f32, shape_in, values_in); + auto constant_shape = make_shared(element::i64, shape_shape, values_shape); auto dyn_reshape = make_shared(constant_in, constant_shape, false); dyn_reshape->set_friendly_name("test"); auto f = make_shared(dyn_reshape, ParameterVector{}); @@ -2001,11 +1987,9 @@ TEST(constant_folding, constant_dyn_reshape_shape_not_originally_constant) vector values_shape_a{1, 3, 0}; vector values_shape_b{1, 1, 1}; - auto constant_in = make_shared(element::Type_t::f32, shape_in, values_in); - auto constant_shape_a = - make_shared(element::Type_t::i64, shape_shape, values_shape_a); - auto constant_shape_b = - make_shared(element::Type_t::i64, shape_shape, values_shape_b); + auto constant_in = make_shared(element::f32, shape_in, values_in); + auto constant_shape_a = make_shared(element::i64, shape_shape, values_shape_a); + auto constant_shape_b = make_shared(element::i64, shape_shape, values_shape_b); auto dyn_reshape = make_shared( constant_in, std::make_shared(constant_shape_a, constant_shape_b), false); dyn_reshape->set_friendly_name("test"); @@ -2037,8 +2021,8 @@ TEST(constant_folding, constant_transpose) Shape shape_perm{2}; vector values_perm{1, 0}; - auto constant_in = make_shared(element::Type_t::f64, shape_in, values_in); - auto constant_perm = make_shared(element::Type_t::i64, shape_perm, values_perm); + auto constant_in = make_shared(element::f64, shape_in, values_in); + auto constant_perm = make_shared(element::i64, shape_perm, values_perm); auto transpose = make_shared(constant_in, constant_perm); transpose->set_friendly_name("test"); auto f = make_shared(transpose, ParameterVector{}); @@ -2112,9 +2096,9 @@ TEST(constant_folding, constant_v1_select) vector values_f{11, 12, 13, 14, 15, 16, 17, 18}; auto constant_selection = - make_shared(element::Type_t::boolean, Shape{4}, values_selection); - auto constant_t = make_shared(element::Type_t::i64, Shape{4}, values_t); - auto constant_f = make_shared(element::Type_t::i64, Shape{2, 4}, values_f); + make_shared(element::boolean, Shape{4}, values_selection); + auto constant_t = make_shared(element::i64, Shape{4}, values_t); + auto constant_f = make_shared(element::i64, Shape{2, 4}, values_f); auto select = make_shared(constant_selection, constant_t, constant_f); select->set_friendly_name("test"); auto f = make_shared(select, ParameterVector{}); @@ -2139,8 +2123,8 @@ TEST(constant_folding, constant_v1_select) TEST(constant_folding, constant_v1_split) { vector data{.1f, .2f, .3f, .4f, .5f, .6f}; - const auto const_data = op::Constant::create(element::Type_t::f32, Shape{data.size()}, data); - const auto const_axis = op::Constant::create(element::Type_t::i64, Shape{}, {0}); + const auto const_data = op::Constant::create(element::f32, Shape{data.size()}, data); + const auto const_axis = op::Constant::create(element::i64, Shape{}, {0}); const auto num_splits = 3; auto split_v1 = make_shared(const_data, const_axis, num_splits); @@ -2174,8 +2158,8 @@ TEST(constant_folding, constant_v1_split) TEST(constant_folding, constant_v1_split_specialized) { vector data{.1f, .2f, .3f, .4f, .5f, .6f}; - const auto const_data = op::Constant::create(element::Type_t::f32, Shape{data.size()}, data); - const auto const_axis = op::Constant::create(element::Type_t::i64, Shape{}, {0}); + const auto const_data = op::Constant::create(element::f32, Shape{data.size()}, data); + const auto const_axis = op::Constant::create(element::i64, Shape{}, {0}); const auto num_splits = 3; auto split_v1 = make_shared(const_data, const_axis, num_splits); @@ -2216,8 +2200,8 @@ TEST(constant_folding, constant_v1_split_axis_1_4_splits) 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63}; - const auto const_data = op::Constant::create(element::Type_t::i64, Shape{4, 4, 4}, data); - const auto const_axis = op::Constant::create(element::Type_t::i64, Shape{}, {1}); + const auto const_data = op::Constant::create(element::i64, Shape{4, 4, 4}, data); + const auto const_axis = op::Constant::create(element::i64, Shape{}, {1}); const auto num_splits = 4; auto split_v1 = make_shared(const_data, const_axis, num_splits); @@ -2272,8 +2256,8 @@ TEST(constant_folding, constant_v1_split_axis_1_2_splits) 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63}; - const auto const_data = op::Constant::create(element::Type_t::i64, Shape{4, 4, 4}, data); - const auto const_axis = op::Constant::create(element::Type_t::i64, Shape{}, {1}); + const auto const_data = op::Constant::create(element::i64, Shape{4, 4, 4}, data); + const auto const_axis = op::Constant::create(element::i64, Shape{}, {1}); const auto num_splits = 2; auto split_v1 = make_shared(const_data, const_axis, num_splits); @@ -2313,11 +2297,11 @@ TEST(constant_folding, constant_v1_variadic_split_axis_1_2_splits) 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63}; - const auto const_data = op::Constant::create(element::Type_t::i64, Shape{4, 4, 4}, data); - const auto const_axis = op::Constant::create(element::Type_t::i16, Shape{}, {1}); + const auto const_data = op::Constant::create(element::i64, Shape{4, 4, 4}, data); + const auto const_axis = op::Constant::create(element::i16, Shape{}, {1}); vector values_lengths{3, 1}; - auto constant_lengths = make_shared( - element::Type_t::i64, Shape{values_lengths.size()}, values_lengths); + auto constant_lengths = + make_shared(element::i64, Shape{values_lengths.size()}, values_lengths); auto variadic_split_v1 = make_shared(const_data, const_axis, constant_lengths); @@ -2357,11 +2341,11 @@ TEST(constant_folding, constant_v1_variadic_split_axis_1_3_splits_neg_length) 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63}; - const auto const_data = op::Constant::create(element::Type_t::i64, Shape{4, 4, 4}, data); - const auto const_axis = op::Constant::create(element::Type_t::i32, Shape{}, {1}); + const auto const_data = op::Constant::create(element::i64, Shape{4, 4, 4}, data); + const auto const_axis = op::Constant::create(element::i32, Shape{}, {1}); vector values_lengths{1, 1, -1}; - auto constant_lengths = make_shared( - element::Type_t::i64, Shape{values_lengths.size()}, values_lengths); + auto constant_lengths = + make_shared(element::i64, Shape{values_lengths.size()}, values_lengths); auto variadic_split_v1 = make_shared(const_data, const_axis, constant_lengths); @@ -2402,10 +2386,10 @@ TEST(constant_folding, constant_v1_one_hot) const float on_value = 1.123f; const float off_value = 0.321f; - const auto indices_const = op::Constant::create(element::Type_t::i64, Shape{3}, indices); - const auto depth_const = op::Constant::create(element::Type_t::i64, Shape{}, {3}); - const auto on_const = op::Constant::create(element::Type_t::f32, Shape{}, {on_value}); - const auto off_const = op::Constant::create(element::Type_t::f32, Shape{}, {off_value}); + const auto indices_const = op::Constant::create(element::i64, Shape{3}, indices); + const auto depth_const = op::Constant::create(element::i64, Shape{}, {3}); + const auto on_const = op::Constant::create(element::f32, Shape{}, {on_value}); + const auto off_const = op::Constant::create(element::f32, Shape{}, {off_value}); int64_t axis = 1; auto one_hot_v1 = @@ -2442,10 +2426,10 @@ TEST(constant_folding, constant_v1_one_hot_negative_axes) const int32_t on_value = 4; const int32_t off_value = 1; - const auto indices_const = op::Constant::create(element::Type_t::i64, Shape{4}, indices); - const auto depth_const = op::Constant::create(element::Type_t::i64, Shape{}, {3}); - const auto on_const = op::Constant::create(element::Type_t::i32, Shape{}, {on_value}); - const auto off_const = op::Constant::create(element::Type_t::i32, Shape{}, {off_value}); + const auto indices_const = op::Constant::create(element::i64, Shape{4}, indices); + const auto depth_const = op::Constant::create(element::i64, Shape{}, {3}); + const auto on_const = op::Constant::create(element::i32, Shape{}, {on_value}); + const auto off_const = op::Constant::create(element::i32, Shape{}, {off_value}); int64_t axis = -1; auto one_hot_v1 = @@ -2485,10 +2469,10 @@ TEST(constant_folding, constant_v1_one_hot_negative_axes_2) auto on_value = true; auto off_value = false; - const auto indices_const = op::Constant::create(element::Type_t::i64, Shape{2, 2}, indices); - const auto depth_const = op::Constant::create(element::Type_t::i64, Shape{}, {3}); - const auto on_const = op::Constant::create(element::Type_t::boolean, Shape{}, {on_value}); - const auto off_const = op::Constant::create(element::Type_t::boolean, Shape{}, {off_value}); + const auto indices_const = op::Constant::create(element::i64, Shape{2, 2}, indices); + const auto depth_const = op::Constant::create(element::i64, Shape{}, {3}); + const auto on_const = op::Constant::create(element::boolean, Shape{}, {on_value}); + const auto off_const = op::Constant::create(element::boolean, Shape{}, {off_value}); int64_t axis = -1; auto one_hot_v1 = @@ -2531,9 +2515,9 @@ TEST(constant_folding, constant_tile_1d) Shape shape_out{4}; vector values_in{0, 1}; - auto data = make_shared(element::Type_t::i32, shape_in, values_in); + auto data = make_shared(element::i32, shape_in, values_in); vector values_repeats{2}; - auto repeats = make_shared(element::Type_t::i64, shape_repeats, values_repeats); + auto repeats = make_shared(element::i64, shape_repeats, values_repeats); auto tile = make_shared(data, repeats); tile->set_friendly_name("test"); auto f = make_shared(tile, ParameterVector{}); @@ -2562,9 +2546,9 @@ TEST(constant_folding, constant_tile_3d_small_data_rank) Shape shape_out{2, 2, 4}; vector values_in{0, 1}; - auto data = make_shared(element::Type_t::i32, shape_in, values_in); + auto data = make_shared(element::i32, shape_in, values_in); vector values_repeats{2, 2, 2}; - auto repeats = make_shared(element::Type_t::i64, shape_repeats, values_repeats); + auto repeats = make_shared(element::i64, shape_repeats, values_repeats); auto tile = make_shared(data, repeats); tile->set_friendly_name("test"); auto f = make_shared(tile, ParameterVector{}); @@ -2593,9 +2577,9 @@ TEST(constant_folding, constant_tile_3d_few_repeats) Shape shape_out{2, 2, 3}; vector values_in{1, 2, 3, 4, 5, 6}; - auto data = make_shared(element::Type_t::i32, shape_in, values_in); + auto data = make_shared(element::i32, shape_in, values_in); vector values_repeats{2, 1}; - auto repeats = make_shared(element::Type_t::i64, shape_repeats, values_repeats); + auto repeats = make_shared(element::i64, shape_repeats, values_repeats); auto tile = make_shared(data, repeats); tile->set_friendly_name("test"); auto f = make_shared(tile, ParameterVector{}); @@ -2624,9 +2608,9 @@ TEST(constant_folding, constant_tile_1d_0_repeats) Shape shape_out{}; vector values_in{0, 1}; - auto data = make_shared(element::Type_t::i32, shape_in, values_in); + auto data = make_shared(element::i32, shape_in, values_in); vector values_repeats{0}; - auto repeats = make_shared(element::Type_t::i64, shape_repeats, values_repeats); + auto repeats = make_shared(element::i64, shape_repeats, values_repeats); auto tile = make_shared(data, repeats); tile->set_friendly_name("test"); auto f = make_shared(tile, ParameterVector{}); @@ -2655,9 +2639,9 @@ TEST(constant_folding, constant_tile_0_rank_data) Shape shape_out{4}; vector values_in{1}; - auto data = make_shared(element::Type_t::i32, shape_in, values_in); + auto data = make_shared(element::i32, shape_in, values_in); vector values_repeats{4}; - auto repeats = make_shared(element::Type_t::i64, shape_repeats, values_repeats); + auto repeats = make_shared(element::i64, shape_repeats, values_repeats); auto tile = make_shared(data, repeats); tile->set_friendly_name("test"); auto f = make_shared(tile, ParameterVector{}); @@ -2681,7 +2665,7 @@ TEST(constant_folding, constant_tile_0_rank_data) TEST(constant_folding, constant_non_zero_0D) { - auto data = op::Constant::create(element::Type_t::i32, Shape{}, {1}); + auto data = op::Constant::create(element::i32, Shape{}, {1}); auto non_zero = make_shared(data); non_zero->set_friendly_name("test"); auto f = make_shared(non_zero, ParameterVector{}); @@ -2709,7 +2693,7 @@ TEST(constant_folding, constant_non_zero_0D) TEST(constant_folding, constant_non_zero_1D) { vector values_in{0, 1, 0, 1}; - auto data = make_shared(element::Type_t::i32, Shape{4}, values_in); + auto data = make_shared(element::i32, Shape{4}, values_in); auto non_zero = make_shared(data); non_zero->set_friendly_name("test"); auto f = make_shared(non_zero, ParameterVector{}); @@ -2735,8 +2719,8 @@ TEST(constant_folding, constant_non_zero_1D) TEST(constant_folding, constant_non_zero_int32_output_type) { vector values_in{0, 1, 0, 1}; - auto data = make_shared(element::Type_t::i32, Shape{4}, values_in); - auto non_zero = make_shared(data, element::Type_t::i32); + auto data = make_shared(element::i32, Shape{4}, values_in); + auto non_zero = make_shared(data, element::i32); non_zero->set_friendly_name("test"); auto f = make_shared(non_zero, ParameterVector{}); @@ -2751,7 +2735,7 @@ TEST(constant_folding, constant_non_zero_int32_output_type) as_type_ptr(f->get_results().at(0)->input_value(0).get_node_shared_ptr()); ASSERT_TRUE(new_const); ASSERT_EQ(new_const->get_friendly_name(), "test"); - ASSERT_EQ(element::Type_t::i32, new_const->get_element_type()); + ASSERT_EQ(element::i32, new_const->get_element_type()); const auto values_out = new_const->get_vector(); const vector values_expected{1, 3}; @@ -2762,8 +2746,7 @@ TEST(constant_folding, constant_non_zero_int32_output_type) TEST(constant_folding, constant_non_zero_1D_all_indices) { const vector values_in{1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f}; - const auto data = - make_shared(element::Type_t::f32, Shape{values_in.size()}, values_in); + const auto data = make_shared(element::f32, Shape{values_in.size()}, values_in); const auto non_zero = make_shared(data); non_zero->set_friendly_name("test"); auto f = make_shared(non_zero, ParameterVector{}); @@ -2789,7 +2772,7 @@ TEST(constant_folding, constant_non_zero_1D_all_indices) TEST(constant_folding, constant_non_zero_2D) { vector values_in{1, 0, 0, 0, 1, 0, 1, 1, 0}; - auto data = make_shared(element::Type_t::i32, Shape{3, 3}, values_in); + auto data = make_shared(element::i32, Shape{3, 3}, values_in); auto non_zero = make_shared(data); non_zero->set_friendly_name("test"); auto f = make_shared(non_zero, ParameterVector{}); @@ -2815,7 +2798,7 @@ TEST(constant_folding, constant_non_zero_2D) TEST(constant_folding, DISABLED_constant_non_zero_2D_all_indices) { const vector values_in{1, 1, 1, 1, 1, 1, 1, 1, 1}; - const auto data = make_shared(element::Type_t::i8, Shape{3, 3}, values_in); + const auto data = make_shared(element::i8, Shape{3, 3}, values_in); const auto non_zero = make_shared(data); non_zero->set_friendly_name("test"); auto f = make_shared(non_zero, ParameterVector{}); @@ -2841,7 +2824,7 @@ TEST(constant_folding, DISABLED_constant_non_zero_2D_all_indices) TEST(constant_folding, DISABLED_constant_non_zero_2D_all_zeros) { const vector values_in{0, 0, 0, 0, 0, 0}; - const auto data = make_shared(element::Type_t::u8, Shape{2, 3}, values_in); + const auto data = make_shared(element::u8, Shape{2, 3}, values_in); const auto non_zero = make_shared(data); non_zero->set_friendly_name("test"); auto f = make_shared(non_zero, ParameterVector{}); @@ -2864,7 +2847,7 @@ TEST(constant_folding, DISABLED_constant_non_zero_2D_all_zeros) TEST(constant_folding, constant_non_zero_3D) { vector values_in{1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0}; - auto data = make_shared(element::Type_t::i32, Shape{2, 3, 3}, values_in); + auto data = make_shared(element::i32, Shape{2, 3, 3}, values_in); auto non_zero = make_shared(data); non_zero->set_friendly_name("test"); auto f = make_shared(non_zero, ParameterVector{}); @@ -2894,12 +2877,12 @@ TEST(constant_folding, constant_scatter_elements_update_basic) const Shape indices_shape{2, 3}; const auto data_const = op::Constant::create( - element::Type_t::f32, data_shape, std::vector(shape_size(data_shape), 0.f)); + element::f32, data_shape, std::vector(shape_size(data_shape), 0.f)); const auto indices_const = - op::Constant::create(element::Type_t::i32, indices_shape, {1, 0, 2, 0, 2, 1}); - const auto updates_const = op::Constant::create( - element::Type_t::f32, indices_shape, {1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f}); - const auto axis_const = op::Constant::create(element::Type_t::i64, Shape{}, {0}); + op::Constant::create(element::i32, indices_shape, {1, 0, 2, 0, 2, 1}); + const auto updates_const = + op::Constant::create(element::f32, indices_shape, {1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f}); + const auto axis_const = op::Constant::create(element::i64, Shape{}, {0}); auto scatter_elem_updt = make_shared( data_const, indices_const, updates_const, axis_const); @@ -2928,12 +2911,12 @@ TEST(constant_folding, constant_scatter_elements_update_negative_axis) const Shape indices_shape{2, 3}; const auto data_const = op::Constant::create( - element::Type_t::f32, data_shape, std::vector(shape_size(data_shape), 0.f)); + element::f32, data_shape, std::vector(shape_size(data_shape), 0.f)); const auto indices_const = - op::Constant::create(element::Type_t::i32, indices_shape, {1, 0, 2, 0, 2, 1}); - const auto updates_const = op::Constant::create( - element::Type_t::f32, indices_shape, {1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f}); - const auto axis_const = op::Constant::create(element::Type_t::i64, Shape{}, {-1}); + op::Constant::create(element::i32, indices_shape, {1, 0, 2, 0, 2, 1}); + const auto updates_const = + op::Constant::create(element::f32, indices_shape, {1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f}); + const auto axis_const = op::Constant::create(element::i64, Shape{}, {-1}); auto scatter_elem_updt = make_shared( data_const, indices_const, updates_const, axis_const); @@ -2960,12 +2943,12 @@ TEST(constant_folding, constant_scatter_elements_update_1d_axis) const Shape indices_shape{2, 3}; const auto data_const = op::Constant::create( - element::Type_t::f32, data_shape, std::vector(shape_size(data_shape), 0.f)); + element::f32, data_shape, std::vector(shape_size(data_shape), 0.f)); const auto indices_const = - op::Constant::create(element::Type_t::i32, indices_shape, {1, 0, 2, 0, 2, 1}); - const auto updates_const = op::Constant::create( - element::Type_t::f32, indices_shape, {1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f}); - const auto axis_const = op::Constant::create(element::Type_t::i64, Shape{1}, {0}); + op::Constant::create(element::i32, indices_shape, {1, 0, 2, 0, 2, 1}); + const auto updates_const = + op::Constant::create(element::f32, indices_shape, {1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f}); + const auto axis_const = op::Constant::create(element::i64, Shape{1}, {0}); auto scatter_elem_updt = make_shared( data_const, indices_const, updates_const, axis_const); @@ -2992,12 +2975,12 @@ TEST(constant_folding, constant_scatter_elements_update_3d_i16) const Shape indices_shape{2, 2, 3}; const auto data_const = op::Constant::create( - element::Type_t::i16, data_shape, std::vector(shape_size(data_shape), 0)); - const auto indices_const = op::Constant::create( - element::Type_t::i16, indices_shape, {1, 0, 2, 0, 2, 1, 2, 2, 2, 0, 1, 0}); - const auto updates_const = op::Constant::create( - element::Type_t::i16, indices_shape, {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}); - const auto axis_const = op::Constant::create(element::Type_t::i64, Shape{}, {1}); + element::i16, data_shape, std::vector(shape_size(data_shape), 0)); + const auto indices_const = + op::Constant::create(element::i16, indices_shape, {1, 0, 2, 0, 2, 1, 2, 2, 2, 0, 1, 0}); + const auto updates_const = + op::Constant::create(element::i16, indices_shape, {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}); + const auto axis_const = op::Constant::create(element::i64, Shape{}, {1}); auto scatter_elem_updt = make_shared( data_const, indices_const, updates_const, axis_const); @@ -3025,10 +3008,10 @@ TEST(constant_folding, constant_scatter_elements_update_one_elem) const Shape indices_shape{1, 1, 1}; const auto input_data = std::vector(shape_size(data_shape), 0); - const auto data_const = op::Constant::create(element::Type_t::i32, data_shape, input_data); - const auto indices_const = op::Constant::create(element::Type_t::i32, indices_shape, {1}); - const auto updates_const = op::Constant::create(element::Type_t::i32, indices_shape, {2}); - const auto axis_const = op::Constant::create(element::Type_t::i64, Shape{}, {0}); + const auto data_const = op::Constant::create(element::i32, data_shape, input_data); + const auto indices_const = op::Constant::create(element::i32, indices_shape, {1}); + const auto updates_const = op::Constant::create(element::i32, indices_shape, {2}); + const auto axis_const = op::Constant::create(element::i64, Shape{}, {0}); auto scatter_elem_updt = make_shared( data_const, indices_const, updates_const, axis_const); @@ -3057,9 +3040,8 @@ void test_constant_folding_reshape_v1(Shape& shape_in, vector values_shape, bool zero_flag = false) { - auto constant_in = make_shared(element::Type_t::f32, shape_in, values_in); - auto constant_shape = - make_shared(element::Type_t::i64, shape_shape, values_shape); + auto constant_in = make_shared(element::f32, shape_in, values_in); + auto constant_shape = make_shared(element::i64, shape_shape, values_shape); auto dyn_reshape = make_shared(constant_in, constant_shape, zero_flag); dyn_reshape->set_friendly_name("test"); auto f = make_shared(dyn_reshape, ParameterVector{}); @@ -3111,8 +3093,8 @@ TEST(constant_folding, constant_dyn_reshape_v1_pattern_with_zero_dims) TEST(constant_folding, disable_constant_folding) { - auto input = make_shared(element::Type_t::f32, Shape{1, 3}); - auto constant_shape = op::Constant::create(element::Type_t::i64, Shape{1}, {3}); + auto input = make_shared(element::f32, Shape{1, 3}); + auto constant_shape = op::Constant::create(element::i64, Shape{1}, {3}); auto dyn_reshape = make_shared(input, constant_shape, true); auto& rt_info = dyn_reshape->get_rt_info(); rt_info["DISABLED_CONSTANT_FOLDING"]; diff --git a/ngraph/test/control_dependencies.cpp b/ngraph/test/control_dependencies.cpp index f78710d318aabf..3008727fb43638 100644 --- a/ngraph/test/control_dependencies.cpp +++ b/ngraph/test/control_dependencies.cpp @@ -78,8 +78,8 @@ constexpr NodeTypeInfo ControlDependencyOp::type_info; TEST(control_dependencies, cdep_ops) { - auto A = make_shared(element::Type_t::f32, Shape{}); - auto B = make_shared(element::Type_t::f32, Shape{}); + auto A = make_shared(element::f32, Shape{}); + auto B = make_shared(element::f32, Shape{}); auto absn = make_shared(A); auto cdop = make_shared(OutputVector{A}, std::set>{absn}); @@ -90,10 +90,10 @@ TEST(control_dependencies, cdep_ops) TEST(control_dependencies, two_cdep_ops) { - auto A = make_shared(element::Type_t::f32, Shape{}); - auto B = make_shared(element::Type_t::f32, Shape{}); + auto A = make_shared(element::f32, Shape{}); + auto B = make_shared(element::f32, Shape{}); auto absn = make_shared(A); - auto C = make_shared(element::Type_t::f32, Shape{}); + auto C = make_shared(element::f32, Shape{}); auto absn_c = make_shared(C); auto cdop = make_shared(OutputVector{A}, std::set>{absn, absn_c}); @@ -104,9 +104,9 @@ TEST(control_dependencies, two_cdep_ops) TEST(control_dependencies, two_cdep_ops_op_on_top) { - auto A = make_shared(element::Type_t::f32, Shape{}); + auto A = make_shared(element::f32, Shape{}); auto absn = make_shared(A); - auto B = make_shared(element::Type_t::f32, Shape{}); + auto B = make_shared(element::f32, Shape{}); auto absn_b = make_shared(B); auto cdop = make_shared(OutputVector{A}, std::set>{absn, absn_b}); @@ -118,7 +118,7 @@ TEST(control_dependencies, two_cdep_ops_op_on_top) TEST(control_dependencies, clone_function_cdop) { - auto A = make_shared(element::Type_t::f32, Shape{}); + auto A = make_shared(element::f32, Shape{}); auto absn = make_shared(A); auto cdop = make_shared(OutputVector{A}, std::set>{absn}); @@ -137,9 +137,9 @@ TEST(control_dependencies, clone_function_cdop) TEST(control_dependencies, clone_function_cdop_abs) { - auto A = make_shared(element::Type_t::f32, Shape{}); + auto A = make_shared(element::f32, Shape{}); auto absn = make_shared(A); - auto B = make_shared(element::Type_t::f32, Shape{}); + auto B = make_shared(element::f32, Shape{}); auto absn_b = make_shared(B); auto cdop = make_shared(OutputVector{A}, std::set>{absn, absn_b}); @@ -173,8 +173,8 @@ static size_t count_control_dependencies(const shared_ptr& node, TEST(control_dependencies, replace_node) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto MUL_AB = make_shared(A, B); auto MUL_BA = make_shared(B, A); auto ADD = make_shared(A, B); diff --git a/ngraph/test/convert_u1_to_string.cpp b/ngraph/test/convert_u1_to_string.cpp index a994a73cbd53d0..fd12304831a611 100644 --- a/ngraph/test/convert_u1_to_string.cpp +++ b/ngraph/test/convert_u1_to_string.cpp @@ -25,7 +25,7 @@ using namespace std; TEST(convert_u1_to_string, convert_u1_to_string) { vector values{171, 16}; - auto constant = make_shared(element::Type_t::u1, Shape{12}, &values[0]); + auto constant = make_shared(element::u1, Shape{12}, &values[0]); vector ref{"1", "0", "1", "0", "1", "0", "1", "1", "0", "0", "0", "1"}; for (size_t i = 0; i < 12; ++i) diff --git a/ngraph/test/copy.cpp b/ngraph/test/copy.cpp index 05a23050c3f7b3..80fe6fc6096c03 100644 --- a/ngraph/test/copy.cpp +++ b/ngraph/test/copy.cpp @@ -31,8 +31,8 @@ template bool check_unary() { Shape shape{1}; - auto arg0 = make_shared(element::Type_t::f32, shape); - OutputVector new_args{make_shared(element::Type_t::f32, shape)}; + auto arg0 = make_shared(element::f32, shape); + OutputVector new_args{make_shared(element::f32, shape)}; auto node = make_shared(arg0); auto new_node = node->copy_with_new_inputs(new_args); @@ -44,10 +44,10 @@ template bool check_binary() { Shape shape{1}; - auto arg0 = make_shared(element::Type_t::f32, shape); - auto arg1 = make_shared(element::Type_t::f32, shape); - OutputVector new_args{make_shared(element::Type_t::f32, shape), - make_shared(element::Type_t::f32, shape)}; + auto arg0 = make_shared(element::f32, shape); + auto arg1 = make_shared(element::f32, shape); + OutputVector new_args{make_shared(element::f32, shape), + make_shared(element::f32, shape)}; auto node = make_shared(arg0, arg1); auto new_node = node->copy_with_new_inputs(new_args); @@ -85,16 +85,15 @@ TEST(copy, broadcast) Shape shape{1, 3}; Shape new_shape{4, 1, 3}; AxisSet axes{1, 2}; - auto arg0 = make_shared(element::Type_t::f32, shape); - OutputVector new_args{ - make_shared(element::Type_t::f32, shape), - op::Constant::create(element::Type_t::u64, Shape{new_shape.size()}, new_shape), - op::Constant::create(element::Type_t::i64, Shape{axes.size()}, axes.to_vector())}; + auto arg0 = make_shared(element::f32, shape); + OutputVector new_args{make_shared(element::f32, shape), + op::Constant::create(element::u64, Shape{new_shape.size()}, new_shape), + op::Constant::create(element::i64, Shape{axes.size()}, axes.to_vector())}; auto node = make_shared( arg0, - op::Constant::create(element::Type_t::u64, Shape{new_shape.size()}, new_shape), - op::Constant::create(element::Type_t::i64, Shape{axes.size()}, axes.to_vector())); + op::Constant::create(element::u64, Shape{new_shape.size()}, new_shape), + op::Constant::create(element::i64, Shape{axes.size()}, axes.to_vector())); auto new_node = node->copy_with_new_inputs(new_args); auto node_cast = as_type_ptr(new_node); ASSERT_NE(node_cast, nullptr); @@ -116,10 +115,10 @@ TEST(copy, ceiling) TEST(copy, concat) { Shape shape{1}; - auto arg0 = make_shared(element::Type_t::f32, shape); - auto arg1 = make_shared(element::Type_t::f32, shape); - OutputVector new_args{make_shared(element::Type_t::f32, shape), - make_shared(element::Type_t::f32, shape)}; + auto arg0 = make_shared(element::f32, shape); + auto arg1 = make_shared(element::f32, shape); + OutputVector new_args{make_shared(element::f32, shape), + make_shared(element::f32, shape)}; size_t axis = 0; auto node = make_shared(NodeVector{arg0, arg1}, axis); auto new_node = node->clone_with_new_inputs(new_args); @@ -135,7 +134,7 @@ TEST(copy, constant) { Shape shape{}; vector c{2.4f}; - element::Type et = element::Type_t::f32; + auto& et = element::f32; auto node = op::Constant::create(et, shape, c); auto new_node = node->clone_with_new_inputs(OutputVector{}); auto node_cast = as_type_ptr(new_node); @@ -150,9 +149,9 @@ TEST(copy, constant) TEST(copy, convert) { Shape shape; - element::Type et = element::Type_t::f64; - auto arg0 = make_shared(element::Type_t::f32, shape); - OutputVector new_args{make_shared(element::Type_t::f32, shape)}; + auto& et = element::f64; + auto arg0 = make_shared(element::f32, shape); + OutputVector new_args{make_shared(element::f32, shape)}; auto node = make_shared(arg0, et); auto new_node = node->clone_with_new_inputs(new_args); @@ -247,7 +246,7 @@ TEST(copy, not_equal) TEST(copy, parameter) { Shape shape{1}; - auto node = make_shared(element::Type_t::f32, shape); + auto node = make_shared(element::f32, shape); auto new_node = node->clone_with_new_inputs({}); auto node_cast = as_type_ptr(new_node); ASSERT_NE(node_cast, nullptr); @@ -266,13 +265,12 @@ TEST(copy, reduce_sum) { Shape shape{4, 3}; AxisSet axes{1}; - auto arg0 = make_shared(element::Type_t::f32, shape); + auto arg0 = make_shared(element::f32, shape); - auto axes_node = op::Constant::create(element::Type_t::i64, {axes.size()}, axes.to_vector()); + auto axes_node = op::Constant::create(element::i64, {axes.size()}, axes.to_vector()); auto node = make_shared(arg0, axes_node, true); - OutputVector new_args{ - make_shared(element::Type_t::f32, shape), - op::Constant::create(element::Type_t::i64, {axes.size()}, axes.to_vector())}; + OutputVector new_args{make_shared(element::f32, shape), + op::Constant::create(element::i64, {axes.size()}, axes.to_vector())}; auto new_node = node->clone_with_new_inputs(new_args); auto node_cast = as_type_ptr(new_node); ASSERT_NE(node_cast, nullptr); @@ -288,12 +286,11 @@ TEST(copy, reshape) Shape shape_in{2, 3, 4}; Shape shape_out{6, 4}; - auto arg0 = make_shared(element::Type_t::f32, shape_in); - OutputVector new_args{ - make_shared(element::Type_t::f32, shape_in), - op::Constant::create(element::Type_t::u64, {shape_out.size()}, shape_out)}; + auto arg0 = make_shared(element::f32, shape_in); + OutputVector new_args{make_shared(element::f32, shape_in), + op::Constant::create(element::u64, {shape_out.size()}, shape_out)}; - auto shape_pattern = op::Constant::create(element::Type_t::u64, {shape_out.size()}, shape_out); + auto shape_pattern = op::Constant::create(element::u64, {shape_out.size()}, shape_out); auto node = make_shared(arg0, shape_pattern, false); auto new_node = node->clone_with_new_inputs(new_args); auto node_cast = as_type_ptr(new_node); @@ -307,12 +304,12 @@ TEST(copy, reshape) TEST(copy, select) { Shape shape{1}; - auto arg0 = make_shared(element::Type_t::boolean, shape); - auto arg1 = make_shared(element::Type_t::f32, shape); - auto arg2 = make_shared(element::Type_t::f32, shape); - OutputVector new_args{make_shared(element::Type_t::boolean, shape), - make_shared(element::Type_t::f32, shape), - make_shared(element::Type_t::f32, shape)}; + auto arg0 = make_shared(element::boolean, shape); + auto arg1 = make_shared(element::f32, shape); + auto arg2 = make_shared(element::f32, shape); + OutputVector new_args{make_shared(element::boolean, shape), + make_shared(element::f32, shape), + make_shared(element::f32, shape)}; auto node = make_shared(arg0, arg1, arg2); auto new_node = node->clone_with_new_inputs(new_args); @@ -345,15 +342,15 @@ TEST(copy, strided_slice) Coordinate upper{2, 3, 4}; Strides strides{1, 1, 1}; - auto arg0 = make_shared(element::Type_t::f32, shape_in); - OutputVector new_args{make_shared(element::Type_t::f32, shape_in), - op::Constant::create(element::Type_t::u64, {lower.size()}, lower), - op::Constant::create(element::Type_t::u64, {upper.size()}, upper), - op::Constant::create(element::Type_t::i64, {strides.size()}, strides)}; + auto arg0 = make_shared(element::f32, shape_in); + OutputVector new_args{make_shared(element::f32, shape_in), + op::Constant::create(element::u64, {lower.size()}, lower), + op::Constant::create(element::u64, {upper.size()}, upper), + op::Constant::create(element::i64, {strides.size()}, strides)}; - auto begin_node = op::Constant::create(element::Type_t::i64, {lower.size()}, lower); - auto end_node = op::Constant::create(element::Type_t::i64, {upper.size()}, upper); - auto strides_node = op::Constant::create(element::Type_t::i64, {strides.size()}, strides); + auto begin_node = op::Constant::create(element::i64, {lower.size()}, lower); + auto end_node = op::Constant::create(element::i64, {upper.size()}, upper); + auto strides_node = op::Constant::create(element::i64, {strides.size()}, strides); auto node = make_shared(arg0, begin_node, end_node, @@ -399,23 +396,23 @@ TEST(copy, tanh) TEST(copy, loop) { // That which we iterate over - auto X = make_shared(element::Type_t::f32, Shape{32, 1, 10}); - auto Y = make_shared(element::Type_t::f32, Shape{32, 1, 10}); - auto M = make_shared(element::Type_t::f32, Shape{32, 1, 10}); + auto X = make_shared(element::f32, Shape{32, 1, 10}); + auto Y = make_shared(element::f32, Shape{32, 1, 10}); + auto M = make_shared(element::f32, Shape{32, 1, 10}); // Set up the cell body, a function from (Xi, Yi) -> (Zo) // Body parameters - auto current_iteration = make_shared(element::Type_t::i64, Shape{}); - auto Xi = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto Yi = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto M_body = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto body_condition = std::make_shared( - ngraph::element::Type_t::boolean, ngraph::Shape{}, true); - - auto trip_count = std::make_shared( - ngraph::element::Type_t::i64, ngraph::Shape{}, 10); - auto exec_condition = std::make_shared( - ngraph::element::Type_t::boolean, ngraph::Shape{}, true); + auto current_iteration = make_shared(element::i64, Shape{}); + auto Xi = make_shared(element::f32, PartialShape::dynamic()); + auto Yi = make_shared(element::f32, PartialShape::dynamic()); + auto M_body = make_shared(element::f32, PartialShape::dynamic()); + auto body_condition = + std::make_shared(ngraph::element::boolean, ngraph::Shape{}, true); + + auto trip_count = + std::make_shared(ngraph::element::i64, ngraph::Shape{}, 10); + auto exec_condition = + std::make_shared(ngraph::element::boolean, ngraph::Shape{}, true); // Body auto sum = make_shared(Xi, Yi); auto Zo = make_shared(sum, M_body); @@ -438,9 +435,9 @@ TEST(copy, loop) auto out2 = loop->get_concatenated_slices(Zo, 0, 1, 1, -1, 1); loop->validate_and_infer_types(); // That which we iterate over - auto X_new = make_shared(element::Type_t::f32, Shape{3, 2, 5}); - auto Y_new = make_shared(element::Type_t::f32, Shape{3, 2, 5}); - auto M_new = make_shared(element::Type_t::f32, Shape{3, 2, 5}); + auto X_new = make_shared(element::f32, Shape{3, 2, 5}); + auto Y_new = make_shared(element::f32, Shape{3, 2, 5}); + auto M_new = make_shared(element::f32, Shape{3, 2, 5}); OutputVector new_args = {trip_count, exec_condition, X_new, Y_new, M_new}; auto loop_copy = loop->clone_with_new_inputs(new_args); diff --git a/ngraph/test/dyn_elimination.cpp b/ngraph/test/dyn_elimination.cpp index dc18dec85b11e2..a3474cabccbeab 100644 --- a/ngraph/test/dyn_elimination.cpp +++ b/ngraph/test/dyn_elimination.cpp @@ -30,10 +30,10 @@ using namespace std; TEST(dyn_elimination, transpose) { Shape shape_in{2, 4, 6, 8}; - auto param = make_shared(element::Type_t::boolean, shape_in); + auto param = make_shared(element::boolean, shape_in); auto constant_perm = - make_shared(element::Type_t::i64, Shape{4}, vector{2, 3, 1, 0}); + make_shared(element::i64, Shape{4}, vector{2, 3, 1, 0}); auto transpose = make_shared(param, constant_perm); @@ -52,7 +52,7 @@ TEST(dyn_elimination, transpose) ASSERT_EQ(new_reshape->get_input_order(), (AxisVector{2, 3, 1, 0})); ASSERT_EQ(new_reshape->get_output_shape(0), (Shape{6, 8, 4, 2})); - ASSERT_EQ(new_reshape->get_output_element_type(0), element::Type_t::boolean); + ASSERT_EQ(new_reshape->get_output_element_type(0), element::boolean); } // For now, we can't handle the case where the input has dynamic shapes, @@ -63,10 +63,10 @@ TEST(dyn_elimination, transpose_dyn_shape) { PartialShape shape_in{2, 4, Dimension::dynamic(), 8}; - auto param = make_shared(element::Type_t::boolean, shape_in); + auto param = make_shared(element::boolean, shape_in); auto constant_perm = - make_shared(element::Type_t::i64, Shape{4}, vector{2, 3, 1, 0}); + make_shared(element::i64, Shape{4}, vector{2, 3, 1, 0}); auto transpose = make_shared(param, constant_perm); @@ -83,23 +83,20 @@ TEST(dyn_elimination, transpose_dyn_shape) as_type_ptr(f->get_results().at(0)->input_value(0).get_node_shared_ptr()); ASSERT_TRUE(new_transpose); - ASSERT_EQ(new_transpose->get_output_element_type(0), element::Type_t::boolean); + ASSERT_EQ(new_transpose->get_output_element_type(0), element::boolean); ASSERT_TRUE(new_transpose->get_output_partial_shape(0).relaxes( PartialShape{Dimension::dynamic(), 8, 4, 2})); } TEST(dyn_elimination, range) { - auto constant_start = - make_shared(element::Type_t::i64, Shape{}, vector{0}); - auto constant_stop = - make_shared(element::Type_t::i64, Shape{}, vector{5}); - auto constant_step = - make_shared(element::Type_t::i64, Shape{}, vector{2}); + auto constant_start = make_shared(element::i64, Shape{}, vector{0}); + auto constant_stop = make_shared(element::i64, Shape{}, vector{5}); + auto constant_step = make_shared(element::i64, Shape{}, vector{2}); auto range = make_shared(constant_start, constant_stop, constant_step); - ASSERT_EQ(range->get_element_type(), element::Type_t::i64); + ASSERT_EQ(range->get_element_type(), element::i64); ASSERT_EQ(range->get_shape(), (Shape{3})); auto f = make_shared(range, ParameterVector{}); @@ -115,7 +112,7 @@ TEST(dyn_elimination, range) as_type_ptr(f->get_results().at(0)->input_value(0).get_node_shared_ptr()); ASSERT_NE(replacement, nullptr); - ASSERT_EQ(replacement->get_element_type(), element::Type_t::i64); + ASSERT_EQ(replacement->get_element_type(), element::i64); ASSERT_EQ(replacement->get_shape(), (Shape{3})); auto vals = replacement->get_vector(); @@ -125,16 +122,13 @@ TEST(dyn_elimination, range) TEST(dyn_elimination, range_f64) { - auto constant_start = - make_shared(element::Type_t::f64, Shape{}, vector{-0.5}); - auto constant_stop = - make_shared(element::Type_t::f64, Shape{}, vector{2}); - auto constant_step = - make_shared(element::Type_t::f64, Shape{}, vector{0.25}); + auto constant_start = make_shared(element::f64, Shape{}, vector{-0.5}); + auto constant_stop = make_shared(element::f64, Shape{}, vector{2}); + auto constant_step = make_shared(element::f64, Shape{}, vector{0.25}); auto range = make_shared(constant_start, constant_stop, constant_step); - ASSERT_EQ(range->get_element_type(), element::Type_t::f64); + ASSERT_EQ(range->get_element_type(), element::f64); ASSERT_EQ(range->get_shape(), (Shape{10})); auto f = make_shared(range, ParameterVector{}); @@ -150,7 +144,7 @@ TEST(dyn_elimination, range_f64) as_type_ptr(f->get_results().at(0)->input_value(0).get_node_shared_ptr()); ASSERT_NE(replacement, nullptr); - ASSERT_EQ(replacement->get_element_type(), element::Type_t::f64); + ASSERT_EQ(replacement->get_element_type(), element::f64); ASSERT_EQ(replacement->get_shape(), (Shape{10})); auto vals = replacement->get_vector(); diff --git a/ngraph/test/element_type.cpp b/ngraph/test/element_type.cpp index 767a2939887641..625679f553ee31 100644 --- a/ngraph/test/element_type.cpp +++ b/ngraph/test/element_type.cpp @@ -24,62 +24,62 @@ using namespace ngraph; TEST(element_type, from) { - EXPECT_EQ(element::from(), element::Type_t::boolean); - EXPECT_EQ(element::from(), element::Type_t::boolean); - EXPECT_EQ(element::from(), element::Type_t::f32); - EXPECT_EQ(element::from(), element::Type_t::f64); - EXPECT_EQ(element::from(), element::Type_t::i8); - EXPECT_EQ(element::from(), element::Type_t::i16); - EXPECT_EQ(element::from(), element::Type_t::i32); - EXPECT_EQ(element::from(), element::Type_t::i64); - EXPECT_EQ(element::from(), element::Type_t::u8); - EXPECT_EQ(element::from(), element::Type_t::u16); - EXPECT_EQ(element::from(), element::Type_t::u32); - EXPECT_EQ(element::from(), element::Type_t::u64); + EXPECT_EQ(element::from(), element::boolean); + EXPECT_EQ(element::from(), element::boolean); + EXPECT_EQ(element::from(), element::f32); + EXPECT_EQ(element::from(), element::f64); + EXPECT_EQ(element::from(), element::i8); + EXPECT_EQ(element::from(), element::i16); + EXPECT_EQ(element::from(), element::i32); + EXPECT_EQ(element::from(), element::i64); + EXPECT_EQ(element::from(), element::u8); + EXPECT_EQ(element::from(), element::u16); + EXPECT_EQ(element::from(), element::u32); + EXPECT_EQ(element::from(), element::u64); } TEST(element_type, mapable) { std::map test_map; - test_map.insert({element::Type_t::f32, "float"}); + test_map.insert({element::f32, "float"}); } TEST(element_type, merge_both_dynamic) { element::Type t; - ASSERT_TRUE(element::Type::merge(t, element::Type_t::dynamic, element::Type_t::dynamic)); + ASSERT_TRUE(element::Type::merge(t, element::dynamic, element::dynamic)); ASSERT_TRUE(t.is_dynamic()); } TEST(element_type, merge_left_dynamic) { element::Type t; - ASSERT_TRUE(element::Type::merge(t, element::Type_t::dynamic, element::Type_t::u64)); + ASSERT_TRUE(element::Type::merge(t, element::dynamic, element::u64)); ASSERT_TRUE(t.is_static()); - ASSERT_EQ(t, element::Type_t::u64); + ASSERT_EQ(t, element::u64); } TEST(element_type, merge_right_dynamic) { element::Type t; - ASSERT_TRUE(element::Type::merge(t, element::Type_t::i16, element::Type_t::dynamic)); + ASSERT_TRUE(element::Type::merge(t, element::i16, element::dynamic)); ASSERT_TRUE(t.is_static()); - ASSERT_EQ(t, element::Type_t::i16); + ASSERT_EQ(t, element::i16); } TEST(element_type, merge_both_static_equal) { element::Type t; - ASSERT_TRUE(element::Type::merge(t, element::Type_t::f64, element::Type_t::f64)); + ASSERT_TRUE(element::Type::merge(t, element::f64, element::f64)); ASSERT_TRUE(t.is_static()); - ASSERT_EQ(t, element::Type_t::f64); + ASSERT_EQ(t, element::f64); } TEST(element_type, merge_both_static_unequal) { - element::Type t = element::Type_t::f32; - ASSERT_FALSE(element::Type::merge(t, element::Type_t::i8, element::Type_t::i16)); + element::Type t = element::f32; + ASSERT_FALSE(element::Type::merge(t, element::i8, element::i16)); ASSERT_TRUE(t.is_static()); - ASSERT_EQ(t, element::Type_t::f32); + ASSERT_EQ(t, element::f32); } diff --git a/ngraph/test/eval.cpp b/ngraph/test/eval.cpp index 1fed4473ac16ba..3e8a9eb079f84d 100644 --- a/ngraph/test/eval.cpp +++ b/ngraph/test/eval.cpp @@ -88,7 +88,7 @@ using namespace ngraph; TEST(eval, bad_get_data_ptr) { - HostTensor c(element::Type_t::f32, Shape{}); + HostTensor c(element::f32, Shape{}); *c.get_data_ptr() = 1.0; EXPECT_EQ(*c.get_data_ptr(), 1.0); try @@ -113,7 +113,7 @@ TEST(eval, bad_get_data_ptr) TEST(eval, max_eval_parameter) { - auto p = make_shared(element::Type_t::i64, Shape{}); + auto p = make_shared(element::i64, Shape{}); auto result = maximum_value(p); EXPECT_FALSE(result.first); @@ -122,7 +122,7 @@ TEST(eval, max_eval_parameter) TEST(eval, max_eval_constant) { - auto c = op::Constant::create(element::Type_t::i64, Shape{}, {27}); + auto c = op::Constant::create(element::i64, Shape{}, {27}); auto result = maximum_value(c); ASSERT_TRUE(result.first); EXPECT_EQ(result.second, 27); @@ -130,8 +130,8 @@ TEST(eval, max_eval_constant) TEST(eval, max_eval_minimum_constant) { - auto c = op::Constant::create(element::Type_t::i64, Shape{}, {27}); - auto p = make_shared(element::Type_t::i64, Shape{}); + auto c = op::Constant::create(element::i64, Shape{}, {27}); + auto p = make_shared(element::i64, Shape{}); auto m = make_shared(c, p); auto result = maximum_value(m); ASSERT_TRUE(result.first); @@ -142,31 +142,31 @@ TEST(eval, max_eval_reduce_min) { auto concat = make_shared( make_shared( - OutputVector{make_shared(element::Type_t::i64, Shape{4}), - make_shared(element::Type_t::i64, Shape{4}, 37)}, + OutputVector{make_shared(element::i64, Shape{4}), + make_shared(element::i64, Shape{4}, 37)}, 0), - element::Type_t::i32); + element::i32); auto reduce = make_shared( - make_shared( - concat, make_shared(element::Type_t::i32, Shape{1}, 0)), - element::Type_t::i64); + make_shared(concat, + make_shared(element::i32, Shape{1}, 0)), + element::i64); auto squeezes = make_shared( - make_shared( - reduce, make_shared(element::Type_t::i32, Shape{1}, 0)), - make_shared(element::Type_t::i64, Shape{1}, 0)); + make_shared(reduce, + make_shared(element::i32, Shape{1}, 0)), + make_shared(element::i64, Shape{1}, 0)); EXPECT_EQ(maximum_value(squeezes).second, 37); } TEST(eval, evaluate_shape_of) { - auto p = make_shared(element::Type_t::f32, PartialShape{-1, -1}); + auto p = make_shared(element::f32, PartialShape{-1, -1}); auto so = make_shared(p); auto fun = make_shared(OutputVector{so}, ParameterVector{p}); auto result = make_shared(); ASSERT_TRUE(fun->evaluate({result}, {make_host_tensor( Shape{2, 3}, {0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::i64); + EXPECT_EQ(result->get_element_type(), element::i64); EXPECT_EQ(result->get_partial_shape(), (PartialShape{2})); auto result_shape = read_vector(result); vector arg_shape{2, 3}; @@ -175,10 +175,10 @@ TEST(eval, evaluate_shape_of) TEST(eval, evaluate_dynamic_range_sum) { - auto p_start = make_shared(element::Type_t::f32, PartialShape{}); - auto p_stop = make_shared(element::Type_t::f32, PartialShape{}); - auto p_step = make_shared(element::Type_t::f32, PartialShape{}); - auto p1 = make_shared(element::Type_t::f32, PartialShape{}); + auto p_start = make_shared(element::f32, PartialShape{}); + auto p_stop = make_shared(element::f32, PartialShape{}); + auto p_step = make_shared(element::f32, PartialShape{}); + auto p1 = make_shared(element::f32, PartialShape{}); auto range = make_shared(p_start, p_stop, p_step); auto add = make_shared(range, p1); auto fun = @@ -189,7 +189,7 @@ TEST(eval, evaluate_dynamic_range_sum) make_host_tensor({}, {10.0f}), make_host_tensor({}, {3.0f}), make_host_tensor({}, {7.0f})})); - EXPECT_EQ(result_tensor->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result_tensor->get_element_type(), element::f32); EXPECT_EQ(result_tensor->get_partial_shape(), (PartialShape{3})); auto cval = read_vector(result_tensor); vector seq{8.0f, 11.0f, 14.0f}; @@ -199,27 +199,27 @@ TEST(eval, evaluate_dynamic_range_sum) #ifdef NGRAPH_INTERPRETER_ENABLE TEST(eval, interpret_dynamic_range_sum) { - auto p_start = make_shared(element::Type_t::f32, PartialShape{}); - auto p_stop = make_shared(element::Type_t::f32, PartialShape{}); - auto p_step = make_shared(element::Type_t::f32, PartialShape{}); - auto p1 = make_shared(element::Type_t::f32, PartialShape{}); + auto p_start = make_shared(element::f32, PartialShape{}); + auto p_stop = make_shared(element::f32, PartialShape{}); + auto p_step = make_shared(element::f32, PartialShape{}); + auto p1 = make_shared(element::f32, PartialShape{}); auto range = make_shared(p_start, p_stop, p_step); auto add = make_shared(range, p1); auto fun = make_shared(OutputVector{add}, ParameterVector{p_start, p_stop, p_step, p1}); auto backend = runtime::Backend::create("INTERPRETER"); - auto p_start_val = backend->create_tensor(element::Type_t::f32, Shape{}); + auto p_start_val = backend->create_tensor(element::f32, Shape{}); copy_data(p_start_val, vector{1.0f}); - auto p_stop_val = backend->create_tensor(element::Type_t::f32, Shape{}); + auto p_stop_val = backend->create_tensor(element::f32, Shape{}); copy_data(p_stop_val, vector{10.0f}); - auto p_step_val = backend->create_tensor(element::Type_t::f32, Shape{}); + auto p_step_val = backend->create_tensor(element::f32, Shape{}); copy_data(p_step_val, vector{3.0f}); - auto p1_val = backend->create_tensor(element::Type_t::f32, Shape{}); + auto p1_val = backend->create_tensor(element::f32, Shape{}); copy_data(p1_val, vector{7.0f}); auto result = backend->create_tensor(); auto cfun = backend->compile(fun); cfun->call({result}, {p_start_val, p_stop_val, p_step_val, p1_val}); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_partial_shape(), (PartialShape{3})); auto result_val = read_vector(result); vector seq{8.0f, 11.0f, 14.0f}; @@ -230,8 +230,8 @@ TEST(eval, interpret_dynamic_range_sum) TEST(eval, evaluate_broadcast_v3_bidirectional) { Shape shape_a{4, 1}; - auto A = make_shared(element::Type_t::f32, shape_a); - auto target_shape = op::Constant::create(element::Type_t::i32, Shape{3}, {2, 1, 4}); + auto A = make_shared(element::f32, shape_a); + auto target_shape = op::Constant::create(element::i32, Shape{3}, {2, 1, 4}); auto bcast_v3 = make_shared(A, target_shape, op::BroadcastType::BIDIRECTIONAL); auto fun = make_shared(OutputVector{bcast_v3}, ParameterVector{A}); @@ -239,7 +239,7 @@ TEST(eval, evaluate_broadcast_v3_bidirectional) auto result = make_shared(); ASSERT_TRUE(fun->evaluate( {result}, {make_host_tensor(Shape{4, 1}, {1.0f, 2.0f, 3.0f, 4.0f})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_partial_shape(), (PartialShape{2, 4, 4})); auto result_val = read_vector(result); vector expec{1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, @@ -250,15 +250,15 @@ TEST(eval, evaluate_broadcast_v3_bidirectional) TEST(eval, evaluate_broadcast_v3_bidirectional_target_rank_smaller_than_input) { Shape shape_a{1, 1, 1, 1, 1, 1, 1, 1}; - auto A = make_shared(element::Type_t::f32, shape_a); - auto target_shape = op::Constant::create(element::Type_t::i64, Shape{4}, {1, 3, 1, 1}); + auto A = make_shared(element::f32, shape_a); + auto target_shape = op::Constant::create(element::i64, Shape{4}, {1, 3, 1, 1}); auto bcast_v3 = make_shared(A, target_shape, op::BroadcastType::BIDIRECTIONAL); auto fun = make_shared(OutputVector{bcast_v3}, ParameterVector{A}); auto result = make_shared(); ASSERT_TRUE(fun->evaluate({result}, {make_host_tensor(shape_a, {1.0f})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_partial_shape(), (PartialShape{1, 1, 1, 1, 1, 3, 1, 1})); auto result_val = read_vector(result); vector expec{1.0f, 1.0f, 1.0f}; @@ -268,8 +268,8 @@ TEST(eval, evaluate_broadcast_v3_bidirectional_target_rank_smaller_than_input) TEST(eval, evaluate_broadcast_v3_bidirectional_target_rank_smaller_than_input_2) { Shape shape_a{1, 3, 1}; - auto A = make_shared(element::Type_t::f32, shape_a); - auto target_shape = op::Constant::create(element::Type_t::i32, Shape{2}, {3, 1}); + auto A = make_shared(element::f32, shape_a); + auto target_shape = op::Constant::create(element::i32, Shape{2}, {3, 1}); auto bcast_v3 = make_shared(A, target_shape, op::BroadcastType::BIDIRECTIONAL); auto fun = make_shared(OutputVector{bcast_v3}, ParameterVector{A}); @@ -277,7 +277,7 @@ TEST(eval, evaluate_broadcast_v3_bidirectional_target_rank_smaller_than_input_2) auto result = make_shared(); ASSERT_TRUE(fun->evaluate( {result}, {make_host_tensor(Shape{1, 3, 1}, {1.0f, 2.0f, 3.0f})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_partial_shape(), (PartialShape{1, 3, 1})); auto result_val = read_vector(result); vector expec{1.0f, 2.0f, 3.0f}; @@ -287,8 +287,8 @@ TEST(eval, evaluate_broadcast_v3_bidirectional_target_rank_smaller_than_input_2) TEST(eval, evaluate_broadcast_v3_bidirectional_dyn) { Shape shape_a{4, 1}; - auto A = make_shared(element::Type_t::i32, shape_a); - auto target_shape = make_shared(element::Type_t::i32, Shape{3}); + auto A = make_shared(element::i32, shape_a); + auto target_shape = make_shared(element::i32, Shape{3}); auto bcast_v3 = make_shared(A, target_shape, op::BroadcastType::BIDIRECTIONAL); auto fun = make_shared(OutputVector{bcast_v3}, ParameterVector{A, target_shape}); @@ -297,7 +297,7 @@ TEST(eval, evaluate_broadcast_v3_bidirectional_dyn) ASSERT_TRUE(fun->evaluate({result}, {make_host_tensor(Shape{4, 1}, {1, 2, 3, 4}), make_host_tensor(Shape{3}, {2, 1, 4})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::i32); + EXPECT_EQ(result->get_element_type(), element::i32); EXPECT_EQ(result->get_partial_shape(), (PartialShape{2, 4, 4})); auto result_val = read_vector(result); vector expec{1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, @@ -308,15 +308,15 @@ TEST(eval, evaluate_broadcast_v3_bidirectional_dyn) TEST(eval, evaluate_broadcast_v3_numpy) { Shape shape_a{3, 1}; - auto A = make_shared(element::Type_t::f32, shape_a); - auto target_shape = op::Constant::create(element::Type_t::i64, Shape{3}, {2, 3, 6}); + auto A = make_shared(element::f32, shape_a); + auto target_shape = op::Constant::create(element::i64, Shape{3}, {2, 3, 6}); auto bcast_v3 = make_shared(A, target_shape); auto fun = make_shared(OutputVector{bcast_v3}, ParameterVector{A}); auto result = make_shared(); ASSERT_TRUE(fun->evaluate( {result}, {make_host_tensor(Shape{3, 1}, {1.0f, 2.0f, 3.0f})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_partial_shape(), (PartialShape{2, 3, 6})); auto result_val = read_vector(result); vector expec{ @@ -329,8 +329,8 @@ TEST(eval, evaluate_broadcast_v3_numpy) TEST(eval, evaluate_broadcast_v3_numpy_dyn) { Shape shape_a{3, 1}; - auto A = make_shared(element::Type_t::f32, shape_a); - auto target_shape = make_shared(element::Type_t::i32, Shape{3}); + auto A = make_shared(element::f32, shape_a); + auto target_shape = make_shared(element::i32, Shape{3}); auto bcast_v3 = make_shared(A, target_shape); auto fun = make_shared(OutputVector{bcast_v3}, ParameterVector{A, target_shape}); @@ -339,7 +339,7 @@ TEST(eval, evaluate_broadcast_v3_numpy_dyn) fun->evaluate({result}, {make_host_tensor(Shape{3, 1}, {1.0f, 2.0f, 3.0f}), make_host_tensor(Shape{3}, {2, 3, 6})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_partial_shape(), (PartialShape{2, 3, 6})); auto result_val = read_vector(result); vector expec{ @@ -353,21 +353,21 @@ TEST(eval, evaluate_broadcast_v3_numpy_vs_bidi) { Shape in_shape{1, 4, 1}; - auto A = make_shared(element::Type_t::f32, in_shape); - auto target_shape = op::Constant::create(element::Type_t::i64, Shape{3}, {1, 4, 4}); + auto A = make_shared(element::f32, in_shape); + auto target_shape = op::Constant::create(element::i64, Shape{3}, {1, 4, 4}); auto bcast_v3_num = make_shared(A, target_shape, op::BroadcastType::NUMPY); auto fun_num = make_shared(OutputVector{bcast_v3_num}, ParameterVector{A}); auto result = make_shared(); ASSERT_TRUE(fun_num->evaluate( {result}, {make_host_tensor(in_shape, {1.0f, 2.0f, 3.0f, 4.0f})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_partial_shape(), (PartialShape{1, 4, 4})); auto result_val = read_vector(result); vector expec{1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4}; ASSERT_EQ(expec, result_val); - auto target_shape2 = op::Constant::create(element::Type_t::i64, Shape{2}, {1, 4}); + auto target_shape2 = op::Constant::create(element::i64, Shape{2}, {1, 4}); auto bcast_v3 = make_shared(A, target_shape2, op::BroadcastType::BIDIRECTIONAL); auto fun_bidi = make_shared(OutputVector{bcast_v3_num}, ParameterVector{A}); @@ -375,7 +375,7 @@ TEST(eval, evaluate_broadcast_v3_numpy_vs_bidi) auto result2 = make_shared(); ASSERT_TRUE(fun_bidi->evaluate( {result2}, {make_host_tensor(in_shape, {1.0f, 2.0f, 3.0f, 4.0f})})); - EXPECT_EQ(result2->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result2->get_element_type(), element::f32); EXPECT_EQ(result2->get_partial_shape(), (PartialShape{1, 4, 4})); auto result_val2 = read_vector(result2); vector expec2{1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4}; @@ -386,8 +386,8 @@ TEST(eval, evaluate_broadcast_v3_bidi_3d) { Shape in_shape{1, 4, 1}; - auto A = make_shared(element::Type_t::f32, in_shape); - auto target_shape = op::Constant::create(element::Type_t::i64, Shape{3}, {1, 1, 3}); + auto A = make_shared(element::f32, in_shape); + auto target_shape = op::Constant::create(element::i64, Shape{3}, {1, 1, 3}); auto bcast_v3_num = make_shared(A, target_shape, op::BroadcastType::BIDIRECTIONAL); auto fun_num = make_shared(OutputVector{bcast_v3_num}, ParameterVector{A}); @@ -395,7 +395,7 @@ TEST(eval, evaluate_broadcast_v3_bidi_3d) auto result = make_shared(); ASSERT_TRUE(fun_num->evaluate( {result}, {make_host_tensor(in_shape, {1.0f, 2.0f, 3.0f, 4.0f})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_partial_shape(), (PartialShape{1, 4, 3})); auto result_val = read_vector(result); vector expec{1.0f, 1.0f, 1.0f, 2.0f, 2.0f, 2.0f, 3.0f, 3.0f, 3.0f, 4.0f, 4.0f, 4.0f}; @@ -407,8 +407,8 @@ TEST(eval, evaluate_broadcast_v3_bidi_4d) Shape in_shape{4, 1, 1}; Shape expec_shape{1, 4, 2, 2}; - auto A = make_shared(element::Type_t::f32, in_shape); - auto target_shape = op::Constant::create(element::Type_t::i64, Shape{4}, {1, 1, 2, 2}); + auto A = make_shared(element::f32, in_shape); + auto target_shape = op::Constant::create(element::i64, Shape{4}, {1, 1, 2, 2}); auto bcast_v3 = make_shared(A, target_shape, op::BroadcastType::BIDIRECTIONAL); auto fun = make_shared(OutputVector{bcast_v3}, ParameterVector{A}); @@ -416,7 +416,7 @@ TEST(eval, evaluate_broadcast_v3_bidi_4d) auto result = make_shared(); ASSERT_TRUE(fun->evaluate( {result}, {make_host_tensor(in_shape, {1.0f, 2.0f, 3.0f, 4.0f})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_partial_shape(), (PartialShape{1, 4, 2, 2})); auto result_val = read_vector(result); vector expec{1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4}; @@ -426,8 +426,8 @@ TEST(eval, evaluate_broadcast_v3_bidi_4d) TEST(eval, evaluate_broadcast_v3_pdpd) { Shape shape_a{3, 1}; - auto A = make_shared(element::Type_t::f32, shape_a); - auto target_shape = op::Constant::create(element::Type_t::i64, Shape{3}, {2, 3, 6}); + auto A = make_shared(element::f32, shape_a); + auto target_shape = op::Constant::create(element::i64, Shape{3}, {2, 3, 6}); auto bcast_v3 = make_shared( A, target_shape, op::BroadcastModeSpec(op::BroadcastType::PDPD, 1)); auto fun = make_shared(OutputVector{bcast_v3}, ParameterVector{A}); @@ -435,7 +435,7 @@ TEST(eval, evaluate_broadcast_v3_pdpd) auto result = make_shared(); ASSERT_TRUE(fun->evaluate( {result}, {make_host_tensor(Shape{3, 1}, {1.0f, 2.0f, 3.0f})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_partial_shape(), (PartialShape{2, 3, 6})); auto result_val = read_vector(result); vector expec{ @@ -448,8 +448,8 @@ TEST(eval, evaluate_broadcast_v3_pdpd) TEST(eval, evaluate_broadcast_v3_pdpd_dyn) { Shape shape_a{3, 1}; - auto A = make_shared(element::Type_t::f32, shape_a); - auto target_shape = make_shared(element::Type_t::i32, Shape{3}); + auto A = make_shared(element::f32, shape_a); + auto target_shape = make_shared(element::i32, Shape{3}); auto bcast_v3 = make_shared( A, target_shape, op::BroadcastModeSpec(op::BroadcastType::PDPD, 1)); auto fun = make_shared(OutputVector{bcast_v3}, ParameterVector{A, target_shape}); @@ -459,7 +459,7 @@ TEST(eval, evaluate_broadcast_v3_pdpd_dyn) fun->evaluate({result}, {make_host_tensor(Shape{3, 1}, {1.0f, 2.0f, 3.0f}), make_host_tensor(Shape{3}, {2, 3, 6})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_partial_shape(), (PartialShape{2, 3, 6})); auto result_val = read_vector(result); vector expec{ @@ -472,15 +472,15 @@ TEST(eval, evaluate_broadcast_v3_pdpd_dyn) TEST(eval, evaluate_broadcast_v1_numpy) { Shape shape_a{3, 1}; - auto A = make_shared(element::Type_t::f32, shape_a); - auto target_shape = op::Constant::create(element::Type_t::i64, Shape{3}, {2, 3, 6}); + auto A = make_shared(element::f32, shape_a); + auto target_shape = op::Constant::create(element::i64, Shape{3}, {2, 3, 6}); auto bcast_v3 = make_shared(A, target_shape); auto fun = make_shared(OutputVector{bcast_v3}, ParameterVector{A}); auto result = make_shared(); ASSERT_TRUE(fun->evaluate( {result}, {make_host_tensor(Shape{3, 1}, {1.0f, 2.0f, 3.0f})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_partial_shape(), (PartialShape{2, 3, 6})); auto result_val = read_vector(result); vector expec{ @@ -493,8 +493,8 @@ TEST(eval, evaluate_broadcast_v1_numpy) TEST(eval, evaluate_broadcast_v1_numpy_dyn) { Shape shape_a{3, 1}; - auto A = make_shared(element::Type_t::f32, shape_a); - auto target_shape = make_shared(element::Type_t::i64, Shape{3}); + auto A = make_shared(element::f32, shape_a); + auto target_shape = make_shared(element::i64, Shape{3}); auto bcast_v3 = make_shared(A, target_shape); auto fun = make_shared(OutputVector{bcast_v3}, ParameterVector{A, target_shape}); @@ -503,7 +503,7 @@ TEST(eval, evaluate_broadcast_v1_numpy_dyn) fun->evaluate({result}, {make_host_tensor(Shape{3, 1}, {1.0f, 2.0f, 3.0f}), make_host_tensor(Shape{3}, {2, 3, 6})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_partial_shape(), (PartialShape{2, 3, 6})); auto result_val = read_vector(result); vector expec{ @@ -516,8 +516,8 @@ TEST(eval, evaluate_broadcast_v1_numpy_dyn) TEST(eval, evaluate_broadcast_v1_pdpd) { Shape shape_a{3, 1}; - auto A = make_shared(element::Type_t::f32, shape_a); - auto target_shape = op::Constant::create(element::Type_t::i64, Shape{3}, {2, 3, 6}); + auto A = make_shared(element::f32, shape_a); + auto target_shape = op::Constant::create(element::i64, Shape{3}, {2, 3, 6}); auto bcast_v3 = make_shared( A, target_shape, op::AutoBroadcastSpec(op::AutoBroadcastType::PDPD, 1)); auto fun = make_shared(OutputVector{bcast_v3}, ParameterVector{A}); @@ -525,7 +525,7 @@ TEST(eval, evaluate_broadcast_v1_pdpd) auto result = make_shared(); ASSERT_TRUE(fun->evaluate( {result}, {make_host_tensor(Shape{3, 1}, {1.0f, 2.0f, 3.0f})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_partial_shape(), (PartialShape{2, 3, 6})); auto result_val = read_vector(result); vector expec{ @@ -538,8 +538,8 @@ TEST(eval, evaluate_broadcast_v1_pdpd) TEST(eval, evaluate_broadcast_v1_pdpd_dyn) { Shape shape_a{3, 1}; - auto A = make_shared(element::Type_t::f32, shape_a); - auto target_shape = make_shared(element::Type_t::i64, Shape{3}); + auto A = make_shared(element::f32, shape_a); + auto target_shape = make_shared(element::i64, Shape{3}); auto bcast_v3 = make_shared( A, target_shape, op::AutoBroadcastSpec(op::AutoBroadcastType::PDPD, 1)); auto fun = make_shared(OutputVector{bcast_v3}, ParameterVector{A, target_shape}); @@ -549,7 +549,7 @@ TEST(eval, evaluate_broadcast_v1_pdpd_dyn) fun->evaluate({result}, {make_host_tensor(Shape{3, 1}, {1.0f, 2.0f, 3.0f}), make_host_tensor(Shape{3}, {2, 3, 6})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_partial_shape(), (PartialShape{2, 3, 6})); auto result_val = read_vector(result); vector expec{ @@ -562,9 +562,9 @@ TEST(eval, evaluate_broadcast_v1_pdpd_dyn) TEST(eval, evaluate_broadcast_v1_explicit) { Shape shape_a{3, 1}; - auto A = make_shared(element::Type_t::f32, shape_a); - auto target_shape = op::Constant::create(element::Type_t::i64, Shape{3}, {2, 3, 1}); - auto axes_mapping = op::Constant::create(element::Type_t::i32, Shape{2}, {1, 2}); + auto A = make_shared(element::f32, shape_a); + auto target_shape = op::Constant::create(element::i64, Shape{3}, {2, 3, 1}); + auto axes_mapping = op::Constant::create(element::i32, Shape{2}, {1, 2}); auto bcast_v3 = make_shared( A, target_shape, axes_mapping, op::AutoBroadcastSpec(op::AutoBroadcastType::EXPLICIT)); auto fun = make_shared(OutputVector{bcast_v3}, ParameterVector{A}); @@ -572,7 +572,7 @@ TEST(eval, evaluate_broadcast_v1_explicit) auto result = make_shared(); ASSERT_TRUE(fun->evaluate( {result}, {make_host_tensor(Shape{3, 1}, {1.0f, 2.0f, 3.0f})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_partial_shape(), (PartialShape{2, 3, 1})); auto result_val = read_vector(result); vector expec{1, 2, 3, 1, 2, 3}; @@ -582,9 +582,9 @@ TEST(eval, evaluate_broadcast_v1_explicit) TEST(eval, evaluate_broadcast_v1_explicit_dyn) { Shape shape_a{3, 1}; - auto A = make_shared(element::Type_t::f32, shape_a); - auto target_shape = make_shared(element::Type_t::i64, Shape{3}); - auto axes_mapping = make_shared(element::Type_t::i32, Shape{2}); + auto A = make_shared(element::f32, shape_a); + auto target_shape = make_shared(element::i64, Shape{3}); + auto axes_mapping = make_shared(element::i32, Shape{2}); auto bcast_v1 = make_shared( A, target_shape, axes_mapping, op::AutoBroadcastSpec(op::AutoBroadcastType::EXPLICIT)); @@ -597,7 +597,7 @@ TEST(eval, evaluate_broadcast_v1_explicit_dyn) {make_host_tensor(Shape{3, 1}, {1.0f, 2.0f, 3.0f}), make_host_tensor(Shape{3}, {2, 3, 1}), make_host_tensor(Shape{2}, {1, 2})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_partial_shape(), (PartialShape{2, 3, 1})); auto result_val = read_vector(result); vector expec{1, 2, 3, 1, 2, 3}; @@ -607,9 +607,9 @@ TEST(eval, evaluate_broadcast_v1_explicit_dyn) TEST(eval, evaluate_broadcast_v3_explicit_dyn) { Shape shape_a{3, 1}; - auto A = make_shared(element::Type_t::f32, shape_a); - auto target_shape = make_shared(element::Type_t::i64, Shape{3}); - auto axes_mapping = make_shared(element::Type_t::i32, Shape{2}); + auto A = make_shared(element::f32, shape_a); + auto target_shape = make_shared(element::i64, Shape{3}); + auto axes_mapping = make_shared(element::i32, Shape{2}); auto bcast_v3 = make_shared( A, target_shape, axes_mapping, op::BroadcastModeSpec(op::BroadcastType::EXPLICIT)); @@ -622,7 +622,7 @@ TEST(eval, evaluate_broadcast_v3_explicit_dyn) {make_host_tensor(Shape{3, 1}, {1.0f, 2.0f, 3.0f}), make_host_tensor(Shape{3}, {2, 3, 1}), make_host_tensor(Shape{2}, {1, 2})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_partial_shape(), (PartialShape{2, 3, 1})); auto result_val = read_vector(result); vector expec{1, 2, 3, 1, 2, 3}; @@ -631,8 +631,8 @@ TEST(eval, evaluate_broadcast_v3_explicit_dyn) TEST(eval, test_op_multi_out) { - auto p = make_shared(element::Type_t::f32, PartialShape{2, 3}); - auto p2 = make_shared(element::Type_t::f64, PartialShape{2, 2}); + auto p = make_shared(element::f32, PartialShape{2, 3}); + auto p2 = make_shared(element::f64, PartialShape{2, 2}); auto so = make_shared(p, p2); auto fun = make_shared(OutputVector{so->output(0), so->output(1)}, ParameterVector{p, p2}); @@ -641,12 +641,12 @@ TEST(eval, test_op_multi_out) HostTensorVector ins{make_host_tensor(Shape{2, 3}), make_host_tensor(Shape{2, 2})}; ASSERT_TRUE(fun->evaluate({result, result2}, ins)); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_partial_shape(), (PartialShape{2, 3})); auto result_val = read_vector(result); auto arg_val = read_vector(ins[0]); ASSERT_EQ(result_val, arg_val); - EXPECT_EQ(result2->get_element_type(), element::Type_t::f64); + EXPECT_EQ(result2->get_element_type(), element::f64); EXPECT_EQ(result2->get_partial_shape(), (PartialShape{2, 2})); auto result_val2 = read_vector(result2); auto arg_val2 = read_vector(ins[1]); @@ -655,8 +655,8 @@ TEST(eval, test_op_multi_out) TEST(eval, evaluate_reshape_v1) { - auto data = make_shared(element::Type_t::f32, Shape{2, 5}); - auto pattern = make_shared(element::Type_t::i64, Shape{2}); + auto data = make_shared(element::f32, Shape{2, 5}); + auto pattern = make_shared(element::i64, Shape{2}); auto dyn_reshape = make_shared(data, pattern, false); auto func = make_shared(OutputVector{dyn_reshape}, ParameterVector{data, pattern}); auto result_tensor = make_shared(); @@ -664,7 +664,7 @@ TEST(eval, evaluate_reshape_v1) {result_tensor}, {make_host_tensor({2, 5}, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}), make_host_tensor({2}, {5, 2})})); - EXPECT_EQ(result_tensor->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result_tensor->get_element_type(), element::f32); EXPECT_EQ(result_tensor->get_partial_shape(), (PartialShape{5, 2})); auto computed_val = read_vector(result_tensor); vector expected_val{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; @@ -673,8 +673,8 @@ TEST(eval, evaluate_reshape_v1) TEST(eval, evaluate_reshape_v1_negative_index) { - auto data = make_shared(element::Type_t::f32, Shape{2, 5}); - auto pattern = make_shared(element::Type_t::i64, Shape{2}); + auto data = make_shared(element::f32, Shape{2, 5}); + auto pattern = make_shared(element::i64, Shape{2}); auto dyn_reshape = make_shared(data, pattern, false); auto func = make_shared(OutputVector{dyn_reshape}, ParameterVector{data, pattern}); auto result_tensor = make_shared(); @@ -682,7 +682,7 @@ TEST(eval, evaluate_reshape_v1_negative_index) {result_tensor}, {make_host_tensor({2, 5}, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}), make_host_tensor({2}, {2, -1})})); - EXPECT_EQ(result_tensor->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result_tensor->get_element_type(), element::f32); EXPECT_EQ(result_tensor->get_partial_shape(), (PartialShape{2, 5})); auto computed_val = read_vector(result_tensor); vector expected_val{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; @@ -691,8 +691,8 @@ TEST(eval, evaluate_reshape_v1_negative_index) TEST(eval, evaluate_reshape_v1_negative_index_zero_dim_zero_flag) { - auto data = make_shared(element::Type_t::f32, Shape{2, 2, 2, 2}); - auto pattern = make_shared(element::Type_t::i64, Shape{6}); + auto data = make_shared(element::f32, Shape{2, 2, 2, 2}); + auto pattern = make_shared(element::i64, Shape{6}); auto dyn_reshape = make_shared(data, pattern, true); auto func = make_shared(OutputVector{dyn_reshape}, ParameterVector{data, pattern}); auto result_tensor = make_shared(); @@ -701,7 +701,7 @@ TEST(eval, evaluate_reshape_v1_negative_index_zero_dim_zero_flag) {make_host_tensor( {2, 2, 2, 2}, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}), make_host_tensor({6}, {2, 0, 1, -1, 1, 2})})); - EXPECT_EQ(result_tensor->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result_tensor->get_element_type(), element::f32); EXPECT_EQ(result_tensor->get_partial_shape(), (PartialShape{2, 2, 1, 2, 1, 2})); auto computed_val = read_vector(result_tensor); vector expected_val{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; @@ -710,8 +710,8 @@ TEST(eval, evaluate_reshape_v1_negative_index_zero_dim_zero_flag) TEST(eval, evaluate_reshape_v1_pattern_int16) { - auto data = make_shared(element::Type_t::f32, Shape{2, 2, 2, 2}); - auto pattern = make_shared(element::Type_t::i16, Shape{6}); + auto data = make_shared(element::f32, Shape{2, 2, 2, 2}); + auto pattern = make_shared(element::i16, Shape{6}); auto dyn_reshape = make_shared(data, pattern, true); auto func = make_shared(OutputVector{dyn_reshape}, ParameterVector{data, pattern}); auto result_tensor = make_shared(); @@ -720,7 +720,7 @@ TEST(eval, evaluate_reshape_v1_pattern_int16) {make_host_tensor( {2, 2, 2, 2}, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}), make_host_tensor({6}, {2, 0, 1, -1, 1, 2})})); - EXPECT_EQ(result_tensor->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result_tensor->get_element_type(), element::f32); EXPECT_EQ(result_tensor->get_partial_shape(), (PartialShape{2, 2, 1, 2, 1, 2})); auto computed_val = read_vector(result_tensor); vector expected_val{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; @@ -729,8 +729,8 @@ TEST(eval, evaluate_reshape_v1_pattern_int16) TEST(eval, evaluate_convert) { - auto p = make_shared(element::Type_t::f32, PartialShape{-1, -1}); - auto convert = make_shared(p, element::Type_t::i64); + auto p = make_shared(element::f32, PartialShape{-1, -1}); + auto convert = make_shared(p, element::i64); auto fun = make_shared(OutputVector{convert}, ParameterVector{p}); std::vector> inputs{{-1, 1}}; @@ -740,7 +740,7 @@ TEST(eval, evaluate_convert) auto result = make_shared(); ASSERT_TRUE(fun->evaluate( {result}, {make_host_tensor(Shape{1, 2}, inputs[i])})); - EXPECT_EQ(result->get_element_type(), element::Type_t::i64); + EXPECT_EQ(result->get_element_type(), element::i64); EXPECT_EQ(result->get_shape(), (Shape{1, 2})); auto result_data = read_vector(result); ASSERT_EQ(result_data, expected_result[i]); @@ -749,14 +749,14 @@ TEST(eval, evaluate_convert) TEST(eval, evaluate_abs) { - auto p = make_shared(element::Type_t::f32, Shape{2, 3}); + auto p = make_shared(element::f32, Shape{2, 3}); auto abs = make_shared(p); auto fun = make_shared(OutputVector{abs}, ParameterVector{p}); auto result = make_shared(); ASSERT_TRUE(fun->evaluate({result}, {make_host_tensor( Shape{2, 3}, {0.0f, -1.0f, -2.0f, -3.0f, 4.0f, 5.0f})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); auto result_val = read_vector(result); vector expec{0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f}; ASSERT_EQ(result_val, expec); @@ -764,14 +764,14 @@ TEST(eval, evaluate_abs) TEST(eval, evaluate_erf) { - auto p = make_shared(element::Type_t::f32, Shape{2, 3}); + auto p = make_shared(element::f32, Shape{2, 3}); auto erf = make_shared(p); auto fun = make_shared(OutputVector{erf}, ParameterVector{p}); auto result = make_shared(); ASSERT_TRUE(fun->evaluate({result}, {make_host_tensor( Shape{2, 3}, {0.0f, -1.0f, -2.0f, -3.0f, 4.0f, 5.0f})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); auto result_val = read_vector(result); vector expec{std::erf(0.0f), std::erf(-1.0f), @@ -784,14 +784,14 @@ TEST(eval, evaluate_erf) TEST(eval, evaluate_exp) { - auto p = make_shared(element::Type_t::f32, Shape{2, 3}); + auto p = make_shared(element::f32, Shape{2, 3}); auto exp = make_shared(p); auto fun = make_shared(OutputVector{exp}, ParameterVector{p}); auto result = make_shared(); ASSERT_TRUE(fun->evaluate({result}, {make_host_tensor( Shape{2, 3}, {0.0f, -1.0f, -2.0f, -3.0f, 4.0f, 5.0f})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); auto result_val = read_vector(result); vector expec{std::exp(0.0f), std::exp(-1.0f), @@ -804,14 +804,14 @@ TEST(eval, evaluate_exp) TEST(eval, evaluate_floor) { - auto p = make_shared(element::Type_t::f32, Shape{2, 2}); + auto p = make_shared(element::f32, Shape{2, 2}); auto floor = make_shared(p); auto fun = make_shared(OutputVector{floor}, ParameterVector{p}); auto result = make_shared(); ASSERT_TRUE(fun->evaluate( {result}, {make_host_tensor(Shape{2, 2}, {-2.5f, -2.0f, 0.3f, 4.8f})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); auto result_val = read_vector(result); vector expec{-3.0f, -2.0f, 0.0f, 4.0f}; ASSERT_EQ(result_val, expec); @@ -819,14 +819,14 @@ TEST(eval, evaluate_floor) TEST(eval, evaluate_floor_int32) { - auto p = make_shared(element::Type_t::i32, Shape{2, 2}); + auto p = make_shared(element::i32, Shape{2, 2}); auto floor = make_shared(p); auto fun = make_shared(OutputVector{floor}, ParameterVector{p}); auto result = make_shared(); ASSERT_TRUE(fun->evaluate({result}, {make_host_tensor( Shape{2, 2}, {-2, -136314888, 0x40000010, 0x40000001})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::i32); + EXPECT_EQ(result->get_element_type(), element::i32); auto result_val = read_vector(result); vector expec{-2, -136314888, 0x40000010, 0x40000001}; ASSERT_EQ(result_val, expec); @@ -834,7 +834,7 @@ TEST(eval, evaluate_floor_int32) TEST(eval, evaluate_log) { - auto p = make_shared(element::Type_t::f32, Shape{2, 2, 2}); + auto p = make_shared(element::f32, Shape{2, 2, 2}); auto log = make_shared(p); auto fun = make_shared(OutputVector{log}, ParameterVector{p}); auto result = make_shared(); @@ -842,7 +842,7 @@ TEST(eval, evaluate_log) fun->evaluate({result}, {make_host_tensor( Shape{2, 2, 2}, {0.125f, 0.25f, 0.5f, 1.f, 2.f, 4.f, 8.f, 16.f})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); auto result_val = read_vector(result); vector expec{std::log(0.125f), std::log(0.25f), @@ -857,7 +857,7 @@ TEST(eval, evaluate_log) TEST(eval, evaluate_negative_f32) { - auto p = make_shared(element::Type_t::f32, Shape{2, 5}); + auto p = make_shared(element::f32, Shape{2, 5}); auto negate = make_shared(p); auto fun = make_shared(OutputVector{negate}, ParameterVector{p}); auto result = make_shared(); @@ -866,7 +866,7 @@ TEST(eval, evaluate_negative_f32) {make_host_tensor( Shape{2, 5}, {1.35f, 8.76f, -8.0f, 17.234f, -2.121f, 1.0f, 8.7f, -8.92f, 17.0f, -1.0f})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); auto result_val = read_vector(result); vector expec{-1.35f, -8.76f, 8.0f, -17.234f, 2.121f, -1.0f, -8.7f, 8.92f, -17.0f, 1.0f}; ASSERT_EQ(result_val, expec); @@ -874,14 +874,14 @@ TEST(eval, evaluate_negative_f32) TEST(eval, evaluate_negative_i32) { - auto p = make_shared(element::Type_t::i32, Shape{2, 5}); + auto p = make_shared(element::i32, Shape{2, 5}); auto negate = make_shared(p); auto fun = make_shared(OutputVector{negate}, ParameterVector{p}); auto result = make_shared(); ASSERT_TRUE(fun->evaluate({result}, {make_host_tensor( Shape{2, 5}, {1, 8, -8, 17, -2, 1, 8, -8, 17, 0})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::i32); + EXPECT_EQ(result->get_element_type(), element::i32); auto result_val = read_vector(result); vector expec{-1, -8, 8, -17, 2, -1, -8, 8, -17, 0}; ASSERT_EQ(result_val, expec); @@ -889,14 +889,14 @@ TEST(eval, evaluate_negative_i32) TEST(eval, evaluate_relu_2Ffprop_f32) { - auto p = make_shared(element::Type_t::f32, Shape{2, 5}); + auto p = make_shared(element::f32, Shape{2, 5}); auto relu = make_shared(p); auto fun = make_shared(OutputVector{relu}, ParameterVector{p}); auto result = make_shared(); ASSERT_TRUE(fun->evaluate({result}, {make_host_tensor( Shape{2, 5}, {1, 8, -8, 17, -0.5, 0.1, 8.5, -8, 17, -0.5})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); auto result_val = read_vector(result); vector expec{1, 8, 0, 17, 0, 0.1, 8.5, 0, 17, 0}; ASSERT_EQ(result_val, expec); @@ -904,14 +904,14 @@ TEST(eval, evaluate_relu_2Ffprop_f32) TEST(eval, evaluate_relu_2Ffprop_i32) { - auto p = make_shared(element::Type_t::i32, Shape{2, 5}); + auto p = make_shared(element::i32, Shape{2, 5}); auto relu = make_shared(p); auto fun = make_shared(OutputVector{relu}, ParameterVector{p}); auto result = make_shared(); ASSERT_TRUE(fun->evaluate({result}, {make_host_tensor( Shape{2, 5}, {1, 8, -8, 17, -2, 1, 8, -8, 17, -1})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::i32); + EXPECT_EQ(result->get_element_type(), element::i32); auto result_val = read_vector(result); vector expec{1, 8, 0, 17, 0, 1, 8, 0, 17, 0}; ASSERT_EQ(result_val, expec); @@ -919,14 +919,14 @@ TEST(eval, evaluate_relu_2Ffprop_i32) TEST(eval, evaluate_round) { - auto p = make_shared(element::Type_t::f32, Shape{5}); + auto p = make_shared(element::f32, Shape{5}); auto round = make_shared(p, op::v5::Round::RoundMode::HALF_TO_EVEN); auto fun = make_shared(OutputVector{round}, ParameterVector{p}); auto result = make_shared(); ASSERT_TRUE(fun->evaluate( {result}, {make_host_tensor(Shape{5}, {0.9f, 2.5f, 2.3f, 1.5f, -4.5f})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); auto result_val = read_vector(result); vector expec{1.0f, 2.0f, 2.0f, 2.0f, -4.0f}; ASSERT_EQ(result_val, expec); @@ -934,7 +934,7 @@ TEST(eval, evaluate_round) TEST(eval, evaluate_round_2D) { - auto p = make_shared(element::Type_t::f32, Shape{3, 5}); + auto p = make_shared(element::f32, Shape{3, 5}); auto round = make_shared(p, op::v5::Round::RoundMode::HALF_TO_EVEN); auto fun = make_shared(OutputVector{round}, ParameterVector{p}); auto result = make_shared(); @@ -955,7 +955,7 @@ TEST(eval, evaluate_round_2D) -2.2f, -2.5f, -2.8f})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); auto result_val = read_vector(result); vector expec{ 0.f, 0.f, 1.f, 1.f, 2.f, 2.f, 2.f, 2.f, 3.f, -1.f, -2.f, -2.f, -2.f, -2.f, -3.f}; @@ -964,7 +964,7 @@ TEST(eval, evaluate_round_2D) TEST(eval, evaluate_sigmoid) { - auto p = make_shared(element::Type_t::f32, Shape{1, 1, 2, 2}); + auto p = make_shared(element::f32, Shape{1, 1, 2, 2}); auto sigmoid = make_shared(p); auto fun = make_shared(OutputVector{sigmoid}, ParameterVector{p}); auto result = make_shared(); @@ -975,7 +975,7 @@ TEST(eval, evaluate_sigmoid) float sigma2 = 1.0f / (1.0f + std::exp(-x2)); ASSERT_TRUE(fun->evaluate( {result}, {make_host_tensor(Shape{1, 1, 2, 2}, {x1, x2, x1, x2})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); auto result_val = read_vector(result); vector expec{sigma1, sigma2, sigma1, sigma2}; EXPECT_EQ(result_val.size(), expec.size()); @@ -983,7 +983,7 @@ TEST(eval, evaluate_sigmoid) TEST(eval, evaluate_sign) { - auto p = make_shared(element::Type_t::f32, Shape{2, 3}); + auto p = make_shared(element::f32, Shape{2, 3}); auto sign = make_shared(p); auto fun = make_shared(OutputVector{sign}, ParameterVector{p}); auto result = make_shared(); @@ -991,7 +991,7 @@ TEST(eval, evaluate_sign) ASSERT_TRUE(fun->evaluate( {result}, {make_host_tensor(Shape{2, 3}, {1, -2, 0, -4.8f, 4.8f, -0.0f})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); auto result_val = read_vector(result); vector expec{1, -1, 0, -1, 1, 0}; ASSERT_EQ(result_val, expec); @@ -999,7 +999,7 @@ TEST(eval, evaluate_sign) TEST(eval, evaluate_sin) { - auto p = make_shared(element::Type_t::f32, Shape{11}); + auto p = make_shared(element::f32, Shape{11}); auto sin = make_shared(p); auto fun = make_shared(OutputVector{sin}, ParameterVector{p}); auto result = make_shared(); @@ -1008,7 +1008,7 @@ TEST(eval, evaluate_sin) {result}, {make_host_tensor( Shape{11}, {0.f, 0.25f, -0.25f, 0.5f, -0.5f, 1.f, -1.f, 2.f, -2.f, 4.f, -4.f})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); auto result_val = read_vector(result); vector expec{0.00000000f, 0.24740396f, @@ -1026,14 +1026,14 @@ TEST(eval, evaluate_sin) TEST(eval, evaluate_sinh) { - auto p = make_shared(element::Type_t::f32, Shape{6}); + auto p = make_shared(element::f32, Shape{6}); auto sinh = make_shared(p); auto fun = make_shared(OutputVector{sinh}, ParameterVector{p}); auto result = make_shared(); vector input{1.0f, 0.0f, -0.0f, -1.0f, 5.0f, -5.0f}; ASSERT_TRUE(fun->evaluate({result}, {make_host_tensor(Shape{6}, input)})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); auto result_val = read_vector(result); std::transform( input.begin(), input.end(), input.begin(), [](float x) -> float { return sinhf(x); }); @@ -1042,14 +1042,14 @@ TEST(eval, evaluate_sinh) TEST(eval, evaluate_sqrt) { - auto p = make_shared(element::Type_t::f32, Shape{6}); + auto p = make_shared(element::f32, Shape{6}); auto sqrt = make_shared(p); auto fun = make_shared(OutputVector{sqrt}, ParameterVector{p}); auto result = make_shared(); vector input{16, 4, 81, 100, 10000, 0}; ASSERT_TRUE(fun->evaluate({result}, {make_host_tensor(Shape{6}, input)})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); auto result_val = read_vector(result); vector expec{4, 2, 9, 10, 100, 0}; ASSERT_FLOAT_VECTORS_EQ(expec, result_val); @@ -1057,7 +1057,7 @@ TEST(eval, evaluate_sqrt) TEST(eval, evaluate_acos) { - auto p = make_shared(element::Type_t::f32, Shape{11}); + auto p = make_shared(element::f32, Shape{11}); auto acos = make_shared(p); auto fun = make_shared(OutputVector{acos}, ParameterVector{p}); auto result = make_shared(); @@ -1065,7 +1065,7 @@ TEST(eval, evaluate_acos) vector input{-1.f, -0.75f, -0.5f, -0.25f, -0.125f, 0.f, 0.125f, 0.25f, 0.5f, 0.75f, 1.f}; ASSERT_TRUE( fun->evaluate({result}, {make_host_tensor(Shape{11}, input)})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); auto result_val = read_vector(result); std::transform( input.begin(), input.end(), input.begin(), [](float x) -> float { return std::acos(x); }); @@ -1074,7 +1074,7 @@ TEST(eval, evaluate_acos) TEST(eval, evaluate_asin) { - auto p = make_shared(element::Type_t::f32, Shape{11}); + auto p = make_shared(element::f32, Shape{11}); auto asin = make_shared(p); auto fun = make_shared(OutputVector{asin}, ParameterVector{p}); auto result = make_shared(); @@ -1082,7 +1082,7 @@ TEST(eval, evaluate_asin) vector input{-1.f, -0.75f, -0.5f, -0.25f, -0.125f, 0.f, 0.125f, 0.25f, 0.5f, 0.75f, 1.f}; ASSERT_TRUE( fun->evaluate({result}, {make_host_tensor(Shape{11}, input)})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); auto result_val = read_vector(result); std::transform( input.begin(), input.end(), input.begin(), [](float x) -> float { return std::asin(x); }); @@ -1092,7 +1092,7 @@ TEST(eval, evaluate_asin) TEST(eval, evaluate_atan) { - auto p = make_shared(element::Type_t::f32, Shape{11}); + auto p = make_shared(element::f32, Shape{11}); auto atan = make_shared(p); auto fun = make_shared(OutputVector{atan}, ParameterVector{p}); auto result = make_shared(); @@ -1100,7 +1100,7 @@ TEST(eval, evaluate_atan) vector input{-4.f, -2.f, -1.f, -0.5f, -0.25f, 0.f, 0.25f, 0.5f, 1.f, 2.f, 4.f}; ASSERT_TRUE( fun->evaluate({result}, {make_host_tensor(Shape{11}, input)})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); auto result_val = read_vector(result); std::transform( input.begin(), input.end(), input.begin(), [](float x) -> float { return std::atan(x); }); @@ -1110,7 +1110,7 @@ TEST(eval, evaluate_atan) TEST(eval, evaluate_ceiling) { - auto p = make_shared(element::Type_t::f32, Shape{2, 2}); + auto p = make_shared(element::f32, Shape{2, 2}); auto ceil = make_shared(p); auto fun = make_shared(OutputVector{ceil}, ParameterVector{p}); auto result = make_shared(); @@ -1118,7 +1118,7 @@ TEST(eval, evaluate_ceiling) vector input{-2.5f, -2.0f, 0.3f, 4.8f}; ASSERT_TRUE( fun->evaluate({result}, {make_host_tensor(Shape{2, 2}, input)})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); auto result_val = read_vector(result); vector expec{-2.0f, -2.0f, 1.0f, 5.0f}; ASSERT_EQ(result_val, expec); @@ -1126,7 +1126,7 @@ TEST(eval, evaluate_ceiling) TEST(eval, evaluate_cos) { - auto p = make_shared(element::Type_t::f32, Shape{11}); + auto p = make_shared(element::f32, Shape{11}); auto cos = make_shared(p); auto fun = make_shared(OutputVector{cos}, ParameterVector{p}); auto result = make_shared(); @@ -1134,7 +1134,7 @@ TEST(eval, evaluate_cos) vector input{0.f, 0.25f, -0.25f, 0.5f, -0.5f, 1.f, -1.f, 2.f, -2.f, 4.f, -4.f}; ASSERT_TRUE( fun->evaluate({result}, {make_host_tensor(Shape{11}, input)})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); auto result_val = read_vector(result); std::transform( input.begin(), input.end(), input.begin(), [](float x) -> float { return std::cos(x); }); @@ -1144,14 +1144,14 @@ TEST(eval, evaluate_cos) TEST(eval, evaluate_cosh) { - auto p = make_shared(element::Type_t::f32, Shape{6}); + auto p = make_shared(element::f32, Shape{6}); auto cosh = make_shared(p); auto fun = make_shared(OutputVector{cosh}, ParameterVector{p}); auto result = make_shared(); vector input{1.0f, 0.0f, -0.0f, -1.0f, 5.0f, -5.0f}; ASSERT_TRUE(fun->evaluate({result}, {make_host_tensor(Shape{6}, input)})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); auto result_val = read_vector(result); std::transform( input.begin(), input.end(), input.begin(), [](float x) -> float { return std::cosh(x); }); @@ -1161,7 +1161,7 @@ TEST(eval, evaluate_cosh) TEST(eval, evaluate_tan) { - auto p = make_shared(element::Type_t::f32, Shape{11}); + auto p = make_shared(element::f32, Shape{11}); auto tan = make_shared(p); auto fun = make_shared(OutputVector{tan}, ParameterVector{p}); auto result = make_shared(); @@ -1169,7 +1169,7 @@ TEST(eval, evaluate_tan) vector input{0.f, 0.25f, -0.25f, 0.5f, -0.5f, 1.f, -1.f, 2.f, -2.f, 4.f, -4.f}; ASSERT_TRUE( fun->evaluate({result}, {make_host_tensor(Shape{11}, input)})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); auto result_val = read_vector(result); std::transform( input.begin(), input.end(), input.begin(), [](float x) -> float { return std::tan(x); }); @@ -1179,14 +1179,14 @@ TEST(eval, evaluate_tan) TEST(eval, evaluate_tanh) { - auto p = make_shared(element::Type_t::f32, Shape{6}); + auto p = make_shared(element::f32, Shape{6}); auto tanh = make_shared(p); auto fun = make_shared(OutputVector{tanh}, ParameterVector{p}); auto result = make_shared(); vector input{1.0f, 0.0f, -0.0f, -1.0f, 0.5f, -0.5f}; ASSERT_TRUE(fun->evaluate({result}, {make_host_tensor(Shape{6}, input)})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); auto result_val = read_vector(result); std::transform( input.begin(), input.end(), input.begin(), [](float x) -> float { return std::tanh(x); }); @@ -1196,14 +1196,14 @@ TEST(eval, evaluate_tanh) TEST(eval, evaluate_logical_not) { - auto p = make_shared(element::Type_t::boolean, Shape{2, 2}); + auto p = make_shared(element::boolean, Shape{2, 2}); auto logical_not = make_shared(p); auto fun = make_shared(OutputVector{logical_not}, ParameterVector{p}); auto result = make_shared(); ASSERT_TRUE(fun->evaluate( {result}, {make_host_tensor(Shape{2, 2}, {1, 0, 1, 0})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::boolean); + EXPECT_EQ(result->get_element_type(), element::boolean); auto result_val = read_vector(result); vector expec{0, 1, 0, 1}; ASSERT_EQ(result_val, expec); @@ -1211,9 +1211,9 @@ TEST(eval, evaluate_logical_not) TEST(eval, evaluate_dynamic_gather) { - auto arg1 = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto arg2 = make_shared(element::Type_t::i32, PartialShape::dynamic()); - auto arg3 = make_shared(element::Type_t::i32, PartialShape::dynamic()); + auto arg1 = make_shared(element::f32, PartialShape::dynamic()); + auto arg2 = make_shared(element::i32, PartialShape::dynamic()); + auto arg3 = make_shared(element::i32, PartialShape::dynamic()); auto gather = make_shared(arg1, arg2, arg3); auto fun = make_shared(OutputVector{gather}, ParameterVector{arg1, arg2, arg3}); auto result_tensor = make_shared(); @@ -1221,7 +1221,7 @@ TEST(eval, evaluate_dynamic_gather) {make_host_tensor({3}, {1.0f, 2.0f, 3.0f}), make_host_tensor({2}, {1, 0}), make_host_tensor({1}, {0})})); - EXPECT_EQ(result_tensor->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result_tensor->get_element_type(), element::f32); EXPECT_EQ(result_tensor->get_partial_shape(), (PartialShape{2})); auto cval = read_vector(result_tensor); vector out{2.0f, 1.0f}; @@ -1230,9 +1230,9 @@ TEST(eval, evaluate_dynamic_gather) TEST(eval, evaluate_dynamic_axis_gather) { - auto arg1 = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto arg2 = make_shared(element::Type_t::i32, PartialShape::dynamic()); - auto arg3 = make_shared(element::Type_t::i64, PartialShape::dynamic()); + auto arg1 = make_shared(element::f32, PartialShape::dynamic()); + auto arg2 = make_shared(element::i32, PartialShape::dynamic()); + auto arg3 = make_shared(element::i64, PartialShape::dynamic()); auto gather = make_shared(arg1, arg2, arg3); auto fun = make_shared(OutputVector{gather}, ParameterVector{arg1, arg2, arg3}); auto result_tensor = make_shared(); @@ -1241,7 +1241,7 @@ TEST(eval, evaluate_dynamic_axis_gather) {3, 3}, {1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f, 3.0f, 3.1f, 3.2f}), make_host_tensor({1, 2}, {0, 2}), make_host_tensor({}, {1})})); - EXPECT_EQ(result_tensor->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result_tensor->get_element_type(), element::f32); EXPECT_EQ(result_tensor->get_partial_shape(), (PartialShape{3, 1, 2})); auto cval = read_vector(result_tensor); vector out{1.0f, 1.2f, 2.0f, 2.2f, 3.0f, 3.2f}; @@ -1250,15 +1250,15 @@ TEST(eval, evaluate_dynamic_axis_gather) TEST(eval, evaluate_dynamic_concat) { - auto arg1 = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto arg2 = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto arg1 = make_shared(element::f32, PartialShape::dynamic()); + auto arg2 = make_shared(element::f32, PartialShape::dynamic()); auto concat = make_shared(NodeVector{arg1, arg2}, 1); auto fun = make_shared(OutputVector{concat}, ParameterVector{arg1, arg2}); auto result_tensor = make_shared(); ASSERT_TRUE(fun->evaluate({result_tensor}, {make_host_tensor({1, 1}, {1.0f}), make_host_tensor({1, 2}, {8.0f, 10.0f})})); - EXPECT_EQ(result_tensor->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result_tensor->get_element_type(), element::f32); EXPECT_EQ(result_tensor->get_partial_shape(), (PartialShape{1, 3})); auto cval = read_vector(result_tensor); vector out{1.0f, 8.0f, 10.0f}; @@ -1289,25 +1289,17 @@ void test_eval(shared_ptr fun, TEST(eval, eval_transpose) { - auto x = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto x = make_shared(element::f32, PartialShape::dynamic()); vector> axes; - axes.push_back( - make_shared(element::Type_t::i8, PartialShape{Dimension::dynamic()})); - axes.push_back( - make_shared(element::Type_t::i16, PartialShape{Dimension::dynamic()})); - axes.push_back( - make_shared(element::Type_t::i32, PartialShape{Dimension::dynamic()})); - axes.push_back( - make_shared(element::Type_t::i64, PartialShape{Dimension::dynamic()})); - - axes.push_back( - make_shared(element::Type_t::u8, PartialShape{Dimension::dynamic()})); - axes.push_back( - make_shared(element::Type_t::u16, PartialShape{Dimension::dynamic()})); - axes.push_back( - make_shared(element::Type_t::u32, PartialShape{Dimension::dynamic()})); - axes.push_back( - make_shared(element::Type_t::u64, PartialShape{Dimension::dynamic()})); + axes.push_back(make_shared(element::i8, PartialShape{Dimension::dynamic()})); + axes.push_back(make_shared(element::i16, PartialShape{Dimension::dynamic()})); + axes.push_back(make_shared(element::i32, PartialShape{Dimension::dynamic()})); + axes.push_back(make_shared(element::i64, PartialShape{Dimension::dynamic()})); + + axes.push_back(make_shared(element::u8, PartialShape{Dimension::dynamic()})); + axes.push_back(make_shared(element::u16, PartialShape{Dimension::dynamic()})); + axes.push_back(make_shared(element::u32, PartialShape{Dimension::dynamic()})); + axes.push_back(make_shared(element::u64, PartialShape{Dimension::dynamic()})); std::vector x_shapes{Shape{2, 3}, Shape{2, 3}, Shape{2, 2, 3}}; @@ -1356,7 +1348,7 @@ TEST(eval, eval_transpose) TEST(eval, max_pool_v1_dynamic) { Shape window_shape{3}; - auto A = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto A = make_shared(element::f32, PartialShape::dynamic()); auto f = make_shared( make_shared( A, Strides(), Shape(), Shape(), window_shape, op::RoundingType::FLOOR), @@ -1367,7 +1359,7 @@ TEST(eval, max_pool_v1_dynamic) {make_host_tensor( {1, 1, 14}, {0, 1, 0, 2, 1, 0, 3, 2, 0, 0, 2, 0, 0, 0})})); - EXPECT_EQ(result_tensor->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result_tensor->get_element_type(), element::f32); EXPECT_EQ(result_tensor->get_partial_shape(), (PartialShape{1, 1, 12})); auto cval = read_vector(result_tensor); vector out{1, 2, 2, 2, 3, 3, 3, 2, 2, 2, 2, 0}; @@ -1377,10 +1369,10 @@ TEST(eval, evaluate_static_scatter_elements_update_basic) { const Shape data_shape{3, 3}; const Shape indices_shape{2, 3}; - auto arg1 = make_shared(element::Type_t::f32, data_shape); - auto arg2 = make_shared(element::Type_t::i32, indices_shape); - auto arg3 = make_shared(element::Type_t::f32, indices_shape); - auto arg4 = make_shared(element::Type_t::i64, Shape{}); + auto arg1 = make_shared(element::f32, data_shape); + auto arg2 = make_shared(element::i32, indices_shape); + auto arg3 = make_shared(element::f32, indices_shape); + auto arg4 = make_shared(element::i64, Shape{}); auto scatter_elements_update = make_shared(arg1, arg2, arg3, arg4); auto fun = make_shared(OutputVector{scatter_elements_update}, @@ -1394,7 +1386,7 @@ TEST(eval, evaluate_static_scatter_elements_update_basic) make_host_tensor(indices_shape, {1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f}), make_host_tensor({}, {0})})); - EXPECT_EQ(result_tensor->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result_tensor->get_element_type(), element::f32); EXPECT_EQ(result_tensor->get_shape(), (Shape{3, 3})); auto cval = read_vector(result_tensor); vector out{2.f, 1.1f, 0.0f, 1.f, 0.0f, 2.2f, 0.f, 2.1f, 1.2f}; @@ -1406,10 +1398,10 @@ TEST(eval, evaluate_dynamic_scatter_elements_update_basic) const Shape data_shape{3, 3}; const Shape indices_shape{2, 3}; - auto arg1 = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto arg2 = make_shared(element::Type_t::i32, PartialShape::dynamic()); - auto arg3 = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto arg4 = make_shared(element::Type_t::i64, PartialShape::dynamic()); + auto arg1 = make_shared(element::f32, PartialShape::dynamic()); + auto arg2 = make_shared(element::i32, PartialShape::dynamic()); + auto arg3 = make_shared(element::f32, PartialShape::dynamic()); + auto arg4 = make_shared(element::i64, PartialShape::dynamic()); auto scatter_elements_update = make_shared(arg1, arg2, arg3, arg4); @@ -1425,7 +1417,7 @@ TEST(eval, evaluate_dynamic_scatter_elements_update_basic) {1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f}), make_host_tensor({}, {0})})); - EXPECT_EQ(result_tensor->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result_tensor->get_element_type(), element::f32); EXPECT_EQ(result_tensor->get_partial_shape(), (PartialShape{3, 3})); auto cval = read_vector(result_tensor); vector out{2.f, 1.1f, 0.0f, 1.f, 0.0f, 2.2f, 0.f, 2.1f, 1.2f}; @@ -1438,10 +1430,10 @@ TEST(eval, evaluate_dynamic_scatter_elements_update_negative_axis) const Shape indices_shape{2, 3}; const Shape axis_shape{}; - auto arg1 = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto arg2 = make_shared(element::Type_t::i32, PartialShape::dynamic()); - auto arg3 = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto arg4 = make_shared(element::Type_t::i64, PartialShape::dynamic()); + auto arg1 = make_shared(element::f32, PartialShape::dynamic()); + auto arg2 = make_shared(element::i32, PartialShape::dynamic()); + auto arg3 = make_shared(element::f32, PartialShape::dynamic()); + auto arg4 = make_shared(element::i64, PartialShape::dynamic()); auto scatter_elements_update = make_shared(arg1, arg2, arg3, arg4); @@ -1457,7 +1449,7 @@ TEST(eval, evaluate_dynamic_scatter_elements_update_negative_axis) {1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f}), make_host_tensor(axis_shape, {-1})})); - EXPECT_EQ(result_tensor->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result_tensor->get_element_type(), element::f32); EXPECT_EQ(result_tensor->get_partial_shape(), (PartialShape{3, 3})); auto cval = read_vector(result_tensor); vector out{1.1f, 1.0f, 1.2f, 2.0f, 2.2f, 2.1f, 0.0f, 0.0f, 0.0f}; @@ -1469,10 +1461,10 @@ TEST(eval, evaluate_dynamic_scatter_elements_update_1d_axis) const Shape data_shape{3, 3}; const Shape indices_shape{2, 3}; - auto arg1 = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto arg2 = make_shared(element::Type_t::i32, PartialShape::dynamic()); - auto arg3 = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto arg4 = make_shared(element::Type_t::i64, PartialShape::dynamic()); + auto arg1 = make_shared(element::f32, PartialShape::dynamic()); + auto arg2 = make_shared(element::i32, PartialShape::dynamic()); + auto arg3 = make_shared(element::f32, PartialShape::dynamic()); + auto arg4 = make_shared(element::i64, PartialShape::dynamic()); auto scatter_elements_update = make_shared(arg1, arg2, arg3, arg4); @@ -1488,7 +1480,7 @@ TEST(eval, evaluate_dynamic_scatter_elements_update_1d_axis) {1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f}), make_host_tensor({1}, {0})})); - EXPECT_EQ(result_tensor->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result_tensor->get_element_type(), element::f32); EXPECT_EQ(result_tensor->get_partial_shape(), (PartialShape{3, 3})); auto cval = read_vector(result_tensor); vector out{2.f, 1.1f, 0.0f, 1.f, 0.0f, 2.2f, 0.f, 2.1f, 1.2f}; @@ -1501,10 +1493,10 @@ TEST(eval, DISABLED_evaluate_dynamic_scatter_elements_update_3d_i16) const Shape data_shape{3, 3, 3}; const Shape indices_shape{2, 2, 3}; - auto arg1 = make_shared(element::Type_t::i16, PartialShape::dynamic()); - auto arg2 = make_shared(element::Type_t::i16, PartialShape::dynamic()); - auto arg3 = make_shared(element::Type_t::i16, PartialShape::dynamic()); - auto arg4 = make_shared(element::Type_t::i64, PartialShape::dynamic()); + auto arg1 = make_shared(element::i16, PartialShape::dynamic()); + auto arg2 = make_shared(element::i16, PartialShape::dynamic()); + auto arg3 = make_shared(element::i16, PartialShape::dynamic()); + auto arg4 = make_shared(element::i64, PartialShape::dynamic()); auto scatter_elements_update = make_shared(arg1, arg2, arg3, arg4); @@ -1521,7 +1513,7 @@ TEST(eval, DISABLED_evaluate_dynamic_scatter_elements_update_3d_i16) indices_shape, {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}), make_host_tensor({}, {1})})); - EXPECT_EQ(result_tensor->get_element_type(), element::Type_t::i16); + EXPECT_EQ(result_tensor->get_element_type(), element::i16); EXPECT_EQ(result_tensor->get_partial_shape(), (PartialShape{3, 3, 3})); auto cval = read_vector(result_tensor); vector out{4, 2, 0, 1, 0, 6, 0, 5, 3, 10, 0, 12, 0, 11, @@ -1534,10 +1526,10 @@ TEST(eval, evaluate_dynamic_scatter_elements_update_one_elem_i32) const Shape data_shape{3, 3, 3}; const Shape indices_shape{1, 1, 1}; - auto arg1 = make_shared(element::Type_t::i32, PartialShape::dynamic()); - auto arg2 = make_shared(element::Type_t::i32, PartialShape::dynamic()); - auto arg3 = make_shared(element::Type_t::i32, PartialShape::dynamic()); - auto arg4 = make_shared(element::Type_t::i64, PartialShape::dynamic()); + auto arg1 = make_shared(element::i32, PartialShape::dynamic()); + auto arg2 = make_shared(element::i32, PartialShape::dynamic()); + auto arg3 = make_shared(element::i32, PartialShape::dynamic()); + auto arg4 = make_shared(element::i64, PartialShape::dynamic()); auto scatter_elements_update = make_shared(arg1, arg2, arg3, arg4); @@ -1552,7 +1544,7 @@ TEST(eval, evaluate_dynamic_scatter_elements_update_one_elem_i32) make_host_tensor(indices_shape, {2}), make_host_tensor({}, {0})})); - EXPECT_EQ(result_tensor->get_element_type(), element::Type_t::i32); + EXPECT_EQ(result_tensor->get_element_type(), element::i32); EXPECT_EQ(result_tensor->get_partial_shape(), (PartialShape{3, 3, 3})); auto cval = read_vector(result_tensor); vector out{0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, @@ -1565,9 +1557,9 @@ TEST(eval, topk_v1) Shape shape{2, 3, 2}; Shape rshape{2, 2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - const auto k = op::Constant::create(element::Type_t::i32, Shape{}, {2}); - auto B = make_shared(A, k, 1, "max", "index", element::Type_t::i32); + auto A = make_shared(element::f32, shape); + const auto k = op::Constant::create(element::i32, Shape{}, {2}); + auto B = make_shared(A, k, 1, "max", "index", element::i32); auto fun = make_shared(OutputVector{B->output(0), B->output(1)}, ParameterVector{A}); @@ -1576,9 +1568,9 @@ TEST(eval, topk_v1) ASSERT_TRUE(fun->evaluate({result0, result1}, {make_host_tensor( Shape{2, 3, 2}, {12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7})})); - EXPECT_EQ(result0->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result0->get_element_type(), element::f32); EXPECT_EQ(result0->get_partial_shape(), (PartialShape{2, 2, 2})); - EXPECT_EQ(result1->get_element_type(), element::Type_t::i32); + EXPECT_EQ(result1->get_element_type(), element::i32); EXPECT_EQ(result1->get_partial_shape(), (PartialShape{2, 2, 2})); auto result0_val = read_vector(result0); @@ -1595,9 +1587,9 @@ TEST(eval, topk_v1_dyn) { Shape shape{2, 3, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto k = make_shared(element::Type_t::u32, Shape{}); - auto B = make_shared(A, k, 1, "max", "index", element::Type_t::i32); + auto A = make_shared(element::f32, shape); + auto k = make_shared(element::u32, Shape{}); + auto B = make_shared(A, k, 1, "max", "index", element::i32); auto fun = make_shared(OutputVector{B->output(0), B->output(1)}, ParameterVector{A, k}); @@ -1608,9 +1600,9 @@ TEST(eval, topk_v1_dyn) {make_host_tensor( Shape{2, 3, 2}, {12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7}), make_host_tensor(Shape{}, {2})})); - EXPECT_EQ(result0->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result0->get_element_type(), element::f32); EXPECT_EQ(result0->get_partial_shape(), (PartialShape{2, 2, 2})); - EXPECT_EQ(result1->get_element_type(), element::Type_t::i32); + EXPECT_EQ(result1->get_element_type(), element::i32); EXPECT_EQ(result1->get_partial_shape(), (PartialShape{2, 2, 2})); auto result0_val = read_vector(result0); auto result1_val = read_vector(result1); @@ -1625,9 +1617,9 @@ TEST(eval, topk_v3_dyn) { Shape shape{2, 3, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto k = make_shared(element::Type_t::u32, Shape{}); - auto B = make_shared(A, k, 1, "max", "index", element::Type_t::i32); + auto A = make_shared(element::f32, shape); + auto k = make_shared(element::u32, Shape{}); + auto B = make_shared(A, k, 1, "max", "index", element::i32); auto fun = make_shared(OutputVector{B->output(0), B->output(1)}, ParameterVector{A, k}); @@ -1638,9 +1630,9 @@ TEST(eval, topk_v3_dyn) {make_host_tensor( Shape{2, 3, 2}, {12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7}), make_host_tensor(Shape{}, {2})})); - EXPECT_EQ(result0->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result0->get_element_type(), element::f32); EXPECT_EQ(result0->get_partial_shape(), (PartialShape{2, 2, 2})); - EXPECT_EQ(result1->get_element_type(), element::Type_t::i32); + EXPECT_EQ(result1->get_element_type(), element::i32); EXPECT_EQ(result1->get_partial_shape(), (PartialShape{2, 2, 2})); auto result0_val = read_vector(result0); auto result1_val = read_vector(result1); @@ -1655,9 +1647,9 @@ TEST(eval, topk_v3_dyn_values) { Shape shape{2, 3, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto k = make_shared(element::Type_t::u32, Shape{}); - auto B = make_shared(A, k, 1, "max", "value", element::Type_t::i32); + auto A = make_shared(element::f32, shape); + auto k = make_shared(element::u32, Shape{}); + auto B = make_shared(A, k, 1, "max", "value", element::i32); auto fun = make_shared(OutputVector{B->output(0), B->output(1)}, ParameterVector{A, k}); @@ -1668,9 +1660,9 @@ TEST(eval, topk_v3_dyn_values) {make_host_tensor( Shape{2, 3, 2}, {12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7}), make_host_tensor(Shape{}, {2})})); - EXPECT_EQ(result0->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result0->get_element_type(), element::f32); EXPECT_EQ(result0->get_partial_shape(), (PartialShape{2, 2, 2})); - EXPECT_EQ(result1->get_element_type(), element::Type_t::i32); + EXPECT_EQ(result1->get_element_type(), element::i32); EXPECT_EQ(result1->get_partial_shape(), (PartialShape{2, 2, 2})); auto result0_val = read_vector(result0); auto result1_val = read_vector(result1); @@ -1685,9 +1677,9 @@ TEST(eval, topk_v3_dyn_values_k0) { Shape shape{2, 3, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto k = make_shared(element::Type_t::u32, Shape{}); - auto B = make_shared(A, k, 1, "max", "value", element::Type_t::i32); + auto A = make_shared(element::f32, shape); + auto k = make_shared(element::u32, Shape{}); + auto B = make_shared(A, k, 1, "max", "value", element::i32); auto fun = make_shared(OutputVector{B->output(0), B->output(1)}, ParameterVector{A, k}); @@ -1698,9 +1690,9 @@ TEST(eval, topk_v3_dyn_values_k0) {make_host_tensor( Shape{2, 3, 2}, {12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7}), make_host_tensor(Shape{}, {0})})); - EXPECT_EQ(result0->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result0->get_element_type(), element::f32); EXPECT_EQ(result0->get_partial_shape(), (PartialShape{2, 3, 2})); - EXPECT_EQ(result1->get_element_type(), element::Type_t::i32); + EXPECT_EQ(result1->get_element_type(), element::i32); EXPECT_EQ(result1->get_partial_shape(), (PartialShape{2, 3, 2})); auto result0_val = read_vector(result0); auto result1_val = read_vector(result1); @@ -1715,10 +1707,10 @@ TEST(eval, topk_v1_dyn_k0) { Shape shape{2, 3, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto k = make_shared(element::Type_t::i64, Shape{}); + auto A = make_shared(element::f32, shape); + auto k = make_shared(element::i64, Shape{}); - element::Type result_et{element::Type_t::i32}; + element::Type result_et{element::i32}; auto B = make_shared( A, k, 1, op::v1::TopK::Mode::MAX, op::v1::TopK::SortType::SORT_VALUES, result_et); @@ -1731,9 +1723,9 @@ TEST(eval, topk_v1_dyn_k0) {make_host_tensor( Shape{2, 3, 2}, {12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7}), make_host_tensor(Shape{}, {0})})); - EXPECT_EQ(result0->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result0->get_element_type(), element::f32); EXPECT_EQ(result0->get_partial_shape(), (PartialShape{2, 3, 2})); - EXPECT_EQ(result1->get_element_type(), element::Type_t::i32); + EXPECT_EQ(result1->get_element_type(), element::i32); EXPECT_EQ(result1->get_partial_shape(), (PartialShape{2, 3, 2})); auto result0_val = read_vector(result0); auto result1_val = read_vector(result1); @@ -1747,9 +1739,9 @@ TEST(eval, topk_v1_dyn_k0) TEST(eval, topk_v3_param_dyn_values_k0) { - auto A = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto k = make_shared(element::Type_t::u32, Shape{}); - auto B = make_shared(A, k, 1, "max", "value", element::Type_t::i32); + auto A = make_shared(element::f32, PartialShape::dynamic()); + auto k = make_shared(element::u32, Shape{}); + auto B = make_shared(A, k, 1, "max", "value", element::i32); auto fun = make_shared(OutputVector{B->output(0), B->output(1)}, ParameterVector{A, k}); @@ -1760,9 +1752,9 @@ TEST(eval, topk_v3_param_dyn_values_k0) {make_host_tensor( Shape{2, 3, 2}, {12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7}), make_host_tensor(Shape{}, {0})})); - EXPECT_EQ(result0->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result0->get_element_type(), element::f32); EXPECT_EQ(result0->get_partial_shape(), (PartialShape{2, 3, 2})); - EXPECT_EQ(result1->get_element_type(), element::Type_t::i32); + EXPECT_EQ(result1->get_element_type(), element::i32); EXPECT_EQ(result1->get_partial_shape(), (PartialShape{2, 3, 2})); auto result0_val = read_vector(result0); auto result1_val = read_vector(result1); @@ -1775,9 +1767,9 @@ TEST(eval, topk_v3_param_dyn_values_k0) TEST(eval, topk_v3_param_dyn_values_k2) { - auto A = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto k = make_shared(element::Type_t::u32, Shape{}); - auto B = make_shared(A, k, 1, "max", "value", element::Type_t::i32); + auto A = make_shared(element::f32, PartialShape::dynamic()); + auto k = make_shared(element::u32, Shape{}); + auto B = make_shared(A, k, 1, "max", "value", element::i32); auto fun = make_shared(OutputVector{B->output(0), B->output(1)}, ParameterVector{A, k}); @@ -1788,9 +1780,9 @@ TEST(eval, topk_v3_param_dyn_values_k2) {make_host_tensor( Shape{2, 3, 2}, {12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7}), make_host_tensor(Shape{}, {2})})); - EXPECT_EQ(result0->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result0->get_element_type(), element::f32); EXPECT_EQ(result0->get_partial_shape(), (PartialShape{2, 2, 2})); - EXPECT_EQ(result1->get_element_type(), element::Type_t::i32); + EXPECT_EQ(result1->get_element_type(), element::i32); EXPECT_EQ(result1->get_partial_shape(), (PartialShape{2, 2, 2})); auto result0_val = read_vector(result0); auto result1_val = read_vector(result1); @@ -1803,11 +1795,11 @@ TEST(eval, topk_v3_param_dyn_values_k2) TEST(eval, topk_v1_param_dyn_k2) { - auto A = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto k = make_shared(element::Type_t::i64, Shape{}); + auto A = make_shared(element::f32, PartialShape::dynamic()); + auto k = make_shared(element::i64, Shape{}); auto axis = 1; - element::Type result_et{element::Type_t::i32}; + element::Type result_et{element::i32}; auto B = make_shared( A, k, axis, op::v1::TopK::Mode::MAX, op::v1::TopK::SortType::SORT_VALUES, result_et); @@ -1820,9 +1812,9 @@ TEST(eval, topk_v1_param_dyn_k2) {make_host_tensor( Shape{2, 3, 2}, {12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7}), make_host_tensor(Shape{}, {2})})); - EXPECT_EQ(result0->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result0->get_element_type(), element::f32); EXPECT_EQ(result0->get_partial_shape(), (PartialShape{2, 2, 2})); - EXPECT_EQ(result1->get_element_type(), element::Type_t::i32); + EXPECT_EQ(result1->get_element_type(), element::i32); EXPECT_EQ(result1->get_partial_shape(), (PartialShape{2, 2, 2})); auto result0_val = read_vector(result0); auto result1_val = read_vector(result1); @@ -1836,10 +1828,10 @@ TEST(eval, topk_v1_param_dyn_k2) TEST(eval, topk_v1_param_dyn_k0) { - auto A = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto k = make_shared(element::Type_t::i64, Shape{}); + auto A = make_shared(element::f32, PartialShape::dynamic()); + auto k = make_shared(element::i64, Shape{}); - element::Type result_et{element::Type_t::i32}; + element::Type result_et{element::i32}; auto B = make_shared( A, k, 1, op::v1::TopK::Mode::MAX, op::v1::TopK::SortType::SORT_VALUES, result_et); @@ -1853,9 +1845,9 @@ TEST(eval, topk_v1_param_dyn_k0) {make_host_tensor( Shape{2, 3, 2}, {12, 2, 10, 9, 8, 4, 6, 1, 5, 3, 11, 7}), make_host_tensor(Shape{}, {0})})); - EXPECT_EQ(result0->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result0->get_element_type(), element::f32); EXPECT_EQ(result0->get_partial_shape(), (PartialShape{2, 3, 2})); - EXPECT_EQ(result1->get_element_type(), element::Type_t::i32); + EXPECT_EQ(result1->get_element_type(), element::i32); EXPECT_EQ(result1->get_partial_shape(), (PartialShape{2, 3, 2})); auto result0_val = read_vector(result0); auto result1_val = read_vector(result1); @@ -1869,8 +1861,8 @@ TEST(eval, topk_v1_param_dyn_k0) TEST(eval, reduce_logical_and__neg_axis) { - const auto data = make_shared(element::Type_t::boolean, Shape{2, 2, 2}); - const auto axes = make_shared(element::Type_t::i64, Shape{}); + const auto data = make_shared(element::boolean, Shape{2, 2, 2}); + const auto axes = make_shared(element::i64, Shape{}); const auto op = make_shared(data, axes); @@ -1895,10 +1887,10 @@ TEST(eval, evaluate_static_scatter_update_basic_axes_indices_i32) const Shape indices_shape{1, 2}; const Shape updates_shape{1, 2, 3}; - auto arg1 = make_shared(element::Type_t::f32, data_shape); - auto arg2 = make_shared(element::Type_t::i32, indices_shape); - auto arg3 = make_shared(element::Type_t::f32, updates_shape); - auto arg4 = make_shared(element::Type_t::i32, Shape{}); + auto arg1 = make_shared(element::f32, data_shape); + auto arg2 = make_shared(element::i32, indices_shape); + auto arg3 = make_shared(element::f32, updates_shape); + auto arg4 = make_shared(element::i32, Shape{}); auto scatter_update = make_shared(arg1, arg2, arg3, arg4); auto fun = make_shared(OutputVector{scatter_update}, ParameterVector{arg1, arg2, arg3, arg4}); @@ -1910,7 +1902,7 @@ TEST(eval, evaluate_static_scatter_update_basic_axes_indices_i32) make_host_tensor( updates_shape, {1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f}), make_host_tensor({}, {0})})); - EXPECT_EQ(result_tensor->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result_tensor->get_element_type(), element::f32); EXPECT_EQ(result_tensor->get_shape(), (Shape{3, 3})); auto cval = read_vector(result_tensor); vector out{0.f, 0.f, 0.f, 1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f}; @@ -1923,10 +1915,10 @@ TEST(eval, evaluate_static_scatter_update_basic_axes_indices_i64) const Shape indices_shape{1, 2}; const Shape updates_shape{1, 2, 3}; - auto arg1 = make_shared(element::Type_t::f32, data_shape); - auto arg2 = make_shared(element::Type_t::i64, indices_shape); - auto arg3 = make_shared(element::Type_t::f32, updates_shape); - auto arg4 = make_shared(element::Type_t::i64, Shape{}); + auto arg1 = make_shared(element::f32, data_shape); + auto arg2 = make_shared(element::i64, indices_shape); + auto arg3 = make_shared(element::f32, updates_shape); + auto arg4 = make_shared(element::i64, Shape{}); auto scatter_update = make_shared(arg1, arg2, arg3, arg4); auto fun = make_shared(OutputVector{scatter_update}, ParameterVector{arg1, arg2, arg3, arg4}); @@ -1938,7 +1930,7 @@ TEST(eval, evaluate_static_scatter_update_basic_axes_indices_i64) make_host_tensor( updates_shape, {1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f}), make_host_tensor({}, {0})})); - EXPECT_EQ(result_tensor->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result_tensor->get_element_type(), element::f32); EXPECT_EQ(result_tensor->get_shape(), (Shape{3, 3})); auto cval = read_vector(result_tensor); vector out{0.f, 0.f, 0.f, 1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f}; @@ -1951,10 +1943,10 @@ TEST(eval, evaluate_dynamic_scatter_update_basic) const Shape indices_shape{1, 2}; const Shape updates_shape{1, 2, 3}; - auto arg1 = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto arg2 = make_shared(element::Type_t::i32, PartialShape::dynamic()); - auto arg3 = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto arg4 = make_shared(element::Type_t::i64, PartialShape::dynamic()); + auto arg1 = make_shared(element::f32, PartialShape::dynamic()); + auto arg2 = make_shared(element::i32, PartialShape::dynamic()); + auto arg3 = make_shared(element::f32, PartialShape::dynamic()); + auto arg4 = make_shared(element::i64, PartialShape::dynamic()); auto scatter_update = make_shared(arg1, arg2, arg3, arg4); auto fun = make_shared(OutputVector{scatter_update}, @@ -1968,7 +1960,7 @@ TEST(eval, evaluate_dynamic_scatter_update_basic) updates_shape, {1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f}), make_host_tensor({}, {0})})); - EXPECT_EQ(result_tensor->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result_tensor->get_element_type(), element::f32); EXPECT_EQ(result_tensor->get_partial_shape(), (PartialShape{3, 3})); auto cval = read_vector(result_tensor); vector out{0.f, 0.f, 0.f, 1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f}; @@ -1982,10 +1974,10 @@ TEST(eval, evaluate_dynamic_scatter_update_negative_axis) const Shape updates_shape{3, 1, 2}; const Shape axis_shape{}; - auto arg1 = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto arg2 = make_shared(element::Type_t::i32, PartialShape::dynamic()); - auto arg3 = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto arg4 = make_shared(element::Type_t::i64, PartialShape::dynamic()); + auto arg1 = make_shared(element::f32, PartialShape::dynamic()); + auto arg2 = make_shared(element::i32, PartialShape::dynamic()); + auto arg3 = make_shared(element::f32, PartialShape::dynamic()); + auto arg4 = make_shared(element::i64, PartialShape::dynamic()); auto scatter_update = make_shared(arg1, arg2, arg3, arg4); auto fun = make_shared(OutputVector{scatter_update}, @@ -1999,7 +1991,7 @@ TEST(eval, evaluate_dynamic_scatter_update_negative_axis) updates_shape, {1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f}), make_host_tensor(axis_shape, {-1})})); - EXPECT_EQ(result_tensor->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result_tensor->get_element_type(), element::f32); EXPECT_EQ(result_tensor->get_partial_shape(), (PartialShape{3, 3})); auto cval = read_vector(result_tensor); vector out{0.f, 1.0f, 1.1f, 0.0f, 1.2f, 2.0f, 0.0f, 2.1f, 2.2f}; @@ -2012,10 +2004,10 @@ TEST(eval, evaluate_dynamic_scatter_update_1d_axis) const Shape indices_shape{1, 2}; const Shape updates_shape{3, 1, 2}; - auto arg1 = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto arg2 = make_shared(element::Type_t::i32, PartialShape::dynamic()); - auto arg3 = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto arg4 = make_shared(element::Type_t::i64, PartialShape::dynamic()); + auto arg1 = make_shared(element::f32, PartialShape::dynamic()); + auto arg2 = make_shared(element::i32, PartialShape::dynamic()); + auto arg3 = make_shared(element::f32, PartialShape::dynamic()); + auto arg4 = make_shared(element::i64, PartialShape::dynamic()); auto scatter_update = make_shared(arg1, arg2, arg3, arg4); auto fun = make_shared(OutputVector{scatter_update}, @@ -2029,7 +2021,7 @@ TEST(eval, evaluate_dynamic_scatter_update_1d_axis) updates_shape, {1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f}), make_host_tensor({1}, {1})})); - EXPECT_EQ(result_tensor->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result_tensor->get_element_type(), element::f32); EXPECT_EQ(result_tensor->get_partial_shape(), (PartialShape{3, 3})); auto cval = read_vector(result_tensor); vector out{0.f, 1.0f, 1.1f, 0.0f, 1.2f, 2.0f, 0.0f, 2.1f, 2.2f}; @@ -2042,10 +2034,10 @@ TEST(eval, evaluate_dynamic_scatter_update_one_elem_i32) const Shape indices_shape{1, 1}; const Shape updates_shape{1, 1, 3, 2}; - auto arg1 = make_shared(element::Type_t::i32, PartialShape::dynamic()); - auto arg2 = make_shared(element::Type_t::i32, PartialShape::dynamic()); - auto arg3 = make_shared(element::Type_t::i32, PartialShape::dynamic()); - auto arg4 = make_shared(element::Type_t::i64, PartialShape::dynamic()); + auto arg1 = make_shared(element::i32, PartialShape::dynamic()); + auto arg2 = make_shared(element::i32, PartialShape::dynamic()); + auto arg3 = make_shared(element::i32, PartialShape::dynamic()); + auto arg4 = make_shared(element::i64, PartialShape::dynamic()); auto scatter_update = make_shared(arg1, arg2, arg3, arg4); auto fun = make_shared(OutputVector{scatter_update}, @@ -2059,7 +2051,7 @@ TEST(eval, evaluate_dynamic_scatter_update_one_elem_i32) make_host_tensor(updates_shape, {1, 2, 3, 4, 5, 6}), make_host_tensor({}, {0})})); - EXPECT_EQ(result_tensor->get_element_type(), element::Type_t::i32); + EXPECT_EQ(result_tensor->get_element_type(), element::i32); EXPECT_EQ(result_tensor->get_partial_shape(), (PartialShape{3, 3, 2})); auto cval = read_vector(result_tensor); vector out{0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 0, 0, 0, 0, 0, 0}; diff --git a/ngraph/test/graph_rewrite.cpp b/ngraph/test/graph_rewrite.cpp index 5bfd26086b31ae..5cb3f5da222ee6 100644 --- a/ngraph/test/graph_rewrite.cpp +++ b/ngraph/test/graph_rewrite.cpp @@ -20,7 +20,7 @@ class TestPass : public ngraph::pass::MatcherPass : MatcherPass() { auto divide = std::make_shared( - element::Type_t::f32, Shape{}, pattern::has_class()); + element::f32, Shape{}, pattern::has_class()); ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { if (m_transformation_callback(m.get_match_root())) { @@ -52,10 +52,10 @@ NGRAPH_RTTI_DEFINITION(Anchor, "Anchor", 0); std::shared_ptr get_function() { - auto data = std::make_shared(ngraph::element::Type_t::f32, - ngraph::Shape{3, 1, 2}); + auto data = + std::make_shared(ngraph::element::f32, ngraph::Shape{3, 1, 2}); auto divide_constant = - ngraph::opset3::Constant::create(ngraph::element::Type_t::f32, ngraph::Shape{1}, {1.5}); + ngraph::opset3::Constant::create(ngraph::element::f32, ngraph::Shape{1}, {1.5}); auto divide = std::make_shared(data, divide_constant); return std::make_shared(ngraph::NodeVector{divide}, ngraph::ParameterVector{data}); @@ -148,10 +148,10 @@ NGRAPH_RTTI_DEFINITION(PrivateDivide, "PrivateDivide", 0, ngraph::opset3::Divide std::shared_ptr get_derived_function() { - auto data = std::make_shared(ngraph::element::Type_t::f32, - ngraph::Shape{3, 1, 2}); + auto data = + std::make_shared(ngraph::element::f32, ngraph::Shape{3, 1, 2}); auto divide_constant = - ngraph::opset3::Constant::create(ngraph::element::Type_t::f32, ngraph::Shape{1}, {1.5}); + ngraph::opset3::Constant::create(ngraph::element::f32, ngraph::Shape{1}, {1.5}); auto divide = std::make_shared(data, divide_constant); return std::make_shared(ngraph::NodeVector{divide}, ngraph::ParameterVector{data}); @@ -177,7 +177,7 @@ class TypeBasedTestPass : public ngraph::pass::MatcherPass auto divide = std::make_shared( std::make_shared(), std::make_shared()); - // element::Type_t::f32, Shape{}, pattern::has_class()); + // element::f32, Shape{}, pattern::has_class()); ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { if (m_transformation_callback(m.get_match_root())) { @@ -384,4 +384,4 @@ TEST(PassConfigTest, Test1) manager.run_passes(f); ASSERT_EQ(count_ops_of_type(f), 1); } -} +} \ No newline at end of file diff --git a/ngraph/test/input_output_assign.cpp b/ngraph/test/input_output_assign.cpp index 69c20a464123fc..d3213852f06d67 100644 --- a/ngraph/test/input_output_assign.cpp +++ b/ngraph/test/input_output_assign.cpp @@ -28,7 +28,7 @@ using namespace ngraph; TEST(input_output, param_tensor) { // Params have no arguments, so we can check that the value becomes a tensor output - element::Type et = element::Type_t::f32; + auto& et = element::f32; Shape shape{2, 4}; auto param = make_shared(et, shape); @@ -39,8 +39,8 @@ TEST(input_output, param_tensor) TEST(input_output, simple_output) { - auto param_0 = make_shared(element::Type_t::f32, Shape{2, 4}); - auto param_1 = make_shared(element::Type_t::f32, Shape{2, 4}); + auto param_0 = make_shared(element::f32, Shape{2, 4}); + auto param_1 = make_shared(element::f32, Shape{2, 4}); auto add = make_shared(param_0, param_1); // Sort the ops diff --git a/ngraph/test/matcher_pass.cpp b/ngraph/test/matcher_pass.cpp index 1bba9331bb0b1e..be2dadfed1d5f2 100644 --- a/ngraph/test/matcher_pass.cpp +++ b/ngraph/test/matcher_pass.cpp @@ -74,7 +74,7 @@ TEST(pattern, matcher_pass) { { TestMatcherPass test_matcher; - auto a = make_shared(element::Type_t::f32, Shape{1}); + auto a = make_shared(element::f32, Shape{1}); auto b = make_shared(a); auto c = make_shared(b); auto f = std::make_shared(ngraph::NodeVector{c}, ParameterVector{a}); @@ -92,7 +92,7 @@ TEST(pattern, matcher_pass) { TestMatcherPass test_matcher; - auto a = make_shared(element::Type_t::f32, Shape{1}); + auto a = make_shared(element::f32, Shape{1}); auto b = make_shared(a); auto c = make_shared(b); auto f = std::make_shared(ngraph::NodeVector{b, c}, ParameterVector{a}); @@ -103,7 +103,7 @@ TEST(pattern, matcher_pass) { std::shared_ptr f; { - auto a = make_shared(element::Type_t::f32, Shape{1}); + auto a = make_shared(element::f32, Shape{1}); auto b = make_shared(a); auto c = make_shared(b); auto d = make_shared(c); @@ -117,4 +117,4 @@ TEST(pattern, matcher_pass) // Parameter->Relu->Result ASSERT_TRUE(f->get_ops().size() == 3); } -} +} \ No newline at end of file diff --git a/ngraph/test/node_input_output.cpp b/ngraph/test/node_input_output.cpp index 473571f4208aa4..da88e389359a66 100644 --- a/ngraph/test/node_input_output.cpp +++ b/ngraph/test/node_input_output.cpp @@ -30,8 +30,8 @@ using namespace std; TEST(node_input_output, input_create) { - auto x = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - auto y = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); + auto x = make_shared(element::f32, Shape{1, 2, 3, 4}); + auto y = make_shared(element::f32, Shape{1, 2, 3, 4}); auto add = make_shared(x, y); auto add_in_0 = add->input(0); @@ -39,14 +39,14 @@ TEST(node_input_output, input_create) EXPECT_EQ(add_in_0.get_node(), add.get()); EXPECT_EQ(add_in_0.get_index(), 0); - EXPECT_EQ(add_in_0.get_element_type(), element::Type_t::f32); + EXPECT_EQ(add_in_0.get_element_type(), element::f32); EXPECT_EQ(add_in_0.get_shape(), (Shape{1, 2, 3, 4})); EXPECT_TRUE(add_in_0.get_partial_shape().same_scheme(PartialShape{1, 2, 3, 4})); EXPECT_EQ(add_in_0.get_source_output(), Output(x, 0)); EXPECT_EQ(add_in_1.get_node(), add.get()); EXPECT_EQ(add_in_1.get_index(), 1); - EXPECT_EQ(add_in_1.get_element_type(), element::Type_t::f32); + EXPECT_EQ(add_in_1.get_element_type(), element::f32); EXPECT_EQ(add_in_1.get_shape(), (Shape{1, 2, 3, 4})); EXPECT_TRUE(add_in_1.get_partial_shape().same_scheme(PartialShape{1, 2, 3, 4})); EXPECT_EQ(add_in_1.get_source_output(), Output(y, 0)); @@ -56,8 +56,8 @@ TEST(node_input_output, input_create) TEST(node_input_output, input_create_const) { - auto x = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - auto y = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); + auto x = make_shared(element::f32, Shape{1, 2, 3, 4}); + auto y = make_shared(element::f32, Shape{1, 2, 3, 4}); auto add = make_shared(x, y); auto add_in_0 = add->input(0); @@ -65,14 +65,14 @@ TEST(node_input_output, input_create_const) EXPECT_EQ(add_in_0.get_node(), add.get()); EXPECT_EQ(add_in_0.get_index(), 0); - EXPECT_EQ(add_in_0.get_element_type(), element::Type_t::f32); + EXPECT_EQ(add_in_0.get_element_type(), element::f32); EXPECT_EQ(add_in_0.get_shape(), (Shape{1, 2, 3, 4})); EXPECT_TRUE(add_in_0.get_partial_shape().same_scheme(PartialShape{1, 2, 3, 4})); EXPECT_EQ(add_in_0.get_source_output(), Output(x, 0)); EXPECT_EQ(add_in_1.get_node(), add.get()); EXPECT_EQ(add_in_1.get_index(), 1); - EXPECT_EQ(add_in_1.get_element_type(), element::Type_t::f32); + EXPECT_EQ(add_in_1.get_element_type(), element::f32); EXPECT_EQ(add_in_1.get_shape(), (Shape{1, 2, 3, 4})); EXPECT_TRUE(add_in_1.get_partial_shape().same_scheme(PartialShape{1, 2, 3, 4})); EXPECT_EQ(add_in_1.get_source_output(), Output(y, 0)); @@ -82,15 +82,15 @@ TEST(node_input_output, input_create_const) TEST(node_input_output, output_create) { - auto x = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - auto y = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); + auto x = make_shared(element::f32, Shape{1, 2, 3, 4}); + auto y = make_shared(element::f32, Shape{1, 2, 3, 4}); auto add = make_shared(x, y); auto add_out_0 = add->output(0); EXPECT_EQ(add_out_0.get_node(), add.get()); EXPECT_EQ(add_out_0.get_index(), 0); - EXPECT_EQ(add_out_0.get_element_type(), element::Type_t::f32); + EXPECT_EQ(add_out_0.get_element_type(), element::f32); EXPECT_EQ(add_out_0.get_shape(), (Shape{1, 2, 3, 4})); EXPECT_TRUE(add_out_0.get_partial_shape().same_scheme(PartialShape{1, 2, 3, 4})); @@ -99,15 +99,15 @@ TEST(node_input_output, output_create) TEST(node_input_output, output_create_const) { - auto x = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - auto y = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); + auto x = make_shared(element::f32, Shape{1, 2, 3, 4}); + auto y = make_shared(element::f32, Shape{1, 2, 3, 4}); auto add = make_shared(x, y); auto add_out_0 = add->output(0); EXPECT_EQ(add_out_0.get_node(), add.get()); EXPECT_EQ(add_out_0.get_index(), 0); - EXPECT_EQ(add_out_0.get_element_type(), element::Type_t::f32); + EXPECT_EQ(add_out_0.get_element_type(), element::f32); EXPECT_EQ(add_out_0.get_shape(), (Shape{1, 2, 3, 4})); EXPECT_TRUE(add_out_0.get_partial_shape().same_scheme(PartialShape{1, 2, 3, 4})); diff --git a/ngraph/test/onnx/onnx_import.in.cpp b/ngraph/test/onnx/onnx_import.in.cpp index d7844873f6b276..0625b6f26133a7 100644 --- a/ngraph/test/onnx/onnx_import.in.cpp +++ b/ngraph/test/onnx/onnx_import.in.cpp @@ -426,7 +426,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_missing_input) "TestMissingIn", 1, "com.intel.ai", [](const onnx_import::Node& node) -> OutputVector { OutputVector ng_inputs{node.get_ng_inputs()}; std::shared_ptr result = std::make_shared( - element::Type_t::f32, ngraph::Shape{2, 2}, std::vector{1, 1, 1, 1}); + element::f32, ngraph::Shape{2, 2}, std::vector{1, 1, 1, 1}); for (const auto& ng_input : ng_inputs) { diff --git a/ngraph/test/onnx/onnx_import_controlflow.in.cpp b/ngraph/test/onnx/onnx_import_controlflow.in.cpp index be3168b40df96c..827c5b4d716fe0 100644 --- a/ngraph/test/onnx/onnx_import_controlflow.in.cpp +++ b/ngraph/test/onnx/onnx_import_controlflow.in.cpp @@ -49,16 +49,16 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_add) // Shape inference tests const auto& parameters = function->get_parameters(); EXPECT_EQ(parameters.size(), 1); - EXPECT_EQ(parameters.at(0)->get_element_type(), ngraph::element::Type_t::f32); + EXPECT_EQ(parameters.at(0)->get_element_type(), ngraph::element::f32); EXPECT_TRUE(parameters.at(0)->get_partial_shape().is_static()); EXPECT_EQ(parameters.at(0)->get_partial_shape().to_shape(), (Shape{1, 2})); const auto& results = function->get_results(); EXPECT_EQ(results.size(), 2); - EXPECT_EQ(function->get_output_element_type(0), ngraph::element::Type_t::f32); + EXPECT_EQ(function->get_output_element_type(0), ngraph::element::f32); EXPECT_TRUE(function->get_output_partial_shape(0).is_static()); EXPECT_EQ(function->get_output_shape(0), (Shape{1, 2})); - EXPECT_EQ(function->get_output_element_type(1), ngraph::element::Type_t::f32); + EXPECT_EQ(function->get_output_element_type(1), ngraph::element::f32); EXPECT_TRUE(function->get_output_partial_shape(1).is_static()); EXPECT_EQ(function->get_output_shape(1), (Shape{3, 2})); @@ -375,10 +375,10 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_trip_count_and_cond_skippe const auto& results = function->get_results(); EXPECT_EQ(results.size(), 2); - EXPECT_EQ(function->get_output_element_type(0), ngraph::element::Type_t::f32); + EXPECT_EQ(function->get_output_element_type(0), ngraph::element::f32); EXPECT_TRUE(function->get_output_partial_shape(0).is_static()); EXPECT_EQ(function->get_output_shape(0), (Shape{1, 2})); - EXPECT_EQ(function->get_output_element_type(1), ngraph::element::Type_t::f32); + EXPECT_EQ(function->get_output_element_type(1), ngraph::element::f32); // scan_outputs shape is not know if trip_count and termination condition is not determined EXPECT_TRUE(function->get_output_partial_shape(1).rank().is_dynamic()); } diff --git a/ngraph/test/op.cpp b/ngraph/test/op.cpp index ffc92ea124c3a3..e475d330efb6c3 100644 --- a/ngraph/test/op.cpp +++ b/ngraph/test/op.cpp @@ -33,14 +33,14 @@ using namespace ngraph; TEST(op, is_op) { - auto arg0 = make_shared(element::Type_t::f32, Shape{1}); + auto arg0 = make_shared(element::f32, Shape{1}); ASSERT_NE(nullptr, arg0); EXPECT_TRUE(op::is_parameter(arg0)); } TEST(op, is_parameter) { - auto arg0 = make_shared(element::Type_t::f32, Shape{1}); + auto arg0 = make_shared(element::f32, Shape{1}); ASSERT_NE(nullptr, arg0); auto t0 = make_shared(arg0, arg0); ASSERT_NE(nullptr, t0); @@ -49,7 +49,7 @@ TEST(op, is_parameter) TEST(op, provenance_tag) { - auto node = make_shared(element::Type_t::f32, Shape{1}); + auto node = make_shared(element::f32, Shape{1}); auto tag1 = "parameter node"; auto tag2 = "f32 node"; node->add_provenance_tag(tag1); @@ -104,7 +104,7 @@ TEST(op, variant) EXPECT_EQ(ship.x, 3); EXPECT_EQ(ship.y, 4); - auto node = make_shared(element::Type_t::f32, Shape{1}); + auto node = make_shared(element::f32, Shape{1}); node->get_rt_info()["A"] = var_ship; auto node_var_ship = node->get_rt_info().at("A"); ASSERT_TRUE((is_type>(node_var_ship))); diff --git a/ngraph/test/op_eval/floor_mod.cpp b/ngraph/test/op_eval/floor_mod.cpp index 8d1c3c765f95fd..2b2ad9a57df05e 100644 --- a/ngraph/test/op_eval/floor_mod.cpp +++ b/ngraph/test/op_eval/floor_mod.cpp @@ -30,8 +30,8 @@ using namespace ngraph; TEST(op_eval, floor_mod) { - auto a = make_shared(element::Type_t::f32, Shape{4}); - auto b = make_shared(element::Type_t::f32, Shape{4}); + auto a = make_shared(element::f32, Shape{4}); + auto b = make_shared(element::f32, Shape{4}); auto floor_mod = make_shared(a, b); auto fun = make_shared(OutputVector{floor_mod}, ParameterVector{a, b}); @@ -43,7 +43,7 @@ TEST(op_eval, floor_mod) ASSERT_TRUE(fun->evaluate({result}, {make_host_tensor(Shape{4}, a_value), make_host_tensor(Shape{4}, b_value)})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_shape(), Shape{4}); auto result_data = read_vector(result); for (size_t i = 0; i < expected_result.size(); i++) diff --git a/ngraph/test/op_eval/hsigmoid.cpp b/ngraph/test/op_eval/hsigmoid.cpp index 17763841d131c6..58e67e8baa35f8 100644 --- a/ngraph/test/op_eval/hsigmoid.cpp +++ b/ngraph/test/op_eval/hsigmoid.cpp @@ -30,7 +30,7 @@ using namespace ngraph; TEST(op_eval, hsigmoid) { - auto p = make_shared(element::Type_t::f32, Shape{3}); + auto p = make_shared(element::f32, Shape{3}); auto swish = make_shared(p); auto fun = make_shared(OutputVector{swish}, ParameterVector{p}); @@ -40,7 +40,7 @@ TEST(op_eval, hsigmoid) auto result = make_shared(); ASSERT_TRUE( fun->evaluate({result}, {make_host_tensor(Shape{3}, inputs)})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_shape(), Shape{3}); auto result_data = read_vector(result); for (auto i = 0; i < inputs.size(); i++) diff --git a/ngraph/test/op_eval/hswish.cpp b/ngraph/test/op_eval/hswish.cpp index 3091b208a25ae9..1de6087f5f4e52 100644 --- a/ngraph/test/op_eval/hswish.cpp +++ b/ngraph/test/op_eval/hswish.cpp @@ -30,7 +30,7 @@ using namespace ngraph; TEST(op_eval, hswish) { - auto p = make_shared(element::Type_t::f32, Shape{3}); + auto p = make_shared(element::f32, Shape{3}); auto swish = make_shared(p); auto fun = make_shared(OutputVector{swish}, ParameterVector{p}); @@ -40,7 +40,7 @@ TEST(op_eval, hswish) auto result = make_shared(); ASSERT_TRUE( fun->evaluate({result}, {make_host_tensor(Shape{3}, inputs)})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_shape(), Shape{3}); auto result_data = read_vector(result); for (auto i = 0; i < inputs.size(); i++) diff --git a/ngraph/test/op_eval/interpolate.cpp b/ngraph/test/op_eval/interpolate.cpp index aaa637341f8aaa..239bcacbaaa5a3 100644 --- a/ngraph/test/op_eval/interpolate.cpp +++ b/ngraph/test/op_eval/interpolate.cpp @@ -165,11 +165,11 @@ TEST(op_eval, interpolate_v4_cubic) std::size_t i = 0; for (const auto& s : shapes_and_attrs) { - auto image = std::make_shared(element::Type_t::f32, data_shape); + auto image = std::make_shared(element::f32, data_shape); auto target_spatial_shape = - op::Constant::create(element::Type_t::i64, Shape{2}, s.spatial_shape); - auto scales = op::Constant::create(element::Type_t::f32, Shape{2}, s.scales_data); - auto axes = op::Constant::create(element::Type_t::i64, Shape{2}, {2, 3}); + op::Constant::create(element::i64, Shape{2}, s.spatial_shape); + auto scales = op::Constant::create(element::f32, Shape{2}, s.scales_data); + auto axes = op::Constant::create(element::i64, Shape{2}, {2, 3}); InterpolateAttrs attrs; attrs.mode = InterpolateMode::cubic; @@ -187,7 +187,7 @@ TEST(op_eval, interpolate_v4_cubic) auto result = std::make_shared(); ASSERT_TRUE(fun->evaluate( {result}, {make_host_tensor(data_shape, input_data)})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_shape(), s.out_shape); auto result_vector = read_vector(result); std::size_t num_of_elems = shape_size(s.out_shape); @@ -377,11 +377,11 @@ TEST(op_eval, interpolate_v4_nearest) std::size_t i = 0; for (const auto& s : shapes_and_attrs) { - auto image = std::make_shared(element::Type_t::f32, s.input_data_shape); + auto image = std::make_shared(element::f32, s.input_data_shape); auto target_spatial_shape = - op::Constant::create(element::Type_t::i64, Shape{2}, s.spatial_shape); - auto scales = op::Constant::create(element::Type_t::f32, Shape{2}, s.scales_data); - auto axes = op::Constant::create(element::Type_t::i64, Shape{2}, {2, 3}); + op::Constant::create(element::i64, Shape{2}, s.spatial_shape); + auto scales = op::Constant::create(element::f32, Shape{2}, s.scales_data); + auto axes = op::Constant::create(element::i64, Shape{2}, {2, 3}); InterpolateAttrs attrs; attrs.mode = InterpolateMode::nearest; @@ -400,7 +400,7 @@ TEST(op_eval, interpolate_v4_nearest) ASSERT_TRUE(fun->evaluate( {result}, {make_host_tensor(s.input_data_shape, input_data_list[i])})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_shape(), s.out_shape); auto result_vector = read_vector(result); std::size_t num_of_elems = shape_size(s.out_shape); @@ -523,11 +523,11 @@ TEST(op_eval, interpolate_v4_linear_onnx) std::size_t i = 0; for (const auto& s : shapes_and_attrs) { - auto image = std::make_shared(element::Type_t::f32, s.input_data_shape); + auto image = std::make_shared(element::f32, s.input_data_shape); auto target_spatial_shape = - op::Constant::create(element::Type_t::i64, Shape{2}, s.spatial_shape); - auto scales = op::Constant::create(element::Type_t::f32, Shape{2}, s.scales_data); - auto axes = op::Constant::create(element::Type_t::i64, Shape{2}, {2, 3}); + op::Constant::create(element::i64, Shape{2}, s.spatial_shape); + auto scales = op::Constant::create(element::f32, Shape{2}, s.scales_data); + auto axes = op::Constant::create(element::i64, Shape{2}, {2, 3}); InterpolateAttrs attrs; attrs.mode = InterpolateMode::linear_onnx; @@ -546,7 +546,7 @@ TEST(op_eval, interpolate_v4_linear_onnx) ASSERT_TRUE(fun->evaluate( {result}, {make_host_tensor(s.input_data_shape, input_data_list[i])})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_shape(), s.out_shape); auto result_vector = read_vector(result); std::size_t num_of_elems = shape_size(s.out_shape); diff --git a/ngraph/test/op_eval/matmul.cpp b/ngraph/test/op_eval/matmul.cpp index 265fdc96cd2b4e..b74c02a8299be2 100644 --- a/ngraph/test/op_eval/matmul.cpp +++ b/ngraph/test/op_eval/matmul.cpp @@ -28,8 +28,8 @@ using namespace ngraph; TEST(op_eval, matmul_dynamic_1D_arg) { - auto arg0 = make_shared(element::Type_t::i32, PartialShape::dynamic()); - auto arg1 = make_shared(element::Type_t::i32, PartialShape::dynamic()); + auto arg0 = make_shared(element::i32, PartialShape::dynamic()); + auto arg1 = make_shared(element::i32, PartialShape::dynamic()); auto matmul = make_shared(arg0, arg1, false, false); auto fun = make_shared(OutputVector{matmul}, ParameterVector{arg0, arg1}); @@ -59,8 +59,8 @@ TEST(op_eval, matmul_dynamic_1D_arg) TEST(op_eval, matmul_dynamic_0_elem_arg) { - auto arg0 = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto arg1 = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto arg0 = make_shared(element::f32, PartialShape::dynamic()); + auto arg1 = make_shared(element::f32, PartialShape::dynamic()); auto matmul = make_shared(arg0, arg1, false, false); auto fun = make_shared(OutputVector{matmul}, ParameterVector{arg0, arg1}); @@ -85,8 +85,8 @@ TEST(op_eval, matmul_dynamic_0_elem_arg) TEST(op_eval, matmul_dynamic_2D_args) { - auto arg0 = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto arg1 = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto arg0 = make_shared(element::f32, PartialShape::dynamic()); + auto arg1 = make_shared(element::f32, PartialShape::dynamic()); auto matmul = make_shared(arg0, arg1, false, false); auto fun = make_shared(OutputVector{matmul}, ParameterVector{arg0, arg1}); @@ -107,8 +107,8 @@ TEST(op_eval, matmul_dynamic_2D_args) TEST(op_eval, matmul_dynamic_2D_transpose0) { - auto arg0 = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto arg1 = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto arg0 = make_shared(element::f32, PartialShape::dynamic()); + auto arg1 = make_shared(element::f32, PartialShape::dynamic()); auto matmul = make_shared(arg0, arg1, true, false); auto fun = make_shared(OutputVector{matmul}, ParameterVector{arg0, arg1}); @@ -128,8 +128,8 @@ TEST(op_eval, matmul_dynamic_2D_transpose0) TEST(op_eval, matmul_dynamic_2D_transpose1) { - auto arg0 = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto arg1 = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto arg0 = make_shared(element::f32, PartialShape::dynamic()); + auto arg1 = make_shared(element::f32, PartialShape::dynamic()); auto matmul = make_shared(arg0, arg1, false, true); auto fun = make_shared(OutputVector{matmul}, ParameterVector{arg0, arg1}); @@ -149,8 +149,8 @@ TEST(op_eval, matmul_dynamic_2D_transpose1) TEST(op_eval, matmul_dynamic_same_batch_size) { - auto arg0 = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto arg1 = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto arg0 = make_shared(element::f32, PartialShape::dynamic()); + auto arg1 = make_shared(element::f32, PartialShape::dynamic()); auto matmul = make_shared(arg0, arg1, false, false); auto fun = make_shared(OutputVector{matmul}, ParameterVector{arg0, arg1}); @@ -177,8 +177,8 @@ TEST(op_eval, matmul_dynamic_same_batch_size) TEST(op_eval, matmul_dynamic_broadcast) { - auto arg0 = make_shared(element::Type_t::i64, PartialShape::dynamic()); - auto arg1 = make_shared(element::Type_t::i64, PartialShape::dynamic()); + auto arg0 = make_shared(element::i64, PartialShape::dynamic()); + auto arg1 = make_shared(element::i64, PartialShape::dynamic()); auto matmul = make_shared(arg0, arg1, false, false); auto fun = make_shared(OutputVector{matmul}, ParameterVector{arg0, arg1}); @@ -229,8 +229,8 @@ TEST(op_eval, matmul_dynamic_broadcast) TEST(op_eval, matmul_dynamic_broadcast_transpose0) { - auto arg0 = make_shared(element::Type_t::i64, PartialShape::dynamic()); - auto arg1 = make_shared(element::Type_t::i64, PartialShape::dynamic()); + auto arg0 = make_shared(element::i64, PartialShape::dynamic()); + auto arg1 = make_shared(element::i64, PartialShape::dynamic()); auto matmul = make_shared(arg0, arg1, true, false); auto fun = make_shared(OutputVector{matmul}, ParameterVector{arg0, arg1}); @@ -265,8 +265,8 @@ TEST(op_eval, matmul_dynamic_broadcast_transpose0) TEST(op_eval, matmul_dynamic_broadcast_transpose1) { - auto arg0 = make_shared(element::Type_t::i64, PartialShape::dynamic()); - auto arg1 = make_shared(element::Type_t::i64, PartialShape::dynamic()); + auto arg0 = make_shared(element::i64, PartialShape::dynamic()); + auto arg1 = make_shared(element::i64, PartialShape::dynamic()); auto matmul = make_shared(arg0, arg1, false, true); auto fun = make_shared(OutputVector{matmul}, ParameterVector{arg0, arg1}); diff --git a/ngraph/test/op_eval/mish.cpp b/ngraph/test/op_eval/mish.cpp index 2fb4251d155574..acc81f0e95f17d 100644 --- a/ngraph/test/op_eval/mish.cpp +++ b/ngraph/test/op_eval/mish.cpp @@ -31,7 +31,7 @@ using namespace ngraph; TEST(op_eval, mish_0D) { - auto p = make_shared(element::Type_t::f32, Shape{}); + auto p = make_shared(element::f32, Shape{}); auto mish = make_shared(p); auto fun = make_shared(OutputVector{mish}, ParameterVector{p}); @@ -43,7 +43,7 @@ TEST(op_eval, mish_0D) auto result = make_shared(); ASSERT_TRUE( fun->evaluate({result}, {make_host_tensor(Shape{}, inputs[i])})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_shape(), (Shape{})); auto result_data = read_vector(result); EXPECT_NEAR(result_data[0], expected_result[i][0], 0.000001); diff --git a/ngraph/test/op_eval/non_zero.cpp b/ngraph/test/op_eval/non_zero.cpp index 1d56e80bac002b..52f6aa6b607f4e 100644 --- a/ngraph/test/op_eval/non_zero.cpp +++ b/ngraph/test/op_eval/non_zero.cpp @@ -31,8 +31,8 @@ using namespace ngraph; TEST(op_eval, non_zero_0D) { - auto p = make_shared(element::Type_t::i32, Shape{}); - auto non_zero = make_shared(p, element::Type_t::i64); + auto p = make_shared(element::i32, Shape{}); + auto non_zero = make_shared(p, element::i64); auto fun = make_shared(OutputVector{non_zero}, ParameterVector{p}); std::vector> inputs{{-1}, {1}, {20}}; @@ -43,7 +43,7 @@ TEST(op_eval, non_zero_0D) auto result = make_shared(); ASSERT_TRUE( fun->evaluate({result}, {make_host_tensor(Shape{}, inputs[i])})); - EXPECT_EQ(result->get_element_type(), element::Type_t::i64); + EXPECT_EQ(result->get_element_type(), element::i64); EXPECT_EQ(result->get_shape(), (Shape{1, 1})); auto result_data = read_vector(result); ASSERT_EQ(result_data, expected_result[i]); @@ -52,13 +52,13 @@ TEST(op_eval, non_zero_0D) TEST(op_eval, non_zero_0D_0) { - auto p = make_shared(element::Type_t::i32, Shape{}); - auto non_zero = make_shared(p, element::Type_t::i64); + auto p = make_shared(element::i32, Shape{}); + auto non_zero = make_shared(p, element::i64); auto fun = make_shared(OutputVector{non_zero}, ParameterVector{p}); auto result = make_shared(); ASSERT_TRUE(fun->evaluate({result}, {make_host_tensor(Shape{}, {0})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::i64); + EXPECT_EQ(result->get_element_type(), element::i64); EXPECT_EQ(result->get_shape(), (Shape{0, 0})); auto result_data = read_vector(result); ASSERT_EQ(result_data.data(), nullptr); @@ -67,8 +67,8 @@ TEST(op_eval, non_zero_0D_0) TEST(op_eval, non_zero_1D) { Shape p_shape{5}; - auto p = make_shared(element::Type_t::f32, p_shape); - auto non_zero = make_shared(p, element::Type_t::i32); + auto p = make_shared(element::f32, p_shape); + auto non_zero = make_shared(p, element::i32); auto fun = make_shared(OutputVector{non_zero}, ParameterVector{p}); std::vector> inputs{ {1.0, 0, 3.0, 4.0, 0}, {0, 0, 0, 1.0, 3.2}, {1.0, 1.0, 1.0, 1.0, 1.0}}; @@ -79,7 +79,7 @@ TEST(op_eval, non_zero_1D) auto result = make_shared(); ASSERT_TRUE( fun->evaluate({result}, {make_host_tensor(p_shape, inputs[i])})); - EXPECT_EQ(result->get_element_type(), element::Type_t::i32); + EXPECT_EQ(result->get_element_type(), element::i32); EXPECT_EQ(result->get_shape(), expected_output_shape[i]); auto result_data = read_vector(result); ASSERT_EQ(result_data, expected_result[i]); @@ -89,14 +89,14 @@ TEST(op_eval, non_zero_1D) TEST(op_eval, non_zero_1D_0s) { Shape p_shape{5}; - auto p = make_shared(element::Type_t::f32, p_shape); - auto non_zero = make_shared(p, element::Type_t::i64); + auto p = make_shared(element::f32, p_shape); + auto non_zero = make_shared(p, element::i64); auto fun = make_shared(OutputVector{non_zero}, ParameterVector{p}); std::vector input(shape_size(p_shape), 0); auto result = make_shared(); ASSERT_TRUE(fun->evaluate({result}, {make_host_tensor(p_shape, input)})); - EXPECT_EQ(result->get_element_type(), element::Type_t::i64); + EXPECT_EQ(result->get_element_type(), element::i64); EXPECT_EQ(result->get_shape(), (Shape{1, 0})); auto result_data = read_vector(result); ASSERT_EQ(result_data.data(), nullptr); @@ -105,7 +105,7 @@ TEST(op_eval, non_zero_1D_0s) TEST(op_eval, non_zero_2D) { Shape p_shape{3, 2}; - auto p = make_shared(element::Type_t::i32, p_shape); + auto p = make_shared(element::i32, p_shape); auto non_zero = make_shared(p); auto fun = make_shared(OutputVector{non_zero}, ParameterVector{p}); std::vector> inputs{ @@ -118,7 +118,7 @@ TEST(op_eval, non_zero_2D) auto result = make_shared(); ASSERT_TRUE( fun->evaluate({result}, {make_host_tensor(p_shape, inputs[i])})); - EXPECT_EQ(result->get_element_type(), element::Type_t::i64); + EXPECT_EQ(result->get_element_type(), element::i64); EXPECT_EQ(result->get_shape(), expected_output_shape[i]); auto result_data = read_vector(result); ASSERT_EQ(result_data, expected_result[i]); @@ -128,8 +128,8 @@ TEST(op_eval, non_zero_2D) TEST(op_eval, non_zero_3D) { Shape p_shape{3, 2, 2}; - auto p = make_shared(element::Type_t::i64, p_shape); - auto non_zero = make_shared(p, element::Type_t::i32); + auto p = make_shared(element::i64, p_shape); + auto non_zero = make_shared(p, element::i32); auto fun = make_shared(OutputVector{non_zero}, ParameterVector{p}); std::vector> inputs{{1, 0, 3, 4, 0, 1, 0, 0, 1, 3, 5, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}}; @@ -143,7 +143,7 @@ TEST(op_eval, non_zero_3D) auto result = make_shared(); ASSERT_TRUE( fun->evaluate({result}, {make_host_tensor(p_shape, inputs[i])})); - EXPECT_EQ(result->get_element_type(), element::Type_t::i32); + EXPECT_EQ(result->get_element_type(), element::i32); EXPECT_EQ(result->get_shape(), expected_output_shape[i]); auto result_data = read_vector(result); ASSERT_EQ(result_data, expected_result[i]); @@ -153,14 +153,14 @@ TEST(op_eval, non_zero_3D) TEST(op_eval, non_zero_3D_0s) { Shape p_shape{3, 2, 2}; - auto p = make_shared(element::Type_t::i64, p_shape); - auto non_zero = make_shared(p, element::Type_t::i32); + auto p = make_shared(element::i64, p_shape); + auto non_zero = make_shared(p, element::i32); auto fun = make_shared(OutputVector{non_zero}, ParameterVector{p}); std::vector input(shape_size(p_shape), 0); auto result = make_shared(); ASSERT_TRUE(fun->evaluate({result}, {make_host_tensor(p_shape, input)})); - EXPECT_EQ(result->get_element_type(), element::Type_t::i32); + EXPECT_EQ(result->get_element_type(), element::i32); EXPECT_EQ(result->get_shape(), (Shape{p_shape.size(), 0})); auto result_data = read_vector(result); ASSERT_EQ(result_data.data(), nullptr); @@ -169,7 +169,7 @@ TEST(op_eval, non_zero_3D_0s) TEST(op_eval, non_zero_dynamic) { PartialShape p_shape = PartialShape::dynamic(); - auto p = make_shared(element::Type_t::i32, p_shape); + auto p = make_shared(element::i32, p_shape); auto non_zero = make_shared(p); auto fun = make_shared(OutputVector{non_zero}, ParameterVector{p}); std::vector> inputs{ @@ -182,7 +182,7 @@ TEST(op_eval, non_zero_dynamic) auto result = make_shared(); ASSERT_TRUE(fun->evaluate( {result}, {make_host_tensor(input_shapes[i], inputs[i])})); - EXPECT_EQ(result->get_element_type(), element::Type_t::i64); + EXPECT_EQ(result->get_element_type(), element::i64); EXPECT_EQ(result->get_shape(), expected_output_shape[i]); auto result_data = read_vector(result); ASSERT_EQ(result_data, expected_result[i]); diff --git a/ngraph/test/op_eval/reduce_l1.cpp b/ngraph/test/op_eval/reduce_l1.cpp index ed49497178346f..544b31fc447697 100644 --- a/ngraph/test/op_eval/reduce_l1.cpp +++ b/ngraph/test/op_eval/reduce_l1.cpp @@ -30,8 +30,8 @@ using namespace ngraph; TEST(op_eval, reduce_l1_one_axis_keep_dims) { - auto data = make_shared(element::Type_t::f32, Shape{3, 2, 2}); - auto axes = opset4::Constant::create(element::Type_t::i32, Shape{1}, {2}); + auto data = make_shared(element::f32, Shape{3, 2, 2}); + auto axes = opset4::Constant::create(element::i32, Shape{1}, {2}); auto reduce = make_shared(data, axes, true); auto fun = make_shared(OutputVector{reduce}, ParameterVector{data}); @@ -42,7 +42,7 @@ TEST(op_eval, reduce_l1_one_axis_keep_dims) ASSERT_TRUE(fun->evaluate({result}, {make_host_tensor(Shape{3, 2, 2}, inputs), make_host_tensor(Shape{1}, {2})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_shape(), Shape{std::vector({3, 2, 1})}); auto result_data = read_vector(result); for (auto i = 0; i < expected_result.size(); i++) @@ -51,8 +51,8 @@ TEST(op_eval, reduce_l1_one_axis_keep_dims) TEST(op_eval, reduce_l1_one_axis_do_not_keep_dims) { - auto data = make_shared(element::Type_t::f32, Shape{3, 2, 2}); - auto axes = opset4::Constant::create(element::Type_t::i32, Shape{1}, {2}); + auto data = make_shared(element::f32, Shape{3, 2, 2}); + auto axes = opset4::Constant::create(element::i32, Shape{1}, {2}); auto reduce = make_shared(data, axes, false); auto fun = make_shared(OutputVector{reduce}, ParameterVector{data}); @@ -63,7 +63,7 @@ TEST(op_eval, reduce_l1_one_axis_do_not_keep_dims) ASSERT_TRUE(fun->evaluate({result}, {make_host_tensor(Shape{3, 2, 2}, inputs), make_host_tensor(Shape{1}, {2})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_shape(), Shape{std::vector({3, 2})}); auto result_data = read_vector(result); for (auto i = 0; i < expected_result.size(); i++) diff --git a/ngraph/test/op_eval/reduce_l2.cpp b/ngraph/test/op_eval/reduce_l2.cpp index d718e1a36854d7..d79bf067b7dc78 100644 --- a/ngraph/test/op_eval/reduce_l2.cpp +++ b/ngraph/test/op_eval/reduce_l2.cpp @@ -30,8 +30,8 @@ using namespace ngraph; TEST(op_eval, reduce_l2_one_axis_keep_dims) { - auto data = make_shared(element::Type_t::f32, Shape{3, 2, 2}); - auto axes = opset4::Constant::create(element::Type_t::i32, Shape{1}, {2}); + auto data = make_shared(element::f32, Shape{3, 2, 2}); + auto axes = opset4::Constant::create(element::i32, Shape{1}, {2}); auto reduce = make_shared(data, axes, true); auto fun = make_shared(OutputVector{reduce}, ParameterVector{data}); @@ -43,7 +43,7 @@ TEST(op_eval, reduce_l2_one_axis_keep_dims) ASSERT_TRUE(fun->evaluate({result}, {make_host_tensor(Shape{3, 2, 2}, inputs), make_host_tensor(Shape{1}, {2})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_shape(), Shape{std::vector({3, 2, 1})}); auto result_data = read_vector(result); for (auto i = 0; i < expected_result.size(); i++) @@ -52,8 +52,8 @@ TEST(op_eval, reduce_l2_one_axis_keep_dims) TEST(op_eval, reduce_l2_one_axis_do_not_keep_dims) { - auto data = make_shared(element::Type_t::f32, Shape{3, 2, 2}); - auto axes = opset4::Constant::create(element::Type_t::i32, Shape{1}, {2}); + auto data = make_shared(element::f32, Shape{3, 2, 2}); + auto axes = opset4::Constant::create(element::i32, Shape{1}, {2}); auto reduce = make_shared(data, axes, false); auto fun = make_shared(OutputVector{reduce}, ParameterVector{data}); @@ -65,7 +65,7 @@ TEST(op_eval, reduce_l2_one_axis_do_not_keep_dims) ASSERT_TRUE(fun->evaluate({result}, {make_host_tensor(Shape{3, 2, 2}, inputs), make_host_tensor(Shape{1}, {2})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_shape(), Shape{std::vector({3, 2})}); auto result_data = read_vector(result); for (auto i = 0; i < expected_result.size(); i++) diff --git a/ngraph/test/op_eval/roi_align.cpp b/ngraph/test/op_eval/roi_align.cpp index 9e556671a4031f..3e43e1f810ddd9 100644 --- a/ngraph/test/op_eval/roi_align.cpp +++ b/ngraph/test/op_eval/roi_align.cpp @@ -42,9 +42,9 @@ TEST(op_eval, roi_align_avg_pool) const auto data_shape = Shape{N, C, H, W}; const auto rois_shape = Shape{num_rois, 4}; - const auto data = make_shared(element::Type_t::f32, data_shape); - const auto rois = make_shared(element::Type_t::f32, rois_shape); - const auto batch_indices = make_shared(element::Type_t::i32, Shape{num_rois}); + const auto data = make_shared(element::f32, data_shape); + const auto rois = make_shared(element::f32, rois_shape); + const auto batch_indices = make_shared(element::i32, Shape{num_rois}); auto roi_align = make_shared( data, rois, batch_indices, pooled_height, pooled_width, 2, 1.0f / 16.0f, "avg"); @@ -93,7 +93,7 @@ TEST(op_eval, roi_align_avg_pool) 56.8021f, 58.4375f, 58.4375f, 58.4375f, 58.4688f, 60.1042f, 60.1042f, 60.1042f, 60.1354f}; const auto expected_shape = Shape{num_rois, C, pooled_height, pooled_width}; - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_shape(), expected_shape); ASSERT_TRUE(test::all_close_f(read_vector(result), expected_vec, 6, 0.001)); } @@ -109,9 +109,9 @@ TEST(op_eval, roi_align_max_pool) const auto data_shape = Shape{N, C, H, W}; const auto rois_shape = Shape{num_rois, 4}; - const auto data = make_shared(element::Type_t::f32, data_shape); - const auto rois = make_shared(element::Type_t::f32, rois_shape); - const auto batch_indices = make_shared(element::Type_t::i32, Shape{num_rois}); + const auto data = make_shared(element::f32, data_shape); + const auto rois = make_shared(element::f32, rois_shape); + const auto batch_indices = make_shared(element::i32, Shape{num_rois}); auto roi_align = make_shared( data, rois, batch_indices, pooled_height, pooled_width, 2, 1.0f / 16.0f, "max"); @@ -160,7 +160,7 @@ TEST(op_eval, roi_align_max_pool) 40.1042f, 46.25f, 46.25f, 46.25f, 46.25f, 56.25f, 56.25f, 56.25f, 56.25f}; const auto expected_shape = Shape{num_rois, C, pooled_height, pooled_width}; - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_shape(), expected_shape); ASSERT_TRUE(test::all_close_f(read_vector(result), expected_vec, 6, 0.001)); -} +} \ No newline at end of file diff --git a/ngraph/test/op_eval/roi_pooling.cpp b/ngraph/test/op_eval/roi_pooling.cpp index 00ed56cc87649a..c7057e866c74d7 100644 --- a/ngraph/test/op_eval/roi_pooling.cpp +++ b/ngraph/test/op_eval/roi_pooling.cpp @@ -43,8 +43,8 @@ NGRAPH_TEST(op_eval, roi_pooling_invalid_roi_batch_id) Shape pooled_shape{pooled_h, pooled_w}; Shape output_shape{num_rois, channels, pooled_h, pooled_w}; - const auto feat_maps = make_shared(element::Type_t::f32, feat_maps_shape); - const auto rois = make_shared(element::Type_t::f32, rois_shape); + const auto feat_maps = make_shared(element::f32, feat_maps_shape); + const auto rois = make_shared(element::f32, rois_shape); const auto roi_pooling = make_shared(feat_maps, rois, pooled_shape, spatial_scale, "max"); const auto f = make_shared(roi_pooling, ParameterVector{feat_maps, rois}); diff --git a/ngraph/test/op_eval/round.cpp b/ngraph/test/op_eval/round.cpp index a933b74ce3e6a1..e9807aa8047ed5 100644 --- a/ngraph/test/op_eval/round.cpp +++ b/ngraph/test/op_eval/round.cpp @@ -30,7 +30,7 @@ using namespace ngraph; TEST(op_eval, rounding_to_even) { - auto p = make_shared(element::Type_t::f32, Shape{9}); + auto p = make_shared(element::f32, Shape{9}); auto round = make_shared(p, op::v5::Round::RoundMode::HALF_TO_EVEN); auto fun = make_shared(OutputVector{round}, ParameterVector{p}); @@ -40,7 +40,7 @@ TEST(op_eval, rounding_to_even) auto result = make_shared(); ASSERT_TRUE( fun->evaluate({result}, {make_host_tensor(Shape{9}, inputs)})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_shape(), Shape{9}); auto result_data = read_vector(result); for (auto i = 0; i < inputs.size(); i++) @@ -49,7 +49,7 @@ TEST(op_eval, rounding_to_even) TEST(op_eval, rounding_away) { - auto p = make_shared(element::Type_t::f32, Shape{9}); + auto p = make_shared(element::f32, Shape{9}); auto round = make_shared(p, op::v5::Round::RoundMode::HALF_AWAY_FROM_ZERO); auto fun = make_shared(OutputVector{round}, ParameterVector{p}); @@ -59,7 +59,7 @@ TEST(op_eval, rounding_away) auto result = make_shared(); ASSERT_TRUE( fun->evaluate({result}, {make_host_tensor(Shape{9}, inputs)})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_shape(), Shape{9}); auto result_data = read_vector(result); for (auto i = 0; i < inputs.size(); i++) diff --git a/ngraph/test/op_eval/softplus.cpp b/ngraph/test/op_eval/softplus.cpp index 3e8ec24c724a9e..5404e741056fbc 100644 --- a/ngraph/test/op_eval/softplus.cpp +++ b/ngraph/test/op_eval/softplus.cpp @@ -30,7 +30,7 @@ using namespace ngraph; TEST(op_eval, softplus_4D) { - auto p = make_shared(element::Type_t::f32, Shape{4}); + auto p = make_shared(element::f32, Shape{4}); auto softplus = make_shared(p); auto fun = make_shared(OutputVector{softplus}, ParameterVector{p}); @@ -40,7 +40,7 @@ TEST(op_eval, softplus_4D) auto result = make_shared(); ASSERT_TRUE( fun->evaluate({result}, {make_host_tensor(Shape{4}, inputs)})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_shape(), Shape{4}); auto result_data = read_vector(result); for (size_t i = 0; i < inputs.size(); i++) diff --git a/ngraph/test/op_eval/split.cpp b/ngraph/test/op_eval/split.cpp index 0e538f76f34cd8..7f806303cc6d25 100644 --- a/ngraph/test/op_eval/split.cpp +++ b/ngraph/test/op_eval/split.cpp @@ -32,8 +32,8 @@ using namespace ngraph; TEST(op_eval, split) { const auto data_shape = Shape{3, 8, 3}; - const auto data = make_shared(element::Type_t::i64, data_shape); - const auto axis = make_shared(element::Type_t::i64, Shape{}); + const auto data = make_shared(element::i64, data_shape); + const auto axis = make_shared(element::i64, Shape{}); const size_t num_splits = 4; auto split = make_shared(data, axis, num_splits); @@ -61,7 +61,7 @@ TEST(op_eval, split) for (int i = 0; i < num_splits; ++i) { - EXPECT_EQ(results[i]->get_element_type(), element::Type_t::i64); + EXPECT_EQ(results[i]->get_element_type(), element::i64); EXPECT_EQ(results[i]->get_shape(), (Shape{3, 2, 3})); EXPECT_EQ(read_vector(results[i]), expected_results[i]); } @@ -70,8 +70,8 @@ TEST(op_eval, split) TEST(op_eval, split_neg_axis) { const auto data_shape = Shape{2, 1, 4, 1}; - const auto data = make_shared(element::Type_t::i64, data_shape); - const auto axis = make_shared(element::Type_t::i64, Shape{}); + const auto data = make_shared(element::i64, data_shape); + const auto axis = make_shared(element::i64, Shape{}); const size_t num_splits = 4; auto split = make_shared(data, axis, num_splits); @@ -95,7 +95,7 @@ TEST(op_eval, split_neg_axis) for (int i = 0; i < num_splits; ++i) { - EXPECT_EQ(results[i]->get_element_type(), element::Type_t::i64); + EXPECT_EQ(results[i]->get_element_type(), element::i64); EXPECT_EQ(results[i]->get_shape(), (Shape{2, 1, 1, 1})); EXPECT_EQ(read_vector(results[i]), expected_results[i]); } @@ -104,8 +104,8 @@ TEST(op_eval, split_neg_axis) TEST(op_eval, split_boolean_type) { const auto data_shape = Shape{2, 1, 2, 1, 2}; - const auto data = make_shared(element::Type_t::boolean, data_shape); - const auto axis = make_shared(element::Type_t::i64, Shape{}); + const auto data = make_shared(element::boolean, data_shape); + const auto axis = make_shared(element::i64, Shape{}); const size_t num_splits = 2; auto split = make_shared(data, axis, num_splits); @@ -129,7 +129,7 @@ TEST(op_eval, split_boolean_type) for (int i = 0; i < num_splits; ++i) { - EXPECT_EQ(results[i]->get_element_type(), element::Type_t::boolean); + EXPECT_EQ(results[i]->get_element_type(), element::boolean); EXPECT_EQ(results[i]->get_shape(), (Shape{2, 1, 1, 1, 2})); EXPECT_EQ(read_vector(results[i]), expected_results[i]); } @@ -138,8 +138,8 @@ TEST(op_eval, split_boolean_type) TEST(op_eval, split_1d) { const auto data_shape = Shape{8}; - const auto data = make_shared(element::Type_t::f32, data_shape); - const auto axis = make_shared(element::Type_t::i64, Shape{}); + const auto data = make_shared(element::f32, data_shape); + const auto axis = make_shared(element::i64, Shape{}); const size_t num_splits = 4; auto split = make_shared(data, axis, num_splits); @@ -164,7 +164,7 @@ TEST(op_eval, split_1d) for (int i = 0; i < num_splits; ++i) { - EXPECT_EQ(results[i]->get_element_type(), element::Type_t::f32); + EXPECT_EQ(results[i]->get_element_type(), element::f32); EXPECT_EQ(results[i]->get_shape(), (Shape{2})); EXPECT_EQ(read_vector(results[i]), expected_results[i]); } diff --git a/ngraph/test/op_eval/strided_slice.cpp b/ngraph/test/op_eval/strided_slice.cpp index 4d9f7c00c51ad6..f9229a1dbaacc6 100644 --- a/ngraph/test/op_eval/strided_slice.cpp +++ b/ngraph/test/op_eval/strided_slice.cpp @@ -32,10 +32,10 @@ using namespace ngraph; TEST(op_eval, strided_slice1) { auto A_shape = Shape{3, 2, 3}; - auto A = make_shared(element::Type_t::i64, A_shape); - auto begin = make_shared(element::Type_t::i64, Shape{3}); - auto end = make_shared(element::Type_t::i64, Shape{3}); - auto strides = make_shared(element::Type_t::i64, Shape{3}); + auto A = make_shared(element::i64, A_shape); + auto begin = make_shared(element::i64, Shape{3}); + auto end = make_shared(element::i64, Shape{3}); + auto strides = make_shared(element::i64, Shape{3}); auto r = make_shared(A, begin, end, @@ -66,7 +66,7 @@ TEST(op_eval, strided_slice1) make_host_tensor(Shape{3}, begin_vecs[i]), make_host_tensor(Shape{3}, end_vecs[i]), make_host_tensor(Shape{3}, strides_vecs[i])})); - EXPECT_EQ(result->get_element_type(), element::Type_t::i64); + EXPECT_EQ(result->get_element_type(), element::i64); EXPECT_EQ(result->get_shape(), expected_shape[i]); EXPECT_EQ(read_vector(result), expected_results[i]); } @@ -89,10 +89,10 @@ TEST(op_eval, strided_slice1) TEST(op_eval, strided_slice2) { auto A_shape = Shape{3, 2, 3}; - auto A = make_shared(element::Type_t::i64, A_shape); - auto begin = make_shared(element::Type_t::i64, Shape{3}); - auto end = make_shared(element::Type_t::i64, Shape{3}); - auto strides = make_shared(element::Type_t::i64, Shape{3}); + auto A = make_shared(element::i64, A_shape); + auto begin = make_shared(element::i64, Shape{3}); + auto end = make_shared(element::i64, Shape{3}); + auto strides = make_shared(element::i64, Shape{3}); std::vector begin_vec{1, 0, 0}; std::vector end_vec{0, 0, 0}; @@ -123,7 +123,7 @@ TEST(op_eval, strided_slice2) make_host_tensor(Shape{3}, begin_vec), make_host_tensor(Shape{3}, end_vec), make_host_tensor(Shape{3}, strides_vec)})); - EXPECT_EQ(result->get_element_type(), element::Type_t::i64); + EXPECT_EQ(result->get_element_type(), element::i64); EXPECT_EQ(result->get_shape(), expected_shape); EXPECT_EQ(read_vector(result), expected); } @@ -136,10 +136,10 @@ TEST(op_eval, strided_slice2) TEST(op_eval, strided_slice3) { auto A_shape = Shape{3, 2, 3}; - auto A = make_shared(element::Type_t::i64, A_shape); - auto begin = make_shared(element::Type_t::i64, Shape{3}); - auto end = make_shared(element::Type_t::i64, Shape{3}); - auto strides = make_shared(element::Type_t::i64, Shape{3}); + auto A = make_shared(element::i64, A_shape); + auto begin = make_shared(element::i64, Shape{3}); + auto end = make_shared(element::i64, Shape{3}); + auto strides = make_shared(element::i64, Shape{3}); std::vector begin_vec{0, 1, 0}; std::vector end_vec{2, 0, 0}; @@ -170,7 +170,7 @@ TEST(op_eval, strided_slice3) make_host_tensor(Shape{3}, begin_vec), make_host_tensor(Shape{3}, end_vec), make_host_tensor(Shape{3}, strides_vec)})); - EXPECT_EQ(result->get_element_type(), element::Type_t::i64); + EXPECT_EQ(result->get_element_type(), element::i64); EXPECT_EQ(result->get_shape(), expected_shape); EXPECT_EQ(read_vector(result), expected); } @@ -183,10 +183,10 @@ TEST(op_eval, strided_slice3) TEST(op_eval, strided_slice_reverse) { auto A_shape = Shape{3, 2, 3}; - auto A = make_shared(element::Type_t::i64, A_shape); - auto begin = make_shared(element::Type_t::i64, Shape{3}); - auto end = make_shared(element::Type_t::i64, Shape{3}); - auto strides = make_shared(element::Type_t::i64, Shape{3}); + auto A = make_shared(element::i64, A_shape); + auto begin = make_shared(element::i64, Shape{3}); + auto end = make_shared(element::i64, Shape{3}); + auto strides = make_shared(element::i64, Shape{3}); std::vector begin_vec{0, 0, 0}; std::vector end_vec{1, 0, 0}; @@ -217,7 +217,7 @@ TEST(op_eval, strided_slice_reverse) make_host_tensor(Shape{3}, begin_vec), make_host_tensor(Shape{3}, end_vec), make_host_tensor(Shape{3}, strides_vec)})); - EXPECT_EQ(result->get_element_type(), element::Type_t::i64); + EXPECT_EQ(result->get_element_type(), element::i64); EXPECT_EQ(result->get_shape(), expected_shape); EXPECT_EQ(read_vector(result), expected); } diff --git a/ngraph/test/op_eval/swish.cpp b/ngraph/test/op_eval/swish.cpp index 9d57235b5884a3..26997dfc0fb5b7 100644 --- a/ngraph/test/op_eval/swish.cpp +++ b/ngraph/test/op_eval/swish.cpp @@ -30,8 +30,8 @@ using namespace ngraph; TEST(op_eval, swish_with_beta1) { - auto p = make_shared(element::Type_t::f32, Shape{3}); - auto beta = make_shared(element::Type_t::f32, Shape{}); + auto p = make_shared(element::f32, Shape{3}); + auto beta = make_shared(element::f32, Shape{}); auto swish = make_shared(p, beta); auto fun = make_shared(OutputVector{swish}, ParameterVector{p, beta}); @@ -42,7 +42,7 @@ TEST(op_eval, swish_with_beta1) ASSERT_TRUE(fun->evaluate({result}, {make_host_tensor(Shape{3}, inputs), make_host_tensor(Shape{}, {1.0})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_shape(), Shape{3}); auto result_data = read_vector(result); for (auto i = 0; i < inputs.size(); i++) @@ -51,8 +51,8 @@ TEST(op_eval, swish_with_beta1) TEST(op_eval, swish_with_beta0_75) { - auto p = make_shared(element::Type_t::f32, Shape{3}); - auto beta = make_shared(element::Type_t::f32, Shape{}); + auto p = make_shared(element::f32, Shape{3}); + auto beta = make_shared(element::f32, Shape{}); auto swish = make_shared(p, beta); auto fun = make_shared(OutputVector{swish}, ParameterVector{p, beta}); @@ -63,7 +63,7 @@ TEST(op_eval, swish_with_beta0_75) ASSERT_TRUE(fun->evaluate({result}, {make_host_tensor(Shape{3}, inputs), make_host_tensor(Shape{}, {0.75})})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_shape(), Shape{3}); auto result_data = read_vector(result); for (auto i = 0; i < inputs.size(); i++) @@ -72,7 +72,7 @@ TEST(op_eval, swish_with_beta0_75) TEST(op_eval, swish_without_beta) { - auto p = make_shared(element::Type_t::f32, Shape{3}); + auto p = make_shared(element::f32, Shape{3}); auto swish = make_shared(p); auto fun = make_shared(OutputVector{swish}, ParameterVector{p}); @@ -82,7 +82,7 @@ TEST(op_eval, swish_without_beta) auto result = make_shared(); ASSERT_TRUE( fun->evaluate({result}, {make_host_tensor(Shape{3}, inputs)})); - EXPECT_EQ(result->get_element_type(), element::Type_t::f32); + EXPECT_EQ(result->get_element_type(), element::f32); EXPECT_EQ(result->get_shape(), Shape{3}); auto result_data = read_vector(result); for (auto i = 0; i < inputs.size(); i++) diff --git a/ngraph/test/op_eval/variadic_split.cpp b/ngraph/test/op_eval/variadic_split.cpp index 40b8ec9ad8871a..ff8942dbd231fe 100644 --- a/ngraph/test/op_eval/variadic_split.cpp +++ b/ngraph/test/op_eval/variadic_split.cpp @@ -32,9 +32,9 @@ using namespace ngraph; TEST(op_eval, variadic_split_same_lengths) { const auto data_shape = Shape{3, 8, 3}; - const auto data = make_shared(element::Type_t::i64, data_shape); - const auto axis = make_shared(element::Type_t::i64, Shape{}); - const auto split_lengths = make_shared(element::Type_t::i64, Shape{4}); + const auto data = make_shared(element::i64, data_shape); + const auto axis = make_shared(element::i64, Shape{}); + const auto split_lengths = make_shared(element::i64, Shape{4}); auto var_split = make_shared(data, axis, split_lengths); @@ -62,7 +62,7 @@ TEST(op_eval, variadic_split_same_lengths) for (int i = 0; i < split_lengths_vec.size(); ++i) { - EXPECT_EQ(results[i]->get_element_type(), element::Type_t::i64); + EXPECT_EQ(results[i]->get_element_type(), element::i64); EXPECT_EQ(results[i]->get_shape(), (Shape{3, static_cast(split_lengths_vec[i]), 3})); EXPECT_EQ(read_vector(results[i]), expected_results[i]); @@ -72,9 +72,9 @@ TEST(op_eval, variadic_split_same_lengths) TEST(op_eval, variadic_split_different_lengths) { const auto data_shape = Shape{6, 2, 3}; - const auto data = make_shared(element::Type_t::i64, data_shape); - const auto axis = make_shared(element::Type_t::i64, Shape{}); - const auto split_lengths = make_shared(element::Type_t::i64, Shape{3}); + const auto data = make_shared(element::i64, data_shape); + const auto axis = make_shared(element::i64, Shape{}); + const auto split_lengths = make_shared(element::i64, Shape{3}); auto var_split = make_shared(data, axis, split_lengths); @@ -101,7 +101,7 @@ TEST(op_eval, variadic_split_different_lengths) for (int i = 0; i < split_lengths_vec.size(); ++i) { - EXPECT_EQ(results[i]->get_element_type(), element::Type_t::i64); + EXPECT_EQ(results[i]->get_element_type(), element::i64); EXPECT_EQ(results[i]->get_shape(), (Shape{static_cast(split_lengths_vec[i]), 2, 3})); EXPECT_EQ(read_vector(results[i]), expected_results[i]); @@ -111,9 +111,9 @@ TEST(op_eval, variadic_split_different_lengths) TEST(op_eval, variadic_split_neg_length) { const auto data_shape = Shape{2, 7, 1}; - const auto data = make_shared(element::Type_t::i64, data_shape); - const auto axis = make_shared(element::Type_t::i64, Shape{}); - const auto split_lengths = make_shared(element::Type_t::i64, Shape{3}); + const auto data = make_shared(element::i64, data_shape); + const auto axis = make_shared(element::i64, Shape{}); + const auto split_lengths = make_shared(element::i64, Shape{3}); auto var_split = make_shared(data, axis, split_lengths); @@ -139,7 +139,7 @@ TEST(op_eval, variadic_split_neg_length) const vector expected_lengths{3, 1, 3}; for (int i = 0; i < split_lengths_vec.size(); ++i) { - EXPECT_EQ(results[i]->get_element_type(), element::Type_t::i64); + EXPECT_EQ(results[i]->get_element_type(), element::i64); EXPECT_EQ(results[i]->get_shape(), (Shape{2, expected_lengths[i], 1})); EXPECT_EQ(read_vector(results[i]), expected_results[i]); } @@ -148,9 +148,9 @@ TEST(op_eval, variadic_split_neg_length) TEST(op_eval, variadic_split_neg_length_neg_axis) { const auto data_shape = Shape{2, 1, 5, 2}; - const auto data = make_shared(element::Type_t::i64, data_shape); - const auto axis = make_shared(element::Type_t::i64, Shape{}); - const auto split_lengths = make_shared(element::Type_t::i64, Shape{3}); + const auto data = make_shared(element::i64, data_shape); + const auto axis = make_shared(element::i64, Shape{}); + const auto split_lengths = make_shared(element::i64, Shape{3}); auto var_split = make_shared(data, axis, split_lengths); @@ -176,7 +176,7 @@ TEST(op_eval, variadic_split_neg_length_neg_axis) const vector expected_lengths{1, 2, 2}; for (int i = 0; i < split_lengths_vec.size(); ++i) { - EXPECT_EQ(results[i]->get_element_type(), element::Type_t::i64); + EXPECT_EQ(results[i]->get_element_type(), element::i64); EXPECT_EQ(results[i]->get_shape(), (Shape{2, 1, expected_lengths[i], 2})); EXPECT_EQ(read_vector(results[i]), expected_results[i]); } @@ -185,9 +185,9 @@ TEST(op_eval, variadic_split_neg_length_neg_axis) TEST(op_eval, variadic_split_neg_length_bool_data_type) { const auto data_shape = Shape{2, 1, 5}; - const auto data = make_shared(element::Type_t::boolean, data_shape); - const auto axis = make_shared(element::Type_t::i64, Shape{}); - const auto split_lengths = make_shared(element::Type_t::i64, Shape{3}); + const auto data = make_shared(element::boolean, data_shape); + const auto axis = make_shared(element::i64, Shape{}); + const auto split_lengths = make_shared(element::i64, Shape{3}); auto var_split = make_shared(data, axis, split_lengths); @@ -212,7 +212,7 @@ TEST(op_eval, variadic_split_neg_length_bool_data_type) const vector expected_lengths{1, 2, 2}; for (int i = 0; i < split_lengths_vec.size(); ++i) { - EXPECT_EQ(results[i]->get_element_type(), element::Type_t::boolean); + EXPECT_EQ(results[i]->get_element_type(), element::boolean); EXPECT_EQ(results[i]->get_shape(), (Shape{2, 1, expected_lengths[i]})); EXPECT_EQ(read_vector(results[i]), expected_results[i]); } @@ -221,9 +221,9 @@ TEST(op_eval, variadic_split_neg_length_bool_data_type) TEST(op_eval, variadic_split_neg_length_axis_ui64) { const auto data_shape = Shape{2, 1, 4, 2}; - const auto data = make_shared(element::Type_t::i64, data_shape); - const auto axis = make_shared(element::Type_t::u64, Shape{}); - const auto split_lengths = make_shared(element::Type_t::i64, Shape{2}); + const auto data = make_shared(element::i64, data_shape); + const auto axis = make_shared(element::u64, Shape{}); + const auto split_lengths = make_shared(element::i64, Shape{2}); auto var_split = make_shared(data, axis, split_lengths); @@ -250,7 +250,7 @@ TEST(op_eval, variadic_split_neg_length_axis_ui64) const vector expected_lengths{2, 2}; for (int i = 0; i < split_lengths_vec.size(); ++i) { - EXPECT_EQ(results[i]->get_element_type(), element::Type_t::i64); + EXPECT_EQ(results[i]->get_element_type(), element::i64); EXPECT_EQ(results[i]->get_shape(), (Shape{2, 1, expected_lengths[i], 2})); EXPECT_EQ(read_vector(results[i]), expected_results[i]); } @@ -259,9 +259,9 @@ TEST(op_eval, variadic_split_neg_length_axis_ui64) TEST(op_eval, variadic_split_data_float_length_i32) { const auto data_shape = Shape{2, 3, 3}; - const auto data = make_shared(element::Type_t::f32, data_shape); - const auto axis = make_shared(element::Type_t::i64, Shape{}); - const auto split_lengths = make_shared(element::Type_t::i32, Shape{3}); + const auto data = make_shared(element::f32, data_shape); + const auto axis = make_shared(element::i64, Shape{}); + const auto split_lengths = make_shared(element::i32, Shape{3}); auto var_split = make_shared(data, axis, split_lengths); @@ -288,7 +288,7 @@ TEST(op_eval, variadic_split_data_float_length_i32) const vector expected_lengths{1, 1, 1}; for (int i = 0; i < split_lengths_vec.size(); ++i) { - EXPECT_EQ(results[i]->get_element_type(), element::Type_t::f32); + EXPECT_EQ(results[i]->get_element_type(), element::f32); EXPECT_EQ(results[i]->get_shape(), (Shape{2, 3, expected_lengths[i]})); EXPECT_EQ(read_vector(results[i]), expected_results[i]); } diff --git a/ngraph/test/partial_shape.cpp b/ngraph/test/partial_shape.cpp index e57ab91aacdf50..390f7a35201625 100644 --- a/ngraph/test/partial_shape.cpp +++ b/ngraph/test/partial_shape.cpp @@ -218,7 +218,7 @@ TEST(partial_shape, to_shape_rank_dynamic) TEST(partial_shape, tensor_descriptor_from_shape) { - descriptor::Tensor t{element::Type_t::i32, Shape{1, 2, 3}, "Ankeny"}; + descriptor::Tensor t{element::i32, Shape{1, 2, 3}, "Ankeny"}; ASSERT_EQ(t.get_shape(), (Shape{1, 2, 3})); ASSERT_EQ(t.get_partial_shape().rank().get_length(), 3); @@ -227,7 +227,7 @@ TEST(partial_shape, tensor_descriptor_from_shape) TEST(partial_shape, tensor_descriptor_from_static_partial_shape) { - descriptor::Tensor t{element::Type_t::i32, PartialShape{1, 2, 3}, "Burnside"}; + descriptor::Tensor t{element::i32, PartialShape{1, 2, 3}, "Burnside"}; ASSERT_EQ(t.get_shape(), (Shape{1, 2, 3})); ASSERT_EQ(t.get_partial_shape().rank().get_length(), 3); @@ -236,7 +236,7 @@ TEST(partial_shape, tensor_descriptor_from_static_partial_shape) TEST(partial_shape, tensor_descriptor_from_rank_static_dynamic_partial_shape) { - descriptor::Tensor t{element::Type_t::i32, PartialShape{1, Dimension::dynamic(), 3}, "Couch"}; + descriptor::Tensor t{element::i32, PartialShape{1, Dimension::dynamic(), 3}, "Couch"}; ASSERT_EQ(t.get_partial_shape().rank().get_length(), 3); ASSERT_THROW({ t.get_shape(); }, std::invalid_argument); @@ -245,7 +245,7 @@ TEST(partial_shape, tensor_descriptor_from_rank_static_dynamic_partial_shape) TEST(partial_shape, tensor_descriptor_from_rank_dynamic_partial_shape) { - descriptor::Tensor t{element::Type_t::i32, PartialShape::dynamic(), "Davis"}; + descriptor::Tensor t{element::i32, PartialShape::dynamic(), "Davis"}; ASSERT_TRUE(t.get_partial_shape().rank().is_dynamic()); ASSERT_THROW({ t.get_shape(); }, std::invalid_argument); @@ -877,7 +877,7 @@ TEST(partial_shape, changed_dimension_by_reference) TEST(partial_shape, infer_windowed_reduction_rank_dynamic_rank_dynamic_ok) { - auto node = std::make_shared(element::Type_t::f32, Shape{}); + auto node = std::make_shared(element::f32, Shape{}); PartialShape data_shape{PartialShape::dynamic()}; Strides data_dilation{1, 1, 1, 1}; CoordinateDiff data_padding_below{0, 0, 0, 0}; @@ -904,7 +904,7 @@ TEST(partial_shape, infer_windowed_reduction_rank_dynamic_rank_dynamic_ok) TEST(partial_shape, infer_windowed_reduction_rank_dynamic_rank_dynamic_zero_data_dilation) { - auto node = std::make_shared(element::Type_t::f32, Shape{}); + auto node = std::make_shared(element::f32, Shape{}); PartialShape data_shape{PartialShape::dynamic()}; Strides data_dilation{1, 1, 0, 1}; CoordinateDiff data_padding_below{0, 0, 0, 0}; @@ -931,7 +931,7 @@ TEST(partial_shape, infer_windowed_reduction_rank_dynamic_rank_dynamic_zero_data TEST(partial_shape, infer_windowed_reduction_rank_dynamic_rank_dynamic_zero_window_dilation) { - auto node = std::make_shared(element::Type_t::f32, Shape{}); + auto node = std::make_shared(element::f32, Shape{}); PartialShape data_shape{PartialShape::dynamic()}; Strides data_dilation{1, 1, 1, 1}; CoordinateDiff data_padding_below{0, 0, 0, 0}; @@ -958,7 +958,7 @@ TEST(partial_shape, infer_windowed_reduction_rank_dynamic_rank_dynamic_zero_wind TEST(partial_shape, infer_windowed_reduction_rank_dynamic_rank_dynamic_zero_window_strides) { - auto node = std::make_shared(element::Type_t::f32, Shape{}); + auto node = std::make_shared(element::f32, Shape{}); PartialShape data_shape{PartialShape::dynamic()}; Strides data_dilation{1, 1, 1, 1}; CoordinateDiff data_padding_below{0, 0, 0, 0}; @@ -985,7 +985,7 @@ TEST(partial_shape, infer_windowed_reduction_rank_dynamic_rank_dynamic_zero_wind TEST(partial_shape, infer_windowed_reduction_rank_static_dynamic_rank_dynamic_ok) { - auto node = std::make_shared(element::Type_t::f32, Shape{}); + auto node = std::make_shared(element::f32, Shape{}); PartialShape data_shape{Dimension::dynamic(), 2, 3, Dimension::dynamic()}; Strides data_dilation{1, 1, 1, 1}; CoordinateDiff data_padding_below{0, 0, 0, 0}; @@ -1012,7 +1012,7 @@ TEST(partial_shape, infer_windowed_reduction_rank_static_dynamic_rank_dynamic_ok TEST(partial_shape, infer_windowed_reduction_rank_static_dynamic_rank_dynamic_zero_data_post_padding) { - auto node = std::make_shared(element::Type_t::f32, Shape{}); + auto node = std::make_shared(element::f32, Shape{}); PartialShape data_shape{Dimension::dynamic(), 2, 3, Dimension::dynamic()}; Strides data_dilation{1, 1, 1, 1}; CoordinateDiff data_padding_below{0, -1, 0, 0}; @@ -1039,7 +1039,7 @@ TEST(partial_shape, TEST(partial_shape, infer_windowed_reduction_rank_static_dynamic_rank_dynamic_neg_padding_ok) { - auto node = std::make_shared(element::Type_t::f32, Shape{}); + auto node = std::make_shared(element::f32, Shape{}); PartialShape data_shape{Dimension::dynamic(), 4, 3, Dimension::dynamic()}; Strides data_dilation{1, 1, 1, 1}; CoordinateDiff data_padding_below{0, -1, 0, 0}; @@ -1064,7 +1064,7 @@ TEST(partial_shape, infer_windowed_reduction_rank_static_dynamic_rank_dynamic_ne TEST(partial_shape, infer_windowed_reduction_rank_dynamic_rank_static_dynamic_ok) { - auto node = std::make_shared(element::Type_t::f32, Shape{}); + auto node = std::make_shared(element::f32, Shape{}); PartialShape data_shape{PartialShape::dynamic()}; Strides data_dilation{1, 1, 1, 1}; CoordinateDiff data_padding_below{0, 0, 0, 0}; @@ -1090,7 +1090,7 @@ TEST(partial_shape, infer_windowed_reduction_rank_dynamic_rank_static_dynamic_ok TEST(partial_shape, infer_windowed_reduction_rank_dynamic_rank_static_dynamic_window_dim_zero) { - auto node = std::make_shared(element::Type_t::f32, Shape{}); + auto node = std::make_shared(element::f32, Shape{}); PartialShape data_shape{PartialShape::dynamic()}; Strides data_dilation{1, 1, 1, 1}; CoordinateDiff data_padding_below{0, 0, 0, 0}; @@ -1119,7 +1119,7 @@ TEST(partial_shape, infer_windowed_reduction_rank_dynamic_rank_static_dynamic_wi TEST(partial_shape, infer_windowed_reduction_rank_dynamic_rank_static_dynamic_window_dilated_dim_zero) { - auto node = std::make_shared(element::Type_t::f32, Shape{}); + auto node = std::make_shared(element::f32, Shape{}); PartialShape data_shape{PartialShape::dynamic()}; Strides data_dilation{1, 1, 1, 1}; CoordinateDiff data_padding_below{0, 0, 0, 0}; @@ -1148,7 +1148,7 @@ TEST(partial_shape, TEST(partial_shape, infer_windowed_reduction_rank_dynamic_rank_static_dynamic_window_all_in_padding_ok) { - auto node = std::make_shared(element::Type_t::f32, Shape{}); + auto node = std::make_shared(element::f32, Shape{}); PartialShape data_shape{PartialShape::dynamic()}; Strides data_dilation{1, 1, 1, 1}; CoordinateDiff data_padding_below{0, 0, 3, 0}; @@ -1175,7 +1175,7 @@ TEST(partial_shape, TEST(partial_shape, infer_windowed_reduction_rank_dynamic_rank_static_dynamic_window_all_in_padding_not_ok) { - auto node = std::make_shared(element::Type_t::f32, Shape{}); + auto node = std::make_shared(element::f32, Shape{}); PartialShape data_shape{PartialShape::dynamic()}; Strides data_dilation{1, 1, 1, 1}; CoordinateDiff data_padding_below{0, 0, 3, 0}; @@ -1204,7 +1204,7 @@ TEST(partial_shape, TEST(partial_shape, infer_windowed_reduction_rank_dynamic_rank_static_dynamic_dilated_window_not_all_in_padding) { - auto node = std::make_shared(element::Type_t::f32, Shape{}); + auto node = std::make_shared(element::f32, Shape{}); PartialShape data_shape{PartialShape::dynamic()}; Strides data_dilation{1, 1, 1, 1}; CoordinateDiff data_padding_below{0, 0, 3, 0}; @@ -1230,7 +1230,7 @@ TEST(partial_shape, TEST(partial_shape, infer_windowed_reduction_rank_static_dynamic_rank_static_dynamic_ok) { - auto node = std::make_shared(element::Type_t::f32, Shape{}); + auto node = std::make_shared(element::f32, Shape{}); PartialShape data_shape{Dimension::dynamic(), Dimension::dynamic(), 6, 4}; Strides data_dilation{1, 1, 1, 1}; CoordinateDiff data_padding_below{0, 0, 0, 0}; @@ -1258,7 +1258,7 @@ TEST(partial_shape, infer_windowed_reduction_rank_static_dynamic_rank_static_dyn TEST(partial_shape, infer_windowed_reduction_rank_static_dynamic_rank_static_dynamic_with_padding_ok) { - auto node = std::make_shared(element::Type_t::f32, Shape{}); + auto node = std::make_shared(element::f32, Shape{}); PartialShape data_shape{Dimension::dynamic(), Dimension::dynamic(), 6, 4}; Strides data_dilation{1, 1, 1, 1}; CoordinateDiff data_padding_below{0, 0, 2, 0}; @@ -1286,7 +1286,7 @@ TEST(partial_shape, TEST(partial_shape, infer_windowed_reduction_rank_static_dynamic_rank_static_dynamic_with_padding_and_stride_ok) { - auto node = std::make_shared(element::Type_t::f32, Shape{}); + auto node = std::make_shared(element::f32, Shape{}); PartialShape data_shape{Dimension::dynamic(), Dimension::dynamic(), 6, 4}; Strides data_dilation{1, 1, 1, 1}; CoordinateDiff data_padding_below{0, 0, 2, 0}; @@ -1313,7 +1313,7 @@ TEST(partial_shape, TEST(partial_shape, infer_windowed_reduction_rank_static_dynamic_rank_static_dynamic_window_too_big) { - auto node = std::make_shared(element::Type_t::f32, Shape{}); + auto node = std::make_shared(element::f32, Shape{}); PartialShape data_shape{Dimension::dynamic(), Dimension::dynamic(), 6, 4}; Strides data_dilation{1, 1, 1, 1}; CoordinateDiff data_padding_below{0, 0, 0, 0}; @@ -1342,7 +1342,7 @@ TEST(partial_shape, infer_windowed_reduction_rank_static_dynamic_rank_static_dyn TEST(partial_shape, infer_windowed_reduction_rank_static_dynamic_rank_static_dynamic_window_not_too_big_padding) { - auto node = std::make_shared(element::Type_t::f32, Shape{}); + auto node = std::make_shared(element::f32, Shape{}); PartialShape data_shape{Dimension::dynamic(), Dimension::dynamic(), 6, 4}; Strides data_dilation{1, 1, 1, 1}; CoordinateDiff data_padding_below{0, 0, 5, 0}; @@ -1370,7 +1370,7 @@ TEST(partial_shape, TEST(partial_shape, infer_windowed_reduction_rank_static_dynamic_rank_static_dynamic_window_dilated_too_big) { - auto node = std::make_shared(element::Type_t::f32, Shape{}); + auto node = std::make_shared(element::f32, Shape{}); PartialShape data_shape{Dimension::dynamic(), Dimension::dynamic(), 6, 4}; Strides data_dilation{1, 1, 1, 1}; CoordinateDiff data_padding_below{0, 0, 5, 0}; diff --git a/ngraph/test/pass_config.cpp b/ngraph/test/pass_config.cpp index 264d5e90a71635..f350c4a5658389 100644 --- a/ngraph/test/pass_config.cpp +++ b/ngraph/test/pass_config.cpp @@ -90,8 +90,8 @@ NGRAPH_RTTI_DEFINITION(TestGraphRewritePass, "TestGraphRewritePass", 0); std::tuple, std::shared_ptr, std::shared_ptr> get_test_function() { - auto data = std::make_shared(ngraph::element::Type_t::f32, - ngraph::Shape{3, 1, 2}); + auto data = + std::make_shared(ngraph::element::f32, ngraph::Shape{3, 1, 2}); auto relu = std::make_shared(data); relu->set_friendly_name("relu"); auto sigmoid = std::make_shared(relu); @@ -378,4 +378,4 @@ TEST(PassConfig, EnableDisablePasses11) ASSERT_EQ(relu->get_friendly_name(), "renamed"); ASSERT_EQ(sigmoid->get_friendly_name(), "renamed"); -} +} \ No newline at end of file diff --git a/ngraph/test/pass_liveness.cpp b/ngraph/test/pass_liveness.cpp index 89433c2e12e472..63ef1126582d9e 100644 --- a/ngraph/test/pass_liveness.cpp +++ b/ngraph/test/pass_liveness.cpp @@ -36,7 +36,7 @@ namespace ng = ngraph; TEST(liveness, constant) { Shape shape{1}; - auto c = op::Constant::create(element::Type_t::i32, shape, {5}); + auto c = op::Constant::create(element::i32, shape, {5}); auto f = make_shared(make_shared(c), ParameterVector{}); pass::Manager pass_manager; diff --git a/ngraph/test/pass_shape_relevance.cpp b/ngraph/test/pass_shape_relevance.cpp index 66568d0b83914d..c34ab4893fd08d 100644 --- a/ngraph/test/pass_shape_relevance.cpp +++ b/ngraph/test/pass_shape_relevance.cpp @@ -32,8 +32,8 @@ using namespace std; TEST(shape_relevance, simple) { - auto param0 = make_shared(element::Type_t::f32, Shape{4, 6}); - auto param1 = make_shared(element::Type_t::f32, Shape{4, 6}); + auto param0 = make_shared(element::f32, Shape{4, 6}); + auto param1 = make_shared(element::f32, Shape{4, 6}); auto x = make_shared(param0, param1); auto f = make_shared(x, ParameterVector{param0, param1}); @@ -48,8 +48,8 @@ TEST(shape_relevance, simple) TEST(shape_relevance, param_direct) { - auto param0 = make_shared(element::Type_t::f32, Shape{4, 6}); - auto param1 = make_shared(element::Type_t::i64, Shape{4}); + auto param0 = make_shared(element::f32, Shape{4, 6}); + auto param1 = make_shared(element::i64, Shape{4}); auto x = make_shared(param0, param1, true); auto f = make_shared(x, ParameterVector{param0, param1}); @@ -64,9 +64,9 @@ TEST(shape_relevance, param_direct) TEST(shape_relevance, param_indirect) { - auto param0 = make_shared(element::Type_t::f32, Shape{4, 6}); - auto param1 = make_shared(element::Type_t::i64, Shape{4}); - auto param2 = make_shared(element::Type_t::i64, Shape{2}); + auto param0 = make_shared(element::f32, Shape{4, 6}); + auto param1 = make_shared(element::i64, Shape{4}); + auto param2 = make_shared(element::i64, Shape{2}); auto c = make_shared(NodeVector{param1, param2}, 0); auto x = make_shared(param0, c, true); @@ -84,7 +84,7 @@ TEST(shape_relevance, param_indirect) TEST(shape_relevance, param_shape_of_direct_v0) { - auto param0 = make_shared(element::Type_t::f32, Shape{4, 6}); + auto param0 = make_shared(element::f32, Shape{4, 6}); auto x = make_shared(param0, make_shared(param0), true); @@ -99,7 +99,7 @@ TEST(shape_relevance, param_shape_of_direct_v0) TEST(shape_relevance, param_shape_of_direct_v3) { - auto param0 = make_shared(element::Type_t::f32, Shape{4, 6}); + auto param0 = make_shared(element::f32, Shape{4, 6}); auto x = make_shared(param0, make_shared(param0), true); @@ -114,10 +114,10 @@ TEST(shape_relevance, param_shape_of_direct_v3) TEST(shape_relevance, param_shape_of_direct_i32_v3) { - auto param0 = make_shared(element::Type_t::f32, Shape{4, 6}); + auto param0 = make_shared(element::f32, Shape{4, 6}); auto x = make_shared( - param0, make_shared(param0, element::Type_t::i32), true); + param0, make_shared(param0, element::i32), true); auto f = make_shared(x, ParameterVector{param0}); @@ -130,11 +130,11 @@ TEST(shape_relevance, param_shape_of_direct_i32_v3) TEST(shape_relevance, param_shape_of_indirect_v0) { - auto param0 = make_shared(element::Type_t::f32, Shape{4, 6}); + auto param0 = make_shared(element::f32, Shape{4, 6}); auto s = make_shared(param0); auto r = make_shared( - s, op::Constant::create(element::Type_t::i64, {1}, {0}), op::v1::Reverse::Mode::INDEX); + s, op::Constant::create(element::i64, {1}, {0}), op::v1::Reverse::Mode::INDEX); auto x = make_shared(param0, r, true); auto f = make_shared(x, ParameterVector{param0}); @@ -148,11 +148,11 @@ TEST(shape_relevance, param_shape_of_indirect_v0) TEST(shape_relevance, param_shape_of_indirect_v3) { - auto param0 = make_shared(element::Type_t::f32, Shape{4, 6}); + auto param0 = make_shared(element::f32, Shape{4, 6}); auto s = make_shared(param0); auto r = make_shared( - s, op::Constant::create(element::Type_t::i64, {1}, {0}), op::v1::Reverse::Mode::INDEX); + s, op::Constant::create(element::i64, {1}, {0}), op::v1::Reverse::Mode::INDEX); auto x = make_shared(param0, r, true); auto f = make_shared(x, ParameterVector{param0}); @@ -166,11 +166,11 @@ TEST(shape_relevance, param_shape_of_indirect_v3) TEST(shape_relevance, param_shape_of_indirect_i32_v3) { - auto param0 = make_shared(element::Type_t::f32, Shape{4, 6}); + auto param0 = make_shared(element::f32, Shape{4, 6}); - auto s = make_shared(param0, element::Type_t::i32); + auto s = make_shared(param0, element::i32); auto r = make_shared( - s, op::Constant::create(element::Type_t::i64, {1}, {0}), op::v1::Reverse::Mode::INDEX); + s, op::Constant::create(element::i64, {1}, {0}), op::v1::Reverse::Mode::INDEX); auto x = make_shared(param0, r, true); auto f = make_shared(x, ParameterVector{param0}); diff --git a/ngraph/test/pattern.cpp b/ngraph/test/pattern.cpp index 3f862603896c37..2fa16fb6663239 100644 --- a/ngraph/test/pattern.cpp +++ b/ngraph/test/pattern.cpp @@ -52,20 +52,20 @@ using namespace std; static std::shared_ptr construct_constant_node(int n) { - return op::Constant::create(element::Type_t::i32, Shape{}, {n}); + return op::Constant::create(element::i32, Shape{}, {n}); } static std::shared_ptr construct_variance_graph() { // construct varaiance - auto N = op::Constant::create(element::Type_t::f32, Shape{3}, {2, 2, 2}); - auto input = std::make_shared(element::Type_t::f32, Shape{2, 3}); + auto N = op::Constant::create(element::f32, Shape{3}, {2, 2, 2}); + auto input = std::make_shared(element::f32, Shape{2, 3}); auto input_sq = std::make_shared(input, input); - auto sum_input = std::make_shared( - input, op::Constant::create(element::Type_t::i64, {1}, {0})); + auto sum_input = + std::make_shared(input, op::Constant::create(element::i64, {1}, {0})); auto square_sumed_input = std::make_shared(sum_input, sum_input); - auto sum_squared_input = std::make_shared( - input_sq, op::Constant::create(element::Type_t::i64, {1}, {0})); + auto sum_squared_input = + std::make_shared(input_sq, op::Constant::create(element::i64, {1}, {0})); auto avg_input_sum_sq = std::make_shared(square_sumed_input, N); auto xmu = std::make_shared(sum_squared_input, avg_input_sum_sq); auto variance = std::make_shared(xmu, N); @@ -78,10 +78,10 @@ static std::shared_ptr construct_variance_graph() static std::shared_ptr construct_mean_graph() { // construct mean; - auto input = std::make_shared(element::Type_t::f32, Shape{2, 3}); - auto N = op::Constant::create(element::Type_t::f32, Shape{3}, {2, 2, 2}); - auto sum_input1 = std::make_shared( - input, op::Constant::create(element::Type_t::i64, {1}, {0})); + auto input = std::make_shared(element::f32, Shape{2, 3}); + auto N = op::Constant::create(element::f32, Shape{3}, {2, 2, 2}); + auto sum_input1 = + std::make_shared(input, op::Constant::create(element::i64, {1}, {0})); auto mean = std::make_shared(sum_input1, N); auto mean_label = std::make_shared(mean, nullptr, NodeVector{mean}); return mean_label; @@ -212,9 +212,9 @@ TEST(pattern, graph_rewrite) pass_manager.register_pass(); { - auto a = make_shared(element::Type_t::i32, shape); - auto b = make_shared(element::Type_t::i32, shape); - auto c = make_shared(element::Type_t::i32, shape); + auto a = make_shared(element::i32, shape); + auto b = make_shared(element::i32, shape); + auto c = make_shared(element::i32, shape); auto iconst0 = construct_constant_node(0); auto graph_a = make_shared(a, iconst0); auto graph_b = make_shared(b, iconst0); @@ -231,8 +231,8 @@ TEST(pattern, graph_rewrite) } { - auto a = make_shared(element::Type_t::i32, shape); - auto b = make_shared(element::Type_t::i32, shape); + auto a = make_shared(element::i32, shape); + auto b = make_shared(element::i32, shape); auto iconst0 = construct_constant_node(0); auto sum = make_shared(a, iconst0); auto graph = make_shared(b, sum); @@ -247,8 +247,8 @@ TEST(pattern, graph_rewrite) } { - auto a = make_shared(element::Type_t::i32, shape); - auto b = make_shared(element::Type_t::i32, shape); + auto a = make_shared(element::i32, shape); + auto b = make_shared(element::i32, shape); auto iconst1 = construct_constant_node(1); auto mul = make_shared(a, iconst1); auto graph = make_shared(b, mul); @@ -263,8 +263,8 @@ TEST(pattern, graph_rewrite) } { - auto a = make_shared(element::Type_t::i32, shape); - auto b = make_shared(element::Type_t::i32, shape); + auto a = make_shared(element::i32, shape); + auto b = make_shared(element::i32, shape); auto iconst1 = construct_constant_node(1); auto multiply = make_shared(make_shared(a, iconst1), iconst1); @@ -279,8 +279,8 @@ TEST(pattern, graph_rewrite) } { - auto a = make_shared(element::Type_t::i32, shape); - auto b = make_shared(element::Type_t::i32, shape); + auto a = make_shared(element::i32, shape); + auto b = make_shared(element::i32, shape); auto iconst0 = construct_constant_node(0); auto iconst1 = construct_constant_node(1); auto mul = make_shared(make_shared(a, iconst0), iconst1); @@ -293,8 +293,8 @@ TEST(pattern, graph_rewrite) } { - auto a = make_shared(element::Type_t::i32, shape); - auto b = make_shared(element::Type_t::i32, shape); + auto a = make_shared(element::i32, shape); + auto b = make_shared(element::i32, shape); auto iconst1 = construct_constant_node(1); auto mul = make_shared(iconst1, make_shared(iconst1, a)); @@ -311,7 +311,7 @@ TEST(pattern, graph_rewrite) TEST(pattern, matcher) { Shape shape{}; - auto a = make_shared(element::Type_t::i32, shape); + auto a = make_shared(element::i32, shape); TestMatcher n; ASSERT_TRUE(n.match(a, a)); ASSERT_EQ(n.get_matched_nodes(), (NodeVector{a})); @@ -335,7 +335,7 @@ TEST(pattern, matcher) ASSERT_FALSE(n.match(pattern_false, a)); ASSERT_EQ(n.get_matched_nodes(), (NodeVector{})); - auto b = make_shared(element::Type_t::i32, shape); + auto b = make_shared(element::i32, shape); auto is_bea = [](std::shared_ptr node) -> bool { return op::is_binary_elementwise_arithmetic(node); @@ -371,7 +371,7 @@ TEST(pattern, matcher) ASSERT_TRUE(n.match(bea_label, ab)); ASSERT_EQ(n.get_pattern_map()[bea_label], ab); - auto d = make_shared(element::Type_t::i32, shape); + auto d = make_shared(element::i32, shape); ASSERT_FALSE(n.match(d, b)); ASSERT_FALSE( @@ -390,7 +390,7 @@ TEST(pattern, matcher) ASSERT_EQ(n.get_pattern_map()[pattern], abs); ASSERT_EQ(n.get_matched_nodes(), (NodeVector{add_absb, abs, b})); - auto c = make_shared(element::Type_t::i32, shape); + auto c = make_shared(element::i32, shape); auto mul_add_absb = std::make_shared(c, add_absb); ASSERT_TRUE( n.match(std::make_shared(c, std::make_shared(b, pattern)), @@ -421,7 +421,7 @@ TEST(pattern, matcher) ASSERT_TRUE(n.match(make_shared(pattern, iconst1_0), make_shared(a, iconst1_1))); // different iconst ASSERT_EQ(n.get_pattern_map()[pattern], a); - auto fconst1_0 = op::Constant::create(element::Type_t::f32, shape, {1}); + auto fconst1_0 = op::Constant::create(element::f32, shape, {1}); auto patternf = std::make_shared(fconst1_0); ASSERT_TRUE(n.match(make_shared(patternf, fconst1_0), make_shared(a, iconst1_1))); // different iconst @@ -493,22 +493,22 @@ TEST(pattern, matcher) { TestMatcher sm(Output{}, "TestMatcher", true); // exact shape and type - auto scalar_param = make_shared(element::Type_t::i32, Shape{}); + auto scalar_param = make_shared(element::i32, Shape{}); auto label_dynamic_shape = - make_shared(element::Type_t::i32, PartialShape::dynamic()); - auto param = make_shared(element::Type_t::f32, Shape{}); + make_shared(element::i32, PartialShape::dynamic()); + auto param = make_shared(element::f32, Shape{}); ASSERT_TRUE(sm.match(label_dynamic_shape, scalar_param)); // wrong type - auto scalar_param_wrong_type = make_shared(element::Type_t::f32, Shape{}); + auto scalar_param_wrong_type = make_shared(element::f32, Shape{}); ASSERT_FALSE(sm.match(label, scalar_param_wrong_type)); // dynamic dimension - auto label_dynamic_dimension = make_shared( - element::Type_t::i32, PartialShape{Dimension::dynamic()}); - auto vector_param = make_shared(element::Type_t::i32, Shape{10}); + auto label_dynamic_dimension = + make_shared(element::i32, PartialShape{Dimension::dynamic()}); + auto vector_param = make_shared(element::i32, Shape{10}); ASSERT_TRUE(sm.match(label_dynamic_dimension, vector_param)); // dynamic type - auto label_dynamic_type = make_shared( - element::Type_t::dynamic, PartialShape{Dimension::dynamic()}); + auto label_dynamic_type = + make_shared(element::dynamic, PartialShape{Dimension::dynamic()}); ASSERT_TRUE(sm.match(label_dynamic_type, vector_param)); } } @@ -518,10 +518,10 @@ TEST(pattern, mean) // construct mean TestMatcher n; - auto input = std::make_shared(element::Type_t::f32, Shape{2, 3}); - auto N = op::Constant::create(element::Type_t::f32, Shape{3}, {2, 2, 2}); - auto sum_input1 = std::make_shared( - input, op::Constant::create(element::Type_t::i64, {1}, {0})); + auto input = std::make_shared(element::f32, Shape{2, 3}); + auto N = op::Constant::create(element::f32, Shape{3}, {2, 2, 2}); + auto sum_input1 = + std::make_shared(input, op::Constant::create(element::i64, {1}, {0})); auto mean = std::make_shared(sum_input1, N); auto mean_graph = construct_mean_graph(); @@ -533,14 +533,14 @@ TEST(pattern, variance) { // construct variance TestMatcher n; - auto N = op::Constant::create(element::Type_t::f32, Shape{3}, {2, 2, 2}); - auto input = std::make_shared(element::Type_t::f32, Shape{2, 3}); + auto N = op::Constant::create(element::f32, Shape{3}, {2, 2, 2}); + auto input = std::make_shared(element::f32, Shape{2, 3}); auto input_sq = std::make_shared(input, input); - auto sum_input = std::make_shared( - input, op::Constant::create(element::Type_t::i64, {1}, {0})); + auto sum_input = + std::make_shared(input, op::Constant::create(element::i64, {1}, {0})); auto square_sumed_input = std::make_shared(sum_input, sum_input); - auto sum_squared_input = std::make_shared( - input_sq, op::Constant::create(element::Type_t::i64, {1}, {0})); + auto sum_squared_input = + std::make_shared(input_sq, op::Constant::create(element::i64, {1}, {0})); auto avg_input_sum_sq = std::make_shared(square_sumed_input, N); auto xmu = std::make_shared(sum_squared_input, avg_input_sum_sq); auto variance = std::make_shared(xmu, N); @@ -555,8 +555,8 @@ TEST(pattern, previous_matches) using ngraph::pattern::Matcher; Shape shape{}; Matcher::PatternMap previous_matches; - auto a = make_shared(element::Type_t::i32, shape); - auto b = make_shared(element::Type_t::i32, shape); + auto a = make_shared(element::i32, shape); + auto b = make_shared(element::i32, shape); auto pattern = std::make_shared(b); auto abs = make_shared(a); auto add = make_shared(abs, b); @@ -578,14 +578,14 @@ TEST(pattern, test_sort) using ngraph::pattern::Matcher; Shape shape{}; - auto a = make_shared(element::Type_t::i32, shape); - auto b = make_shared(element::Type_t::i32, shape); + auto a = make_shared(element::i32, shape); + auto b = make_shared(element::i32, shape); auto abs1 = make_shared(a); auto abs2 = make_shared(b); shared_ptr add = make_shared(abs1, abs2); - auto pa = make_shared(element::Type_t::i32, shape); - auto pb = make_shared(element::Type_t::i32, shape); + auto pa = make_shared(element::i32, shape); + auto pb = make_shared(element::i32, shape); auto pabs1 = make_shared(pa); auto pabs1_label = std::make_shared(pabs1); auto pabs2 = make_shared(b); @@ -605,8 +605,8 @@ TEST(pattern, recurrent_pattern) using ngraph::pattern::RecurrentMatcher; Shape shape{}; ngraph::pattern::Matcher::PatternMap previous_matches; - auto a = make_shared(element::Type_t::i32, shape); - auto b = make_shared(element::Type_t::i32, shape); + auto a = make_shared(element::i32, shape); + auto b = make_shared(element::i32, shape); auto rpattern = std::make_shared(b); auto iconst0 = construct_constant_node(0); auto abs = make_shared(a); @@ -674,7 +674,7 @@ class TestRecurrentGraphRewrite : public ngraph::pass::RecurrentGraphRewrite auto iconst0 = construct_constant_node(0); auto iconst_label = std::make_shared(iconst0, nullptr, NodeVector{iconst0}); - auto rpattern = std::make_shared(element::Type_t::i32, shape); + auto rpattern = std::make_shared(element::i32, shape); auto padd = make_shared(iconst_label, rpattern); auto callback = [iconst_label, rpattern](pattern::RecurrentMatcher& rm) { @@ -728,14 +728,14 @@ TEST(pattern, recurrent_graph_rewrite) pass_manager.register_pass(); { - auto a = make_shared(element::Type_t::i32, shape); + auto a = make_shared(element::i32, shape); auto iconst0 = construct_constant_node(0); auto add_a1 = make_shared(a, iconst0); auto add_a2 = make_shared(add_a1, iconst0); auto add_a3 = make_shared(add_a2, iconst0); auto abs_add_a3 = std::make_shared(add_a3); - auto b = make_shared(element::Type_t::i32, shape); + auto b = make_shared(element::i32, shape); auto add_b1 = make_shared(b, iconst0); auto add_b2 = make_shared(add_b1, iconst0); auto abs_add_b2 = std::make_shared(add_b2); @@ -758,9 +758,9 @@ TEST(pattern, recurrent_graph_rewrite) TEST(pattern, label_on_skip) { Shape shape{2, 2}; - auto a = make_shared(element::Type_t::i32, shape); - auto b = make_shared(element::Type_t::i32, Shape{}); - auto iconst = ngraph::make_zero(element::Type_t::i32, Shape{}); + auto a = make_shared(element::i32, shape); + auto b = make_shared(element::i32, Shape{}); + auto iconst = ngraph::make_zero(element::i32, Shape{}); auto label = std::make_shared(iconst); auto const_label = std::make_shared(iconst, ngraph::is_zero, NodeVector{iconst}); @@ -769,8 +769,8 @@ TEST(pattern, label_on_skip) return as_type_ptr(n) != nullptr; }; - auto shape_const = op::Constant::create(element::Type_t::u64, Shape{shape.size()}, shape); - auto axes_const = op::Constant::create(element::Type_t::u8, Shape{}, {0}); + auto shape_const = op::Constant::create(element::u64, Shape{shape.size()}, shape); + auto axes_const = op::Constant::create(element::u8, Shape{}, {0}); auto bcst = std::make_shared( OutputVector{const_label, shape_const, axes_const}, bcst_pred); auto bcst_label = std::make_shared(bcst, nullptr, NodeVector{bcst}); @@ -793,7 +793,7 @@ TEST(pattern, label_on_skip) TEST(pattern, is_contained_match) { Shape shape{}; - auto a = make_shared(element::Type_t::i32, shape); + auto a = make_shared(element::i32, shape); auto absn = make_shared(a); TestMatcher n; @@ -812,13 +812,11 @@ TEST(pattern, is_contained_match) TEST(pattern, wrap_type) { - auto a = make_shared(element::Type_t::f32, Shape{1, 3, 64, 64}); + auto a = make_shared(element::f32, Shape{1, 3, 64, 64}); auto b = make_shared(a); auto c = make_shared(a); - auto mul1 = - make_shared(a, op::Constant::create(element::Type_t::f32, Shape{}, {1})); - auto mul2 = - make_shared(op::Constant::create(element::Type_t::f32, Shape{}, {1}), a); + auto mul1 = make_shared(a, op::Constant::create(element::f32, Shape{}, {1})); + auto mul2 = make_shared(op::Constant::create(element::f32, Shape{}, {1}), a); { auto m = pattern::wrap_type(); diff --git a/ngraph/test/provenance.cpp b/ngraph/test/provenance.cpp index 62d23911a93b0f..774b36d8949ece 100644 --- a/ngraph/test/provenance.cpp +++ b/ngraph/test/provenance.cpp @@ -65,8 +65,8 @@ TEST(provenance, provenance) // of the graph. // { - auto x = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); - auto y = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); + auto x = make_shared(element::i32, PartialShape{2, 3, 4}); + auto y = make_shared(element::i32, PartialShape{2, 3, 4}); auto a = make_shared(x, y); a->add_provenance_tag("tag_a"); @@ -110,8 +110,8 @@ TEST(provenance, provenance) // of the graph. // { - auto x = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); - auto y = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); + auto x = make_shared(element::i32, PartialShape{2, 3, 4}); + auto y = make_shared(element::i32, PartialShape{2, 3, 4}); auto a = make_shared(x, y); a->add_provenance_tag("tag_a"); @@ -148,8 +148,8 @@ TEST(provenance, provenance) // * D is the replacement root, and its insertion kills A, B, and C. // { - auto x = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); - auto y = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); + auto x = make_shared(element::i32, PartialShape{2, 3, 4}); + auto y = make_shared(element::i32, PartialShape{2, 3, 4}); auto a = make_shared(x, y); a->add_provenance_tag("tag_a"); @@ -160,7 +160,7 @@ TEST(provenance, provenance) auto f = make_shared(c, ParameterVector{x, y}); - auto d = make_zero(element::Type_t::i32, Shape{2, 3, 4}); + auto d = make_zero(element::i32, Shape{2, 3, 4}); d->add_provenance_tag("tag_d"); replace_node(c, d); @@ -186,8 +186,8 @@ TEST(provenance, provenance) // * D is the replacement root, and its insertion kills A, B, and C. // { - auto x = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); - auto y = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); + auto x = make_shared(element::i32, PartialShape{2, 3, 4}); + auto y = make_shared(element::i32, PartialShape{2, 3, 4}); auto a = make_shared(x, y); a->add_provenance_tag("tag_a"); @@ -198,7 +198,7 @@ TEST(provenance, provenance) auto f = make_shared(c, ParameterVector{x, y}); - auto d = make_zero(element::Type_t::i32, Shape{2, 3, 4}); + auto d = make_zero(element::i32, Shape{2, 3, 4}); replace_node(c, d); EXPECT_EQ(d->get_provenance_tags(), (ProvSet{"tag_a", "tag_b", "tag_c"})); @@ -233,8 +233,8 @@ TEST(provenance, provenance) // * D is the replacement root replacing C and creating a new argument node E // { - auto x = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); - auto y = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); + auto x = make_shared(element::i32, PartialShape{2, 3, 4}); + auto y = make_shared(element::i32, PartialShape{2, 3, 4}); auto a = make_shared(x, y); a->add_provenance_tag("tag_a"); @@ -284,8 +284,8 @@ TEST(provenance, provenance) // * D is the replacement root replacing C and creating a new argument node E // { - auto x = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); - auto y = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); + auto x = make_shared(element::i32, PartialShape{2, 3, 4}); + auto y = make_shared(element::i32, PartialShape{2, 3, 4}); auto a = make_shared(x, y); a->add_provenance_tag("tag_a"); @@ -310,9 +310,9 @@ TEST(provenance, provenance) TEST(provenance, add_group_above) { - auto p1 = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); + auto p1 = make_shared(element::i32, PartialShape{2, 3, 4}); p1->add_provenance_tag("P1"); - auto p2 = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); + auto p2 = make_shared(element::i32, PartialShape{2, 3, 4}); p2->add_provenance_tag("P2"); auto a1 = make_shared(p1, p2); auto m1 = make_shared(a1, a1)->add_provenance_group_members_above({p1, p2}); @@ -325,8 +325,8 @@ TEST(provenance, add_group_above) TEST(provenance, add_tags_above) { - auto x = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); - auto y = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); + auto x = make_shared(element::i32, PartialShape{2, 3, 4}); + auto y = make_shared(element::i32, PartialShape{2, 3, 4}); auto a = make_shared(x, y); auto b = make_shared(x, y); @@ -375,10 +375,9 @@ TEST(provenance, add_tags_above) TEST(provenance, builder) { - auto p1 = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); + auto p1 = make_shared(element::i32, PartialShape{2, 3, 4}); p1->add_provenance_tag("P1"); - auto norm = - builder::opset1::lp_norm(p1, op::Constant::create(element::Type_t::i64, {}, {0}), 1, 0); + auto norm = builder::opset1::lp_norm(p1, op::Constant::create(element::i64, {}, {0}), 1, 0); norm->add_provenance_tag("norm"); for (auto node : topological_sort(NodeVector{norm})) { @@ -397,7 +396,7 @@ TEST(provenance, fused_copy_origin_tags) { test::ProvenanceEnabler provenance_enabler; - auto p1 = make_shared(element::Type_t::f32, PartialShape{2, 3, 4}); + auto p1 = make_shared(element::f32, PartialShape{2, 3, 4}); p1->add_provenance_tag("P1"); auto g = make_shared(p1); g->add_provenance_tag("G"); @@ -430,7 +429,7 @@ TEST(provenance, fused_decomposition_tag) { test::ProvenanceEnabler provenance_enabler; - auto p1 = make_shared(element::Type_t::f32, PartialShape{2, 3, 4}); + auto p1 = make_shared(element::f32, PartialShape{2, 3, 4}); auto fused_op = make_shared(p1); auto result = make_shared(fused_op); auto f = make_shared(ResultVector{result}, ParameterVector{p1}); @@ -450,7 +449,7 @@ TEST(provenance, fused_decomposition_tag) TEST(provenance, empty_group) { - auto p1 = make_shared(element::Type_t::i32, PartialShape{2, 3, 4}); + auto p1 = make_shared(element::i32, PartialShape{2, 3, 4}); p1->add_provenance_tag("P1"); auto abs = make_shared(p1); // Make sure group is empty @@ -467,4 +466,4 @@ TEST(provenance, empty_group) EXPECT_EQ(node->get_provenance_tags(), (ProvSet{"abs"})); } } -} \ No newline at end of file +} diff --git a/ngraph/test/replace_node.cpp b/ngraph/test/replace_node.cpp index 69903ac1df8a0f..0f4da0c889d91f 100644 --- a/ngraph/test/replace_node.cpp +++ b/ngraph/test/replace_node.cpp @@ -61,26 +61,24 @@ using namespace ngraph; // TEST(replace_node, replace_nodes) { - auto x = make_shared(element::Type_t::f32, Shape{2}); - auto y = make_shared(element::Type_t::f32, Shape{2}); - auto z = make_shared(element::Type_t::f32, Shape{2}); + auto x = make_shared(element::f32, Shape{2}); + auto y = make_shared(element::f32, Shape{2}); + auto z = make_shared(element::f32, Shape{2}); auto add = make_shared(x, y); - auto k = make_shared(element::Type_t::f32, Shape{2}, vector{1, 2}); + auto k = make_shared(element::f32, Shape{2}, vector{1, 2}); auto mul = make_shared(add, k); auto sub = make_shared(mul, z); auto f = make_shared(NodeVector{sub}, ParameterVector{x, y, z}); unordered_map, shared_ptr> parameter_replacement_map; - auto x_replacement = make_shared(element::Type_t::f32, Shape{2}); + auto x_replacement = make_shared(element::f32, Shape{2}); parameter_replacement_map[x] = x_replacement; unordered_map, shared_ptr> body_replacement_map; - auto y_replacement = - make_shared(element::Type_t::f32, Shape{2}, vector{3, 4}); - auto k_replacement = - make_shared(element::Type_t::f32, Shape{2}, vector{5, 6}); + auto y_replacement = make_shared(element::f32, Shape{2}, vector{3, 4}); + auto k_replacement = make_shared(element::f32, Shape{2}, vector{5, 6}); auto z_replacement = make_shared(x_replacement, mul); body_replacement_map[y] = y_replacement; body_replacement_map[k] = k_replacement; diff --git a/ngraph/test/runtime/interpreter/int_executable.cpp b/ngraph/test/runtime/interpreter/int_executable.cpp index 9fe7b5eeb40ec4..439fc249be65b6 100644 --- a/ngraph/test/runtime/interpreter/int_executable.cpp +++ b/ngraph/test/runtime/interpreter/int_executable.cpp @@ -257,7 +257,7 @@ void runtime::interpreter::INTExecutable::perform_nan_check( for (const shared_ptr& tensor : tensors) { const element::Type& type = tensor->get_element_type(); - if (type == element::Type_t::f32) + if (type == element::f32) { const float* data = tensor->get_data_ptr(); for (size_t i = 0; i < tensor->get_element_count(); i++) @@ -276,7 +276,7 @@ void runtime::interpreter::INTExecutable::perform_nan_check( } } } - else if (type == element::Type_t::f64) + else if (type == element::f64) { const double* data = tensor->get_data_ptr(); for (size_t i = 0; i < tensor->get_element_count(); i++) diff --git a/ngraph/test/runtime/pass/dyn_elimination.cpp b/ngraph/test/runtime/pass/dyn_elimination.cpp index 8fcbf143481cfd..0f82643a877519 100644 --- a/ngraph/test/runtime/pass/dyn_elimination.cpp +++ b/ngraph/test/runtime/pass/dyn_elimination.cpp @@ -56,12 +56,12 @@ std::shared_ptr make_range_replacement(const element::Type& et, void pass::DynElimination::construct_range() { - auto start_arg_label = make_shared( - element::Type_t::f32, Shape{}, pattern::has_class()); - auto stop_arg_label = make_shared( - element::Type_t::f32, Shape{}, pattern::has_class()); - auto step_arg_label = make_shared( - element::Type_t::f32, Shape{}, pattern::has_class()); + auto start_arg_label = + make_shared(element::f32, Shape{}, pattern::has_class()); + auto stop_arg_label = + make_shared(element::f32, Shape{}, pattern::has_class()); + auto step_arg_label = + make_shared(element::f32, Shape{}, pattern::has_class()); auto range_pat = make_shared(start_arg_label, stop_arg_label, step_arg_label); diff --git a/ngraph/test/runtime/pass/opset0_downgrade.cpp b/ngraph/test/runtime/pass/opset0_downgrade.cpp index d19b594710e3b5..3b9fb7b11a4a0c 100644 --- a/ngraph/test/runtime/pass/opset0_downgrade.cpp +++ b/ngraph/test/runtime/pass/opset0_downgrade.cpp @@ -83,7 +83,7 @@ namespace opset0_downgrade reshaped_output_shape.insert(reshaped_output_shape.begin() + axis, 1); } auto shape_pattern = op::Constant::create( - element::Type_t::u64, {reshaped_output_shape.size()}, reshaped_output_shape); + element::u64, {reshaped_output_shape.size()}, reshaped_output_shape); auto reshaped_product = make_shared(replacement_node->output(0), shape_pattern, false); return reshaped_product; diff --git a/ngraph/test/runtime/pass/opset1_downgrade.cpp b/ngraph/test/runtime/pass/opset1_downgrade.cpp index 23fe9aa970e0d5..b4fd099c8e2323 100644 --- a/ngraph/test/runtime/pass/opset1_downgrade.cpp +++ b/ngraph/test/runtime/pass/opset1_downgrade.cpp @@ -39,7 +39,7 @@ namespace opset1_downgrade { const auto const_filled_with_ones = make_shared( op::Constant::create(data->get_element_type(), {}, {1}), target_shape); - if (const_filled_with_ones->get_element_type() == element::Type_t::boolean) + if (const_filled_with_ones->get_element_type() == element::boolean) { replacement_node = make_shared(data, const_filled_with_ones); } diff --git a/ngraph/test/runtime/pass/opset1_upgrade.cpp b/ngraph/test/runtime/pass/opset1_upgrade.cpp index c18acccab3105b..bf2d8f4b0ac705 100644 --- a/ngraph/test/runtime/pass/opset1_upgrade.cpp +++ b/ngraph/test/runtime/pass/opset1_upgrade.cpp @@ -77,7 +77,7 @@ namespace opset1_upgrade node->input_value(1), // data node->input_value(0), // filters op::Constant::create( - element::Type_t::i64, + element::i64, Shape{data_batch_shape.size() - 2}, vector(data_batch_shape.begin() + 2, data_batch_shape.end())), strides, @@ -176,8 +176,7 @@ namespace opset1_upgrade auto replacement_node = make_shared( node->input_value(2), reshaped_filters, - op::Constant::create( - element::Type_t::i64, Shape{data_batch_shape.size()}, data_batch_shape), + op::Constant::create(element::i64, Shape{data_batch_shape.size()}, data_batch_shape), strides, pads_begin, pads_end, diff --git a/ngraph/test/specialize_function.cpp b/ngraph/test/specialize_function.cpp index c292ec9a6ec0f7..aa24f959933277 100644 --- a/ngraph/test/specialize_function.cpp +++ b/ngraph/test/specialize_function.cpp @@ -25,10 +25,10 @@ using namespace ngraph; // shapes. TEST(specialize_function, et_shape_static) { - auto p0 = std::make_shared(element::Type_t::f32, Shape{1, 2, 3}); - auto p1 = std::make_shared(element::Type_t::i32, Shape{1, 2, 3}); + auto p0 = std::make_shared(element::f32, Shape{1, 2, 3}); + auto p1 = std::make_shared(element::i32, Shape{1, 2, 3}); - auto k = std::make_shared(p1, element::Type_t::f32); + auto k = std::make_shared(p1, element::f32); auto a = std::make_shared(p0, k); auto f = std::make_shared(a, ParameterVector{p0, p1}); @@ -36,21 +36,21 @@ TEST(specialize_function, et_shape_static) std::vector param_vals{nullptr, nullptr}; auto g = specialize_function(f, - {element::Type_t::f32, element::Type_t::i32}, + {element::f32, element::i32}, {PartialShape{1, 2, 3}, PartialShape{1, 2, 3}}, param_vals); ASSERT_EQ(g->get_output_shape(0), (Shape{1, 2, 3})); - ASSERT_EQ(g->get_output_element_type(0), element::Type_t::f32); + ASSERT_EQ(g->get_output_element_type(0), element::f32); } // Test specialization of dynamic element types. TEST(specialize_function, et_dynamic_shape_static) { - auto p0 = std::make_shared(element::Type_t::dynamic, Shape{1, 2, 3}); - auto p1 = std::make_shared(element::Type_t::dynamic, Shape{1, 2, 3}); + auto p0 = std::make_shared(element::dynamic, Shape{1, 2, 3}); + auto p1 = std::make_shared(element::dynamic, Shape{1, 2, 3}); - auto k = std::make_shared(p1, element::Type_t::f32); + auto k = std::make_shared(p1, element::f32); auto a = std::make_shared(p0, k); auto f = std::make_shared(a, ParameterVector{p0, p1}); @@ -58,21 +58,21 @@ TEST(specialize_function, et_dynamic_shape_static) std::vector param_vals{nullptr, nullptr}; auto g = specialize_function(f, - {element::Type_t::f32, element::Type_t::i32}, + {element::f32, element::i32}, {PartialShape{1, 2, 3}, PartialShape{1, 2, 3}}, param_vals); ASSERT_EQ(g->get_output_shape(0), (Shape{1, 2, 3})); - ASSERT_EQ(g->get_output_element_type(0), element::Type_t::f32); + ASSERT_EQ(g->get_output_element_type(0), element::f32); } // Test specialization of rank-dynamic shapes. TEST(specialize_function, et_static_shape_rank_dynamic) { - auto p0 = std::make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto p1 = std::make_shared(element::Type_t::i32, PartialShape::dynamic()); + auto p0 = std::make_shared(element::f32, PartialShape::dynamic()); + auto p1 = std::make_shared(element::i32, PartialShape::dynamic()); - auto k = std::make_shared(p1, element::Type_t::f32); + auto k = std::make_shared(p1, element::f32); auto a = std::make_shared(p0, k); auto f = std::make_shared(a, ParameterVector{p0, p1}); @@ -80,21 +80,21 @@ TEST(specialize_function, et_static_shape_rank_dynamic) std::vector param_vals{nullptr, nullptr}; auto g = specialize_function(f, - {element::Type_t::f32, element::Type_t::i32}, + {element::f32, element::i32}, {PartialShape{1, 2, 3}, PartialShape{1, 2, 3}}, param_vals); ASSERT_EQ(g->get_output_shape(0), (Shape{1, 2, 3})); - ASSERT_EQ(g->get_output_element_type(0), element::Type_t::f32); + ASSERT_EQ(g->get_output_element_type(0), element::f32); } // Test specialization of rank-static dynamic shapes. TEST(specialize_function, et_static_shape_rank_static_dynamic) { - auto p0 = std::make_shared(element::Type_t::f32, PartialShape::dynamic(3)); - auto p1 = std::make_shared(element::Type_t::i32, PartialShape::dynamic(3)); + auto p0 = std::make_shared(element::f32, PartialShape::dynamic(3)); + auto p1 = std::make_shared(element::i32, PartialShape::dynamic(3)); - auto k = std::make_shared(p1, element::Type_t::f32); + auto k = std::make_shared(p1, element::f32); auto a = std::make_shared(p0, k); auto f = std::make_shared(a, ParameterVector{p0, p1}); @@ -102,21 +102,21 @@ TEST(specialize_function, et_static_shape_rank_static_dynamic) std::vector param_vals{nullptr, nullptr}; auto g = specialize_function(f, - {element::Type_t::f32, element::Type_t::i32}, + {element::f32, element::i32}, {PartialShape{1, 2, 3}, PartialShape{1, 2, 3}}, param_vals); ASSERT_EQ(g->get_output_shape(0), (Shape{1, 2, 3})); - ASSERT_EQ(g->get_output_element_type(0), element::Type_t::f32); + ASSERT_EQ(g->get_output_element_type(0), element::f32); } // Test specialization of values to a shape-dynamic parameters. TEST(specialize_function, et_static_shape_rank_static_dynamic_subst_val) { - auto p0 = std::make_shared(element::Type_t::f32, PartialShape::dynamic(3)); - auto p1 = std::make_shared(element::Type_t::i32, PartialShape::dynamic(3)); + auto p0 = std::make_shared(element::f32, PartialShape::dynamic(3)); + auto p1 = std::make_shared(element::i32, PartialShape::dynamic(3)); - auto k = std::make_shared(p1, element::Type_t::f32); + auto k = std::make_shared(p1, element::f32); auto a = std::make_shared(p0, k); auto f = std::make_shared(a, ParameterVector{p0, p1}); @@ -126,12 +126,12 @@ TEST(specialize_function, et_static_shape_rank_static_dynamic_subst_val) std::vector param_vals{nullptr, p1_subst_vals.data()}; auto g = specialize_function(f, - {element::Type_t::f32, element::Type_t::i32}, + {element::f32, element::i32}, {PartialShape{1, 2, 3}, PartialShape{1, 2, 3}}, param_vals); ASSERT_EQ(g->get_output_shape(0), (Shape{1, 2, 3})); - ASSERT_EQ(g->get_output_element_type(0), element::Type_t::f32); + ASSERT_EQ(g->get_output_element_type(0), element::f32); auto plus_node = as_type_ptr(g->get_results().at(0)->input_value(0).get_node_shared_ptr()); @@ -141,7 +141,7 @@ TEST(specialize_function, et_static_shape_rank_static_dynamic_subst_val) auto const_node = as_type_ptr(convert_node->input_value(0).get_node_shared_ptr()); ASSERT_TRUE(const_node); - ASSERT_EQ(const_node->get_output_element_type(0), element::Type_t::i32); + ASSERT_EQ(const_node->get_output_element_type(0), element::i32); ASSERT_EQ(const_node->get_output_shape(0), (Shape{1, 2, 3})); ASSERT_EQ(const_node->get_vector(), p1_subst_vals); } @@ -151,10 +151,10 @@ TEST(specialize_function, et_static_shape_rank_static_dynamic_subst_val) // (The input shapes we provide at specialization time are inconsistent.) TEST(specialize_function, et_static_shape_rank_dynamic_validation_fails) { - auto p0 = std::make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto p1 = std::make_shared(element::Type_t::i32, PartialShape::dynamic()); + auto p0 = std::make_shared(element::f32, PartialShape::dynamic()); + auto p1 = std::make_shared(element::i32, PartialShape::dynamic()); - auto k = std::make_shared(p1, element::Type_t::f32); + auto k = std::make_shared(p1, element::f32); auto a = std::make_shared(p0, k); auto f = std::make_shared(a, ParameterVector{p0, p1}); @@ -164,7 +164,7 @@ TEST(specialize_function, et_static_shape_rank_dynamic_validation_fails) ASSERT_THROW( { specialize_function(f, - {element::Type_t::f32, element::Type_t::i32}, + {element::f32, element::i32}, {PartialShape{1, 2, 3}, PartialShape{1, 2, 3, 4}}, param_vals); }, @@ -176,10 +176,10 @@ TEST(specialize_function, et_static_shape_rank_dynamic_validation_fails) // (The input element types we provide at specialization time are inconsistent.) TEST(specialize_function, et_dynamic_shape_static_validation_fails) { - auto p0 = std::make_shared(element::Type_t::dynamic, Shape{1, 2, 3}); - auto p1 = std::make_shared(element::Type_t::dynamic, Shape{1, 2, 3}); + auto p0 = std::make_shared(element::dynamic, Shape{1, 2, 3}); + auto p1 = std::make_shared(element::dynamic, Shape{1, 2, 3}); - auto k = std::make_shared(p1, element::Type_t::f32); + auto k = std::make_shared(p1, element::f32); auto a = std::make_shared(p0, k); auto f = std::make_shared(a, ParameterVector{p0, p1}); @@ -189,7 +189,7 @@ TEST(specialize_function, et_dynamic_shape_static_validation_fails) ASSERT_THROW( { specialize_function(f, - {element::Type_t::u32, element::Type_t::i32}, + {element::u32, element::i32}, {PartialShape{1, 2, 3}, PartialShape{1, 2, 3}}, param_vals); }, @@ -204,10 +204,10 @@ TEST(specialize_function, et_dynamic_shape_static_validation_fails) // reconstruct the graph.) TEST(specialize_function, et_static_shape_rank_static_dynamic_rank_mismatch) { - auto p0 = std::make_shared(element::Type_t::f32, PartialShape::dynamic(3)); - auto p1 = std::make_shared(element::Type_t::i32, PartialShape::dynamic(3)); + auto p0 = std::make_shared(element::f32, PartialShape::dynamic(3)); + auto p1 = std::make_shared(element::i32, PartialShape::dynamic(3)); - auto k = std::make_shared(p1, element::Type_t::f32); + auto k = std::make_shared(p1, element::f32); auto a = std::make_shared(p0, k); auto f = std::make_shared(a, ParameterVector{p0, p1}); @@ -217,7 +217,7 @@ TEST(specialize_function, et_static_shape_rank_static_dynamic_rank_mismatch) ASSERT_THROW( { specialize_function(f, - {element::Type_t::f32, element::Type_t::i32}, + {element::f32, element::i32}, {PartialShape{1, 2, 3}, PartialShape{1, 2, 3, 4}}, param_vals); }, @@ -232,11 +232,11 @@ TEST(specialize_function, et_static_shape_rank_static_dynamic_rank_mismatch) // reconstruct the graph.) TEST(specialize_function, et_static_shape_rank_static_dynamic_dim_mismatch) { - auto p0 = std::make_shared(element::Type_t::f32, PartialShape{1, 2, 3}); - auto p1 = std::make_shared(element::Type_t::i32, - PartialShape{1, Dimension::dynamic(), 3}); + auto p0 = std::make_shared(element::f32, PartialShape{1, 2, 3}); + auto p1 = + std::make_shared(element::i32, PartialShape{1, Dimension::dynamic(), 3}); - auto k = std::make_shared(p1, element::Type_t::f32); + auto k = std::make_shared(p1, element::f32); auto a = std::make_shared(p0, k); auto f = std::make_shared(a, ParameterVector{p0, p1}); @@ -246,7 +246,7 @@ TEST(specialize_function, et_static_shape_rank_static_dynamic_dim_mismatch) ASSERT_THROW( { specialize_function(f, - {element::Type_t::f32, element::Type_t::i32}, + {element::f32, element::i32}, {PartialShape{1, 2, 3}, PartialShape{1, 9, 4}}, param_vals); }, @@ -256,10 +256,10 @@ TEST(specialize_function, et_static_shape_rank_static_dynamic_dim_mismatch) // Test for failure when we supply the wrong number of replacement element types. TEST(specialize_function, et_count_wrong) { - auto p0 = std::make_shared(element::Type_t::f32, PartialShape{1, 2, 3}); - auto p1 = std::make_shared(element::Type_t::i32, PartialShape{1, 2, 3}); + auto p0 = std::make_shared(element::f32, PartialShape{1, 2, 3}); + auto p1 = std::make_shared(element::i32, PartialShape{1, 2, 3}); - auto k = std::make_shared(p1, element::Type_t::f32); + auto k = std::make_shared(p1, element::f32); auto a = std::make_shared(p0, k); auto f = std::make_shared(a, ParameterVector{p0, p1}); @@ -269,7 +269,7 @@ TEST(specialize_function, et_count_wrong) ASSERT_THROW( { specialize_function(f, - {element::Type_t::f32, element::Type_t::i32, element::Type_t::u32}, + {element::f32, element::i32, element::u32}, {PartialShape{1, 2, 3}, PartialShape{1, 2, 3}}, param_vals); }, @@ -279,10 +279,10 @@ TEST(specialize_function, et_count_wrong) // Test for failure when we supply the wrong number of replacement shapes. TEST(specialize_function, shape_count_wrong) { - auto p0 = std::make_shared(element::Type_t::f32, PartialShape{1, 2, 3}); - auto p1 = std::make_shared(element::Type_t::i32, PartialShape{1, 2, 3}); + auto p0 = std::make_shared(element::f32, PartialShape{1, 2, 3}); + auto p1 = std::make_shared(element::i32, PartialShape{1, 2, 3}); - auto k = std::make_shared(p1, element::Type_t::f32); + auto k = std::make_shared(p1, element::f32); auto a = std::make_shared(p0, k); auto f = std::make_shared(a, ParameterVector{p0, p1}); @@ -293,7 +293,7 @@ TEST(specialize_function, shape_count_wrong) { specialize_function( f, - {element::Type_t::f32, element::Type_t::i32}, + {element::f32, element::i32}, {PartialShape{1, 2, 3}, PartialShape{1, 2, 3}, PartialShape{4, 5, 6}}, param_vals); }, @@ -303,10 +303,10 @@ TEST(specialize_function, shape_count_wrong) // Test for failure when we supply the wrong number of replacement parameter values. TEST(specialize_function, value_count_wrong) { - auto p0 = std::make_shared(element::Type_t::f32, PartialShape{1, 2, 3}); - auto p1 = std::make_shared(element::Type_t::i32, PartialShape{1, 2, 3}); + auto p0 = std::make_shared(element::f32, PartialShape{1, 2, 3}); + auto p1 = std::make_shared(element::i32, PartialShape{1, 2, 3}); - auto k = std::make_shared(p1, element::Type_t::f32); + auto k = std::make_shared(p1, element::f32); auto a = std::make_shared(p0, k); auto f = std::make_shared(a, ParameterVector{p0, p1}); @@ -316,7 +316,7 @@ TEST(specialize_function, value_count_wrong) ASSERT_THROW( { specialize_function(f, - {element::Type_t::f32, element::Type_t::i32}, + {element::f32, element::i32}, {PartialShape{1, 2, 3}, PartialShape{1, 2, 3}}, param_vals); }, diff --git a/ngraph/test/tensor.cpp b/ngraph/test/tensor.cpp index 08ff4840370292..5d047c41d7acd7 100644 --- a/ngraph/test/tensor.cpp +++ b/ngraph/test/tensor.cpp @@ -39,7 +39,7 @@ TEST(tensor, size) pass_manager.register_pass(); { - auto arg0 = make_shared(element::Type_t::f32, Shape{2, 3}); + auto arg0 = make_shared(element::f32, Shape{2, 3}); auto add = make_shared(arg0, arg0); auto f0 = make_shared(add, ParameterVector{arg0}); @@ -51,7 +51,7 @@ TEST(tensor, size) } { - auto arg0 = make_shared(element::Type_t::f32, Shape{}); + auto arg0 = make_shared(element::f32, Shape{}); auto add = make_shared(arg0, arg0); auto f0 = make_shared(add, ParameterVector{arg0}); @@ -63,7 +63,7 @@ TEST(tensor, size) } { - auto arg0 = make_shared(element::Type_t::f32, Shape{1}); + auto arg0 = make_shared(element::f32, Shape{1}); auto add = make_shared(arg0, arg0); auto f0 = make_shared(add, ParameterVector{arg0}); @@ -80,7 +80,7 @@ TEST(tensor, output_flag) pass::Manager pass_manager; pass_manager.register_pass(); - auto arg0 = make_shared(element::Type_t::f32, Shape{1}); + auto arg0 = make_shared(element::f32, Shape{1}); auto add = make_shared(arg0, arg0); auto f0 = make_shared(add, ParameterVector{arg0}); diff --git a/ngraph/test/type_prop/assign.cpp b/ngraph/test/type_prop/assign.cpp index 5e29020f72d3d5..3bffbd8a931a15 100644 --- a/ngraph/test/type_prop/assign.cpp +++ b/ngraph/test/type_prop/assign.cpp @@ -23,7 +23,7 @@ using namespace ngraph; TEST(type_prop, assign_variable_not_found) { - auto A = make_shared(element::Type_t::f32, Shape{1, 2, 64, 64}); + auto A = make_shared(element::f32, Shape{1, 2, 64, 64}); try { auto space_to_depth = make_shared(A, "variable_id"); @@ -43,10 +43,10 @@ TEST(type_prop, assign_variable_not_found) TEST(type_prop, assign_deduce) { - auto input = make_shared(element::Type_t::f32, Shape{1, 2, 64, 64}); + auto input = make_shared(element::f32, Shape{1, 2, 64, 64}); auto read_value = make_shared(input, "variable_id"); auto assign = make_shared(read_value, "variable_id"); - ASSERT_EQ(assign->get_element_type(), element::Type_t::f32); + ASSERT_EQ(assign->get_element_type(), element::f32); ASSERT_EQ(assign->get_shape(), (Shape{1, 2, 64, 64})); } diff --git a/ngraph/test/type_prop/avg_pool.cpp b/ngraph/test/type_prop/avg_pool.cpp index 1837f39c0f285d..a08c58a2139d91 100644 --- a/ngraph/test/type_prop/avg_pool.cpp +++ b/ngraph/test/type_prop/avg_pool.cpp @@ -32,7 +32,7 @@ TEST(type_prop, avg_pool_auto_padding) const auto rounding_mode = op::RoundingType::FLOOR; const auto auto_pad = op::PadType::SAME_LOWER; - auto arg = make_shared(element::Type_t::f32, arg_shape); + auto arg = make_shared(element::f32, arg_shape); auto mp = make_shared( arg, strides, pads_begin, pads_end, kernel_shape, exclude_pad, rounding_mode, auto_pad); @@ -52,7 +52,7 @@ TEST(type_prop, avg_pool_auto_padding_nc_dims_dynamic_same_lower) const auto rounding_mode = op::RoundingType::FLOOR; const auto auto_pad = op::PadType::SAME_LOWER; - auto arg = make_shared(element::Type_t::f32, arg_shape); + auto arg = make_shared(element::f32, arg_shape); auto mp = make_shared( arg, strides, pads_begin, pads_end, kernel_shape, exclude_pad, rounding_mode, auto_pad); @@ -73,7 +73,7 @@ TEST(type_prop, avg_pool_auto_padding_nc_dims_dynamic_same_upper) const auto rounding_mode = op::RoundingType::FLOOR; const auto auto_pad = op::PadType::SAME_UPPER; - auto arg = make_shared(element::Type_t::f32, arg_shape); + auto arg = make_shared(element::f32, arg_shape); auto mp = make_shared( arg, strides, pads_begin, pads_end, kernel_shape, exclude_pad, rounding_mode, auto_pad); @@ -94,7 +94,7 @@ TEST(type_prop, avg_pool_auto_padding_spatial_dims_dynamic) const auto rounding_mode = op::RoundingType::FLOOR; const auto auto_pad = op::PadType::SAME_LOWER; - auto arg = make_shared(element::Type_t::f32, arg_shape); + auto arg = make_shared(element::f32, arg_shape); auto mp = make_shared( arg, strides, pads_begin, pads_end, kernel_shape, exclude_pad, rounding_mode, auto_pad); @@ -106,12 +106,12 @@ TEST(type_prop, avg_pool_auto_padding_spatial_dims_dynamic) TEST(type_prop, avg_pool_1d_deduce) { - const auto param = make_shared(element::Type_t::f32, Shape{64, 3, 100}); + const auto param = make_shared(element::f32, Shape{64, 3, 100}); const Shape kernel{10}; const auto avg_pool = make_shared( param, Strides{1}, Shape{}, Shape{}, kernel, true, op::RoundingType::FLOOR); - EXPECT_EQ(avg_pool->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(avg_pool->get_output_element_type(0), element::f32); EXPECT_EQ(avg_pool->get_output_shape(0), (Shape{64, 3, 91})); EXPECT_EQ(avg_pool->get_strides(), Strides{1}); @@ -122,13 +122,13 @@ TEST(type_prop, avg_pool_1d_deduce) TEST(type_prop, avg_pool_1d_deduce_strided) { - const auto param = make_shared(element::Type_t::f32, Shape{64, 3, 100}); + const auto param = make_shared(element::f32, Shape{64, 3, 100}); const Shape kernel{10}; const auto move_strides = Strides{2}; const auto avg_pool = make_shared( param, move_strides, Shape{}, Shape{}, kernel, true, op::RoundingType::FLOOR); - EXPECT_EQ(avg_pool->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(avg_pool->get_output_element_type(0), element::f32); EXPECT_EQ(avg_pool->get_output_shape(0), (Shape{64, 3, 46})); EXPECT_EQ(avg_pool->get_strides(), Strides{2}); @@ -139,13 +139,13 @@ TEST(type_prop, avg_pool_1d_deduce_strided) TEST(type_prop, avg_pool_1d_deduce_strided_small_uneven) { - const auto param = make_shared(element::Type_t::f32, Shape{64, 3, 5}); + const auto param = make_shared(element::f32, Shape{64, 3, 5}); const Shape kernel{2}; const auto move_strides = Strides{2}; const auto avg_pool = make_shared( param, move_strides, Shape{}, Shape{}, kernel, true, op::RoundingType::FLOOR); - EXPECT_EQ(avg_pool->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(avg_pool->get_output_element_type(0), element::f32); EXPECT_EQ(avg_pool->get_output_shape(0), (Shape{64, 3, 2})); EXPECT_EQ(avg_pool->get_strides(), Strides{2}); @@ -156,13 +156,13 @@ TEST(type_prop, avg_pool_1d_deduce_strided_small_uneven) TEST(type_prop, avg_pool_1d_deduce_strided_small_even) { - const auto param = make_shared(element::Type_t::f32, Shape{64, 3, 6}); + const auto param = make_shared(element::f32, Shape{64, 3, 6}); const Shape kernel{2}; const auto move_strides = Strides{2}; const auto avg_pool = make_shared( param, move_strides, Shape{}, Shape{}, kernel, true, op::RoundingType::FLOOR); - EXPECT_EQ(avg_pool->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(avg_pool->get_output_element_type(0), element::f32); EXPECT_EQ(avg_pool->get_output_shape(0), (Shape{64, 3, 3})); EXPECT_EQ(avg_pool->get_strides(), Strides{2}); @@ -173,12 +173,12 @@ TEST(type_prop, avg_pool_1d_deduce_strided_small_even) TEST(type_prop, avg_pool_2d_deduce) { - const auto param = make_shared(element::Type_t::f32, Shape{64, 3, 100, 150}); + const auto param = make_shared(element::f32, Shape{64, 3, 100, 150}); const Shape kernel{10, 20}; const auto avg_pool = make_shared( param, Strides{1, 1}, Shape{0, 0}, Shape{0, 0}, kernel, true, op::RoundingType::FLOOR); - EXPECT_EQ(avg_pool->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(avg_pool->get_output_element_type(0), element::f32); EXPECT_EQ(avg_pool->get_output_shape(0), (Shape{64, 3, 91, 131})); EXPECT_EQ(avg_pool->get_strides(), (Strides{1, 1})); @@ -189,13 +189,13 @@ TEST(type_prop, avg_pool_2d_deduce) TEST(type_prop, avg_pool_2d_deduce_strided) { - const auto param = make_shared(element::Type_t::f32, Shape{64, 3, 100, 150}); + const auto param = make_shared(element::f32, Shape{64, 3, 100, 150}); const Shape kernel{10, 20}; const auto move_strides = Strides{2, 3}; const auto avg_pool = make_shared( param, move_strides, Shape{0, 0}, Shape{0, 0}, kernel, true, op::RoundingType::FLOOR); - EXPECT_EQ(avg_pool->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(avg_pool->get_output_element_type(0), element::f32); EXPECT_EQ(avg_pool->get_output_shape(0), (Shape{64, 3, 46, 44})); EXPECT_EQ(avg_pool->get_strides(), (Strides{2, 3})); @@ -206,13 +206,13 @@ TEST(type_prop, avg_pool_2d_deduce_strided) TEST(type_prop, avg_pool_3d_deduce_strided_small) { - const auto param = make_shared(element::Type_t::f32, Shape{64, 3, 7, 8, 10}); + const auto param = make_shared(element::f32, Shape{64, 3, 7, 8, 10}); const Shape kernel{2, 3, 2}; const auto move_strides = Strides{2, 3, 4}; const auto avg_pool = make_shared( param, move_strides, Shape{0, 0, 0}, Shape{0, 0, 0}, kernel, true, op::RoundingType::FLOOR); - EXPECT_EQ(avg_pool->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(avg_pool->get_output_element_type(0), element::f32); EXPECT_EQ(avg_pool->get_output_shape(0), (Shape{64, 3, 3, 2, 3})); EXPECT_EQ(avg_pool->get_strides(), (Strides{2, 3, 4})); @@ -223,7 +223,7 @@ TEST(type_prop, avg_pool_3d_deduce_strided_small) TEST(type_prop, avg_pool_3d_deduce_strided_padded_small) { - const auto param = make_shared(element::Type_t::f32, Shape{64, 3, 7, 8, 10}); + const auto param = make_shared(element::f32, Shape{64, 3, 7, 8, 10}); const Shape kernel{2, 3, 2}; const auto move_strides = Strides{2, 3, 4}; const Shape pads_begin{5, 6, 4}; @@ -231,7 +231,7 @@ TEST(type_prop, avg_pool_3d_deduce_strided_padded_small) const auto avg_pool = make_shared( param, move_strides, pads_begin, pads_end, kernel, false, op::RoundingType::FLOOR); - EXPECT_EQ(avg_pool->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(avg_pool->get_output_element_type(0), element::f32); EXPECT_EQ(avg_pool->get_output_shape(0), (Shape{64, 3, 9, 6, 5})); EXPECT_EQ(avg_pool->get_strides(), (Strides{2, 3, 4})); @@ -242,7 +242,7 @@ TEST(type_prop, avg_pool_3d_deduce_strided_padded_small) TEST(type_prop, avg_pool_invalid_0d_input) { - const auto param = make_shared(element::Type_t::f32, Shape{}); + const auto param = make_shared(element::f32, Shape{}); const Shape kernel{}; EXPECT_THROW(make_shared( param, Strides{1}, Shape{}, Shape{}, kernel, true, op::RoundingType::FLOOR), @@ -251,7 +251,7 @@ TEST(type_prop, avg_pool_invalid_0d_input) TEST(type_prop, avg_pool_invalid_1d_input) { - const auto param = make_shared(element::Type_t::f32, Shape{2}); + const auto param = make_shared(element::f32, Shape{2}); const Shape kernel{}; EXPECT_THROW(make_shared( param, Strides{1}, Shape{}, Shape{}, kernel, true, op::RoundingType::FLOOR), @@ -260,7 +260,7 @@ TEST(type_prop, avg_pool_invalid_1d_input) TEST(type_prop, avg_pool_invalid_2d_input) { - const auto param = make_shared(element::Type_t::f32, Shape{2, 6}); + const auto param = make_shared(element::f32, Shape{2, 6}); const Shape kernel{}; EXPECT_THROW(make_shared( param, Strides{1}, Shape{}, Shape{}, kernel, true, op::RoundingType::FLOOR), @@ -269,7 +269,7 @@ TEST(type_prop, avg_pool_invalid_2d_input) TEST(type_prop, avg_pool_invalid_0_batch_size) { - const auto param = make_shared(element::Type_t::f32, Shape{0, 6, 1}); + const auto param = make_shared(element::f32, Shape{0, 6, 1}); const Shape kernel{1}; EXPECT_THROW(make_shared( param, Strides{1}, Shape{}, Shape{}, kernel, true, op::RoundingType::FLOOR), @@ -278,7 +278,7 @@ TEST(type_prop, avg_pool_invalid_0_batch_size) TEST(type_prop, avg_pool_invalid_0_channels) { - const auto param = make_shared(element::Type_t::f32, Shape{6, 0, 1}); + const auto param = make_shared(element::f32, Shape{6, 0, 1}); const Shape kernel{1}; EXPECT_THROW(make_shared( param, Strides{1}, Shape{}, Shape{}, kernel, true, op::RoundingType::FLOOR), @@ -287,7 +287,7 @@ TEST(type_prop, avg_pool_invalid_0_channels) TEST(type_prop, avg_pool_invalid_wrong_number_of_window_dimensions_too_many) { - const auto param = make_shared(element::Type_t::f32, Shape{6, 2, 10, 10}); + const auto param = make_shared(element::f32, Shape{6, 2, 10, 10}); const Shape kernel{3, 3, 3}; EXPECT_THROW(make_shared( param, Strides{1}, Shape{}, Shape{}, kernel, true, op::RoundingType::FLOOR), @@ -296,7 +296,7 @@ TEST(type_prop, avg_pool_invalid_wrong_number_of_window_dimensions_too_many) TEST(type_prop, avg_pool_invalid_wrong_number_of_window_dimensions_too_few) { - const auto param = make_shared(element::Type_t::f32, Shape{6, 2, 10, 10}); + const auto param = make_shared(element::f32, Shape{6, 2, 10, 10}); const Shape kernel{3}; EXPECT_THROW(make_shared( param, Strides{1}, Shape{}, Shape{}, kernel, true, op::RoundingType::FLOOR), @@ -305,7 +305,7 @@ TEST(type_prop, avg_pool_invalid_wrong_number_of_window_dimensions_too_few) TEST(type_prop, avg_pool_invalid_movement_stride_rank) { - const auto param = make_shared(element::Type_t::f32, Shape{6, 2, 10, 10}); + const auto param = make_shared(element::f32, Shape{6, 2, 10, 10}); const Shape kernel{3, 3}; const auto move_strides = Strides{2, 3, 8}; EXPECT_THROW(make_shared( @@ -315,7 +315,7 @@ TEST(type_prop, avg_pool_invalid_movement_stride_rank) TEST(type_prop, avg_pool_invalid_padding_below_rank) { - const auto param = make_shared(element::Type_t::f32, Shape{6, 2, 10, 10}); + const auto param = make_shared(element::f32, Shape{6, 2, 10, 10}); const Shape kernel{3, 3}; const auto move_strides = Strides{2, 3}; const Shape pads_begin{1, 2, 3}; @@ -328,7 +328,7 @@ TEST(type_prop, avg_pool_invalid_padding_below_rank) TEST(type_prop, avg_pool_invalid_padding_above_rank) { - const auto param = make_shared(element::Type_t::f32, Shape{6, 2, 10, 10}); + const auto param = make_shared(element::f32, Shape{6, 2, 10, 10}); const Shape kernel{3, 3}; const auto move_strides = Strides{2, 3}; const Shape pads_begin{1, 2}; @@ -341,7 +341,7 @@ TEST(type_prop, avg_pool_invalid_padding_above_rank) TEST(type_prop, avg_pool_invalid_input_item_size_0) { - const auto param = make_shared(element::Type_t::f32, Shape{6, 2, 0, 10}); + const auto param = make_shared(element::f32, Shape{6, 2, 0, 10}); const Shape kernel{3, 3}; EXPECT_THROW(make_shared( param, Strides{1}, Shape{}, Shape{}, kernel, true, op::RoundingType::FLOOR), @@ -350,7 +350,7 @@ TEST(type_prop, avg_pool_invalid_input_item_size_0) TEST(type_prop, avg_pool_invalid_window_size_0) { - const auto param = make_shared(element::Type_t::f32, Shape{6, 2, 10, 10}); + const auto param = make_shared(element::f32, Shape{6, 2, 10, 10}); const Shape kernel{3, 0}; EXPECT_THROW(make_shared( param, Strides{1}, Shape{}, Shape{}, kernel, true, op::RoundingType::FLOOR), @@ -359,7 +359,7 @@ TEST(type_prop, avg_pool_invalid_window_size_0) TEST(type_prop, avg_pool_invalid_dilated_too_large) { - const auto param = make_shared(element::Type_t::f32, Shape{6, 2, 8, 8}); + const auto param = make_shared(element::f32, Shape{6, 2, 8, 8}); const Shape kernel{9, 9}; EXPECT_THROW(make_shared( param, Strides{1}, Shape{}, Shape{}, kernel, true, op::RoundingType::FLOOR), @@ -368,7 +368,7 @@ TEST(type_prop, avg_pool_invalid_dilated_too_large) TEST(type_prop, avg_pool_larger_than_pre_padding_but_fits_in_post_padding) { - const auto param = make_shared(element::Type_t::f32, Shape{6, 2, 8, 8}); + const auto param = make_shared(element::f32, Shape{6, 2, 8, 8}); const Shape kernel{9, 9}; const Strides window_strides{1, 1}; const Shape pads_begin{0, 0}; @@ -376,13 +376,13 @@ TEST(type_prop, avg_pool_larger_than_pre_padding_but_fits_in_post_padding) const auto avg_pool = make_shared( param, window_strides, pads_begin, pads_end, kernel, true, op::RoundingType::FLOOR); - ASSERT_EQ(avg_pool->get_output_element_type(0), element::Type_t::f32); + ASSERT_EQ(avg_pool->get_output_element_type(0), element::f32); ASSERT_EQ(avg_pool->get_output_shape(0), (Shape{6, 2, 1, 1})); } TEST(type_prop, avg_pool_invalid_movement_stride_0) { - const auto param = make_shared(element::Type_t::f32, Shape{6, 2, 10, 10}); + const auto param = make_shared(element::f32, Shape{6, 2, 10, 10}); const Shape kernel{3, 3}; const auto move_strides = Strides{0, 1}; EXPECT_THROW(make_shared( @@ -398,7 +398,7 @@ TEST(type_prop, avg_pool_partial_rank_dynamic_ok) const Shape pads_begin{0, 0, 0, 0}; const Shape pads_end{0, 0, 0, 0}; - const auto param = make_shared(element::Type_t::f32, arg_shape); + const auto param = make_shared(element::f32, arg_shape); auto ap = make_shared(param, window_movement_strides, pads_begin, @@ -407,7 +407,7 @@ TEST(type_prop, avg_pool_partial_rank_dynamic_ok) false, op::RoundingType::FLOOR); - ASSERT_EQ(ap->get_output_element_type(0), element::Type_t::f32); + ASSERT_EQ(ap->get_output_element_type(0), element::f32); ASSERT_TRUE(ap->get_output_partial_shape(0).same_scheme(PartialShape::dynamic(6))); } @@ -419,7 +419,7 @@ TEST(type_prop, avg_pool_partial_rank_dynamic_attrib_rank_mismatch) const Shape pads_begin{0, 0, 0, 0}; const Shape pads_end{0, 0, 0, 0}; - const auto param = make_shared(element::Type_t::f32, arg_shape); + const auto param = make_shared(element::f32, arg_shape); EXPECT_THROW(make_shared(param, window_movement_strides, @@ -439,7 +439,7 @@ TEST(type_prop, avg_pool_partial_rank_static_dynamic_ok) const Shape pads_begin{0, 0, 0, 0}; const Shape pads_end{0, 0, 0, 0}; - const auto param = make_shared(element::Type_t::f32, arg_shape); + const auto param = make_shared(element::f32, arg_shape); auto ap = make_shared(param, window_movement_strides, pads_begin, @@ -448,7 +448,7 @@ TEST(type_prop, avg_pool_partial_rank_static_dynamic_ok) false, op::RoundingType::FLOOR); - ASSERT_EQ(ap->get_output_element_type(0), element::Type_t::f32); + ASSERT_EQ(ap->get_output_element_type(0), element::f32); ASSERT_TRUE(ap->get_output_partial_shape(0).same_scheme(PartialShape::dynamic(6))); } @@ -460,7 +460,7 @@ TEST(type_prop, avg_pool_partial_rank_static_dynamic_some_dims_known_ok) const Shape pads_begin{0, 0, 0, 0}; const Shape pads_end{0, 0, 0, 0}; - const auto param = make_shared(element::Type_t::f32, arg_shape); + const auto param = make_shared(element::f32, arg_shape); auto ap = make_shared(param, window_movement_strides, pads_begin, @@ -469,7 +469,7 @@ TEST(type_prop, avg_pool_partial_rank_static_dynamic_some_dims_known_ok) false, op::RoundingType::FLOOR); - ASSERT_EQ(ap->get_output_element_type(0), element::Type_t::f32); + ASSERT_EQ(ap->get_output_element_type(0), element::f32); ASSERT_TRUE(ap->get_output_partial_shape(0).same_scheme( PartialShape{5, Dimension::dynamic(), 7, Dimension::dynamic(), 1, 3})); } @@ -482,7 +482,7 @@ TEST(type_prop, avg_pool_partial_rank_static_dynamic_attrib_rank_mismatch) const Shape pads_begin{0, 0, 0, 0}; const Shape pads_end{0, 0, 0, 0}; - const auto param = make_shared(element::Type_t::f32, arg_shape); + const auto param = make_shared(element::f32, arg_shape); EXPECT_THROW(make_shared(param, window_movement_strides, @@ -502,7 +502,7 @@ TEST(type_prop, avg_pool_partial_rank_static_dynamic_window_not_too_big) const Shape pads_begin{0, 0, 0, 0}; const Shape pads_end{0, 0, 0, 0}; - const auto param = make_shared(element::Type_t::f32, arg_shape); + const auto param = make_shared(element::f32, arg_shape); EXPECT_THROW(make_shared(param, window_movement_strides, @@ -522,7 +522,7 @@ TEST(type_prop, avg_pool_partial_rank_static_dynamic_padded_window_not_too_big) const Shape pads_begin{0, 0, 0, 0}; const Shape pads_end{1, 0, 0, 0}; - const auto param = make_shared(element::Type_t::f32, arg_shape); + const auto param = make_shared(element::f32, arg_shape); auto ap = make_shared(param, window_movement_strides, pads_begin, @@ -531,7 +531,7 @@ TEST(type_prop, avg_pool_partial_rank_static_dynamic_padded_window_not_too_big) true, op::RoundingType::FLOOR); - ASSERT_EQ(ap->get_output_element_type(0), element::Type_t::f32); + ASSERT_EQ(ap->get_output_element_type(0), element::f32); ASSERT_TRUE(ap->get_output_partial_shape(0).same_scheme( PartialShape{5, Dimension::dynamic(), 1, Dimension::dynamic(), 1, 3})); } @@ -544,7 +544,7 @@ TEST(type_prop, avg_pool_partial_rank_static_dynamic_window_in_padding) const Shape pads_begin{0, 0, 0, 4}; const Shape pads_end{0, 0, 0, 0}; - const auto param = make_shared(element::Type_t::f32, arg_shape); + const auto param = make_shared(element::f32, arg_shape); EXPECT_THROW(make_shared(param, window_movement_strides, diff --git a/ngraph/test/type_prop/batch_norm.cpp b/ngraph/test/type_prop/batch_norm.cpp index 61eb0b2349f1c5..0ab600a8a51ff6 100644 --- a/ngraph/test/type_prop/batch_norm.cpp +++ b/ngraph/test/type_prop/batch_norm.cpp @@ -29,11 +29,11 @@ TEST(type_prop, batch_norm_inference_partial_all_rank_dynamic) PartialShape mean_shape{PartialShape::dynamic()}; PartialShape variance_shape{PartialShape::dynamic()}; double epsilon = 0.001; - element::Type data_batch_et = element::Type_t::f32; - element::Type gamma_et = element::Type_t::f32; - element::Type beta_et = element::Type_t::f32; - element::Type mean_et = element::Type_t::f32; - element::Type variance_et = element::Type_t::f32; + element::Type data_batch_et = element::f32; + element::Type gamma_et = element::f32; + element::Type beta_et = element::f32; + element::Type mean_et = element::f32; + element::Type variance_et = element::f32; auto data_batch = make_shared(data_batch_et, data_batch_shape); auto gamma = make_shared(gamma_et, gamma_shape); @@ -58,11 +58,11 @@ TEST(type_prop, batch_norm_inference_partial_input_rank_static_dynamic_ok) PartialShape mean_shape{PartialShape::dynamic()}; PartialShape variance_shape{PartialShape::dynamic()}; double epsilon = 0.001; - element::Type data_batch_et = element::Type_t::f32; - element::Type gamma_et = element::Type_t::f32; - element::Type beta_et = element::Type_t::f32; - element::Type mean_et = element::Type_t::f32; - element::Type variance_et = element::Type_t::f32; + element::Type data_batch_et = element::f32; + element::Type gamma_et = element::f32; + element::Type beta_et = element::f32; + element::Type mean_et = element::f32; + element::Type variance_et = element::f32; auto data_batch = make_shared(data_batch_et, data_batch_shape); auto gamma = make_shared(gamma_et, gamma_shape); @@ -88,11 +88,11 @@ TEST(type_prop, batch_norm_inference_partial_input_rank_static_dynamic_zero_chan PartialShape mean_shape{PartialShape::dynamic()}; PartialShape variance_shape{PartialShape::dynamic()}; double epsilon = 0.001; - element::Type data_batch_et = element::Type_t::f32; - element::Type gamma_et = element::Type_t::f32; - element::Type beta_et = element::Type_t::f32; - element::Type mean_et = element::Type_t::f32; - element::Type variance_et = element::Type_t::f32; + element::Type data_batch_et = element::f32; + element::Type gamma_et = element::f32; + element::Type beta_et = element::f32; + element::Type mean_et = element::f32; + element::Type variance_et = element::f32; auto data_batch = make_shared(data_batch_et, data_batch_shape); auto gamma = make_shared(gamma_et, gamma_shape); @@ -124,11 +124,11 @@ TEST(type_prop, batch_norm_inference_partial_input_rank_dynamic_some_rank_static PartialShape mean_shape{Dimension::dynamic()}; PartialShape variance_shape{PartialShape::dynamic()}; double epsilon = 0.001; - element::Type data_batch_et = element::Type_t::f32; - element::Type gamma_et = element::Type_t::f32; - element::Type beta_et = element::Type_t::f32; - element::Type mean_et = element::Type_t::f32; - element::Type variance_et = element::Type_t::f32; + element::Type data_batch_et = element::f32; + element::Type gamma_et = element::f32; + element::Type beta_et = element::f32; + element::Type mean_et = element::f32; + element::Type variance_et = element::f32; auto data_batch = make_shared(data_batch_et, data_batch_shape); auto gamma = make_shared(gamma_et, gamma_shape); @@ -152,11 +152,11 @@ TEST(type_prop, batch_norm_inference_partial_input_rank_dynamic_some_rank_static PartialShape mean_shape{Dimension::dynamic(), Dimension::dynamic()}; PartialShape variance_shape{PartialShape::dynamic()}; double epsilon = 0.001; - element::Type data_batch_et = element::Type_t::f32; - element::Type gamma_et = element::Type_t::f32; - element::Type beta_et = element::Type_t::f32; - element::Type mean_et = element::Type_t::f32; - element::Type variance_et = element::Type_t::f32; + element::Type data_batch_et = element::f32; + element::Type gamma_et = element::f32; + element::Type beta_et = element::f32; + element::Type mean_et = element::f32; + element::Type variance_et = element::f32; auto data_batch = make_shared(data_batch_et, data_batch_shape); auto gamma = make_shared(gamma_et, gamma_shape); @@ -191,11 +191,11 @@ TEST(type_prop, PartialShape mean_shape{Dimension::dynamic()}; PartialShape variance_shape{PartialShape::dynamic()}; double epsilon = 0.001; - element::Type data_batch_et = element::Type_t::f32; - element::Type gamma_et = element::Type_t::f32; - element::Type beta_et = element::Type_t::f32; - element::Type mean_et = element::Type_t::f32; - element::Type variance_et = element::Type_t::f32; + element::Type data_batch_et = element::f32; + element::Type gamma_et = element::f32; + element::Type beta_et = element::f32; + element::Type mean_et = element::f32; + element::Type variance_et = element::f32; auto data_batch = make_shared(data_batch_et, data_batch_shape); auto gamma = make_shared(gamma_et, gamma_shape); @@ -229,11 +229,11 @@ TEST(type_prop, PartialShape mean_shape{4}; PartialShape variance_shape{PartialShape::dynamic()}; double epsilon = 0.001; - element::Type data_batch_et = element::Type_t::f32; - element::Type gamma_et = element::Type_t::f32; - element::Type beta_et = element::Type_t::f32; - element::Type mean_et = element::Type_t::f32; - element::Type variance_et = element::Type_t::f32; + element::Type data_batch_et = element::f32; + element::Type gamma_et = element::f32; + element::Type beta_et = element::f32; + element::Type mean_et = element::f32; + element::Type variance_et = element::f32; auto data_batch = make_shared(data_batch_et, data_batch_shape); auto gamma = make_shared(gamma_et, gamma_shape); @@ -266,11 +266,11 @@ TEST(type_prop, batch_norm_inference_partial_input_rank_static_dynamic_some_stat PartialShape mean_shape{3}; PartialShape variance_shape{PartialShape::dynamic()}; double epsilon = 0.001; - element::Type data_batch_et = element::Type_t::f32; - element::Type gamma_et = element::Type_t::f32; - element::Type beta_et = element::Type_t::f32; - element::Type mean_et = element::Type_t::f32; - element::Type variance_et = element::Type_t::f32; + element::Type data_batch_et = element::f32; + element::Type gamma_et = element::f32; + element::Type beta_et = element::f32; + element::Type mean_et = element::f32; + element::Type variance_et = element::f32; auto data_batch = make_shared(data_batch_et, data_batch_shape); auto gamma = make_shared(gamma_et, gamma_shape); @@ -296,11 +296,11 @@ TEST(type_prop, PartialShape mean_shape{3}; PartialShape variance_shape{PartialShape::dynamic()}; double epsilon = 0.001; - element::Type data_batch_et = element::Type_t::f32; - element::Type gamma_et = element::Type_t::f32; - element::Type beta_et = element::Type_t::f32; - element::Type mean_et = element::Type_t::f32; - element::Type variance_et = element::Type_t::f32; + element::Type data_batch_et = element::f32; + element::Type gamma_et = element::f32; + element::Type beta_et = element::f32; + element::Type mean_et = element::f32; + element::Type variance_et = element::f32; auto data_batch = make_shared(data_batch_et, data_batch_shape); auto gamma = make_shared(gamma_et, gamma_shape); @@ -334,11 +334,11 @@ TEST(type_prop, batch_norm_inference_partial_all_rank_dynamic_v5) PartialShape mean_shape{PartialShape::dynamic()}; PartialShape variance_shape{PartialShape::dynamic()}; double epsilon = 0.001; - element::Type data_batch_et = element::Type_t::f32; - element::Type gamma_et = element::Type_t::f32; - element::Type beta_et = element::Type_t::f32; - element::Type mean_et = element::Type_t::f32; - element::Type variance_et = element::Type_t::f32; + element::Type data_batch_et = element::f32; + element::Type gamma_et = element::f32; + element::Type beta_et = element::f32; + element::Type mean_et = element::f32; + element::Type variance_et = element::f32; auto data_batch = make_shared(data_batch_et, data_batch_shape); auto gamma = make_shared(gamma_et, gamma_shape); @@ -363,11 +363,11 @@ TEST(type_prop, batch_norm_inference_partial_input_rank_static_dynamic_ok_v5) PartialShape mean_shape{PartialShape::dynamic()}; PartialShape variance_shape{PartialShape::dynamic()}; double epsilon = 0.001; - element::Type data_batch_et = element::Type_t::f32; - element::Type gamma_et = element::Type_t::f32; - element::Type beta_et = element::Type_t::f32; - element::Type mean_et = element::Type_t::f32; - element::Type variance_et = element::Type_t::f32; + element::Type data_batch_et = element::f32; + element::Type gamma_et = element::f32; + element::Type beta_et = element::f32; + element::Type mean_et = element::f32; + element::Type variance_et = element::f32; auto data_batch = make_shared(data_batch_et, data_batch_shape); auto gamma = make_shared(gamma_et, gamma_shape); @@ -393,11 +393,11 @@ TEST(type_prop, batch_norm_inference_partial_input_rank_static_dynamic_zero_chan PartialShape mean_shape{PartialShape::dynamic()}; PartialShape variance_shape{PartialShape::dynamic()}; double epsilon = 0.001; - element::Type data_batch_et = element::Type_t::f32; - element::Type gamma_et = element::Type_t::f32; - element::Type beta_et = element::Type_t::f32; - element::Type mean_et = element::Type_t::f32; - element::Type variance_et = element::Type_t::f32; + element::Type data_batch_et = element::f32; + element::Type gamma_et = element::f32; + element::Type beta_et = element::f32; + element::Type mean_et = element::f32; + element::Type variance_et = element::f32; auto data_batch = make_shared(data_batch_et, data_batch_shape); auto gamma = make_shared(gamma_et, gamma_shape); @@ -429,11 +429,11 @@ TEST(type_prop, batch_norm_inference_partial_input_rank_dynamic_some_rank_static PartialShape mean_shape{Dimension::dynamic()}; PartialShape variance_shape{PartialShape::dynamic()}; double epsilon = 0.001; - element::Type data_batch_et = element::Type_t::f32; - element::Type gamma_et = element::Type_t::f32; - element::Type beta_et = element::Type_t::f32; - element::Type mean_et = element::Type_t::f32; - element::Type variance_et = element::Type_t::f32; + element::Type data_batch_et = element::f32; + element::Type gamma_et = element::f32; + element::Type beta_et = element::f32; + element::Type mean_et = element::f32; + element::Type variance_et = element::f32; auto data_batch = make_shared(data_batch_et, data_batch_shape); auto gamma = make_shared(gamma_et, gamma_shape); @@ -458,11 +458,11 @@ TEST(type_prop, PartialShape mean_shape{Dimension::dynamic(), Dimension::dynamic()}; PartialShape variance_shape{PartialShape::dynamic()}; double epsilon = 0.001; - element::Type data_batch_et = element::Type_t::f32; - element::Type gamma_et = element::Type_t::f32; - element::Type beta_et = element::Type_t::f32; - element::Type mean_et = element::Type_t::f32; - element::Type variance_et = element::Type_t::f32; + element::Type data_batch_et = element::f32; + element::Type gamma_et = element::f32; + element::Type beta_et = element::f32; + element::Type mean_et = element::f32; + element::Type variance_et = element::f32; auto data_batch = make_shared(data_batch_et, data_batch_shape); auto gamma = make_shared(gamma_et, gamma_shape); @@ -497,11 +497,11 @@ TEST(type_prop, PartialShape mean_shape{Dimension::dynamic()}; PartialShape variance_shape{PartialShape::dynamic()}; double epsilon = 0.001; - element::Type data_batch_et = element::Type_t::f32; - element::Type gamma_et = element::Type_t::f32; - element::Type beta_et = element::Type_t::f32; - element::Type mean_et = element::Type_t::f32; - element::Type variance_et = element::Type_t::f32; + element::Type data_batch_et = element::f32; + element::Type gamma_et = element::f32; + element::Type beta_et = element::f32; + element::Type mean_et = element::f32; + element::Type variance_et = element::f32; auto data_batch = make_shared(data_batch_et, data_batch_shape); auto gamma = make_shared(gamma_et, gamma_shape); @@ -535,11 +535,11 @@ TEST(type_prop, PartialShape mean_shape{4}; PartialShape variance_shape{PartialShape::dynamic()}; double epsilon = 0.001; - element::Type data_batch_et = element::Type_t::f32; - element::Type gamma_et = element::Type_t::f32; - element::Type beta_et = element::Type_t::f32; - element::Type mean_et = element::Type_t::f32; - element::Type variance_et = element::Type_t::f32; + element::Type data_batch_et = element::f32; + element::Type gamma_et = element::f32; + element::Type beta_et = element::f32; + element::Type mean_et = element::f32; + element::Type variance_et = element::f32; auto data_batch = make_shared(data_batch_et, data_batch_shape); auto gamma = make_shared(gamma_et, gamma_shape); @@ -572,11 +572,11 @@ TEST(type_prop, batch_norm_inference_partial_input_rank_static_dynamic_some_stat PartialShape mean_shape{3}; PartialShape variance_shape{PartialShape::dynamic()}; double epsilon = 0.001; - element::Type data_batch_et = element::Type_t::f32; - element::Type gamma_et = element::Type_t::f32; - element::Type beta_et = element::Type_t::f32; - element::Type mean_et = element::Type_t::f32; - element::Type variance_et = element::Type_t::f32; + element::Type data_batch_et = element::f32; + element::Type gamma_et = element::f32; + element::Type beta_et = element::f32; + element::Type mean_et = element::f32; + element::Type variance_et = element::f32; auto data_batch = make_shared(data_batch_et, data_batch_shape); auto gamma = make_shared(gamma_et, gamma_shape); @@ -603,11 +603,11 @@ TEST( PartialShape mean_shape{3}; PartialShape variance_shape{PartialShape::dynamic()}; double epsilon = 0.001; - element::Type data_batch_et = element::Type_t::f32; - element::Type gamma_et = element::Type_t::f32; - element::Type beta_et = element::Type_t::f32; - element::Type mean_et = element::Type_t::f32; - element::Type variance_et = element::Type_t::f32; + element::Type data_batch_et = element::f32; + element::Type gamma_et = element::f32; + element::Type beta_et = element::f32; + element::Type mean_et = element::f32; + element::Type variance_et = element::f32; auto data_batch = make_shared(data_batch_et, data_batch_shape); auto gamma = make_shared(gamma_et, gamma_shape); diff --git a/ngraph/test/type_prop/batch_to_space.cpp b/ngraph/test/type_prop/batch_to_space.cpp index ab6f8fc7c0be1a..dfc9a1eef2a7bc 100644 --- a/ngraph/test/type_prop/batch_to_space.cpp +++ b/ngraph/test/type_prop/batch_to_space.cpp @@ -23,75 +23,70 @@ using namespace ngraph; TEST(type_prop, batch_to_space_output_shape_2D) { - auto data = make_shared(element::Type_t::f32, Shape{10, 26}); - auto block_shape = - make_shared(element::Type_t::i64, Shape{2}, vector{1, 5}); - auto pads_begin = - make_shared(element::Type_t::i64, Shape{2}, vector{0, 2}); - auto pads_end = - make_shared(element::Type_t::i64, Shape{2}, vector{0, 0}); + auto data = make_shared(element::f32, Shape{10, 26}); + auto block_shape = make_shared(element::i64, Shape{2}, vector{1, 5}); + auto pads_begin = make_shared(element::i64, Shape{2}, vector{0, 2}); + auto pads_end = make_shared(element::i64, Shape{2}, vector{0, 0}); auto batch_to_space = make_shared(data, block_shape, pads_begin, pads_end); - ASSERT_EQ(batch_to_space->get_element_type(), element::Type_t::f32); + ASSERT_EQ(batch_to_space->get_element_type(), element::f32); ASSERT_EQ(batch_to_space->get_shape(), (Shape{10 / 5, 26 * 5 - 2})); } TEST(type_prop, batch_to_space_output_shape_4D) { - auto data = make_shared(element::Type_t::f32, Shape{100, 7, 13, 3}); + auto data = make_shared(element::f32, Shape{100, 7, 13, 3}); auto block_shape = - make_shared(element::Type_t::i64, Shape{4}, vector{1, 10, 5, 1}); + make_shared(element::i64, Shape{4}, vector{1, 10, 5, 1}); auto pads_begin = - make_shared(element::Type_t::i64, Shape{4}, vector{0, 3, 1, 0}); - auto pads_end = - make_shared(element::Type_t::i64, Shape{4}, vector{0, 3, 0, 0}); + make_shared(element::i64, Shape{4}, vector{0, 3, 1, 0}); + auto pads_end = make_shared(element::i64, Shape{4}, vector{0, 3, 0, 0}); auto batch_to_space = make_shared(data, block_shape, pads_begin, pads_end); - ASSERT_EQ(batch_to_space->get_element_type(), element::Type_t::f32); + ASSERT_EQ(batch_to_space->get_element_type(), element::f32); ASSERT_EQ(batch_to_space->get_shape(), (Shape{100 / (10 * 5), 7 * 10 - 3 - 3, 13 * 5 - 1, 3})); } TEST(type_prop, batch_to_space_output_shape_5D) { - auto data = make_shared(element::Type_t::f32, Shape{960, 6, 13, 128, 16}); + auto data = make_shared(element::f32, Shape{960, 6, 13, 128, 16}); auto block_shape = - make_shared(element::Type_t::i32, Shape{5}, vector{1, 6, 5, 1, 16}); + make_shared(element::i32, Shape{5}, vector{1, 6, 5, 1, 16}); auto pads_begin = - make_shared(element::Type_t::i32, Shape{5}, vector{0, 2, 0, 0, 0}); + make_shared(element::i32, Shape{5}, vector{0, 2, 0, 0, 0}); auto pads_end = - make_shared(element::Type_t::i32, Shape{5}, vector{0, 2, 1, 0, 0}); + make_shared(element::i32, Shape{5}, vector{0, 2, 1, 0, 0}); auto batch_to_space = make_shared(data, block_shape, pads_begin, pads_end); - ASSERT_EQ(batch_to_space->get_element_type(), element::Type_t::f32); + ASSERT_EQ(batch_to_space->get_element_type(), element::f32); ASSERT_EQ(batch_to_space->get_shape(), (Shape{960 / (6 * 5 * 16), 6 * 6 - 2 - 2, 13 * 5 - 1, 128, 16 * 16})); } TEST(type_prop, batch_to_space_and_space_to_batch) { - auto data = make_shared(element::Type_t::f32, Shape{4800, 9, 11, 2}); + auto data = make_shared(element::f32, Shape{4800, 9, 11, 2}); auto block_shape = - make_shared(element::Type_t::i64, Shape{4}, vector{1, 12, 100, 2}); + make_shared(element::i64, Shape{4}, vector{1, 12, 100, 2}); auto pads_begin = - make_shared(element::Type_t::i64, Shape{4}, vector{0, 3, 38, 1}); - auto pads_end = - make_shared(element::Type_t::i64, Shape{4}, vector{0, 5, 38, 0}); + make_shared(element::i64, Shape{4}, vector{0, 3, 38, 1}); + auto pads_end = make_shared(element::i64, Shape{4}, vector{0, 5, 38, 0}); auto batch_to_space = make_shared(data, block_shape, pads_begin, pads_end); - ASSERT_EQ(batch_to_space->get_element_type(), element::Type_t::f32); + ASSERT_EQ(batch_to_space->get_element_type(), element::f32); ASSERT_EQ(batch_to_space->get_shape(), (Shape{4800 / (12 * 100 * 2), 9 * 12 - 3 - 5, 11 * 100 - 38 - 38, 2 * 2 - 1})); auto space_to_batch = make_shared(batch_to_space, block_shape, pads_begin, pads_end); - ASSERT_EQ(space_to_batch->get_element_type(), element::Type_t::f32); + ASSERT_EQ(space_to_batch->get_element_type(), element::f32); ASSERT_EQ(space_to_batch->get_shape(), (Shape{4800, 9, 11, 2})); } diff --git a/ngraph/test/type_prop/binary_convolution.cpp b/ngraph/test/type_prop/binary_convolution.cpp index 498a0f88a20fb2..2c62adff237e1d 100644 --- a/ngraph/test/type_prop/binary_convolution.cpp +++ b/ngraph/test/type_prop/binary_convolution.cpp @@ -33,8 +33,8 @@ TEST(type_prop, binary_conv_v1_partial_auto_padding_same) const float pad_value = 1.0f; const auto auto_pad = op::PadType::SAME_LOWER; - auto data_batch = make_shared(element::Type_t::f32, data_batch_shape); - auto filters = make_shared(element::Type_t::f32, filters_shape); + auto data_batch = make_shared(element::f32, data_batch_shape); + auto filters = make_shared(element::f32, filters_shape); auto conv = make_shared( data_batch, filters, strides, pads_begin, pads_end, dilations, mode, pad_value, auto_pad); @@ -56,8 +56,8 @@ TEST(type_prop, binary_conv_v1_partial_auto_padding_same_nc_dims_dynamic_same_lo const float pad_value = 1.0f; const auto auto_pad = op::PadType::SAME_LOWER; - auto data_batch = make_shared(element::Type_t::f32, data_batch_shape); - auto filters = make_shared(element::Type_t::f32, filters_shape); + auto data_batch = make_shared(element::f32, data_batch_shape); + auto filters = make_shared(element::f32, filters_shape); auto conv = make_shared( data_batch, filters, strides, pads_begin, pads_end, dilations, mode, pad_value, auto_pad); @@ -79,8 +79,8 @@ TEST(type_prop, binary_conv_v1_partial_auto_padding_same_nc_dims_dynamic_same_up const float pad_value = 1.0f; const auto auto_pad = op::PadType::SAME_UPPER; - auto data_batch = make_shared(element::Type_t::f32, data_batch_shape); - auto filters = make_shared(element::Type_t::f32, filters_shape); + auto data_batch = make_shared(element::f32, data_batch_shape); + auto filters = make_shared(element::f32, filters_shape); auto conv = make_shared( data_batch, filters, strides, pads_begin, pads_end, dilations, mode, pad_value, auto_pad); @@ -102,8 +102,8 @@ TEST(type_prop, binary_conv_v1_partial_auto_padding_same_spatial_dims_dynamic) const float pad_value = 1.0f; const auto auto_pad = op::PadType::SAME_LOWER; - auto data_batch = make_shared(element::Type_t::f32, data_batch_shape); - auto filters = make_shared(element::Type_t::f32, filters_shape); + auto data_batch = make_shared(element::f32, data_batch_shape); + auto filters = make_shared(element::f32, filters_shape); auto conv = make_shared( data_batch, filters, strides, pads_begin, pads_end, dilations, mode, pad_value, auto_pad); diff --git a/ngraph/test/type_prop/binary_elementwise.cpp b/ngraph/test/type_prop/binary_elementwise.cpp index eaf84df8da6e9a..0ede703db9ac78 100644 --- a/ngraph/test/type_prop/binary_elementwise.cpp +++ b/ngraph/test/type_prop/binary_elementwise.cpp @@ -28,10 +28,10 @@ void test_binary(std::string /* node_type */, shared_ptr(f)(const shared_ptr& x, const shared_ptr& y)) { // Check for bad arguments - auto tv0_2_4_param_0 = make_shared(element::Type_t::f32, Shape{2, 4}); - auto tv0_2_4_param_1 = make_shared(element::Type_t::f32, Shape{2, 4}); - auto tv0_2_4_param_2 = make_shared(element::Type_t::i32, Shape{2, 4}); - auto tv0_4_2_param = make_shared(element::Type_t::f32, Shape{4, 2}); + auto tv0_2_4_param_0 = make_shared(element::f32, Shape{2, 4}); + auto tv0_2_4_param_1 = make_shared(element::f32, Shape{2, 4}); + auto tv0_2_4_param_2 = make_shared(element::i32, Shape{2, 4}); + auto tv0_4_2_param = make_shared(element::f32, Shape{4, 2}); auto test_binary_bad_arguments_view_shapes = [&](const shared_ptr& x, const shared_ptr& y) { @@ -119,11 +119,11 @@ void test_binary_logical(std::string /* node_type */, shared_ptr(f)(const shared_ptr& x, const shared_ptr& y)) { // Check for bad arguments - auto tv0_2_4_param_0 = make_shared(element::Type_t::boolean, Shape{2, 4}); - auto tv0_2_4_param_1 = make_shared(element::Type_t::boolean, Shape{2, 4}); - auto tv0_2_4_param_2 = make_shared(element::Type_t::i32, Shape{2, 4}); - auto tv0_2_4_param_3 = make_shared(element::Type_t::i32, Shape{2, 4}); - auto tv0_4_2_param = make_shared(element::Type_t::boolean, Shape{4, 2}); + auto tv0_2_4_param_0 = make_shared(element::boolean, Shape{2, 4}); + auto tv0_2_4_param_1 = make_shared(element::boolean, Shape{2, 4}); + auto tv0_2_4_param_2 = make_shared(element::i32, Shape{2, 4}); + auto tv0_2_4_param_3 = make_shared(element::i32, Shape{2, 4}); + auto tv0_4_2_param = make_shared(element::boolean, Shape{4, 2}); auto test_binary_bad_arguments_view_shapes = [&](const shared_ptr& x, const shared_ptr& y) { @@ -227,39 +227,36 @@ void test_binary_eltwise_numpy(const element::Type& et, const op::AutoBroadcastS TEST(type_prop, eltwise_auto_bcast) { - test_binary_eltwise_numpy(element::Type_t::f32, op::AutoBroadcastType::NUMPY); - test_binary_eltwise_numpy(element::Type_t::f32, op::AutoBroadcastType::NUMPY); - test_binary_eltwise_numpy(element::Type_t::f32, op::AutoBroadcastType::NUMPY); - test_binary_eltwise_numpy(element::Type_t::f32, op::AutoBroadcastType::NUMPY); - test_binary_eltwise_numpy(element::Type_t::f32, - op::AutoBroadcastType::NUMPY); - test_binary_eltwise_numpy(element::Type_t::f32, op::AutoBroadcastType::NUMPY); - test_binary_eltwise_numpy(element::Type_t::f32, - op::AutoBroadcastType::NUMPY); - test_binary_eltwise_numpy(element::Type_t::f32, op::AutoBroadcastType::NUMPY); - test_binary_eltwise_numpy(element::Type_t::f32, op::AutoBroadcastType::NUMPY); - test_binary_eltwise_numpy(element::Type_t::f32, op::AutoBroadcastType::NUMPY); - test_binary_eltwise_numpy(element::Type_t::f32, op::AutoBroadcastType::NUMPY); - test_binary_eltwise_numpy(element::Type_t::boolean, - op::AutoBroadcastType::NUMPY); - test_binary_eltwise_numpy(element::Type_t::f32, op::AutoBroadcastType::NUMPY); - test_binary_eltwise_numpy(element::Type_t::f32, op::AutoBroadcastType::NUMPY); - test_binary_eltwise_numpy(element::Type_t::boolean, op::AutoBroadcastType::NUMPY); + test_binary_eltwise_numpy(element::f32, op::AutoBroadcastType::NUMPY); + test_binary_eltwise_numpy(element::f32, op::AutoBroadcastType::NUMPY); + test_binary_eltwise_numpy(element::f32, op::AutoBroadcastType::NUMPY); + test_binary_eltwise_numpy(element::f32, op::AutoBroadcastType::NUMPY); + test_binary_eltwise_numpy(element::f32, op::AutoBroadcastType::NUMPY); + test_binary_eltwise_numpy(element::f32, op::AutoBroadcastType::NUMPY); + test_binary_eltwise_numpy(element::f32, op::AutoBroadcastType::NUMPY); + test_binary_eltwise_numpy(element::f32, op::AutoBroadcastType::NUMPY); + test_binary_eltwise_numpy(element::f32, op::AutoBroadcastType::NUMPY); + test_binary_eltwise_numpy(element::f32, op::AutoBroadcastType::NUMPY); + test_binary_eltwise_numpy(element::f32, op::AutoBroadcastType::NUMPY); + test_binary_eltwise_numpy(element::boolean, op::AutoBroadcastType::NUMPY); + test_binary_eltwise_numpy(element::f32, op::AutoBroadcastType::NUMPY); + test_binary_eltwise_numpy(element::f32, op::AutoBroadcastType::NUMPY); + test_binary_eltwise_numpy(element::boolean, op::AutoBroadcastType::NUMPY); } TEST(type_prop, comparison_good) { - auto tv0_2_4_param_0 = make_shared(element::Type_t::f32, Shape{2, 4}); - auto tv0_2_4_param_1 = make_shared(element::Type_t::f32, Shape{2, 4}); + auto tv0_2_4_param_0 = make_shared(element::f32, Shape{2, 4}); + auto tv0_2_4_param_1 = make_shared(element::f32, Shape{2, 4}); auto eq = make_shared(tv0_2_4_param_0, tv0_2_4_param_1); - EXPECT_EQ(eq->get_element_type(), element::Type_t::boolean); + EXPECT_EQ(eq->get_element_type(), element::boolean); EXPECT_EQ(eq->get_shape(), (Shape{2, 4})); } TEST(type_prop, binary_arithmetic_bad_argument_element_types) { - auto tv0_2_4_param_0 = make_shared(element::Type_t::boolean, Shape{2, 4}); - auto tv0_2_4_param_1 = make_shared(element::Type_t::boolean, Shape{2, 4}); + auto tv0_2_4_param_0 = make_shared(element::boolean, Shape{2, 4}); + auto tv0_2_4_param_1 = make_shared(element::boolean, Shape{2, 4}); try { auto bc = make_shared(tv0_2_4_param_0, tv0_2_4_param_1); @@ -279,8 +276,8 @@ TEST(type_prop, binary_arithmetic_bad_argument_element_types) TEST(type_prop, binary_elementwise_arithmetic_both_dynamic) { - auto a = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto b = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto a = make_shared(element::f32, PartialShape::dynamic()); + auto b = make_shared(element::f32, PartialShape::dynamic()); auto add = make_shared(a, b); ASSERT_TRUE(add->get_output_partial_shape(0).rank().is_dynamic()); @@ -289,10 +286,8 @@ TEST(type_prop, binary_elementwise_arithmetic_both_dynamic) TEST(type_prop, binary_elementwise_arithmetic_left_rank_static_dynamic_right_rank_static_dynamic_result_static) { - auto a = - make_shared(element::Type_t::f32, PartialShape{1, Dimension::dynamic(), 3}); - auto b = - make_shared(element::Type_t::f32, PartialShape{1, 2, Dimension::dynamic()}); + auto a = make_shared(element::f32, PartialShape{1, Dimension::dynamic(), 3}); + auto b = make_shared(element::f32, PartialShape{1, 2, Dimension::dynamic()}); auto add = make_shared(a, b); ASSERT_TRUE(add->get_output_partial_shape(0).is_static()); @@ -304,9 +299,8 @@ TEST( binary_elementwise_arithmetic_left_rank_static_dynamic_right_rank_static_dynamic_result_rank_static_dynamic) { auto a = make_shared( - element::Type_t::f32, PartialShape{1, Dimension::dynamic(), Dimension::dynamic()}); - auto b = - make_shared(element::Type_t::f32, PartialShape{1, 2, Dimension::dynamic()}); + element::f32, PartialShape{1, Dimension::dynamic(), Dimension::dynamic()}); + auto b = make_shared(element::f32, PartialShape{1, 2, Dimension::dynamic()}); auto add = make_shared(a, b); ASSERT_TRUE(add->get_output_partial_shape(0).rank().is_static()); @@ -317,9 +311,8 @@ TEST( TEST(type_prop, binary_elementwise_arithmetic_left_static_right_rank_static_dynamic) { - auto a = make_shared(element::Type_t::f32, PartialShape{1, 2, 3}); - auto b = - make_shared(element::Type_t::f32, PartialShape{1, 2, Dimension::dynamic()}); + auto a = make_shared(element::f32, PartialShape{1, 2, 3}); + auto b = make_shared(element::f32, PartialShape{1, 2, Dimension::dynamic()}); auto add = make_shared(a, b); ASSERT_TRUE(add->get_output_partial_shape(0).is_static()); @@ -328,9 +321,8 @@ TEST(type_prop, binary_elementwise_arithmetic_left_static_right_rank_static_dyna TEST(type_prop, binary_elementwise_arithmetic_left_rank_static_dynamic_right_static) { - auto a = - make_shared(element::Type_t::f32, PartialShape{1, 2, Dimension::dynamic()}); - auto b = make_shared(element::Type_t::f32, PartialShape{1, 2, 3}); + auto a = make_shared(element::f32, PartialShape{1, 2, Dimension::dynamic()}); + auto b = make_shared(element::f32, PartialShape{1, 2, 3}); auto add = make_shared(a, b); ASSERT_TRUE(add->get_output_partial_shape(0).is_static()); @@ -339,9 +331,8 @@ TEST(type_prop, binary_elementwise_arithmetic_left_rank_static_dynamic_right_sta TEST(type_prop, binary_elementwise_arithmetic_left_rank_static_dynamic_inconsistent) { - auto a = - make_shared(element::Type_t::f32, PartialShape{1, 2, Dimension::dynamic()}); - auto b = make_shared(element::Type_t::f32, PartialShape{1, 3, 3}); + auto a = make_shared(element::f32, PartialShape{1, 2, Dimension::dynamic()}); + auto b = make_shared(element::f32, PartialShape{1, 3, 3}); try { @@ -360,9 +351,8 @@ TEST(type_prop, binary_elementwise_arithmetic_left_rank_static_dynamic_inconsist TEST(type_prop, binary_elementwise_arithmetic_right_rank_static_dynamic_inconsistent) { - auto a = make_shared(element::Type_t::f32, PartialShape{1, 3, 3}); - auto b = - make_shared(element::Type_t::f32, PartialShape{1, 2, Dimension::dynamic()}); + auto a = make_shared(element::f32, PartialShape{1, 3, 3}); + auto b = make_shared(element::f32, PartialShape{1, 2, Dimension::dynamic()}); try { @@ -381,10 +371,8 @@ TEST(type_prop, binary_elementwise_arithmetic_right_rank_static_dynamic_inconsis TEST(type_prop, binary_elementwise_arithmetic_both_rank_static_dynamic_inconsistent) { - auto a = - make_shared(element::Type_t::f32, PartialShape{Dimension::dynamic(), 3, 3}); - auto b = - make_shared(element::Type_t::f32, PartialShape{1, 2, Dimension::dynamic()}); + auto a = make_shared(element::f32, PartialShape{Dimension::dynamic(), 3, 3}); + auto b = make_shared(element::f32, PartialShape{1, 2, Dimension::dynamic()}); try { @@ -403,9 +391,8 @@ TEST(type_prop, binary_elementwise_arithmetic_both_rank_static_dynamic_inconsist TEST(type_prop, binary_elementwise_arithmetic_left_rank_static_dynamic_different_rank) { - auto a = - make_shared(element::Type_t::f32, PartialShape{1, 2, Dimension::dynamic()}); - auto b = make_shared(element::Type_t::f32, PartialShape{1, 2, 3, 4}); + auto a = make_shared(element::f32, PartialShape{1, 2, Dimension::dynamic()}); + auto b = make_shared(element::f32, PartialShape{1, 2, 3, 4}); try { @@ -424,9 +411,8 @@ TEST(type_prop, binary_elementwise_arithmetic_left_rank_static_dynamic_different TEST(type_prop, binary_elementwise_arithmetic_right_rank_static_dynamic_different_rank) { - auto a = make_shared(element::Type_t::f32, PartialShape{1, 2, 3, 4}); - auto b = - make_shared(element::Type_t::f32, PartialShape{1, 2, Dimension::dynamic()}); + auto a = make_shared(element::f32, PartialShape{1, 2, 3, 4}); + auto b = make_shared(element::f32, PartialShape{1, 2, Dimension::dynamic()}); try { @@ -445,10 +431,8 @@ TEST(type_prop, binary_elementwise_arithmetic_right_rank_static_dynamic_differen TEST(type_prop, binary_elementwise_arithmetic_both_rank_static_dynamic_different_rank) { - auto a = make_shared(element::Type_t::f32, - PartialShape{1, Dimension::dynamic(), 3, 4}); - auto b = - make_shared(element::Type_t::f32, PartialShape{1, 2, Dimension::dynamic()}); + auto a = make_shared(element::f32, PartialShape{1, Dimension::dynamic(), 3, 4}); + auto b = make_shared(element::f32, PartialShape{1, 2, Dimension::dynamic()}); try { @@ -467,8 +451,8 @@ TEST(type_prop, binary_elementwise_arithmetic_both_rank_static_dynamic_different TEST(type_prop, binary_elementwise_arithmetic_both_et_dynamic) { - auto a = make_shared(element::Type_t::dynamic, Shape{1, 2, 3, 4}); - auto b = make_shared(element::Type_t::dynamic, Shape{1, 2, 3, 4}); + auto a = make_shared(element::dynamic, Shape{1, 2, 3, 4}); + auto b = make_shared(element::dynamic, Shape{1, 2, 3, 4}); auto add = make_shared(a, b); ASSERT_TRUE(add->get_output_element_type(0).is_dynamic()); @@ -476,20 +460,20 @@ TEST(type_prop, binary_elementwise_arithmetic_both_et_dynamic) TEST(type_prop, binary_elementwise_arithmetic_left_et_dynamic) { - auto a = make_shared(element::Type_t::dynamic, Shape{1, 2, 3, 4}); - auto b = make_shared(element::Type_t::u32, Shape{1, 2, 3, 4}); + auto a = make_shared(element::dynamic, Shape{1, 2, 3, 4}); + auto b = make_shared(element::u32, Shape{1, 2, 3, 4}); auto add = make_shared(a, b); - ASSERT_EQ(add->get_output_element_type(0), element::Type_t::u32); + ASSERT_EQ(add->get_output_element_type(0), element::u32); } TEST(type_prop, binary_elementwise_arithmetic_right_et_dynamic) { - auto a = make_shared(element::Type_t::i64, Shape{1, 2, 3, 4}); - auto b = make_shared(element::Type_t::dynamic, Shape{1, 2, 3, 4}); + auto a = make_shared(element::i64, Shape{1, 2, 3, 4}); + auto b = make_shared(element::dynamic, Shape{1, 2, 3, 4}); auto add = make_shared(a, b); - ASSERT_EQ(add->get_output_element_type(0), element::Type_t::i64); + ASSERT_EQ(add->get_output_element_type(0), element::i64); } TEST(type_prop, logic_arith_compare_partial_et) @@ -522,19 +506,15 @@ TEST(type_prop, logic_arith_compare_partial_et) // dyn int -> int // dyn boo -> ! // dyn dyn -> dyn - ASSERT_EQ(test_arith(element::Type_t::i32, element::Type_t::i32)->get_element_type(), - element::Type_t::i32); - ASSERT_ANY_THROW({ test_arith(element::Type_t::i32, element::Type_t::boolean); }); - ASSERT_EQ(test_arith(element::Type_t::i32, element::Type_t::dynamic)->get_element_type(), - element::Type_t::i32); - ASSERT_ANY_THROW({ test_arith(element::Type_t::boolean, element::Type_t::i32); }); - ASSERT_ANY_THROW({ test_arith(element::Type_t::boolean, element::Type_t::boolean); }); - ASSERT_ANY_THROW({ test_arith(element::Type_t::boolean, element::Type_t::dynamic); }); - ASSERT_EQ(test_arith(element::Type_t::dynamic, element::Type_t::i32)->get_element_type(), - element::Type_t::i32); - ASSERT_ANY_THROW({ test_arith(element::Type_t::dynamic, element::Type_t::boolean); }); - ASSERT_EQ(test_arith(element::Type_t::dynamic, element::Type_t::dynamic)->get_element_type(), - element::Type_t::dynamic); + ASSERT_EQ(test_arith(element::i32, element::i32)->get_element_type(), element::i32); + ASSERT_ANY_THROW({ test_arith(element::i32, element::boolean); }); + ASSERT_EQ(test_arith(element::i32, element::dynamic)->get_element_type(), element::i32); + ASSERT_ANY_THROW({ test_arith(element::boolean, element::i32); }); + ASSERT_ANY_THROW({ test_arith(element::boolean, element::boolean); }); + ASSERT_ANY_THROW({ test_arith(element::boolean, element::dynamic); }); + ASSERT_EQ(test_arith(element::dynamic, element::i32)->get_element_type(), element::i32); + ASSERT_ANY_THROW({ test_arith(element::dynamic, element::boolean); }); + ASSERT_EQ(test_arith(element::dynamic, element::dynamic)->get_element_type(), element::dynamic); // Comparison ops: // @@ -547,22 +527,19 @@ TEST(type_prop, logic_arith_compare_partial_et) // dyn int -> boo // dyn boo -> boo // dyn dyn -> boo - ASSERT_EQ(test_compare(element::Type_t::i32, element::Type_t::i32)->get_element_type(), - element::Type_t::boolean); - ASSERT_ANY_THROW({ test_compare(element::Type_t::i32, element::Type_t::boolean); }); - ASSERT_EQ(test_compare(element::Type_t::i32, element::Type_t::dynamic)->get_element_type(), - element::Type_t::boolean); - ASSERT_ANY_THROW({ test_compare(element::Type_t::boolean, element::Type_t::i32); }); - ASSERT_EQ(test_compare(element::Type_t::boolean, element::Type_t::boolean)->get_element_type(), - element::Type_t::boolean); - ASSERT_EQ(test_compare(element::Type_t::boolean, element::Type_t::dynamic)->get_element_type(), - element::Type_t::boolean); - ASSERT_EQ(test_compare(element::Type_t::dynamic, element::Type_t::i32)->get_element_type(), - element::Type_t::boolean); - ASSERT_EQ(test_compare(element::Type_t::dynamic, element::Type_t::boolean)->get_element_type(), - element::Type_t::boolean); - ASSERT_EQ(test_compare(element::Type_t::dynamic, element::Type_t::dynamic)->get_element_type(), - element::Type_t::boolean); + ASSERT_EQ(test_compare(element::i32, element::i32)->get_element_type(), element::boolean); + ASSERT_ANY_THROW({ test_compare(element::i32, element::boolean); }); + ASSERT_EQ(test_compare(element::i32, element::dynamic)->get_element_type(), element::boolean); + ASSERT_ANY_THROW({ test_compare(element::boolean, element::i32); }); + ASSERT_EQ(test_compare(element::boolean, element::boolean)->get_element_type(), + element::boolean); + ASSERT_EQ(test_compare(element::boolean, element::dynamic)->get_element_type(), + element::boolean); + ASSERT_EQ(test_compare(element::dynamic, element::i32)->get_element_type(), element::boolean); + ASSERT_EQ(test_compare(element::dynamic, element::boolean)->get_element_type(), + element::boolean); + ASSERT_EQ(test_compare(element::dynamic, element::dynamic)->get_element_type(), + element::boolean); // Logical negation op: // @@ -575,9 +552,7 @@ TEST(type_prop, logic_arith_compare_partial_et) // int -> ! // boo -> boo // dyn -> boo - ASSERT_EQ(test_logical_not(element::Type_t::i32)->get_element_type(), element::Type_t::i32); - ASSERT_EQ(test_logical_not(element::Type_t::boolean)->get_element_type(), - element::Type_t::boolean); - ASSERT_EQ(test_logical_not(element::Type_t::dynamic)->get_element_type(), - element::Type_t::dynamic); + ASSERT_EQ(test_logical_not(element::i32)->get_element_type(), element::i32); + ASSERT_EQ(test_logical_not(element::boolean)->get_element_type(), element::boolean); + ASSERT_EQ(test_logical_not(element::dynamic)->get_element_type(), element::dynamic); } diff --git a/ngraph/test/type_prop/broadcast.cpp b/ngraph/test/type_prop/broadcast.cpp index 12ed855445e1c0..dc4d89f13a65bc 100644 --- a/ngraph/test/type_prop/broadcast.cpp +++ b/ngraph/test/type_prop/broadcast.cpp @@ -32,43 +32,39 @@ TYPED_TEST_CASE_P(BroadcastTests); TYPED_TEST_P(BroadcastTests, broadcast_numpy) { - auto param = make_shared(element::Type_t::f32, Shape{3, 1}); - auto target_shape = op::Constant::create(element::Type_t::i64, Shape{3}, {2, 3, 6}); + auto param = make_shared(element::f32, Shape{3, 1}); + auto target_shape = op::Constant::create(element::i64, Shape{3}, {2, 3, 6}); auto bc = make_shared(param, target_shape); - ASSERT_EQ(bc->get_element_type(), element::Type_t::f32); + ASSERT_EQ(bc->get_element_type(), element::f32); ASSERT_EQ(bc->get_shape(), (Shape{2, 3, 6})); } TYPED_TEST_P(BroadcastTests, broadcast_axes_mapping) { - auto param = make_shared(element::Type_t::f32, Shape{3, 1}); - auto target_shape = op::Constant::create(element::Type_t::i64, Shape{3}, {2, 3, 1}); - auto axes_mapping = op::Constant::create(element::Type_t::i64, Shape{2}, {1, 2}); + auto param = make_shared(element::f32, Shape{3, 1}); + auto target_shape = op::Constant::create(element::i64, Shape{3}, {2, 3, 1}); + auto axes_mapping = op::Constant::create(element::i64, Shape{2}, {1, 2}); auto bc = make_shared(param, target_shape, axes_mapping); - ASSERT_EQ(bc->get_element_type(), element::Type_t::f32); + ASSERT_EQ(bc->get_element_type(), element::f32); ASSERT_EQ(bc->get_shape(), (Shape{2, 3, 1})); } TYPED_TEST_P(BroadcastTests, broadcast_target_shape_as_concat_with_constants) { - auto param = make_shared(element::Type_t::f32, Shape{16}); - auto target_shape_constant_1 = - op::Constant::create(element::Type_t::i64, Shape{1}, {1}); - auto target_shape_constant_2 = - op::Constant::create(element::Type_t::i64, Shape{1}, {16}); - auto target_shape_constant_3 = - op::Constant::create(element::Type_t::i64, Shape{1}, {50}); - auto target_shape_constant_4 = - op::Constant::create(element::Type_t::i64, Shape{1}, {50}); + auto param = make_shared(element::f32, Shape{16}); + auto target_shape_constant_1 = op::Constant::create(element::i64, Shape{1}, {1}); + auto target_shape_constant_2 = op::Constant::create(element::i64, Shape{1}, {16}); + auto target_shape_constant_3 = op::Constant::create(element::i64, Shape{1}, {50}); + auto target_shape_constant_4 = op::Constant::create(element::i64, Shape{1}, {50}); std::int64_t axis = 0; std::vector> args{target_shape_constant_1, target_shape_constant_2, target_shape_constant_3, target_shape_constant_4}; auto target_shape = make_shared(args, axis); - auto axes_mapping = op::Constant::create(element::Type_t::i64, Shape{1}, {1}); + auto axes_mapping = op::Constant::create(element::i64, Shape{1}, {1}); auto bc = make_shared(param, target_shape, axes_mapping, "NONE"); ASSERT_TRUE(bc->get_output_partial_shape(0).rank().is_static()); ASSERT_TRUE(bc->get_output_partial_shape(0).rank().same_scheme(Rank{4})); @@ -78,21 +74,18 @@ TYPED_TEST_P(BroadcastTests, broadcast_target_shape_as_concat_with_constants) TYPED_TEST_P(BroadcastTests, broadcast_target_shape_as_concat_with_node) { - auto param = make_shared(element::Type_t::f32, Shape{16}); - auto target_shape_constant_1 = make_shared(element::Type_t::i64, Shape{1}); - auto target_shape_constant_2 = - op::Constant::create(element::Type_t::i64, Shape{1}, {16}); - auto target_shape_constant_3 = - op::Constant::create(element::Type_t::i64, Shape{1}, {50}); - auto target_shape_constant_4 = - op::Constant::create(element::Type_t::i64, Shape{1}, {50}); + auto param = make_shared(element::f32, Shape{16}); + auto target_shape_constant_1 = make_shared(element::i64, Shape{1}); + auto target_shape_constant_2 = op::Constant::create(element::i64, Shape{1}, {16}); + auto target_shape_constant_3 = op::Constant::create(element::i64, Shape{1}, {50}); + auto target_shape_constant_4 = op::Constant::create(element::i64, Shape{1}, {50}); std::int64_t axis = 0; std::vector> args{target_shape_constant_1, target_shape_constant_2, target_shape_constant_3, target_shape_constant_4}; auto target_shape = make_shared(args, axis); - auto axes_mapping = op::Constant::create(element::Type_t::i64, Shape{1}, {1}); + auto axes_mapping = op::Constant::create(element::i64, Shape{1}, {1}); auto bc = make_shared(param, target_shape, axes_mapping, "NONE"); ASSERT_TRUE(bc->get_output_partial_shape(0).rank().is_static()); ASSERT_TRUE(bc->get_output_partial_shape(0).rank().same_scheme(Rank{4})); @@ -103,9 +96,9 @@ TYPED_TEST_P(BroadcastTests, broadcast_target_shape_as_concat_with_node) TYPED_TEST_P(BroadcastTests, broadcast_fail_rank) { - auto param = make_shared(element::Type_t::f32, Shape{3, 1}); - auto target_shape = op::Constant::create(element::Type_t::i64, Shape{3}, {2, 3, 1}); - auto axes_mapping = op::Constant::create(element::Type_t::i64, Shape{3}, {1, 2, 3}); + auto param = make_shared(element::f32, Shape{3, 1}); + auto target_shape = op::Constant::create(element::i64, Shape{3}, {2, 3, 1}); + auto axes_mapping = op::Constant::create(element::i64, Shape{3}, {1, 2, 3}); try { @@ -126,9 +119,9 @@ TYPED_TEST_P(BroadcastTests, broadcast_fail_rank) TYPED_TEST_P(BroadcastTests, broadcast_fail_transpose) { - auto param = make_shared(element::Type_t::f32, Shape{3, 1}); - auto target_shape = op::Constant::create(element::Type_t::i64, Shape{3}, {2, 1, 3}); - auto axes_mapping = op::Constant::create(element::Type_t::i64, Shape{2}, {2, 1}); + auto param = make_shared(element::f32, Shape{3, 1}); + auto target_shape = op::Constant::create(element::i64, Shape{3}, {2, 1, 3}); + auto axes_mapping = op::Constant::create(element::i64, Shape{2}, {2, 1}); try { @@ -149,9 +142,9 @@ TYPED_TEST_P(BroadcastTests, broadcast_fail_transpose) TYPED_TEST_P(BroadcastTests, broadcast_fail_axes_map) { - auto param = make_shared(element::Type_t::f32, Shape{3, 1}); - auto target_shape = op::Constant::create(element::Type_t::i64, Shape{3}, {2, 3, 1}); - auto axes_mapping = op::Constant::create(element::Type_t::i64, Shape{2}, {1, 3}); + auto param = make_shared(element::f32, Shape{3, 1}); + auto target_shape = op::Constant::create(element::i64, Shape{3}, {2, 3, 1}); + auto axes_mapping = op::Constant::create(element::i64, Shape{2}, {1, 3}); try { @@ -170,9 +163,9 @@ TYPED_TEST_P(BroadcastTests, broadcast_fail_axes_map) TYPED_TEST_P(BroadcastTests, broadcast_fail_axes_map_shape) { - auto param = make_shared(element::Type_t::f32, Shape{3, 1}); - auto target_shape = op::Constant::create(element::Type_t::i64, Shape{3}, {2, 3, 3}); - auto axes_mapping = op::Constant::create(element::Type_t::i64, Shape{2}, {1, 2}); + auto param = make_shared(element::f32, Shape{3, 1}); + auto target_shape = op::Constant::create(element::i64, Shape{3}, {2, 3, 3}); + auto axes_mapping = op::Constant::create(element::i64, Shape{2}, {1, 2}); try { @@ -191,9 +184,9 @@ TYPED_TEST_P(BroadcastTests, broadcast_fail_axes_map_shape) TYPED_TEST_P(BroadcastTests, broadcast_axes_wrong_rank) { - auto arg = make_shared(element::Type_t::f32, Shape{2, 4}); - auto bc_shape = make_shared(element::Type_t::i64, Shape{1}); - auto bc_axes = make_shared(element::Type_t::i64, Shape{2, 2}); + auto arg = make_shared(element::f32, Shape{2, 4}); + auto bc_shape = make_shared(element::i64, Shape{1}); + auto bc_axes = make_shared(element::i64, Shape{2, 2}); try { @@ -212,24 +205,24 @@ TYPED_TEST_P(BroadcastTests, broadcast_axes_wrong_rank) TYPED_TEST_P(BroadcastTests, broadcast_fully_dynamic_target_shape) { - auto arg = make_shared(element::Type_t::f32, Shape{2, 4}); - auto bc_shape = make_shared(element::Type_t::i64, PartialShape::dynamic()); - auto bc_axes = make_shared(element::Type_t::i64, Shape{2}); + auto arg = make_shared(element::f32, Shape{2, 4}); + auto bc_shape = make_shared(element::i64, PartialShape::dynamic()); + auto bc_axes = make_shared(element::i64, Shape{2}); auto bc = make_shared(arg, bc_shape, bc_axes); ASSERT_TRUE(bc->get_output_partial_shape(0).is_dynamic()); - bc_shape = make_shared(element::Type_t::i64, Shape{1}); + bc_shape = make_shared(element::i64, Shape{1}); bc = make_shared(arg, bc_shape, bc_axes); ASSERT_TRUE(bc->get_output_partial_shape(0).is_dynamic()); } TYPED_TEST_P(BroadcastTests, broadcast_broadcast_shape_et_wrong) { - auto arg = make_shared(element::Type_t::f32, Shape{2, 4}); + auto arg = make_shared(element::f32, Shape{2, 4}); // wrong element type - auto bc_shape = make_shared(element::Type_t::boolean, Shape{1}); - auto bc_axes = make_shared(element::Type_t::i64, Shape{2}); + auto bc_shape = make_shared(element::boolean, Shape{1}); + auto bc_axes = make_shared(element::i64, Shape{2}); try { @@ -249,10 +242,10 @@ TYPED_TEST_P(BroadcastTests, broadcast_broadcast_shape_et_wrong) TYPED_TEST_P(BroadcastTests, broadcast_axes_et_wrong) { - auto arg = make_shared(element::Type_t::f32, Shape{2, 4}); - auto bc_shape = make_shared(element::Type_t::i64, Shape{1}); + auto arg = make_shared(element::f32, Shape{2, 4}); + auto bc_shape = make_shared(element::i64, Shape{1}); // wrong element type - auto bc_axes = make_shared(element::Type_t::f32, Shape{2}); + auto bc_axes = make_shared(element::f32, Shape{2}); try { @@ -274,47 +267,42 @@ TYPED_TEST_P(BroadcastTests, broadcast_axes_et_wrong) TYPED_TEST_P(BroadcastTests, broadcast_explicit_all_inputs_dynamic) { - const auto data = make_shared(element::Type_t::f32, PartialShape::dynamic()); - const auto target_shape = - make_shared(element::Type_t::i64, PartialShape::dynamic()); - const auto axes_mapping = - make_shared(element::Type_t::i64, PartialShape::dynamic()); + const auto data = make_shared(element::f32, PartialShape::dynamic()); + const auto target_shape = make_shared(element::i64, PartialShape::dynamic()); + const auto axes_mapping = make_shared(element::i64, PartialShape::dynamic()); auto bc = make_shared(data, target_shape, axes_mapping, "EXPLICIT"); ASSERT_TRUE(bc->get_output_partial_shape(0).rank().is_dynamic()); // const axes mapping const auto axes_mapping_const = - op::Constant::create(element::Type_t::i64, Shape{3}, vector{0, 1, 2}); + op::Constant::create(element::i64, Shape{3}, vector{0, 1, 2}); bc = make_shared(data, target_shape, axes_mapping_const, "EXPLICIT"); ASSERT_TRUE(bc->get_output_partial_shape(0).rank().is_dynamic()); } TYPED_TEST_P(BroadcastTests, broadcast_explicit_target_shape_static_rank) { - const auto data = make_shared(element::Type_t::f32, PartialShape::dynamic()); - const auto target_shape = - make_shared(element::Type_t::i64, PartialShape::dynamic(1)); - const auto axes_mapping = - make_shared(element::Type_t::i64, PartialShape::dynamic()); + const auto data = make_shared(element::f32, PartialShape::dynamic()); + const auto target_shape = make_shared(element::i64, PartialShape::dynamic(1)); + const auto axes_mapping = make_shared(element::i64, PartialShape::dynamic()); auto bc = make_shared(data, target_shape, axes_mapping, "EXPLICIT"); ASSERT_TRUE(bc->get_output_partial_shape(0).rank().is_dynamic()); // const axes mapping const auto axes_mapping_const = - op::Constant::create(element::Type_t::i64, Shape{3}, vector{0, 1, 2}); + op::Constant::create(element::i64, Shape{3}, vector{0, 1, 2}); bc = make_shared(data, target_shape, axes_mapping_const, "EXPLICIT"); ASSERT_TRUE(bc->get_output_partial_shape(0).rank().is_dynamic()); } TYPED_TEST_P(BroadcastTests, broadcast_explicit_const_target_shape) { - const auto data = make_shared(element::Type_t::f32, PartialShape::dynamic()); + const auto data = make_shared(element::f32, PartialShape::dynamic()); const auto target_shape = - op::Constant::create(element::Type_t::i64, Shape{3}, vector{1, 2, 3}); - const auto axes_mapping = - make_shared(element::Type_t::i64, PartialShape::dynamic()); + op::Constant::create(element::i64, Shape{3}, vector{1, 2, 3}); + const auto axes_mapping = make_shared(element::i64, PartialShape::dynamic()); auto bc = make_shared(data, target_shape, axes_mapping, "EXPLICIT"); @@ -324,7 +312,7 @@ TYPED_TEST_P(BroadcastTests, broadcast_explicit_const_target_shape) // const axes mapping const auto axes_mapping_const = - op::Constant::create(element::Type_t::i64, Shape{3}, vector{0, 2, 1}); + op::Constant::create(element::i64, Shape{3}, vector{0, 2, 1}); bc = make_shared(data, target_shape, axes_mapping_const, "EXPLICIT"); ASSERT_TRUE(bc->get_output_partial_shape(0).is_static()); @@ -334,18 +322,16 @@ TYPED_TEST_P(BroadcastTests, broadcast_explicit_const_target_shape) TYPED_TEST_P(BroadcastTests, broadcast_explicit_input_rank_static) { - const auto data = make_shared(element::Type_t::f32, PartialShape::dynamic(3)); - const auto target_shape = - make_shared(element::Type_t::i64, PartialShape::dynamic()); - const auto axes_mapping = - make_shared(element::Type_t::i64, PartialShape::dynamic()); + const auto data = make_shared(element::f32, PartialShape::dynamic(3)); + const auto target_shape = make_shared(element::i64, PartialShape::dynamic()); + const auto axes_mapping = make_shared(element::i64, PartialShape::dynamic()); auto bc = make_shared(data, target_shape, axes_mapping, "EXPLICIT"); ASSERT_TRUE(bc->get_output_partial_shape(0).rank().is_dynamic()); // const axes mapping const auto axes_mapping_const = - op::Constant::create(element::Type_t::i64, Shape{3}, vector{0, 2, 1}); + op::Constant::create(element::i64, Shape{3}, vector{0, 2, 1}); bc = make_shared(data, target_shape, axes_mapping_const, "EXPLICIT"); ASSERT_TRUE(bc->get_output_partial_shape(0).rank().is_dynamic()); } @@ -353,17 +339,16 @@ TYPED_TEST_P(BroadcastTests, broadcast_explicit_input_rank_static) TYPED_TEST_P(BroadcastTests, broadcast_explicit_target_shape_and_input_data_rank_static) { // static rank data - const auto data = make_shared(element::Type_t::f32, PartialShape::dynamic(3)); - const auto target_shape = - make_shared(element::Type_t::i64, PartialShape::dynamic(1)); - auto axes_mapping = make_shared(element::Type_t::i64, PartialShape::dynamic()); + const auto data = make_shared(element::f32, PartialShape::dynamic(3)); + const auto target_shape = make_shared(element::i64, PartialShape::dynamic(1)); + auto axes_mapping = make_shared(element::i64, PartialShape::dynamic()); auto bc = make_shared(data, target_shape, axes_mapping, "EXPLICIT"); ASSERT_TRUE(bc->get_output_partial_shape(0).rank().is_dynamic()); // const axes mapping const auto axes_mapping_const = - op::Constant::create(element::Type_t::i64, Shape{3}, vector{0, 2, 1}); + op::Constant::create(element::i64, Shape{3}, vector{0, 2, 1}); bc = make_shared(data, target_shape, axes_mapping_const, "EXPLICIT"); ASSERT_TRUE(bc->get_output_partial_shape(0).rank().is_dynamic()); } @@ -371,10 +356,10 @@ TYPED_TEST_P(BroadcastTests, broadcast_explicit_target_shape_and_input_data_rank TYPED_TEST_P(BroadcastTests, broadcast_explicit_const_target_shape_static_rank_input) { const auto target_shape = - op::Constant::create(element::Type_t::i64, Shape{4}, vector{1, 1, 5, 10}); + op::Constant::create(element::i64, Shape{4}, vector{1, 1, 5, 10}); // static rank data - const auto data = make_shared(element::Type_t::f32, PartialShape::dynamic(3)); - auto axes_mapping = make_shared(element::Type_t::i64, PartialShape::dynamic()); + const auto data = make_shared(element::f32, PartialShape::dynamic(3)); + auto axes_mapping = make_shared(element::i64, PartialShape::dynamic()); auto bc = make_shared(data, target_shape, axes_mapping, "EXPLICIT"); ASSERT_TRUE(bc->get_output_partial_shape(0).is_static()); @@ -383,7 +368,7 @@ TYPED_TEST_P(BroadcastTests, broadcast_explicit_const_target_shape_static_rank_i // const axes mapping const auto axes_mapping_const = - op::Constant::create(element::Type_t::i64, Shape{4}, vector{0, 2, 1, 3}); + op::Constant::create(element::i64, Shape{4}, vector{0, 2, 1, 3}); bc = make_shared(data, target_shape, axes_mapping_const, "EXPLICIT"); ASSERT_TRUE(bc->get_output_partial_shape(0).is_static()); ASSERT_EQ(bc->get_output_partial_shape(0).rank().get_length(), 4); @@ -392,39 +377,37 @@ TYPED_TEST_P(BroadcastTests, broadcast_explicit_const_target_shape_static_rank_i TYPED_TEST_P(BroadcastTests, broadcast_explicit_static_input_shape) { - const auto data = make_shared(element::Type_t::f32, PartialShape{1, 2, 3, 4}); + const auto data = make_shared(element::f32, PartialShape{1, 2, 3, 4}); // dynamic target shape and axes mapping - auto target_shape = make_shared(element::Type_t::i64, PartialShape::dynamic()); - auto axes_mapping = make_shared(element::Type_t::i64, PartialShape::dynamic()); + auto target_shape = make_shared(element::i64, PartialShape::dynamic()); + auto axes_mapping = make_shared(element::i64, PartialShape::dynamic()); auto bc = make_shared(data, target_shape, axes_mapping, "EXPLICIT"); ASSERT_TRUE(bc->get_output_partial_shape(0).rank().is_dynamic()); // const axes mapping const auto axes_mapping_const = - op::Constant::create(element::Type_t::i64, Shape{4}, vector{0, 2, 1, 3}); + op::Constant::create(element::i64, Shape{4}, vector{0, 2, 1, 3}); bc = make_shared(data, target_shape, axes_mapping_const, "EXPLICIT"); ASSERT_TRUE(bc->get_output_partial_shape(0).rank().is_dynamic()); // static rank target shape - target_shape = make_shared(element::Type_t::i64, PartialShape::dynamic(1)); + target_shape = make_shared(element::i64, PartialShape::dynamic(1)); bc = make_shared(data, target_shape, axes_mapping, "EXPLICIT"); ASSERT_TRUE(bc->get_output_partial_shape(0).rank().is_dynamic()); // static rank target shape and const axes mapping - target_shape = make_shared(element::Type_t::i64, PartialShape::dynamic(1)); + target_shape = make_shared(element::i64, PartialShape::dynamic(1)); bc = make_shared(data, target_shape, axes_mapping_const, "EXPLICIT"); ASSERT_TRUE(bc->get_output_partial_shape(0).rank().is_dynamic()); } TYPED_TEST_P(BroadcastTests, broadcast_explicit_static_input_shape_const_target_shape) { - const auto data = make_shared(element::Type_t::f32, PartialShape{4}); - auto target_shape = - op::Constant::create(element::Type_t::i64, Shape{4}, vector{1, 4, 2, 3}); + const auto data = make_shared(element::f32, PartialShape{4}); + auto target_shape = op::Constant::create(element::i64, Shape{4}, vector{1, 4, 2, 3}); // dynamic axes mapping - const auto axes_mapping = - make_shared(element::Type_t::i64, PartialShape::dynamic()); + const auto axes_mapping = make_shared(element::i64, PartialShape::dynamic()); auto bc = make_shared(data, target_shape, axes_mapping, "EXPLICIT"); ASSERT_TRUE(bc->get_output_partial_shape(0).is_static()); @@ -433,7 +416,7 @@ TYPED_TEST_P(BroadcastTests, broadcast_explicit_static_input_shape_const_target_ // const axes mapping const auto axes_mapping_const = - op::Constant::create(element::Type_t::i64, Shape{1}, vector{1}); + op::Constant::create(element::i64, Shape{1}, vector{1}); bc = make_shared(data, target_shape, axes_mapping_const, "EXPLICIT"); ASSERT_TRUE(bc->get_output_partial_shape(0).is_static()); ASSERT_EQ(bc->get_output_partial_shape(0).rank().get_length(), 4); @@ -443,10 +426,9 @@ TYPED_TEST_P(BroadcastTests, broadcast_explicit_static_input_shape_const_target_ TYPED_TEST_P(BroadcastTests, broadcast_explicit_static_target_shape) { // dynamic input - auto data = make_shared(element::Type_t::f32, PartialShape::dynamic()); - const auto target_shape = make_shared(element::Type_t::i64, PartialShape{4}); - const auto axes_mapping = - make_shared(element::Type_t::i64, PartialShape::dynamic()); + auto data = make_shared(element::f32, PartialShape::dynamic()); + const auto target_shape = make_shared(element::i64, PartialShape{4}); + const auto axes_mapping = make_shared(element::i64, PartialShape::dynamic()); auto bc = make_shared(data, target_shape, axes_mapping, "EXPLICIT"); ASSERT_TRUE(bc->get_output_partial_shape(0).rank().is_static()); @@ -454,7 +436,7 @@ TYPED_TEST_P(BroadcastTests, broadcast_explicit_static_target_shape) ASSERT_TRUE(bc->get_output_partial_shape(0).is_dynamic()); // static rank input - data = make_shared(element::Type_t::f32, PartialShape::dynamic(2)); + data = make_shared(element::f32, PartialShape::dynamic(2)); bc = make_shared(data, target_shape, axes_mapping, "EXPLICIT"); ASSERT_TRUE(bc->get_output_partial_shape(0).rank().is_static()); ASSERT_EQ(bc->get_output_partial_shape(0).rank().get_length(), 4); @@ -465,15 +447,15 @@ TYPED_TEST_P(BroadcastTests, broadcast_explicit_static_target_shape) TYPED_TEST_P(BroadcastTests, broadcast_numpy_input_shape_dynamic) { - const auto data = make_shared(element::Type_t::f32, PartialShape::dynamic()); + const auto data = make_shared(element::f32, PartialShape::dynamic()); // dynamic output shape - auto target_shape = make_shared(element::Type_t::i64, PartialShape::dynamic()); + auto target_shape = make_shared(element::i64, PartialShape::dynamic()); auto bc = make_shared(data, target_shape, "NUMPY"); ASSERT_TRUE(bc->get_output_partial_shape(0).rank().is_dynamic()); // static rank target shape - target_shape = make_shared(element::Type_t::i64, PartialShape::dynamic(1)); + target_shape = make_shared(element::i64, PartialShape::dynamic(1)); bc = make_shared(data, target_shape, "NUMPY"); ASSERT_TRUE(bc->get_output_partial_shape(0).rank().is_dynamic()); } @@ -481,16 +463,16 @@ TYPED_TEST_P(BroadcastTests, broadcast_numpy_input_shape_dynamic) TYPED_TEST_P(BroadcastTests, broadcast_numpy_target_shape_constant) { // dynamic data - auto data = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto data = make_shared(element::f32, PartialShape::dynamic()); const auto target_shape = - op::Constant::create(element::Type_t::i64, Shape{3}, vector{1, 2, 3}); + op::Constant::create(element::i64, Shape{3}, vector{1, 2, 3}); auto bc = make_shared(data, target_shape, "NUMPY"); ASSERT_TRUE(bc->get_output_partial_shape(0).rank().is_static()); ASSERT_EQ(bc->get_output_partial_shape(0).rank().get_length(), 3); // static rank data - data = make_shared(element::Type_t::f32, PartialShape::dynamic(2)); + data = make_shared(element::f32, PartialShape::dynamic(2)); bc = make_shared(data, target_shape, "NUMPY"); ASSERT_TRUE(bc->get_output_partial_shape(0).rank().is_static()); ASSERT_EQ(bc->get_output_partial_shape(0).rank().get_length(), 3); @@ -499,24 +481,22 @@ TYPED_TEST_P(BroadcastTests, broadcast_numpy_target_shape_constant) TYPED_TEST_P(BroadcastTests, broadcast_numpy_target_shape_dynamic) { // static rank data - auto data = make_shared(element::Type_t::f32, PartialShape::dynamic(3)); - const auto target_shape = - make_shared(element::Type_t::i64, PartialShape::dynamic()); + auto data = make_shared(element::f32, PartialShape::dynamic(3)); + const auto target_shape = make_shared(element::i64, PartialShape::dynamic()); auto bc = make_shared(data, target_shape, "NUMPY"); ASSERT_TRUE(bc->get_output_partial_shape(0).rank().is_dynamic()); // static shape data - data = make_shared(element::Type_t::f32, PartialShape{3, 4, 5, 6}); + data = make_shared(element::f32, PartialShape{3, 4, 5, 6}); bc = make_shared(data, target_shape, "NUMPY"); ASSERT_TRUE(bc->get_output_partial_shape(0).rank().is_dynamic()); } TYPED_TEST_P(BroadcastTests, broadcast_numpy_input_target_shape_static_rank) { - const auto data = make_shared(element::Type_t::f32, PartialShape::dynamic(3)); - const auto target_shape = - make_shared(element::Type_t::i64, PartialShape::dynamic(1)); + const auto data = make_shared(element::f32, PartialShape::dynamic(3)); + const auto target_shape = make_shared(element::i64, PartialShape::dynamic(1)); const auto bc = make_shared(data, target_shape, "NUMPY"); ASSERT_TRUE(bc->get_output_partial_shape(0).rank().is_dynamic()); @@ -524,16 +504,16 @@ TYPED_TEST_P(BroadcastTests, broadcast_numpy_input_target_shape_static_rank) TYPED_TEST_P(BroadcastTests, broadcast_numpy_input_static_shape) { - const auto data = make_shared(element::Type_t::f32, PartialShape{1, 2, 3}); + const auto data = make_shared(element::f32, PartialShape{1, 2, 3}); // static rank target_shape - auto target_shape = make_shared(element::Type_t::i64, PartialShape::dynamic(1)); + auto target_shape = make_shared(element::i64, PartialShape::dynamic(1)); auto bc = make_shared(data, target_shape, "NUMPY"); ASSERT_TRUE(bc->get_output_partial_shape(0).rank().is_dynamic()); // constant target_shape const auto target_shape_const = - op::Constant::create(element::Type_t::i64, Shape{3}, vector{3, 2, 3}); + op::Constant::create(element::i64, Shape{3}, vector{3, 2, 3}); bc = make_shared(data, target_shape_const, "NUMPY"); ASSERT_TRUE(bc->get_output_partial_shape(0).rank().is_static()); ASSERT_EQ(bc->get_output_partial_shape(0).rank().get_length(), 3); @@ -545,25 +525,24 @@ TYPED_TEST_P(BroadcastTests, broadcast_numpy_input_partially_dynamic) { const Shape expected_target_shape{1, 2, 3, 4}; const auto target_shape = op::Constant::create( - element::Type_t::i64, + element::i64, {expected_target_shape.size()}, std::vector(expected_target_shape.begin(), expected_target_shape.end())); - auto data = - make_shared(element::Type_t::f32, PartialShape{2, 3, Dimension::dynamic()}); + auto data = make_shared(element::f32, PartialShape{2, 3, Dimension::dynamic()}); auto bc = make_shared(data, target_shape, "NUMPY"); ASSERT_TRUE(bc->get_output_partial_shape(0).rank().is_static()); ASSERT_EQ(bc->get_output_partial_shape(0).rank().get_length(), 4); ASSERT_EQ(bc->get_output_partial_shape(0), expected_target_shape); - data = make_shared(element::Type_t::f32, + data = make_shared(element::f32, PartialShape{Dimension::dynamic(), 3, Dimension::dynamic()}); bc = make_shared(data, target_shape, "NUMPY"); ASSERT_TRUE(bc->get_output_partial_shape(0).rank().is_static()); ASSERT_EQ(bc->get_output_partial_shape(0).rank().get_length(), 4); ASSERT_EQ(bc->get_output_partial_shape(0), expected_target_shape); - data = make_shared(element::Type_t::f32, + data = make_shared(element::f32, PartialShape{2, Dimension::dynamic(), Dimension::dynamic()}); bc = make_shared(data, target_shape, "NUMPY"); ASSERT_TRUE(bc->get_output_partial_shape(0).rank().is_static()); @@ -571,7 +550,7 @@ TYPED_TEST_P(BroadcastTests, broadcast_numpy_input_partially_dynamic) ASSERT_EQ(bc->get_output_partial_shape(0), expected_target_shape); data = make_shared( - element::Type_t::f32, + element::f32, PartialShape{Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic()}); bc = make_shared(data, target_shape, "NUMPY"); ASSERT_TRUE(bc->get_output_partial_shape(0).rank().is_static()); @@ -581,10 +560,10 @@ TYPED_TEST_P(BroadcastTests, broadcast_numpy_input_partially_dynamic) TYPED_TEST_P(BroadcastTests, broadcast_numpy_static_dims_incorrect) { - const auto target_shape = op::Constant::create(element::Type_t::i64, Shape{4}, {1, 2, 3, 4}); + const auto target_shape = op::Constant::create(element::i64, Shape{4}, {1, 2, 3, 4}); - auto data = make_shared(element::Type_t::f32, - PartialShape{Dimension::dynamic(), 999, 3, 4}); + auto data = + make_shared(element::f32, PartialShape{Dimension::dynamic(), 999, 3, 4}); try { auto bc = make_shared(data, target_shape, "NUMPY"); @@ -601,7 +580,7 @@ TYPED_TEST_P(BroadcastTests, broadcast_numpy_static_dims_incorrect) } data = make_shared( - element::Type_t::f32, + element::f32, PartialShape{Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic(), 888}); try { @@ -619,7 +598,7 @@ TYPED_TEST_P(BroadcastTests, broadcast_numpy_static_dims_incorrect) } data = make_shared( - element::Type_t::f32, + element::f32, PartialShape{5, Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic()}); try { @@ -675,30 +654,30 @@ INSTANTIATE_TYPED_TEST_CASE_P(type_prop, BroadcastTests, BroadcastTypes, ); // changing AutoBroadcastSpec to BroadcastModeSpec forces runing pdpd tests separately TEST(type_prop, broadcast_v1_pdpd) { - auto param = make_shared(element::Type_t::f32, Shape{3, 1}); - auto target_shape = op::Constant::create(element::Type_t::i64, Shape{3}, {2, 3, 6}); + auto param = make_shared(element::f32, Shape{3, 1}); + auto target_shape = op::Constant::create(element::i64, Shape{3}, {2, 3, 6}); auto bc = make_shared( param, target_shape, op::AutoBroadcastSpec(op::AutoBroadcastType::PDPD, 1)); - ASSERT_EQ(bc->get_element_type(), element::Type_t::f32); + ASSERT_EQ(bc->get_element_type(), element::f32); ASSERT_EQ(bc->get_shape(), (Shape{2, 3, 6})); } TEST(type_prop, broadcast_v3_pdpd) { - auto param = make_shared(element::Type_t::f32, Shape{3, 1}); - auto target_shape = op::Constant::create(element::Type_t::i64, Shape{3}, {2, 3, 6}); + auto param = make_shared(element::f32, Shape{3, 1}); + auto target_shape = op::Constant::create(element::i64, Shape{3}, {2, 3, 6}); auto bc = make_shared( param, target_shape, op::BroadcastModeSpec(op::BroadcastType::PDPD, 1)); - ASSERT_EQ(bc->get_element_type(), element::Type_t::f32); + ASSERT_EQ(bc->get_element_type(), element::f32); ASSERT_EQ(bc->get_shape(), (Shape{2, 3, 6})); } TEST(type_prop, broadcast_v3_bidirectional_mode_string) { - const auto arg = make_shared(element::Type_t::f32, Shape{1, 4, 1}); - const auto shape = make_shared(element::Type_t::i32, Shape{2}); + const auto arg = make_shared(element::f32, Shape{1, 4, 1}); + const auto shape = make_shared(element::i32, Shape{2}); const auto broadcast_v3 = make_shared(arg, shape, "BIDIRECTIONAL"); @@ -708,9 +687,9 @@ TEST(type_prop, broadcast_v3_bidirectional_mode_string) TEST(type_prop, broadcast_v3_shape_unexpected_axes_mapping_input) { - const auto arg = make_shared(element::Type_t::f32, Shape{1, 4, 1}); - const auto shape = make_shared(element::Type_t::i16, Shape{2}); - const auto axes_mapping = make_shared(element::Type_t::f32, Shape{3}); + const auto arg = make_shared(element::f32, Shape{1, 4, 1}); + const auto shape = make_shared(element::i16, Shape{2}); + const auto axes_mapping = make_shared(element::f32, Shape{3}); const auto broadcast_spec = op::BroadcastType::BIDIRECTIONAL; try @@ -733,8 +712,8 @@ TEST(type_prop, broadcast_v3_shape_unexpected_axes_mapping_input) TEST(type_prop, broadcast_v3_not_provided_axes_input_for_explicit_mode) { - const auto arg = make_shared(element::Type_t::f32, Shape{1, 4, 1}); - const auto shape = make_shared(element::Type_t::i16, Shape{2}); + const auto arg = make_shared(element::f32, Shape{1, 4, 1}); + const auto shape = make_shared(element::i16, Shape{2}); const auto broadcast_spec = op::BroadcastType::EXPLICIT; try @@ -756,65 +735,65 @@ TEST(type_prop, broadcast_v3_not_provided_axes_input_for_explicit_mode) TEST(type_prop, broadcast_v3_shape) { - const auto arg = make_shared(element::Type_t::f32, Shape{1, 4, 1}); - const auto shape = op::Constant::create(element::Type_t::i64, {2}, {1, 4}); + const auto arg = make_shared(element::f32, Shape{1, 4, 1}); + const auto shape = op::Constant::create(element::i64, {2}, {1, 4}); const auto broadcast_spec = op::BroadcastType::BIDIRECTIONAL; const auto broadcast_v3 = make_shared(arg, shape, broadcast_spec); - ASSERT_EQ(broadcast_v3->get_element_type(), element::Type_t::f32); + ASSERT_EQ(broadcast_v3->get_element_type(), element::f32); ASSERT_EQ(broadcast_v3->get_shape(), (Shape{1, 4, 4})); ASSERT_EQ(broadcast_v3->get_broadcast_axes(), (make_pair(true, AxisSet{2}))); } TEST(type_prop, broadcast_v3_shape_2) { - const auto arg = make_shared(element::Type_t::f32, Shape{3, 1}); - const auto shape = op::Constant::create(element::Type_t::i64, {3}, {2, 1, 6}); + const auto arg = make_shared(element::f32, Shape{3, 1}); + const auto shape = op::Constant::create(element::i64, {3}, {2, 1, 6}); const auto broadcast_spec = op::BroadcastType::BIDIRECTIONAL; const auto broadcast_v3 = make_shared(arg, shape, broadcast_spec); - ASSERT_EQ(broadcast_v3->get_element_type(), element::Type_t::f32); + ASSERT_EQ(broadcast_v3->get_element_type(), element::f32); ASSERT_EQ(broadcast_v3->get_shape(), (Shape{2, 3, 6})); ASSERT_EQ(broadcast_v3->get_broadcast_axes(), (make_pair(true, AxisSet{0, 2}))); } TEST(type_prop, broadcast_v3_shape_3) { - const auto arg = make_shared(element::Type_t::f32, Shape{2, 1}); - const auto shape = op::Constant::create(element::Type_t::i64, {2}, {2, 4}); + const auto arg = make_shared(element::f32, Shape{2, 1}); + const auto shape = op::Constant::create(element::i64, {2}, {2, 4}); const auto broadcast_spec = op::BroadcastType::BIDIRECTIONAL; const auto broadcast_v3 = make_shared(arg, shape, broadcast_spec); - ASSERT_EQ(broadcast_v3->get_element_type(), element::Type_t::f32); + ASSERT_EQ(broadcast_v3->get_element_type(), element::f32); ASSERT_EQ(broadcast_v3->get_shape(), (Shape{2, 4})); ASSERT_EQ(broadcast_v3->get_broadcast_axes(), (make_pair(true, AxisSet{1}))); } TEST(type_prop, broadcast_v3_shape_4) { - const auto arg = make_shared(element::Type_t::f32, Shape{1, 3, 1}); - const auto shape = op::Constant::create(element::Type_t::i64, {2}, {3, 1}); + const auto arg = make_shared(element::f32, Shape{1, 3, 1}); + const auto shape = op::Constant::create(element::i64, {2}, {3, 1}); const auto broadcast_spec = op::BroadcastType::BIDIRECTIONAL; const auto broadcast_v3 = make_shared(arg, shape, broadcast_spec); - ASSERT_EQ(broadcast_v3->get_element_type(), element::Type_t::f32); + ASSERT_EQ(broadcast_v3->get_element_type(), element::f32); ASSERT_EQ(broadcast_v3->get_shape(), (Shape{1, 3, 1})); ASSERT_EQ(broadcast_v3->get_broadcast_axes(), (make_pair(true, AxisSet{}))); } TEST(type_prop, broadcast_v3_shape_5) { - const auto arg = make_shared(element::Type_t::f32, Shape{16, 1, 1}); - const auto shape = op::Constant::create(element::Type_t::i64, {4}, {1, 1, 50, 50}); + const auto arg = make_shared(element::f32, Shape{16, 1, 1}); + const auto shape = op::Constant::create(element::i64, {4}, {1, 1, 50, 50}); const auto broadcast_spec = op::BroadcastType::BIDIRECTIONAL; const auto broadcast_v3 = make_shared(arg, shape, broadcast_spec); - ASSERT_EQ(broadcast_v3->get_element_type(), element::Type_t::f32); + ASSERT_EQ(broadcast_v3->get_element_type(), element::f32); ASSERT_EQ(broadcast_v3->get_shape(), (Shape{1, 16, 50, 50})); ASSERT_EQ(broadcast_v3->get_broadcast_axes(), (make_pair(true, AxisSet{0, 2, 3}))); @@ -822,34 +801,34 @@ TEST(type_prop, broadcast_v3_shape_5) TEST(type_prop, broadcast_v3_shape_6) { - const auto arg = make_shared(element::Type_t::f32, Shape{1, 3, 1}); - const auto shape = op::Constant::create(element::Type_t::i64, {3}, {3, 1, 3}); + const auto arg = make_shared(element::f32, Shape{1, 3, 1}); + const auto shape = op::Constant::create(element::i64, {3}, {3, 1, 3}); const auto broadcast_spec = op::BroadcastType::BIDIRECTIONAL; const auto broadcast_v3 = make_shared(arg, shape, broadcast_spec); - ASSERT_EQ(broadcast_v3->get_element_type(), element::Type_t::f32); + ASSERT_EQ(broadcast_v3->get_element_type(), element::f32); ASSERT_EQ(broadcast_v3->get_shape(), (Shape{3, 3, 3})); ASSERT_EQ(broadcast_v3->get_broadcast_axes(), (make_pair(true, AxisSet{0, 2}))); } TEST(type_prop, broadcast_v3_shape_6_type_infer) { - const auto arg = make_shared(element::Type_t::u16, Shape{1, 3, 1}); - const auto shape = op::Constant::create(element::Type_t::i64, {3}, {3, 1, 3}); + const auto arg = make_shared(element::u16, Shape{1, 3, 1}); + const auto shape = op::Constant::create(element::i64, {3}, {3, 1, 3}); const auto broadcast_spec = op::BroadcastType::BIDIRECTIONAL; const auto broadcast_v3 = make_shared(arg, shape, broadcast_spec); - ASSERT_EQ(broadcast_v3->get_element_type(), element::Type_t::u16); + ASSERT_EQ(broadcast_v3->get_element_type(), element::u16); ASSERT_EQ(broadcast_v3->get_shape(), (Shape{3, 3, 3})); ASSERT_EQ(broadcast_v3->get_broadcast_axes(), (make_pair(true, AxisSet{0, 2}))); } TEST(type_prop, broadcast_v3_incorrect_target_shape) { - const auto arg = make_shared(element::Type_t::f32, Shape{4, 3, 2}); - const auto shape = op::Constant::create(element::Type_t::i64, {3}, {8, 6, 4}); + const auto arg = make_shared(element::f32, Shape{4, 3, 2}); + const auto shape = op::Constant::create(element::i64, {3}, {8, 6, 4}); const auto broadcast_spec = op::BroadcastType::BIDIRECTIONAL; try @@ -871,8 +850,8 @@ TEST(type_prop, broadcast_v3_incorrect_target_shape) TEST(type_prop, broadcast_v3_incorrect_target_shape_2) { - const auto arg = make_shared(element::Type_t::f32, Shape{1, 1, 2}); - const auto shape = op::Constant::create(element::Type_t::i64, {2}, {2, 3}); + const auto arg = make_shared(element::f32, Shape{1, 1, 2}); + const auto shape = op::Constant::create(element::i64, {2}, {2, 3}); const auto broadcast_spec = op::BroadcastType::BIDIRECTIONAL; try @@ -894,8 +873,8 @@ TEST(type_prop, broadcast_v3_incorrect_target_shape_2) TEST(type_prop, broadcast_v3_output_rank_not_deduced) { - const auto arg = make_shared(element::Type_t::f32, PartialShape::dynamic()); - const auto shape = make_shared(element::Type_t::i64, PartialShape::dynamic(1)); + const auto arg = make_shared(element::f32, PartialShape::dynamic()); + const auto shape = make_shared(element::i64, PartialShape::dynamic(1)); const auto broadcast_spec = op::BroadcastType::BIDIRECTIONAL; const auto broadcast_v3 = make_shared(arg, shape, broadcast_spec); @@ -905,8 +884,8 @@ TEST(type_prop, broadcast_v3_output_rank_not_deduced) TEST(type_prop, broadcast_v3_output_rank_deduced_from_arg) { - const auto arg = make_shared(element::Type_t::f32, PartialShape::dynamic(4)); - const auto shape = op::Constant::create(element::Type_t::i64, {3}, {8, 6, 4}); + const auto arg = make_shared(element::f32, PartialShape::dynamic(4)); + const auto shape = op::Constant::create(element::i64, {3}, {8, 6, 4}); const auto broadcast_spec = op::BroadcastType::BIDIRECTIONAL; const auto broadcast_v3 = make_shared(arg, shape, broadcast_spec); @@ -916,8 +895,8 @@ TEST(type_prop, broadcast_v3_output_rank_deduced_from_arg) TEST(type_prop, broadcast_v3_output_rank_deduced_from_new_shape_input) { - const auto arg = make_shared(element::Type_t::f32, PartialShape::dynamic(4)); - const auto shape = op::Constant::create(element::Type_t::i64, {5}, {8, 6, 1, 5, 1}); + const auto arg = make_shared(element::f32, PartialShape::dynamic(4)); + const auto shape = op::Constant::create(element::i64, {5}, {8, 6, 1, 5, 1}); const auto broadcast_spec = op::BroadcastType::BIDIRECTIONAL; const auto broadcast_v3 = make_shared(arg, shape, broadcast_spec); @@ -929,40 +908,40 @@ TEST(type_prop, broadcast_v3_output_rank_deduced_from_new_shape_input) TEST(type_prop, broadcast_v3_bidirectional_dynamic_input) { - const auto arg = make_shared(element::Type_t::f32, PartialShape::dynamic()); + const auto arg = make_shared(element::f32, PartialShape::dynamic()); // dynamic target shape - auto target_shape = make_shared(element::Type_t::i64, PartialShape::dynamic()); + auto target_shape = make_shared(element::i64, PartialShape::dynamic()); auto broadcast_v3 = make_shared(arg, target_shape, "BIDIRECTIONAL"); ASSERT_TRUE(broadcast_v3->get_output_partial_shape(0).rank().is_dynamic()); // static rank target shape - target_shape = make_shared(element::Type_t::i64, PartialShape::dynamic(1)); + target_shape = make_shared(element::i64, PartialShape::dynamic(1)); broadcast_v3 = make_shared(arg, target_shape, "BIDIRECTIONAL"); ASSERT_TRUE(broadcast_v3->get_output_partial_shape(0).rank().is_dynamic()); // constant target shape - const auto target_shape_const = op::Constant::create(element::Type_t::i64, {3}, {2, 4, 6}); + const auto target_shape_const = op::Constant::create(element::i64, {3}, {2, 4, 6}); broadcast_v3 = make_shared(arg, target_shape_const, "BIDIRECTIONAL"); ASSERT_TRUE(broadcast_v3->get_output_partial_shape(0).rank().is_dynamic()); } TEST(type_prop, broadcast_v3_bidirectional_static_rank_input) { - const auto arg = make_shared(element::Type_t::f32, PartialShape::dynamic(4)); + const auto arg = make_shared(element::f32, PartialShape::dynamic(4)); // dynamic target shape - auto target_shape = make_shared(element::Type_t::i64, PartialShape::dynamic()); + auto target_shape = make_shared(element::i64, PartialShape::dynamic()); auto broadcast_v3 = make_shared(arg, target_shape, "BIDIRECTIONAL"); ASSERT_TRUE(broadcast_v3->get_output_partial_shape(0).rank().is_dynamic()); // static rank target shape - target_shape = make_shared(element::Type_t::i64, PartialShape::dynamic(1)); + target_shape = make_shared(element::i64, PartialShape::dynamic(1)); broadcast_v3 = make_shared(arg, target_shape, "BIDIRECTIONAL"); ASSERT_TRUE(broadcast_v3->get_output_partial_shape(0).rank().is_dynamic()); // constant target shape - const auto target_shape_const = op::Constant::create(element::Type_t::i64, {3}, {2, 4, 6}); + const auto target_shape_const = op::Constant::create(element::i64, {3}, {2, 4, 6}); broadcast_v3 = make_shared(arg, target_shape_const, "BIDIRECTIONAL"); ASSERT_TRUE(broadcast_v3->get_output_partial_shape(0).rank().is_static()); ASSERT_EQ(broadcast_v3->get_output_partial_shape(0).rank().get_length(), 4); @@ -971,27 +950,27 @@ TEST(type_prop, broadcast_v3_bidirectional_static_rank_input) TEST(type_prop, broadcast_v3_bidirectional_static_shape_input) { - const auto arg = make_shared(element::Type_t::f32, PartialShape{1, 2, 3, 1}); + const auto arg = make_shared(element::f32, PartialShape{1, 2, 3, 1}); // dynamic target shape - auto target_shape = make_shared(element::Type_t::i64, PartialShape::dynamic()); + auto target_shape = make_shared(element::i64, PartialShape::dynamic()); auto broadcast_v3 = make_shared(arg, target_shape, "BIDIRECTIONAL"); ASSERT_TRUE(broadcast_v3->get_output_partial_shape(0).rank().is_dynamic()); // static rank target shape - target_shape = make_shared(element::Type_t::i64, PartialShape::dynamic(1)); + target_shape = make_shared(element::i64, PartialShape::dynamic(1)); broadcast_v3 = make_shared(arg, target_shape, "BIDIRECTIONAL"); ASSERT_TRUE(broadcast_v3->get_output_partial_shape(0).rank().is_dynamic()); // constant target shape - auto target_shape_const = op::Constant::create(element::Type_t::i64, {4}, {2, 2, 3, 2}); + auto target_shape_const = op::Constant::create(element::i64, {4}, {2, 2, 3, 2}); broadcast_v3 = make_shared(arg, target_shape_const, "BIDIRECTIONAL"); ASSERT_TRUE(broadcast_v3->get_output_partial_shape(0).rank().is_static()); ASSERT_EQ(broadcast_v3->get_output_partial_shape(0).rank().get_length(), 4); ASSERT_TRUE(broadcast_v3->get_output_partial_shape(0).is_static()); ASSERT_EQ(broadcast_v3->get_output_partial_shape(0), (PartialShape{2, 2, 3, 2})); - target_shape_const = op::Constant::create(element::Type_t::i64, {4}, {5, 2, 3, 7}); + target_shape_const = op::Constant::create(element::i64, {4}, {5, 2, 3, 7}); broadcast_v3 = make_shared(arg, target_shape_const, "BIDIRECTIONAL"); ASSERT_TRUE(broadcast_v3->get_output_partial_shape(0).rank().is_static()); ASSERT_EQ(broadcast_v3->get_output_partial_shape(0).rank().get_length(), 4); @@ -1002,23 +981,22 @@ TEST(type_prop, broadcast_v3_bidirectional_static_shape_input) TEST(type_prop, broadcast_v3_bidirectional_partially_dynamic_input) { const auto target_shape = - op::Constant::create(element::Type_t::i64, Shape{4}, vector{1, 1, 50, 50}); + op::Constant::create(element::i64, Shape{4}, vector{1, 1, 50, 50}); - auto data = - make_shared(element::Type_t::f32, PartialShape{16, 1, Dimension::dynamic()}); + auto data = make_shared(element::f32, PartialShape{16, 1, Dimension::dynamic()}); auto bc = make_shared(data, target_shape, "BIDIRECTIONAL"); ASSERT_TRUE(bc->get_output_partial_shape(0).rank().is_static()); ASSERT_EQ(bc->get_output_partial_shape(0).rank().get_length(), 4); ASSERT_EQ(bc->get_output_partial_shape(0), (PartialShape{1, 16, 50, 50})); - data = make_shared(element::Type_t::f32, + data = make_shared(element::f32, PartialShape{Dimension::dynamic(), 1, Dimension::dynamic()}); bc = make_shared(data, target_shape, "BIDIRECTIONAL"); ASSERT_TRUE(bc->get_output_partial_shape(0).rank().is_static()); ASSERT_EQ(bc->get_output_partial_shape(0).rank().get_length(), 4); ASSERT_EQ(bc->get_output_partial_shape(0), (PartialShape{1, Dimension::dynamic(), 50, 50})); - data = make_shared(element::Type_t::f32, + data = make_shared(element::f32, PartialShape{16, Dimension::dynamic(), Dimension::dynamic()}); bc = make_shared(data, target_shape, "BIDIRECTIONAL"); ASSERT_TRUE(bc->get_output_partial_shape(0).rank().is_static()); @@ -1026,7 +1004,7 @@ TEST(type_prop, broadcast_v3_bidirectional_partially_dynamic_input) ASSERT_EQ(bc->get_output_partial_shape(0), (PartialShape{1, 16, 50, 50})); data = make_shared( - element::Type_t::f32, + element::f32, PartialShape{Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic()}); bc = make_shared(data, target_shape, "BIDIRECTIONAL"); ASSERT_TRUE(bc->get_output_partial_shape(0).rank().is_static()); diff --git a/ngraph/test/type_prop/bucketize.cpp b/ngraph/test/type_prop/bucketize.cpp index 89cd4d30b399ce..44fbc8cbf1e531 100644 --- a/ngraph/test/type_prop/bucketize.cpp +++ b/ngraph/test/type_prop/bucketize.cpp @@ -23,66 +23,62 @@ using namespace ngraph; TEST(type_prop, bucketize) { - auto data = make_shared(element::Type_t::f32, Shape{2, 3, 2}); - auto buckets = make_shared(element::Type_t::f32, Shape{4}); + auto data = make_shared(element::f32, Shape{2, 3, 2}); + auto buckets = make_shared(element::f32, Shape{4}); auto bucketize = make_shared(data, buckets); - EXPECT_EQ(bucketize->get_element_type(), element::Type_t::i64); + EXPECT_EQ(bucketize->get_element_type(), element::i64); EXPECT_TRUE(bucketize->get_output_partial_shape(0).same_scheme(PartialShape{2, 3, 2})); } TEST(type_prop, bucketize_output_type) { - auto data = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - auto buckets = make_shared(element::Type_t::f32, Shape{5}); - auto bucketize = make_shared(data, buckets, element::Type_t::i32); + auto data = make_shared(element::f32, Shape{1, 2, 3, 4}); + auto buckets = make_shared(element::f32, Shape{5}); + auto bucketize = make_shared(data, buckets, element::i32); - ASSERT_EQ(bucketize->get_output_element_type(0), element::Type_t::i32); + ASSERT_EQ(bucketize->get_output_element_type(0), element::i32); EXPECT_TRUE(bucketize->get_output_partial_shape(0).same_scheme(PartialShape{1, 2, 3, 4})); } TEST(type_prop, bucketize_output_type_right_bound) { - auto data = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - auto buckets = make_shared(element::Type_t::f32, Shape{5}); - auto bucketize = make_shared(data, buckets, element::Type_t::i32, false); + auto data = make_shared(element::f32, Shape{1, 2, 3, 4}); + auto buckets = make_shared(element::f32, Shape{5}); + auto bucketize = make_shared(data, buckets, element::i32, false); - ASSERT_EQ(bucketize->get_output_element_type(0), element::Type_t::i32); + ASSERT_EQ(bucketize->get_output_element_type(0), element::i32); EXPECT_TRUE(bucketize->get_output_partial_shape(0).same_scheme(PartialShape{1, 2, 3, 4})); } TEST(type_prop, bucketize_dynamic_input) { - auto data = - make_shared(element::Type_t::f64, PartialShape{4, Dimension::dynamic()}); - auto buckets = make_shared(element::Type_t::f32, Shape{5}); + auto data = make_shared(element::f64, PartialShape{4, Dimension::dynamic()}); + auto buckets = make_shared(element::f32, Shape{5}); auto bucketize = make_shared(data, buckets); - EXPECT_EQ(bucketize->get_element_type(), element::Type_t::i64); + EXPECT_EQ(bucketize->get_element_type(), element::i64); EXPECT_TRUE( bucketize->get_output_partial_shape(0).same_scheme(PartialShape{4, Dimension::dynamic()})); } TEST(type_prop, bucketize_dynamic_buckets) { - auto data = - make_shared(element::Type_t::f64, PartialShape{4, Dimension::dynamic()}); - auto buckets = - make_shared(element::Type_t::f32, PartialShape{Dimension::dynamic()}); + auto data = make_shared(element::f64, PartialShape{4, Dimension::dynamic()}); + auto buckets = make_shared(element::f32, PartialShape{Dimension::dynamic()}); auto bucketize = make_shared(data, buckets); - EXPECT_EQ(bucketize->get_element_type(), element::Type_t::i64); + EXPECT_EQ(bucketize->get_element_type(), element::i64); EXPECT_TRUE( bucketize->get_output_partial_shape(0).same_scheme(PartialShape{4, Dimension::dynamic()})); } TEST(type_prop, bucketize_fail_output_type) { - auto data = - make_shared(element::Type_t::f64, PartialShape{4, Dimension::dynamic()}); - auto buckets = make_shared(element::Type_t::f32, Shape{5}); + auto data = make_shared(element::f64, PartialShape{4, Dimension::dynamic()}); + auto buckets = make_shared(element::f32, Shape{5}); try { - auto bucketize = make_shared(data, buckets, element::Type_t::f64); + auto bucketize = make_shared(data, buckets, element::f64); // Should have thrown, so fail if it didn't FAIL() << "Invalid output type not detected"; } @@ -98,9 +94,8 @@ TEST(type_prop, bucketize_fail_output_type) TEST(type_prop, bucketize_fail_buckets_dim) { - auto data = - make_shared(element::Type_t::f64, PartialShape{4, Dimension::dynamic()}); - auto buckets = make_shared(element::Type_t::f32, Shape{5, 5}); + auto data = make_shared(element::f64, PartialShape{4, Dimension::dynamic()}); + auto buckets = make_shared(element::f32, Shape{5, 5}); try { auto bucketize = make_shared(data, buckets); diff --git a/ngraph/test/type_prop/clamp.cpp b/ngraph/test/type_prop/clamp.cpp index 8c696d5cb93f31..63652be87425d4 100644 --- a/ngraph/test/type_prop/clamp.cpp +++ b/ngraph/test/type_prop/clamp.cpp @@ -23,7 +23,7 @@ using namespace ngraph; TEST(type_prop, fused_clamp) { - const auto data = make_shared(element::Type_t::f64, Shape{2, 2}); + const auto data = make_shared(element::f64, Shape{2, 2}); try { @@ -38,6 +38,6 @@ TEST(type_prop, fused_clamp) } const auto clamp = make_shared(data, 1.0, 2.0); - EXPECT_EQ(clamp->get_element_type(), element::Type_t::f64); + EXPECT_EQ(clamp->get_element_type(), element::f64); EXPECT_EQ(clamp->get_shape(), (Shape{2, 2})); } diff --git a/ngraph/test/type_prop/concat.cpp b/ngraph/test/type_prop/concat.cpp index 7d912ef6c0359c..450a7feb933cb6 100644 --- a/ngraph/test/type_prop/concat.cpp +++ b/ngraph/test/type_prop/concat.cpp @@ -24,19 +24,19 @@ using namespace ngraph; TEST(type_prop, concat_deduce) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{2, 3, 4}); - auto param1 = make_shared(element::Type_t::f32, Shape{2, 7, 4}); - auto param2 = make_shared(element::Type_t::f32, Shape{2, 2, 4}); + auto param0 = make_shared(element::f32, Shape{2, 3, 4}); + auto param1 = make_shared(element::f32, Shape{2, 7, 4}); + auto param2 = make_shared(element::f32, Shape{2, 2, 4}); auto c = make_shared(NodeVector{param0, param1, param2}, 1); - ASSERT_EQ(c->get_element_type(), element::Type_t::f32); + ASSERT_EQ(c->get_element_type(), element::f32); ASSERT_EQ(c->get_shape(), (Shape{2, 12, 4})); } TEST(type_prop, concat_deduce_wrong_rank) { - auto param0 = make_shared(element::Type_t::f32, Shape{2, 3, 4}); - auto param1 = make_shared(element::Type_t::f32, Shape{2, 7, 4}); - auto param2 = make_shared(element::Type_t::f32, + auto param0 = make_shared(element::f32, Shape{2, 3, 4}); + auto param1 = make_shared(element::f32, Shape{2, 7, 4}); + auto param2 = make_shared(element::f32, Shape{ 2, 2, }); @@ -61,9 +61,9 @@ TEST(type_prop, concat_deduce_wrong_rank) TEST(type_prop, concat_deduce_wrong_shape) { - auto param0 = make_shared(element::Type_t::f32, Shape{2, 3, 4}); - auto param1 = make_shared(element::Type_t::f32, Shape{2, 7, 4}); - auto param2 = make_shared(element::Type_t::f32, Shape{2, 2, 5}); + auto param0 = make_shared(element::f32, Shape{2, 3, 4}); + auto param1 = make_shared(element::f32, Shape{2, 7, 4}); + auto param2 = make_shared(element::f32, Shape{2, 2, 5}); try { auto c = make_shared(NodeVector{param0, param1, param2}, 1); @@ -85,9 +85,9 @@ TEST(type_prop, concat_deduce_wrong_shape) TEST(type_prop, concat_deduce_axis_oob) { - auto param0 = make_shared(element::Type_t::f32, Shape{2, 3, 4}); - auto param1 = make_shared(element::Type_t::f32, Shape{2, 7, 4}); - auto param2 = make_shared(element::Type_t::f32, Shape{2, 2, 5}); + auto param0 = make_shared(element::f32, Shape{2, 3, 4}); + auto param1 = make_shared(element::f32, Shape{2, 7, 4}); + auto param2 = make_shared(element::f32, Shape{2, 2, 5}); try { auto c = make_shared(NodeVector{param0, param1, param2}, 3); @@ -107,19 +107,19 @@ TEST(type_prop, concat_deduce_axis_oob) TEST(type_prop, concat_deduce_axis_barely_in_bounds) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{2, 3, 4}); - auto param1 = make_shared(element::Type_t::f32, Shape{2, 3, 8}); - auto param2 = make_shared(element::Type_t::f32, Shape{2, 3, 12}); + auto param0 = make_shared(element::f32, Shape{2, 3, 4}); + auto param1 = make_shared(element::f32, Shape{2, 3, 8}); + auto param2 = make_shared(element::f32, Shape{2, 3, 12}); auto c = make_shared(NodeVector{param0, param1, param2}, 2); - ASSERT_EQ(c->get_element_type(), element::Type_t::f32); + ASSERT_EQ(c->get_element_type(), element::f32); ASSERT_EQ(c->get_shape(), (Shape{2, 3, 24})); } TEST(type_prop, concat_deduce_elem_type_mismatch) { - auto param0 = make_shared(element::Type_t::f32, Shape{2, 3, 4}); - auto param1 = make_shared(element::Type_t::i32, Shape{2, 7, 4}); - auto param2 = make_shared(element::Type_t::f32, Shape{2, 2, 4}); + auto param0 = make_shared(element::f32, Shape{2, 3, 4}); + auto param1 = make_shared(element::i32, Shape{2, 7, 4}); + auto param2 = make_shared(element::f32, Shape{2, 2, 4}); try { auto c = make_shared(NodeVector{param0, param1, param2}, 1); @@ -138,20 +138,20 @@ TEST(type_prop, concat_deduce_elem_type_mismatch) TEST(type_prop, concat_partial_et_consistent) { - auto param0 = make_shared(element::Type_t::f32, Shape{2, 3, 4}); - auto param1 = make_shared(element::Type_t::dynamic, Shape{2, 7, 4}); - auto param2 = make_shared(element::Type_t::f32, Shape{2, 2, 4}); + auto param0 = make_shared(element::f32, Shape{2, 3, 4}); + auto param1 = make_shared(element::dynamic, Shape{2, 7, 4}); + auto param2 = make_shared(element::f32, Shape{2, 2, 4}); auto c = make_shared(NodeVector{param0, param1, param2}, 1); - ASSERT_EQ(c->get_element_type(), element::Type_t::f32); + ASSERT_EQ(c->get_element_type(), element::f32); ASSERT_EQ(c->get_shape(), (Shape{2, 12, 4})); } TEST(type_prop, concat_partial_et_inconsistent) { - auto param0 = make_shared(element::Type_t::f32, Shape{2, 3, 4}); - auto param1 = make_shared(element::Type_t::dynamic, Shape{2, 7, 4}); - auto param2 = make_shared(element::Type_t::i32, Shape{2, 2, 4}); + auto param0 = make_shared(element::f32, Shape{2, 3, 4}); + auto param1 = make_shared(element::dynamic, Shape{2, 7, 4}); + auto param2 = make_shared(element::i32, Shape{2, 2, 4}); try { auto c = make_shared(NodeVector{param0, param1, param2}, 1); @@ -170,9 +170,9 @@ TEST(type_prop, concat_partial_et_inconsistent) TEST(type_prop, concat_partial_all_rank_dynamic) { - auto param0 = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto param1 = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto param2 = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto param0 = make_shared(element::f32, PartialShape::dynamic()); + auto param1 = make_shared(element::f32, PartialShape::dynamic()); + auto param2 = make_shared(element::f32, PartialShape::dynamic()); auto c = make_shared(NodeVector{param0, param1, param2}, 1); ASSERT_TRUE(c->get_output_partial_shape(0).rank().is_dynamic()); @@ -181,10 +181,10 @@ TEST(type_prop, concat_partial_all_rank_dynamic) TEST(type_prop, concat_partial_some_rank_dynamic_others_rank_static_dynamic_consistent) { auto param0 = - make_shared(element::Type_t::f32, PartialShape{2, Dimension::dynamic(), 3}); - auto param1 = make_shared(element::Type_t::f32, PartialShape::dynamic()); + make_shared(element::f32, PartialShape{2, Dimension::dynamic(), 3}); + auto param1 = make_shared(element::f32, PartialShape::dynamic()); auto param2 = - make_shared(element::Type_t::f32, PartialShape{2, 3, Dimension::dynamic()}); + make_shared(element::f32, PartialShape{2, 3, Dimension::dynamic()}); auto c = make_shared(NodeVector{param0, param1, param2}, 1); ASSERT_TRUE( @@ -194,10 +194,10 @@ TEST(type_prop, concat_partial_some_rank_dynamic_others_rank_static_dynamic_cons TEST(type_prop, concat_partial_some_rank_dynamic_others_rank_static_dynamic_rank_inconsistent) { auto param0 = - make_shared(element::Type_t::f32, PartialShape{2, Dimension::dynamic(), 3}); - auto param1 = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto param2 = make_shared(element::Type_t::f32, - PartialShape{2, 3, Dimension::dynamic(), 4}); + make_shared(element::f32, PartialShape{2, Dimension::dynamic(), 3}); + auto param1 = make_shared(element::f32, PartialShape::dynamic()); + auto param2 = + make_shared(element::f32, PartialShape{2, 3, Dimension::dynamic(), 4}); try { auto c = make_shared(NodeVector{param0, param1, param2}, 1); @@ -221,10 +221,10 @@ TEST(type_prop, concat_partial_some_rank_dynamic_others_rank_static_dynamic_rank TEST(type_prop, concat_partial_some_rank_dynamic_others_rank_static_dynamic_dims_inconsistent) { auto param0 = - make_shared(element::Type_t::f32, PartialShape{2, Dimension::dynamic(), 3}); - auto param1 = make_shared(element::Type_t::f32, PartialShape::dynamic()); + make_shared(element::f32, PartialShape{2, Dimension::dynamic(), 3}); + auto param1 = make_shared(element::f32, PartialShape::dynamic()); auto param2 = - make_shared(element::Type_t::f32, PartialShape{3, 3, Dimension::dynamic()}); + make_shared(element::f32, PartialShape{3, 3, Dimension::dynamic()}); try { auto c = make_shared(NodeVector{param0, param1, param2}, 1); @@ -249,12 +249,12 @@ TEST(type_prop, concat_partial_some_rank_dynamic_others_rank_static_dynamic_dims_intransitively_inconsistent) { auto param0 = - make_shared(element::Type_t::f32, PartialShape{2, Dimension::dynamic(), 3}); - auto param1 = make_shared(element::Type_t::f32, PartialShape::dynamic()); + make_shared(element::f32, PartialShape{2, Dimension::dynamic(), 3}); + auto param1 = make_shared(element::f32, PartialShape::dynamic()); auto param2 = make_shared( - element::Type_t::f32, PartialShape{Dimension::dynamic(), 3, Dimension::dynamic()}); + element::f32, PartialShape{Dimension::dynamic(), 3, Dimension::dynamic()}); auto param3 = - make_shared(element::Type_t::f32, PartialShape{3, 3, Dimension::dynamic()}); + make_shared(element::f32, PartialShape{3, 3, Dimension::dynamic()}); try { auto c = make_shared(NodeVector{param0, param1, param2, param3}, 1); @@ -277,10 +277,10 @@ TEST(type_prop, TEST(type_prop, concat_partial_some_rank_dynamic_others_rank_static_with_concat_axis_static) { - auto param0 = make_shared(element::Type_t::f32, PartialShape{2, 2, 3}); - auto param1 = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto param0 = make_shared(element::f32, PartialShape{2, 2, 3}); + auto param1 = make_shared(element::f32, PartialShape::dynamic()); auto param2 = - make_shared(element::Type_t::f32, PartialShape{2, 3, Dimension::dynamic()}); + make_shared(element::f32, PartialShape{2, 3, Dimension::dynamic()}); auto c = make_shared(NodeVector{param0, param1, param2}, 1); ASSERT_TRUE( @@ -290,10 +290,10 @@ TEST(type_prop, concat_partial_some_rank_dynamic_others_rank_static_with_concat_ TEST(type_prop, concat_partial_some_rank_dynamic_others_rank_static_with_concat_axis_static_dims_inconsistent) { - auto param0 = make_shared(element::Type_t::f32, PartialShape{2, 2, 3}); - auto param1 = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto param0 = make_shared(element::f32, PartialShape{2, 2, 3}); + auto param1 = make_shared(element::f32, PartialShape::dynamic()); auto param2 = - make_shared(element::Type_t::f32, PartialShape{3, 3, Dimension::dynamic()}); + make_shared(element::f32, PartialShape{3, 3, Dimension::dynamic()}); try { @@ -317,11 +317,11 @@ TEST(type_prop, TEST(type_prop, concat_partial_all_static_with_concat_axis_static_compatible_result_static) { - auto param0 = make_shared(element::Type_t::f32, PartialShape{2, 2, 3}); + auto param0 = make_shared(element::f32, PartialShape{2, 2, 3}); auto param1 = - make_shared(element::Type_t::f32, PartialShape{Dimension::dynamic(), 4, 3}); + make_shared(element::f32, PartialShape{Dimension::dynamic(), 4, 3}); auto param2 = - make_shared(element::Type_t::f32, PartialShape{2, 3, Dimension::dynamic()}); + make_shared(element::f32, PartialShape{2, 3, Dimension::dynamic()}); auto c = make_shared(NodeVector{param0, param1, param2}, 1); ASSERT_EQ(c->get_shape(), (Shape{2, 9, 3})); @@ -330,11 +330,11 @@ TEST(type_prop, concat_partial_all_static_with_concat_axis_static_compatible_res TEST(type_prop, concat_partial_all_static_with_concat_axis_static_compatible_result_dynamic) { auto param0 = - make_shared(element::Type_t::f32, PartialShape{2, 2, Dimension::dynamic()}); + make_shared(element::f32, PartialShape{2, 2, Dimension::dynamic()}); auto param1 = make_shared( - element::Type_t::f32, PartialShape{Dimension::dynamic(), 4, Dimension::dynamic()}); + element::f32, PartialShape{Dimension::dynamic(), 4, Dimension::dynamic()}); auto param2 = - make_shared(element::Type_t::f32, PartialShape{2, 3, Dimension::dynamic()}); + make_shared(element::f32, PartialShape{2, 3, Dimension::dynamic()}); auto c = make_shared(NodeVector{param0, param1, param2}, 1); ASSERT_TRUE( @@ -343,11 +343,11 @@ TEST(type_prop, concat_partial_all_static_with_concat_axis_static_compatible_res TEST(type_prop, concat_partial_all_static_with_concat_axis_static_dims_incompatible) { - auto param0 = make_shared(element::Type_t::f32, PartialShape{2, 2, 3}); + auto param0 = make_shared(element::f32, PartialShape{2, 2, 3}); auto param1 = - make_shared(element::Type_t::f32, PartialShape{Dimension::dynamic(), 4, 3}); + make_shared(element::f32, PartialShape{Dimension::dynamic(), 4, 3}); auto param2 = - make_shared(element::Type_t::f32, PartialShape{3, 3, Dimension::dynamic()}); + make_shared(element::f32, PartialShape{3, 3, Dimension::dynamic()}); try { auto c = make_shared(NodeVector{param0, param1, param2}, 1); diff --git a/ngraph/test/type_prop/constant.cpp b/ngraph/test/type_prop/constant.cpp index b28e89ed7d06f8..1de8b9e8f99a36 100644 --- a/ngraph/test/type_prop/constant.cpp +++ b/ngraph/test/type_prop/constant.cpp @@ -23,29 +23,29 @@ using namespace ngraph; TEST(type_prop, scalar_constant_deduce_float32) { - auto c = op::Constant::create(element::Type_t::f32, Shape{}, {208}); - ASSERT_EQ(c->get_element_type(), element::Type_t::f32); + auto c = op::Constant::create(element::f32, Shape{}, {208}); + ASSERT_EQ(c->get_element_type(), element::f32); ASSERT_EQ(c->get_shape(), (Shape{})); } TEST(type_prop, scalar_constant_deduce_bool) { - auto c = op::Constant::create(element::Type_t::boolean, Shape{}, {1}); - ASSERT_EQ(c->get_element_type(), element::Type_t::boolean); + auto c = op::Constant::create(element::boolean, Shape{}, {1}); + ASSERT_EQ(c->get_element_type(), element::boolean); ASSERT_EQ(c->get_shape(), (Shape{})); } TEST(type_prop, tensor_constant_deduce_float32) { - auto c = op::Constant::create(element::Type_t::f32, Shape{2, 2}, {208, 208, 208, 208}); - ASSERT_EQ(c->get_element_type(), element::Type_t::f32); + auto c = op::Constant::create(element::f32, Shape{2, 2}, {208, 208, 208, 208}); + ASSERT_EQ(c->get_element_type(), element::f32); ASSERT_EQ(c->get_shape(), (Shape{2, 2})); } TEST(type_prop, tensor_constant_deduce_bool) { - auto c = op::Constant::create(element::Type_t::boolean, Shape{2, 2}, {1, 1, 1, 1}); - ASSERT_EQ(c->get_element_type(), element::Type_t::boolean); + auto c = op::Constant::create(element::boolean, Shape{2, 2}, {1, 1, 1, 1}); + ASSERT_EQ(c->get_element_type(), element::boolean); ASSERT_EQ(c->get_shape(), (Shape{2, 2})); } @@ -53,7 +53,7 @@ TEST(type_prop, tensor_constant_bad_count) { try { - auto c = op::Constant::create(element::Type_t::boolean, Shape{2, 2}, {1, 1, 1}); + auto c = op::Constant::create(element::boolean, Shape{2, 2}, {1, 1, 1}); // Should have thrown, so fail if it didn't FAIL() << "Incorrect number of literals not detected"; } @@ -71,8 +71,8 @@ TEST(type_prop, tensor_constant_bad_count) TEST(type_prop, constant_zero_elements_one_string) { - auto c = make_shared( - element::Type_t::i64, Shape{2, 0, 2, 2}, std::vector{"42"}); - ASSERT_EQ(c->get_element_type(), element::Type_t::i64); + auto c = + make_shared(element::i64, Shape{2, 0, 2, 2}, std::vector{"42"}); + ASSERT_EQ(c->get_element_type(), element::i64); ASSERT_EQ(c->get_shape(), (Shape{2, 0, 2, 2})); } diff --git a/ngraph/test/type_prop/convert.cpp b/ngraph/test/type_prop/convert.cpp index e3b69a6c93c0ab..c16b0dcab0c194 100644 --- a/ngraph/test/type_prop/convert.cpp +++ b/ngraph/test/type_prop/convert.cpp @@ -24,8 +24,8 @@ using namespace ngraph; TEST(type_prop, convert_deduce) { // Deduce type - auto param = make_shared(element::Type_t::f32, Shape{2, 3, 4}); - auto c = make_shared(param, element::Type_t::i32); - ASSERT_EQ(c->get_element_type(), element::Type_t::i32); + auto param = make_shared(element::f32, Shape{2, 3, 4}); + auto c = make_shared(param, element::i32); + ASSERT_EQ(c->get_element_type(), element::i32); ASSERT_EQ(c->get_shape(), (Shape{2, 3, 4})); } diff --git a/ngraph/test/type_prop/convolution.cpp b/ngraph/test/type_prop/convolution.cpp index 4a1ca667b469f7..b298f0aa4bccbe 100644 --- a/ngraph/test/type_prop/convolution.cpp +++ b/ngraph/test/type_prop/convolution.cpp @@ -25,10 +25,10 @@ using namespace ngraph; TEST(type_prop, conv_1d_deduce) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{64, 3, 100}); - auto param1 = make_shared(element::Type_t::f32, Shape{128, 3, 10}); + auto param0 = make_shared(element::f32, Shape{64, 3, 100}); + auto param1 = make_shared(element::f32, Shape{128, 3, 10}); auto conv = make_shared(param0, param1); - EXPECT_EQ(conv->get_element_type(), element::Type_t::f32); + EXPECT_EQ(conv->get_element_type(), element::f32); EXPECT_EQ(conv->get_shape(), (Shape{64, 128, 91})); EXPECT_EQ(conv->get_window_movement_strides(), Strides{1}); @@ -43,9 +43,8 @@ TEST(type_prop, conv_1d_back_data_batch_deduce) { // Deduce type Shape data_batch_shape{64, 3, 100}; - auto param0 = make_shared(element::Type_t::f32, Shape{128, 3, 10}); // filters - auto param1 = - make_shared(element::Type_t::f32, Shape{64, 128, 91}); // output delta + auto param0 = make_shared(element::f32, Shape{128, 3, 10}); // filters + auto param1 = make_shared(element::f32, Shape{64, 128, 91}); // output delta auto conv = make_shared(data_batch_shape, param0, param1, @@ -54,7 +53,7 @@ TEST(type_prop, conv_1d_back_data_batch_deduce) CoordinateDiff{0}, CoordinateDiff{0}, Strides{1}); - EXPECT_EQ(conv->get_element_type(), element::Type_t::f32); + EXPECT_EQ(conv->get_element_type(), element::f32); EXPECT_EQ(conv->get_shape(), data_batch_shape); EXPECT_EQ(conv->get_window_movement_strides_forward(), Strides{1}); @@ -68,15 +67,15 @@ TEST(type_prop, conv_1d_back_data_batch_deduce) TEST(type_prop, conv_1d_deduce_padded) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{64, 3, 100}); - auto param1 = make_shared(element::Type_t::f32, Shape{128, 3, 10}); + auto param0 = make_shared(element::f32, Shape{64, 3, 100}); + auto param1 = make_shared(element::f32, Shape{128, 3, 10}); auto move_strides = Strides{1}; auto dilation_strides = Strides{1}; auto padding_below = CoordinateDiff{2}; auto padding_above = CoordinateDiff{3}; auto conv = make_shared( param0, param1, move_strides, dilation_strides, padding_below, padding_above); - EXPECT_EQ(conv->get_element_type(), element::Type_t::f32); + EXPECT_EQ(conv->get_element_type(), element::f32); EXPECT_EQ(conv->get_shape(), (Shape{64, 128, 96})); EXPECT_EQ(conv->get_window_movement_strides(), Strides{1}); @@ -91,9 +90,8 @@ TEST(type_prop, conv_1d_back_data_batch_deduce_padded) { // Deduce type Shape data_batch_shape{64, 3, 100}; - auto param0 = make_shared(element::Type_t::f32, Shape{128, 3, 10}); // filters - auto param1 = - make_shared(element::Type_t::f32, Shape{64, 128, 96}); // output delta + auto param0 = make_shared(element::f32, Shape{128, 3, 10}); // filters + auto param1 = make_shared(element::f32, Shape{64, 128, 96}); // output delta auto move_strides = Strides{1}; auto dilation_strides = Strides{1}; auto padding_below = CoordinateDiff{2}; @@ -106,7 +104,7 @@ TEST(type_prop, conv_1d_back_data_batch_deduce_padded) padding_below, padding_above, Strides{1}); - EXPECT_EQ(conv->get_element_type(), element::Type_t::f32); + EXPECT_EQ(conv->get_element_type(), element::f32); EXPECT_EQ(conv->get_shape(), data_batch_shape); EXPECT_EQ(conv->get_window_movement_strides_forward(), Strides{1}); @@ -120,11 +118,11 @@ TEST(type_prop, conv_1d_back_data_batch_deduce_padded) TEST(type_prop, conv_1d_deduce_strided) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{64, 3, 100}); - auto param1 = make_shared(element::Type_t::f32, Shape{128, 3, 10}); + auto param0 = make_shared(element::f32, Shape{64, 3, 100}); + auto param1 = make_shared(element::f32, Shape{128, 3, 10}); auto move_strides = Strides{2}; auto conv = make_shared(param0, param1, move_strides); - EXPECT_EQ(conv->get_element_type(), element::Type_t::f32); + EXPECT_EQ(conv->get_element_type(), element::f32); EXPECT_EQ(conv->get_shape(), (Shape{64, 128, 46})); EXPECT_EQ(conv->get_window_movement_strides(), Strides{2}); @@ -139,9 +137,8 @@ TEST(type_prop, conv_1d_back_data_batch_deduce_strided) { // Deduce type Shape data_batch_shape{64, 3, 100}; - auto param0 = make_shared(element::Type_t::f32, Shape{128, 3, 10}); // filters - auto param1 = - make_shared(element::Type_t::f32, Shape{64, 128, 46}); // output delta + auto param0 = make_shared(element::f32, Shape{128, 3, 10}); // filters + auto param1 = make_shared(element::f32, Shape{64, 128, 46}); // output delta auto move_strides = Strides{2}; auto conv = make_shared(data_batch_shape, param0, @@ -151,7 +148,7 @@ TEST(type_prop, conv_1d_back_data_batch_deduce_strided) CoordinateDiff{0}, CoordinateDiff{0}, Strides{1}); - EXPECT_EQ(conv->get_element_type(), element::Type_t::f32); + EXPECT_EQ(conv->get_element_type(), element::f32); EXPECT_EQ(conv->get_shape(), data_batch_shape); EXPECT_EQ(conv->get_window_movement_strides_forward(), Strides{2}); @@ -165,15 +162,15 @@ TEST(type_prop, conv_1d_back_data_batch_deduce_strided) TEST(type_prop, conv_1d_deduce_strided_padded) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{64, 3, 100}); - auto param1 = make_shared(element::Type_t::f32, Shape{128, 3, 10}); + auto param0 = make_shared(element::f32, Shape{64, 3, 100}); + auto param1 = make_shared(element::f32, Shape{128, 3, 10}); auto move_strides = Strides{2}; auto dilation_strides = Strides{1}; auto padding_below = CoordinateDiff{2}; auto padding_above = CoordinateDiff{3}; auto conv = make_shared( param0, param1, move_strides, dilation_strides, padding_below, padding_above); - EXPECT_EQ(conv->get_element_type(), element::Type_t::f32); + EXPECT_EQ(conv->get_element_type(), element::f32); EXPECT_EQ(conv->get_shape(), (Shape{64, 128, 48})); EXPECT_EQ(conv->get_window_movement_strides(), Strides{2}); @@ -188,9 +185,8 @@ TEST(type_prop, conv_1d_back_data_batch_deduce_strided_padded) { // Deduce type Shape data_batch_shape{64, 3, 100}; - auto param0 = make_shared(element::Type_t::f32, Shape{128, 3, 10}); // filters - auto param1 = - make_shared(element::Type_t::f32, Shape{64, 128, 48}); // output delta + auto param0 = make_shared(element::f32, Shape{128, 3, 10}); // filters + auto param1 = make_shared(element::f32, Shape{64, 128, 48}); // output delta auto move_strides = Strides{2}; auto dilation_strides = Strides{1}; auto padding_below = CoordinateDiff{2}; @@ -203,7 +199,7 @@ TEST(type_prop, conv_1d_back_data_batch_deduce_strided_padded) padding_below, padding_above, Strides{1}); - EXPECT_EQ(conv->get_element_type(), element::Type_t::f32); + EXPECT_EQ(conv->get_element_type(), element::f32); EXPECT_EQ(conv->get_shape(), data_batch_shape); EXPECT_EQ(conv->get_window_movement_strides_forward(), Strides{2}); @@ -217,11 +213,11 @@ TEST(type_prop, conv_1d_back_data_batch_deduce_strided_padded) TEST(type_prop, conv_1d_deduce_strided_small_uneven) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{64, 3, 5}); - auto param1 = make_shared(element::Type_t::f32, Shape{128, 3, 2}); + auto param0 = make_shared(element::f32, Shape{64, 3, 5}); + auto param1 = make_shared(element::f32, Shape{128, 3, 2}); auto move_strides = Strides{2}; auto conv = make_shared(param0, param1, move_strides); - EXPECT_EQ(conv->get_element_type(), element::Type_t::f32); + EXPECT_EQ(conv->get_element_type(), element::f32); EXPECT_EQ(conv->get_shape(), (Shape{64, 128, 2})); EXPECT_EQ(conv->get_window_movement_strides(), Strides{2}); @@ -236,9 +232,8 @@ TEST(type_prop, conv_1d_back_data_batch_deduce_strided_small_uneven) { // Deduce type Shape data_batch_shape{64, 3, 5}; - auto param0 = make_shared(element::Type_t::f32, Shape{128, 3, 2}); // filters - auto param1 = - make_shared(element::Type_t::f32, Shape{64, 128, 2}); // output delta + auto param0 = make_shared(element::f32, Shape{128, 3, 2}); // filters + auto param1 = make_shared(element::f32, Shape{64, 128, 2}); // output delta auto move_strides = Strides{2}; auto conv = make_shared(data_batch_shape, param0, @@ -248,7 +243,7 @@ TEST(type_prop, conv_1d_back_data_batch_deduce_strided_small_uneven) CoordinateDiff{0}, CoordinateDiff{0}, Strides{1}); - EXPECT_EQ(conv->get_element_type(), element::Type_t::f32); + EXPECT_EQ(conv->get_element_type(), element::f32); EXPECT_EQ(conv->get_shape(), data_batch_shape); EXPECT_EQ(conv->get_window_movement_strides_forward(), Strides{2}); @@ -262,11 +257,11 @@ TEST(type_prop, conv_1d_back_data_batch_deduce_strided_small_uneven) TEST(type_prop, conv_1d_deduce_strided_small_even) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{64, 3, 6}); - auto param1 = make_shared(element::Type_t::f32, Shape{128, 3, 2}); + auto param0 = make_shared(element::f32, Shape{64, 3, 6}); + auto param1 = make_shared(element::f32, Shape{128, 3, 2}); auto move_strides = Strides{2}; auto conv = make_shared(param0, param1, move_strides); - EXPECT_EQ(conv->get_element_type(), element::Type_t::f32); + EXPECT_EQ(conv->get_element_type(), element::f32); EXPECT_EQ(conv->get_shape(), (Shape{64, 128, 3})); EXPECT_EQ(conv->get_window_movement_strides(), Strides{2}); @@ -281,9 +276,8 @@ TEST(type_prop, conv_1d_back_data_batch_deduce_strided_small_even) { // Deduce type Shape data_batch_shape{64, 3, 6}; - auto param0 = make_shared(element::Type_t::f32, Shape{128, 3, 2}); // filters - auto param1 = - make_shared(element::Type_t::f32, Shape{64, 128, 3}); // output delta + auto param0 = make_shared(element::f32, Shape{128, 3, 2}); // filters + auto param1 = make_shared(element::f32, Shape{64, 128, 3}); // output delta auto move_strides = Strides{2}; auto conv = make_shared(data_batch_shape, param0, @@ -293,7 +287,7 @@ TEST(type_prop, conv_1d_back_data_batch_deduce_strided_small_even) CoordinateDiff{0}, CoordinateDiff{0}, Strides{1}); - EXPECT_EQ(conv->get_element_type(), element::Type_t::f32); + EXPECT_EQ(conv->get_element_type(), element::f32); EXPECT_EQ(conv->get_shape(), data_batch_shape); EXPECT_EQ(conv->get_window_movement_strides_forward(), Strides{2}); @@ -307,12 +301,12 @@ TEST(type_prop, conv_1d_back_data_batch_deduce_strided_small_even) TEST(type_prop, conv_1d_deduce_window_dilated) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{64, 3, 100}); - auto param1 = make_shared(element::Type_t::f32, Shape{128, 3, 10}); + auto param0 = make_shared(element::f32, Shape{64, 3, 100}); + auto param1 = make_shared(element::f32, Shape{128, 3, 10}); auto move_strides = Strides{1}; auto dilate_strides = Strides{2}; auto conv = make_shared(param0, param1, move_strides, dilate_strides); - EXPECT_EQ(conv->get_element_type(), element::Type_t::f32); + EXPECT_EQ(conv->get_element_type(), element::f32); EXPECT_EQ(conv->get_shape(), (Shape{64, 128, 82})); EXPECT_EQ(conv->get_window_movement_strides(), Strides{1}); @@ -327,9 +321,8 @@ TEST(type_prop, conv_1d_back_data_batch_deduce_window_dilated) { // Deduce type Shape data_batch_shape{64, 3, 100}; - auto param0 = make_shared(element::Type_t::f32, Shape{128, 3, 10}); // filters - auto param1 = - make_shared(element::Type_t::f32, Shape{64, 128, 82}); // output delta + auto param0 = make_shared(element::f32, Shape{128, 3, 10}); // filters + auto param1 = make_shared(element::f32, Shape{64, 128, 82}); // output delta auto move_strides = Strides{1}; auto dilate_strides = Strides{2}; auto conv = make_shared(data_batch_shape, @@ -340,7 +333,7 @@ TEST(type_prop, conv_1d_back_data_batch_deduce_window_dilated) CoordinateDiff{0}, CoordinateDiff{0}, Strides{1}); - EXPECT_EQ(conv->get_element_type(), element::Type_t::f32); + EXPECT_EQ(conv->get_element_type(), element::f32); EXPECT_EQ(conv->get_shape(), data_batch_shape); EXPECT_EQ(conv->get_window_movement_strides_forward(), Strides{1}); @@ -354,15 +347,15 @@ TEST(type_prop, conv_1d_back_data_batch_deduce_window_dilated) TEST(type_prop, conv_1d_deduce_window_dilated_padded) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{64, 3, 100}); - auto param1 = make_shared(element::Type_t::f32, Shape{128, 3, 10}); + auto param0 = make_shared(element::f32, Shape{64, 3, 100}); + auto param1 = make_shared(element::f32, Shape{128, 3, 10}); auto move_strides = Strides{1}; auto dilate_strides = Strides{2}; auto padding_below = CoordinateDiff{2}; auto padding_above = CoordinateDiff{3}; auto conv = make_shared( param0, param1, move_strides, dilate_strides, padding_below, padding_above); - EXPECT_EQ(conv->get_element_type(), element::Type_t::f32); + EXPECT_EQ(conv->get_element_type(), element::f32); EXPECT_EQ(conv->get_shape(), (Shape{64, 128, 87})); EXPECT_EQ(conv->get_window_movement_strides(), Strides{1}); @@ -377,9 +370,8 @@ TEST(type_prop, conv_1d_back_data_batch_deduce_window_dilated_padded) { // Deduce type Shape data_batch_shape{64, 3, 100}; - auto param0 = make_shared(element::Type_t::f32, Shape{128, 3, 10}); // filters - auto param1 = - make_shared(element::Type_t::f32, Shape{64, 128, 87}); // output delta + auto param0 = make_shared(element::f32, Shape{128, 3, 10}); // filters + auto param1 = make_shared(element::f32, Shape{64, 128, 87}); // output delta auto move_strides = Strides{1}; auto dilate_strides = Strides{2}; auto padding_below = CoordinateDiff{2}; @@ -392,7 +384,7 @@ TEST(type_prop, conv_1d_back_data_batch_deduce_window_dilated_padded) padding_below, padding_above, Strides{1}); - EXPECT_EQ(conv->get_element_type(), element::Type_t::f32); + EXPECT_EQ(conv->get_element_type(), element::f32); EXPECT_EQ(conv->get_shape(), data_batch_shape); EXPECT_EQ(conv->get_window_movement_strides_forward(), Strides{1}); @@ -406,8 +398,8 @@ TEST(type_prop, conv_1d_back_data_batch_deduce_window_dilated_padded) TEST(type_prop, conv_1d_deduce_window_dilated_data_dilated_padded) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{64, 3, 100}); - auto param1 = make_shared(element::Type_t::f32, Shape{128, 3, 10}); + auto param0 = make_shared(element::f32, Shape{64, 3, 100}); + auto param1 = make_shared(element::f32, Shape{128, 3, 10}); auto move_strides = Strides{1}; auto dilate_strides = Strides{2}; auto padding_below = CoordinateDiff{2}; @@ -420,7 +412,7 @@ TEST(type_prop, conv_1d_deduce_window_dilated_data_dilated_padded) padding_below, padding_above, data_dilate_strides); - EXPECT_EQ(conv->get_element_type(), element::Type_t::f32); + EXPECT_EQ(conv->get_element_type(), element::f32); EXPECT_EQ(conv->get_shape(), (Shape{64, 128, 285})); EXPECT_EQ(conv->get_window_movement_strides(), Strides{1}); @@ -435,9 +427,8 @@ TEST(type_prop, conv_1d_back_data_batch_deduce_window_dilated_data_dilated_padde { // Deduce type Shape data_batch_shape{64, 3, 100}; - auto param0 = make_shared(element::Type_t::f32, Shape{128, 3, 10}); // filters - auto param1 = - make_shared(element::Type_t::f32, Shape{64, 128, 285}); // output delta + auto param0 = make_shared(element::f32, Shape{128, 3, 10}); // filters + auto param1 = make_shared(element::f32, Shape{64, 128, 285}); // output delta auto move_strides = Strides{1}; auto dilate_strides = Strides{2}; auto padding_below = CoordinateDiff{2}; @@ -451,7 +442,7 @@ TEST(type_prop, conv_1d_back_data_batch_deduce_window_dilated_data_dilated_padde padding_below, padding_above, data_dilate_strides); - EXPECT_EQ(conv->get_element_type(), element::Type_t::f32); + EXPECT_EQ(conv->get_element_type(), element::f32); EXPECT_EQ(conv->get_shape(), data_batch_shape); EXPECT_EQ(conv->get_window_movement_strides_forward(), Strides{1}); @@ -465,10 +456,10 @@ TEST(type_prop, conv_1d_back_data_batch_deduce_window_dilated_data_dilated_padde TEST(type_prop, conv_2d_deduce) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{64, 3, 100, 150}); - auto param1 = make_shared(element::Type_t::f32, Shape{128, 3, 10, 20}); + auto param0 = make_shared(element::f32, Shape{64, 3, 100, 150}); + auto param1 = make_shared(element::f32, Shape{128, 3, 10, 20}); auto conv = make_shared(param0, param1); - EXPECT_EQ(conv->get_element_type(), element::Type_t::f32); + EXPECT_EQ(conv->get_element_type(), element::f32); EXPECT_EQ(conv->get_shape(), (Shape{64, 128, 91, 131})); EXPECT_EQ(conv->get_window_movement_strides(), (Strides{1, 1})); @@ -482,15 +473,15 @@ TEST(type_prop, conv_2d_deduce) TEST(type_prop, conv_2d_deduce_padded) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{64, 3, 100, 150}); - auto param1 = make_shared(element::Type_t::f32, Shape{128, 3, 10, 20}); + auto param0 = make_shared(element::f32, Shape{64, 3, 100, 150}); + auto param1 = make_shared(element::f32, Shape{128, 3, 10, 20}); auto move_strides = Strides{1, 1}; auto dilate_strides = Strides{1, 1}; auto padding_below = CoordinateDiff{2, 3}; auto padding_above = CoordinateDiff{3, 4}; auto conv = make_shared( param0, param1, move_strides, dilate_strides, padding_below, padding_above); - EXPECT_EQ(conv->get_element_type(), element::Type_t::f32); + EXPECT_EQ(conv->get_element_type(), element::f32); EXPECT_EQ(conv->get_shape(), (Shape{64, 128, 96, 138})); EXPECT_EQ(conv->get_window_movement_strides(), (Strides{1, 1})); @@ -504,15 +495,15 @@ TEST(type_prop, conv_2d_deduce_padded) TEST(type_prop, conv_2d_deduce_padded_neg) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{64, 3, 100, 150}); - auto param1 = make_shared(element::Type_t::f32, Shape{128, 3, 10, 20}); + auto param0 = make_shared(element::f32, Shape{64, 3, 100, 150}); + auto param1 = make_shared(element::f32, Shape{128, 3, 10, 20}); auto move_strides = Strides{1, 1}; auto dilate_strides = Strides{1, 1}; auto padding_below = CoordinateDiff{2, -3}; auto padding_above = CoordinateDiff{3, -4}; auto conv = make_shared( param0, param1, move_strides, dilate_strides, padding_below, padding_above); - EXPECT_EQ(conv->get_element_type(), element::Type_t::f32); + EXPECT_EQ(conv->get_element_type(), element::f32); EXPECT_EQ(conv->get_shape(), (Shape{64, 128, 96, 124})); EXPECT_EQ(conv->get_window_movement_strides(), (Strides{1, 1})); @@ -535,8 +526,8 @@ TEST_P(DeduceAutoPadTest, same_lower) image_shape.insert(image_shape.begin(), {1, 1}); // Add {N, C} auto filter_shape = std::get<1>(GetParam()); filter_shape.insert(filter_shape.begin(), {1, 1}); // Add {O, I} - auto param0 = make_shared(element::Type_t::f32, image_shape); - auto param1 = make_shared(element::Type_t::f32, filter_shape); + auto param0 = make_shared(element::f32, image_shape); + auto param1 = make_shared(element::f32, filter_shape); auto conv = make_shared(param0, param1, @@ -598,11 +589,11 @@ INSTANTIATE_TEST_CASE_P(type_prop, TEST(type_prop, conv_2d_deduce_strided) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{64, 3, 100, 150}); - auto param1 = make_shared(element::Type_t::f32, Shape{128, 3, 10, 20}); + auto param0 = make_shared(element::f32, Shape{64, 3, 100, 150}); + auto param1 = make_shared(element::f32, Shape{128, 3, 10, 20}); auto move_strides = Strides{2, 3}; auto conv = make_shared(param0, param1, move_strides); - EXPECT_EQ(conv->get_element_type(), element::Type_t::f32); + EXPECT_EQ(conv->get_element_type(), element::f32); EXPECT_EQ(conv->get_shape(), (Shape{64, 128, 46, 44})); EXPECT_EQ(conv->get_window_movement_strides(), (Strides{2, 3})); @@ -616,12 +607,12 @@ TEST(type_prop, conv_2d_deduce_strided) TEST(type_prop, conv_2d_deduce_strided_window_dilated) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{64, 3, 100, 150}); - auto param1 = make_shared(element::Type_t::f32, Shape{128, 3, 10, 20}); + auto param0 = make_shared(element::f32, Shape{64, 3, 100, 150}); + auto param1 = make_shared(element::f32, Shape{128, 3, 10, 20}); auto move_strides = Strides{2, 3}; auto dilate_strides = Strides{3, 2}; auto conv = make_shared(param0, param1, move_strides, dilate_strides); - EXPECT_EQ(conv->get_element_type(), element::Type_t::f32); + EXPECT_EQ(conv->get_element_type(), element::f32); EXPECT_EQ(conv->get_shape(), (Shape{64, 128, 37, 38})); EXPECT_EQ(conv->get_window_movement_strides(), (Strides{2, 3})); @@ -635,8 +626,8 @@ TEST(type_prop, conv_2d_deduce_strided_window_dilated) TEST(type_prop, conv_2d_deduce_strided_window_dilated_data_dilated) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{64, 3, 100, 150}); - auto param1 = make_shared(element::Type_t::f32, Shape{128, 3, 10, 20}); + auto param0 = make_shared(element::f32, Shape{64, 3, 100, 150}); + auto param1 = make_shared(element::f32, Shape{128, 3, 10, 20}); auto move_strides = Strides{2, 3}; auto dilate_strides = Strides{3, 2}; auto padding_below = CoordinateDiff{0, 0}; @@ -649,7 +640,7 @@ TEST(type_prop, conv_2d_deduce_strided_window_dilated_data_dilated) padding_below, padding_above, data_dilate_strides); - EXPECT_EQ(conv->get_element_type(), element::Type_t::f32); + EXPECT_EQ(conv->get_element_type(), element::f32); EXPECT_EQ(conv->get_shape(), (Shape{64, 128, 86, 137})); EXPECT_EQ(conv->get_window_movement_strides(), (Strides{2, 3})); @@ -663,12 +654,12 @@ TEST(type_prop, conv_2d_deduce_strided_window_dilated_data_dilated) TEST(type_prop, conv_2d_deduce_strided_window_dilated_small) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{64, 3, 7, 8}); - auto param1 = make_shared(element::Type_t::f32, Shape{128, 3, 2, 3}); + auto param0 = make_shared(element::f32, Shape{64, 3, 7, 8}); + auto param1 = make_shared(element::f32, Shape{128, 3, 2, 3}); auto move_strides = Strides{2, 3}; auto dilate_strides = Strides{3, 2}; auto conv = make_shared(param0, param1, move_strides, dilate_strides); - EXPECT_EQ(conv->get_element_type(), element::Type_t::f32); + EXPECT_EQ(conv->get_element_type(), element::f32); EXPECT_EQ(conv->get_shape(), (Shape{64, 128, 2, 2})); EXPECT_EQ(conv->get_window_movement_strides(), (Strides{2, 3})); @@ -682,12 +673,12 @@ TEST(type_prop, conv_2d_deduce_strided_window_dilated_small) TEST(type_prop, conv_3d_deduce_strided_window_dilated_small) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{64, 3, 7, 8, 10}); - auto param1 = make_shared(element::Type_t::f32, Shape{128, 3, 2, 3, 2}); + auto param0 = make_shared(element::f32, Shape{64, 3, 7, 8, 10}); + auto param1 = make_shared(element::f32, Shape{128, 3, 2, 3, 2}); auto move_strides = Strides{2, 3, 4}; auto dilate_strides = Strides{3, 2, 2}; auto conv = make_shared(param0, param1, move_strides, dilate_strides); - EXPECT_EQ(conv->get_element_type(), element::Type_t::f32); + EXPECT_EQ(conv->get_element_type(), element::f32); EXPECT_EQ(conv->get_shape(), (Shape{64, 128, 2, 2, 2})); EXPECT_EQ(conv->get_window_movement_strides(), (Strides{2, 3, 4})); @@ -701,8 +692,8 @@ TEST(type_prop, conv_3d_deduce_strided_window_dilated_small) TEST(type_prop, conv_3d_deduce_strided_window_dilated_data_dilated_small) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{64, 3, 7, 8, 10}); - auto param1 = make_shared(element::Type_t::f32, Shape{128, 3, 2, 3, 2}); + auto param0 = make_shared(element::f32, Shape{64, 3, 7, 8, 10}); + auto param1 = make_shared(element::f32, Shape{128, 3, 2, 3, 2}); auto move_strides = Strides{2, 3, 4}; auto dilate_strides = Strides{3, 2, 2}; auto padding_below = CoordinateDiff{0, 0, 0}; @@ -715,7 +706,7 @@ TEST(type_prop, conv_3d_deduce_strided_window_dilated_data_dilated_small) padding_below, padding_above, data_dilate_strides); - EXPECT_EQ(conv->get_element_type(), element::Type_t::f32); + EXPECT_EQ(conv->get_element_type(), element::f32); EXPECT_EQ(conv->get_shape(), (Shape{64, 128, 5, 6, 5})); EXPECT_EQ(conv->get_window_movement_strides(), (Strides{2, 3, 4})); @@ -729,8 +720,8 @@ TEST(type_prop, conv_3d_deduce_strided_window_dilated_data_dilated_small) TEST(type_prop, conv_invalid_element_type_mismatch) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{3, 3, 3, 3}); - auto param1 = make_shared(element::Type_t::i32, Shape{3, 3, 2, 2}); + auto param0 = make_shared(element::f32, Shape{3, 3, 3, 3}); + auto param1 = make_shared(element::i32, Shape{3, 3, 2, 2}); try { auto conv = make_shared(param0, param1); @@ -752,8 +743,8 @@ TEST(type_prop, conv_invalid_element_type_mismatch) TEST(type_prop, conv_invalid_0d_input) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{}); - auto param1 = make_shared(element::Type_t::f32, Shape{}); + auto param0 = make_shared(element::f32, Shape{}); + auto param1 = make_shared(element::f32, Shape{}); try { auto conv = make_shared(param0, param1); @@ -777,8 +768,8 @@ TEST(type_prop, conv_invalid_0d_input) TEST(type_prop, conv_invalid_1d_input) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{2}); - auto param1 = make_shared(element::Type_t::f32, Shape{2}); + auto param0 = make_shared(element::f32, Shape{2}); + auto param1 = make_shared(element::f32, Shape{2}); try { auto conv = make_shared(param0, param1); @@ -802,8 +793,8 @@ TEST(type_prop, conv_invalid_1d_input) TEST(type_prop, conv_invalid_2d_input) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{2, 6}); - auto param1 = make_shared(element::Type_t::f32, Shape{2, 6}); + auto param0 = make_shared(element::f32, Shape{2, 6}); + auto param1 = make_shared(element::f32, Shape{2, 6}); try { auto conv = make_shared(param0, param1); @@ -827,8 +818,8 @@ TEST(type_prop, conv_invalid_2d_input) TEST(type_prop, conv_invalid_0_batch_size) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{0, 6, 1}); - auto param1 = make_shared(element::Type_t::f32, Shape{0, 6, 1}); + auto param0 = make_shared(element::f32, Shape{0, 6, 1}); + auto param1 = make_shared(element::f32, Shape{0, 6, 1}); try { auto conv = make_shared(param0, param1); @@ -849,8 +840,8 @@ TEST(type_prop, conv_invalid_0_batch_size) TEST(type_prop, conv_invalid_0_input_channels) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{6, 0, 1}); - auto param1 = make_shared(element::Type_t::f32, Shape{5, 0, 1}); + auto param0 = make_shared(element::f32, Shape{6, 0, 1}); + auto param1 = make_shared(element::f32, Shape{5, 0, 1}); try { auto conv = make_shared(param0, param1); @@ -873,8 +864,8 @@ TEST(type_prop, conv_invalid_0_input_channels) TEST(type_prop, conv_invalid_wrong_number_of_filter_dimensions_too_many) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{6, 2, 10, 10}); - auto param1 = make_shared(element::Type_t::f32, Shape{5, 2, 3, 3, 3}); + auto param0 = make_shared(element::f32, Shape{6, 2, 10, 10}); + auto param1 = make_shared(element::f32, Shape{5, 2, 3, 3, 3}); try { auto conv = make_shared(param0, param1); @@ -895,8 +886,8 @@ TEST(type_prop, conv_invalid_wrong_number_of_filter_dimensions_too_many) TEST(type_prop, conv_invalid_wrong_number_of_filter_dimensions_too_few) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{6, 2, 10, 10}); - auto param1 = make_shared(element::Type_t::f32, Shape{5, 2, 3}); + auto param0 = make_shared(element::f32, Shape{6, 2, 10, 10}); + auto param1 = make_shared(element::f32, Shape{5, 2, 3}); try { auto conv = make_shared(param0, param1); @@ -917,8 +908,8 @@ TEST(type_prop, conv_invalid_wrong_number_of_filter_dimensions_too_few) TEST(type_prop, conv_invalid_0_output_channels) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{6, 2, 10, 10}); - auto param1 = make_shared(element::Type_t::f32, Shape{0, 2, 3, 3}); + auto param0 = make_shared(element::f32, Shape{6, 2, 10, 10}); + auto param1 = make_shared(element::f32, Shape{0, 2, 3, 3}); try { auto conv = make_shared(param0, param1); @@ -939,8 +930,8 @@ TEST(type_prop, conv_invalid_0_output_channels) TEST(type_prop, conv_invalid_input_channel_mismatch) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{6, 2, 10, 10}); - auto param1 = make_shared(element::Type_t::f32, Shape{6, 3, 3, 3}); + auto param0 = make_shared(element::f32, Shape{6, 2, 10, 10}); + auto param1 = make_shared(element::f32, Shape{6, 3, 3, 3}); try { auto conv = make_shared(param0, param1); @@ -964,8 +955,8 @@ TEST(type_prop, conv_invalid_input_channel_mismatch) TEST(type_prop, conv_invalid_movement_stride_rank) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{6, 2, 10, 10}); - auto param1 = make_shared(element::Type_t::f32, Shape{6, 2, 3, 3}); + auto param0 = make_shared(element::f32, Shape{6, 2, 10, 10}); + auto param1 = make_shared(element::f32, Shape{6, 2, 3, 3}); try { auto conv = make_shared(param0, param1, Strides{2, 3, 8}); @@ -993,8 +984,8 @@ TEST(type_prop, conv_invalid_movement_stride_rank) TEST(type_prop, conv_invalid_window_dilation_stride_rank) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{6, 2, 10, 10}); - auto param1 = make_shared(element::Type_t::f32, Shape{6, 2, 3, 3}); + auto param0 = make_shared(element::f32, Shape{6, 2, 10, 10}); + auto param1 = make_shared(element::f32, Shape{6, 2, 3, 3}); try { auto conv = @@ -1023,8 +1014,8 @@ TEST(type_prop, conv_invalid_window_dilation_stride_rank) TEST(type_prop, conv_invalid_data_dilation_stride_rank) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{6, 2, 10, 10}); - auto param1 = make_shared(element::Type_t::f32, Shape{6, 2, 3, 3}); + auto param0 = make_shared(element::f32, Shape{6, 2, 10, 10}); + auto param1 = make_shared(element::f32, Shape{6, 2, 3, 3}); try { auto conv = make_shared(param0, @@ -1058,8 +1049,8 @@ TEST(type_prop, conv_invalid_data_dilation_stride_rank) TEST(type_prop, conv_invalid_padding_below_rank) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{6, 2, 10, 10}); - auto param1 = make_shared(element::Type_t::f32, Shape{6, 2, 3, 3}); + auto param0 = make_shared(element::f32, Shape{6, 2, 10, 10}); + auto param1 = make_shared(element::f32, Shape{6, 2, 3, 3}); try { auto conv = make_shared(param0, @@ -1092,8 +1083,8 @@ TEST(type_prop, conv_invalid_padding_below_rank) TEST(type_prop, conv_invalid_padding_above_rank) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{6, 2, 10, 10}); - auto param1 = make_shared(element::Type_t::f32, Shape{6, 2, 3, 3}); + auto param0 = make_shared(element::f32, Shape{6, 2, 10, 10}); + auto param1 = make_shared(element::f32, Shape{6, 2, 3, 3}); try { auto conv = make_shared(param0, @@ -1126,8 +1117,8 @@ TEST(type_prop, conv_invalid_padding_above_rank) TEST(type_prop, conv_invalid_input_spatial_size_negative_after_padding) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{6, 2, 10, 10}); - auto param1 = make_shared(element::Type_t::f32, Shape{6, 2, 3, 3}); + auto param0 = make_shared(element::f32, Shape{6, 2, 10, 10}); + auto param1 = make_shared(element::f32, Shape{6, 2, 3, 3}); try { auto conv = make_shared(param0, @@ -1155,8 +1146,8 @@ TEST(type_prop, conv_invalid_input_spatial_size_negative_after_padding) TEST(type_prop, conv_invalid_input_spatial_size_zero_after_padding) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{6, 2, 10, 10}); - auto param1 = make_shared(element::Type_t::f32, Shape{6, 2, 3, 3}); + auto param0 = make_shared(element::f32, Shape{6, 2, 10, 10}); + auto param1 = make_shared(element::f32, Shape{6, 2, 3, 3}); try { auto conv = make_shared(param0, @@ -1184,8 +1175,8 @@ TEST(type_prop, conv_invalid_input_spatial_size_zero_after_padding) TEST(type_prop, conv_invalid_input_spatial_size_0) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{6, 2, 0, 10}); - auto param1 = make_shared(element::Type_t::f32, Shape{6, 2, 3, 3}); + auto param0 = make_shared(element::f32, Shape{6, 2, 0, 10}); + auto param1 = make_shared(element::f32, Shape{6, 2, 3, 3}); try { auto conv = make_shared(param0, param1); @@ -1208,8 +1199,8 @@ TEST(type_prop, conv_invalid_input_spatial_size_0) TEST(type_prop, conv_invalid_window_size_0) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{6, 2, 10, 10}); - auto param1 = make_shared(element::Type_t::f32, Shape{6, 2, 3, 0}); + auto param0 = make_shared(element::f32, Shape{6, 2, 10, 10}); + auto param1 = make_shared(element::f32, Shape{6, 2, 3, 0}); try { auto conv = make_shared(param0, param1); @@ -1232,8 +1223,8 @@ TEST(type_prop, conv_invalid_window_size_0) TEST(type_prop, conv_invalid_window_dilation_stride_0) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{6, 2, 10, 10}); - auto param1 = make_shared(element::Type_t::f32, Shape{6, 2, 3, 3}); + auto param0 = make_shared(element::f32, Shape{6, 2, 10, 10}); + auto param1 = make_shared(element::f32, Shape{6, 2, 3, 3}); try { auto conv = make_shared(param0, param1, Strides{2, 3}, Strides{2, 0}); @@ -1256,8 +1247,8 @@ TEST(type_prop, conv_invalid_window_dilation_stride_0) TEST(type_prop, conv_invalid_data_dilation_stride_0) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{6, 2, 10, 10}); - auto param1 = make_shared(element::Type_t::f32, Shape{6, 2, 3, 3}); + auto param0 = make_shared(element::f32, Shape{6, 2, 10, 10}); + auto param1 = make_shared(element::f32, Shape{6, 2, 3, 3}); try { auto conv = make_shared(param0, @@ -1286,8 +1277,8 @@ TEST(type_prop, conv_invalid_data_dilation_stride_0) TEST(type_prop, conv_invalid_dilated_window_too_large) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{6, 2, 8, 8}); - auto param1 = make_shared(element::Type_t::f32, Shape{6, 2, 3, 3}); + auto param0 = make_shared(element::f32, Shape{6, 2, 8, 8}); + auto param1 = make_shared(element::f32, Shape{6, 2, 3, 3}); try { auto conv = make_shared(param0, param1, Strides{1, 1}, Strides{4, 4}); @@ -1310,8 +1301,8 @@ TEST(type_prop, conv_invalid_dilated_window_too_large) TEST(type_prop, conv_invalid_movement_stride_0) { // Deduce type - auto param0 = make_shared(element::Type_t::f32, Shape{6, 2, 10, 10}); - auto param1 = make_shared(element::Type_t::f32, Shape{6, 2, 3, 3}); + auto param0 = make_shared(element::f32, Shape{6, 2, 10, 10}); + auto param1 = make_shared(element::f32, Shape{6, 2, 3, 3}); try { auto conv = make_shared(param0, param1, Strides{0, 1}); @@ -1341,8 +1332,8 @@ TEST(type_prop, conv_partial_rank_dynamic_rank_dynamic_ok) CoordinateDiff padding_above{0, 0}; Strides data_dilation_strides{1, 1}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, filters_shape); auto conv = make_shared(param0, param1, @@ -1352,7 +1343,7 @@ TEST(type_prop, conv_partial_rank_dynamic_rank_dynamic_ok) padding_above, data_dilation_strides); - ASSERT_EQ(conv->get_output_element_type(0), element::Type_t::f32); + ASSERT_EQ(conv->get_output_element_type(0), element::f32); ASSERT_TRUE(conv->get_output_partial_shape(0).same_scheme(PartialShape::dynamic(4))); } @@ -1366,8 +1357,8 @@ TEST(type_prop, conv_partial_rank_dynamic_rank_dynamic_window_strides_rank_wrong CoordinateDiff padding_above{0, 0}; Strides data_dilation_strides{1, 1}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, filters_shape); try { @@ -1407,8 +1398,8 @@ TEST(type_prop, conv_partial_rank_dynamic_rank_dynamic_window_strides_dim_zero) CoordinateDiff padding_above{0, 0}; Strides data_dilation_strides{1, 1}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, filters_shape); try { @@ -1444,8 +1435,8 @@ TEST(type_prop, conv_partial_rank_dynamic_rank_dynamic_window_dilation_rank_wron CoordinateDiff padding_above{0, 0}; Strides data_dilation_strides{1, 1}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, filters_shape); try { @@ -1485,8 +1476,8 @@ TEST(type_prop, conv_partial_rank_dynamic_rank_dynamic_window_dilation_dim_zero) CoordinateDiff padding_above{0, 0}; Strides data_dilation_strides{1, 1}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, filters_shape); try { @@ -1522,8 +1513,8 @@ TEST(type_prop, conv_partial_rank_dynamic_rank_dynamic_padding_below_rank_wrong) CoordinateDiff padding_above{0, 0}; Strides data_dilation_strides{1, 1}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, filters_shape); try { @@ -1563,8 +1554,8 @@ TEST(type_prop, conv_partial_rank_dynamic_rank_dynamic_padding_above_rank_wrong) CoordinateDiff padding_above{0, 0, 0}; Strides data_dilation_strides{1, 1}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, filters_shape); try { @@ -1604,8 +1595,8 @@ TEST(type_prop, conv_partial_rank_dynamic_rank_dynamic_data_dilation_rank_wrong) CoordinateDiff padding_above{0, 0}; Strides data_dilation_strides{1, 1, 1}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, filters_shape); try { @@ -1645,8 +1636,8 @@ TEST(type_prop, conv_partial_rank_dynamic_rank_dynamic_data_dilation_dim_zero) CoordinateDiff padding_above{0, 0}; Strides data_dilation_strides{1, 0}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, filters_shape); try { @@ -1682,8 +1673,8 @@ TEST(type_prop, conv_partial_rank_static_dynamic_rank_dynamic_ok) CoordinateDiff padding_above{0, 0}; Strides data_dilation_strides{1, 1}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, filters_shape); auto conv = make_shared(param0, param1, @@ -1693,7 +1684,7 @@ TEST(type_prop, conv_partial_rank_static_dynamic_rank_dynamic_ok) padding_above, data_dilation_strides); - ASSERT_EQ(conv->get_output_element_type(0), element::Type_t::f32); + ASSERT_EQ(conv->get_output_element_type(0), element::f32); ASSERT_TRUE(conv->get_output_partial_shape(0).same_scheme(PartialShape::dynamic(4))); } @@ -1707,8 +1698,8 @@ TEST(type_prop, conv_partial_rank_static_dynamic_rank_dynamic_data_batch_rank_wr CoordinateDiff padding_above{0, 0}; Strides data_dilation_strides{1, 1}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, filters_shape); try { @@ -1750,8 +1741,8 @@ TEST(type_prop, conv_partial_rank_static_dynamic_rank_dynamic_batch_size_known_o CoordinateDiff padding_above{0, 0}; Strides data_dilation_strides{1, 1}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, filters_shape); auto conv = make_shared(param0, param1, @@ -1761,7 +1752,7 @@ TEST(type_prop, conv_partial_rank_static_dynamic_rank_dynamic_batch_size_known_o padding_above, data_dilation_strides); - ASSERT_EQ(conv->get_output_element_type(0), element::Type_t::f32); + ASSERT_EQ(conv->get_output_element_type(0), element::f32); ASSERT_TRUE(conv->get_output_partial_shape(0).same_scheme( PartialShape{64, Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic()})); } @@ -1777,8 +1768,8 @@ TEST(type_prop, conv_partial_rank_static_dynamic_rank_dynamic_batch_size_known_z CoordinateDiff padding_above{0, 0}; Strides data_dilation_strides{1, 1}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, filters_shape); try { @@ -1813,8 +1804,8 @@ TEST(type_prop, conv_partial_rank_static_dynamic_rank_dynamic_input_channel_coun CoordinateDiff padding_above{0, 0}; Strides data_dilation_strides{1, 1}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, filters_shape); auto conv = make_shared(param0, param1, @@ -1824,7 +1815,7 @@ TEST(type_prop, conv_partial_rank_static_dynamic_rank_dynamic_input_channel_coun padding_above, data_dilation_strides); - ASSERT_EQ(conv->get_output_element_type(0), element::Type_t::f32); + ASSERT_EQ(conv->get_output_element_type(0), element::f32); ASSERT_TRUE(conv->get_output_partial_shape(0).same_scheme(PartialShape::dynamic(4))); } @@ -1839,8 +1830,8 @@ TEST(type_prop, conv_partial_rank_static_dynamic_rank_dynamic_input_channel_coun CoordinateDiff padding_above{0, 0}; Strides data_dilation_strides{1, 1}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, filters_shape); try { @@ -1877,8 +1868,8 @@ TEST(type_prop, conv_partial_rank_dynamic_rank_static_dynamic_output_channel_cou CoordinateDiff padding_above{0, 0}; Strides data_dilation_strides{1, 1}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, filters_shape); auto conv = make_shared(param0, param1, @@ -1888,7 +1879,7 @@ TEST(type_prop, conv_partial_rank_dynamic_rank_static_dynamic_output_channel_cou padding_above, data_dilation_strides); - ASSERT_EQ(conv->get_output_element_type(0), element::Type_t::f32); + ASSERT_EQ(conv->get_output_element_type(0), element::f32); ASSERT_TRUE(conv->get_output_partial_shape(0).same_scheme( PartialShape{Dimension::dynamic(), 32, Dimension::dynamic(), Dimension::dynamic()})); } @@ -1903,8 +1894,8 @@ TEST(type_prop, conv_partial_rank_dynamic_rank_static_dynamic_output_channel_cou CoordinateDiff padding_above{0, 0}; Strides data_dilation_strides{1, 1}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, filters_shape); try { @@ -1938,8 +1929,8 @@ TEST(type_prop, conv_partial_rank_dynamic_rank_static_dynamic_input_channel_coun CoordinateDiff padding_above{0, 0}; Strides data_dilation_strides{1, 1}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, filters_shape); auto conv = make_shared(param0, param1, @@ -1949,7 +1940,7 @@ TEST(type_prop, conv_partial_rank_dynamic_rank_static_dynamic_input_channel_coun padding_above, data_dilation_strides); - ASSERT_EQ(conv->get_output_element_type(0), element::Type_t::f32); + ASSERT_EQ(conv->get_output_element_type(0), element::f32); ASSERT_TRUE(conv->get_output_partial_shape(0).same_scheme(PartialShape::dynamic(4))); } @@ -1963,8 +1954,8 @@ TEST(type_prop, conv_partial_rank_dynamic_rank_static_dynamic_input_channel_coun CoordinateDiff padding_above{0, 0}; Strides data_dilation_strides{1, 1}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, filters_shape); try { @@ -2000,8 +1991,8 @@ TEST(type_prop, conv_partial_rank_static_dynamic_rank_static_dynamic_ok) CoordinateDiff padding_above{0, 0}; Strides data_dilation_strides{1, 1}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, filters_shape); auto conv = make_shared(param0, param1, @@ -2011,7 +2002,7 @@ TEST(type_prop, conv_partial_rank_static_dynamic_rank_static_dynamic_ok) padding_above, data_dilation_strides); - ASSERT_EQ(conv->get_output_element_type(0), element::Type_t::f32); + ASSERT_EQ(conv->get_output_element_type(0), element::f32); ASSERT_TRUE(conv->get_output_partial_shape(0).same_scheme(PartialShape::dynamic(4))); } @@ -2025,8 +2016,8 @@ TEST(type_prop, conv_partial_rank_static_dynamic_rank_static_dynamic_arg_ranks_m CoordinateDiff padding_above{0, 0}; Strides data_dilation_strides{1, 1}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, filters_shape); try { @@ -2063,8 +2054,8 @@ TEST(type_prop, conv_partial_rank_static_dynamic_rank_static_dynamic_input_chann CoordinateDiff padding_above{0, 0}; Strides data_dilation_strides{1, 1}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, filters_shape); auto conv = make_shared(param0, param1, @@ -2074,7 +2065,7 @@ TEST(type_prop, conv_partial_rank_static_dynamic_rank_static_dynamic_input_chann padding_above, data_dilation_strides); - ASSERT_EQ(conv->get_output_element_type(0), element::Type_t::f32); + ASSERT_EQ(conv->get_output_element_type(0), element::f32); ASSERT_TRUE(conv->get_output_partial_shape(0).same_scheme(PartialShape::dynamic(4))); } @@ -2090,8 +2081,8 @@ TEST(type_prop, conv_partial_rank_static_dynamic_rank_static_dynamic_input_chann CoordinateDiff padding_above{0, 0}; Strides data_dilation_strides{1, 1}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, filters_shape); try { @@ -2128,8 +2119,8 @@ TEST(type_prop, conv_partial_rank_static_dynamic_rank_static_dynamic_all_nonspat CoordinateDiff padding_above{0, 0}; Strides data_dilation_strides{1, 1}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, filters_shape); auto conv = make_shared(param0, param1, @@ -2139,7 +2130,7 @@ TEST(type_prop, conv_partial_rank_static_dynamic_rank_static_dynamic_all_nonspat padding_above, data_dilation_strides); - ASSERT_EQ(conv->get_output_element_type(0), element::Type_t::f32); + ASSERT_EQ(conv->get_output_element_type(0), element::f32); ASSERT_TRUE(conv->get_output_partial_shape(0).same_scheme( PartialShape{64, 100, Dimension::dynamic(), Dimension::dynamic()})); } @@ -2155,8 +2146,8 @@ TEST(type_prop, CoordinateDiff padding_above{0, 0}; Strides data_dilation_strides{1, 1}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, filters_shape); auto conv = make_shared(param0, param1, @@ -2166,7 +2157,7 @@ TEST(type_prop, padding_above, data_dilation_strides); - ASSERT_EQ(conv->get_output_element_type(0), element::Type_t::f32); + ASSERT_EQ(conv->get_output_element_type(0), element::f32); ASSERT_TRUE(conv->get_output_partial_shape(0).same_scheme( PartialShape{64, 100, 196, Dimension::dynamic()})); } @@ -2183,8 +2174,8 @@ TEST( CoordinateDiff padding_above{0, 0}; Strides data_dilation_strides{1, 1}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, filters_shape); try { @@ -2222,8 +2213,8 @@ TEST( CoordinateDiff padding_above{-1, 0}; Strides data_dilation_strides{1, 1}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, filters_shape); auto conv = make_shared(param0, param1, @@ -2233,7 +2224,7 @@ TEST( padding_above, data_dilation_strides); - ASSERT_EQ(conv->get_output_element_type(0), element::Type_t::f32); + ASSERT_EQ(conv->get_output_element_type(0), element::f32); ASSERT_TRUE(conv->get_output_partial_shape(0).same_scheme( PartialShape{64, 100, 1, Dimension::dynamic()})); } @@ -2250,8 +2241,8 @@ TEST( CoordinateDiff padding_above{0, 0}; Strides data_dilation_strides{2, 1}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, filters_shape); auto conv = make_shared(param0, param1, @@ -2261,7 +2252,7 @@ TEST( padding_above, data_dilation_strides); - ASSERT_EQ(conv->get_output_element_type(0), element::Type_t::f32); + ASSERT_EQ(conv->get_output_element_type(0), element::f32); ASSERT_TRUE(conv->get_output_partial_shape(0).same_scheme( PartialShape{64, 100, 199, Dimension::dynamic()})); } @@ -2278,8 +2269,8 @@ TEST( CoordinateDiff padding_above{0, 0}; Strides data_dilation_strides{2, 1}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, filters_shape); auto conv = make_shared(param0, param1, @@ -2289,7 +2280,7 @@ TEST( padding_above, data_dilation_strides); - ASSERT_EQ(conv->get_output_element_type(0), element::Type_t::f32); + ASSERT_EQ(conv->get_output_element_type(0), element::f32); ASSERT_TRUE(conv->get_output_partial_shape(0).same_scheme( PartialShape{64, 100, 67, Dimension::dynamic()})); } @@ -2306,8 +2297,8 @@ TEST( CoordinateDiff padding_above{0, 0}; Strides data_dilation_strides{1, 1}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, filters_shape); try { @@ -2345,8 +2336,8 @@ TEST( CoordinateDiff padding_above{0, 0}; Strides data_dilation_strides{1, 1}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, filters_shape); try { @@ -2384,8 +2375,8 @@ TEST( CoordinateDiff padding_above{0, -1}; Strides data_dilation_strides{1, 1}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, filters_shape); auto conv = make_shared(param0, param1, @@ -2395,7 +2386,7 @@ TEST( padding_above, data_dilation_strides); - ASSERT_EQ(conv->get_output_element_type(0), element::Type_t::f32); + ASSERT_EQ(conv->get_output_element_type(0), element::f32); ASSERT_TRUE(conv->get_output_partial_shape(0).same_scheme( PartialShape{64, 100, 196, Dimension::dynamic()})); } @@ -2412,8 +2403,8 @@ TEST( CoordinateDiff padding_above{0, -20}; Strides data_dilation_strides{1, 1}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, filters_shape); try { @@ -2451,8 +2442,8 @@ TEST( CoordinateDiff padding_above{0, -20}; Strides data_dilation_strides{1, 1}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, filters_shape); try { @@ -2490,8 +2481,8 @@ TEST(type_prop, conv_partial_dynamic_et) CoordinateDiff padding_above{-1, 0}; Strides data_dilation_strides{1, 1}; - auto param0 = make_shared(element::Type_t::dynamic, data_batch_shape); - auto param1 = make_shared(element::Type_t::dynamic, filters_shape); + auto param0 = make_shared(element::dynamic, data_batch_shape); + auto param1 = make_shared(element::dynamic, filters_shape); auto conv = make_shared(param0, param1, @@ -2509,11 +2500,11 @@ TEST(type_prop, conv_partial_dynamic_et) TEST(type_prop, conv_bprop_data_v1_output_partial_shape_dynamic) { Shape shape_filter{6, 3, 3, 3}; - auto filters = make_shared(element::Type_t::f32, shape_filter); + auto filters = make_shared(element::f32, shape_filter); Shape shape_delta{2, 6, 3, 3}; - auto deltas = make_shared(element::Type_t::f32, shape_delta); + auto deltas = make_shared(element::f32, shape_delta); Shape shape_data_batch_shape{2, 3, 5, 5}; - auto data_batch_shape = make_shared(element::Type_t::i64, Shape{2, 3, 5, 5}); + auto data_batch_shape = make_shared(element::i64, Shape{2, 3, 5, 5}); auto strides = Strides{1, 1}; auto dilations = Strides{1, 1}; auto padding_begin = CoordinateDiff{0, 0}; @@ -2528,9 +2519,9 @@ TEST(type_prop, conv_bprop_data_v1_output_partial_shape_dynamic) TEST(type_prop, conv_bprop_data_v1_output_partial_shape_dynamic_static_rank) { PartialShape shape_filter{20, 10, 3, 3}; - auto filters = make_shared(element::Type_t::f32, shape_filter); + auto filters = make_shared(element::f32, shape_filter); PartialShape shape_delta{Dimension(), 20, 224, 224}; - auto deltas = make_shared(element::Type_t::f32, shape_delta); + auto deltas = make_shared(element::f32, shape_delta); auto strides = Strides{2, 2}; auto dilations = Strides{1, 1}; auto padding_begin = CoordinateDiff{1, 1}; @@ -2555,8 +2546,8 @@ TEST(type_prop, conv_v1_partial_rank) CoordinateDiff padding_below{0, 0}; CoordinateDiff padding_above{0, 0}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, filters_shape); auto conv = make_shared(param0, param1, @@ -2578,8 +2569,8 @@ TEST(type_prop, conv_v1_partial_auto_padding_same) Strides dilations{1, 1}; const auto auto_pad = op::PadType::SAME_LOWER; - auto data_batch = make_shared(element::Type_t::f32, data_batch_shape); - auto filters = make_shared(element::Type_t::f32, filters_shape); + auto data_batch = make_shared(element::f32, data_batch_shape); + auto filters = make_shared(element::f32, filters_shape); auto conv = make_shared( data_batch, filters, strides, pads_begin, pads_end, dilations, auto_pad); @@ -2599,8 +2590,8 @@ TEST(type_prop, conv_v1_partial_auto_padding_same_nc_dims_dynamic_same_lower) Strides dilations{1, 1}; const auto auto_pad = op::PadType::SAME_LOWER; - auto data_batch = make_shared(element::Type_t::f32, data_batch_shape); - auto filters = make_shared(element::Type_t::f32, filters_shape); + auto data_batch = make_shared(element::f32, data_batch_shape); + auto filters = make_shared(element::f32, filters_shape); auto conv = make_shared( data_batch, filters, strides, pads_begin, pads_end, dilations, auto_pad); @@ -2620,8 +2611,8 @@ TEST(type_prop, conv_v1_partial_auto_padding_same_nc_dims_dynamic_same_upper) Strides dilations{1, 1}; const auto auto_pad = op::PadType::SAME_UPPER; - auto data_batch = make_shared(element::Type_t::f32, data_batch_shape); - auto filters = make_shared(element::Type_t::f32, filters_shape); + auto data_batch = make_shared(element::f32, data_batch_shape); + auto filters = make_shared(element::f32, filters_shape); auto conv = make_shared( data_batch, filters, strides, pads_begin, pads_end, dilations, auto_pad); @@ -2641,8 +2632,8 @@ TEST(type_prop, conv_v1_partial_auto_padding_same_spatial_dims_dynamic) Strides dilations{1, 1}; const auto auto_pad = op::PadType::SAME_LOWER; - auto data_batch = make_shared(element::Type_t::f32, data_batch_shape); - auto filters = make_shared(element::Type_t::f32, filters_shape); + auto data_batch = make_shared(element::f32, data_batch_shape); + auto filters = make_shared(element::f32, filters_shape); auto conv = make_shared( data_batch, filters, strides, pads_begin, pads_end, dilations, auto_pad); @@ -2663,8 +2654,8 @@ TEST(type_prop, conv_v1_partial_data_shape_dynamic) Strides dilations{1, 1}; const auto auto_pad = op::PadType::SAME_LOWER; - auto data_batch = make_shared(element::Type_t::f32, data_batch_shape); - auto filters = make_shared(element::Type_t::f32, filters_shape); + auto data_batch = make_shared(element::f32, data_batch_shape); + auto filters = make_shared(element::f32, filters_shape); auto conv = make_shared( data_batch, filters, strides, pads_begin, pads_end, dilations, auto_pad); @@ -2685,10 +2676,10 @@ TEST(type_prop, conv_bprop_v1_partial_auto_padding_upper) Strides dilations{1, 1}; const auto auto_pad = op::PadType::SAME_UPPER; - auto in1 = make_shared(element::Type_t::f32, shape1); - auto in2 = make_shared(element::Type_t::f32, shape2); + auto in1 = make_shared(element::f32, shape1); + auto in2 = make_shared(element::f32, shape2); std::vector data = {1, 74}; - element::Type type = element::Type_t::i64; + element::Type type = element::i64; auto in3 = make_shared(type, shape3, data); auto conv = make_shared( @@ -2710,10 +2701,10 @@ TEST(type_prop, conv_bprop_v1_partial_auto_padding_lower) Strides dilations{1, 1}; const auto auto_pad = op::PadType::SAME_LOWER; - auto in1 = make_shared(element::Type_t::f32, shape1); - auto in2 = make_shared(element::Type_t::f32, shape2); + auto in1 = make_shared(element::f32, shape1); + auto in2 = make_shared(element::f32, shape2); std::vector data = {1, 74}; - element::Type type = element::Type_t::i64; + element::Type type = element::i64; auto in3 = make_shared(type, shape3, data); auto conv = make_shared( @@ -2730,9 +2721,9 @@ TEST(type_prop, deformable_conv_incorrect_group) const PartialShape deformable_values_shape{1, 50, 5, 5}; const PartialShape filters_shape{4, 3, 5, 5}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, deformable_values_shape); - auto param2 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, deformable_values_shape); + auto param2 = make_shared(element::f32, filters_shape); try { @@ -2779,9 +2770,9 @@ TEST(type_prop, deformable_conv_incorrect_deformable_group) const PartialShape deformable_values_shape{1, 50, 5, 5}; const PartialShape filters_shape{3, 3, 5, 5}; - auto param0 = make_shared(element::Type_t::f32, data_batch_shape); - auto param1 = make_shared(element::Type_t::f32, deformable_values_shape); - auto param2 = make_shared(element::Type_t::f32, filters_shape); + auto param0 = make_shared(element::f32, data_batch_shape); + auto param1 = make_shared(element::f32, deformable_values_shape); + auto param2 = make_shared(element::f32, filters_shape); try { diff --git a/ngraph/test/type_prop/ctc_greedy_decoder.cpp b/ngraph/test/type_prop/ctc_greedy_decoder.cpp index 119c5ceb3ece17..b02593244de026 100644 --- a/ngraph/test/type_prop/ctc_greedy_decoder.cpp +++ b/ngraph/test/type_prop/ctc_greedy_decoder.cpp @@ -26,10 +26,10 @@ TEST(type_prop, ctc_greedy_decoder_static_shapes) PartialShape logits_shape{100, 3, 1200}; PartialShape seq_mask_shape{100, 3}; Shape out_shape{3, 100, 1, 1}; - auto P = make_shared(element::Type_t::f32, logits_shape); - auto I = make_shared(element::Type_t::f32, seq_mask_shape); + auto P = make_shared(element::f32, logits_shape); + auto I = make_shared(element::f32, seq_mask_shape); auto G = make_shared(P, I, false); - ASSERT_EQ(G->get_element_type(), element::Type_t::f32); + ASSERT_EQ(G->get_element_type(), element::f32); ASSERT_EQ(G->get_shape(), out_shape); } @@ -38,10 +38,10 @@ TEST(type_prop, ctc_greedy_decoder_output_static_shape1) PartialShape logits_shape{Dimension::dynamic(), 3, 1200}; PartialShape seq_mask_shape{100, 3}; Shape out_shape{3, 100, 1, 1}; - auto P = make_shared(element::Type_t::f32, logits_shape); - auto I = make_shared(element::Type_t::f32, seq_mask_shape); + auto P = make_shared(element::f32, logits_shape); + auto I = make_shared(element::f32, seq_mask_shape); auto G = make_shared(P, I, false); - ASSERT_EQ(G->get_element_type(), element::Type_t::f32); + ASSERT_EQ(G->get_element_type(), element::f32); ASSERT_EQ(G->get_shape(), out_shape); } @@ -50,10 +50,10 @@ TEST(type_prop, ctc_greedy_decoder_output_static_shape2) PartialShape logits_shape{Dimension::dynamic(), 3, 1200}; PartialShape seq_mask_shape{100, Dimension::dynamic()}; Shape out_shape{3, 100, 1, 1}; - auto P = make_shared(element::Type_t::f32, logits_shape); - auto I = make_shared(element::Type_t::f32, seq_mask_shape); + auto P = make_shared(element::f32, logits_shape); + auto I = make_shared(element::f32, seq_mask_shape); auto G = make_shared(P, I, false); - ASSERT_EQ(G->get_element_type(), element::Type_t::f32); + ASSERT_EQ(G->get_element_type(), element::f32); ASSERT_EQ(G->get_shape(), out_shape); } @@ -62,10 +62,10 @@ TEST(type_prop, ctc_greedy_decoder_dynamic_shapes) PartialShape logits_shape{Dimension::dynamic(), Dimension::dynamic(), 1200}; PartialShape seq_mask_shape{Dimension::dynamic(), Dimension::dynamic()}; PartialShape out_shape{Dimension::dynamic(), Dimension::dynamic(), 1, 1}; - auto P = make_shared(element::Type_t::f32, logits_shape); - auto I = make_shared(element::Type_t::f32, seq_mask_shape); + auto P = make_shared(element::f32, logits_shape); + auto I = make_shared(element::f32, seq_mask_shape); auto G = make_shared(P, I, false); - ASSERT_EQ(G->get_element_type(), element::Type_t::f32); + ASSERT_EQ(G->get_element_type(), element::f32); ASSERT_TRUE(G->get_output_partial_shape(0).same_scheme(out_shape)); } @@ -74,10 +74,10 @@ TEST(type_prop, ctc_greedy_decoder_dynamic_ranks1) PartialShape logits_shape = PartialShape::dynamic(); PartialShape seq_mask_shape{100, Dimension::dynamic()}; PartialShape out_shape{Dimension::dynamic(), 100, 1, 1}; - auto P = make_shared(element::Type_t::f32, logits_shape); - auto I = make_shared(element::Type_t::f32, seq_mask_shape); + auto P = make_shared(element::f32, logits_shape); + auto I = make_shared(element::f32, seq_mask_shape); auto G = make_shared(P, I, false); - ASSERT_EQ(G->get_element_type(), element::Type_t::f32); + ASSERT_EQ(G->get_element_type(), element::f32); ASSERT_TRUE(G->get_output_partial_shape(0).same_scheme(out_shape)); } @@ -86,10 +86,10 @@ TEST(type_prop, ctc_greedy_decoder_dynamic_ranks2) PartialShape logits_shape = PartialShape::dynamic(); PartialShape seq_mask_shape = PartialShape::dynamic(); PartialShape out_shape{Dimension::dynamic(), Dimension::dynamic(), 1, 1}; - auto P = make_shared(element::Type_t::f32, logits_shape); - auto I = make_shared(element::Type_t::f32, seq_mask_shape); + auto P = make_shared(element::f32, logits_shape); + auto I = make_shared(element::f32, seq_mask_shape); auto G = make_shared(P, I, false); - ASSERT_EQ(G->get_element_type(), element::Type_t::f32); + ASSERT_EQ(G->get_element_type(), element::f32); ASSERT_TRUE(G->get_output_partial_shape(0).same_scheme(out_shape)); } @@ -97,8 +97,8 @@ TEST(type_prop, ctc_greedy_decoder_incorrect_rank) { PartialShape logits_shape{Dimension::dynamic(), 3, 1200, 5}; PartialShape seq_mask_shape{100, 3}; - auto P = make_shared(element::Type_t::f32, logits_shape); - auto I = make_shared(element::Type_t::f32, seq_mask_shape); + auto P = make_shared(element::f32, logits_shape); + auto I = make_shared(element::f32, seq_mask_shape); try { @@ -121,8 +121,8 @@ TEST(type_prop, ctc_greedy_decoder_incorrect_rank2) { PartialShape logits_shape{Dimension::dynamic(), 3, 1200}; PartialShape seq_mask_shape{100, 3, 2}; - auto P = make_shared(element::Type_t::f32, logits_shape); - auto I = make_shared(element::Type_t::f32, seq_mask_shape); + auto P = make_shared(element::f32, logits_shape); + auto I = make_shared(element::f32, seq_mask_shape); try { @@ -145,8 +145,8 @@ TEST(type_prop, ctc_greedy_decoder_mismatched_dim1) { PartialShape logits_shape{100, 4, 1200}; PartialShape seq_mask_shape{100, 3}; - auto P = make_shared(element::Type_t::f32, logits_shape); - auto I = make_shared(element::Type_t::f32, seq_mask_shape); + auto P = make_shared(element::f32, logits_shape); + auto I = make_shared(element::f32, seq_mask_shape); try { @@ -169,8 +169,8 @@ TEST(type_prop, ctc_greedy_decoder_mismatched_dim2) { PartialShape logits_shape{101, 3, 1200}; PartialShape seq_mask_shape{100, 3}; - auto P = make_shared(element::Type_t::f32, logits_shape); - auto I = make_shared(element::Type_t::f32, seq_mask_shape); + auto P = make_shared(element::f32, logits_shape); + auto I = make_shared(element::f32, seq_mask_shape); try { diff --git a/ngraph/test/type_prop/ctc_loss.cpp b/ngraph/test/type_prop/ctc_loss.cpp index 4933c1c24c6e21..2b2cc6f1847d79 100644 --- a/ngraph/test/type_prop/ctc_loss.cpp +++ b/ngraph/test/type_prop/ctc_loss.cpp @@ -24,92 +24,91 @@ using namespace ngraph; TEST(type_prop, ctc_loss) { // create inputs - auto logits = make_shared(element::Type_t::f32, Shape{10, 120, 28}); - auto logit_length = make_shared(element::Type_t::i32, Shape{10}); - auto labels = make_shared(element::Type_t::i32, Shape{10, 120}); - auto label_length = make_shared(element::Type_t::i32, Shape{10}); - auto blank_index = make_shared(element::Type_t::i32, Shape{}); + auto logits = make_shared(element::f32, Shape{10, 120, 28}); + auto logit_length = make_shared(element::i32, Shape{10}); + auto labels = make_shared(element::i32, Shape{10, 120}); + auto label_length = make_shared(element::i32, Shape{10}); + auto blank_index = make_shared(element::i32, Shape{}); // create CTCLoss node auto ctc_loss = make_shared(logits, logit_length, labels, label_length, blank_index); // check type and shape infer - EXPECT_EQ(ctc_loss->get_element_type(), element::Type_t::f32); + EXPECT_EQ(ctc_loss->get_element_type(), element::f32); EXPECT_TRUE(ctc_loss->get_output_partial_shape(0).same_scheme(PartialShape{10})); } TEST(type_prop, ctc_loss_no_blank_index) { // create inputs - auto logits = make_shared(element::Type_t::f32, Shape{10, 120, 28}); - auto logit_length = make_shared(element::Type_t::i32, Shape{10}); - auto labels = make_shared(element::Type_t::i32, Shape{10, 120}); - auto label_length = make_shared(element::Type_t::i32, Shape{10}); + auto logits = make_shared(element::f32, Shape{10, 120, 28}); + auto logit_length = make_shared(element::i32, Shape{10}); + auto labels = make_shared(element::i32, Shape{10, 120}); + auto label_length = make_shared(element::i32, Shape{10}); // create CTCLoss node auto ctc_loss = make_shared(logits, logit_length, labels, label_length); // check type and shape infer - EXPECT_EQ(ctc_loss->get_element_type(), element::Type_t::f32); + EXPECT_EQ(ctc_loss->get_element_type(), element::f32); EXPECT_TRUE(ctc_loss->get_output_partial_shape(0).same_scheme(PartialShape{10})); } TEST(type_prop, ctc_loss_output_type) { // create inputs - auto logits = make_shared(element::Type_t::f64, Shape{10, 120, 28}); - auto logit_length = make_shared(element::Type_t::i32, Shape{10}); - auto labels = make_shared(element::Type_t::i32, Shape{10, 120}); - auto label_length = make_shared(element::Type_t::i32, Shape{10}); - auto blank_index = make_shared(element::Type_t::i32, Shape{}); + auto logits = make_shared(element::f64, Shape{10, 120, 28}); + auto logit_length = make_shared(element::i32, Shape{10}); + auto labels = make_shared(element::i32, Shape{10, 120}); + auto label_length = make_shared(element::i32, Shape{10}); + auto blank_index = make_shared(element::i32, Shape{}); // create CTCLoss node auto ctc_loss = make_shared(logits, logit_length, labels, label_length, blank_index); // check type and shape infer - EXPECT_EQ(ctc_loss->get_element_type(), element::Type_t::f64); + EXPECT_EQ(ctc_loss->get_element_type(), element::f64); EXPECT_TRUE(ctc_loss->get_output_partial_shape(0).same_scheme(PartialShape{10})); } TEST(type_prop, ctc_loss_non_default_parameters) { // create inputs - auto logits = make_shared(element::Type_t::f64, Shape{10, 120, 28}); - auto logit_length = make_shared(element::Type_t::i32, Shape{10}); - auto labels = make_shared(element::Type_t::i32, Shape{10, 120}); - auto label_length = make_shared(element::Type_t::i32, Shape{10}); - auto blank_index = make_shared(element::Type_t::i32, Shape{}); + auto logits = make_shared(element::f64, Shape{10, 120, 28}); + auto logit_length = make_shared(element::i32, Shape{10}); + auto labels = make_shared(element::i32, Shape{10, 120}); + auto label_length = make_shared(element::i32, Shape{10}); + auto blank_index = make_shared(element::i32, Shape{}); // create CTCLoss node auto ctc_loss = make_shared( logits, logit_length, labels, label_length, blank_index, true, false, false); // check type and shape infer - EXPECT_EQ(ctc_loss->get_element_type(), element::Type_t::f64); + EXPECT_EQ(ctc_loss->get_element_type(), element::f64); EXPECT_TRUE(ctc_loss->get_output_partial_shape(0).same_scheme(PartialShape{10})); } TEST(type_prop, ctc_loss_dynamic_input) { // create inputs - auto logits = make_shared(element::Type_t::f32, - PartialShape{Dimension::dynamic(), 120, 28}); + auto logits = + make_shared(element::f32, PartialShape{Dimension::dynamic(), 120, 28}); auto logit_length = - make_shared(element::Type_t::i32, PartialShape{Dimension::dynamic()}); - auto labels = - make_shared(element::Type_t::i32, PartialShape{Dimension::dynamic(), 120}); + make_shared(element::i32, PartialShape{Dimension::dynamic()}); + auto labels = make_shared(element::i32, PartialShape{Dimension::dynamic(), 120}); auto label_length = - make_shared(element::Type_t::i32, PartialShape{Dimension::dynamic()}); - auto blank_index = make_shared(element::Type_t::i32, Shape{}); + make_shared(element::i32, PartialShape{Dimension::dynamic()}); + auto blank_index = make_shared(element::i32, Shape{}); // create CTCLoss node auto ctc_loss = make_shared(logits, logit_length, labels, label_length, blank_index); // check type and shape infer - EXPECT_EQ(ctc_loss->get_element_type(), element::Type_t::f32); + EXPECT_EQ(ctc_loss->get_element_type(), element::f32); EXPECT_TRUE( ctc_loss->get_output_partial_shape(0).same_scheme(PartialShape{Dimension::dynamic()})); } @@ -117,32 +116,31 @@ TEST(type_prop, ctc_loss_dynamic_input) TEST(type_prop, ctc_loss_partly_dynamic_input) { // create inputs - auto logits = make_shared(element::Type_t::f32, - PartialShape{Dimension::dynamic(), 120, 28}); - auto logit_length = make_shared(element::Type_t::i32, PartialShape{10}); - auto labels = - make_shared(element::Type_t::i32, PartialShape{Dimension::dynamic(), 120}); + auto logits = + make_shared(element::f32, PartialShape{Dimension::dynamic(), 120, 28}); + auto logit_length = make_shared(element::i32, PartialShape{10}); + auto labels = make_shared(element::i32, PartialShape{Dimension::dynamic(), 120}); auto label_length = - make_shared(element::Type_t::i32, PartialShape{Dimension::dynamic()}); - auto blank_index = make_shared(element::Type_t::i32, Shape{}); + make_shared(element::i32, PartialShape{Dimension::dynamic()}); + auto blank_index = make_shared(element::i32, Shape{}); // create CTCLoss node auto ctc_loss = make_shared(logits, logit_length, labels, label_length, blank_index); // check type and shape infer - EXPECT_EQ(ctc_loss->get_element_type(), element::Type_t::f32); + EXPECT_EQ(ctc_loss->get_element_type(), element::f32); EXPECT_TRUE(ctc_loss->get_output_partial_shape(0).same_scheme(PartialShape{10})); } TEST(type_prop, ctc_loss_fail_inputs_dim) { // create inputs - auto logits = make_shared(element::Type_t::f32, Shape{10, 120, 40, 28}); - auto logit_length = make_shared(element::Type_t::i32, Shape{10}); - auto labels = make_shared(element::Type_t::i32, Shape{10, 120}); - auto label_length = make_shared(element::Type_t::i32, Shape{10}); - auto blank_index = make_shared(element::Type_t::i32, Shape{}); + auto logits = make_shared(element::f32, Shape{10, 120, 40, 28}); + auto logit_length = make_shared(element::i32, Shape{10}); + auto labels = make_shared(element::i32, Shape{10, 120}); + auto label_length = make_shared(element::i32, Shape{10}); + auto blank_index = make_shared(element::i32, Shape{}); try { @@ -166,11 +164,11 @@ TEST(type_prop, ctc_loss_fail_inputs_dim) TEST(type_prop, ctc_loss_fail_logit_length_dim) { // create inputs - auto logits = make_shared(element::Type_t::f32, Shape{10, 120, 28}); - auto logit_length = make_shared(element::Type_t::i32, Shape{10, 20}); - auto labels = make_shared(element::Type_t::i32, Shape{10, 120}); - auto label_length = make_shared(element::Type_t::i32, Shape{10}); - auto blank_index = make_shared(element::Type_t::i32, Shape{}); + auto logits = make_shared(element::f32, Shape{10, 120, 28}); + auto logit_length = make_shared(element::i32, Shape{10, 20}); + auto labels = make_shared(element::i32, Shape{10, 120}); + auto label_length = make_shared(element::i32, Shape{10}); + auto blank_index = make_shared(element::i32, Shape{}); try { @@ -194,11 +192,11 @@ TEST(type_prop, ctc_loss_fail_logit_length_dim) TEST(type_prop, ctc_loss_fail_labels_dim) { // create inputs - auto logits = make_shared(element::Type_t::f32, Shape{10, 120, 28}); - auto logit_length = make_shared(element::Type_t::i32, Shape{10}); - auto labels = make_shared(element::Type_t::i32, Shape{10}); - auto label_length = make_shared(element::Type_t::i32, Shape{10}); - auto blank_index = make_shared(element::Type_t::i32, Shape{}); + auto logits = make_shared(element::f32, Shape{10, 120, 28}); + auto logit_length = make_shared(element::i32, Shape{10}); + auto labels = make_shared(element::i32, Shape{10}); + auto label_length = make_shared(element::i32, Shape{10}); + auto blank_index = make_shared(element::i32, Shape{}); try { @@ -222,11 +220,11 @@ TEST(type_prop, ctc_loss_fail_labels_dim) TEST(type_prop, ctc_loss_fail_label_length_dim) { // create inputs - auto logits = make_shared(element::Type_t::f32, Shape{10, 120, 28}); - auto logit_length = make_shared(element::Type_t::i32, Shape{10}); - auto labels = make_shared(element::Type_t::i32, Shape{10, 120}); - auto label_length = make_shared(element::Type_t::i32, Shape{10, 40}); - auto blank_index = make_shared(element::Type_t::i32, Shape{}); + auto logits = make_shared(element::f32, Shape{10, 120, 28}); + auto logit_length = make_shared(element::i32, Shape{10}); + auto labels = make_shared(element::i32, Shape{10, 120}); + auto label_length = make_shared(element::i32, Shape{10, 40}); + auto blank_index = make_shared(element::i32, Shape{}); try { @@ -250,11 +248,11 @@ TEST(type_prop, ctc_loss_fail_label_length_dim) TEST(type_prop, ctc_loss_fail_blank_index_dim) { // create inputs - auto logits = make_shared(element::Type_t::f32, Shape{10, 120, 28}); - auto logit_length = make_shared(element::Type_t::i32, Shape{10}); - auto labels = make_shared(element::Type_t::i32, Shape{10, 120}); - auto label_length = make_shared(element::Type_t::i32, Shape{10}); - auto blank_index = make_shared(element::Type_t::i32, Shape{4}); + auto logits = make_shared(element::f32, Shape{10, 120, 28}); + auto logit_length = make_shared(element::i32, Shape{10}); + auto labels = make_shared(element::i32, Shape{10, 120}); + auto label_length = make_shared(element::i32, Shape{10}); + auto blank_index = make_shared(element::i32, Shape{4}); try { @@ -278,11 +276,11 @@ TEST(type_prop, ctc_loss_fail_blank_index_dim) TEST(type_prop, ctc_loss_fail_batch_dim_mismatch) { // create inputs - auto logits = make_shared(element::Type_t::f32, Shape{10, 120, 28}); - auto logit_length = make_shared(element::Type_t::i32, Shape{10}); - auto labels = make_shared(element::Type_t::i32, Shape{10, 120}); - auto label_length = make_shared(element::Type_t::i32, Shape{40}); - auto blank_index = make_shared(element::Type_t::i32, Shape{}); + auto logits = make_shared(element::f32, Shape{10, 120, 28}); + auto logit_length = make_shared(element::i32, Shape{10}); + auto labels = make_shared(element::i32, Shape{10, 120}); + auto label_length = make_shared(element::i32, Shape{40}); + auto blank_index = make_shared(element::i32, Shape{}); try { @@ -309,11 +307,11 @@ TEST(type_prop, ctc_loss_fail_batch_dim_mismatch) TEST(type_prop, ctc_loss_fail_time_dim_mismatch) { // create inputs - auto logits = make_shared(element::Type_t::f32, Shape{10, 120, 28}); - auto logit_length = make_shared(element::Type_t::i32, Shape{10}); - auto labels = make_shared(element::Type_t::i32, Shape{10, 130}); - auto label_length = make_shared(element::Type_t::i32, Shape{40}); - auto blank_index = make_shared(element::Type_t::i32, Shape{}); + auto logits = make_shared(element::f32, Shape{10, 120, 28}); + auto logit_length = make_shared(element::i32, Shape{10}); + auto labels = make_shared(element::i32, Shape{10, 130}); + auto label_length = make_shared(element::i32, Shape{40}); + auto blank_index = make_shared(element::i32, Shape{}); try { diff --git a/ngraph/test/type_prop/deformable_convolution.cpp b/ngraph/test/type_prop/deformable_convolution.cpp index 83b97c12e9dc39..508ce147176c91 100644 --- a/ngraph/test/type_prop/deformable_convolution.cpp +++ b/ngraph/test/type_prop/deformable_convolution.cpp @@ -34,9 +34,9 @@ TEST(type_prop, deformable_conv_v1_partial_auto_padding_same) const int64_t group = 4; const int64_t deformable_group = 2; - auto data_batch = make_shared(element::Type_t::f32, data_batch_shape); - auto deformable_values = make_shared(element::Type_t::f32, deformable_shape); - auto filters = make_shared(element::Type_t::f32, filters_shape); + auto data_batch = make_shared(element::f32, data_batch_shape); + auto deformable_values = make_shared(element::f32, deformable_shape); + auto filters = make_shared(element::f32, filters_shape); auto deformable_conv = make_shared(data_batch, deformable_values, @@ -67,9 +67,9 @@ TEST(type_prop, deformable_conv_v1_partial_auto_padding_same_nc_dims_dynamic_sam const int64_t group = 4; const int64_t deformable_group = 2; - auto data_batch = make_shared(element::Type_t::f32, data_batch_shape); - auto deformable_values = make_shared(element::Type_t::f32, deformable_shape); - auto filters = make_shared(element::Type_t::f32, filters_shape); + auto data_batch = make_shared(element::f32, data_batch_shape); + auto deformable_values = make_shared(element::f32, deformable_shape); + auto filters = make_shared(element::f32, filters_shape); auto deformable_conv = make_shared(data_batch, deformable_values, @@ -101,9 +101,9 @@ TEST(type_prop, deformable_conv_v1_partial_auto_padding_same_nc_dims_dynamic_sam const int64_t group = 4; const int64_t deformable_group = 2; - auto data_batch = make_shared(element::Type_t::f32, data_batch_shape); - auto deformable_values = make_shared(element::Type_t::f32, deformable_shape); - auto filters = make_shared(element::Type_t::f32, filters_shape); + auto data_batch = make_shared(element::f32, data_batch_shape); + auto deformable_values = make_shared(element::f32, deformable_shape); + auto filters = make_shared(element::f32, filters_shape); auto deformable_conv = make_shared(data_batch, deformable_values, @@ -135,9 +135,9 @@ TEST(type_prop, deformable_conv_v1_partial_auto_padding_same_spatial_dims_dynami const int64_t group = 4; const int64_t deformable_group = 2; - auto data_batch = make_shared(element::Type_t::f32, data_batch_shape); - auto deformable_values = make_shared(element::Type_t::f32, deformable_shape); - auto filters = make_shared(element::Type_t::f32, filters_shape); + auto data_batch = make_shared(element::f32, data_batch_shape); + auto deformable_values = make_shared(element::f32, deformable_shape); + auto filters = make_shared(element::f32, filters_shape); auto deformable_conv = make_shared(data_batch, deformable_values, diff --git a/ngraph/test/type_prop/deformable_psroi_pooling.cpp b/ngraph/test/type_prop/deformable_psroi_pooling.cpp index 7d71de721a4c5e..d4b204763df654 100644 --- a/ngraph/test/type_prop/deformable_psroi_pooling.cpp +++ b/ngraph/test/type_prop/deformable_psroi_pooling.cpp @@ -23,9 +23,9 @@ using namespace ngraph; TEST(type_prop, deformable_psroi_pooling_output_shape) { - auto input = make_shared(element::Type_t::f32, Shape{1, 1024, 63, 38}); - auto coords = make_shared(element::Type_t::f32, Shape{300, 5}); - auto offsets = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); + auto input = make_shared(element::f32, Shape{1, 1024, 63, 38}); + auto coords = make_shared(element::f32, Shape{300, 5}); + auto offsets = make_shared(element::f32, Shape{1, 2, 3, 4}); const int64_t output_dim = 882; const float spatial_scale = 0.0625; const int64_t group_size = 3; @@ -38,9 +38,9 @@ TEST(type_prop, deformable_psroi_pooling_output_shape) TEST(type_prop, deformable_psroi_pooling_output_shape_2) { - auto input = make_shared(element::Type_t::f32, Shape{1, 7938, 38, 38}); - auto coords = make_shared(element::Type_t::f32, Shape{300, 5}); - auto offsets = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); + auto input = make_shared(element::f32, Shape{1, 7938, 38, 38}); + auto coords = make_shared(element::f32, Shape{300, 5}); + auto offsets = make_shared(element::f32, Shape{1, 2, 3, 4}); const int64_t output_dim = 162; const float spatial_scale = 0.0625; const int64_t group_size = 7; @@ -53,9 +53,9 @@ TEST(type_prop, deformable_psroi_pooling_output_shape_2) TEST(type_prop, deformable_psroi_pooling_invalid_input_rank) { - auto input = make_shared(element::Type_t::f32, Shape{1, 2, 3}); - auto coords = make_shared(element::Type_t::f32, Shape{1, 2}); - auto offsets = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); + auto input = make_shared(element::f32, Shape{1, 2, 3}); + auto coords = make_shared(element::f32, Shape{1, 2}); + auto offsets = make_shared(element::f32, Shape{1, 2, 3, 4}); const int64_t output_dim = 4; const float spatial_scale = 0.9; const int64_t group_size = 7; @@ -79,9 +79,9 @@ TEST(type_prop, deformable_psroi_pooling_invalid_input_rank) TEST(type_prop, deformable_psroi_pooling_invalid_box_coordinates_rank) { - auto input = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - auto coords = make_shared(element::Type_t::f32, Shape{1, 2, 3}); - auto offsets = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); + auto input = make_shared(element::f32, Shape{1, 2, 3, 4}); + auto coords = make_shared(element::f32, Shape{1, 2, 3}); + auto offsets = make_shared(element::f32, Shape{1, 2, 3, 4}); const int64_t output_dim = 4; const float spatial_scale = 0.9; const int64_t group_size = 7; @@ -106,9 +106,9 @@ TEST(type_prop, deformable_psroi_pooling_invalid_box_coordinates_rank) TEST(type_prop, deformable_psroi_pooling_invalid_offstes_rank) { - auto input = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - auto coords = make_shared(element::Type_t::f32, Shape{1, 2}); - auto offsets = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4, 5}); + auto input = make_shared(element::f32, Shape{1, 2, 3, 4}); + auto coords = make_shared(element::f32, Shape{1, 2}); + auto offsets = make_shared(element::f32, Shape{1, 2, 3, 4, 5}); const int64_t output_dim = 4; const float spatial_scale = 0.9; const int64_t group_size = 7; diff --git a/ngraph/test/type_prop/depth_to_space.cpp b/ngraph/test/type_prop/depth_to_space.cpp index 779ddd13d923f1..4375b9ab8184ff 100644 --- a/ngraph/test/type_prop/depth_to_space.cpp +++ b/ngraph/test/type_prop/depth_to_space.cpp @@ -23,57 +23,57 @@ using namespace ngraph; TEST(type_prop, depth_to_space_output_shape_block_first_4D) { - auto A = make_shared(element::Type_t::f32, Shape{1, 128, 8, 8}); + auto A = make_shared(element::f32, Shape{1, 128, 8, 8}); auto space_to_depth = make_shared(A, op::DepthToSpace::DepthToSpaceMode::BLOCKS_FIRST, 8); - ASSERT_EQ(space_to_depth->get_element_type(), element::Type_t::f32); + ASSERT_EQ(space_to_depth->get_element_type(), element::f32); ASSERT_EQ(space_to_depth->get_shape(), (Shape{1, 2, 64, 64})); } TEST(type_prop, depth_to_space_output_shape_block_first_4D_2) { - auto A = make_shared(element::Type_t::f32, Shape{1, 12, 1080, 1616}); + auto A = make_shared(element::f32, Shape{1, 12, 1080, 1616}); auto space_to_depth = make_shared(A, op::DepthToSpace::DepthToSpaceMode::BLOCKS_FIRST, 2); - ASSERT_EQ(space_to_depth->get_element_type(), element::Type_t::f32); + ASSERT_EQ(space_to_depth->get_element_type(), element::f32); ASSERT_EQ(space_to_depth->get_shape(), (Shape{1, 3, 2 * 1080, 2 * 1616})); } TEST(type_prop, depth_to_space_output_shape_block_first_5D) { - auto A = make_shared(element::Type_t::f32, Shape{1, 16, 3, 1080, 1616}); + auto A = make_shared(element::f32, Shape{1, 16, 3, 1080, 1616}); auto space_to_depth = make_shared(A, op::DepthToSpace::DepthToSpaceMode::BLOCKS_FIRST, 2); - ASSERT_EQ(space_to_depth->get_element_type(), element::Type_t::f32); + ASSERT_EQ(space_to_depth->get_element_type(), element::f32); ASSERT_EQ(space_to_depth->get_shape(), (Shape{1, 2, 2 * 3, 2 * 1080, 2 * 1616})); } TEST(type_prop, depth_to_space_output_shape_depth_first_4D) { - auto A = make_shared(element::Type_t::f32, Shape{1, 12, 1080, 1616}); + auto A = make_shared(element::f32, Shape{1, 12, 1080, 1616}); auto space_to_depth = make_shared(A, op::DepthToSpace::DepthToSpaceMode::DEPTH_FIRST, 2); - ASSERT_EQ(space_to_depth->get_element_type(), element::Type_t::f32); + ASSERT_EQ(space_to_depth->get_element_type(), element::f32); ASSERT_EQ(space_to_depth->get_shape(), (Shape{1, 3, 2 * 1080, 2 * 1616})); } TEST(type_prop, depth_to_space_output_shape_depth_first_5D) { - auto A = make_shared(element::Type_t::f32, Shape{1, 16, 3, 1080, 1616}); + auto A = make_shared(element::f32, Shape{1, 16, 3, 1080, 1616}); auto space_to_depth = make_shared(A, op::DepthToSpace::DepthToSpaceMode::DEPTH_FIRST, 2); - ASSERT_EQ(space_to_depth->get_element_type(), element::Type_t::f32); + ASSERT_EQ(space_to_depth->get_element_type(), element::f32); ASSERT_EQ(space_to_depth->get_shape(), (Shape{1, 2, 2 * 3, 2 * 1080, 2 * 1616})); } TEST(type_prop, depth_to_space_input_rank_not_supported) { - auto A = make_shared(element::Type_t::f32, Shape{1, 8}); + auto A = make_shared(element::f32, Shape{1, 8}); try { auto space_to_depth = @@ -94,7 +94,7 @@ TEST(type_prop, depth_to_space_input_rank_not_supported) TEST(type_prop, depth_to_space_blocksize_not_matched) { - auto A = make_shared(element::Type_t::f32, Shape{1, 7, 4, 4}); + auto A = make_shared(element::f32, Shape{1, 7, 4, 4}); try { auto space_to_depth = diff --git a/ngraph/test/type_prop/dyn_reshape.cpp b/ngraph/test/type_prop/dyn_reshape.cpp index a8b571ffac234b..760ccf9917fc5b 100644 --- a/ngraph/test/type_prop/dyn_reshape.cpp +++ b/ngraph/test/type_prop/dyn_reshape.cpp @@ -23,22 +23,20 @@ using namespace ngraph; TEST(type_prop, reshape_v1_arg_rank_static_pattern_zero) { - auto arg = make_shared(element::Type_t::f32, Shape{2, 0, 2, 8}); - auto pattern = op::Constant::create(element::Type_t::i64, Shape{4}, {1, 2, 0, 32}); + auto arg = make_shared(element::f32, Shape{2, 0, 2, 8}); + auto pattern = op::Constant::create(element::i64, Shape{4}, {1, 2, 0, 32}); auto reshape_v1_static = make_shared(arg, pattern, true); EXPECT_EQ(reshape_v1_static->get_output_shape(0), Shape({1, 2, 2, 32})); - auto dynamic_arg = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto dynamic_arg = make_shared(element::f32, PartialShape::dynamic()); auto reshape_v1_dynamic = make_shared(dynamic_arg, pattern, true); EXPECT_TRUE(reshape_v1_dynamic->get_output_partial_shape(0).same_scheme( PartialShape{1, 2, Dimension::dynamic(), 32})); try { - auto static_shape_parameter = - make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - auto reshape_output_pattern = - op::Constant::create(element::Type_t::i64, Shape{4}, {2, 2, 3, 4}); + auto static_shape_parameter = make_shared(element::f32, Shape{1, 2, 3, 4}); + auto reshape_output_pattern = op::Constant::create(element::i64, Shape{4}, {2, 2, 3, 4}); auto reshape = make_shared(static_shape_parameter, reshape_output_pattern, true); FAIL() << "Expected failure on reshape construction"; diff --git a/ngraph/test/type_prop/elu.cpp b/ngraph/test/type_prop/elu.cpp index 82e29aeda751f9..3d2bf279594808 100644 --- a/ngraph/test/type_prop/elu.cpp +++ b/ngraph/test/type_prop/elu.cpp @@ -24,8 +24,8 @@ using namespace ngraph; TEST(type_prop, elu) { Shape data_shape{2, 4}; - auto data = make_shared(element::Type_t::f32, data_shape); + auto data = make_shared(element::f32, data_shape); auto elu = make_shared(data, 1); - ASSERT_EQ(elu->get_element_type(), element::Type_t::f32); + ASSERT_EQ(elu->get_element_type(), element::f32); ASSERT_EQ(elu->get_shape(), data_shape); } diff --git a/ngraph/test/type_prop/embedding_segments_sum.cpp b/ngraph/test/type_prop/embedding_segments_sum.cpp index dc118c78058811..58f28d3a0d0cd8 100644 --- a/ngraph/test/type_prop/embedding_segments_sum.cpp +++ b/ngraph/test/type_prop/embedding_segments_sum.cpp @@ -25,19 +25,19 @@ using namespace ngraph; TEST(type_prop, ess) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::i64, Shape{4}); - auto segment_ids = make_shared(element::Type_t::i64, Shape{4}); - auto num_segments = make_shared(element::Type_t::i64, Shape{}); - auto per_sample_weights = make_shared(element::Type_t::f32, Shape{4}); - auto default_index = make_shared(element::Type_t::i64, Shape{}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i64, Shape{4}); + auto segment_ids = make_shared(element::i64, Shape{4}); + auto num_segments = make_shared(element::i64, Shape{}); + auto per_sample_weights = make_shared(element::f32, Shape{4}); + auto default_index = make_shared(element::i64, Shape{}); auto ess = make_shared( emb_table, indices, segment_ids, num_segments, default_index, per_sample_weights); EXPECT_TRUE( ess->get_output_partial_shape(0).same_scheme(PartialShape{Dimension::dynamic(), 2})); EXPECT_TRUE(indices->get_partial_shape().same_scheme(per_sample_weights->get_partial_shape())); - EXPECT_EQ(ess->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(ess->get_output_element_type(0), element::f32); EXPECT_EQ(indices->get_partial_shape().rank().get_length(), 1); EXPECT_EQ(segment_ids->get_partial_shape().rank().get_length(), 1); } @@ -45,12 +45,12 @@ TEST(type_prop, ess) TEST(type_prop, ess_dynamic_emb_table_number_segment) { auto emb_table = - make_shared(element::Type_t::f32, PartialShape{5, Dimension::dynamic()}); - auto indices = make_shared(element::Type_t::i64, Shape{4}); - auto segment_ids = make_shared(element::Type_t::i64, Shape{4}); - auto num_segments = make_shared(element::Type_t::i64, Shape{}); - auto per_sample_weights = make_shared(element::Type_t::f32, Shape{4}); - auto default_index = make_shared(element::Type_t::i64, Shape{}); + make_shared(element::f32, PartialShape{5, Dimension::dynamic()}); + auto indices = make_shared(element::i64, Shape{4}); + auto segment_ids = make_shared(element::i64, Shape{4}); + auto num_segments = make_shared(element::i64, Shape{}); + auto per_sample_weights = make_shared(element::f32, Shape{4}); + auto default_index = make_shared(element::i64, Shape{}); auto ess = make_shared( emb_table, indices, segment_ids, num_segments, default_index, per_sample_weights); @@ -61,12 +61,12 @@ TEST(type_prop, ess_dynamic_emb_table_number_segment) TEST(type_prop, ess_fail_indices_element_type) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::f32, Shape{4}); - auto segment_ids = make_shared(element::Type_t::i64, Shape{4}); - auto num_segments = make_shared(element::Type_t::i64, Shape{}); - auto per_sample_weights = make_shared(element::Type_t::f32, Shape{4}); - auto default_index = make_shared(element::Type_t::i64, Shape{}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::f32, Shape{4}); + auto segment_ids = make_shared(element::i64, Shape{4}); + auto num_segments = make_shared(element::i64, Shape{}); + auto per_sample_weights = make_shared(element::f32, Shape{4}); + auto default_index = make_shared(element::i64, Shape{}); try { @@ -86,12 +86,12 @@ TEST(type_prop, ess_fail_indices_element_type) TEST(type_prop, ess_fail_segment_ids_element_type) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::i64, Shape{4}); - auto segment_ids = make_shared(element::Type_t::f32, Shape{4}); - auto num_segments = make_shared(element::Type_t::i64, Shape{}); - auto per_sample_weights = make_shared(element::Type_t::f32, Shape{4}); - auto default_index = make_shared(element::Type_t::i64, Shape{}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i64, Shape{4}); + auto segment_ids = make_shared(element::f32, Shape{4}); + auto num_segments = make_shared(element::i64, Shape{}); + auto per_sample_weights = make_shared(element::f32, Shape{4}); + auto default_index = make_shared(element::i64, Shape{}); try { @@ -111,12 +111,12 @@ TEST(type_prop, ess_fail_segment_ids_element_type) TEST(type_prop, ess_fail_number_segments_element_type) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::i64, Shape{4}); - auto segment_ids = make_shared(element::Type_t::i64, Shape{4}); - auto num_segments = make_shared(element::Type_t::f32, Shape{}); - auto per_sample_weights = make_shared(element::Type_t::f32, Shape{4}); - auto default_index = make_shared(element::Type_t::i64, Shape{}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i64, Shape{4}); + auto segment_ids = make_shared(element::i64, Shape{4}); + auto num_segments = make_shared(element::f32, Shape{}); + auto per_sample_weights = make_shared(element::f32, Shape{4}); + auto default_index = make_shared(element::i64, Shape{}); try { @@ -136,12 +136,12 @@ TEST(type_prop, ess_fail_number_segments_element_type) TEST(type_prop, ess_fail_default_index_element_type) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::i64, Shape{4}); - auto segment_ids = make_shared(element::Type_t::i64, Shape{4}); - auto num_segments = make_shared(element::Type_t::i64, Shape{}); - auto per_sample_weights = make_shared(element::Type_t::f32, Shape{4}); - auto default_index = make_shared(element::Type_t::f32, Shape{}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i64, Shape{4}); + auto segment_ids = make_shared(element::i64, Shape{4}); + auto num_segments = make_shared(element::i64, Shape{}); + auto per_sample_weights = make_shared(element::f32, Shape{4}); + auto default_index = make_shared(element::f32, Shape{}); try { @@ -161,12 +161,12 @@ TEST(type_prop, ess_fail_default_index_element_type) TEST(type_prop, ess_fail_mismatch_element_type) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::i32, Shape{4}); - auto segment_ids = make_shared(element::Type_t::i64, Shape{4}); - auto num_segments = make_shared(element::Type_t::i64, Shape{}); - auto per_sample_weights = make_shared(element::Type_t::f32, Shape{4}); - auto default_index = make_shared(element::Type_t::i64, Shape{}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i32, Shape{4}); + auto segment_ids = make_shared(element::i64, Shape{4}); + auto num_segments = make_shared(element::i64, Shape{}); + auto per_sample_weights = make_shared(element::f32, Shape{4}); + auto default_index = make_shared(element::i64, Shape{}); try { @@ -188,12 +188,12 @@ TEST(type_prop, ess_fail_mismatch_element_type) TEST(type_prop, ess_fail_mismatch_element_type_1) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::i64, Shape{4}); - auto segment_ids = make_shared(element::Type_t::i64, Shape{4}); - auto num_segments = make_shared(element::Type_t::i64, Shape{}); - auto per_sample_weights = make_shared(element::Type_t::f32, Shape{4}); - auto default_index = make_shared(element::Type_t::i32, Shape{}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i64, Shape{4}); + auto segment_ids = make_shared(element::i64, Shape{4}); + auto num_segments = make_shared(element::i64, Shape{}); + auto per_sample_weights = make_shared(element::f32, Shape{4}); + auto default_index = make_shared(element::i32, Shape{}); try { @@ -215,12 +215,12 @@ TEST(type_prop, ess_fail_mismatch_element_type_1) TEST(type_prop, ess_fail_mismatch_element_type_2) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::i64, Shape{4}); - auto segment_ids = make_shared(element::Type_t::i64, Shape{4}); - auto num_segments = make_shared(element::Type_t::i64, Shape{}); - auto per_sample_weights = make_shared(element::Type_t::i64, Shape{4}); - auto default_index = make_shared(element::Type_t::i64, Shape{}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i64, Shape{4}); + auto segment_ids = make_shared(element::i64, Shape{4}); + auto num_segments = make_shared(element::i64, Shape{}); + auto per_sample_weights = make_shared(element::i64, Shape{4}); + auto default_index = make_shared(element::i64, Shape{}); try { @@ -242,12 +242,12 @@ TEST(type_prop, ess_fail_mismatch_element_type_2) TEST(type_prop, ess_fail_mismatch_element_type_3) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::i64, Shape{4}); - auto segment_ids = make_shared(element::Type_t::i64, Shape{4}); - auto num_segments = make_shared(element::Type_t::i32, Shape{}); - auto per_sample_weights = make_shared(element::Type_t::f32, Shape{4}); - auto default_index = make_shared(element::Type_t::i64, Shape{}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i64, Shape{4}); + auto segment_ids = make_shared(element::i64, Shape{4}); + auto num_segments = make_shared(element::i32, Shape{}); + auto per_sample_weights = make_shared(element::f32, Shape{4}); + auto default_index = make_shared(element::i64, Shape{}); try { @@ -270,12 +270,12 @@ TEST(type_prop, ess_fail_mismatch_element_type_3) TEST(type_prop, ess_fail_mismatch_shape) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::i64, Shape{4}); - auto segment_ids = make_shared(element::Type_t::i64, Shape{4}); - auto num_segments = make_shared(element::Type_t::i64, Shape{}); - auto per_sample_weights = make_shared(element::Type_t::f32, Shape{3}); - auto default_index = make_shared(element::Type_t::i64, Shape{}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i64, Shape{4}); + auto segment_ids = make_shared(element::i64, Shape{4}); + auto num_segments = make_shared(element::i64, Shape{}); + auto per_sample_weights = make_shared(element::f32, Shape{3}); + auto default_index = make_shared(element::i64, Shape{}); try { @@ -296,12 +296,12 @@ TEST(type_prop, ess_fail_mismatch_shape) TEST(type_prop, ess_fail_num_segments_scalar) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::i64, Shape{4}); - auto segment_ids = make_shared(element::Type_t::i64, Shape{4}); - auto num_segments = make_shared(element::Type_t::i64, Shape{2}); - auto per_sample_weights = make_shared(element::Type_t::f32, Shape{4}); - auto default_index = make_shared(element::Type_t::i64, Shape{}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i64, Shape{4}); + auto segment_ids = make_shared(element::i64, Shape{4}); + auto num_segments = make_shared(element::i64, Shape{2}); + auto per_sample_weights = make_shared(element::f32, Shape{4}); + auto default_index = make_shared(element::i64, Shape{}); try { @@ -321,12 +321,12 @@ TEST(type_prop, ess_fail_num_segments_scalar) TEST(type_prop, ess_fail_default_index_scalar) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::i64, Shape{4}); - auto segment_ids = make_shared(element::Type_t::i64, Shape{4}); - auto num_segments = make_shared(element::Type_t::i64, Shape{}); - auto per_sample_weights = make_shared(element::Type_t::f32, Shape{4}); - auto default_index = make_shared(element::Type_t::i64, Shape{2}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i64, Shape{4}); + auto segment_ids = make_shared(element::i64, Shape{4}); + auto num_segments = make_shared(element::i64, Shape{}); + auto per_sample_weights = make_shared(element::f32, Shape{4}); + auto default_index = make_shared(element::i64, Shape{2}); try { @@ -346,12 +346,12 @@ TEST(type_prop, ess_fail_default_index_scalar) TEST(type_prop, ess_fail_indices_1d) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::i64, Shape{4, 2}); - auto segment_ids = make_shared(element::Type_t::i64, Shape{4}); - auto num_segments = make_shared(element::Type_t::i64, Shape{}); - auto per_sample_weights = make_shared(element::Type_t::f32, Shape{4}); - auto default_index = make_shared(element::Type_t::i64, Shape{}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i64, Shape{4, 2}); + auto segment_ids = make_shared(element::i64, Shape{4}); + auto num_segments = make_shared(element::i64, Shape{}); + auto per_sample_weights = make_shared(element::f32, Shape{4}); + auto default_index = make_shared(element::i64, Shape{}); try { @@ -371,12 +371,12 @@ TEST(type_prop, ess_fail_indices_1d) TEST(type_prop, ess_fail_segment_ids_1d) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::i64, Shape{4}); - auto segment_ids = make_shared(element::Type_t::i64, Shape{3, 2}); - auto num_segments = make_shared(element::Type_t::i64, Shape{}); - auto per_sample_weights = make_shared(element::Type_t::f32, Shape{4}); - auto default_index = make_shared(element::Type_t::i64, Shape{}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i64, Shape{4}); + auto segment_ids = make_shared(element::i64, Shape{3, 2}); + auto num_segments = make_shared(element::i64, Shape{}); + auto per_sample_weights = make_shared(element::f32, Shape{4}); + auto default_index = make_shared(element::i64, Shape{}); try { @@ -396,12 +396,12 @@ TEST(type_prop, ess_fail_segment_ids_1d) TEST(type_prop, ess_fail_per_sample_weights_1d) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::i64, Shape{4}); - auto segment_ids = make_shared(element::Type_t::i64, Shape{4}); - auto num_segments = make_shared(element::Type_t::i64, Shape{}); - auto per_sample_weights = make_shared(element::Type_t::f32, Shape{4, 2}); - auto default_index = make_shared(element::Type_t::i64, Shape{}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i64, Shape{4}); + auto segment_ids = make_shared(element::i64, Shape{4}); + auto num_segments = make_shared(element::i64, Shape{}); + auto per_sample_weights = make_shared(element::f32, Shape{4, 2}); + auto default_index = make_shared(element::i64, Shape{}); try { @@ -421,26 +421,26 @@ TEST(type_prop, ess_fail_per_sample_weights_1d) TEST(type_prop, ess_4_args_api) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::i64, Shape{4}); - auto segment_ids = make_shared(element::Type_t::i64, Shape{4}); - auto num_segments = make_shared(element::Type_t::i64, Shape{}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i64, Shape{4}); + auto segment_ids = make_shared(element::i64, Shape{4}); + auto num_segments = make_shared(element::i64, Shape{}); auto ess = make_shared(emb_table, indices, segment_ids, num_segments); EXPECT_TRUE( ess->get_output_partial_shape(0).same_scheme(PartialShape{Dimension::dynamic(), 2})); - EXPECT_EQ(ess->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(ess->get_output_element_type(0), element::f32); EXPECT_EQ(indices->get_partial_shape().rank().get_length(), 1); EXPECT_EQ(segment_ids->get_partial_shape().rank().get_length(), 1); } TEST(type_prop, ess_fail_indices_element_type_4_args_api) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::f32, Shape{4}); - auto segment_ids = make_shared(element::Type_t::i64, Shape{4}); - auto num_segments = make_shared(element::Type_t::i64, Shape{}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::f32, Shape{4}); + auto segment_ids = make_shared(element::i64, Shape{4}); + auto num_segments = make_shared(element::i64, Shape{}); try { @@ -460,15 +460,15 @@ TEST(type_prop, ess_fail_indices_element_type_4_args_api) TEST(type_prop, ess_num_segment_const) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::i64, Shape{4}); - auto segment_ids = make_shared(element::Type_t::i64, Shape{4}); - auto num_segments = opset3::Constant::create(element::Type_t::i64, Shape{}, {3}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i64, Shape{4}); + auto segment_ids = make_shared(element::i64, Shape{4}); + auto num_segments = opset3::Constant::create(element::i64, Shape{}, {3}); auto ess = make_shared(emb_table, indices, segment_ids, num_segments); EXPECT_TRUE(ess->get_output_partial_shape(0).same_scheme(PartialShape{3, 2})); - EXPECT_EQ(ess->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(ess->get_output_element_type(0), element::f32); EXPECT_EQ(indices->get_partial_shape().rank().get_length(), 1); EXPECT_EQ(segment_ids->get_partial_shape().rank().get_length(), 1); -} +} \ No newline at end of file diff --git a/ngraph/test/type_prop/embeddingbag_offsetssum.cpp b/ngraph/test/type_prop/embeddingbag_offsetssum.cpp index 6d4a71b1f4d3d9..5b74d18d4c75c9 100644 --- a/ngraph/test/type_prop/embeddingbag_offsetssum.cpp +++ b/ngraph/test/type_prop/embeddingbag_offsetssum.cpp @@ -23,17 +23,17 @@ using namespace ngraph; TEST(type_prop, ebos) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::i64, Shape{4}); - auto offsets = make_shared(element::Type_t::i64, Shape{3}); - auto per_sample_weights = make_shared(element::Type_t::f32, Shape{4}); - auto default_index = make_shared(element::Type_t::i64, Shape{}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i64, Shape{4}); + auto offsets = make_shared(element::i64, Shape{3}); + auto per_sample_weights = make_shared(element::f32, Shape{4}); + auto default_index = make_shared(element::i64, Shape{}); auto ebos = make_shared( emb_table, indices, offsets, default_index, per_sample_weights); EXPECT_TRUE(ebos->get_output_partial_shape(0).same_scheme(PartialShape{3, 2})); EXPECT_TRUE(indices->get_partial_shape().same_scheme(per_sample_weights->get_partial_shape())); - EXPECT_EQ(ebos->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(ebos->get_output_element_type(0), element::f32); EXPECT_EQ(indices->get_partial_shape().rank().get_length(), 1); EXPECT_EQ(offsets->get_partial_shape().rank().get_length(), 1); } @@ -41,11 +41,11 @@ TEST(type_prop, ebos) TEST(type_prop, ebos_dynamic_emb_table) { auto emb_table = - make_shared(element::Type_t::f32, PartialShape{5, Dimension::dynamic()}); - auto indices = make_shared(element::Type_t::i64, Shape{4}); - auto offsets = make_shared(element::Type_t::i64, Shape{3}); - auto per_sample_weights = make_shared(element::Type_t::f32, Shape{4}); - auto default_index = make_shared(element::Type_t::i64, Shape{}); + make_shared(element::f32, PartialShape{5, Dimension::dynamic()}); + auto indices = make_shared(element::i64, Shape{4}); + auto offsets = make_shared(element::i64, Shape{3}); + auto per_sample_weights = make_shared(element::f32, Shape{4}); + auto default_index = make_shared(element::i64, Shape{}); auto ebos = make_shared( emb_table, indices, offsets, default_index, per_sample_weights); @@ -56,12 +56,11 @@ TEST(type_prop, ebos_dynamic_emb_table) TEST(type_prop, ebos_dynamic_offsets) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::i64, Shape{4}); - auto offsets = - make_shared(element::Type_t::i64, PartialShape{Dimension::dynamic()}); - auto per_sample_weights = make_shared(element::Type_t::f32, Shape{4}); - auto default_index = make_shared(element::Type_t::i64, Shape{}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i64, Shape{4}); + auto offsets = make_shared(element::i64, PartialShape{Dimension::dynamic()}); + auto per_sample_weights = make_shared(element::f32, Shape{4}); + auto default_index = make_shared(element::i64, Shape{}); auto ebos = make_shared( emb_table, indices, offsets, default_index, per_sample_weights); @@ -73,12 +72,11 @@ TEST(type_prop, ebos_dynamic_offsets) TEST(type_prop, ebos_dynamic_emb_table_offsets) { auto emb_table = - make_shared(element::Type_t::f32, PartialShape{5, Dimension::dynamic()}); - auto indices = make_shared(element::Type_t::i64, Shape{4}); - auto offsets = - make_shared(element::Type_t::i64, PartialShape{Dimension::dynamic()}); - auto per_sample_weights = make_shared(element::Type_t::f32, Shape{4}); - auto default_index = make_shared(element::Type_t::i64, Shape{}); + make_shared(element::f32, PartialShape{5, Dimension::dynamic()}); + auto indices = make_shared(element::i64, Shape{4}); + auto offsets = make_shared(element::i64, PartialShape{Dimension::dynamic()}); + auto per_sample_weights = make_shared(element::f32, Shape{4}); + auto default_index = make_shared(element::i64, Shape{}); auto ebos = make_shared( emb_table, indices, offsets, default_index, per_sample_weights); @@ -89,11 +87,11 @@ TEST(type_prop, ebos_dynamic_emb_table_offsets) TEST(type_prop, ebos_fail_indices_element_type) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::f32, Shape{4}); - auto offsets = make_shared(element::Type_t::i64, Shape{3}); - auto per_sample_weights = make_shared(element::Type_t::f32, Shape{4}); - auto default_index = make_shared(element::Type_t::i64, Shape{}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::f32, Shape{4}); + auto offsets = make_shared(element::i64, Shape{3}); + auto per_sample_weights = make_shared(element::f32, Shape{4}); + auto default_index = make_shared(element::i64, Shape{}); try { @@ -113,11 +111,11 @@ TEST(type_prop, ebos_fail_indices_element_type) TEST(type_prop, ebos_fail_offsets_element_type) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::i64, Shape{4}); - auto offsets = make_shared(element::Type_t::f32, Shape{3}); - auto per_sample_weights = make_shared(element::Type_t::f32, Shape{4}); - auto default_index = make_shared(element::Type_t::i64, Shape{}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i64, Shape{4}); + auto offsets = make_shared(element::f32, Shape{3}); + auto per_sample_weights = make_shared(element::f32, Shape{4}); + auto default_index = make_shared(element::i64, Shape{}); try { @@ -137,11 +135,11 @@ TEST(type_prop, ebos_fail_offsets_element_type) TEST(type_prop, ebos_fail_default_index_element_type) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::i64, Shape{4}); - auto offsets = make_shared(element::Type_t::i64, Shape{3}); - auto per_sample_weights = make_shared(element::Type_t::f32, Shape{4}); - auto default_index = make_shared(element::Type_t::f32, Shape{}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i64, Shape{4}); + auto offsets = make_shared(element::i64, Shape{3}); + auto per_sample_weights = make_shared(element::f32, Shape{4}); + auto default_index = make_shared(element::f32, Shape{}); try { @@ -161,11 +159,11 @@ TEST(type_prop, ebos_fail_default_index_element_type) TEST(type_prop, ebos_fail_mismatch_element_type) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::i32, Shape{4}); - auto offsets = make_shared(element::Type_t::i64, Shape{3}); - auto per_sample_weights = make_shared(element::Type_t::f32, Shape{4}); - auto default_index = make_shared(element::Type_t::i64, Shape{}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i32, Shape{4}); + auto offsets = make_shared(element::i64, Shape{3}); + auto per_sample_weights = make_shared(element::f32, Shape{4}); + auto default_index = make_shared(element::i64, Shape{}); try { @@ -187,11 +185,11 @@ TEST(type_prop, ebos_fail_mismatch_element_type) TEST(type_prop, ebos_fail_mismatch_element_type_1) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::i64, Shape{4}); - auto offsets = make_shared(element::Type_t::i64, Shape{3}); - auto per_sample_weights = make_shared(element::Type_t::f32, Shape{4}); - auto default_index = make_shared(element::Type_t::i32, Shape{}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i64, Shape{4}); + auto offsets = make_shared(element::i64, Shape{3}); + auto per_sample_weights = make_shared(element::f32, Shape{4}); + auto default_index = make_shared(element::i32, Shape{}); try { @@ -213,11 +211,11 @@ TEST(type_prop, ebos_fail_mismatch_element_type_1) TEST(type_prop, ebos_fail_mismatch_element_type_2) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::i64, Shape{4}); - auto offsets = make_shared(element::Type_t::i64, Shape{3}); - auto per_sample_weights = make_shared(element::Type_t::i64, Shape{4}); - auto default_index = make_shared(element::Type_t::i64, Shape{}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i64, Shape{4}); + auto offsets = make_shared(element::i64, Shape{3}); + auto per_sample_weights = make_shared(element::i64, Shape{4}); + auto default_index = make_shared(element::i64, Shape{}); try { @@ -239,11 +237,11 @@ TEST(type_prop, ebos_fail_mismatch_element_type_2) TEST(type_prop, ebos_fail_mismatch_shape) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::i64, Shape{4}); - auto offsets = make_shared(element::Type_t::i64, Shape{3}); - auto per_sample_weights = make_shared(element::Type_t::f32, Shape{3}); - auto default_index = make_shared(element::Type_t::i64, Shape{}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i64, Shape{4}); + auto offsets = make_shared(element::i64, Shape{3}); + auto per_sample_weights = make_shared(element::f32, Shape{3}); + auto default_index = make_shared(element::i64, Shape{}); try { @@ -264,11 +262,11 @@ TEST(type_prop, ebos_fail_mismatch_shape) TEST(type_prop, ebos_fail_default_index_scalar) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::i64, Shape{4}); - auto offsets = make_shared(element::Type_t::i64, Shape{3}); - auto per_sample_weights = make_shared(element::Type_t::f32, Shape{4}); - auto default_index = make_shared(element::Type_t::i64, Shape{2}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i64, Shape{4}); + auto offsets = make_shared(element::i64, Shape{3}); + auto per_sample_weights = make_shared(element::f32, Shape{4}); + auto default_index = make_shared(element::i64, Shape{2}); try { @@ -288,11 +286,11 @@ TEST(type_prop, ebos_fail_default_index_scalar) TEST(type_prop, ebos_fail_indices_1d) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::i64, Shape{4, 2}); - auto offsets = make_shared(element::Type_t::i64, Shape{3}); - auto per_sample_weights = make_shared(element::Type_t::f32, Shape{4}); - auto default_index = make_shared(element::Type_t::i64, Shape{}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i64, Shape{4, 2}); + auto offsets = make_shared(element::i64, Shape{3}); + auto per_sample_weights = make_shared(element::f32, Shape{4}); + auto default_index = make_shared(element::i64, Shape{}); try { @@ -312,11 +310,11 @@ TEST(type_prop, ebos_fail_indices_1d) TEST(type_prop, ebos_fail_offsets_1d) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::i64, Shape{4}); - auto offsets = make_shared(element::Type_t::i64, Shape{3, 2}); - auto per_sample_weights = make_shared(element::Type_t::f32, Shape{4}); - auto default_index = make_shared(element::Type_t::i64, Shape{}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i64, Shape{4}); + auto offsets = make_shared(element::i64, Shape{3, 2}); + auto per_sample_weights = make_shared(element::f32, Shape{4}); + auto default_index = make_shared(element::i64, Shape{}); try { @@ -336,11 +334,11 @@ TEST(type_prop, ebos_fail_offsets_1d) TEST(type_prop, ebos_fail_per_sample_weights_1d) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::i64, Shape{4}); - auto offsets = make_shared(element::Type_t::i64, Shape{3}); - auto per_sample_weights = make_shared(element::Type_t::f32, Shape{4, 2}); - auto default_index = make_shared(element::Type_t::i64, Shape{}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i64, Shape{4}); + auto offsets = make_shared(element::i64, Shape{3}); + auto per_sample_weights = make_shared(element::f32, Shape{4, 2}); + auto default_index = make_shared(element::i64, Shape{}); try { @@ -360,22 +358,22 @@ TEST(type_prop, ebos_fail_per_sample_weights_1d) TEST(type_prop, ebos_3_args_api) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::i64, Shape{4}); - auto offsets = make_shared(element::Type_t::i64, Shape{3}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i64, Shape{4}); + auto offsets = make_shared(element::i64, Shape{3}); auto ebos = make_shared(emb_table, indices, offsets); EXPECT_TRUE(ebos->get_output_partial_shape(0).same_scheme(PartialShape{3, 2})); - EXPECT_EQ(ebos->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(ebos->get_output_element_type(0), element::f32); EXPECT_EQ(indices->get_partial_shape().rank().get_length(), 1); EXPECT_EQ(offsets->get_partial_shape().rank().get_length(), 1); } TEST(type_prop, ebos_fail_indices_element_type_3_args_api) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::f32, Shape{4}); - auto offsets = make_shared(element::Type_t::i64, Shape{3}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::f32, Shape{4}); + auto offsets = make_shared(element::i64, Shape{3}); try { diff --git a/ngraph/test/type_prop/embeddingbag_packedsum.cpp b/ngraph/test/type_prop/embeddingbag_packedsum.cpp index 6cb353399629aa..2ff631b51b3132 100644 --- a/ngraph/test/type_prop/embeddingbag_packedsum.cpp +++ b/ngraph/test/type_prop/embeddingbag_packedsum.cpp @@ -23,24 +23,24 @@ using namespace ngraph; TEST(type_prop, ebps) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::i64, Shape{3, 4}); - auto per_sample_weights = make_shared(element::Type_t::f32, Shape{3, 4}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i64, Shape{3, 4}); + auto per_sample_weights = make_shared(element::f32, Shape{3, 4}); auto ebps = make_shared(emb_table, indices, per_sample_weights); EXPECT_TRUE(ebps->get_output_partial_shape(0).same_scheme(PartialShape{3, 2})); EXPECT_TRUE(indices->get_partial_shape().same_scheme(per_sample_weights->get_partial_shape())); - EXPECT_EQ(ebps->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(ebps->get_output_element_type(0), element::f32); EXPECT_EQ(indices->get_partial_shape().rank().get_length(), 2); } TEST(type_prop, ebps_dynamic_emb_table) { auto emb_table = - make_shared(element::Type_t::f32, PartialShape{5, Dimension::dynamic()}); - auto indices = make_shared(element::Type_t::i64, Shape{3, 4}); - auto per_sample_weights = make_shared(element::Type_t::f32, Shape{3, 4}); - auto default_index = make_shared(element::Type_t::i64, Shape{}); + make_shared(element::f32, PartialShape{5, Dimension::dynamic()}); + auto indices = make_shared(element::i64, Shape{3, 4}); + auto per_sample_weights = make_shared(element::f32, Shape{3, 4}); + auto default_index = make_shared(element::i64, Shape{}); auto ebps = make_shared(emb_table, indices, per_sample_weights); @@ -50,11 +50,10 @@ TEST(type_prop, ebps_dynamic_emb_table) TEST(type_prop, ebps_dynamic_indices) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = - make_shared(element::Type_t::i64, PartialShape{Dimension::dynamic(), 4}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i64, PartialShape{Dimension::dynamic(), 4}); auto per_sample_weights = - make_shared(element::Type_t::f32, PartialShape{Dimension::dynamic(), 4}); + make_shared(element::f32, PartialShape{Dimension::dynamic(), 4}); auto ebps = make_shared(emb_table, indices, per_sample_weights); @@ -65,11 +64,10 @@ TEST(type_prop, ebps_dynamic_indices) TEST(type_prop, ebps_dynamic_emb_table_indices) { auto emb_table = - make_shared(element::Type_t::f32, PartialShape{5, Dimension::dynamic()}); - auto indices = - make_shared(element::Type_t::i64, PartialShape{Dimension::dynamic(), 4}); + make_shared(element::f32, PartialShape{5, Dimension::dynamic()}); + auto indices = make_shared(element::i64, PartialShape{Dimension::dynamic(), 4}); auto per_sample_weights = - make_shared(element::Type_t::f32, PartialShape{Dimension::dynamic(), 4}); + make_shared(element::f32, PartialShape{Dimension::dynamic(), 4}); auto ebps = make_shared(emb_table, indices, per_sample_weights); @@ -79,9 +77,9 @@ TEST(type_prop, ebps_dynamic_emb_table_indices) TEST(type_prop, ebps_fail_indices_element_type) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::f32, Shape{3, 4}); - auto per_sample_weights = make_shared(element::Type_t::f32, Shape{3, 4}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::f32, Shape{3, 4}); + auto per_sample_weights = make_shared(element::f32, Shape{3, 4}); try { @@ -101,9 +99,9 @@ TEST(type_prop, ebps_fail_indices_element_type) TEST(type_prop, ebps_fail_mismatch_element_type) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::i64, Shape{3, 4}); - auto per_sample_weights = make_shared(element::Type_t::i64, Shape{3, 4}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i64, Shape{3, 4}); + auto per_sample_weights = make_shared(element::i64, Shape{3, 4}); try { @@ -125,9 +123,9 @@ TEST(type_prop, ebps_fail_mismatch_element_type) TEST(type_prop, ebps_fail_mismatch_shape) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::i64, Shape{3, 4}); - auto per_sample_weights = make_shared(element::Type_t::f32, Shape{4, 3}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i64, Shape{3, 4}); + auto per_sample_weights = make_shared(element::f32, Shape{4, 3}); try { @@ -148,9 +146,9 @@ TEST(type_prop, ebps_fail_mismatch_shape) TEST(type_prop, ebps_fail_indices_1d) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::i64, Shape{4}); - auto per_sample_weights = make_shared(element::Type_t::f32, Shape{3, 4}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i64, Shape{4}); + auto per_sample_weights = make_shared(element::f32, Shape{3, 4}); try { @@ -170,9 +168,9 @@ TEST(type_prop, ebps_fail_indices_1d) TEST(type_prop, ebps_fail_per_sample_weights_1d) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::i64, Shape{3, 4}); - auto per_sample_weights = make_shared(element::Type_t::f32, Shape{4}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i64, Shape{3, 4}); + auto per_sample_weights = make_shared(element::f32, Shape{4}); try { @@ -192,19 +190,19 @@ TEST(type_prop, ebps_fail_per_sample_weights_1d) TEST(type_prop, ebps_2_args_api) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::i64, Shape{3, 4}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::i64, Shape{3, 4}); auto ebps = make_shared(emb_table, indices); EXPECT_TRUE(ebps->get_output_partial_shape(0).same_scheme(PartialShape{3, 2})); - EXPECT_EQ(ebps->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(ebps->get_output_element_type(0), element::f32); EXPECT_EQ(indices->get_partial_shape().rank().get_length(), 2); } TEST(type_prop, ebps_fail_indices_element_type_2_args_api) { - auto emb_table = make_shared(element::Type_t::f32, Shape{5, 2}); - auto indices = make_shared(element::Type_t::f32, Shape{3, 4}); + auto emb_table = make_shared(element::f32, Shape{5, 2}); + auto indices = make_shared(element::f32, Shape{3, 4}); try { @@ -219,4 +217,4 @@ TEST(type_prop, ebps_fail_indices_element_type_2_args_api) { FAIL() << "INDICES type check failed for unexpected reason"; } -} +} \ No newline at end of file diff --git a/ngraph/test/type_prop/extractimagepatches.cpp b/ngraph/test/type_prop/extractimagepatches.cpp index 1427dc74f1cb35..de01b066f8322a 100644 --- a/ngraph/test/type_prop/extractimagepatches.cpp +++ b/ngraph/test/type_prop/extractimagepatches.cpp @@ -23,7 +23,7 @@ using namespace ngraph; TEST(type_prop, extractimagepatches_i32) { - auto data = make_shared(element::Type_t::i32, Shape{64, 3, 10, 10}); + auto data = make_shared(element::i32, Shape{64, 3, 10, 10}); auto sizes = Shape{3, 3}; auto strides = Strides{5, 5}; auto rates = Shape{1, 1}; @@ -31,13 +31,13 @@ TEST(type_prop, extractimagepatches_i32) auto extractimagepatches = make_shared(data, sizes, strides, rates, padtype_padding); - EXPECT_EQ(extractimagepatches->get_output_element_type(0), element::Type_t::i32); + EXPECT_EQ(extractimagepatches->get_output_element_type(0), element::i32); EXPECT_EQ(extractimagepatches->get_output_shape(0), (Shape{64, 27, 2, 2})); } TEST(type_prop, extractimagepatches_i64) { - auto data = make_shared(element::Type_t::i64, Shape{64, 3, 10, 10}); + auto data = make_shared(element::i64, Shape{64, 3, 10, 10}); auto sizes = Shape{3, 3}; auto strides = Strides{5, 5}; auto rates = Shape{1, 1}; @@ -45,13 +45,13 @@ TEST(type_prop, extractimagepatches_i64) auto extractimagepatches = make_shared(data, sizes, strides, rates, padtype_padding); - EXPECT_EQ(extractimagepatches->get_output_element_type(0), element::Type_t::i64); + EXPECT_EQ(extractimagepatches->get_output_element_type(0), element::i64); EXPECT_EQ(extractimagepatches->get_output_shape(0), (Shape{64, 27, 2, 2})); } TEST(type_prop, extractimagepatches_rates_change) { - auto data = make_shared(element::Type_t::i32, Shape{64, 3, 10, 10}); + auto data = make_shared(element::i32, Shape{64, 3, 10, 10}); auto sizes = Shape{3, 3}; auto strides = Strides{5, 5}; auto rates = Shape{2, 2}; @@ -59,13 +59,13 @@ TEST(type_prop, extractimagepatches_rates_change) auto extractimagepatches = make_shared(data, sizes, strides, rates, padtype_padding); - EXPECT_EQ(extractimagepatches->get_output_element_type(0), element::Type_t::i32); + EXPECT_EQ(extractimagepatches->get_output_element_type(0), element::i32); EXPECT_EQ(extractimagepatches->get_output_shape(0), (Shape{64, 27, 2, 2})); } TEST(type_prop, extractimagepatches_input_shape_change) { - auto data = make_shared(element::Type_t::i32, Shape{64, 3, 9, 9}); + auto data = make_shared(element::i32, Shape{64, 3, 9, 9}); auto sizes = Shape{3, 3}; auto strides = Strides{5, 5}; auto rates = Shape{2, 2}; @@ -73,13 +73,13 @@ TEST(type_prop, extractimagepatches_input_shape_change) auto extractimagepatches = make_shared(data, sizes, strides, rates, padtype_padding); - EXPECT_EQ(extractimagepatches->get_output_element_type(0), element::Type_t::i32); + EXPECT_EQ(extractimagepatches->get_output_element_type(0), element::i32); EXPECT_EQ(extractimagepatches->get_output_shape(0), (Shape{64, 27, 1, 1})); } TEST(type_prop, extractimagepatches_dynamic_shape) { - auto data = make_shared(element::Type_t::i32, PartialShape::dynamic(4)); + auto data = make_shared(element::i32, PartialShape::dynamic(4)); auto sizes = Shape{3, 3}; auto strides = Strides{5, 5}; auto rates = Shape{2, 2}; @@ -87,15 +87,15 @@ TEST(type_prop, extractimagepatches_dynamic_shape) auto extractimagepatches = make_shared(data, sizes, strides, rates, padtype_padding); - EXPECT_EQ(extractimagepatches->get_output_element_type(0), element::Type_t::i32); + EXPECT_EQ(extractimagepatches->get_output_element_type(0), element::i32); EXPECT_TRUE( extractimagepatches->get_output_partial_shape(0).same_scheme(PartialShape::dynamic(4))); } TEST(type_prop, extractimagepatches_dynamic_batch_shape) { - auto data = make_shared(element::Type_t::i32, - PartialShape{Dimension::dynamic(), 3, 10, 10}); + auto data = + make_shared(element::i32, PartialShape{Dimension::dynamic(), 3, 10, 10}); auto sizes = Shape{3, 3}; auto strides = Strides{5, 5}; auto rates = Shape{1, 1}; @@ -103,14 +103,14 @@ TEST(type_prop, extractimagepatches_dynamic_batch_shape) auto extractimagepatches = make_shared(data, sizes, strides, rates, padtype_padding); - EXPECT_EQ(extractimagepatches->get_output_element_type(0), element::Type_t::i32); + EXPECT_EQ(extractimagepatches->get_output_element_type(0), element::i32); EXPECT_TRUE(extractimagepatches->get_output_partial_shape(0).same_scheme( PartialShape{Dimension::dynamic(), 27, 2, 2})); } TEST(type_prop, extractimagepatches_padding_same_lower1) { - auto data = make_shared(element::Type_t::i32, Shape{64, 3, 10, 10}); + auto data = make_shared(element::i32, Shape{64, 3, 10, 10}); auto sizes = Shape{3, 3}; auto strides = Strides{5, 5}; auto rates = Shape{1, 1}; @@ -118,13 +118,13 @@ TEST(type_prop, extractimagepatches_padding_same_lower1) auto extractimagepatches = make_shared(data, sizes, strides, rates, padtype_padding); - EXPECT_EQ(extractimagepatches->get_output_element_type(0), element::Type_t::i32); + EXPECT_EQ(extractimagepatches->get_output_element_type(0), element::i32); EXPECT_EQ(extractimagepatches->get_output_shape(0), (Shape{64, 27, 2, 2})); } TEST(type_prop, extractimagepatches_padding_same_lower2) { - auto data = make_shared(element::Type_t::i32, Shape{64, 3, 9, 9}); + auto data = make_shared(element::i32, Shape{64, 3, 9, 9}); auto sizes = Shape{3, 3}; auto strides = Strides{5, 5}; auto rates = Shape{1, 1}; @@ -132,12 +132,12 @@ TEST(type_prop, extractimagepatches_padding_same_lower2) auto extractimagepatches = make_shared(data, sizes, strides, rates, padtype_padding); - EXPECT_EQ(extractimagepatches->get_output_element_type(0), element::Type_t::i32); + EXPECT_EQ(extractimagepatches->get_output_element_type(0), element::i32); EXPECT_EQ(extractimagepatches->get_output_shape(0), (Shape{64, 27, 2, 2})); } TEST(type_prop, extractimagepatches_padding_same_upper) { - auto data = make_shared(element::Type_t::i32, Shape{64, 3, 11, 11}); + auto data = make_shared(element::i32, Shape{64, 3, 11, 11}); auto sizes = Shape{3, 3}; auto strides = Strides{5, 5}; auto rates = Shape{1, 1}; @@ -145,13 +145,13 @@ TEST(type_prop, extractimagepatches_padding_same_upper) auto extractimagepatches = make_shared(data, sizes, strides, rates, padtype_padding); - EXPECT_EQ(extractimagepatches->get_output_element_type(0), element::Type_t::i32); + EXPECT_EQ(extractimagepatches->get_output_element_type(0), element::i32); EXPECT_EQ(extractimagepatches->get_output_shape(0), (Shape{64, 27, 3, 3})); } TEST(type_prop, extractimagepatches_padding_same_upper2) { - auto data = make_shared(element::Type_t::i32, Shape{64, 3, 6, 11}); + auto data = make_shared(element::i32, Shape{64, 3, 6, 11}); auto sizes = Shape{3, 3}; auto strides = Strides{5, 5}; auto rates = Shape{1, 1}; @@ -159,13 +159,13 @@ TEST(type_prop, extractimagepatches_padding_same_upper2) auto extractimagepatches = make_shared(data, sizes, strides, rates, padtype_padding); - EXPECT_EQ(extractimagepatches->get_output_element_type(0), element::Type_t::i32); + EXPECT_EQ(extractimagepatches->get_output_element_type(0), element::i32); EXPECT_EQ(extractimagepatches->get_output_shape(0), (Shape{64, 27, 2, 3})); } TEST(type_prop, extractimagepatches_zero_dim_inputs) { - auto data = make_shared(element::Type_t::i32, Shape{64, 0, 0, 0}); + auto data = make_shared(element::i32, Shape{64, 0, 0, 0}); auto sizes = Shape{3, 3}; auto strides = Strides{5, 5}; auto rates = Shape{1, 1}; @@ -173,13 +173,13 @@ TEST(type_prop, extractimagepatches_zero_dim_inputs) auto extractimagepatches = make_shared(data, sizes, strides, rates, padtype_padding); - EXPECT_EQ(extractimagepatches->get_output_element_type(0), element::Type_t::i32); + EXPECT_EQ(extractimagepatches->get_output_element_type(0), element::i32); EXPECT_EQ(extractimagepatches->get_output_shape(0), (Shape{64, 0, 0, 0})); } TEST(type_prop, extractimagepatches_large_stride_valid_padding) { - auto data = make_shared(element::Type_t::i32, Shape{64, 3, 10, 10}); + auto data = make_shared(element::i32, Shape{64, 3, 10, 10}); auto sizes = Shape{3, 3}; auto strides = Strides{15, 15}; auto rates = Shape{1, 1}; @@ -187,13 +187,13 @@ TEST(type_prop, extractimagepatches_large_stride_valid_padding) auto extractimagepatches = make_shared(data, sizes, strides, rates, padtype_padding); - EXPECT_EQ(extractimagepatches->get_output_element_type(0), element::Type_t::i32); + EXPECT_EQ(extractimagepatches->get_output_element_type(0), element::i32); EXPECT_EQ(extractimagepatches->get_output_shape(0), (Shape{64, 27, 1, 1})); } TEST(type_prop, extractimagepatches_large_stride_same_padding) { - auto data = make_shared(element::Type_t::i32, Shape{64, 3, 10, 10}); + auto data = make_shared(element::i32, Shape{64, 3, 10, 10}); auto sizes = Shape{3, 3}; auto strides = Strides{15, 15}; auto rates = Shape{1, 1}; @@ -201,6 +201,6 @@ TEST(type_prop, extractimagepatches_large_stride_same_padding) auto extractimagepatches = make_shared(data, sizes, strides, rates, padtype_padding); - EXPECT_EQ(extractimagepatches->get_output_element_type(0), element::Type_t::i32); + EXPECT_EQ(extractimagepatches->get_output_element_type(0), element::i32); EXPECT_EQ(extractimagepatches->get_output_shape(0), (Shape{64, 27, 1, 1})); } diff --git a/ngraph/test/type_prop/fake_quantize.cpp b/ngraph/test/type_prop/fake_quantize.cpp index 6fba5c2b5c7eb9..9af0464d2df03f 100644 --- a/ngraph/test/type_prop/fake_quantize.cpp +++ b/ngraph/test/type_prop/fake_quantize.cpp @@ -23,41 +23,41 @@ using namespace ngraph; TEST(type_prop, fake_quantize) { - const auto data = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - const auto input_low = make_shared(element::Type_t::f32, Shape{}); - const auto input_high = make_shared(element::Type_t::f32, Shape{}); - const auto output_low = make_shared(element::Type_t::f32, Shape{}); - const auto output_high = make_shared(element::Type_t::f32, Shape{}); + const auto data = make_shared(element::f32, Shape{1, 2, 3, 4}); + const auto input_low = make_shared(element::f32, Shape{}); + const auto input_high = make_shared(element::f32, Shape{}); + const auto output_low = make_shared(element::f32, Shape{}); + const auto output_high = make_shared(element::f32, Shape{}); const int levels = 5; const auto fake_quantize = make_shared(data, input_low, input_high, output_low, output_high, levels); - EXPECT_EQ(fake_quantize->get_element_type(), element::Type_t::f32); + EXPECT_EQ(fake_quantize->get_element_type(), element::f32); EXPECT_EQ(fake_quantize->get_shape(), (Shape{1, 2, 3, 4})); } TEST(type_prop, fake_quantize_autob) { - const auto data = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - const auto input_low = make_shared(element::Type_t::f32, Shape{3, 1}); - const auto input_high = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - const auto output_low = make_shared(element::Type_t::f32, Shape{4}); - const auto output_high = make_shared(element::Type_t::f32, Shape{}); + const auto data = make_shared(element::f32, Shape{1, 2, 3, 4}); + const auto input_low = make_shared(element::f32, Shape{3, 1}); + const auto input_high = make_shared(element::f32, Shape{1, 2, 3, 4}); + const auto output_low = make_shared(element::f32, Shape{4}); + const auto output_high = make_shared(element::f32, Shape{}); const int levels = 5; const auto fake_quantize = make_shared(data, input_low, input_high, output_low, output_high, levels); - EXPECT_EQ(fake_quantize->get_element_type(), element::Type_t::f32); + EXPECT_EQ(fake_quantize->get_element_type(), element::f32); EXPECT_EQ(fake_quantize->get_shape(), (Shape{1, 2, 3, 4})); } TEST(type_prop, fake_quantize_invalid_autob) { - const auto data = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - auto input_low = make_shared(element::Type_t::f32, Shape{3}); - auto input_high = make_shared(element::Type_t::f32, Shape{}); - auto output_low = make_shared(element::Type_t::f32, Shape{}); - auto output_high = make_shared(element::Type_t::f32, Shape{}); + const auto data = make_shared(element::f32, Shape{1, 2, 3, 4}); + auto input_low = make_shared(element::f32, Shape{3}); + auto input_high = make_shared(element::f32, Shape{}); + auto output_low = make_shared(element::f32, Shape{}); + auto output_high = make_shared(element::f32, Shape{}); const int levels = 5; try diff --git a/ngraph/test/type_prop/gather.cpp b/ngraph/test/type_prop/gather.cpp index 48e28a10645575..7d74cdf196e449 100644 --- a/ngraph/test/type_prop/gather.cpp +++ b/ngraph/test/type_prop/gather.cpp @@ -28,11 +28,11 @@ TEST(type_prop, gather_axis_0) Shape params_shape{3, 2}; Shape indices_shape{2, 2}; Shape out_shape{2, 2, 2}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); - auto A = op::Constant::create(element::Type_t::i64, Shape{}, {0}); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); + auto A = op::Constant::create(element::i64, Shape{}, {0}); auto G = make_shared(P, I, A); - ASSERT_EQ(G->get_element_type(), element::Type_t::f32); + ASSERT_EQ(G->get_element_type(), element::f32); ASSERT_EQ(G->get_shape(), out_shape); ASSERT_EQ(G->get_axis(), 0); } @@ -42,20 +42,20 @@ TEST(type_prop, gather_axis_1) Shape params_shape{3, 3}; Shape indices_shape{1, 2}; Shape out_shape{3, 1, 2}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); - auto A = op::Constant::create(element::Type_t::i64, Shape{}, {1}); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); + auto A = op::Constant::create(element::i64, Shape{}, {1}); auto G = make_shared(P, I, A); - ASSERT_EQ(G->get_element_type(), element::Type_t::f32); + ASSERT_EQ(G->get_element_type(), element::f32); ASSERT_EQ(G->get_shape(), out_shape); ASSERT_EQ(G->get_axis(), 1); } TEST(type_prop, gather_v1_incorrect_axis_shape) { - auto params = make_shared(element::Type_t::f32, Shape{5, 6}); - auto indices = make_shared(element::Type_t::i64, Shape{4}); - auto axis = make_shared(element::Type_t::i64, Shape{2}); + auto params = make_shared(element::f32, Shape{5, 6}); + auto indices = make_shared(element::i64, Shape{4}); + auto axis = make_shared(element::i64, Shape{2}); try { auto G = make_shared(params, indices, axis); @@ -75,9 +75,9 @@ TEST(type_prop, gather_v1_incorrect_axis_shape) TEST(type_prop, gather_v1_axis_out_of_input_rank) { - auto params = make_shared(element::Type_t::f32, Shape{5, 6}); - auto indices = make_shared(element::Type_t::i64, Shape{4}); - auto axis = make_shared(element::Type_t::i64, Shape{1}, vector{2}); + auto params = make_shared(element::f32, Shape{5, 6}); + auto indices = make_shared(element::i64, Shape{4}); + auto axis = make_shared(element::i64, Shape{1}, vector{2}); try { auto G = make_shared(params, indices, axis); @@ -97,11 +97,10 @@ TEST(type_prop, gather_v1_axis_out_of_input_rank) TEST(type_prop, gather_v1_negative_axis) { - auto params = make_shared(element::Type_t::f32, Shape{5, 6, 7}); - auto indices = make_shared(element::Type_t::i64, Shape{4}); + auto params = make_shared(element::f32, Shape{5, 6, 7}); + auto indices = make_shared(element::i64, Shape{4}); int64_t axis = -2; - auto axis_node = - make_shared(element::Type_t::i64, Shape{1}, vector{axis}); + auto axis_node = make_shared(element::i64, Shape{1}, vector{axis}); auto gather_v1 = make_shared(params, indices, axis_node); ASSERT_EQ(gather_v1->get_axis(), 1); } diff --git a/ngraph/test/type_prop/gather_nd.cpp b/ngraph/test/type_prop/gather_nd.cpp index 6501d7f0e4ec17..ea4c6d2307071a 100644 --- a/ngraph/test/type_prop/gather_nd.cpp +++ b/ngraph/test/type_prop/gather_nd.cpp @@ -28,10 +28,10 @@ TEST(type_prop, gather_nd_slices_from_4d_batch_dims0) Shape params_shape{2, 3, 11, 12}; Shape indices_shape{2, 3, 2}; Shape out_shape{2, 3, 11, 12}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); auto G5 = make_shared(P, I, 0); - ASSERT_EQ(G5->get_element_type(), element::Type_t::f32); + ASSERT_EQ(G5->get_element_type(), element::f32); ASSERT_EQ(G5->get_shape(), out_shape); } @@ -40,10 +40,10 @@ TEST(type_prop, gather_nd_scalars_from_4d_batch_dims2) Shape params_shape{2, 3, 11, 12}; Shape indices_shape{2, 3, 2}; Shape out_shape{6}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); auto G5 = make_shared(P, I, 2); - ASSERT_EQ(G5->get_element_type(), element::Type_t::f32); + ASSERT_EQ(G5->get_element_type(), element::f32); ASSERT_EQ(G5->get_shape(), out_shape); } @@ -52,10 +52,10 @@ TEST(type_prop, gather_nd_slices_from_5d_batch_dims2) Shape params_shape{7, 5, 11, 12, 32}; Shape indices_shape{7, 5, 3, 1}; Shape out_shape{35, 3, 12, 32}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); auto G5 = make_shared(P, I, 2); - ASSERT_EQ(G5->get_element_type(), element::Type_t::f32); + ASSERT_EQ(G5->get_element_type(), element::f32); ASSERT_EQ(G5->get_shape(), out_shape); } @@ -64,10 +64,10 @@ TEST(type_prop, gather_nd_batch_dim2_with_dyn_dim) PartialShape params_shape{7, Dimension::dynamic(), 11, 12, 32}; Shape indices_shape{7, 5, 3, 1}; Shape out_shape{35, 3, 12, 32}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); auto G5 = make_shared(P, I, 2); - ASSERT_EQ(G5->get_element_type(), element::Type_t::f32); + ASSERT_EQ(G5->get_element_type(), element::f32); ASSERT_EQ(G5->get_shape(), out_shape); } @@ -76,10 +76,10 @@ TEST(type_prop, gather_nd_batch_dim2_with_dyn_dim2) PartialShape params_shape{7, Dimension::dynamic(), Dimension::dynamic(), 12, 32}; Shape indices_shape{7, 5, 3, 1}; Shape out_shape{35, 3, 12, 32}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); auto G5 = make_shared(P, I, 2); - ASSERT_EQ(G5->get_element_type(), element::Type_t::f32); + ASSERT_EQ(G5->get_element_type(), element::f32); ASSERT_EQ(G5->get_shape(), out_shape); } @@ -89,10 +89,10 @@ TEST(type_prop, gather_nd_batch_dim2_with_dyn_dim3) 7, Dimension::dynamic(), Dimension::dynamic(), 12, Dimension::dynamic()}; Shape indices_shape{7, 5, 3, 1}; PartialShape out_shape{35, 3, 12, Dimension::dynamic()}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); auto G5 = make_shared(P, I, 2); - ASSERT_EQ(G5->get_element_type(), element::Type_t::f32); + ASSERT_EQ(G5->get_element_type(), element::f32); ASSERT_TRUE(G5->get_output_partial_shape(0).same_scheme(out_shape)); } @@ -101,10 +101,10 @@ TEST(type_prop, gather_nd_batch_dim0_with_dyn_ind_dim) PartialShape params_shape{ 7, Dimension::dynamic(), Dimension::dynamic(), 12, Dimension::dynamic()}; PartialShape indices_shape{7, 5, 3, Dimension::dynamic()}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); auto G5 = make_shared(P, I, 0); - ASSERT_EQ(G5->get_element_type(), element::Type_t::f32); + ASSERT_EQ(G5->get_element_type(), element::f32); ASSERT_TRUE(G5->get_output_partial_shape(0).same_scheme(PartialShape::dynamic())); } @@ -112,8 +112,8 @@ TEST(type_prop, gather_nd_fail_batch_dims_greater_indices_rank) { Shape params_shape{2, 3, 4, 5}; Shape indices_shape{2, 1}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); try { @@ -137,8 +137,8 @@ TEST(type_prop, gather_nd_fail_unequal_batch_dims) { Shape params_shape{2, 3, 4, 5}; Shape indices_shape{2, 1, 4}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); try { @@ -161,8 +161,8 @@ TEST(type_prop, gather_nd_fail_indices_tuple_greater_data_rank_batch_dims2) { Shape params_shape{2, 1, 4, 5}; Shape indices_shape{2, 1, 5, 3}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); try { @@ -189,11 +189,11 @@ TEST(type_prop, gather_nd_scalar_from_2d) Shape params_shape{2, 2}; Shape indices_shape{2, 2}; Shape out_shape{2}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); auto G5 = make_shared(P, I); - ASSERT_EQ(G5->get_element_type(), element::Type_t::f32); + ASSERT_EQ(G5->get_element_type(), element::f32); ASSERT_EQ(G5->get_shape(), out_shape); } @@ -202,11 +202,11 @@ TEST(type_prop, gather_nd_1d_from_2d) Shape params_shape{2, 2}; Shape indices_shape{2, 1}; Shape out_shape{2, 2}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); auto G5 = make_shared(P, I); - ASSERT_EQ(G5->get_element_type(), element::Type_t::f32); + ASSERT_EQ(G5->get_element_type(), element::f32); ASSERT_EQ(G5->get_shape(), out_shape); } @@ -215,11 +215,11 @@ TEST(type_prop, gather_nd_scalar_from_3d) Shape params_shape{2, 2, 2}; Shape indices_shape{2, 3}; Shape out_shape{2}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); auto G5 = make_shared(P, I); - ASSERT_EQ(G5->get_element_type(), element::Type_t::f32); + ASSERT_EQ(G5->get_element_type(), element::f32); ASSERT_EQ(G5->get_shape(), out_shape); } @@ -228,11 +228,11 @@ TEST(type_prop, gather_nd_1d_from_3d) Shape params_shape{2, 2, 2}; Shape indices_shape{2, 2}; Shape out_shape{2, 2}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); auto G5 = make_shared(P, I); - ASSERT_EQ(G5->get_element_type(), element::Type_t::f32); + ASSERT_EQ(G5->get_element_type(), element::f32); ASSERT_EQ(G5->get_shape(), out_shape); } @@ -241,11 +241,11 @@ TEST(type_prop, gather_nd_2d_from_3d) Shape params_shape{2, 2, 2}; Shape indices_shape{1, 1}; Shape out_shape{1, 2, 2}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); auto G5 = make_shared(P, I); - ASSERT_EQ(G5->get_element_type(), element::Type_t::f32); + ASSERT_EQ(G5->get_element_type(), element::f32); ASSERT_EQ(G5->get_shape(), out_shape); } @@ -254,11 +254,11 @@ TEST(type_prop, gather_nd_batch_scalar_from_2d) Shape params_shape{2, 2}; Shape indices_shape{2, 1, 2}; Shape out_shape{2, 1}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); auto G5 = make_shared(P, I); - ASSERT_EQ(G5->get_element_type(), element::Type_t::f32); + ASSERT_EQ(G5->get_element_type(), element::f32); ASSERT_EQ(G5->get_shape(), out_shape); } @@ -267,11 +267,11 @@ TEST(type_prop, gather_nd_batch_1d_from_2d) Shape params_shape{2, 2}; Shape indices_shape{2, 1, 1}; Shape out_shape{2, 1, 2}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); auto G5 = make_shared(P, I); - ASSERT_EQ(G5->get_element_type(), element::Type_t::f32); + ASSERT_EQ(G5->get_element_type(), element::f32); ASSERT_EQ(G5->get_shape(), out_shape); } @@ -280,11 +280,11 @@ TEST(type_prop, gather_nd_batch_scalar_from_3d) Shape params_shape{2, 2, 2}; Shape indices_shape{2, 2, 3}; Shape out_shape{2, 2}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); auto G5 = make_shared(P, I); - ASSERT_EQ(G5->get_element_type(), element::Type_t::f32); + ASSERT_EQ(G5->get_element_type(), element::f32); ASSERT_EQ(G5->get_shape(), out_shape); } @@ -293,11 +293,11 @@ TEST(type_prop, gather_nd_batch_1d_from_3d) Shape params_shape{2, 2, 2}; Shape indices_shape{2, 2, 2}; Shape out_shape{2, 2, 2}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); auto G5 = make_shared(P, I); - ASSERT_EQ(G5->get_element_type(), element::Type_t::f32); + ASSERT_EQ(G5->get_element_type(), element::f32); ASSERT_EQ(G5->get_shape(), out_shape); } @@ -306,11 +306,11 @@ TEST(type_prop, gather_nd_batch_2d_from_3d) Shape params_shape{2, 2, 2}; Shape indices_shape{2, 1, 1}; Shape out_shape{2, 1, 2, 2}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); auto G5 = make_shared(P, I); - ASSERT_EQ(G5->get_element_type(), element::Type_t::f32); + ASSERT_EQ(G5->get_element_type(), element::f32); ASSERT_EQ(G5->get_shape(), out_shape); } @@ -319,8 +319,8 @@ TEST(type_prop, gather_nd_fail_params_rank) Shape params_shape{}; Shape indices_shape{2, 1, 1}; Shape out_shape{2, 1, 2, 2}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); try { @@ -343,8 +343,8 @@ TEST(type_prop, gather_nd_fail_indices_rank) Shape params_shape{2, 2, 2}; Shape indices_shape{}; Shape out_shape{2, 1, 2, 2}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::i32, indices_shape); try { @@ -367,8 +367,8 @@ TEST(type_prop, gather_nd_fail_indices_element_type) Shape params_shape{2, 2, 2}; Shape indices_shape{2, 1, 1}; Shape out_shape{2, 1, 2, 2}; - auto P = make_shared(element::Type_t::f32, params_shape); - auto I = make_shared(element::Type_t::f32, indices_shape); + auto P = make_shared(element::f32, params_shape); + auto I = make_shared(element::f32, indices_shape); try { diff --git a/ngraph/test/type_prop/gather_tree.cpp b/ngraph/test/type_prop/gather_tree.cpp index eb3e71200e465b..7cca7206a94ba0 100644 --- a/ngraph/test/type_prop/gather_tree.cpp +++ b/ngraph/test/type_prop/gather_tree.cpp @@ -23,24 +23,24 @@ using namespace ngraph; TEST(type_prop, gather_tree_output_shape) { - auto step_ids = make_shared(element::Type_t::i64, Shape{1, 2, 3}); - auto parent_idx = make_shared(element::Type_t::i64, Shape{1, 2, 3}); - auto max_seq_len = make_shared(element::Type_t::i64, Shape{1}); - auto end_token = make_shared(element::Type_t::i64, Shape{}); + auto step_ids = make_shared(element::i64, Shape{1, 2, 3}); + auto parent_idx = make_shared(element::i64, Shape{1, 2, 3}); + auto max_seq_len = make_shared(element::i64, Shape{1}); + auto end_token = make_shared(element::i64, Shape{}); auto gather_tree = make_shared(step_ids, parent_idx, max_seq_len, end_token); ASSERT_EQ(gather_tree->get_output_shape(0), (Shape{1, 2, 3})); - ASSERT_EQ(gather_tree->get_output_element_type(0), element::Type_t::i64); + ASSERT_EQ(gather_tree->get_output_element_type(0), element::i64); } TEST(type_prop, gather_tree_pooling_step_ids_invalid_rank) { - auto step_ids = make_shared(element::Type_t::i64, Shape{1, 2, 3, 4}); - auto parent_idx = make_shared(element::Type_t::i64, Shape{1, 2, 3}); - auto max_seq_len = make_shared(element::Type_t::i64, Shape{1}); - auto end_token = make_shared(element::Type_t::i64, Shape{}); + auto step_ids = make_shared(element::i64, Shape{1, 2, 3, 4}); + auto parent_idx = make_shared(element::i64, Shape{1, 2, 3}); + auto max_seq_len = make_shared(element::i64, Shape{1}); + auto end_token = make_shared(element::i64, Shape{}); try { auto gather_tree = @@ -61,10 +61,10 @@ TEST(type_prop, gather_tree_pooling_step_ids_invalid_rank) TEST(type_prop, gather_tree_parent_idx_invalid_rank) { - auto step_ids = make_shared(element::Type_t::i64, Shape{1, 2, 3}); - auto parent_idx = make_shared(element::Type_t::i64, Shape{1, 2, 3, 4}); - auto max_seq_len = make_shared(element::Type_t::i64, Shape{1}); - auto end_token = make_shared(element::Type_t::i64, Shape{}); + auto step_ids = make_shared(element::i64, Shape{1, 2, 3}); + auto parent_idx = make_shared(element::i64, Shape{1, 2, 3, 4}); + auto max_seq_len = make_shared(element::i64, Shape{1}); + auto end_token = make_shared(element::i64, Shape{}); try { auto gather_tree = @@ -86,10 +86,10 @@ TEST(type_prop, gather_tree_parent_idx_invalid_rank) TEST(type_prop, gather_tree_max_seq_len_invalid_rank) { - auto step_ids = make_shared(element::Type_t::i64, Shape{1, 2, 3}); - auto parent_idx = make_shared(element::Type_t::i64, Shape{1, 2, 3}); - auto max_seq_len = make_shared(element::Type_t::i64, Shape{1, 2}); - auto end_token = make_shared(element::Type_t::i64, Shape{}); + auto step_ids = make_shared(element::i64, Shape{1, 2, 3}); + auto parent_idx = make_shared(element::i64, Shape{1, 2, 3}); + auto max_seq_len = make_shared(element::i64, Shape{1, 2}); + auto end_token = make_shared(element::i64, Shape{}); try { auto gather_tree = @@ -111,10 +111,10 @@ TEST(type_prop, gather_tree_max_seq_len_invalid_rank) TEST(type_prop, gather_tree_end_token_invalid_rank) { - auto step_ids = make_shared(element::Type_t::i64, Shape{1, 2, 3}); - auto parent_idx = make_shared(element::Type_t::i64, Shape{1, 2, 3}); - auto max_seq_len = make_shared(element::Type_t::i64, Shape{1}); - auto end_token = make_shared(element::Type_t::i64, Shape{1}); + auto step_ids = make_shared(element::i64, Shape{1, 2, 3}); + auto parent_idx = make_shared(element::i64, Shape{1, 2, 3}); + auto max_seq_len = make_shared(element::i64, Shape{1}); + auto end_token = make_shared(element::i64, Shape{1}); try { auto gather_tree = diff --git a/ngraph/test/type_prop/grn.cpp b/ngraph/test/type_prop/grn.cpp index 4a5441c479545f..ba91245c45126d 100644 --- a/ngraph/test/type_prop/grn.cpp +++ b/ngraph/test/type_prop/grn.cpp @@ -25,17 +25,17 @@ TEST(type_prop, grn) { float bias = 1.25f; Shape data_shape{2, 3, 4, 5}; - auto A = make_shared(element::Type_t::f32, data_shape); + auto A = make_shared(element::f32, data_shape); auto grn = make_shared(A, bias); - ASSERT_EQ(grn->get_element_type(), element::Type_t::f32); + ASSERT_EQ(grn->get_element_type(), element::f32); ASSERT_EQ(grn->get_shape(), data_shape); } TEST(type_prop, grn_invalid_data_rank) { float bias = 1.25f; - auto A = make_shared(element::Type_t::f32, Shape{4}); + auto A = make_shared(element::f32, Shape{4}); try { @@ -53,7 +53,7 @@ TEST(type_prop, grn_invalid_data_rank) FAIL() << "Deduced type check failed for unexpected reason"; } - A = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4, 5}); + A = make_shared(element::f32, Shape{1, 2, 3, 4, 5}); try { diff --git a/ngraph/test/type_prop/group_convolution.cpp b/ngraph/test/type_prop/group_convolution.cpp index 62ec12d83fd0a9..054c1864a2da8e 100644 --- a/ngraph/test/type_prop/group_convolution.cpp +++ b/ngraph/test/type_prop/group_convolution.cpp @@ -31,8 +31,8 @@ TEST(type_prop, group_conv_v1_partial_auto_padding_same_lower) Strides dilations{1, 1}; const auto auto_pad = op::PadType::SAME_LOWER; - auto data_batch = make_shared(element::Type_t::f32, data_batch_shape); - auto filters = make_shared(element::Type_t::f32, filters_shape); + auto data_batch = make_shared(element::f32, data_batch_shape); + auto filters = make_shared(element::f32, filters_shape); auto conv = make_shared( data_batch, filters, strides, pads_begin, pads_end, dilations, auto_pad); @@ -52,8 +52,8 @@ TEST(type_prop, group_conv_v1_partial_auto_padding_same_upper) Strides dilations{1, 1}; const auto auto_pad = op::PadType::SAME_UPPER; - auto data_batch = make_shared(element::Type_t::f32, data_batch_shape); - auto filters = make_shared(element::Type_t::f32, filters_shape); + auto data_batch = make_shared(element::f32, data_batch_shape); + auto filters = make_shared(element::f32, filters_shape); auto conv = make_shared( data_batch, filters, strides, pads_begin, pads_end, dilations, auto_pad); @@ -73,8 +73,8 @@ TEST(type_prop, group_conv_v1_partial_auto_padding_same_lower_nc_dims_dynamic) Strides dilations{1, 1}; const auto auto_pad = op::PadType::SAME_LOWER; - auto data_batch = make_shared(element::Type_t::f32, data_batch_shape); - auto filters = make_shared(element::Type_t::f32, filters_shape); + auto data_batch = make_shared(element::f32, data_batch_shape); + auto filters = make_shared(element::f32, filters_shape); auto conv = make_shared( data_batch, filters, strides, pads_begin, pads_end, dilations, auto_pad); @@ -94,8 +94,8 @@ TEST(type_prop, group_conv_v1_partial_auto_padding_same_upper_nc_dims_dynamic) Strides dilations{1, 1}; const auto auto_pad = op::PadType::SAME_UPPER; - auto data_batch = make_shared(element::Type_t::f32, data_batch_shape); - auto filters = make_shared(element::Type_t::f32, filters_shape); + auto data_batch = make_shared(element::f32, data_batch_shape); + auto filters = make_shared(element::f32, filters_shape); auto conv = make_shared( data_batch, filters, strides, pads_begin, pads_end, dilations, auto_pad); @@ -115,8 +115,8 @@ TEST(type_prop, group_conv_v1_partial_auto_padding_same_spatial_dims_dynamic) Strides dilations{1, 1}; const auto auto_pad = op::PadType::SAME_LOWER; - auto data_batch = make_shared(element::Type_t::f32, data_batch_shape); - auto filters = make_shared(element::Type_t::f32, filters_shape); + auto data_batch = make_shared(element::f32, data_batch_shape); + auto filters = make_shared(element::f32, filters_shape); auto conv = make_shared( data_batch, filters, strides, pads_begin, pads_end, dilations, auto_pad); diff --git a/ngraph/test/type_prop/group_convolution_backprop_data.cpp b/ngraph/test/type_prop/group_convolution_backprop_data.cpp index b792a489350955..dc5422bc155ba2 100644 --- a/ngraph/test/type_prop/group_convolution_backprop_data.cpp +++ b/ngraph/test/type_prop/group_convolution_backprop_data.cpp @@ -24,12 +24,12 @@ using namespace ngraph; TEST(type_prop, group_conv_backprop_data) { // GROUPS x C_IN x C_OUT x kH x kW - const auto weights = make_shared(element::Type_t::f32, Shape{2, 8, 2, 3, 3}); + const auto weights = make_shared(element::f32, Shape{2, 8, 2, 3, 3}); // N x C_IN * GROUPS x H x W - const auto data = make_shared(element::Type_t::f32, Shape{1, 16, 6, 6}); + const auto data = make_shared(element::f32, Shape{1, 16, 6, 6}); const auto gcbd = make_shared( data, weights, Strides{}, CoordinateDiff{}, CoordinateDiff{}, Strides{}); - EXPECT_EQ(gcbd->get_element_type(), element::Type_t::f32); + EXPECT_EQ(gcbd->get_element_type(), element::f32); EXPECT_EQ(gcbd->get_output_shape(0), (Shape{1, 4, 8, 8})); EXPECT_EQ(gcbd->get_strides(), (Strides{1, 1})); EXPECT_EQ(gcbd->get_dilations(), (Strides{1, 1})); @@ -42,14 +42,14 @@ TEST(type_prop, group_conv_backprop_data) TEST(type_prop, group_conv_backprop_data_output_shape) { // N x C_IN * GROUPS x H x W - const auto data = make_shared(element::Type_t::f32, Shape{1, 16, 5, 5}); + const auto data = make_shared(element::f32, Shape{1, 16, 5, 5}); // GROUPS x C_IN x C_OUT x kH x kW - const auto weights = make_shared(element::Type_t::f32, Shape{1, 16, 2, 3, 3}); - const auto output_shape = op::Constant::create(element::Type_t::i64, Shape{2}, {3, 3}); + const auto weights = make_shared(element::f32, Shape{1, 16, 2, 3, 3}); + const auto output_shape = op::Constant::create(element::i64, Shape{2}, {3, 3}); const auto gcbd = make_shared( data, weights, output_shape, Strides{}, Strides{}, op::PadType::SAME_UPPER); - EXPECT_EQ(gcbd->get_element_type(), element::Type_t::f32); + EXPECT_EQ(gcbd->get_element_type(), element::f32); EXPECT_EQ(gcbd->get_output_shape(0), (Shape{1, 2, 3, 3})); EXPECT_EQ(gcbd->get_strides(), (Strides{1, 1})); EXPECT_EQ(gcbd->get_dilations(), (Strides{1, 1})); @@ -62,9 +62,9 @@ TEST(type_prop, group_conv_backprop_data_output_shape) TEST(type_prop, group_conv_bprop_data_v1_output_partial_shape_dynamic_static_rank) { PartialShape shape_filter{4, 5, 2, 3, 3}; - auto filters = make_shared(element::Type_t::f32, shape_filter); + auto filters = make_shared(element::f32, shape_filter); PartialShape shape_data{Dimension(), 20, 224, 224}; - auto data = make_shared(element::Type_t::f32, shape_data); + auto data = make_shared(element::f32, shape_data); auto strides = Strides{2, 2}; auto dilations = Strides{1, 1}; auto padding_begin = CoordinateDiff{1, 1}; @@ -83,9 +83,9 @@ TEST(type_prop, group_conv_bprop_data_v1_output_partial_shape_dynamic_static_ran TEST(type_prop, group_conv_backprop_data_invalid_params) { // GROUPS x C_IN x C_OUT x kH x kW - auto weights = make_shared(element::Type_t::f32, Shape{21, 16, 20, 3, 3}); + auto weights = make_shared(element::f32, Shape{21, 16, 20, 3, 3}); // N x C_IN * GROUPS x H x W - const auto data = make_shared(element::Type_t::f32, Shape{1, 16, 5, 5}); + const auto data = make_shared(element::f32, Shape{1, 16, 5, 5}); try { @@ -105,7 +105,7 @@ TEST(type_prop, group_conv_backprop_data_invalid_params) } // GROUPS x C_IN x C_OUT x kH x kW - weights = make_shared(element::Type_t::f32, Shape{4, 16, 20, 3, 3}); + weights = make_shared(element::f32, Shape{4, 16, 20, 3, 3}); try { @@ -126,7 +126,7 @@ TEST(type_prop, group_conv_backprop_data_invalid_params) } // GROUPS x C_IN x C_OUT x kH x kW - weights = make_shared(element::Type_t::f32, Shape{4, 4, 20, 3, 3}); + weights = make_shared(element::f32, Shape{4, 4, 20, 3, 3}); try { diff --git a/ngraph/test/type_prop/gru_cell.cpp b/ngraph/test/type_prop/gru_cell.cpp index ef2969e3146a91..a7b3558b908791 100644 --- a/ngraph/test/type_prop/gru_cell.cpp +++ b/ngraph/test/type_prop/gru_cell.cpp @@ -29,16 +29,15 @@ TEST(type_prop, gru_cell) const size_t hidden_size = 3; const size_t gates_count = 3; - const auto X = make_shared(element::Type_t::f32, Shape{batch_size, input_size}); - const auto W = make_shared(element::Type_t::f32, - Shape{gates_count * hidden_size, input_size}); - const auto R = make_shared(element::Type_t::f32, - Shape{gates_count * hidden_size, hidden_size}); - const auto H_t = - make_shared(element::Type_t::f32, Shape{batch_size, hidden_size}); + const auto X = make_shared(element::f32, Shape{batch_size, input_size}); + const auto W = + make_shared(element::f32, Shape{gates_count * hidden_size, input_size}); + const auto R = + make_shared(element::f32, Shape{gates_count * hidden_size, hidden_size}); + const auto H_t = make_shared(element::f32, Shape{batch_size, hidden_size}); const auto gru_cell = make_shared(X, H_t, W, R, hidden_size); - EXPECT_EQ(gru_cell->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(gru_cell->get_output_element_type(0), element::f32); EXPECT_EQ(gru_cell->get_output_shape(0), (Shape{batch_size, hidden_size})); } @@ -49,13 +48,13 @@ TEST(type_prop, gru_cell_invalid_input) const size_t hidden_size = 3; const size_t gates_count = 3; - const auto X = make_shared(element::Type_t::f32, Shape{batch_size, input_size}); - auto R = make_shared(element::Type_t::f32, - Shape{gates_count * hidden_size, hidden_size}); - auto H_t = make_shared(element::Type_t::f32, Shape{batch_size, hidden_size}); + const auto X = make_shared(element::f32, Shape{batch_size, input_size}); + auto R = + make_shared(element::f32, Shape{gates_count * hidden_size, hidden_size}); + auto H_t = make_shared(element::f32, Shape{batch_size, hidden_size}); // Invalid W tensor shape. - auto W = make_shared(element::Type_t::f32, Shape{hidden_size, input_size}); + auto W = make_shared(element::f32, Shape{hidden_size, input_size}); try { const auto gru_cell = make_shared(X, H_t, W, R, hidden_size); @@ -68,9 +67,8 @@ TEST(type_prop, gru_cell_invalid_input) } // Invalid R tensor shape. - W = make_shared(element::Type_t::f32, - Shape{gates_count * hidden_size, input_size}); - R = make_shared(element::Type_t::f32, Shape{hidden_size, 1}); + W = make_shared(element::f32, Shape{gates_count * hidden_size, input_size}); + R = make_shared(element::f32, Shape{hidden_size, 1}); try { const auto gru_cell = make_shared(X, H_t, W, R, hidden_size); @@ -85,9 +83,8 @@ TEST(type_prop, gru_cell_invalid_input) } // Invalid H_t tensor shape. - R = make_shared(element::Type_t::f32, - Shape{gates_count * hidden_size, hidden_size}); - H_t = make_shared(element::Type_t::f32, Shape{4, hidden_size}); + R = make_shared(element::f32, Shape{gates_count * hidden_size, hidden_size}); + H_t = make_shared(element::f32, Shape{4, hidden_size}); try { const auto gru_cell = make_shared(X, H_t, W, R, hidden_size); @@ -101,8 +98,8 @@ TEST(type_prop, gru_cell_invalid_input) } // Invalid B tensor shape. - H_t = make_shared(element::Type_t::f32, Shape{batch_size, hidden_size}); - auto B = make_shared(element::Type_t::f32, Shape{hidden_size}); + H_t = make_shared(element::f32, Shape{batch_size, hidden_size}); + auto B = make_shared(element::f32, Shape{hidden_size}); try { const auto gru_cell = make_shared(X, H_t, W, R, B, hidden_size); @@ -122,17 +119,16 @@ TEST(type_prop, gru_cell_dynamic_batch_size) const size_t hidden_size = 3; const size_t gates_count = 3; - const auto X = - make_shared(element::Type_t::f32, PartialShape{batch_size, input_size}); - const auto W = make_shared(element::Type_t::f32, + const auto X = make_shared(element::f32, PartialShape{batch_size, input_size}); + const auto W = make_shared(element::f32, PartialShape{gates_count * hidden_size, input_size}); - const auto R = make_shared(element::Type_t::f32, + const auto R = make_shared(element::f32, PartialShape{gates_count * hidden_size, hidden_size}); const auto H_t = - make_shared(element::Type_t::f32, PartialShape{batch_size, hidden_size}); + make_shared(element::f32, PartialShape{batch_size, hidden_size}); const auto gru_cell = make_shared(X, H_t, W, R, hidden_size); - EXPECT_EQ(gru_cell->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(gru_cell->get_output_element_type(0), element::f32); EXPECT_EQ(gru_cell->get_output_partial_shape(0), (PartialShape{batch_size, hidden_size})); } @@ -143,17 +139,16 @@ TEST(type_prop, gru_cell_dynamic_hidden_size) const auto hidden_size = Dimension::dynamic(); const size_t gates_count = 3; - const auto X = - make_shared(element::Type_t::f32, PartialShape{batch_size, input_size}); - const auto W = make_shared(element::Type_t::f32, + const auto X = make_shared(element::f32, PartialShape{batch_size, input_size}); + const auto W = make_shared(element::f32, PartialShape{hidden_size * gates_count, input_size}); - const auto R = make_shared(element::Type_t::f32, + const auto R = make_shared(element::f32, PartialShape{hidden_size * gates_count, hidden_size}); const auto H_t = - make_shared(element::Type_t::f32, PartialShape{batch_size, hidden_size}); + make_shared(element::f32, PartialShape{batch_size, hidden_size}); const auto gru_cell = make_shared(X, H_t, W, R, 3); - EXPECT_EQ(gru_cell->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(gru_cell->get_output_element_type(0), element::f32); EXPECT_EQ(gru_cell->get_output_partial_shape(0), (PartialShape{batch_size, hidden_size})); } @@ -163,19 +158,16 @@ TEST(type_prop, gru_cell_dynamic_inputs) const auto input_size = Dimension::dynamic(); const auto hidden_size = Dimension::dynamic(); - const auto X = - make_shared(element::Type_t::f32, PartialShape{batch_size, input_size}); - const auto W = - make_shared(element::Type_t::f32, PartialShape{hidden_size, input_size}); - const auto R = - make_shared(element::Type_t::f32, PartialShape{hidden_size, hidden_size}); + const auto X = make_shared(element::f32, PartialShape{batch_size, input_size}); + const auto W = make_shared(element::f32, PartialShape{hidden_size, input_size}); + const auto R = make_shared(element::f32, PartialShape{hidden_size, hidden_size}); const auto H_t = - make_shared(element::Type_t::f32, PartialShape{batch_size, hidden_size}); + make_shared(element::f32, PartialShape{batch_size, hidden_size}); const auto gru_cell = make_shared(X, H_t, W, R, 2); EXPECT_EQ(gru_cell->get_output_partial_shape(0), (PartialShape{batch_size, hidden_size})); - EXPECT_EQ(gru_cell->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(gru_cell->get_output_element_type(0), element::f32); } TEST(type_prop, gru_cell_invalid_input_rank0) @@ -185,44 +177,43 @@ TEST(type_prop, gru_cell_invalid_input_rank0) const size_t hidden_size = 3; const size_t gates_count = 3; - auto X = make_shared(element::Type_t::f32, PartialShape{batch_size, input_size}); - auto R = make_shared(element::Type_t::f32, + auto X = make_shared(element::f32, PartialShape{batch_size, input_size}); + auto R = make_shared(element::f32, PartialShape{gates_count * hidden_size, hidden_size}); - auto H_t = - make_shared(element::Type_t::f32, PartialShape{batch_size, hidden_size}); + auto H_t = make_shared(element::f32, PartialShape{batch_size, hidden_size}); // Invalid rank0 for W tensor. - auto W = make_shared(element::Type_t::f32, PartialShape{}); + auto W = make_shared(element::f32, PartialShape{}); ASSERT_THROW(make_shared(X, H_t, W, R, hidden_size), ngraph::NodeValidationFailure) << "GRUCell node was created with invalid data."; // Invalid rank0 for X tensor. - W = make_shared(element::Type_t::f32, + W = make_shared(element::f32, PartialShape{gates_count * hidden_size, input_size}); - X = make_shared(element::Type_t::f32, PartialShape{}); + X = make_shared(element::f32, PartialShape{}); ASSERT_THROW(make_shared(X, H_t, W, R, hidden_size), ngraph::NodeValidationFailure) << "GRUCell node was created with invalid data."; // Invalid rank0 for H_t tensor. - X = make_shared(element::Type_t::f32, PartialShape{batch_size, input_size}); - H_t = make_shared(element::Type_t::f32, PartialShape{}); + X = make_shared(element::f32, PartialShape{batch_size, input_size}); + H_t = make_shared(element::f32, PartialShape{}); ASSERT_THROW(make_shared(X, H_t, W, R, hidden_size), ngraph::NodeValidationFailure) << "GRUCell node was created with invalid data."; // Invalid rank0 for R tensor. - H_t = make_shared(element::Type_t::f32, PartialShape{batch_size, hidden_size}); - R = make_shared(element::Type_t::f32, PartialShape{}); + H_t = make_shared(element::f32, PartialShape{batch_size, hidden_size}); + R = make_shared(element::f32, PartialShape{}); ASSERT_THROW(make_shared(X, H_t, W, R, hidden_size), ngraph::NodeValidationFailure) << "GRUCell node was created with invalid data."; // Invalid rank0 for B tensor. - R = make_shared(element::Type_t::f32, + R = make_shared(element::f32, PartialShape{gates_count * hidden_size, input_size}); - auto B = make_shared(element::Type_t::f32, PartialShape{}); + auto B = make_shared(element::f32, PartialShape{}); ASSERT_THROW(make_shared(X, H_t, W, R, B, hidden_size), ngraph::NodeValidationFailure) << "GRUCell node was created with invalid data."; @@ -235,11 +226,10 @@ TEST(type_prop, gru_cell_invalid_input_dynamic_rank) const size_t hidden_size = 3; const size_t gates_count = 3; - auto X = make_shared(element::Type_t::f32, PartialShape{batch_size, input_size}); - auto R = make_shared(element::Type_t::f32, + auto X = make_shared(element::f32, PartialShape{batch_size, input_size}); + auto R = make_shared(element::f32, PartialShape{gates_count * hidden_size, hidden_size}); - auto H_t = - make_shared(element::Type_t::f32, PartialShape{batch_size, hidden_size}); + auto H_t = make_shared(element::f32, PartialShape{batch_size, hidden_size}); auto check_dynamic_gru = [](const shared_ptr& gru) -> bool { return gru->output(0).get_partial_shape() == PartialShape::dynamic() && @@ -247,34 +237,32 @@ TEST(type_prop, gru_cell_invalid_input_dynamic_rank) }; // Invalid dynamic rank for W tensor. - auto W = - make_shared(element::Type_t::f32, PartialShape::dynamic(Rank::dynamic())); + auto W = make_shared(element::f32, PartialShape::dynamic(Rank::dynamic())); auto gru_w = make_shared(X, H_t, W, R, hidden_size); EXPECT_EQ(check_dynamic_gru(gru_w), true); // Invalid dynamic rank for X tensor. - W = make_shared(element::Type_t::f32, PartialShape{hidden_size, input_size}); - X = make_shared(element::Type_t::f32, PartialShape::dynamic(Rank::dynamic())); + W = make_shared(element::f32, PartialShape{hidden_size, input_size}); + X = make_shared(element::f32, PartialShape::dynamic(Rank::dynamic())); auto gru_x = make_shared(X, H_t, W, R, hidden_size); EXPECT_EQ(check_dynamic_gru(gru_x), true); // Invalid dynamic rank for H_t tensor. - X = make_shared(element::Type_t::f32, PartialShape{batch_size, input_size}); - H_t = make_shared(element::Type_t::f32, PartialShape::dynamic(Rank::dynamic())); + X = make_shared(element::f32, PartialShape{batch_size, input_size}); + H_t = make_shared(element::f32, PartialShape::dynamic(Rank::dynamic())); auto gru_h = make_shared(X, H_t, W, R, hidden_size); EXPECT_EQ(check_dynamic_gru(gru_h), true); // Invalid dynamic rank for R tensor. - H_t = make_shared(element::Type_t::f32, PartialShape{batch_size, hidden_size}); - R = make_shared(element::Type_t::f32, PartialShape::dynamic(Rank::dynamic())); + H_t = make_shared(element::f32, PartialShape{batch_size, hidden_size}); + R = make_shared(element::f32, PartialShape::dynamic(Rank::dynamic())); auto gru_r = make_shared(X, H_t, W, R, hidden_size); EXPECT_EQ(check_dynamic_gru(gru_r), true); // Invalid dynamic rank for B tensor. - R = make_shared(element::Type_t::f32, + R = make_shared(element::f32, PartialShape{gates_count * hidden_size, hidden_size}); - auto B = - make_shared(element::Type_t::f32, PartialShape::dynamic(Rank::dynamic())); + auto B = make_shared(element::f32, PartialShape::dynamic(Rank::dynamic())); auto gru_b = make_shared(X, H_t, W, R, B, hidden_size); EXPECT_EQ(check_dynamic_gru(gru_b), true); } diff --git a/ngraph/test/type_prop/gru_sequence.cpp b/ngraph/test/type_prop/gru_sequence.cpp index d8c6665cccd03f..47cc47fa89ab00 100644 --- a/ngraph/test/type_prop/gru_sequence.cpp +++ b/ngraph/test/type_prop/gru_sequence.cpp @@ -30,18 +30,17 @@ TEST(type_prop, gru_sequence_forward) const size_t input_size = 4; const size_t hidden_size = 128; - const auto X = make_shared(element::Type_t::f32, - Shape{batch_size, seq_length, input_size}); + const auto X = + make_shared(element::f32, Shape{batch_size, seq_length, input_size}); const auto initial_hidden_state = make_shared( - element::Type_t::f32, Shape{batch_size, num_directions, hidden_size}); - const auto sequence_lengths = - make_shared(element::Type_t::i32, Shape{batch_size}); + element::f32, Shape{batch_size, num_directions, hidden_size}); + const auto sequence_lengths = make_shared(element::i32, Shape{batch_size}); const auto W = make_shared( - element::Type_t::f32, Shape{num_directions, 3 * hidden_size, input_size}); + element::f32, Shape{num_directions, 3 * hidden_size, input_size}); const auto R = make_shared( - element::Type_t::f32, Shape{num_directions, 3 * hidden_size, hidden_size}); - const auto B = make_shared(element::Type_t::f32, - Shape{num_directions, 3 * hidden_size}); + element::f32, Shape{num_directions, 3 * hidden_size, hidden_size}); + const auto B = + make_shared(element::f32, Shape{num_directions, 3 * hidden_size}); const auto direction = op::RecurrentSequenceDirection::FORWARD; @@ -56,10 +55,10 @@ TEST(type_prop, gru_sequence_forward) EXPECT_EQ(sequence->get_activations()[1], "tanh"); EXPECT_EQ(sequence->get_clip(), 0.f); EXPECT_EQ(sequence->get_linear_before_reset(), false); - EXPECT_EQ(sequence->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(sequence->get_output_element_type(0), element::f32); EXPECT_EQ(sequence->outputs().size(), 2); EXPECT_EQ(sequence->get_output_shape(0), (Shape{batch_size, num_directions, seq_length, hidden_size})); - EXPECT_EQ(sequence->get_output_element_type(1), element::Type_t::f32); + EXPECT_EQ(sequence->get_output_element_type(1), element::f32); EXPECT_EQ(sequence->get_output_shape(1), (Shape{batch_size, num_directions, hidden_size})); } diff --git a/ngraph/test/type_prop/hard_sigmoid.cpp b/ngraph/test/type_prop/hard_sigmoid.cpp index dc59fc97e299da..b213e1f0bfe5b9 100644 --- a/ngraph/test/type_prop/hard_sigmoid.cpp +++ b/ngraph/test/type_prop/hard_sigmoid.cpp @@ -25,10 +25,10 @@ TEST(type_prop, hardsigmoid) { const Shape data_shape{3, 5}; - const auto P = make_shared(element::Type_t::f32, data_shape); + const auto P = make_shared(element::f32, data_shape); const auto alpha = op::Constant::create(P->get_element_type(), Shape{}, {0.1f}); const auto beta = op::Constant::create(P->get_element_type(), Shape{}, {1.2f}); const auto H = make_shared(P, alpha, beta); - ASSERT_EQ(H->get_element_type(), element::Type_t::f32); + ASSERT_EQ(H->get_element_type(), element::f32); ASSERT_EQ(H->get_shape(), data_shape); } diff --git a/ngraph/test/type_prop/hsigmoid.cpp b/ngraph/test/type_prop/hsigmoid.cpp index 15e116f6aff8da..9ef8e4833a7da2 100644 --- a/ngraph/test/type_prop/hsigmoid.cpp +++ b/ngraph/test/type_prop/hsigmoid.cpp @@ -23,33 +23,31 @@ using namespace ngraph; TEST(type_prop, hsigmoid) { - auto data = make_shared(element::Type_t::f32, Shape{1, 3, 6}); + auto data = make_shared(element::f32, Shape{1, 3, 6}); auto hsigmoid_func = make_shared(data); - EXPECT_EQ(hsigmoid_func->get_element_type(), element::Type_t::f32); + EXPECT_EQ(hsigmoid_func->get_element_type(), element::f32); EXPECT_EQ(hsigmoid_func->get_shape(), data->get_output_shape(0)); } TEST(type_prop, hsigmoid_partial) { - auto data = - make_shared(element::Type_t::f32, PartialShape{1, Dimension::dynamic(), 6}); + auto data = make_shared(element::f32, PartialShape{1, Dimension::dynamic(), 6}); auto hsigmoid_func = make_shared(data); - EXPECT_EQ(hsigmoid_func->get_element_type(), element::Type_t::f32); + EXPECT_EQ(hsigmoid_func->get_element_type(), element::f32); ASSERT_TRUE( hsigmoid_func->get_output_partial_shape(0).same_scheme(data->get_output_partial_shape(0))); // rank unknown auto hsigmoid_partial = make_shared( - make_shared(element::Type_t::f32, PartialShape::dynamic())); + make_shared(element::f32, PartialShape::dynamic())); ASSERT_TRUE(hsigmoid_partial->get_output_partial_shape(0).same_scheme(PartialShape::dynamic())); } TEST(type_prop, hsigmoid_partial_static_rank) { - auto data = - make_shared(element::Type_t::f32, PartialShape{1, Dimension::dynamic(), 6}); + auto data = make_shared(element::f32, PartialShape{1, Dimension::dynamic(), 6}); auto hsigmoid_func = make_shared(data); - EXPECT_EQ(hsigmoid_func->get_element_type(), element::Type_t::f32); + EXPECT_EQ(hsigmoid_func->get_element_type(), element::f32); ASSERT_TRUE( hsigmoid_func->get_output_partial_shape(0).same_scheme(data->get_output_partial_shape(0))); ASSERT_TRUE(hsigmoid_func->get_output_partial_shape(0).rank().is_static()); diff --git a/ngraph/test/type_prop/hswish.cpp b/ngraph/test/type_prop/hswish.cpp index 053ca1609e201b..9df6d19b86a317 100644 --- a/ngraph/test/type_prop/hswish.cpp +++ b/ngraph/test/type_prop/hswish.cpp @@ -23,33 +23,31 @@ using namespace ngraph; TEST(type_prop, hswish) { - auto data = make_shared(element::Type_t::f32, Shape{1, 3, 6}); + auto data = make_shared(element::f32, Shape{1, 3, 6}); auto hswish_func = make_shared(data); - EXPECT_EQ(hswish_func->get_element_type(), element::Type_t::f32); + EXPECT_EQ(hswish_func->get_element_type(), element::f32); EXPECT_EQ(hswish_func->get_shape(), data->get_output_shape(0)); } TEST(type_prop, hswish_partial) { - auto data = - make_shared(element::Type_t::f32, PartialShape{1, Dimension::dynamic(), 6}); + auto data = make_shared(element::f32, PartialShape{1, Dimension::dynamic(), 6}); auto hswish_func = make_shared(data); - EXPECT_EQ(hswish_func->get_element_type(), element::Type_t::f32); + EXPECT_EQ(hswish_func->get_element_type(), element::f32); ASSERT_TRUE( hswish_func->get_output_partial_shape(0).same_scheme(data->get_output_partial_shape(0))); // rank unknown auto hswish_partial = make_shared( - make_shared(element::Type_t::f32, PartialShape::dynamic())); + make_shared(element::f32, PartialShape::dynamic())); ASSERT_TRUE(hswish_partial->get_output_partial_shape(0).same_scheme(PartialShape::dynamic())); } TEST(type_prop, hswish_partial_static_rank) { - auto data = - make_shared(element::Type_t::f32, PartialShape{1, Dimension::dynamic(), 6}); + auto data = make_shared(element::f32, PartialShape{1, Dimension::dynamic(), 6}); auto hswish_func = make_shared(data); - EXPECT_EQ(hswish_func->get_element_type(), element::Type_t::f32); + EXPECT_EQ(hswish_func->get_element_type(), element::f32); ASSERT_TRUE( hswish_func->get_output_partial_shape(0).same_scheme(data->get_output_partial_shape(0))); ASSERT_TRUE(hswish_func->get_output_partial_shape(0).rank().is_static()); diff --git a/ngraph/test/type_prop/interpolate.cpp b/ngraph/test/type_prop/interpolate.cpp index e0050f999ce549..22c795bc56351c 100644 --- a/ngraph/test/type_prop/interpolate.cpp +++ b/ngraph/test/type_prop/interpolate.cpp @@ -28,10 +28,10 @@ using ShapeCalcMode = op::v4::Interpolate::ShapeCalcMode; TEST(type_prop, interpolate_v4) { - auto image = std::make_shared(element::Type_t::f32, Shape{2, 2, 30, 60}); - auto target_shape = std::make_shared(element::Type_t::f32, Shape{2, 2, 15, 30}); - auto scales = op::Constant::create(element::Type_t::f32, Shape{2}, {0.5f, 0.5f}); - auto axes = op::Constant::create(element::Type_t::i64, Shape{2}, {2, 3}); + auto image = std::make_shared(element::f32, Shape{2, 2, 30, 60}); + auto target_shape = std::make_shared(element::f32, Shape{2, 2, 15, 30}); + auto scales = op::Constant::create(element::f32, Shape{2}, {0.5f, 0.5f}); + auto axes = op::Constant::create(element::i64, Shape{2}, {2, 3}); InterpolateAttrs attrs; attrs.mode = InterpolateMode::nearest; @@ -44,7 +44,7 @@ TEST(type_prop, interpolate_v4) attrs.cube_coeff = -0.75; auto interp = std::make_shared(image, target_shape, scales, axes, attrs); - EXPECT_EQ(interp->get_element_type(), element::Type_t::f32); + EXPECT_EQ(interp->get_element_type(), element::f32); EXPECT_EQ(interp->get_shape(), (Shape{2, 2, 15, 30})); } @@ -52,10 +52,10 @@ TEST(type_prop, interpolate_v4_partial) { auto partial_shape = PartialShape{2, 2, Dimension::dynamic(), Dimension::dynamic()}; - auto image = std::make_shared(element::Type_t::f32, partial_shape); - auto target_shape = std::make_shared(element::Type_t::f32, Shape{2, 2, 15, 30}); - auto scales = op::Constant::create(element::Type_t::f32, Shape{2}, {0.5f, 0.5f}); - auto axes = op::Constant::create(element::Type_t::i64, Shape{2}, {2, 3}); + auto image = std::make_shared(element::f32, partial_shape); + auto target_shape = std::make_shared(element::f32, Shape{2, 2, 15, 30}); + auto scales = op::Constant::create(element::f32, Shape{2}, {0.5f, 0.5f}); + auto axes = op::Constant::create(element::i64, Shape{2}, {2, 3}); InterpolateAttrs attrs; attrs.mode = InterpolateMode::nearest; @@ -68,12 +68,11 @@ TEST(type_prop, interpolate_v4_partial) attrs.cube_coeff = -0.75; auto interp = std::make_shared(image, target_shape, scales, axes, attrs); - EXPECT_EQ(interp->get_element_type(), element::Type_t::f32); + EXPECT_EQ(interp->get_element_type(), element::f32); ASSERT_TRUE(interp->get_output_partial_shape(0).same_scheme(partial_shape)); // rank unknown - auto partial_param = - std::make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto partial_param = std::make_shared(element::f32, PartialShape::dynamic()); auto interp_part = std::make_shared(partial_param, target_shape, scales, axes, attrs); ASSERT_TRUE(interp_part->get_output_partial_shape(0).same_scheme(PartialShape::dynamic())); @@ -83,10 +82,10 @@ TEST(type_prop, interpolate_v4_partial_static_rank) { auto partial_shape = PartialShape{2, 2, Dimension::dynamic(), Dimension::dynamic()}; - auto image = std::make_shared(element::Type_t::f32, partial_shape); - auto target_shape = std::make_shared(element::Type_t::f32, Shape{2, 2, 15, 30}); - auto scales = op::Constant::create(element::Type_t::f32, Shape{2}, {0.5f, 0.5f}); - auto axes = op::Constant::create(element::Type_t::i64, Shape{2}, {2, 3}); + auto image = std::make_shared(element::f32, partial_shape); + auto target_shape = std::make_shared(element::f32, Shape{2, 2, 15, 30}); + auto scales = op::Constant::create(element::f32, Shape{2}, {0.5f, 0.5f}); + auto axes = op::Constant::create(element::i64, Shape{2}, {2, 3}); InterpolateAttrs attrs; attrs.mode = InterpolateMode::nearest; @@ -99,7 +98,7 @@ TEST(type_prop, interpolate_v4_partial_static_rank) attrs.cube_coeff = -0.75; auto interp = std::make_shared(image, target_shape, scales, axes, attrs); - EXPECT_EQ(interp->get_element_type(), element::Type_t::f32); + EXPECT_EQ(interp->get_element_type(), element::f32); ASSERT_TRUE(interp->get_output_partial_shape(0).same_scheme(partial_shape)); ASSERT_TRUE(interp->get_output_partial_shape(0).rank().is_static()); } @@ -109,10 +108,10 @@ TEST(type_prop, interpolate_v4_partial_static_rank2) auto partial_shape = PartialShape{Dimension::dynamic(), Dimension::dynamic(), 10, 20}; auto out_shape = PartialShape{Dimension::dynamic(), Dimension::dynamic(), 5, 10}; - auto image = std::make_shared(element::Type_t::f32, partial_shape); - auto target_shape = std::make_shared(element::Type_t::f32, Shape{2, 2, 15, 30}); - auto scales = op::Constant::create(element::Type_t::f32, Shape{2}, {0.5f, 0.5f}); - auto axes = op::Constant::create(element::Type_t::i64, Shape{2}, {2, 3}); + auto image = std::make_shared(element::f32, partial_shape); + auto target_shape = std::make_shared(element::f32, Shape{2, 2, 15, 30}); + auto scales = op::Constant::create(element::f32, Shape{2}, {0.5f, 0.5f}); + auto axes = op::Constant::create(element::i64, Shape{2}, {2, 3}); InterpolateAttrs attrs; attrs.mode = InterpolateMode::nearest; @@ -125,7 +124,7 @@ TEST(type_prop, interpolate_v4_partial_static_rank2) attrs.cube_coeff = -0.75; auto interp = std::make_shared(image, target_shape, scales, axes, attrs); - EXPECT_EQ(interp->get_element_type(), element::Type_t::f32); + EXPECT_EQ(interp->get_element_type(), element::f32); ASSERT_TRUE(interp->get_output_partial_shape(0).same_scheme(out_shape)); ASSERT_TRUE(interp->get_output_partial_shape(0).rank().is_static()); } @@ -135,11 +134,10 @@ TEST(type_prop, interpolate_v4_partial_static_rank3) auto partial_shape = PartialShape{Dimension::dynamic(), Dimension::dynamic(), 3, 3}; auto out_shape = PartialShape{Dimension::dynamic(), Dimension::dynamic(), 1, 1}; - auto image = std::make_shared(element::Type_t::f32, partial_shape); - auto target_shape = std::make_shared(element::Type_t::f32, Shape{2, 2, 1, 1}); - auto scales = - op::Constant::create(element::Type_t::f32, Shape{2}, {1.0f / 3.0f, 1.0f / 3.0f}); - auto axes = op::Constant::create(element::Type_t::i64, Shape{2}, {2, 3}); + auto image = std::make_shared(element::f32, partial_shape); + auto target_shape = std::make_shared(element::f32, Shape{2, 2, 1, 1}); + auto scales = op::Constant::create(element::f32, Shape{2}, {1.0f / 3.0f, 1.0f / 3.0f}); + auto axes = op::Constant::create(element::i64, Shape{2}, {2, 3}); InterpolateAttrs attrs; attrs.mode = InterpolateMode::nearest; @@ -152,7 +150,7 @@ TEST(type_prop, interpolate_v4_partial_static_rank3) attrs.cube_coeff = -0.75; auto interp = std::make_shared(image, target_shape, scales, axes, attrs); - EXPECT_EQ(interp->get_element_type(), element::Type_t::f32); + EXPECT_EQ(interp->get_element_type(), element::f32); ASSERT_TRUE(interp->get_output_partial_shape(0).same_scheme(out_shape)); ASSERT_TRUE(interp->get_output_partial_shape(0).rank().is_static()); } diff --git a/ngraph/test/type_prop/log_softmax.cpp b/ngraph/test/type_prop/log_softmax.cpp index 82fb61d87eeda7..5fe7caad4caed9 100644 --- a/ngraph/test/type_prop/log_softmax.cpp +++ b/ngraph/test/type_prop/log_softmax.cpp @@ -23,15 +23,15 @@ using namespace ngraph; TEST(type_prop, log_softmax) { - auto data = make_shared(element::Type_t::f32, Shape{1, 3, 6}); + auto data = make_shared(element::f32, Shape{1, 3, 6}); auto log_softmax_func = make_shared(data, 1); - EXPECT_EQ(log_softmax_func->get_element_type(), element::Type_t::f32); + EXPECT_EQ(log_softmax_func->get_element_type(), element::f32); EXPECT_EQ(log_softmax_func->get_shape(), (Shape{1, 3, 6})); } TEST(type_prop, log_softmax_incorrect_axis) { - const auto data = make_shared(element::Type_t::f32, Shape{1, 3, 6}); + const auto data = make_shared(element::f32, Shape{1, 3, 6}); try { @@ -48,26 +48,24 @@ TEST(type_prop, log_softmax_incorrect_axis) TEST(type_prop, log_softmax_partial) { - auto data = - make_shared(element::Type_t::f32, PartialShape{1, Dimension::dynamic(), 6}); + auto data = make_shared(element::f32, PartialShape{1, Dimension::dynamic(), 6}); auto log_softmax_func = make_shared(data, 1); - EXPECT_EQ(log_softmax_func->get_element_type(), element::Type_t::f32); + EXPECT_EQ(log_softmax_func->get_element_type(), element::f32); ASSERT_TRUE(log_softmax_func->get_output_partial_shape(0).same_scheme( (PartialShape{1, Dimension::dynamic(), 6}))); // rank unknown auto log_softmax_partial = make_shared( - make_shared(element::Type_t::f32, PartialShape::dynamic())); + make_shared(element::f32, PartialShape::dynamic())); ASSERT_TRUE( log_softmax_partial->get_output_partial_shape(0).same_scheme(PartialShape::dynamic())); } TEST(type_prop, log_softmax_partial_static_rank) { - auto data = - make_shared(element::Type_t::f32, PartialShape{1, Dimension::dynamic(), 6}); + auto data = make_shared(element::f32, PartialShape{1, Dimension::dynamic(), 6}); auto log_softmax_func = make_shared(data, 1); - EXPECT_EQ(log_softmax_func->get_element_type(), element::Type_t::f32); + EXPECT_EQ(log_softmax_func->get_element_type(), element::f32); ASSERT_TRUE(log_softmax_func->get_output_partial_shape(0).same_scheme( (PartialShape{1, Dimension::dynamic(), 6}))); ASSERT_TRUE(log_softmax_func->get_output_partial_shape(0).rank().is_static()); diff --git a/ngraph/test/type_prop/loop.cpp b/ngraph/test/type_prop/loop.cpp index 55356511a9635f..f4dfe846d88ab0 100644 --- a/ngraph/test/type_prop/loop.cpp +++ b/ngraph/test/type_prop/loop.cpp @@ -29,23 +29,23 @@ using namespace ngraph; TEST(type_prop, loop_operation_for_mode_10_iter_static_shapes) { // That which we iterate over - auto X = make_shared(element::Type_t::f32, Shape{32, 1, 10}); - auto Y = make_shared(element::Type_t::f32, Shape{32, 1, 10}); - auto M = make_shared(element::Type_t::f32, Shape{32, 1, 10}); + auto X = make_shared(element::f32, Shape{32, 1, 10}); + auto Y = make_shared(element::f32, Shape{32, 1, 10}); + auto M = make_shared(element::f32, Shape{32, 1, 10}); // Set up the cell body, a function from (Xi, Yi) -> (Zo) // Body parameters - auto current_iteration = make_shared(element::Type_t::i64, Shape{1}); - auto Xi = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto Yi = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto M_body = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto current_iteration = make_shared(element::i64, Shape{1}); + auto Xi = make_shared(element::f32, PartialShape::dynamic()); + auto Yi = make_shared(element::f32, PartialShape::dynamic()); + auto M_body = make_shared(element::f32, PartialShape::dynamic()); auto body_condition = std::make_shared( - ngraph::element::Type_t::boolean, ngraph::Shape{1}, true); + ngraph::element::boolean, ngraph::Shape{1}, true); - auto trip_count = std::make_shared( - ngraph::element::Type_t::i64, ngraph::Shape{1}, 10); + auto trip_count = + std::make_shared(ngraph::element::i64, ngraph::Shape{1}, 10); auto exec_condition = std::make_shared( - ngraph::element::Type_t::boolean, ngraph::Shape{1}, true); + ngraph::element::boolean, ngraph::Shape{1}, true); // Body auto sum = make_shared(Xi, Yi); auto Zo = make_shared(sum, M_body); @@ -134,23 +134,23 @@ TEST(type_prop, loop_operation_for_mode_10_iter_static_shapes) TEST(type_prop, loop_operation_dowhile_mode_1_iter_static_shapes) { // That which we iterate over - auto X = make_shared(element::Type_t::f32, Shape{32, 1, 10}); - auto Y = make_shared(element::Type_t::f32, Shape{32, 1, 10}); - auto M = make_shared(element::Type_t::f32, Shape{32, 1, 10}); + auto X = make_shared(element::f32, Shape{32, 1, 10}); + auto Y = make_shared(element::f32, Shape{32, 1, 10}); + auto M = make_shared(element::f32, Shape{32, 1, 10}); // Set up the cell body, a function from (Xi, Yi) -> (Zo) // Body parameters - auto current_iteration = make_shared(element::Type_t::i64, Shape{1}); - auto Xi = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto Yi = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto M_body = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto current_iteration = make_shared(element::i64, Shape{1}); + auto Xi = make_shared(element::f32, PartialShape::dynamic()); + auto Yi = make_shared(element::f32, PartialShape::dynamic()); + auto M_body = make_shared(element::f32, PartialShape::dynamic()); auto body_condition = std::make_shared( - ngraph::element::Type_t::boolean, ngraph::Shape{1}, false); + ngraph::element::boolean, ngraph::Shape{1}, false); - auto trip_count = std::make_shared( - ngraph::element::Type_t::i64, ngraph::Shape{1}, 10); + auto trip_count = + std::make_shared(ngraph::element::i64, ngraph::Shape{1}, 10); auto exec_condition = std::make_shared( - ngraph::element::Type_t::boolean, ngraph::Shape{1}, true); + ngraph::element::boolean, ngraph::Shape{1}, true); // Body auto sum = make_shared(Xi, Yi); auto Zo = make_shared(sum, M_body); @@ -239,24 +239,24 @@ TEST(type_prop, loop_operation_dowhile_mode_1_iter_static_shapes) TEST(type_prop, loop_operation_for_and_condition_mode_dynamic_iter_static_shapes) { // That which we iterate over - auto X = make_shared(element::Type_t::f32, Shape{1}); - auto Y = make_shared(element::Type_t::f32, Shape{1}); - auto M = make_shared(element::Type_t::f32, Shape{1}); + auto X = make_shared(element::f32, Shape{1}); + auto Y = make_shared(element::f32, Shape{1}); + auto M = make_shared(element::f32, Shape{1}); // Set up the cell body, a function from (Xi, Yi) -> (Zo) // Body parameters - auto current_iteration = make_shared(element::Type_t::i64, Shape{1}); - auto Xi = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto Yi = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto M_body = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto condition_const = std::make_shared( - ngraph::element::Type_t::f32, ngraph::Shape{1}, 10); + auto current_iteration = make_shared(element::i64, Shape{1}); + auto Xi = make_shared(element::f32, PartialShape::dynamic()); + auto Yi = make_shared(element::f32, PartialShape::dynamic()); + auto M_body = make_shared(element::f32, PartialShape::dynamic()); + auto condition_const = + std::make_shared(ngraph::element::f32, ngraph::Shape{1}, 10); auto body_condition = std::make_shared(M_body, condition_const); - auto trip_count = std::make_shared( - ngraph::element::Type_t::i64, ngraph::Shape{1}, 10); + auto trip_count = + std::make_shared(ngraph::element::i64, ngraph::Shape{1}, 10); auto exec_condition = std::make_shared( - ngraph::element::Type_t::boolean, ngraph::Shape{1}, true); + ngraph::element::boolean, ngraph::Shape{1}, true); // Body auto sum = make_shared(Xi, Yi); auto Zo = make_shared(sum, M_body); @@ -338,24 +338,24 @@ TEST(type_prop, loop_operation_for_and_condition_mode_dynamic_iter_static_shapes TEST(type_prop, loop_operation_for_and_condition_mode_dynamic_iter_dynamic_shapes) { // That which we iterate over - auto X = make_shared(element::Type_t::f32, Shape{1}); - auto Y = make_shared(element::Type_t::f32, Shape{1}); - auto M = make_shared(element::Type_t::f32, Shape{1}); + auto X = make_shared(element::f32, Shape{1}); + auto Y = make_shared(element::f32, Shape{1}); + auto M = make_shared(element::f32, Shape{1}); // Set up the cell body, a function from (Xi, Yi) -> (Zo) // Body parameters - auto current_iteration = make_shared(element::Type_t::i64, Shape{1}); - auto Xi = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto Yi = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto M_body = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto condition_const = std::make_shared( - ngraph::element::Type_t::f32, ngraph::Shape{1}, 10); + auto current_iteration = make_shared(element::i64, Shape{1}); + auto Xi = make_shared(element::f32, PartialShape::dynamic()); + auto Yi = make_shared(element::f32, PartialShape::dynamic()); + auto M_body = make_shared(element::f32, PartialShape::dynamic()); + auto condition_const = + std::make_shared(ngraph::element::f32, ngraph::Shape{1}, 10); auto body_condition = std::make_shared(M_body, condition_const); - auto trip_count = std::make_shared( - ngraph::element::Type_t::i64, ngraph::Shape{1}, 10); + auto trip_count = + std::make_shared(ngraph::element::i64, ngraph::Shape{1}, 10); auto exec_condition = std::make_shared( - ngraph::element::Type_t::boolean, ngraph::Shape{1}, true); + ngraph::element::boolean, ngraph::Shape{1}, true); // Body auto sum = make_shared(Xi, Yi); auto Zo = make_shared(sum, M_body); @@ -442,23 +442,23 @@ TEST(type_prop, loop_operation_for_and_condition_mode_dynamic_iter_dynamic_shape TEST(type_prop, loop_operation_infinite_loop_mode_dynamic_iter_dynamic_shapes) { // That which we iterate over - auto X = make_shared(element::Type_t::f32, Shape{32, 1, 10}); - auto Y = make_shared(element::Type_t::f32, Shape{32, 1, 10}); - auto M = make_shared(element::Type_t::f32, Shape{32, 1, 10}); + auto X = make_shared(element::f32, Shape{32, 1, 10}); + auto Y = make_shared(element::f32, Shape{32, 1, 10}); + auto M = make_shared(element::f32, Shape{32, 1, 10}); // Set up the cell body, a function from (Xi, Yi) -> (Zo) // Body parameters - auto current_iteration = make_shared(element::Type_t::i64, Shape{1}); - auto Xi = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto Yi = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto M_body = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto current_iteration = make_shared(element::i64, Shape{1}); + auto Xi = make_shared(element::f32, PartialShape::dynamic()); + auto Yi = make_shared(element::f32, PartialShape::dynamic()); + auto M_body = make_shared(element::f32, PartialShape::dynamic()); auto body_condition = std::make_shared( - ngraph::element::Type_t::boolean, ngraph::Shape{1}, true); + ngraph::element::boolean, ngraph::Shape{1}, true); - auto trip_count = std::make_shared( - ngraph::element::Type_t::i64, ngraph::Shape{1}, -1); + auto trip_count = + std::make_shared(ngraph::element::i64, ngraph::Shape{1}, -1); auto exec_condition = std::make_shared( - ngraph::element::Type_t::boolean, ngraph::Shape{1}, true); + ngraph::element::boolean, ngraph::Shape{1}, true); // Body auto sum = make_shared(Xi, Yi); auto Zo = make_shared(sum, M_body); @@ -548,23 +548,23 @@ TEST(type_prop, loop_operation_infinite_loop_mode_dynamic_iter_dynamic_shapes) TEST(type_prop, loop_operation_for_mode_10_iter_static_shapes_special_body_ports) { // That which we iterate over - auto X = make_shared(element::Type_t::f32, Shape{32, 1, 10}); - auto Y = make_shared(element::Type_t::f32, Shape{32, 1, 10}); - auto M = make_shared(element::Type_t::f32, Shape{32, 1, 10}); + auto X = make_shared(element::f32, Shape{32, 1, 10}); + auto Y = make_shared(element::f32, Shape{32, 1, 10}); + auto M = make_shared(element::f32, Shape{32, 1, 10}); // Set up the cell body, a function from (Xi, Yi) -> (Zo) // Body parameters - auto current_iteration = make_shared(element::Type_t::i64, Shape{1}); - auto Xi = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto Yi = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto M_body = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto current_iteration = make_shared(element::i64, Shape{1}); + auto Xi = make_shared(element::f32, PartialShape::dynamic()); + auto Yi = make_shared(element::f32, PartialShape::dynamic()); + auto M_body = make_shared(element::f32, PartialShape::dynamic()); auto body_condition = std::make_shared( - ngraph::element::Type_t::boolean, ngraph::Shape{1}, true); + ngraph::element::boolean, ngraph::Shape{1}, true); - auto trip_count = std::make_shared( - ngraph::element::Type_t::i64, ngraph::Shape{1}, 10); + auto trip_count = + std::make_shared(ngraph::element::i64, ngraph::Shape{1}, 10); auto exec_condition = std::make_shared( - ngraph::element::Type_t::boolean, ngraph::Shape{1}, true); + ngraph::element::boolean, ngraph::Shape{1}, true); // Body auto sum = make_shared(Xi, Yi); auto Zo = make_shared(sum, M_body); @@ -654,23 +654,23 @@ TEST(type_prop, loop_operation_for_mode_10_iter_static_shapes_special_body_ports TEST(type_prop, loop_operation_for_mode_10_iter_static_shapes_special_body_ports_scalars) { // That which we iterate over - auto X = make_shared(element::Type_t::f32, Shape{32, 1, 10}); - auto Y = make_shared(element::Type_t::f32, Shape{32, 1, 10}); - auto M = make_shared(element::Type_t::f32, Shape{32, 1, 10}); + auto X = make_shared(element::f32, Shape{32, 1, 10}); + auto Y = make_shared(element::f32, Shape{32, 1, 10}); + auto M = make_shared(element::f32, Shape{32, 1, 10}); // Set up the cell body, a function from (Xi, Yi) -> (Zo) // Body parameters - auto current_iteration = make_shared(element::Type_t::i64, Shape{}); - auto Xi = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto Yi = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto M_body = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto body_condition = std::make_shared( - ngraph::element::Type_t::boolean, ngraph::Shape{}, true); - - auto trip_count = std::make_shared( - ngraph::element::Type_t::i64, ngraph::Shape{}, 10); - auto exec_condition = std::make_shared( - ngraph::element::Type_t::boolean, ngraph::Shape{}, true); + auto current_iteration = make_shared(element::i64, Shape{}); + auto Xi = make_shared(element::f32, PartialShape::dynamic()); + auto Yi = make_shared(element::f32, PartialShape::dynamic()); + auto M_body = make_shared(element::f32, PartialShape::dynamic()); + auto body_condition = + std::make_shared(ngraph::element::boolean, ngraph::Shape{}, true); + + auto trip_count = + std::make_shared(ngraph::element::i64, ngraph::Shape{}, 10); + auto exec_condition = + std::make_shared(ngraph::element::boolean, ngraph::Shape{}, true); // Body auto sum = make_shared(Xi, Yi); auto Zo = make_shared(sum, M_body); @@ -760,23 +760,23 @@ TEST(type_prop, loop_operation_for_mode_10_iter_static_shapes_special_body_ports TEST(type_prop, loop_operation_10_iter_static_shapes_sliced_inputs) { // That which we iterate over - auto X = make_shared(element::Type_t::f32, Shape{32, 1, 10}); - auto Y = make_shared(element::Type_t::f32, Shape{32, 10, 1}); - auto M = make_shared(element::Type_t::f32, Shape{32, 1, 10}); + auto X = make_shared(element::f32, Shape{32, 1, 10}); + auto Y = make_shared(element::f32, Shape{32, 10, 1}); + auto M = make_shared(element::f32, Shape{32, 1, 10}); // Set up the cell body, a function from (Xi, Yi) -> (Zo) // Body parameters - auto current_iteration = make_shared(element::Type_t::i64, Shape{}); - auto Xi = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto Yi = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto M_body = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto body_condition = std::make_shared( - ngraph::element::Type_t::boolean, ngraph::Shape{}, true); - - auto trip_count = std::make_shared( - ngraph::element::Type_t::i64, ngraph::Shape{}, 10); - auto exec_condition = std::make_shared( - ngraph::element::Type_t::boolean, ngraph::Shape{}, true); + auto current_iteration = make_shared(element::i64, Shape{}); + auto Xi = make_shared(element::f32, PartialShape::dynamic()); + auto Yi = make_shared(element::f32, PartialShape::dynamic()); + auto M_body = make_shared(element::f32, PartialShape::dynamic()); + auto body_condition = + std::make_shared(ngraph::element::boolean, ngraph::Shape{}, true); + + auto trip_count = + std::make_shared(ngraph::element::i64, ngraph::Shape{}, 10); + auto exec_condition = + std::make_shared(ngraph::element::boolean, ngraph::Shape{}, true); // Body auto sum = make_shared(Xi, Yi); auto Zo = make_shared(sum, M_body); diff --git a/ngraph/test/type_prop/lrn.cpp b/ngraph/test/type_prop/lrn.cpp index 354506e0f7ac50..d4f5b8f162aa52 100644 --- a/ngraph/test/type_prop/lrn.cpp +++ b/ngraph/test/type_prop/lrn.cpp @@ -23,8 +23,8 @@ using namespace ngraph; TEST(type_prop, lrn_invalid_axes_rank) { - auto data = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - auto axes = make_shared(element::Type_t::f32, Shape{1, 2}); + auto data = make_shared(element::f32, Shape{1, 2, 3, 4}); + auto axes = make_shared(element::f32, Shape{1, 2}); double alpha = 0.1, beta = 0.2, bias = 0.3; size_t size = 3; try @@ -42,7 +42,7 @@ TEST(type_prop, lrn_invalid_axes_rank) FAIL() << "Deduced type check failed for unexpected reason"; } - axes = make_shared(element::Type_t::f32, Shape{5}); + axes = make_shared(element::f32, Shape{5}); try { auto lrn = make_shared(data, axes, alpha, beta, bias, size); @@ -63,8 +63,8 @@ TEST(type_prop, lrn_invalid_axes_rank) TEST(type_prop, lrn_incorrect_axes_value) { - auto data = make_shared(element::Type_t::f32, Shape{1, 2, 3}); - auto axes = make_shared(element::Type_t::i64, Shape{2}, vector{3, 4}); + auto data = make_shared(element::f32, Shape{1, 2, 3}); + auto axes = make_shared(element::i64, Shape{2}, vector{3, 4}); double alpha = 0.1, beta = 0.2, bias = 0.3; size_t size = 3; try diff --git a/ngraph/test/type_prop/lstm_cell.cpp b/ngraph/test/type_prop/lstm_cell.cpp index f56d31e7bb17c8..e8275d8973f87a 100644 --- a/ngraph/test/type_prop/lstm_cell.cpp +++ b/ngraph/test/type_prop/lstm_cell.cpp @@ -29,16 +29,13 @@ TEST(type_prop, lstm_cell) const size_t hidden_size = 3; const size_t gates_count = 4; - const auto X = - make_shared(element::Type_t::f32, Shape{batch_size, input_size}); - const auto W = make_shared(element::Type_t::f32, - Shape{gates_count * hidden_size, input_size}); - const auto R = make_shared(element::Type_t::f32, - Shape{gates_count * hidden_size, hidden_size}); - const auto H_t = - make_shared(element::Type_t::f32, Shape{batch_size, hidden_size}); - const auto C_t = - make_shared(element::Type_t::f32, Shape{batch_size, hidden_size}); + const auto X = make_shared(element::f32, Shape{batch_size, input_size}); + const auto W = + make_shared(element::f32, Shape{gates_count * hidden_size, input_size}); + const auto R = + make_shared(element::f32, Shape{gates_count * hidden_size, hidden_size}); + const auto H_t = make_shared(element::f32, Shape{batch_size, hidden_size}); + const auto C_t = make_shared(element::f32, Shape{batch_size, hidden_size}); const auto lstm_cell = make_shared(X, H_t, C_t, W, R, hidden_size); EXPECT_EQ(lstm_cell->get_hidden_size(), hidden_size); @@ -48,9 +45,9 @@ TEST(type_prop, lstm_cell) EXPECT_EQ(lstm_cell->get_activations()[0], "sigmoid"); EXPECT_EQ(lstm_cell->get_activations()[1], "tanh"); EXPECT_EQ(lstm_cell->get_activations()[2], "tanh"); - EXPECT_EQ(lstm_cell->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(lstm_cell->get_output_element_type(0), element::f32); EXPECT_EQ(lstm_cell->get_output_shape(0), (Shape{batch_size, hidden_size})); - EXPECT_EQ(lstm_cell->get_output_element_type(1), element::Type_t::f32); + EXPECT_EQ(lstm_cell->get_output_element_type(1), element::f32); EXPECT_EQ(lstm_cell->get_output_shape(1), (Shape{batch_size, hidden_size})); } @@ -61,15 +58,14 @@ TEST(type_prop, lstm_cell_invalid_input) const size_t hidden_size = 3; const size_t gates_count = 4; - auto X = make_shared(element::Type_t::f32, Shape{batch_size, input_size}); - auto R = make_shared(element::Type_t::f32, - Shape{gates_count * hidden_size, hidden_size}); - auto H_t = make_shared(element::Type_t::f32, Shape{batch_size, hidden_size}); - auto C_t = make_shared(element::Type_t::f32, Shape{batch_size, hidden_size}); + auto X = make_shared(element::f32, Shape{batch_size, input_size}); + auto R = + make_shared(element::f32, Shape{gates_count * hidden_size, hidden_size}); + auto H_t = make_shared(element::f32, Shape{batch_size, hidden_size}); + auto C_t = make_shared(element::f32, Shape{batch_size, hidden_size}); // Invalid W tensor shape. - auto W = - make_shared(element::Type_t::f32, Shape{1 * hidden_size, input_size}); + auto W = make_shared(element::f32, Shape{1 * hidden_size, input_size}); try { const auto lstm_cell = make_shared(X, H_t, C_t, W, R, hidden_size); @@ -82,9 +78,8 @@ TEST(type_prop, lstm_cell_invalid_input) } // Invalid R tensor shape. - W = make_shared(element::Type_t::f32, - Shape{gates_count * hidden_size, input_size}); - R = make_shared(element::Type_t::f32, Shape{gates_count * hidden_size, 1}); + W = make_shared(element::f32, Shape{gates_count * hidden_size, input_size}); + R = make_shared(element::f32, Shape{gates_count * hidden_size, 1}); try { const auto lstm_cell = make_shared(X, H_t, C_t, W, R, hidden_size); @@ -98,9 +93,8 @@ TEST(type_prop, lstm_cell_invalid_input) } // Invalid H_t tensor shape. - R = make_shared(element::Type_t::f32, - Shape{gates_count * hidden_size, hidden_size}); - H_t = make_shared(element::Type_t::f32, Shape{4, hidden_size}); + R = make_shared(element::f32, Shape{gates_count * hidden_size, hidden_size}); + H_t = make_shared(element::f32, Shape{4, hidden_size}); try { const auto lstm_cell = make_shared(X, H_t, C_t, W, R, hidden_size); @@ -114,8 +108,8 @@ TEST(type_prop, lstm_cell_invalid_input) } // Invalid C_t tensor shape. - H_t = make_shared(element::Type_t::f32, Shape{batch_size, hidden_size}); - C_t = make_shared(element::Type_t::f32, Shape{4, hidden_size}); + H_t = make_shared(element::f32, Shape{batch_size, hidden_size}); + C_t = make_shared(element::f32, Shape{4, hidden_size}); try { const auto lstm_cell = make_shared(X, H_t, C_t, W, R, hidden_size); @@ -129,10 +123,9 @@ TEST(type_prop, lstm_cell_invalid_input) } // Invalid B tensor shape. - C_t = make_shared(element::Type_t::f32, Shape{batch_size, hidden_size}); - auto B = - make_shared(element::Type_t::f32, Shape{2 * gates_count * hidden_size}); - auto P = make_shared(element::Type_t::f32, Shape{3 * hidden_size}); + C_t = make_shared(element::f32, Shape{batch_size, hidden_size}); + auto B = make_shared(element::f32, Shape{2 * gates_count * hidden_size}); + auto P = make_shared(element::f32, Shape{3 * hidden_size}); try { const auto lstm_cell = make_shared(X, H_t, C_t, W, R, B, hidden_size); @@ -153,22 +146,22 @@ TEST(type_prop, lstm_cell_dynamic_batch_size) const size_t gates_count = 4; const auto X = - make_shared(element::Type_t::f32, PartialShape{batch_size, input_size}); + make_shared(element::f32, PartialShape{batch_size, input_size}); const auto W = make_shared( - element::Type_t::f32, PartialShape{gates_count * hidden_size, input_size}); + element::f32, PartialShape{gates_count * hidden_size, input_size}); const auto R = make_shared( - element::Type_t::f32, PartialShape{gates_count * hidden_size, hidden_size}); + element::f32, PartialShape{gates_count * hidden_size, hidden_size}); const auto H_t = - make_shared(element::Type_t::f32, PartialShape{batch_size, hidden_size}); + make_shared(element::f32, PartialShape{batch_size, hidden_size}); const auto C_t = - make_shared(element::Type_t::f32, PartialShape{batch_size, hidden_size}); + make_shared(element::f32, PartialShape{batch_size, hidden_size}); const auto lstm_cell = make_shared(X, H_t, C_t, W, R, hidden_size); EXPECT_EQ(lstm_cell->get_output_partial_shape(0), (PartialShape{batch_size, hidden_size})); EXPECT_EQ(lstm_cell->get_output_partial_shape(1), (PartialShape{batch_size, hidden_size})); - EXPECT_EQ(lstm_cell->get_output_element_type(0), element::Type_t::f32); - EXPECT_EQ(lstm_cell->get_output_element_type(1), element::Type_t::f32); + EXPECT_EQ(lstm_cell->get_output_element_type(0), element::f32); + EXPECT_EQ(lstm_cell->get_output_element_type(1), element::f32); } TEST(type_prop, lstm_cell_dynamic_hidden_size) @@ -179,22 +172,22 @@ TEST(type_prop, lstm_cell_dynamic_hidden_size) const size_t gates_count = 4; const auto X = - make_shared(element::Type_t::f32, PartialShape{batch_size, input_size}); + make_shared(element::f32, PartialShape{batch_size, input_size}); const auto W = make_shared( - element::Type_t::f32, PartialShape{hidden_size * gates_count, input_size}); + element::f32, PartialShape{hidden_size * gates_count, input_size}); const auto R = make_shared( - element::Type_t::f32, PartialShape{hidden_size * gates_count, hidden_size}); + element::f32, PartialShape{hidden_size * gates_count, hidden_size}); const auto H_t = - make_shared(element::Type_t::f32, PartialShape{batch_size, hidden_size}); + make_shared(element::f32, PartialShape{batch_size, hidden_size}); const auto C_t = - make_shared(element::Type_t::f32, PartialShape{batch_size, hidden_size}); + make_shared(element::f32, PartialShape{batch_size, hidden_size}); const auto lstm_cell = make_shared(X, H_t, C_t, W, R, 3); EXPECT_EQ(lstm_cell->get_output_partial_shape(0), (PartialShape{batch_size, hidden_size})); EXPECT_EQ(lstm_cell->get_output_partial_shape(1), (PartialShape{batch_size, hidden_size})); - EXPECT_EQ(lstm_cell->get_output_element_type(0), element::Type_t::f32); - EXPECT_EQ(lstm_cell->get_output_element_type(1), element::Type_t::f32); + EXPECT_EQ(lstm_cell->get_output_element_type(0), element::f32); + EXPECT_EQ(lstm_cell->get_output_element_type(1), element::f32); } TEST(type_prop, lstm_cell_dynamic_inputs) @@ -205,22 +198,22 @@ TEST(type_prop, lstm_cell_dynamic_inputs) const size_t gates_count = 4; const auto X = - make_shared(element::Type_t::f32, PartialShape{batch_size, input_size}); + make_shared(element::f32, PartialShape{batch_size, input_size}); const auto W = make_shared( - element::Type_t::f32, PartialShape{hidden_size * gates_count, input_size}); + element::f32, PartialShape{hidden_size * gates_count, input_size}); const auto R = make_shared( - element::Type_t::f32, PartialShape{hidden_size * gates_count, hidden_size}); + element::f32, PartialShape{hidden_size * gates_count, hidden_size}); const auto H_t = - make_shared(element::Type_t::f32, PartialShape{batch_size, hidden_size}); + make_shared(element::f32, PartialShape{batch_size, hidden_size}); const auto C_t = - make_shared(element::Type_t::f32, PartialShape{batch_size, hidden_size}); + make_shared(element::f32, PartialShape{batch_size, hidden_size}); const auto lstm_cell = make_shared(X, H_t, C_t, W, R, 3); EXPECT_EQ(lstm_cell->get_output_partial_shape(0), (PartialShape{batch_size, hidden_size})); EXPECT_EQ(lstm_cell->get_output_partial_shape(1), (PartialShape{batch_size, hidden_size})); - EXPECT_EQ(lstm_cell->get_output_element_type(0), element::Type_t::f32); - EXPECT_EQ(lstm_cell->get_output_element_type(1), element::Type_t::f32); + EXPECT_EQ(lstm_cell->get_output_element_type(0), element::f32); + EXPECT_EQ(lstm_cell->get_output_element_type(1), element::f32); } TEST(type_prop, lstm_cell_invalid_input_rank0) @@ -230,58 +223,53 @@ TEST(type_prop, lstm_cell_invalid_input_rank0) const size_t hidden_size = 3; const size_t gates_count = 4; - auto X = - make_shared(element::Type_t::f32, PartialShape{batch_size, input_size}); - auto W = make_shared(element::Type_t::f32, + auto X = make_shared(element::f32, PartialShape{batch_size, input_size}); + auto W = make_shared(element::f32, PartialShape{gates_count * hidden_size, input_size}); - auto R = make_shared(element::Type_t::f32, + auto R = make_shared(element::f32, PartialShape{gates_count * hidden_size, hidden_size}); - auto H_t = - make_shared(element::Type_t::f32, PartialShape{batch_size, hidden_size}); - auto C_t = - make_shared(element::Type_t::f32, PartialShape{batch_size, hidden_size}); + auto H_t = make_shared(element::f32, PartialShape{batch_size, hidden_size}); + auto C_t = make_shared(element::f32, PartialShape{batch_size, hidden_size}); // Invalid rank0 for W tensor. - W = make_shared(element::Type_t::f32, PartialShape{}); + W = make_shared(element::f32, PartialShape{}); ASSERT_THROW(make_shared(X, H_t, C_t, W, R, hidden_size), ngraph::NodeValidationFailure) << "LSTMCell node was created with invalid data."; // Invalid rank0 for X tensor. - W = make_shared(element::Type_t::f32, + W = make_shared(element::f32, PartialShape{gates_count * hidden_size, input_size}); - X = make_shared(element::Type_t::f32, PartialShape{}); + X = make_shared(element::f32, PartialShape{}); ASSERT_THROW(make_shared(X, H_t, C_t, W, R, hidden_size), ngraph::NodeValidationFailure) << "LSTMCell node was created with invalid data."; // Invalid rank0 for H_t tensor. - X = make_shared(element::Type_t::f32, PartialShape{batch_size, input_size}); - H_t = make_shared(element::Type_t::f32, PartialShape{}); + X = make_shared(element::f32, PartialShape{batch_size, input_size}); + H_t = make_shared(element::f32, PartialShape{}); ASSERT_THROW(make_shared(X, H_t, C_t, W, R, hidden_size), ngraph::NodeValidationFailure) << "LSTMCell node was created with invalid data."; // Invalid rank0 for C_t tensor. - H_t = - make_shared(element::Type_t::f32, PartialShape{batch_size, hidden_size}); - C_t = make_shared(element::Type_t::f32, PartialShape{}); + H_t = make_shared(element::f32, PartialShape{batch_size, hidden_size}); + C_t = make_shared(element::f32, PartialShape{}); ASSERT_THROW(make_shared(X, H_t, C_t, W, R, hidden_size), ngraph::NodeValidationFailure) << "LSTMCell node was created with invalid data."; // Invalid rank0 for R tensor. - C_t = - make_shared(element::Type_t::f32, PartialShape{batch_size, hidden_size}); - R = make_shared(element::Type_t::f32, PartialShape{}); + C_t = make_shared(element::f32, PartialShape{batch_size, hidden_size}); + R = make_shared(element::f32, PartialShape{}); ASSERT_THROW(make_shared(X, H_t, C_t, W, R, hidden_size), ngraph::NodeValidationFailure) << "LSTMCell node was created with invalid data."; // Invalid rank0 for B tensor. - R = make_shared(element::Type_t::f32, + R = make_shared(element::f32, PartialShape{gates_count * hidden_size, hidden_size}); - auto B = make_shared(element::Type_t::f32, PartialShape{}); + auto B = make_shared(element::f32, PartialShape{}); ASSERT_THROW(make_shared(X, H_t, C_t, W, R, B, hidden_size), ngraph::NodeValidationFailure) << "LSTMCell node was created with invalid data."; @@ -294,16 +282,13 @@ TEST(type_prop, lstm_cell_invalid_input_dynamic_rank) const size_t hidden_size = 3; const size_t gates_count = 4; - auto X = - make_shared(element::Type_t::f32, PartialShape{batch_size, input_size}); - auto W = make_shared(element::Type_t::f32, + auto X = make_shared(element::f32, PartialShape{batch_size, input_size}); + auto W = make_shared(element::f32, PartialShape{gates_count * hidden_size, input_size}); - auto R = make_shared(element::Type_t::f32, + auto R = make_shared(element::f32, PartialShape{gates_count * hidden_size, hidden_size}); - auto H_t = - make_shared(element::Type_t::f32, PartialShape{batch_size, hidden_size}); - auto C_t = - make_shared(element::Type_t::f32, PartialShape{batch_size, hidden_size}); + auto H_t = make_shared(element::f32, PartialShape{batch_size, hidden_size}); + auto C_t = make_shared(element::f32, PartialShape{batch_size, hidden_size}); auto check_dynamic_lstm = [](const shared_ptr& lstm) -> bool { return lstm->output(0).get_partial_shape() == PartialShape::dynamic() && @@ -312,47 +297,39 @@ TEST(type_prop, lstm_cell_invalid_input_dynamic_rank) }; // Invalid dynamic rank for W tensor. - W = make_shared(element::Type_t::f32, - PartialShape::dynamic(Rank::dynamic())); + W = make_shared(element::f32, PartialShape::dynamic(Rank::dynamic())); auto lstm = make_shared(X, H_t, C_t, W, R, hidden_size); EXPECT_EQ(check_dynamic_lstm(lstm), true); // Invalid dynamic rank for X tensor. - W = make_shared(element::Type_t::f32, + W = make_shared(element::f32, PartialShape{gates_count * hidden_size, input_size}); - X = make_shared(element::Type_t::f32, - PartialShape::dynamic(Rank::dynamic())); + X = make_shared(element::f32, PartialShape::dynamic(Rank::dynamic())); lstm = make_shared(X, H_t, C_t, W, R, hidden_size); EXPECT_EQ(check_dynamic_lstm(lstm), true); // Invalid dynamic rank for H_t tensor. - X = make_shared(element::Type_t::f32, PartialShape{batch_size, input_size}); - H_t = make_shared(element::Type_t::f32, - PartialShape::dynamic(Rank::dynamic())); + X = make_shared(element::f32, PartialShape{batch_size, input_size}); + H_t = make_shared(element::f32, PartialShape::dynamic(Rank::dynamic())); lstm = make_shared(X, H_t, C_t, W, R, hidden_size); EXPECT_EQ(check_dynamic_lstm(lstm), true); // Invalid dynamic rank for C_t tensor. - H_t = - make_shared(element::Type_t::f32, PartialShape{batch_size, hidden_size}); - C_t = make_shared(element::Type_t::f32, - PartialShape::dynamic(Rank::dynamic())); + H_t = make_shared(element::f32, PartialShape{batch_size, hidden_size}); + C_t = make_shared(element::f32, PartialShape::dynamic(Rank::dynamic())); lstm = make_shared(X, H_t, C_t, W, R, hidden_size); EXPECT_EQ(check_dynamic_lstm(lstm), true); // Invalid dynamic rank for R tensor. - C_t = - make_shared(element::Type_t::f32, PartialShape{batch_size, hidden_size}); - R = make_shared(element::Type_t::f32, - PartialShape::dynamic(Rank::dynamic())); + C_t = make_shared(element::f32, PartialShape{batch_size, hidden_size}); + R = make_shared(element::f32, PartialShape::dynamic(Rank::dynamic())); lstm = make_shared(X, H_t, C_t, W, R, hidden_size); EXPECT_EQ(check_dynamic_lstm(lstm), true); // Invalid dynamic rank for B tensor. - R = make_shared(element::Type_t::f32, + R = make_shared(element::f32, PartialShape{gates_count * hidden_size, hidden_size}); - auto B = make_shared(element::Type_t::f32, - PartialShape::dynamic(Rank::dynamic())); + auto B = make_shared(element::f32, PartialShape::dynamic(Rank::dynamic())); lstm = make_shared(X, H_t, C_t, W, R, B, hidden_size); EXPECT_EQ(check_dynamic_lstm(lstm), true); } diff --git a/ngraph/test/type_prop/lstm_sequence.cpp b/ngraph/test/type_prop/lstm_sequence.cpp index 48631b366e328b..756e7d9c90b4ca 100644 --- a/ngraph/test/type_prop/lstm_sequence.cpp +++ b/ngraph/test/type_prop/lstm_sequence.cpp @@ -35,7 +35,7 @@ struct recurrent_sequence_parameters Dimension seq_length = 12; Dimension input_size = 8; Dimension hidden_size = 256; - ngraph::element::Type et = element::Type_t::f32; + ngraph::element::Type et = element::f32; }; // @@ -86,20 +86,19 @@ TEST(type_prop, lstm_sequence_forward) const size_t input_size = 4; const size_t hidden_size = 128; - const auto X = make_shared(element::Type_t::f32, - Shape{batch_size, seq_length, input_size}); + const auto X = + make_shared(element::f32, Shape{batch_size, seq_length, input_size}); const auto initial_hidden_state = make_shared( - element::Type_t::f32, Shape{batch_size, num_directions, hidden_size}); + element::f32, Shape{batch_size, num_directions, hidden_size}); const auto initial_cell_state = make_shared( - element::Type_t::f32, Shape{batch_size, num_directions, hidden_size}); - const auto sequence_lengths = - make_shared(element::Type_t::i32, Shape{batch_size}); + element::f32, Shape{batch_size, num_directions, hidden_size}); + const auto sequence_lengths = make_shared(element::i32, Shape{batch_size}); const auto W = make_shared( - element::Type_t::f32, Shape{num_directions, 4 * hidden_size, input_size}); + element::f32, Shape{num_directions, 4 * hidden_size, input_size}); const auto R = make_shared( - element::Type_t::f32, Shape{num_directions, 4 * hidden_size, hidden_size}); - const auto B = make_shared(element::Type_t::f32, - Shape{num_directions, 4 * hidden_size}); + element::f32, Shape{num_directions, 4 * hidden_size, hidden_size}); + const auto B = + make_shared(element::f32, Shape{num_directions, 4 * hidden_size}); const auto lstm_direction = op::RecurrentSequenceDirection::FORWARD; @@ -121,13 +120,13 @@ TEST(type_prop, lstm_sequence_forward) EXPECT_EQ(lstm_sequence->get_activations()[1], "tanh"); EXPECT_EQ(lstm_sequence->get_activations()[2], "tanh"); EXPECT_EQ(lstm_sequence->get_clip(), 0.f); - EXPECT_EQ(lstm_sequence->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(lstm_sequence->get_output_element_type(0), element::f32); EXPECT_EQ(lstm_sequence->outputs().size(), 3); EXPECT_EQ(lstm_sequence->get_output_shape(0), (Shape{batch_size, num_directions, seq_length, hidden_size})); - EXPECT_EQ(lstm_sequence->get_output_element_type(1), element::Type_t::f32); + EXPECT_EQ(lstm_sequence->get_output_element_type(1), element::f32); EXPECT_EQ(lstm_sequence->get_output_shape(1), (Shape{batch_size, num_directions, hidden_size})); - EXPECT_EQ(lstm_sequence->get_output_element_type(2), element::Type_t::f32); + EXPECT_EQ(lstm_sequence->get_output_element_type(2), element::f32); EXPECT_EQ(lstm_sequence->get_output_shape(2), (Shape{batch_size, num_directions, hidden_size})); } @@ -139,20 +138,19 @@ TEST(type_prop, lstm_sequence_bidirectional) const size_t input_size = 8; const size_t hidden_size = 256; - const auto X = make_shared(element::Type_t::f32, - Shape{batch_size, seq_length, input_size}); + const auto X = + make_shared(element::f32, Shape{batch_size, seq_length, input_size}); const auto initial_hidden_state = make_shared( - element::Type_t::f32, Shape{batch_size, num_directions, hidden_size}); + element::f32, Shape{batch_size, num_directions, hidden_size}); const auto initial_cell_state = make_shared( - element::Type_t::f32, Shape{batch_size, num_directions, hidden_size}); - const auto sequence_lengths = - make_shared(element::Type_t::i32, Shape{batch_size}); + element::f32, Shape{batch_size, num_directions, hidden_size}); + const auto sequence_lengths = make_shared(element::i32, Shape{batch_size}); const auto W = make_shared( - element::Type_t::f32, Shape{num_directions, 4 * hidden_size, input_size}); + element::f32, Shape{num_directions, 4 * hidden_size, input_size}); const auto R = make_shared( - element::Type_t::f32, Shape{num_directions, 4 * hidden_size, hidden_size}); - const auto B = make_shared(element::Type_t::f32, - Shape{num_directions, 4 * hidden_size}); + element::f32, Shape{num_directions, 4 * hidden_size, hidden_size}); + const auto B = + make_shared(element::f32, Shape{num_directions, 4 * hidden_size}); const auto lstm_direction = opset5::LSTMSequence::direction::BIDIRECTIONAL; const std::vector activations_alpha = {2.7, 7.0, 32.367}; @@ -179,12 +177,12 @@ TEST(type_prop, lstm_sequence_bidirectional) EXPECT_EQ(lstm_sequence->get_activations()[1], "sigmoid"); EXPECT_EQ(lstm_sequence->get_activations()[2], "sigmoid"); EXPECT_EQ(lstm_sequence->get_clip(), 0.f); - EXPECT_EQ(lstm_sequence->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(lstm_sequence->get_output_element_type(0), element::f32); EXPECT_EQ(lstm_sequence->get_output_shape(0), (Shape{batch_size, num_directions, seq_length, hidden_size})); - EXPECT_EQ(lstm_sequence->get_output_element_type(1), element::Type_t::f32); + EXPECT_EQ(lstm_sequence->get_output_element_type(1), element::f32); EXPECT_EQ(lstm_sequence->get_output_shape(1), (Shape{batch_size, num_directions, hidden_size})); - EXPECT_EQ(lstm_sequence->get_output_element_type(2), element::Type_t::f32); + EXPECT_EQ(lstm_sequence->get_output_element_type(2), element::f32); EXPECT_EQ(lstm_sequence->get_output_shape(2), (Shape{batch_size, num_directions, hidden_size})); } @@ -197,7 +195,7 @@ TEST(type_prop, lstm_sequence_dynamic_batch_size) param.seq_length = 12; param.input_size = 8; param.hidden_size = 256; - param.et = element::Type_t::f32; + param.et = element::f32; auto lstm_sequence = lstm_seq_tensor_initialization(param); lstm_sequence->validate_and_infer_types(); @@ -223,7 +221,7 @@ TEST(type_prop, lstm_sequence_dynamic_num_directions) param.seq_length = 12; param.input_size = 8; param.hidden_size = 256; - param.et = element::Type_t::f32; + param.et = element::f32; auto lstm_sequence = lstm_seq_tensor_initialization(param); lstm_sequence->validate_and_infer_types(); @@ -249,7 +247,7 @@ TEST(type_prop, lstm_sequence_dynamic_seq_length) param.seq_length = Dimension::dynamic(); param.input_size = 8; param.hidden_size = 256; - param.et = element::Type_t::f32; + param.et = element::f32; auto lstm_sequence = lstm_seq_tensor_initialization(param); lstm_sequence->validate_and_infer_types(); @@ -275,7 +273,7 @@ TEST(type_prop, lstm_sequence_dynamic_hidden_size) param.seq_length = 12; param.input_size = 8; param.hidden_size = Dimension::dynamic(); - param.et = element::Type_t::f32; + param.et = element::f32; auto lstm_sequence = lstm_seq_tensor_initialization(param); lstm_sequence->validate_and_infer_types(); @@ -301,7 +299,7 @@ TEST(type_prop, lstm_sequence_dynamic_inputs) param.hidden_size = Dimension::dynamic(); param.num_directions = Dimension::dynamic(); param.seq_length = Dimension::dynamic(); - param.et = element::Type_t::f32; + param.et = element::f32; auto lstm_sequence = lstm_seq_tensor_initialization(param); lstm_sequence->validate_and_infer_types(); @@ -327,7 +325,7 @@ TEST(type_prop, lstm_sequence_invalid_input_dimension) param.seq_length = 12; param.input_size = 8; param.hidden_size = 256; - param.et = element::Type_t::f32; + param.et = element::f32; auto lstm_sequence = lstm_seq_tensor_initialization(param); auto invalid_rank0_tensor = make_shared(param.et, PartialShape{}); @@ -352,7 +350,7 @@ TEST(type_prop, lstm_sequence_invalid_input_dynamic_rank) param.seq_length = 12; param.input_size = 8; param.hidden_size = 256; - param.et = element::Type_t::f32; + param.et = element::f32; auto check_dynamic_lstm = [](const shared_ptr& lstm) -> bool { return lstm->output(0).get_partial_shape() == PartialShape::dynamic() && diff --git a/ngraph/test/type_prop/matmul.cpp b/ngraph/test/type_prop/matmul.cpp index f5ec44b3e109e6..eb452d7794975f 100644 --- a/ngraph/test/type_prop/matmul.cpp +++ b/ngraph/test/type_prop/matmul.cpp @@ -23,114 +23,113 @@ using namespace ngraph; TEST(type_prop, matmul_2D_same) { - auto A = make_shared(element::Type_t::f32, Shape{2, 2}); - auto B = make_shared(element::Type_t::f32, Shape{2, 2}); + auto A = make_shared(element::f32, Shape{2, 2}); + auto B = make_shared(element::f32, Shape{2, 2}); auto matmul = make_shared(A, B); - ASSERT_EQ(matmul->get_element_type(), element::Type_t::f32); + ASSERT_EQ(matmul->get_element_type(), element::f32); ASSERT_EQ(matmul->get_shape(), (Shape{2, 2})); } TEST(type_prop, matmul_4D_same) { - auto A = make_shared(element::Type_t::f32, Shape{2, 2, 3, 3}); - auto B = make_shared(element::Type_t::f32, Shape{2, 2, 3, 3}); + auto A = make_shared(element::f32, Shape{2, 2, 3, 3}); + auto B = make_shared(element::f32, Shape{2, 2, 3, 3}); auto matmul = make_shared(A, B); - ASSERT_EQ(matmul->get_element_type(), element::Type_t::f32); + ASSERT_EQ(matmul->get_element_type(), element::f32); ASSERT_EQ(matmul->get_shape(), (Shape{2, 2, 3, 3})); } TEST(type_prop, matmul_2D) { - auto A = make_shared(element::Type_t::f32, Shape{3, 6}); - auto B = make_shared(element::Type_t::f32, Shape{6, 4}); + auto A = make_shared(element::f32, Shape{3, 6}); + auto B = make_shared(element::f32, Shape{6, 4}); auto matmul = make_shared(A, B); - ASSERT_EQ(matmul->get_element_type(), element::Type_t::f32); + ASSERT_EQ(matmul->get_element_type(), element::f32); ASSERT_EQ(matmul->get_shape(), (Shape{3, 4})); } TEST(type_prop, matmul_4D) { - auto A = make_shared(element::Type_t::f32, Shape{2, 2, 3, 6}); - auto B = make_shared(element::Type_t::f32, Shape{2, 2, 6, 4}); + auto A = make_shared(element::f32, Shape{2, 2, 3, 6}); + auto B = make_shared(element::f32, Shape{2, 2, 6, 4}); auto matmul = make_shared(A, B); - ASSERT_EQ(matmul->get_element_type(), element::Type_t::f32); + ASSERT_EQ(matmul->get_element_type(), element::f32); ASSERT_EQ(matmul->get_shape(), (Shape{2, 2, 3, 4})); } TEST(type_prop, matmul_5D_x_3D_transpose_a_transpose_b) { - auto A = make_shared(element::Type_t::f32, Shape{2, 1, 6, 3}); - auto B = make_shared(element::Type_t::f32, Shape{7, 1, 5, 4, 6}); + auto A = make_shared(element::f32, Shape{2, 1, 6, 3}); + auto B = make_shared(element::f32, Shape{7, 1, 5, 4, 6}); auto matmul = make_shared(A, B, true, true); - ASSERT_EQ(matmul->get_element_type(), element::Type_t::f32); + ASSERT_EQ(matmul->get_element_type(), element::f32); ASSERT_EQ(matmul->get_shape(), (Shape{7, 2, 5, 3, 4})); } TEST(type_prop, matmul_2D_transpose_a) { - auto A = make_shared(element::Type_t::f32, Shape{6, 3}); - auto B = make_shared(element::Type_t::f32, Shape{6, 4}); + auto A = make_shared(element::f32, Shape{6, 3}); + auto B = make_shared(element::f32, Shape{6, 4}); auto matmul = make_shared(A, B, 1); - ASSERT_EQ(matmul->get_element_type(), element::Type_t::f32); + ASSERT_EQ(matmul->get_element_type(), element::f32); ASSERT_EQ(matmul->get_shape(), (Shape{3, 4})); } TEST(type_prop, matmul_4D_transpose_a) { - auto A = make_shared(element::Type_t::f32, Shape{2, 2, 6, 3}); - auto B = make_shared(element::Type_t::f32, Shape{2, 2, 6, 4}); + auto A = make_shared(element::f32, Shape{2, 2, 6, 3}); + auto B = make_shared(element::f32, Shape{2, 2, 6, 4}); auto matmul = make_shared(A, B, 1); - ASSERT_EQ(matmul->get_element_type(), element::Type_t::f32); + ASSERT_EQ(matmul->get_element_type(), element::f32); ASSERT_EQ(matmul->get_shape(), (Shape{2, 2, 3, 4})); } TEST(type_prop, matmul_2D_transpose_b) { - auto A = make_shared(element::Type_t::f32, Shape{3, 6}); - auto B = make_shared(element::Type_t::f32, Shape{4, 6}); + auto A = make_shared(element::f32, Shape{3, 6}); + auto B = make_shared(element::f32, Shape{4, 6}); auto matmul = make_shared(A, B, 0, 1); - ASSERT_EQ(matmul->get_element_type(), element::Type_t::f32); + ASSERT_EQ(matmul->get_element_type(), element::f32); ASSERT_EQ(matmul->get_shape(), (Shape{3, 4})); } TEST(type_prop, matmul_4D_transpose_b) { - auto A = make_shared(element::Type_t::f32, Shape{2, 2, 3, 6}); - auto B = make_shared(element::Type_t::f32, Shape{2, 2, 4, 6}); + auto A = make_shared(element::f32, Shape{2, 2, 3, 6}); + auto B = make_shared(element::f32, Shape{2, 2, 4, 6}); auto matmul = make_shared(A, B, 0, 1); - ASSERT_EQ(matmul->get_element_type(), element::Type_t::f32); + ASSERT_EQ(matmul->get_element_type(), element::f32); ASSERT_EQ(matmul->get_shape(), (Shape{2, 2, 3, 4})); } TEST(type_prop, matmul_dynamic_5D_transpose_b) { Dimension dynamic = Dimension::dynamic(); - auto A = make_shared(element::Type_t::f32, - PartialShape{dynamic, 4, dynamic, dynamic, 6}); - auto B = - make_shared(element::Type_t::f32, PartialShape{1, dynamic, dynamic, 4, 6}); + auto A = + make_shared(element::f32, PartialShape{dynamic, 4, dynamic, dynamic, 6}); + auto B = make_shared(element::f32, PartialShape{1, dynamic, dynamic, 4, 6}); auto matmul = make_shared(A, B, 0, 1); - ASSERT_EQ(matmul->get_element_type(), element::Type_t::f32); + ASSERT_EQ(matmul->get_element_type(), element::f32); ASSERT_EQ(matmul->get_output_partial_shape(0), (PartialShape{Dimension(1, -1), 4, dynamic, dynamic, 4})); } @@ -138,24 +137,24 @@ TEST(type_prop, matmul_dynamic_5D_transpose_b) TEST(type_prop, matmul_dynamic_2D_transpose_a) { Dimension dynamic = Dimension::dynamic(); - auto A = make_shared(element::Type_t::f32, PartialShape{dynamic, 3}); - auto B = make_shared(element::Type_t::f32, PartialShape{4, dynamic}); + auto A = make_shared(element::f32, PartialShape{dynamic, 3}); + auto B = make_shared(element::f32, PartialShape{4, dynamic}); auto matmul = make_shared(A, B, 1, 0); - ASSERT_EQ(matmul->get_element_type(), element::Type_t::f32); + ASSERT_EQ(matmul->get_element_type(), element::f32); ASSERT_EQ(matmul->get_output_partial_shape(0), (PartialShape{3, dynamic})); } TEST(type_prop, matmul_dynamic_1D_3D) { Dimension dynamic = Dimension::dynamic(); - auto A = make_shared(element::Type_t::f32, PartialShape{dynamic}); - auto B = make_shared(element::Type_t::f32, PartialShape{2, 4, dynamic}); + auto A = make_shared(element::f32, PartialShape{dynamic}); + auto B = make_shared(element::f32, PartialShape{2, 4, dynamic}); auto matmul = make_shared(A, B); - ASSERT_EQ(matmul->get_element_type(), element::Type_t::f32); + ASSERT_EQ(matmul->get_element_type(), element::f32); ASSERT_EQ(matmul->get_output_partial_shape(0), (PartialShape{2, dynamic})); } @@ -163,52 +162,52 @@ TEST(type_prop, matmul_dynamic_1D_3D) // 1D x 1D TEST(type_prop, matmul_1D_x_1D_false_false) { - auto A = make_shared(element::Type_t::f32, Shape{1}); - auto B = make_shared(element::Type_t::f32, Shape{1}); + auto A = make_shared(element::f32, Shape{1}); + auto B = make_shared(element::f32, Shape{1}); auto matmul = make_shared(A, B, false, false); - ASSERT_EQ(matmul->get_element_type(), element::Type_t::f32); + ASSERT_EQ(matmul->get_element_type(), element::f32); ASSERT_EQ(matmul->get_shape(), (Shape{})); } TEST(type_prop, matmul_1D_x_1D_false_true) { - auto A = make_shared(element::Type_t::f32, Shape{1}); - auto B = make_shared(element::Type_t::f32, Shape{1}); + auto A = make_shared(element::f32, Shape{1}); + auto B = make_shared(element::f32, Shape{1}); auto matmul = make_shared(A, B, false, true); - ASSERT_EQ(matmul->get_element_type(), element::Type_t::f32); + ASSERT_EQ(matmul->get_element_type(), element::f32); ASSERT_EQ(matmul->get_shape(), (Shape{})); } TEST(type_prop, matmul_1D_x_1D_true_false) { - auto A = make_shared(element::Type_t::f32, Shape{1}); - auto B = make_shared(element::Type_t::f32, Shape{1}); + auto A = make_shared(element::f32, Shape{1}); + auto B = make_shared(element::f32, Shape{1}); auto matmul = make_shared(A, B, true, false); - ASSERT_EQ(matmul->get_element_type(), element::Type_t::f32); + ASSERT_EQ(matmul->get_element_type(), element::f32); ASSERT_EQ(matmul->get_shape(), (Shape{})); } TEST(type_prop, matmul_1D_x_1D_true_true) { - auto A = make_shared(element::Type_t::f32, Shape{1}); - auto B = make_shared(element::Type_t::f32, Shape{1}); + auto A = make_shared(element::f32, Shape{1}); + auto B = make_shared(element::f32, Shape{1}); auto matmul = make_shared(A, B, true, true); - ASSERT_EQ(matmul->get_element_type(), element::Type_t::f32); + ASSERT_EQ(matmul->get_element_type(), element::f32); ASSERT_EQ(matmul->get_shape(), (Shape{})); } TEST(type_prop, matmul_1D_x_1D_incompatible) { - auto A = make_shared(element::Type_t::f32, Shape{3}); - auto B = make_shared(element::Type_t::f32, Shape{4}); + auto A = make_shared(element::f32, Shape{3}); + auto B = make_shared(element::f32, Shape{4}); try { @@ -229,30 +228,30 @@ TEST(type_prop, matmul_1D_x_1D_incompatible) // 2D x 1D TEST(type_prop, matmul_2D_x_1D_false_false) { - auto A = make_shared(element::Type_t::f32, Shape{1, 2}); - auto B = make_shared(element::Type_t::f32, Shape{2}); + auto A = make_shared(element::f32, Shape{1, 2}); + auto B = make_shared(element::f32, Shape{2}); auto matmul = make_shared(A, B, false, false); - ASSERT_EQ(matmul->get_element_type(), element::Type_t::f32); + ASSERT_EQ(matmul->get_element_type(), element::f32); ASSERT_EQ(matmul->get_shape(), (Shape{1})); } TEST(type_prop, matmul_2D_x_1D_false_true) { - auto A = make_shared(element::Type_t::f32, Shape{1, 2}); - auto B = make_shared(element::Type_t::f32, Shape{2}); + auto A = make_shared(element::f32, Shape{1, 2}); + auto B = make_shared(element::f32, Shape{2}); auto matmul = make_shared(A, B, false, true); - ASSERT_EQ(matmul->get_element_type(), element::Type_t::f32); + ASSERT_EQ(matmul->get_element_type(), element::f32); ASSERT_EQ(matmul->get_shape(), (Shape{1})); } TEST(type_prop, matmul_2D_x_1D_true_false) { - auto A = make_shared(element::Type_t::f32, Shape{1, 2}); - auto B = make_shared(element::Type_t::f32, Shape{2}); + auto A = make_shared(element::f32, Shape{1, 2}); + auto B = make_shared(element::f32, Shape{2}); try { @@ -272,8 +271,8 @@ TEST(type_prop, matmul_2D_x_1D_true_false) TEST(type_prop, matmul_2D_x_1D_true_true) { - auto A = make_shared(element::Type_t::f32, Shape{1, 2}); - auto B = make_shared(element::Type_t::f32, Shape{2}); + auto A = make_shared(element::f32, Shape{1, 2}); + auto B = make_shared(element::f32, Shape{2}); try { @@ -294,19 +293,19 @@ TEST(type_prop, matmul_2D_x_1D_true_true) // 1D x 2D TEST(type_prop, matmul_1D_x_2D_false_false) { - auto A = make_shared(element::Type_t::f32, Shape{2}); - auto B = make_shared(element::Type_t::f32, Shape{2, 1}); + auto A = make_shared(element::f32, Shape{2}); + auto B = make_shared(element::f32, Shape{2, 1}); auto matmul = make_shared(A, B, false, false); - ASSERT_EQ(matmul->get_element_type(), element::Type_t::f32); + ASSERT_EQ(matmul->get_element_type(), element::f32); ASSERT_EQ(matmul->get_shape(), (Shape{1})); } TEST(type_prop, matmul_1D_x_2D_false_true) { - auto A = make_shared(element::Type_t::f32, Shape{2}); - auto B = make_shared(element::Type_t::f32, Shape{2, 1}); + auto A = make_shared(element::f32, Shape{2}); + auto B = make_shared(element::f32, Shape{2, 1}); try { @@ -326,18 +325,18 @@ TEST(type_prop, matmul_1D_x_2D_false_true) TEST(type_prop, matmul_1D_x_2D_true_false) { - auto A = make_shared(element::Type_t::f32, Shape{2}); - auto B = make_shared(element::Type_t::f32, Shape{2, 1}); + auto A = make_shared(element::f32, Shape{2}); + auto B = make_shared(element::f32, Shape{2, 1}); auto matmul = make_shared(A, B, true, false); - ASSERT_EQ(matmul->get_element_type(), element::Type_t::f32); + ASSERT_EQ(matmul->get_element_type(), element::f32); ASSERT_EQ(matmul->get_shape(), (Shape{1})); } TEST(type_prop, matmul_1D_x_2D_true_true) { - auto A = make_shared(element::Type_t::f32, Shape{2}); - auto B = make_shared(element::Type_t::f32, Shape{2, 1}); + auto A = make_shared(element::f32, Shape{2}); + auto B = make_shared(element::f32, Shape{2, 1}); try { @@ -358,65 +357,65 @@ TEST(type_prop, matmul_1D_x_2D_true_true) // 1D x 4D TEST(type_prop, matmul_1D_x_4D_false_false) { - auto A = make_shared(element::Type_t::f32, Shape{3}); - auto B = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); + auto A = make_shared(element::f32, Shape{3}); + auto B = make_shared(element::f32, Shape{1, 2, 3, 4}); auto matmul = make_shared(A, B, false, false); - ASSERT_EQ(matmul->get_element_type(), element::Type_t::f32); + ASSERT_EQ(matmul->get_element_type(), element::f32); ASSERT_EQ(matmul->get_shape(), (Shape{1, 2, 4})); } // 4D x 1D TEST(type_prop, matmul_4D_x_1D_false_false) { - auto A = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - auto B = make_shared(element::Type_t::f32, Shape{4}); + auto A = make_shared(element::f32, Shape{1, 2, 3, 4}); + auto B = make_shared(element::f32, Shape{4}); auto matmul = make_shared(A, B, false, false); - ASSERT_EQ(matmul->get_element_type(), element::Type_t::f32); + ASSERT_EQ(matmul->get_element_type(), element::f32); ASSERT_EQ(matmul->get_shape(), (Shape{1, 2, 3})); } // Batch broadcast TEST(type_prop, matmul_batch_broadcast) { - auto A = make_shared(element::Type_t::f32, Shape{5, 1, 1, 4, 3}); - auto B = make_shared(element::Type_t::f32, Shape{1, 1, 6, 3, 2}); + auto A = make_shared(element::f32, Shape{5, 1, 1, 4, 3}); + auto B = make_shared(element::f32, Shape{1, 1, 6, 3, 2}); auto matmul = make_shared(A, B, false, false); - ASSERT_EQ(matmul->get_element_type(), element::Type_t::f32); + ASSERT_EQ(matmul->get_element_type(), element::f32); ASSERT_EQ(matmul->get_shape(), (Shape{5, 1, 6, 4, 2})); } TEST(type_prop, matmul_batch_broadcast_expand_to_A) { - auto A = make_shared(element::Type_t::f32, Shape{1, 4, 3}); - auto B = make_shared(element::Type_t::f32, Shape{7, 8, 5, 3, 2}); + auto A = make_shared(element::f32, Shape{1, 4, 3}); + auto B = make_shared(element::f32, Shape{7, 8, 5, 3, 2}); auto matmul = make_shared(A, B, false, false); - ASSERT_EQ(matmul->get_element_type(), element::Type_t::f32); + ASSERT_EQ(matmul->get_element_type(), element::f32); ASSERT_EQ(matmul->get_shape(), (Shape{7, 8, 5, 4, 2})); } TEST(type_prop, matmul_batch_broadcast_expand_to_B) { - auto A = make_shared(element::Type_t::f32, Shape{8, 7, 6, 1, 4, 3}); - auto B = make_shared(element::Type_t::f32, Shape{1, 5, 3, 2}); + auto A = make_shared(element::f32, Shape{8, 7, 6, 1, 4, 3}); + auto B = make_shared(element::f32, Shape{1, 5, 3, 2}); auto matmul = make_shared(A, B, false, false); - ASSERT_EQ(matmul->get_element_type(), element::Type_t::f32); + ASSERT_EQ(matmul->get_element_type(), element::f32); ASSERT_EQ(matmul->get_shape(), (Shape{8, 7, 6, 5, 4, 2})); } TEST(type_prop, matmul_incompatible_batch_dims) { - auto A = make_shared(element::Type_t::f32, Shape{7, 4, 3}); - auto B = make_shared(element::Type_t::f32, Shape{6, 3, 2}); + auto A = make_shared(element::f32, Shape{7, 4, 3}); + auto B = make_shared(element::f32, Shape{6, 3, 2}); try { @@ -436,14 +435,14 @@ TEST(type_prop, matmul_incompatible_batch_dims) TEST(type_prop, matmul_matrix_dynamic_bounds) { - auto A = make_shared(element::Type_t::f32, - PartialShape{Dimension(2, 5), Dimension(6, 10)}); - auto B = make_shared(element::Type_t::f32, - PartialShape{Dimension(7, 8), Dimension(15, 20)}); + auto A = + make_shared(element::f32, PartialShape{Dimension(2, 5), Dimension(6, 10)}); + auto B = + make_shared(element::f32, PartialShape{Dimension(7, 8), Dimension(15, 20)}); auto matmul = make_shared(A, B, false, false); - ASSERT_EQ(matmul->get_element_type(), element::Type_t::f32); + ASSERT_EQ(matmul->get_element_type(), element::f32); ASSERT_EQ(matmul->get_output_partial_shape(0), (PartialShape{Dimension(2, 5), Dimension(15, 20)})); } @@ -518,35 +517,35 @@ TEST(type_prop, matmul_batch_dynamic_bounds) 5, // 18 4}; // 19 - auto A = make_shared(element::Type_t::f32, A_shape); - auto B = make_shared(element::Type_t::f32, B_shape); + auto A = make_shared(element::f32, A_shape); + auto B = make_shared(element::f32, B_shape); auto matmul = make_shared(A, B); - ASSERT_EQ(matmul->get_element_type(), element::Type_t::f32); + ASSERT_EQ(matmul->get_element_type(), element::f32); ASSERT_EQ(matmul->get_output_partial_shape(0), expected_output_shape); } TEST(type_prop, matmul_incompatible_matrix_dim_bounds) { - auto A = make_shared(element::Type_t::f32, - PartialShape{Dimension(2, 5), Dimension(3, 4)}); - auto B = make_shared(element::Type_t::f32, - PartialShape{Dimension(1, 2), Dimension(15, 20)}); + auto A = + make_shared(element::f32, PartialShape{Dimension(2, 5), Dimension(3, 4)}); + auto B = + make_shared(element::f32, PartialShape{Dimension(1, 2), Dimension(15, 20)}); auto expected_output_shape = PartialShape{Dimension(2, 5), Dimension(15, 20)}; // No error for backward compatibility auto matmul = make_shared(A, B, false, false); - ASSERT_EQ(matmul->get_element_type(), element::Type_t::f32); + ASSERT_EQ(matmul->get_element_type(), element::f32); ASSERT_EQ(matmul->get_output_partial_shape(0), expected_output_shape); } TEST(type_prop, matmul_incompatible_batch_dim_bounds) { - auto A = make_shared(element::Type_t::f32, PartialShape{Dimension(2, 5), 4, 3}); - auto B = make_shared(element::Type_t::f32, PartialShape{Dimension(6, 10), 3, 2}); + auto A = make_shared(element::f32, PartialShape{Dimension(2, 5), 4, 3}); + auto B = make_shared(element::f32, PartialShape{Dimension(6, 10), 3, 2}); Dimension dynamic = Dimension::dynamic(); auto expected_output_shape = PartialShape{dynamic, 4, 2}; @@ -554,6 +553,6 @@ TEST(type_prop, matmul_incompatible_batch_dim_bounds) // No error for backward compatibility auto matmul = make_shared(A, B, false, false); - ASSERT_EQ(matmul->get_element_type(), element::Type_t::f32); + ASSERT_EQ(matmul->get_element_type(), element::f32); ASSERT_EQ(matmul->get_output_partial_shape(0), expected_output_shape); } diff --git a/ngraph/test/type_prop/max_pool.cpp b/ngraph/test/type_prop/max_pool.cpp index fb9c59403f3c5b..f4d8b241559a60 100644 --- a/ngraph/test/type_prop/max_pool.cpp +++ b/ngraph/test/type_prop/max_pool.cpp @@ -31,7 +31,7 @@ TEST(type_prop, max_pool_auto_padding) const auto rounding_mode = op::RoundingType::FLOOR; const auto auto_pad = op::PadType::SAME_LOWER; - auto arg = make_shared(element::Type_t::f32, arg_shape); + auto arg = make_shared(element::f32, arg_shape); auto mp = make_shared( arg, strides, pads_begin, pads_end, kernel_shape, rounding_mode, auto_pad); @@ -50,7 +50,7 @@ TEST(type_prop, max_pool_auto_padding_nc_dims_dynamic_same_lower) const auto rounding_mode = op::RoundingType::FLOOR; const auto auto_pad = op::PadType::SAME_LOWER; - auto arg = make_shared(element::Type_t::f32, arg_shape); + auto arg = make_shared(element::f32, arg_shape); auto mp = make_shared( arg, strides, pads_begin, pads_end, kernel_shape, rounding_mode, auto_pad); @@ -70,7 +70,7 @@ TEST(type_prop, max_pool_auto_padding_nc_dims_dynamic_same_upper) const auto rounding_mode = op::RoundingType::FLOOR; const auto auto_pad = op::PadType::SAME_UPPER; - auto arg = make_shared(element::Type_t::f32, arg_shape); + auto arg = make_shared(element::f32, arg_shape); auto mp = make_shared( arg, strides, pads_begin, pads_end, kernel_shape, rounding_mode, auto_pad); @@ -90,7 +90,7 @@ TEST(type_prop, max_pool_auto_padding_spatial_dims_dynamic) const auto rounding_mode = op::RoundingType::FLOOR; const auto auto_pad = op::PadType::SAME_LOWER; - auto arg = make_shared(element::Type_t::f32, arg_shape); + auto arg = make_shared(element::f32, arg_shape); auto mp = make_shared( arg, strides, pads_begin, pads_end, kernel_shape, rounding_mode, auto_pad); diff --git a/ngraph/test/type_prop/mish.cpp b/ngraph/test/type_prop/mish.cpp index c28a9faceafdff..68ec076374fa98 100644 --- a/ngraph/test/type_prop/mish.cpp +++ b/ngraph/test/type_prop/mish.cpp @@ -23,33 +23,31 @@ using namespace ngraph; TEST(type_prop, mish) { - auto data = make_shared(element::Type_t::f32, Shape{1, 3, 6}); + auto data = make_shared(element::f32, Shape{1, 3, 6}); auto mish_func = make_shared(data); - EXPECT_EQ(mish_func->get_element_type(), element::Type_t::f32); + EXPECT_EQ(mish_func->get_element_type(), element::f32); EXPECT_EQ(mish_func->get_shape(), (Shape{1, 3, 6})); } TEST(type_prop, mish_partial) { - auto data = - make_shared(element::Type_t::f32, PartialShape{1, Dimension::dynamic(), 6}); + auto data = make_shared(element::f32, PartialShape{1, Dimension::dynamic(), 6}); auto mish_func = make_shared(data); - EXPECT_EQ(mish_func->get_element_type(), element::Type_t::f32); + EXPECT_EQ(mish_func->get_element_type(), element::f32); ASSERT_TRUE(mish_func->get_output_partial_shape(0).same_scheme( (PartialShape{1, Dimension::dynamic(), 6}))); // rank unknown auto mish_partial = make_shared( - make_shared(element::Type_t::f32, PartialShape::dynamic())); + make_shared(element::f32, PartialShape::dynamic())); ASSERT_TRUE(mish_partial->get_output_partial_shape(0).same_scheme(PartialShape::dynamic())); } TEST(type_prop, mish_partial_static_rank) { - auto data = - make_shared(element::Type_t::f32, PartialShape{1, Dimension::dynamic(), 6}); + auto data = make_shared(element::f32, PartialShape{1, Dimension::dynamic(), 6}); auto mish_func = make_shared(data); - EXPECT_EQ(mish_func->get_element_type(), element::Type_t::f32); + EXPECT_EQ(mish_func->get_element_type(), element::f32); ASSERT_TRUE(mish_func->get_output_partial_shape(0).same_scheme( (PartialShape{1, Dimension::dynamic(), 6}))); ASSERT_TRUE(mish_func->get_output_partial_shape(0).rank().is_static()); diff --git a/ngraph/test/type_prop/mvn.cpp b/ngraph/test/type_prop/mvn.cpp index 87247422d4080c..7b37b95a2682d6 100644 --- a/ngraph/test/type_prop/mvn.cpp +++ b/ngraph/test/type_prop/mvn.cpp @@ -23,18 +23,17 @@ using namespace ngraph; TEST(type_prop, mvn) { - auto data = make_shared(element::Type_t::f32, Shape{1, 3, 6}); + auto data = make_shared(element::f32, Shape{1, 3, 6}); auto mvn_func = make_shared(data); - EXPECT_EQ(mvn_func->get_element_type(), element::Type_t::f32); + EXPECT_EQ(mvn_func->get_element_type(), element::f32); EXPECT_EQ(mvn_func->get_shape(), (Shape{1, 3, 6})); } TEST(type_prop, mvn_partial) { - auto data = - make_shared(element::Type_t::f32, PartialShape{1, Dimension::dynamic(), 6}); + auto data = make_shared(element::f32, PartialShape{1, Dimension::dynamic(), 6}); auto mvn_func = make_shared(data); - EXPECT_EQ(mvn_func->get_element_type(), element::Type_t::f32); + EXPECT_EQ(mvn_func->get_element_type(), element::f32); EXPECT_EQ(mvn_func->get_reduction_axes(), (AxisSet{1, 2})); ASSERT_TRUE(mvn_func->get_output_partial_shape(0).same_scheme( (PartialShape{1, Dimension::dynamic(), 6}))); @@ -43,8 +42,8 @@ TEST(type_prop, mvn_partial) EXPECT_EQ(make_shared(data, false)->get_reduction_axes(), (AxisSet{2})); // rank unknown - auto mvn_partial = make_shared( - make_shared(element::Type_t::f32, PartialShape::dynamic())); + auto mvn_partial = + make_shared(make_shared(element::f32, PartialShape::dynamic())); EXPECT_EQ(mvn_partial->get_reduction_axes(), AxisSet{}); ASSERT_TRUE(mvn_partial->get_output_partial_shape(0).same_scheme(PartialShape::dynamic())); } diff --git a/ngraph/test/type_prop/non_max_suppression.cpp b/ngraph/test/type_prop/non_max_suppression.cpp index 1c2d7572b07057..8202486b25d12b 100644 --- a/ngraph/test/type_prop/non_max_suppression.cpp +++ b/ngraph/test/type_prop/non_max_suppression.cpp @@ -27,8 +27,8 @@ TEST(type_prop, nms_incorrect_boxes_rank) { try { - const auto boxes = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - const auto scores = make_shared(element::Type_t::f32, Shape{1, 2, 3}); + const auto boxes = make_shared(element::f32, Shape{1, 2, 3, 4}); + const auto scores = make_shared(element::f32, Shape{1, 2, 3}); make_shared(boxes, scores); } @@ -42,8 +42,8 @@ TEST(type_prop, nms_incorrect_scores_rank) { try { - const auto boxes = make_shared(element::Type_t::f32, Shape{1, 2, 3}); - const auto scores = make_shared(element::Type_t::f32, Shape{1, 2}); + const auto boxes = make_shared(element::f32, Shape{1, 2, 3}); + const auto scores = make_shared(element::f32, Shape{1, 2}); make_shared(boxes, scores); } @@ -57,8 +57,8 @@ TEST(type_prop, nms_incorrect_scheme_num_batches) { try { - const auto boxes = make_shared(element::Type_t::f32, Shape{1, 2, 3}); - const auto scores = make_shared(element::Type_t::f32, Shape{2, 2, 3}); + const auto boxes = make_shared(element::f32, Shape{1, 2, 3}); + const auto scores = make_shared(element::f32, Shape{2, 2, 3}); make_shared(boxes, scores); } @@ -73,8 +73,8 @@ TEST(type_prop, nms_incorrect_scheme_num_boxes) { try { - const auto boxes = make_shared(element::Type_t::f32, Shape{1, 2, 3}); - const auto scores = make_shared(element::Type_t::f32, Shape{1, 2, 3}); + const auto boxes = make_shared(element::f32, Shape{1, 2, 3}); + const auto scores = make_shared(element::f32, Shape{1, 2, 3}); make_shared(boxes, scores); } @@ -88,11 +88,11 @@ TEST(type_prop, nms_incorrect_scheme_num_boxes) TEST(type_prop, nms_scalar_inputs_check) { - const auto boxes = make_shared(element::Type_t::f32, Shape{1, 2, 4}); - const auto scores = make_shared(element::Type_t::f32, Shape{1, 2, 2}); + const auto boxes = make_shared(element::f32, Shape{1, 2, 4}); + const auto scores = make_shared(element::f32, Shape{1, 2, 2}); - const auto scalar = make_shared(element::Type_t::f32, Shape{}); - const auto non_scalar = make_shared(element::Type_t::f32, Shape{1}); + const auto scalar = make_shared(element::f32, Shape{}); + const auto non_scalar = make_shared(element::f32, Shape{1}); try { @@ -125,8 +125,8 @@ TEST(type_prop, nms_scalar_inputs_check) TEST(type_prop, nms_output_shape) { - const auto boxes = make_shared(element::Type_t::f32, Shape{1, 2, 4}); - const auto scores = make_shared(element::Type_t::f32, Shape{1, 2, 2}); + const auto boxes = make_shared(element::f32, Shape{1, 2, 4}); + const auto scores = make_shared(element::f32, Shape{1, 2, 2}); const auto nms = make_shared(boxes, scores); const auto nms_out_ps = nms->get_output_partial_shape(0); @@ -138,49 +138,46 @@ TEST(type_prop, nms_output_shape) TEST(type_prop, nms_output_shape_2) { - const auto boxes = make_shared(element::Type_t::f32, Shape{1, 6, 4}); - const auto scores = make_shared(element::Type_t::f32, Shape{1, 1, 6}); - const auto max_output_boxes_per_class = - op::Constant::create(element::Type_t::i32, Shape{}, {3}); - const auto iou_threshold = make_shared(element::Type_t::f32, Shape{}); - const auto score_threshold = make_shared(element::Type_t::f32, Shape{}); + const auto boxes = make_shared(element::f32, Shape{1, 6, 4}); + const auto scores = make_shared(element::f32, Shape{1, 1, 6}); + const auto max_output_boxes_per_class = op::Constant::create(element::i32, Shape{}, {3}); + const auto iou_threshold = make_shared(element::f32, Shape{}); + const auto score_threshold = make_shared(element::f32, Shape{}); const auto nms = make_shared( boxes, scores, max_output_boxes_per_class, iou_threshold, score_threshold); - ASSERT_EQ(nms->get_element_type(), element::Type_t::i64); + ASSERT_EQ(nms->get_element_type(), element::i64); ASSERT_EQ(nms->get_shape(), (Shape{3, 3})); } TEST(type_prop, nms_output_shape_3) { - const auto boxes = make_shared(element::Type_t::f32, Shape{1, 1, 4}); - const auto scores = make_shared(element::Type_t::f32, Shape{1, 1, 1}); - const auto max_output_boxes_per_class = - op::Constant::create(element::Type_t::i16, Shape{}, {3}); - const auto iou_threshold = make_shared(element::Type_t::f32, Shape{}); - const auto score_threshold = make_shared(element::Type_t::f32, Shape{}); + const auto boxes = make_shared(element::f32, Shape{1, 1, 4}); + const auto scores = make_shared(element::f32, Shape{1, 1, 1}); + const auto max_output_boxes_per_class = op::Constant::create(element::i16, Shape{}, {3}); + const auto iou_threshold = make_shared(element::f32, Shape{}); + const auto score_threshold = make_shared(element::f32, Shape{}); const auto nms = make_shared( boxes, scores, max_output_boxes_per_class, iou_threshold, score_threshold); - ASSERT_EQ(nms->get_element_type(), element::Type_t::i64); + ASSERT_EQ(nms->get_element_type(), element::i64); ASSERT_EQ(nms->get_shape(), (Shape{1, 3})); } TEST(type_prop, nms_dynamic_boxes_and_scores) { - const auto boxes = make_shared(element::Type_t::f32, PartialShape::dynamic()); - const auto scores = make_shared(element::Type_t::f32, PartialShape::dynamic()); - const auto max_output_boxes_per_class = - op::Constant::create(element::Type_t::i16, Shape{}, {3}); - const auto iou_threshold = make_shared(element::Type_t::f32, Shape{}); - const auto score_threshold = make_shared(element::Type_t::f32, Shape{}); + const auto boxes = make_shared(element::f32, PartialShape::dynamic()); + const auto scores = make_shared(element::f32, PartialShape::dynamic()); + const auto max_output_boxes_per_class = op::Constant::create(element::i16, Shape{}, {3}); + const auto iou_threshold = make_shared(element::f32, Shape{}); + const auto score_threshold = make_shared(element::f32, Shape{}); const auto nms = make_shared( boxes, scores, max_output_boxes_per_class, iou_threshold, score_threshold); - ASSERT_EQ(nms->get_element_type(), element::Type_t::i64); + ASSERT_EQ(nms->get_element_type(), element::i64); ASSERT_TRUE( nms->get_output_partial_shape(0).same_scheme(PartialShape{Dimension::dynamic(), 3})); } @@ -191,8 +188,8 @@ TEST(type_prop, nms_v3_incorrect_boxes_rank) { try { - const auto boxes = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - const auto scores = make_shared(element::Type_t::f32, Shape{1, 2, 3}); + const auto boxes = make_shared(element::f32, Shape{1, 2, 3, 4}); + const auto scores = make_shared(element::f32, Shape{1, 2, 3}); make_shared(boxes, scores); } @@ -206,8 +203,8 @@ TEST(type_prop, nms_v3_incorrect_scores_rank) { try { - const auto boxes = make_shared(element::Type_t::f32, Shape{1, 2, 3}); - const auto scores = make_shared(element::Type_t::f32, Shape{1, 2}); + const auto boxes = make_shared(element::f32, Shape{1, 2, 3}); + const auto scores = make_shared(element::f32, Shape{1, 2}); make_shared(boxes, scores); } @@ -221,8 +218,8 @@ TEST(type_prop, nms_v3_incorrect_scheme_num_batches) { try { - const auto boxes = make_shared(element::Type_t::f32, Shape{1, 2, 3}); - const auto scores = make_shared(element::Type_t::f32, Shape{2, 2, 3}); + const auto boxes = make_shared(element::f32, Shape{1, 2, 3}); + const auto scores = make_shared(element::f32, Shape{2, 2, 3}); make_shared(boxes, scores); } @@ -237,8 +234,8 @@ TEST(type_prop, nms_v3_incorrect_scheme_num_boxes) { try { - const auto boxes = make_shared(element::Type_t::f32, Shape{1, 2, 3}); - const auto scores = make_shared(element::Type_t::f32, Shape{1, 2, 3}); + const auto boxes = make_shared(element::f32, Shape{1, 2, 3}); + const auto scores = make_shared(element::f32, Shape{1, 2, 3}); make_shared(boxes, scores); } @@ -252,11 +249,11 @@ TEST(type_prop, nms_v3_incorrect_scheme_num_boxes) TEST(type_prop, nms_v3_scalar_inputs_check) { - const auto boxes = make_shared(element::Type_t::f32, Shape{1, 2, 4}); - const auto scores = make_shared(element::Type_t::f32, Shape{1, 2, 2}); + const auto boxes = make_shared(element::f32, Shape{1, 2, 4}); + const auto scores = make_shared(element::f32, Shape{1, 2, 2}); - const auto scalar = make_shared(element::Type_t::f32, Shape{}); - const auto non_scalar = make_shared(element::Type_t::f32, Shape{1}); + const auto scalar = make_shared(element::f32, Shape{}); + const auto non_scalar = make_shared(element::f32, Shape{1}); try { @@ -289,8 +286,8 @@ TEST(type_prop, nms_v3_scalar_inputs_check) TEST(type_prop, nms_v3_output_shape) { - const auto boxes = make_shared(element::Type_t::f32, Shape{1, 2, 4}); - const auto scores = make_shared(element::Type_t::f32, Shape{1, 2, 2}); + const auto boxes = make_shared(element::f32, Shape{1, 2, 4}); + const auto scores = make_shared(element::f32, Shape{1, 2, 2}); const auto nms = make_shared(boxes, scores); const auto nms_out_ps = nms->get_output_partial_shape(0); @@ -302,44 +299,41 @@ TEST(type_prop, nms_v3_output_shape) TEST(type_prop, nms_v3_output_shape_2) { - const auto boxes = make_shared(element::Type_t::f32, Shape{1, 6, 4}); - const auto scores = make_shared(element::Type_t::f32, Shape{1, 1, 6}); - const auto max_output_boxes_per_class = - op::Constant::create(element::Type_t::i32, Shape{}, {3}); - const auto iou_threshold = make_shared(element::Type_t::f32, Shape{}); - const auto score_threshold = make_shared(element::Type_t::f32, Shape{}); + const auto boxes = make_shared(element::f32, Shape{1, 6, 4}); + const auto scores = make_shared(element::f32, Shape{1, 1, 6}); + const auto max_output_boxes_per_class = op::Constant::create(element::i32, Shape{}, {3}); + const auto iou_threshold = make_shared(element::f32, Shape{}); + const auto score_threshold = make_shared(element::f32, Shape{}); const auto nms = make_shared( boxes, scores, max_output_boxes_per_class, iou_threshold, score_threshold); - ASSERT_EQ(nms->get_element_type(), element::Type_t::i64); + ASSERT_EQ(nms->get_element_type(), element::i64); ASSERT_EQ(nms->get_shape(), (Shape{3, 3})); } TEST(type_prop, nms_v3_output_shape_3) { - const auto boxes = make_shared(element::Type_t::f32, Shape{1, 1, 4}); - const auto scores = make_shared(element::Type_t::f32, Shape{1, 1, 1}); - const auto max_output_boxes_per_class = - op::Constant::create(element::Type_t::i16, Shape{}, {3}); - const auto iou_threshold = make_shared(element::Type_t::f32, Shape{}); - const auto score_threshold = make_shared(element::Type_t::f32, Shape{}); + const auto boxes = make_shared(element::f32, Shape{1, 1, 4}); + const auto scores = make_shared(element::f32, Shape{1, 1, 1}); + const auto max_output_boxes_per_class = op::Constant::create(element::i16, Shape{}, {3}); + const auto iou_threshold = make_shared(element::f32, Shape{}); + const auto score_threshold = make_shared(element::f32, Shape{}); const auto nms = make_shared( boxes, scores, max_output_boxes_per_class, iou_threshold, score_threshold); - ASSERT_EQ(nms->get_element_type(), element::Type_t::i64); + ASSERT_EQ(nms->get_element_type(), element::i64); ASSERT_EQ(nms->get_shape(), (Shape{1, 3})); } TEST(type_prop, nms_v3_output_shape_i32) { - const auto boxes = make_shared(element::Type_t::f32, Shape{1, 1, 4}); - const auto scores = make_shared(element::Type_t::f32, Shape{1, 1, 1}); - const auto max_output_boxes_per_class = - op::Constant::create(element::Type_t::i16, Shape{}, {3}); - const auto iou_threshold = make_shared(element::Type_t::f32, Shape{}); - const auto score_threshold = make_shared(element::Type_t::f32, Shape{}); + const auto boxes = make_shared(element::f32, Shape{1, 1, 4}); + const auto scores = make_shared(element::f32, Shape{1, 1, 1}); + const auto max_output_boxes_per_class = op::Constant::create(element::i16, Shape{}, {3}); + const auto iou_threshold = make_shared(element::f32, Shape{}); + const auto score_threshold = make_shared(element::f32, Shape{}); const auto nms = make_shared(boxes, @@ -349,25 +343,24 @@ TEST(type_prop, nms_v3_output_shape_i32) score_threshold, op::v3::NonMaxSuppression::BoxEncodingType::CORNER, true, - element::Type_t::i32); + element::i32); - ASSERT_EQ(nms->get_element_type(), element::Type_t::i32); + ASSERT_EQ(nms->get_element_type(), element::i32); ASSERT_EQ(nms->get_shape(), (Shape{1, 3})); } TEST(type_prop, nms_v3_dynamic_boxes_and_scores) { - const auto boxes = make_shared(element::Type_t::f32, PartialShape::dynamic()); - const auto scores = make_shared(element::Type_t::f32, PartialShape::dynamic()); - const auto max_output_boxes_per_class = - op::Constant::create(element::Type_t::i16, Shape{}, {3}); - const auto iou_threshold = make_shared(element::Type_t::f32, Shape{}); - const auto score_threshold = make_shared(element::Type_t::f32, Shape{}); + const auto boxes = make_shared(element::f32, PartialShape::dynamic()); + const auto scores = make_shared(element::f32, PartialShape::dynamic()); + const auto max_output_boxes_per_class = op::Constant::create(element::i16, Shape{}, {3}); + const auto iou_threshold = make_shared(element::f32, Shape{}); + const auto score_threshold = make_shared(element::f32, Shape{}); const auto nms = make_shared( boxes, scores, max_output_boxes_per_class, iou_threshold, score_threshold); - ASSERT_EQ(nms->get_element_type(), element::Type_t::i64); + ASSERT_EQ(nms->get_element_type(), element::i64); ASSERT_TRUE( nms->get_output_partial_shape(0).same_scheme(PartialShape{Dimension::dynamic(), 3})); } @@ -378,8 +371,8 @@ TEST(type_prop, nms_v4_incorrect_boxes_rank) { try { - const auto boxes = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - const auto scores = make_shared(element::Type_t::f32, Shape{1, 2, 3}); + const auto boxes = make_shared(element::f32, Shape{1, 2, 3, 4}); + const auto scores = make_shared(element::f32, Shape{1, 2, 3}); make_shared(boxes, scores); } @@ -393,8 +386,8 @@ TEST(type_prop, nms_v4_incorrect_scores_rank) { try { - const auto boxes = make_shared(element::Type_t::f32, Shape{1, 2, 3}); - const auto scores = make_shared(element::Type_t::f32, Shape{1, 2}); + const auto boxes = make_shared(element::f32, Shape{1, 2, 3}); + const auto scores = make_shared(element::f32, Shape{1, 2}); make_shared(boxes, scores); } @@ -408,8 +401,8 @@ TEST(type_prop, nms_v4_incorrect_scheme_num_batches) { try { - const auto boxes = make_shared(element::Type_t::f32, Shape{1, 2, 3}); - const auto scores = make_shared(element::Type_t::f32, Shape{2, 2, 3}); + const auto boxes = make_shared(element::f32, Shape{1, 2, 3}); + const auto scores = make_shared(element::f32, Shape{2, 2, 3}); make_shared(boxes, scores); } @@ -424,8 +417,8 @@ TEST(type_prop, nms_v4_incorrect_scheme_num_boxes) { try { - const auto boxes = make_shared(element::Type_t::f32, Shape{1, 2, 3}); - const auto scores = make_shared(element::Type_t::f32, Shape{1, 2, 3}); + const auto boxes = make_shared(element::f32, Shape{1, 2, 3}); + const auto scores = make_shared(element::f32, Shape{1, 2, 3}); make_shared(boxes, scores); } @@ -439,11 +432,11 @@ TEST(type_prop, nms_v4_incorrect_scheme_num_boxes) TEST(type_prop, nms_v4_scalar_inputs_check) { - const auto boxes = make_shared(element::Type_t::f32, Shape{1, 2, 4}); - const auto scores = make_shared(element::Type_t::f32, Shape{1, 2, 2}); + const auto boxes = make_shared(element::f32, Shape{1, 2, 4}); + const auto scores = make_shared(element::f32, Shape{1, 2, 2}); - const auto scalar = make_shared(element::Type_t::f32, Shape{}); - const auto non_scalar = make_shared(element::Type_t::f32, Shape{1}); + const auto scalar = make_shared(element::f32, Shape{}); + const auto non_scalar = make_shared(element::f32, Shape{1}); try { @@ -476,8 +469,8 @@ TEST(type_prop, nms_v4_scalar_inputs_check) TEST(type_prop, nms_v4_output_shape) { - const auto boxes = make_shared(element::Type_t::f32, Shape{5, 2, 4}); - const auto scores = make_shared(element::Type_t::f32, Shape{5, 3, 2}); + const auto boxes = make_shared(element::f32, Shape{5, 2, 4}); + const auto scores = make_shared(element::f32, Shape{5, 3, 2}); const auto nms = make_shared(boxes, scores); const auto nms_out_ps = nms->get_output_partial_shape(0); @@ -489,44 +482,41 @@ TEST(type_prop, nms_v4_output_shape) TEST(type_prop, nms_v4_output_shape_2) { - const auto boxes = make_shared(element::Type_t::f32, Shape{2, 7, 4}); - const auto scores = make_shared(element::Type_t::f32, Shape{2, 5, 7}); - const auto max_output_boxes_per_class = - op::Constant::create(element::Type_t::i32, Shape{}, {3}); - const auto iou_threshold = make_shared(element::Type_t::f32, Shape{}); - const auto score_threshold = make_shared(element::Type_t::f32, Shape{}); + const auto boxes = make_shared(element::f32, Shape{2, 7, 4}); + const auto scores = make_shared(element::f32, Shape{2, 5, 7}); + const auto max_output_boxes_per_class = op::Constant::create(element::i32, Shape{}, {3}); + const auto iou_threshold = make_shared(element::f32, Shape{}); + const auto score_threshold = make_shared(element::f32, Shape{}); const auto nms = make_shared( boxes, scores, max_output_boxes_per_class, iou_threshold, score_threshold); - ASSERT_EQ(nms->get_element_type(), element::Type_t::i64); + ASSERT_EQ(nms->get_element_type(), element::i64); ASSERT_EQ(nms->get_shape(), (Shape{2 * 5 * 3, 3})); } TEST(type_prop, nms_v4_output_shape_3) { - const auto boxes = make_shared(element::Type_t::f32, Shape{2, 7, 4}); - const auto scores = make_shared(element::Type_t::f32, Shape{2, 5, 7}); - const auto max_output_boxes_per_class = - op::Constant::create(element::Type_t::i16, Shape{}, {1000}); - const auto iou_threshold = make_shared(element::Type_t::f32, Shape{}); - const auto score_threshold = make_shared(element::Type_t::f32, Shape{}); + const auto boxes = make_shared(element::f32, Shape{2, 7, 4}); + const auto scores = make_shared(element::f32, Shape{2, 5, 7}); + const auto max_output_boxes_per_class = op::Constant::create(element::i16, Shape{}, {1000}); + const auto iou_threshold = make_shared(element::f32, Shape{}); + const auto score_threshold = make_shared(element::f32, Shape{}); const auto nms = make_shared( boxes, scores, max_output_boxes_per_class, iou_threshold, score_threshold); - ASSERT_EQ(nms->get_element_type(), element::Type_t::i64); + ASSERT_EQ(nms->get_element_type(), element::i64); ASSERT_EQ(nms->get_shape(), (Shape{2 * 5 * 7, 3})); } TEST(type_prop, nms_v4_output_shape_i32) { - const auto boxes = make_shared(element::Type_t::f32, Shape{2, 7, 4}); - const auto scores = make_shared(element::Type_t::f32, Shape{2, 5, 7}); - const auto max_output_boxes_per_class = - op::Constant::create(element::Type_t::i16, Shape{}, {3}); - const auto iou_threshold = make_shared(element::Type_t::f32, Shape{}); - const auto score_threshold = make_shared(element::Type_t::f32, Shape{}); + const auto boxes = make_shared(element::f32, Shape{2, 7, 4}); + const auto scores = make_shared(element::f32, Shape{2, 5, 7}); + const auto max_output_boxes_per_class = op::Constant::create(element::i16, Shape{}, {3}); + const auto iou_threshold = make_shared(element::f32, Shape{}); + const auto score_threshold = make_shared(element::f32, Shape{}); const auto nms = make_shared(boxes, @@ -536,25 +526,24 @@ TEST(type_prop, nms_v4_output_shape_i32) score_threshold, op::v3::NonMaxSuppression::BoxEncodingType::CORNER, true, - element::Type_t::i32); + element::i32); - ASSERT_EQ(nms->get_element_type(), element::Type_t::i32); + ASSERT_EQ(nms->get_element_type(), element::i32); ASSERT_EQ(nms->get_shape(), (Shape{30, 3})); } TEST(type_prop, nms_v4_dynamic_boxes_and_scores) { - const auto boxes = make_shared(element::Type_t::f32, PartialShape::dynamic()); - const auto scores = make_shared(element::Type_t::f32, PartialShape::dynamic()); - const auto max_output_boxes_per_class = - op::Constant::create(element::Type_t::i16, Shape{}, {3}); - const auto iou_threshold = make_shared(element::Type_t::f32, Shape{}); - const auto score_threshold = make_shared(element::Type_t::f32, Shape{}); + const auto boxes = make_shared(element::f32, PartialShape::dynamic()); + const auto scores = make_shared(element::f32, PartialShape::dynamic()); + const auto max_output_boxes_per_class = op::Constant::create(element::i16, Shape{}, {3}); + const auto iou_threshold = make_shared(element::f32, Shape{}); + const auto score_threshold = make_shared(element::f32, Shape{}); const auto nms = make_shared( boxes, scores, max_output_boxes_per_class, iou_threshold, score_threshold); - ASSERT_EQ(nms->get_element_type(), element::Type_t::i64); + ASSERT_EQ(nms->get_element_type(), element::i64); ASSERT_TRUE( nms->get_output_partial_shape(0).same_scheme(PartialShape{Dimension::dynamic(), 3})); } @@ -565,8 +554,8 @@ TEST(type_prop, nms_v5_incorrect_boxes_rank) { try { - const auto boxes = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - const auto scores = make_shared(element::Type_t::f32, Shape{1, 2, 3}); + const auto boxes = make_shared(element::f32, Shape{1, 2, 3, 4}); + const auto scores = make_shared(element::f32, Shape{1, 2, 3}); make_shared(boxes, scores); } @@ -580,8 +569,8 @@ TEST(type_prop, nms_v5_incorrect_scores_rank) { try { - const auto boxes = make_shared(element::Type_t::f32, Shape{1, 2, 3}); - const auto scores = make_shared(element::Type_t::f32, Shape{1, 2}); + const auto boxes = make_shared(element::f32, Shape{1, 2, 3}); + const auto scores = make_shared(element::f32, Shape{1, 2}); make_shared(boxes, scores); } @@ -595,8 +584,8 @@ TEST(type_prop, nms_v5_incorrect_scheme_num_batches) { try { - const auto boxes = make_shared(element::Type_t::f32, Shape{1, 2, 3}); - const auto scores = make_shared(element::Type_t::f32, Shape{2, 2, 3}); + const auto boxes = make_shared(element::f32, Shape{1, 2, 3}); + const auto scores = make_shared(element::f32, Shape{2, 2, 3}); make_shared(boxes, scores); } @@ -611,8 +600,8 @@ TEST(type_prop, nms_v5_incorrect_scheme_num_boxes) { try { - const auto boxes = make_shared(element::Type_t::f32, Shape{1, 2, 3}); - const auto scores = make_shared(element::Type_t::f32, Shape{1, 2, 3}); + const auto boxes = make_shared(element::f32, Shape{1, 2, 3}); + const auto scores = make_shared(element::f32, Shape{1, 2, 3}); make_shared(boxes, scores); } @@ -626,11 +615,11 @@ TEST(type_prop, nms_v5_incorrect_scheme_num_boxes) TEST(type_prop, nms_v5_scalar_inputs_check) { - const auto boxes = make_shared(element::Type_t::f32, Shape{1, 2, 4}); - const auto scores = make_shared(element::Type_t::f32, Shape{1, 2, 2}); + const auto boxes = make_shared(element::f32, Shape{1, 2, 4}); + const auto scores = make_shared(element::f32, Shape{1, 2, 2}); - const auto scalar = make_shared(element::Type_t::f32, Shape{}); - const auto non_0d_or_1d = make_shared(element::Type_t::f32, Shape{2}); + const auto scalar = make_shared(element::f32, Shape{}); + const auto non_0d_or_1d = make_shared(element::f32, Shape{2}); try { @@ -675,8 +664,8 @@ TEST(type_prop, nms_v5_scalar_inputs_check) TEST(type_prop, nms_v5_output_shape) { - const auto boxes = make_shared(element::Type_t::f32, Shape{5, 2, 4}); - const auto scores = make_shared(element::Type_t::f32, Shape{5, 3, 2}); + const auto boxes = make_shared(element::f32, Shape{5, 2, 4}); + const auto scores = make_shared(element::f32, Shape{5, 3, 2}); const auto nms = make_shared(boxes, scores); @@ -690,19 +679,18 @@ TEST(type_prop, nms_v5_output_shape) TEST(type_prop, nms_v5_output_shape_2) { - const auto boxes = make_shared(element::Type_t::f32, Shape{2, 7, 4}); - const auto scores = make_shared(element::Type_t::f32, Shape{2, 5, 7}); - const auto max_output_boxes_per_class = - op::Constant::create(element::Type_t::i32, Shape{}, {3}); - const auto iou_threshold = make_shared(element::Type_t::f32, Shape{}); - const auto score_threshold = make_shared(element::Type_t::f32, Shape{}); + const auto boxes = make_shared(element::f32, Shape{2, 7, 4}); + const auto scores = make_shared(element::f32, Shape{2, 5, 7}); + const auto max_output_boxes_per_class = op::Constant::create(element::i32, Shape{}, {3}); + const auto iou_threshold = make_shared(element::f32, Shape{}); + const auto score_threshold = make_shared(element::f32, Shape{}); const auto nms = make_shared( boxes, scores, max_output_boxes_per_class, iou_threshold, score_threshold); - ASSERT_EQ(nms->get_output_element_type(0), element::Type_t::i64); - ASSERT_EQ(nms->get_output_element_type(1), element::Type_t::f32); - ASSERT_EQ(nms->get_output_element_type(2), element::Type_t::i64); + ASSERT_EQ(nms->get_output_element_type(0), element::i64); + ASSERT_EQ(nms->get_output_element_type(1), element::f32); + ASSERT_EQ(nms->get_output_element_type(2), element::i64); EXPECT_EQ(nms->get_output_partial_shape(0), PartialShape({Dimension(0, 30), Dimension(3)})); EXPECT_EQ(nms->get_output_partial_shape(1), PartialShape({Dimension(0, 30), Dimension(3)})); @@ -711,19 +699,18 @@ TEST(type_prop, nms_v5_output_shape_2) TEST(type_prop, nms_v5_output_shape_3) { - const auto boxes = make_shared(element::Type_t::f32, Shape{2, 7, 4}); - const auto scores = make_shared(element::Type_t::f32, Shape{2, 5, 7}); - const auto max_output_boxes_per_class = - op::Constant::create(element::Type_t::i16, Shape{}, {1000}); - const auto iou_threshold = make_shared(element::Type_t::f32, Shape{}); - const auto score_threshold = make_shared(element::Type_t::f32, Shape{}); + const auto boxes = make_shared(element::f32, Shape{2, 7, 4}); + const auto scores = make_shared(element::f32, Shape{2, 5, 7}); + const auto max_output_boxes_per_class = op::Constant::create(element::i16, Shape{}, {1000}); + const auto iou_threshold = make_shared(element::f32, Shape{}); + const auto score_threshold = make_shared(element::f32, Shape{}); const auto nms = make_shared( boxes, scores, max_output_boxes_per_class, iou_threshold, score_threshold); - ASSERT_EQ(nms->get_output_element_type(0), element::Type_t::i64); - ASSERT_EQ(nms->get_output_element_type(1), element::Type_t::f32); - ASSERT_EQ(nms->get_output_element_type(2), element::Type_t::i64); + ASSERT_EQ(nms->get_output_element_type(0), element::i64); + ASSERT_EQ(nms->get_output_element_type(1), element::f32); + ASSERT_EQ(nms->get_output_element_type(2), element::i64); EXPECT_EQ(nms->get_output_partial_shape(0), PartialShape({Dimension(0, 70), Dimension(3)})); EXPECT_EQ(nms->get_output_partial_shape(1), PartialShape({Dimension(0, 70), Dimension(3)})); EXPECT_EQ(nms->get_output_shape(2), (Shape{1})); @@ -731,12 +718,11 @@ TEST(type_prop, nms_v5_output_shape_3) TEST(type_prop, nms_v5_output_shape_i32) { - const auto boxes = make_shared(element::Type_t::f32, Shape{2, 7, 4}); - const auto scores = make_shared(element::Type_t::f32, Shape{2, 5, 7}); - const auto max_output_boxes_per_class = - op::Constant::create(element::Type_t::i16, Shape{}, {3}); - const auto iou_threshold = make_shared(element::Type_t::f32, Shape{}); - const auto score_threshold = make_shared(element::Type_t::f32, Shape{}); + const auto boxes = make_shared(element::f32, Shape{2, 7, 4}); + const auto scores = make_shared(element::f32, Shape{2, 5, 7}); + const auto max_output_boxes_per_class = op::Constant::create(element::i16, Shape{}, {3}); + const auto iou_threshold = make_shared(element::f32, Shape{}); + const auto score_threshold = make_shared(element::f32, Shape{}); const auto nms = make_shared(boxes, @@ -746,11 +732,11 @@ TEST(type_prop, nms_v5_output_shape_i32) score_threshold, op::v5::NonMaxSuppression::BoxEncodingType::CORNER, true, - element::Type_t::i32); + element::i32); - ASSERT_EQ(nms->get_output_element_type(0), element::Type_t::i32); - ASSERT_EQ(nms->get_output_element_type(1), element::Type_t::f32); - ASSERT_EQ(nms->get_output_element_type(2), element::Type_t::i32); + ASSERT_EQ(nms->get_output_element_type(0), element::i32); + ASSERT_EQ(nms->get_output_element_type(1), element::f32); + ASSERT_EQ(nms->get_output_element_type(2), element::i32); EXPECT_EQ(nms->get_output_partial_shape(0), PartialShape({Dimension(0, 30), Dimension(3)})); EXPECT_EQ(nms->get_output_partial_shape(1), PartialShape({Dimension(0, 30), Dimension(3)})); @@ -759,19 +745,18 @@ TEST(type_prop, nms_v5_output_shape_i32) TEST(type_prop, nms_v5_dynamic_boxes_and_scores) { - const auto boxes = make_shared(element::Type_t::f32, PartialShape::dynamic()); - const auto scores = make_shared(element::Type_t::f32, PartialShape::dynamic()); - const auto max_output_boxes_per_class = - op::Constant::create(element::Type_t::i16, Shape{}, {3}); - const auto iou_threshold = make_shared(element::Type_t::f32, Shape{}); - const auto score_threshold = make_shared(element::Type_t::f32, Shape{}); + const auto boxes = make_shared(element::f32, PartialShape::dynamic()); + const auto scores = make_shared(element::f32, PartialShape::dynamic()); + const auto max_output_boxes_per_class = op::Constant::create(element::i16, Shape{}, {3}); + const auto iou_threshold = make_shared(element::f32, Shape{}); + const auto score_threshold = make_shared(element::f32, Shape{}); const auto nms = make_shared( boxes, scores, max_output_boxes_per_class, iou_threshold, score_threshold); - ASSERT_EQ(nms->get_output_element_type(0), element::Type_t::i64); - ASSERT_EQ(nms->get_output_element_type(1), element::Type_t::f32); - ASSERT_EQ(nms->get_output_element_type(2), element::Type_t::i64); + ASSERT_EQ(nms->get_output_element_type(0), element::i64); + ASSERT_EQ(nms->get_output_element_type(1), element::f32); + ASSERT_EQ(nms->get_output_element_type(2), element::i64); EXPECT_EQ(nms->get_output_partial_shape(0), PartialShape({Dimension::dynamic(), 3})); EXPECT_EQ(nms->get_output_partial_shape(1), PartialShape({Dimension::dynamic(), 3})); EXPECT_EQ(nms->get_output_shape(2), (Shape{1})); diff --git a/ngraph/test/type_prop/non_zero.cpp b/ngraph/test/type_prop/non_zero.cpp index 1f22ec9fb19d89..03ad7397c821bb 100644 --- a/ngraph/test/type_prop/non_zero.cpp +++ b/ngraph/test/type_prop/non_zero.cpp @@ -23,38 +23,38 @@ using namespace ngraph; TEST(type_prop, non_zero) { - auto data = make_shared(element::Type_t::f32, Shape{3, 3, 224, 224}); + auto data = make_shared(element::f32, Shape{3, 3, 224, 224}); auto non_zero = make_shared(data); - EXPECT_EQ(non_zero->get_element_type(), element::Type_t::i64); + EXPECT_EQ(non_zero->get_element_type(), element::i64); EXPECT_TRUE( non_zero->get_output_partial_shape(0).same_scheme(PartialShape{4, Dimension::dynamic()})); } TEST(type_prop, non_zero_dynamic) { - auto data = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto data = make_shared(element::f32, PartialShape::dynamic()); auto non_zero = make_shared(data); - EXPECT_EQ(non_zero->get_element_type(), element::Type_t::i64); + EXPECT_EQ(non_zero->get_element_type(), element::i64); EXPECT_TRUE(non_zero->get_output_partial_shape(0).same_scheme( PartialShape{Dimension::dynamic(), Dimension::dynamic()})); } TEST(type_prop, non_zero_output_type) { - auto data = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - auto non_zero = make_shared(data, element::Type_t::i32); + auto data = make_shared(element::f32, Shape{1, 2, 3, 4}); + auto non_zero = make_shared(data, element::i32); - ASSERT_EQ(non_zero->get_output_element_type(0), element::Type_t::i32); + ASSERT_EQ(non_zero->get_output_element_type(0), element::i32); EXPECT_TRUE( non_zero->get_output_partial_shape(0).same_scheme(PartialShape{4, Dimension::dynamic()})); } TEST(type_prop, non_zero_string_output_type) { - auto data = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); + auto data = make_shared(element::f32, Shape{1, 2, 3, 4}); auto non_zero = make_shared(data, "i32"); - ASSERT_EQ(non_zero->get_output_element_type(0), element::Type_t::i32); + ASSERT_EQ(non_zero->get_output_element_type(0), element::i32); EXPECT_TRUE( non_zero->get_output_partial_shape(0).same_scheme(PartialShape{4, Dimension::dynamic()})); } @@ -62,10 +62,10 @@ TEST(type_prop, non_zero_string_output_type) TEST(type_prop, non_zero_fail_index_element_type) { // Deduce type - auto data = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); + auto data = make_shared(element::f32, Shape{1, 2, 3, 4}); try { - auto non_zero = make_shared(data, element::Type_t::i16); + auto non_zero = make_shared(data, element::i16); // Should have thrown, so fail if it didn't FAIL() << "Invalid output type not detected"; diff --git a/ngraph/test/type_prop/normalize.cpp b/ngraph/test/type_prop/normalize.cpp index 9d0b9af0394c65..03f342e5ba8d72 100644 --- a/ngraph/test/type_prop/normalize.cpp +++ b/ngraph/test/type_prop/normalize.cpp @@ -24,8 +24,8 @@ using namespace ngraph; TEST(type_prop, normalize_axes_input_not_constant) { Shape data_shape{1, 2, 3, 4}; - auto data = make_shared(element::Type_t::f32, data_shape); - auto axes = make_shared(element::Type_t::u64, Shape{1}); + auto data = make_shared(element::f32, data_shape); + auto axes = make_shared(element::u64, Shape{1}); float eps{1e-6f}; auto eps_mode = op::EpsMode::ADD; @@ -48,9 +48,8 @@ TEST(type_prop, normalize_axes_input_not_constant) TEST(type_prop, normalize_invalid_axes_rank) { Shape data_shape{1, 2, 3, 4}; - auto data = make_shared(element::Type_t::f32, data_shape); - const auto axes = - make_shared(element::Type_t::i64, Shape{1, 2}, vector{1, 2}); + auto data = make_shared(element::f32, data_shape); + const auto axes = make_shared(element::i64, Shape{1, 2}, vector{1, 2}); float eps{1e-6f}; auto eps_mode = op::EpsMode::ADD; @@ -74,9 +73,8 @@ TEST(type_prop, normalize_invalid_axes_rank) TEST(type_prop, normalize_axes_out_of_bounds) { Shape data_shape{1, 2, 3, 4}; - auto data = make_shared(element::Type_t::f32, data_shape); - const auto axes = - make_shared(element::Type_t::i64, Shape{2}, vector{3, 4}); + auto data = make_shared(element::f32, data_shape); + const auto axes = make_shared(element::i64, Shape{2}, vector{3, 4}); float eps{1e-6f}; auto eps_mode = op::EpsMode::ADD; diff --git a/ngraph/test/type_prop/one_hot.cpp b/ngraph/test/type_prop/one_hot.cpp index 8bd13bfa0d7440..07a5f3bac16376 100644 --- a/ngraph/test/type_prop/one_hot.cpp +++ b/ngraph/test/type_prop/one_hot.cpp @@ -23,34 +23,34 @@ using namespace ngraph; TEST(type_prop, one_hot_v1_output_shape) { - auto indices = make_shared(element::Type_t::i64, Shape{3}); - auto depth = op::Constant::create(element::Type_t::i64, Shape{}, {2}); - auto on_value = op::Constant::create(element::Type_t::u32, Shape{}, {5}); - auto off_value = op::Constant::create(element::Type_t::u32, Shape{}, {10}); + auto indices = make_shared(element::i64, Shape{3}); + auto depth = op::Constant::create(element::i64, Shape{}, {2}); + auto on_value = op::Constant::create(element::u32, Shape{}, {5}); + auto off_value = op::Constant::create(element::u32, Shape{}, {10}); int64_t axis = -1; auto ont_hot = make_shared(indices, depth, on_value, off_value, axis); - ASSERT_EQ(ont_hot->get_element_type(), element::Type_t::u32); + ASSERT_EQ(ont_hot->get_element_type(), element::u32); ASSERT_EQ(ont_hot->get_shape(), (Shape{3, 2})); } TEST(type_prop, one_hot_v1_output_shape_2) { - auto indices = make_shared(element::Type_t::i64, Shape{1, 3, 2, 3}); - auto depth = op::Constant::create(element::Type_t::i64, Shape{}, {4}); - auto on_value = op::Constant::create(element::Type_t::f32, Shape{}, {1.0f}); - auto off_value = op::Constant::create(element::Type_t::f32, Shape{}, {0.0f}); + auto indices = make_shared(element::i64, Shape{1, 3, 2, 3}); + auto depth = op::Constant::create(element::i64, Shape{}, {4}); + auto on_value = op::Constant::create(element::f32, Shape{}, {1.0f}); + auto off_value = op::Constant::create(element::f32, Shape{}, {0.0f}); int64_t axis = 3; auto ont_hot = make_shared(indices, depth, on_value, off_value, axis); - ASSERT_EQ(ont_hot->get_element_type(), element::Type_t::f32); + ASSERT_EQ(ont_hot->get_element_type(), element::f32); ASSERT_EQ(ont_hot->get_shape(), (Shape{1, 3, 2, 4, 3})); } TEST(type_prop, one_hot_v1_indices_elem_not_integral) { - auto indices = make_shared(element::Type_t::f16, Shape{2, 2}); - auto depth = make_shared(element::Type_t::i64, Shape{}); - auto on_value = make_shared(element::Type_t::u32, Shape{}); - auto off_value = make_shared(element::Type_t::u32, Shape{}); + auto indices = make_shared(element::f16, Shape{2, 2}); + auto depth = make_shared(element::i64, Shape{}); + auto on_value = make_shared(element::u32, Shape{}); + auto off_value = make_shared(element::u32, Shape{}); int64_t axis = -1; try { @@ -70,10 +70,10 @@ TEST(type_prop, one_hot_v1_indices_elem_not_integral) TEST(type_prop, one_hot_v1_depth_elem_not_integral) { - auto indices = make_shared(element::Type_t::i64, Shape{2, 2}); - auto depth = make_shared(element::Type_t::f16, Shape{}); - auto on_value = make_shared(element::Type_t::u32, Shape{}); - auto off_value = make_shared(element::Type_t::u32, Shape{}); + auto indices = make_shared(element::i64, Shape{2, 2}); + auto depth = make_shared(element::f16, Shape{}); + auto on_value = make_shared(element::u32, Shape{}); + auto off_value = make_shared(element::u32, Shape{}); int64_t axis = -1; try { @@ -93,10 +93,10 @@ TEST(type_prop, one_hot_v1_depth_elem_not_integral) TEST(type_prop, one_hot_v1_on_off_values_not_compatible) { - auto indices = make_shared(element::Type_t::i64, Shape{2, 2}); - auto depth = make_shared(element::Type_t::i64, Shape{}); - auto on_value = make_shared(element::Type_t::bf16, Shape{}); - auto off_value = make_shared(element::Type_t::f16, Shape{}); + auto indices = make_shared(element::i64, Shape{2, 2}); + auto depth = make_shared(element::i64, Shape{}); + auto on_value = make_shared(element::bf16, Shape{}); + auto off_value = make_shared(element::f16, Shape{}); int64_t axis = -1; try { @@ -118,10 +118,10 @@ TEST(type_prop, one_hot_v1_on_off_values_not_compatible) TEST(type_prop, one_hot_v1_depth_not_scalar) { - auto indices = make_shared(element::Type_t::i64, Shape{2, 2}); - auto depth = make_shared(element::Type_t::i64, Shape{1}); - auto on_value = make_shared(element::Type_t::bf16, Shape{}); - auto off_value = make_shared(element::Type_t::bf16, Shape{}); + auto indices = make_shared(element::i64, Shape{2, 2}); + auto depth = make_shared(element::i64, Shape{1}); + auto on_value = make_shared(element::bf16, Shape{}); + auto off_value = make_shared(element::bf16, Shape{}); int64_t axis = -1; try { @@ -141,10 +141,10 @@ TEST(type_prop, one_hot_v1_depth_not_scalar) TEST(type_prop, one_hot_v1_on_value_not_scalar) { - auto indices = make_shared(element::Type_t::i64, Shape{2, 2}); - auto depth = make_shared(element::Type_t::i64, Shape{}); - auto on_value = make_shared(element::Type_t::bf16, Shape{2}); - auto off_value = make_shared(element::Type_t::bf16, Shape{}); + auto indices = make_shared(element::i64, Shape{2, 2}); + auto depth = make_shared(element::i64, Shape{}); + auto on_value = make_shared(element::bf16, Shape{2}); + auto off_value = make_shared(element::bf16, Shape{}); int64_t axis = -1; try { @@ -164,10 +164,10 @@ TEST(type_prop, one_hot_v1_on_value_not_scalar) TEST(type_prop, one_hot_v1_off_value_not_scalar) { - auto indices = make_shared(element::Type_t::i64, Shape{2, 2}); - auto depth = make_shared(element::Type_t::i64, Shape{}); - auto on_value = make_shared(element::Type_t::bf16, Shape{}); - auto off_value = make_shared(element::Type_t::bf16, Shape{3}); + auto indices = make_shared(element::i64, Shape{2, 2}); + auto depth = make_shared(element::i64, Shape{}); + auto on_value = make_shared(element::bf16, Shape{}); + auto off_value = make_shared(element::bf16, Shape{3}); int64_t axis = -1; try { diff --git a/ngraph/test/type_prop/pad.cpp b/ngraph/test/type_prop/pad.cpp index 106b2e43dadf63..c7a43737a17898 100644 --- a/ngraph/test/type_prop/pad.cpp +++ b/ngraph/test/type_prop/pad.cpp @@ -25,10 +25,10 @@ using namespace ngraph; TEST(type_prop, pad_v1_arg_pad_value_type_mismatch) { - auto arg = make_shared(element::Type_t::f32, Shape{1, 2, 3}); - auto pads_begin = make_shared(element::Type_t::i64, Shape{1}); - auto pads_end = make_shared(element::Type_t::i64, Shape{1}); - auto arg_pad_value = make_shared(element::Type_t::f16, Shape{1}); + auto arg = make_shared(element::f32, Shape{1, 2, 3}); + auto pads_begin = make_shared(element::i64, Shape{1}); + auto pads_end = make_shared(element::i64, Shape{1}); + auto arg_pad_value = make_shared(element::f16, Shape{1}); try { @@ -52,10 +52,10 @@ TEST(type_prop, pad_v1_arg_pad_value_type_mismatch) TEST(type_prop, pad_v1_arg_pad_value_shape_not_compatible) { - auto arg = make_shared(element::Type_t::f32, Shape{1, 2, 3}); - auto pads_begin = make_shared(element::Type_t::i64, Shape{1}); - auto pads_end = make_shared(element::Type_t::i64, Shape{1}); - auto arg_pad_value = make_shared(element::Type_t::f32, Shape{1}); + auto arg = make_shared(element::f32, Shape{1, 2, 3}); + auto pads_begin = make_shared(element::i64, Shape{1}); + auto pads_end = make_shared(element::i64, Shape{1}); + auto arg_pad_value = make_shared(element::f32, Shape{1}); try { @@ -78,9 +78,9 @@ TEST(type_prop, pad_v1_arg_pad_value_shape_not_compatible) TEST(type_prop, pad_v1_pads_begin_shape_not_1D) { - auto arg = make_shared(element::Type_t::f32, Shape{1, 2, 3}); - auto pads_begin = make_shared(element::Type_t::i64, Shape{1, 2}); - auto pads_end = make_shared(element::Type_t::i64, Shape{1}); + auto arg = make_shared(element::f32, Shape{1, 2, 3}); + auto pads_begin = make_shared(element::i64, Shape{1, 2}); + auto pads_end = make_shared(element::i64, Shape{1}); try { @@ -102,9 +102,9 @@ TEST(type_prop, pad_v1_pads_begin_shape_not_1D) TEST(type_prop, pad_v1_pads_end_shape_not_1D) { - auto arg = make_shared(element::Type_t::f32, Shape{1, 2, 3}); - auto pads_begin = make_shared(element::Type_t::i64, Shape{1}); - auto pads_end = make_shared(element::Type_t::i64, Shape{1, 2}); + auto arg = make_shared(element::f32, Shape{1, 2, 3}); + auto pads_begin = make_shared(element::i64, Shape{1}); + auto pads_end = make_shared(element::i64, Shape{1, 2}); try { @@ -125,9 +125,9 @@ TEST(type_prop, pad_v1_pads_end_shape_not_1D) TEST(type_prop, pad_v1_pads_begin_size_not_correct) { - auto arg = make_shared(element::Type_t::f32, Shape{1, 2, 3}); - auto pads_begin = make_shared(element::Type_t::i64, Shape{4}); - auto pads_end = make_shared(element::Type_t::i64, Shape{1}); + auto arg = make_shared(element::f32, Shape{1, 2, 3}); + auto pads_begin = make_shared(element::i64, Shape{4}); + auto pads_end = make_shared(element::i64, Shape{1}); try { @@ -150,10 +150,10 @@ TEST(type_prop, pad_v1_pads_begin_size_not_correct) TEST(type_prop, pad_v1_pads_end_size_not_correct) { - auto arg = make_shared(element::Type_t::f32, Shape{1, 2, 3}); - auto pads_begin = make_shared(element::Type_t::i64, Shape{1}); - auto pads_end = make_shared(element::Type_t::i64, Shape{4}); - auto arg_pad_value = make_shared(element::Type_t::f32, Shape{}); + auto arg = make_shared(element::f32, Shape{1, 2, 3}); + auto pads_begin = make_shared(element::i64, Shape{1}); + auto pads_end = make_shared(element::i64, Shape{4}); + auto arg_pad_value = make_shared(element::f32, Shape{}); try { @@ -178,9 +178,9 @@ TEST(type_prop, pad_v1_pads_end_size_not_correct) TEST(type_prop, pad_v1_arg_pads_begin_incompatible_type) { - auto arg = make_shared(element::Type_t::f32, Shape{1, 2, 3}); - auto pads_begin = make_shared(element::Type_t::f32, Shape{1}); - auto pads_end = make_shared(element::Type_t::i64, Shape{1}); + auto arg = make_shared(element::f32, Shape{1, 2, 3}); + auto pads_begin = make_shared(element::f32, Shape{1}); + auto pads_end = make_shared(element::i64, Shape{1}); try { @@ -202,9 +202,9 @@ TEST(type_prop, pad_v1_arg_pads_begin_incompatible_type) TEST(type_prop, pad_v1_arg_pads_end_incompatible_type) { - auto arg = make_shared(element::Type_t::f32, Shape{1, 2, 3}); - auto pads_begin = make_shared(element::Type_t::i64, Shape{1}); - auto pads_end = make_shared(element::Type_t::f32, Shape{1}); + auto arg = make_shared(element::f32, Shape{1, 2, 3}); + auto pads_begin = make_shared(element::i64, Shape{1}); + auto pads_end = make_shared(element::f32, Shape{1}); try { @@ -226,12 +226,12 @@ TEST(type_prop, pad_v1_arg_pads_end_incompatible_type) TEST(type_prop, pad_v1_deduce_too_small_for_edge) { - auto arg = make_shared(element::Type_t::f32, Shape{1, 5, 0, 2}); + auto arg = make_shared(element::f32, Shape{1, 5, 0, 2}); auto pads_begin = - make_shared(element::Type_t::i64, Shape{4}, std::vector{0, 1, 2, 3}); + make_shared(element::i64, Shape{4}, std::vector{0, 1, 2, 3}); auto pads_end = - make_shared(element::Type_t::i64, Shape{4}, std::vector{0, 1, 2, 3}); - auto arg_pad_value = make_shared(element::Type_t::f32, Shape{}); + make_shared(element::i64, Shape{4}, std::vector{0, 1, 2, 3}); + auto arg_pad_value = make_shared(element::f32, Shape{}); try { @@ -255,12 +255,12 @@ TEST(type_prop, pad_v1_deduce_too_small_for_edge) TEST(type_prop, pad_v1_deduce_too_small_for_reflect) { - auto arg = make_shared(element::Type_t::f32, Shape{1, 5, 1, 2}); + auto arg = make_shared(element::f32, Shape{1, 5, 1, 2}); auto pads_begin = - make_shared(element::Type_t::i64, Shape{4}, std::vector{0, 1, 2, 3}); + make_shared(element::i64, Shape{4}, std::vector{0, 1, 2, 3}); auto pads_end = - make_shared(element::Type_t::i64, Shape{4}, std::vector{0, 1, 2, 3}); - auto arg_pad_value = make_shared(element::Type_t::f32, Shape{}); + make_shared(element::i64, Shape{4}, std::vector{0, 1, 2, 3}); + auto arg_pad_value = make_shared(element::f32, Shape{}); try { diff --git a/ngraph/test/type_prop/parameter.cpp b/ngraph/test/type_prop/parameter.cpp index a78b2c49035c66..6208dbb7f3605d 100644 --- a/ngraph/test/type_prop/parameter.cpp +++ b/ngraph/test/type_prop/parameter.cpp @@ -23,7 +23,7 @@ using namespace ngraph; TEST(type_prop, param_partial_rank_dynamic) { - auto a = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto a = make_shared(element::f32, PartialShape::dynamic()); auto& pshape = a->get_output_partial_shape(0); @@ -33,8 +33,7 @@ TEST(type_prop, param_partial_rank_dynamic) TEST(type_prop, param_partial_rank_static) { - auto a = make_shared(element::Type_t::f32, - PartialShape{2, Dimension::dynamic(), 3, 4}); + auto a = make_shared(element::f32, PartialShape{2, Dimension::dynamic(), 3, 4}); auto& pshape = a->get_output_partial_shape(0); diff --git a/ngraph/test/type_prop/prelu.cpp b/ngraph/test/type_prop/prelu.cpp index 27fb45b64d8ff9..d4b95cbb4d69ee 100644 --- a/ngraph/test/type_prop/prelu.cpp +++ b/ngraph/test/type_prop/prelu.cpp @@ -23,10 +23,10 @@ using namespace ngraph; TEST(type_prop, prelu) { - auto param = make_shared(element::Type_t::f32, Shape{2, 4}); - auto slope = make_shared(element::Type_t::f32, Shape{2}); + auto param = make_shared(element::f32, Shape{2, 4}); + auto slope = make_shared(element::f32, Shape{2}); Shape prelu_shape{2, 4}; auto prelu = make_shared(param, slope); - ASSERT_EQ(prelu->get_element_type(), element::Type_t::f32); + ASSERT_EQ(prelu->get_element_type(), element::f32); ASSERT_EQ(prelu->get_shape(), prelu_shape); } diff --git a/ngraph/test/type_prop/proposal.cpp b/ngraph/test/type_prop/proposal.cpp index 10bc01b4bf1ce7..9b92b790bf6343 100644 --- a/ngraph/test/type_prop/proposal.cpp +++ b/ngraph/test/type_prop/proposal.cpp @@ -27,9 +27,9 @@ using namespace ngraph; TEST(type_prop, proposal_v0_invalid_class_probs_rank) { op::ProposalAttrs attrs; - auto class_probs = make_shared(element::Type_t::f32, Shape{1, 2, 3}); - auto class_bbox_deltas = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - auto image_shape = make_shared(element::Type_t::f32, Shape{3}); + auto class_probs = make_shared(element::f32, Shape{1, 2, 3}); + auto class_bbox_deltas = make_shared(element::f32, Shape{1, 2, 3, 4}); + auto image_shape = make_shared(element::f32, Shape{3}); try { @@ -52,9 +52,9 @@ TEST(type_prop, proposal_v0_invalid_class_probs_rank) TEST(type_prop, proposal_v0_invalid_class_bbox_deltas_rank) { op::ProposalAttrs attrs; - auto class_probs = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - auto class_bbox_deltas = make_shared(element::Type_t::f32, Shape{1, 2, 3}); - auto image_shape = make_shared(element::Type_t::f32, Shape{3}); + auto class_probs = make_shared(element::f32, Shape{1, 2, 3, 4}); + auto class_bbox_deltas = make_shared(element::f32, Shape{1, 2, 3}); + auto image_shape = make_shared(element::f32, Shape{3}); try { @@ -78,9 +78,9 @@ TEST(type_prop, proposal_v0_invalid_class_bbox_deltas_rank) TEST(type_prop, proposal_v0_invalid_image_shape_rank) { op::ProposalAttrs attrs; - auto class_probs = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - auto class_bbox_deltas = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - auto image_shape = make_shared(element::Type_t::f32, Shape{2, 1}); + auto class_probs = make_shared(element::f32, Shape{1, 2, 3, 4}); + auto class_bbox_deltas = make_shared(element::f32, Shape{1, 2, 3, 4}); + auto image_shape = make_shared(element::f32, Shape{2, 1}); try { @@ -103,9 +103,9 @@ TEST(type_prop, proposal_v0_invalid_image_shape_rank) TEST(type_prop, proposal_v0_invalid_image_shape_size) { op::ProposalAttrs attrs; - auto class_probs = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - auto class_bbox_deltas = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - auto image_shape = make_shared(element::Type_t::f32, Shape{5}); + auto class_probs = make_shared(element::f32, Shape{1, 2, 3, 4}); + auto class_bbox_deltas = make_shared(element::f32, Shape{1, 2, 3, 4}); + auto image_shape = make_shared(element::f32, Shape{5}); try { @@ -135,11 +135,10 @@ TEST(type_prop, proposal_v0_shape_infer) attrs.post_nms_topn = 200; const size_t batch_size = 7; - auto class_probs = - make_shared(element::Type_t::f32, Shape{batch_size, 12, 34, 62}); + auto class_probs = make_shared(element::f32, Shape{batch_size, 12, 34, 62}); auto class_bbox_deltas = - make_shared(element::Type_t::f32, Shape{batch_size, 24, 34, 62}); - auto image_shape = make_shared(element::Type_t::f32, Shape{3}); + make_shared(element::f32, Shape{batch_size, 24, 34, 62}); + auto image_shape = make_shared(element::f32, Shape{3}); auto op = make_shared(class_probs, class_bbox_deltas, image_shape, attrs); ASSERT_EQ(op->get_output_shape(0), (Shape{batch_size * attrs.post_nms_topn, 5})); } @@ -149,9 +148,9 @@ TEST(type_prop, proposal_v0_shape_infer) TEST(type_prop, proposal_v4_invalid_class_probs_rank) { op::ProposalAttrs attrs; - auto class_probs = make_shared(element::Type_t::f32, Shape{1, 2, 3}); - auto class_bbox_deltas = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - auto image_shape = make_shared(element::Type_t::f32, Shape{3}); + auto class_probs = make_shared(element::f32, Shape{1, 2, 3}); + auto class_bbox_deltas = make_shared(element::f32, Shape{1, 2, 3, 4}); + auto image_shape = make_shared(element::f32, Shape{3}); try { @@ -174,9 +173,9 @@ TEST(type_prop, proposal_v4_invalid_class_probs_rank) TEST(type_prop, proposal_v4_invalid_class_bbox_deltas_rank) { op::ProposalAttrs attrs; - auto class_probs = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - auto class_bbox_deltas = make_shared(element::Type_t::f32, Shape{1, 2, 3}); - auto image_shape = make_shared(element::Type_t::f32, Shape{3}); + auto class_probs = make_shared(element::f32, Shape{1, 2, 3, 4}); + auto class_bbox_deltas = make_shared(element::f32, Shape{1, 2, 3}); + auto image_shape = make_shared(element::f32, Shape{3}); try { @@ -200,9 +199,9 @@ TEST(type_prop, proposal_v4_invalid_class_bbox_deltas_rank) TEST(type_prop, proposal_v4_invalid_image_shape_rank) { op::ProposalAttrs attrs; - auto class_probs = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - auto class_bbox_deltas = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - auto image_shape = make_shared(element::Type_t::f32, Shape{2, 1}); + auto class_probs = make_shared(element::f32, Shape{1, 2, 3, 4}); + auto class_bbox_deltas = make_shared(element::f32, Shape{1, 2, 3, 4}); + auto image_shape = make_shared(element::f32, Shape{2, 1}); try { @@ -225,9 +224,9 @@ TEST(type_prop, proposal_v4_invalid_image_shape_rank) TEST(type_prop, proposal_v4_invalid_image_shape_size) { op::ProposalAttrs attrs; - auto class_probs = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - auto class_bbox_deltas = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - auto image_shape = make_shared(element::Type_t::f32, Shape{5}); + auto class_probs = make_shared(element::f32, Shape{1, 2, 3, 4}); + auto class_bbox_deltas = make_shared(element::f32, Shape{1, 2, 3, 4}); + auto image_shape = make_shared(element::f32, Shape{5}); try { @@ -257,11 +256,10 @@ TEST(type_prop, proposal_v4_shape_infer) attrs.post_nms_topn = 200; const size_t batch_size = 7; - auto class_probs = - make_shared(element::Type_t::f32, Shape{batch_size, 12, 34, 62}); + auto class_probs = make_shared(element::f32, Shape{batch_size, 12, 34, 62}); auto class_bbox_deltas = - make_shared(element::Type_t::f32, Shape{batch_size, 24, 34, 62}); - auto image_shape = make_shared(element::Type_t::f32, Shape{3}); + make_shared(element::f32, Shape{batch_size, 24, 34, 62}); + auto image_shape = make_shared(element::f32, Shape{3}); auto op = make_shared(class_probs, class_bbox_deltas, image_shape, attrs); ASSERT_EQ(op->get_output_shape(0), (Shape{batch_size * attrs.post_nms_topn, 5})); ASSERT_EQ(op->get_output_shape(1), (Shape{batch_size * attrs.post_nms_topn})); diff --git a/ngraph/test/type_prop/quantize.cpp b/ngraph/test/type_prop/quantize.cpp index 4b8af66ce3f42e..ee7cfbebd5d77e 100644 --- a/ngraph/test/type_prop/quantize.cpp +++ b/ngraph/test/type_prop/quantize.cpp @@ -28,8 +28,8 @@ TEST(type_prop, quantize_f32_to_i8_nchw_per_channel_ok) Shape batch_shape{64, 3, 480, 640}; Shape scale_shape{3}; Shape zero_point_shape{3}; - element::Type unquantized_type = element::Type_t::f32; - element::Type quantized_type = element::Type_t::i8; + element::Type unquantized_type = element::f32; + element::Type quantized_type = element::i8; element::Type batch_type = unquantized_type; element::Type scale_type = unquantized_type; element::Type zero_point_type = quantized_type; @@ -51,8 +51,8 @@ TEST(type_prop, quantize_f32_to_i8_nchw_per_image_ok) Shape batch_shape{64, 3, 480, 640}; Shape scale_shape{64}; Shape zero_point_shape{64}; - element::Type unquantized_type = element::Type_t::f32; - element::Type quantized_type = element::Type_t::i8; + element::Type unquantized_type = element::f32; + element::Type quantized_type = element::i8; element::Type batch_type = unquantized_type; element::Type scale_type = unquantized_type; element::Type zero_point_type = quantized_type; @@ -74,8 +74,8 @@ TEST(type_prop, quantize_f32_to_i8_nchw_per_row_ok) Shape batch_shape{64, 3, 480, 640}; Shape scale_shape{480}; Shape zero_point_shape{480}; - element::Type unquantized_type = element::Type_t::f32; - element::Type quantized_type = element::Type_t::i8; + element::Type unquantized_type = element::f32; + element::Type quantized_type = element::i8; element::Type batch_type = unquantized_type; element::Type scale_type = unquantized_type; element::Type zero_point_type = quantized_type; @@ -97,8 +97,8 @@ TEST(type_prop, quantize_f32_to_i8_nchw_per_image_channel_ok) Shape batch_shape{64, 3, 480, 640}; Shape scale_shape{64, 3}; Shape zero_point_shape{64, 3}; - element::Type unquantized_type = element::Type_t::f32; - element::Type quantized_type = element::Type_t::i8; + element::Type unquantized_type = element::f32; + element::Type quantized_type = element::i8; element::Type batch_type = unquantized_type; element::Type scale_type = unquantized_type; element::Type zero_point_type = quantized_type; @@ -120,8 +120,8 @@ TEST(type_prop, quantize_f32_to_i8_nchw_whole_batch_ok) Shape batch_shape{64, 3, 480, 640}; Shape scale_shape{}; Shape zero_point_shape{}; - element::Type unquantized_type = element::Type_t::f32; - element::Type quantized_type = element::Type_t::i8; + element::Type unquantized_type = element::f32; + element::Type quantized_type = element::i8; element::Type batch_type = unquantized_type; element::Type scale_type = unquantized_type; element::Type zero_point_type = quantized_type; @@ -143,8 +143,8 @@ TEST(type_prop, quantize_f64_to_i8_ok) Shape batch_shape{64, 3, 480, 640}; Shape scale_shape{}; Shape zero_point_shape{}; - element::Type unquantized_type = element::Type_t::f64; - element::Type quantized_type = element::Type_t::i8; + element::Type unquantized_type = element::f64; + element::Type quantized_type = element::i8; element::Type batch_type = unquantized_type; element::Type scale_type = unquantized_type; element::Type zero_point_type = quantized_type; @@ -166,8 +166,8 @@ TEST(type_prop, quantize_f64_to_u8_ok) Shape batch_shape{64, 3, 480, 640}; Shape scale_shape{}; Shape zero_point_shape{}; - element::Type unquantized_type = element::Type_t::f64; - element::Type quantized_type = element::Type_t::u8; + element::Type unquantized_type = element::f64; + element::Type quantized_type = element::u8; element::Type batch_type = unquantized_type; element::Type scale_type = unquantized_type; element::Type zero_point_type = quantized_type; @@ -189,8 +189,8 @@ TEST(type_prop, quantize_f64_to_dyn_fails) Shape batch_shape{64, 3, 480, 640}; Shape scale_shape{}; Shape zero_point_shape{}; - element::Type unquantized_type = element::Type_t::f64; - element::Type quantized_type = element::Type_t::dynamic; + element::Type unquantized_type = element::f64; + element::Type quantized_type = element::dynamic; element::Type batch_type = unquantized_type; element::Type scale_type = unquantized_type; element::Type zero_point_type = quantized_type; @@ -222,8 +222,8 @@ TEST(type_prop, quantize_i8_to_u8_fails) Shape batch_shape{64, 3, 480, 640}; Shape scale_shape{}; Shape zero_point_shape{}; - element::Type unquantized_type = element::Type_t::i8; - element::Type quantized_type = element::Type_t::u8; + element::Type unquantized_type = element::i8; + element::Type quantized_type = element::u8; element::Type batch_type = unquantized_type; element::Type scale_type = unquantized_type; element::Type zero_point_type = quantized_type; @@ -256,8 +256,8 @@ TEST(type_prop, quantize_f32_to_f32_fails) Shape batch_shape{64, 3, 480, 640}; Shape scale_shape{}; Shape zero_point_shape{}; - element::Type unquantized_type = element::Type_t::f32; - element::Type quantized_type = element::Type_t::f32; + element::Type unquantized_type = element::f32; + element::Type quantized_type = element::f32; element::Type batch_type = unquantized_type; element::Type scale_type = unquantized_type; element::Type zero_point_type = quantized_type; @@ -289,10 +289,10 @@ TEST(type_prop, quantize_batch_scale_type_mismatch_fails) Shape batch_shape{64, 3, 480, 640}; Shape scale_shape{}; Shape zero_point_shape{}; - element::Type unquantized_type = element::Type_t::f32; - element::Type quantized_type = element::Type_t::i8; + element::Type unquantized_type = element::f32; + element::Type quantized_type = element::i8; element::Type batch_type = unquantized_type; - element::Type scale_type = element::Type_t::f64; + element::Type scale_type = element::f64; element::Type zero_point_type = quantized_type; AxisSet axes{}; auto round_mode = op::Quantize::RoundMode::ROUND_NEAREST_TOWARD_INFINITY; @@ -323,11 +323,11 @@ TEST(type_prop, quantize_zero_point_type_mismatch_fails) Shape batch_shape{64, 3, 480, 640}; Shape scale_shape{}; Shape zero_point_shape{}; - element::Type unquantized_type = element::Type_t::f32; - element::Type quantized_type = element::Type_t::i8; + element::Type unquantized_type = element::f32; + element::Type quantized_type = element::i8; element::Type batch_type = unquantized_type; element::Type scale_type = unquantized_type; - element::Type zero_point_type = element::Type_t::u8; + element::Type zero_point_type = element::u8; AxisSet axes{}; auto round_mode = op::Quantize::RoundMode::ROUND_NEAREST_TOWARD_INFINITY; @@ -357,8 +357,8 @@ TEST(type_prop, quantize_oob_axis_fails) Shape batch_shape{64, 3, 480, 640}; Shape scale_shape{320}; Shape zero_point_shape{320}; - element::Type unquantized_type = element::Type_t::f32; - element::Type quantized_type = element::Type_t::i8; + element::Type unquantized_type = element::f32; + element::Type quantized_type = element::i8; element::Type batch_type = unquantized_type; element::Type scale_type = unquantized_type; element::Type zero_point_type = quantized_type; @@ -391,8 +391,8 @@ TEST(type_prop, quantize_scale_shape_mismatch_same_rank_fails) Shape batch_shape{64, 3, 480, 640}; Shape scale_shape{64, 4}; Shape zero_point_shape{64, 3}; - element::Type unquantized_type = element::Type_t::f32; - element::Type quantized_type = element::Type_t::i8; + element::Type unquantized_type = element::f32; + element::Type quantized_type = element::i8; element::Type batch_type = unquantized_type; element::Type scale_type = unquantized_type; element::Type zero_point_type = quantized_type; @@ -425,8 +425,8 @@ TEST(type_prop, quantize_scale_shape_mismatch_different_rank_fails) Shape batch_shape{64, 3, 480, 640}; Shape scale_shape{64, 3, 2}; Shape zero_point_shape{64, 3}; - element::Type unquantized_type = element::Type_t::f32; - element::Type quantized_type = element::Type_t::i8; + element::Type unquantized_type = element::f32; + element::Type quantized_type = element::i8; element::Type batch_type = unquantized_type; element::Type scale_type = unquantized_type; element::Type zero_point_type = quantized_type; @@ -459,8 +459,8 @@ TEST(type_prop, quantize_zero_point_shape_mismatch_same_rank_fails) Shape batch_shape{64, 3, 480, 640}; Shape scale_shape{64, 3}; Shape zero_point_shape{64, 4}; - element::Type unquantized_type = element::Type_t::f32; - element::Type quantized_type = element::Type_t::i8; + element::Type unquantized_type = element::f32; + element::Type quantized_type = element::i8; element::Type batch_type = unquantized_type; element::Type scale_type = unquantized_type; element::Type zero_point_type = quantized_type; @@ -493,8 +493,8 @@ TEST(type_prop, quantize_zero_point_shape_mismatch_different_rank_fails) Shape batch_shape{64, 3, 480, 640}; Shape scale_shape{64, 3}; Shape zero_point_shape{64, 3, 2}; - element::Type unquantized_type = element::Type_t::f32; - element::Type quantized_type = element::Type_t::i8; + element::Type unquantized_type = element::f32; + element::Type quantized_type = element::i8; element::Type batch_type = unquantized_type; element::Type scale_type = unquantized_type; element::Type zero_point_type = quantized_type; @@ -527,8 +527,8 @@ TEST(type_prop, quantize_partial_all_rank_dynamic_ok) PartialShape batch_shape{PartialShape::dynamic()}; PartialShape scale_shape{PartialShape::dynamic()}; PartialShape zero_point_shape{PartialShape::dynamic()}; - element::Type unquantized_type = element::Type_t::f32; - element::Type quantized_type = element::Type_t::i8; + element::Type unquantized_type = element::f32; + element::Type quantized_type = element::i8; element::Type batch_type = unquantized_type; element::Type scale_type = unquantized_type; element::Type zero_point_type = quantized_type; @@ -551,8 +551,8 @@ TEST(type_prop, PartialShape batch_shape{PartialShape::dynamic()}; PartialShape scale_shape{64, Dimension::dynamic(), 96}; PartialShape zero_point_shape{PartialShape::dynamic()}; - element::Type unquantized_type = element::Type_t::f32; - element::Type quantized_type = element::Type_t::i8; + element::Type unquantized_type = element::f32; + element::Type quantized_type = element::i8; element::Type batch_type = unquantized_type; element::Type scale_type = unquantized_type; element::Type zero_point_type = quantized_type; @@ -576,8 +576,8 @@ TEST( PartialShape batch_shape{PartialShape::dynamic()}; PartialShape scale_shape{64, Dimension::dynamic(), 96}; PartialShape zero_point_shape{PartialShape::dynamic()}; - element::Type unquantized_type = element::Type_t::f32; - element::Type quantized_type = element::Type_t::i8; + element::Type unquantized_type = element::f32; + element::Type quantized_type = element::i8; element::Type batch_type = unquantized_type; element::Type scale_type = unquantized_type; element::Type zero_point_type = quantized_type; @@ -613,8 +613,8 @@ TEST( PartialShape batch_shape{PartialShape::dynamic()}; PartialShape scale_shape{64, Dimension::dynamic(), 96, Dimension::dynamic()}; PartialShape zero_point_shape{64, 22, Dimension::dynamic(), Dimension::dynamic()}; - element::Type unquantized_type = element::Type_t::f32; - element::Type quantized_type = element::Type_t::i8; + element::Type unquantized_type = element::f32; + element::Type quantized_type = element::i8; element::Type batch_type = unquantized_type; element::Type scale_type = unquantized_type; element::Type zero_point_type = quantized_type; @@ -638,8 +638,8 @@ TEST( PartialShape batch_shape{PartialShape::dynamic()}; PartialShape scale_shape{64, Dimension::dynamic(), 96, Dimension::dynamic()}; PartialShape zero_point_shape{64, 22, Dimension::dynamic(), Dimension::dynamic(), 3}; - element::Type unquantized_type = element::Type_t::f32; - element::Type quantized_type = element::Type_t::i8; + element::Type unquantized_type = element::f32; + element::Type quantized_type = element::i8; element::Type batch_type = unquantized_type; element::Type scale_type = unquantized_type; element::Type zero_point_type = quantized_type; @@ -675,8 +675,8 @@ TEST( PartialShape batch_shape{PartialShape::dynamic()}; PartialShape scale_shape{64, Dimension::dynamic(), 96, Dimension::dynamic()}; PartialShape zero_point_shape{65, 22, Dimension::dynamic(), Dimension::dynamic()}; - element::Type unquantized_type = element::Type_t::f32; - element::Type quantized_type = element::Type_t::i8; + element::Type unquantized_type = element::f32; + element::Type quantized_type = element::i8; element::Type batch_type = unquantized_type; element::Type scale_type = unquantized_type; element::Type zero_point_type = quantized_type; @@ -712,8 +712,8 @@ TEST( PartialShape batch_shape{2, 4, 6, Dimension::dynamic(), 10, Dimension::dynamic()}; PartialShape scale_shape{4, Dimension::dynamic(), Dimension::dynamic()}; PartialShape zero_point_shape{Dimension::dynamic(), 8, Dimension::dynamic()}; - element::Type unquantized_type = element::Type_t::f32; - element::Type quantized_type = element::Type_t::i8; + element::Type unquantized_type = element::f32; + element::Type quantized_type = element::i8; element::Type batch_type = unquantized_type; element::Type scale_type = unquantized_type; element::Type zero_point_type = quantized_type; @@ -738,8 +738,8 @@ TEST( PartialShape batch_shape{2, 4, 6, Dimension::dynamic(), 10, Dimension::dynamic()}; PartialShape scale_shape{4, Dimension::dynamic(), Dimension::dynamic()}; PartialShape zero_point_shape{Dimension::dynamic(), 8, Dimension::dynamic()}; - element::Type unquantized_type = element::Type_t::f32; - element::Type quantized_type = element::Type_t::i8; + element::Type unquantized_type = element::f32; + element::Type quantized_type = element::i8; element::Type batch_type = unquantized_type; element::Type scale_type = unquantized_type; element::Type zero_point_type = quantized_type; @@ -774,8 +774,8 @@ TEST( PartialShape batch_shape{2, 5, 6, Dimension::dynamic(), 10, Dimension::dynamic()}; PartialShape scale_shape{4, Dimension::dynamic(), Dimension::dynamic()}; PartialShape zero_point_shape{Dimension::dynamic(), 8, Dimension::dynamic()}; - element::Type unquantized_type = element::Type_t::f32; - element::Type quantized_type = element::Type_t::i8; + element::Type unquantized_type = element::f32; + element::Type quantized_type = element::i8; element::Type batch_type = unquantized_type; element::Type scale_type = unquantized_type; element::Type zero_point_type = quantized_type; diff --git a/ngraph/test/type_prop/range.cpp b/ngraph/test/type_prop/range.cpp index ec3f9b08ffda68..5fcfc8e33682da 100644 --- a/ngraph/test/type_prop/range.cpp +++ b/ngraph/test/type_prop/range.cpp @@ -23,57 +23,57 @@ using namespace ngraph; TEST(type_prop, range_nonconst_ok) { - auto start = make_shared(element::Type_t::i32, Shape{}); - auto stop = make_shared(element::Type_t::i32, Shape{}); - auto step = make_shared(element::Type_t::i32, Shape{}); + auto start = make_shared(element::i32, Shape{}); + auto stop = make_shared(element::i32, Shape{}); + auto step = make_shared(element::i32, Shape{}); auto range = make_shared(start, stop, step); - EXPECT_EQ(range->get_element_type(), element::Type_t::i32); + EXPECT_EQ(range->get_element_type(), element::i32); EXPECT_TRUE(range->get_output_partial_shape(0).same_scheme(PartialShape::dynamic(1))); } TEST(type_prop, range_nonconst_some_dyn_et_ok) { - auto start = make_shared(element::Type_t::i32, Shape{}); - auto stop = make_shared(element::Type_t::dynamic, Shape{}); - auto step = make_shared(element::Type_t::i32, Shape{}); + auto start = make_shared(element::i32, Shape{}); + auto stop = make_shared(element::dynamic, Shape{}); + auto step = make_shared(element::i32, Shape{}); auto range = make_shared(start, stop, step); - EXPECT_EQ(range->get_element_type(), element::Type_t::i32); + EXPECT_EQ(range->get_element_type(), element::i32); EXPECT_TRUE(range->get_output_partial_shape(0).same_scheme(PartialShape::dynamic(1))); } TEST(type_prop, range_nonconst_all_dyn_et_ok) { - auto start = make_shared(element::Type_t::dynamic, Shape{}); - auto stop = make_shared(element::Type_t::dynamic, Shape{}); - auto step = make_shared(element::Type_t::dynamic, Shape{}); + auto start = make_shared(element::dynamic, Shape{}); + auto stop = make_shared(element::dynamic, Shape{}); + auto step = make_shared(element::dynamic, Shape{}); auto range = make_shared(start, stop, step); - EXPECT_EQ(range->get_element_type(), element::Type_t::dynamic); + EXPECT_EQ(range->get_element_type(), element::dynamic); EXPECT_TRUE(range->get_output_partial_shape(0).same_scheme(PartialShape::dynamic(1))); } TEST(type_prop, range_nonconst_f32_ok) { - auto start = make_shared(element::Type_t::dynamic, Shape{}); - auto stop = make_shared(element::Type_t::f32, Shape{}); - auto step = make_shared(element::Type_t::dynamic, Shape{}); + auto start = make_shared(element::dynamic, Shape{}); + auto stop = make_shared(element::f32, Shape{}); + auto step = make_shared(element::dynamic, Shape{}); auto range = make_shared(start, stop, step); - EXPECT_EQ(range->get_element_type(), element::Type_t::f32); + EXPECT_EQ(range->get_element_type(), element::f32); EXPECT_TRUE(range->get_output_partial_shape(0).same_scheme(PartialShape::dynamic(1))); } TEST(type_prop, range_nonconst_boolean_fails) { - auto start = make_shared(element::Type_t::dynamic, Shape{}); - auto stop = make_shared(element::Type_t::boolean, Shape{}); - auto step = make_shared(element::Type_t::dynamic, Shape{}); + auto start = make_shared(element::dynamic, Shape{}); + auto stop = make_shared(element::boolean, Shape{}); + auto step = make_shared(element::dynamic, Shape{}); try { @@ -93,21 +93,21 @@ TEST(type_prop, range_nonconst_boolean_fails) TEST(type_prop, range_some_const_ok) { - auto start = make_shared(element::Type_t::i32, Shape{}, std::vector{3}); - auto stop = make_shared(element::Type_t::i32, Shape{}); - auto step = make_shared(element::Type_t::i32, Shape{}, std::vector{2}); + auto start = make_shared(element::i32, Shape{}, std::vector{3}); + auto stop = make_shared(element::i32, Shape{}); + auto step = make_shared(element::i32, Shape{}, std::vector{2}); auto range = make_shared(start, stop, step); - EXPECT_EQ(range->get_element_type(), element::Type_t::i32); + EXPECT_EQ(range->get_element_type(), element::i32); EXPECT_TRUE(range->get_output_partial_shape(0).same_scheme(PartialShape::dynamic(1))); } TEST(type_prop, range_some_const_zero_stride_fails) { - auto start = make_shared(element::Type_t::i32, Shape{}, std::vector{3}); - auto stop = make_shared(element::Type_t::i32, Shape{}); - auto step = make_shared(element::Type_t::i32, Shape{}, std::vector{0}); + auto start = make_shared(element::i32, Shape{}, std::vector{3}); + auto stop = make_shared(element::i32, Shape{}); + auto step = make_shared(element::i32, Shape{}, std::vector{0}); try { @@ -127,9 +127,9 @@ TEST(type_prop, range_some_const_zero_stride_fails) TEST(type_prop, range_some_const_plus_inf_start_fails) { auto start = make_shared( - element::Type_t::f32, Shape{}, std::vector{std::numeric_limits::infinity()}); - auto stop = make_shared(element::Type_t::f32, Shape{}); - auto step = make_shared(element::Type_t::f32, Shape{}, std::vector{1}); + element::f32, Shape{}, std::vector{std::numeric_limits::infinity()}); + auto stop = make_shared(element::f32, Shape{}); + auto step = make_shared(element::f32, Shape{}, std::vector{1}); try { @@ -149,9 +149,9 @@ TEST(type_prop, range_some_const_plus_inf_start_fails) TEST(type_prop, range_some_const_minus_inf_start_fails) { auto start = make_shared( - element::Type_t::f32, Shape{}, std::vector{-std::numeric_limits::infinity()}); - auto stop = make_shared(element::Type_t::f32, Shape{}); - auto step = make_shared(element::Type_t::f32, Shape{}, std::vector{1}); + element::f32, Shape{}, std::vector{-std::numeric_limits::infinity()}); + auto stop = make_shared(element::f32, Shape{}); + auto step = make_shared(element::f32, Shape{}, std::vector{1}); try { @@ -171,9 +171,9 @@ TEST(type_prop, range_some_const_minus_inf_start_fails) TEST(type_prop, range_some_const_nan_start_fails) { auto start = - make_shared(element::Type_t::f32, Shape{}, std::vector{std::nanf("")}); - auto stop = make_shared(element::Type_t::f32, Shape{}); - auto step = make_shared(element::Type_t::f32, Shape{}, std::vector{1}); + make_shared(element::f32, Shape{}, std::vector{std::nanf("")}); + auto stop = make_shared(element::f32, Shape{}); + auto step = make_shared(element::f32, Shape{}, std::vector{1}); try { @@ -192,10 +192,10 @@ TEST(type_prop, range_some_const_nan_start_fails) TEST(type_prop, range_some_const_plus_inf_stop_fails) { - auto start = make_shared(element::Type_t::f32, Shape{}); + auto start = make_shared(element::f32, Shape{}); auto stop = make_shared( - element::Type_t::f32, Shape{}, std::vector{std::numeric_limits::infinity()}); - auto step = make_shared(element::Type_t::f32, Shape{}, std::vector{1}); + element::f32, Shape{}, std::vector{std::numeric_limits::infinity()}); + auto step = make_shared(element::f32, Shape{}, std::vector{1}); try { @@ -214,10 +214,10 @@ TEST(type_prop, range_some_const_plus_inf_stop_fails) TEST(type_prop, range_some_const_minus_inf_stop_fails) { - auto start = make_shared(element::Type_t::f32, Shape{}); + auto start = make_shared(element::f32, Shape{}); auto stop = make_shared( - element::Type_t::f32, Shape{}, std::vector{-std::numeric_limits::infinity()}); - auto step = make_shared(element::Type_t::f32, Shape{}, std::vector{1}); + element::f32, Shape{}, std::vector{-std::numeric_limits::infinity()}); + auto step = make_shared(element::f32, Shape{}, std::vector{1}); try { @@ -236,10 +236,9 @@ TEST(type_prop, range_some_const_minus_inf_stop_fails) TEST(type_prop, range_some_const_nan_stio_fails) { - auto start = make_shared(element::Type_t::f32, Shape{}); - auto stop = - make_shared(element::Type_t::f32, Shape{}, std::vector{std::nanf("")}); - auto step = make_shared(element::Type_t::f32, Shape{}, std::vector{1}); + auto start = make_shared(element::f32, Shape{}); + auto stop = make_shared(element::f32, Shape{}, std::vector{std::nanf("")}); + auto step = make_shared(element::f32, Shape{}, std::vector{1}); try { @@ -258,10 +257,10 @@ TEST(type_prop, range_some_const_nan_stio_fails) TEST(type_prop, range_some_const_plus_inf_stride_fails) { - auto start = make_shared(element::Type_t::f32, Shape{}, std::vector{3}); - auto stop = make_shared(element::Type_t::f32, Shape{}); + auto start = make_shared(element::f32, Shape{}, std::vector{3}); + auto stop = make_shared(element::f32, Shape{}); auto step = make_shared( - element::Type_t::f32, Shape{}, std::vector{std::numeric_limits::infinity()}); + element::f32, Shape{}, std::vector{std::numeric_limits::infinity()}); try { @@ -280,10 +279,10 @@ TEST(type_prop, range_some_const_plus_inf_stride_fails) TEST(type_prop, range_some_const_minus_inf_stride_fails) { - auto start = make_shared(element::Type_t::f32, Shape{}, std::vector{3}); - auto stop = make_shared(element::Type_t::f32, Shape{}); + auto start = make_shared(element::f32, Shape{}, std::vector{3}); + auto stop = make_shared(element::f32, Shape{}); auto step = make_shared( - element::Type_t::f32, Shape{}, std::vector{-std::numeric_limits::infinity()}); + element::f32, Shape{}, std::vector{-std::numeric_limits::infinity()}); try { @@ -302,10 +301,9 @@ TEST(type_prop, range_some_const_minus_inf_stride_fails) TEST(type_prop, range_some_const_nan_stride_fails) { - auto start = make_shared(element::Type_t::f32, Shape{}, std::vector{3}); - auto stop = make_shared(element::Type_t::f32, Shape{}); - auto step = - make_shared(element::Type_t::f32, Shape{}, std::vector{std::nanf("")}); + auto start = make_shared(element::f32, Shape{}, std::vector{3}); + auto stop = make_shared(element::f32, Shape{}); + auto step = make_shared(element::f32, Shape{}, std::vector{std::nanf("")}); try { @@ -324,9 +322,9 @@ TEST(type_prop, range_some_const_nan_stride_fails) TEST(type_prop, range_all_const_zero_stride_fails) { - auto start = make_shared(element::Type_t::i32, Shape{}, std::vector{3}); - auto stop = make_shared(element::Type_t::i32, Shape{}, std::vector{5}); - auto step = make_shared(element::Type_t::i32, Shape{}, std::vector{0}); + auto start = make_shared(element::i32, Shape{}, std::vector{3}); + auto stop = make_shared(element::i32, Shape{}, std::vector{5}); + auto step = make_shared(element::i32, Shape{}, std::vector{0}); try { @@ -373,62 +371,62 @@ struct RangeTest : ::testing::TestWithParam TEST_P(RangeTest, deduce_shape_i8) { - run_range_test(element::Type_t::i8, GetParam()); + run_range_test(element::i8, GetParam()); } TEST_P(RangeTest, deduce_shape_i16) { - run_range_test(element::Type_t::i16, GetParam()); + run_range_test(element::i16, GetParam()); } TEST_P(RangeTest, deduce_shape_i32) { - run_range_test(element::Type_t::i32, GetParam()); + run_range_test(element::i32, GetParam()); } TEST_P(RangeTest, deduce_shape_i64) { - run_range_test(element::Type_t::i64, GetParam()); + run_range_test(element::i64, GetParam()); } TEST_P(RangeTest, deduce_shape_u8) { - run_range_test(element::Type_t::u8, GetParam()); + run_range_test(element::u8, GetParam()); } TEST_P(RangeTest, deduce_shape_u16) { - run_range_test(element::Type_t::u16, GetParam()); + run_range_test(element::u16, GetParam()); } TEST_P(RangeTest, deduce_shape_u32) { - run_range_test(element::Type_t::u32, GetParam()); + run_range_test(element::u32, GetParam()); } TEST_P(RangeTest, deduce_shape_u64) { - run_range_test(element::Type_t::u64, GetParam()); + run_range_test(element::u64, GetParam()); } TEST_P(RangeTest, deduce_shape_bf16) { - run_range_test(element::Type_t::bf16, GetParam()); + run_range_test(element::bf16, GetParam()); } TEST_P(RangeTest, deduce_shape_f16) { - run_range_test(element::Type_t::f16, GetParam()); + run_range_test(element::f16, GetParam()); } TEST_P(RangeTest, deduce_shape_f32) { - run_range_test(element::Type_t::f32, GetParam()); + run_range_test(element::f32, GetParam()); } TEST_P(RangeTest, deduce_shape_f64) { - run_range_test(element::Type_t::f64, GetParam()); + run_range_test(element::f64, GetParam()); } INSTANTIATE_TEST_CASE_P(type_prop, @@ -447,42 +445,42 @@ struct RangeTestWithNegatives : ::testing::TestWithParam TEST_P(RangeTestWithNegatives, deduce_shape_i8) { - run_range_test(element::Type_t::i8, GetParam()); + run_range_test(element::i8, GetParam()); } TEST_P(RangeTestWithNegatives, deduce_shape_i16) { - run_range_test(element::Type_t::i16, GetParam()); + run_range_test(element::i16, GetParam()); } TEST_P(RangeTestWithNegatives, deduce_shape_i32) { - run_range_test(element::Type_t::i32, GetParam()); + run_range_test(element::i32, GetParam()); } TEST_P(RangeTestWithNegatives, deduce_shape_i64) { - run_range_test(element::Type_t::i64, GetParam()); + run_range_test(element::i64, GetParam()); } TEST_P(RangeTestWithNegatives, deduce_shape_bf16) { - run_range_test(element::Type_t::bf16, GetParam()); + run_range_test(element::bf16, GetParam()); } TEST_P(RangeTestWithNegatives, deduce_shape_f16) { - run_range_test(element::Type_t::f16, GetParam()); + run_range_test(element::f16, GetParam()); } TEST_P(RangeTestWithNegatives, deduce_shape_f32) { - run_range_test(element::Type_t::f32, GetParam()); + run_range_test(element::f32, GetParam()); } TEST_P(RangeTestWithNegatives, deduce_shape_f64) { - run_range_test(element::Type_t::f64, GetParam()); + run_range_test(element::f64, GetParam()); } INSTANTIATE_TEST_CASE_P(type_prop, @@ -500,22 +498,22 @@ struct RangeTestFloating : ::testing::TestWithParam TEST_P(RangeTestFloating, deduce_shape_bf16) { - run_range_test(element::Type_t::bf16, GetParam()); + run_range_test(element::bf16, GetParam()); } TEST_P(RangeTestFloating, deduce_shape_f16) { - run_range_test(element::Type_t::f16, GetParam()); + run_range_test(element::f16, GetParam()); } TEST_P(RangeTestFloating, deduce_shape_f32) { - run_range_test(element::Type_t::f32, GetParam()); + run_range_test(element::f32, GetParam()); } TEST_P(RangeTestFloating, deduce_shape_f64) { - run_range_test(element::Type_t::f64, GetParam()); + run_range_test(element::f64, GetParam()); } INSTANTIATE_TEST_CASE_P(type_prop, diff --git a/ngraph/test/type_prop/read_value.cpp b/ngraph/test/type_prop/read_value.cpp index b096ddb4e43174..793ad539285407 100644 --- a/ngraph/test/type_prop/read_value.cpp +++ b/ngraph/test/type_prop/read_value.cpp @@ -23,9 +23,9 @@ using namespace ngraph; TEST(type_prop, read_value_deduce) { - auto input = make_shared(element::Type_t::f32, Shape{1, 2, 64, 64}); + auto input = make_shared(element::f32, Shape{1, 2, 64, 64}); auto read_value = make_shared(input, "variable_id"); - ASSERT_EQ(read_value->get_element_type(), element::Type_t::f32); + ASSERT_EQ(read_value->get_element_type(), element::f32); ASSERT_EQ(read_value->get_shape(), (Shape{1, 2, 64, 64})); } diff --git a/ngraph/test/type_prop/reduce_l1.cpp b/ngraph/test/type_prop/reduce_l1.cpp index 6d2812990e4498..1b165f5cd919b7 100644 --- a/ngraph/test/type_prop/reduce_l1.cpp +++ b/ngraph/test/type_prop/reduce_l1.cpp @@ -23,8 +23,8 @@ using namespace ngraph; TEST(type_prop, reduce_l1_v4_axis_out_of_range) { - auto arg = make_shared(element::Type_t::f32, Shape{1, 2, 3}); - auto axes = make_shared(element::Type_t::i64, Shape{2}, vector{2, 3}); + auto arg = make_shared(element::f32, Shape{1, 2, 3}); + auto axes = make_shared(element::i64, Shape{2}, vector{2, 3}); try { auto reduce_sum = make_shared(arg, axes); @@ -43,8 +43,8 @@ TEST(type_prop, reduce_l1_v4_axis_out_of_range) TEST(type_prop, reduce_l1_v4_shape_if_keep_dims) { - auto arg = make_shared(element::Type_t::f32, Shape{3, 4, 5}); - auto axes = make_shared(element::Type_t::i64, Shape{2}, vector{1, 2}); + auto arg = make_shared(element::f32, Shape{3, 4, 5}); + auto axes = make_shared(element::i64, Shape{2}, vector{1, 2}); auto keep_dims = true; auto reduce_prod = make_shared(arg, axes, keep_dims); ASSERT_TRUE(reduce_prod->get_output_partial_shape(0).compatible(PartialShape{3, 1, 1})); @@ -52,8 +52,8 @@ TEST(type_prop, reduce_l1_v4_shape_if_keep_dims) TEST(type_prop, reduce_l1_v4_shape_if_not_keep_dims) { - auto arg = make_shared(element::Type_t::f32, Shape{3, 4, 5}); - auto axes = make_shared(element::Type_t::i64, Shape{2}, vector{1, 2}); + auto arg = make_shared(element::f32, Shape{3, 4, 5}); + auto axes = make_shared(element::i64, Shape{2}, vector{1, 2}); auto keep_dims = false; auto reduce_prod = make_shared(arg, axes, keep_dims); ASSERT_TRUE(reduce_prod->get_output_partial_shape(0).compatible(PartialShape{3})); diff --git a/ngraph/test/type_prop/reduce_l2.cpp b/ngraph/test/type_prop/reduce_l2.cpp index 546938a2edadec..e8f41281746a97 100644 --- a/ngraph/test/type_prop/reduce_l2.cpp +++ b/ngraph/test/type_prop/reduce_l2.cpp @@ -23,8 +23,8 @@ using namespace ngraph; TEST(type_prop, reduce_l2_v4_axis_out_of_range) { - auto arg = make_shared(element::Type_t::f32, Shape{1, 2, 3}); - auto axes = make_shared(element::Type_t::i64, Shape{2}, vector{2, 3}); + auto arg = make_shared(element::f32, Shape{1, 2, 3}); + auto axes = make_shared(element::i64, Shape{2}, vector{2, 3}); try { auto reduce_sum = make_shared(arg, axes); @@ -43,8 +43,8 @@ TEST(type_prop, reduce_l2_v4_axis_out_of_range) TEST(type_prop, reduce_l2_v4_shape_if_keep_dims) { - auto arg = make_shared(element::Type_t::f32, Shape{3, 4, 5}); - auto axes = make_shared(element::Type_t::i64, Shape{2}, vector{1, 2}); + auto arg = make_shared(element::f32, Shape{3, 4, 5}); + auto axes = make_shared(element::i64, Shape{2}, vector{1, 2}); auto keep_dims = true; auto reduce_prod = make_shared(arg, axes, keep_dims); ASSERT_TRUE(reduce_prod->get_output_partial_shape(0).compatible(PartialShape{3, 1, 1})); @@ -52,8 +52,8 @@ TEST(type_prop, reduce_l2_v4_shape_if_keep_dims) TEST(type_prop, reduce_l2_v4_shape_if_not_keep_dims) { - auto arg = make_shared(element::Type_t::f32, Shape{3, 4, 5}); - auto axes = make_shared(element::Type_t::i64, Shape{2}, vector{1, 2}); + auto arg = make_shared(element::f32, Shape{3, 4, 5}); + auto axes = make_shared(element::i64, Shape{2}, vector{1, 2}); auto keep_dims = false; auto reduce_prod = make_shared(arg, axes, keep_dims); ASSERT_TRUE(reduce_prod->get_output_partial_shape(0).compatible(PartialShape{3})); diff --git a/ngraph/test/type_prop/reduce_prod.cpp b/ngraph/test/type_prop/reduce_prod.cpp index f8fcb2b36dae91..1242a9fee1cd67 100644 --- a/ngraph/test/type_prop/reduce_prod.cpp +++ b/ngraph/test/type_prop/reduce_prod.cpp @@ -23,8 +23,8 @@ using namespace ngraph; TEST(type_prop, reduce_prod_v1_axis_out_of_range) { - auto arg = make_shared(element::Type_t::f32, Shape{1, 2, 3}); - auto axes = make_shared(element::Type_t::i64, Shape{2}, vector{2, 3}); + auto arg = make_shared(element::f32, Shape{1, 2, 3}); + auto axes = make_shared(element::i64, Shape{2}, vector{2, 3}); try { auto reduce_prod = make_shared(arg, axes); @@ -44,8 +44,8 @@ TEST(type_prop, reduce_prod_v1_axis_out_of_range) TEST(type_prop, reduce_prod_v1_shape_if_keep_dims) { - auto arg = make_shared(element::Type_t::f32, Shape{3, 4, 5}); - auto axes = make_shared(element::Type_t::i64, Shape{2}, vector{1, 2}); + auto arg = make_shared(element::f32, Shape{3, 4, 5}); + auto axes = make_shared(element::i64, Shape{2}, vector{1, 2}); auto keep_dims = true; auto reduce_prod = make_shared(arg, axes, keep_dims); ASSERT_TRUE(reduce_prod->get_output_partial_shape(0).compatible(PartialShape{3, 1, 1})); @@ -53,8 +53,8 @@ TEST(type_prop, reduce_prod_v1_shape_if_keep_dims) TEST(type_prop, reduce_prod_v1_shape_if_not_keep_dims) { - auto arg = make_shared(element::Type_t::f32, Shape{3, 4, 5}); - auto axes = make_shared(element::Type_t::i64, Shape{2}, vector{1, 2}); + auto arg = make_shared(element::f32, Shape{3, 4, 5}); + auto axes = make_shared(element::i64, Shape{2}, vector{1, 2}); auto keep_dims = false; auto reduce_prod = make_shared(arg, axes, keep_dims); ASSERT_TRUE(reduce_prod->get_output_partial_shape(0).compatible(PartialShape{3})); diff --git a/ngraph/test/type_prop/reduce_sum.cpp b/ngraph/test/type_prop/reduce_sum.cpp index 90e50aeec7e20d..4b915a937d76fa 100644 --- a/ngraph/test/type_prop/reduce_sum.cpp +++ b/ngraph/test/type_prop/reduce_sum.cpp @@ -23,8 +23,8 @@ using namespace ngraph; TEST(type_prop, reduce_sum_v1_axis_out_of_range) { - auto arg = make_shared(element::Type_t::f32, Shape{1, 2, 3}); - auto axes = make_shared(element::Type_t::i64, Shape{2}, vector{2, 3}); + auto arg = make_shared(element::f32, Shape{1, 2, 3}); + auto axes = make_shared(element::i64, Shape{2}, vector{2, 3}); try { auto reduce_sum = make_shared(arg, axes); @@ -44,8 +44,8 @@ TEST(type_prop, reduce_sum_v1_axis_out_of_range) TEST(type_prop, reduce_sum_v1_shape_if_keep_dims) { - auto arg = make_shared(element::Type_t::f32, Shape{3, 4, 5}); - auto axes = make_shared(element::Type_t::i64, Shape{2}, vector{1, 2}); + auto arg = make_shared(element::f32, Shape{3, 4, 5}); + auto axes = make_shared(element::i64, Shape{2}, vector{1, 2}); auto keep_dims = true; auto reduce_prod = make_shared(arg, axes, keep_dims); ASSERT_TRUE(reduce_prod->get_output_partial_shape(0).compatible(PartialShape{3, 1, 1})); @@ -53,8 +53,8 @@ TEST(type_prop, reduce_sum_v1_shape_if_keep_dims) TEST(type_prop, reduce_sum_v1_shape_if_not_keep_dims) { - auto arg = make_shared(element::Type_t::f32, Shape{3, 4, 5}); - auto axes = make_shared(element::Type_t::i64, Shape{2}, vector{1, 2}); + auto arg = make_shared(element::f32, Shape{3, 4, 5}); + auto axes = make_shared(element::i64, Shape{2}, vector{1, 2}); auto keep_dims = false; auto reduce_prod = make_shared(arg, axes, keep_dims); ASSERT_TRUE(reduce_prod->get_output_partial_shape(0).compatible(PartialShape{3})); diff --git a/ngraph/test/type_prop/reorg_yolo.cpp b/ngraph/test/type_prop/reorg_yolo.cpp index e63f0cb5ffaf33..c132d1fc9ed230 100644 --- a/ngraph/test/type_prop/reorg_yolo.cpp +++ b/ngraph/test/type_prop/reorg_yolo.cpp @@ -25,7 +25,7 @@ TEST(type_prop, reorg_yolo_stride_2) { const auto in_shape = Shape{1, 64, 26, 26}; size_t stride = 2; - auto data_param = make_shared(element::Type_t::f32, in_shape); + auto data_param = make_shared(element::f32, in_shape); auto reorg_yolo = make_shared(data_param, stride); // in_shape [N,C,H,W] -> out_shape [N, C*stride*stride, H/stride, W/stride] @@ -38,7 +38,7 @@ TEST(type_prop, reorg_yolo_stride_2_batch_2) { const auto in_shape = Shape{2, 64, 26, 26}; size_t stride = 2; - auto data_param = make_shared(element::Type_t::f32, in_shape); + auto data_param = make_shared(element::f32, in_shape); auto reorg_yolo = make_shared(data_param, stride); // in_shape [N,C,H,W] -> out_shape [N, C*stride*stride, H/stride, W/stride] @@ -51,7 +51,7 @@ TEST(type_prop, reorg_yolo_stride_2_smaller_H) { const auto in_shape = Shape{1, 24, 34, 62}; size_t stride = 2; - auto data_param = make_shared(element::Type_t::f32, in_shape); + auto data_param = make_shared(element::f32, in_shape); auto reorg_yolo = make_shared(data_param, stride); // in_shape [N,C,H,W] -> out_shape [N, C*stride*stride, H/stride, W/stride] @@ -63,7 +63,7 @@ TEST(type_prop, reorg_yolo_stride_3) { const auto in_shape = Shape{1, 9, 3, 3}; size_t stride = 3; - auto data_param = make_shared(element::Type_t::f32, in_shape); + auto data_param = make_shared(element::f32, in_shape); auto reorg_yolo = make_shared(data_param, stride); // in_shape [N,C,H,W] -> out_shape [N, C*stride*stride, H/stride, W/stride] @@ -77,7 +77,7 @@ TEST(type_prop, reorg_yolo_catch_small_shape_stride) { const auto in_shape = Shape{1, 1, 4, 4}; size_t stride = 2; - auto data_param = make_shared(element::Type_t::f32, in_shape); + auto data_param = make_shared(element::f32, in_shape); try { // Throw error test: For [N, C, H, W] input shape, C >= (stride*stride) is required. diff --git a/ngraph/test/type_prop/reshape.cpp b/ngraph/test/type_prop/reshape.cpp index 171182b1d10793..0d2f73b60bf3ff 100644 --- a/ngraph/test/type_prop/reshape.cpp +++ b/ngraph/test/type_prop/reshape.cpp @@ -23,83 +23,83 @@ using namespace ngraph; TEST(type_prop, reshape_deduce_s2v) { - auto param = make_shared(element::Type_t::f32, Shape{}); + auto param = make_shared(element::f32, Shape{}); auto r = make_shared( - param, op::Constant::create(element::Type_t::u64, {1}, Shape{1}), false); - ASSERT_EQ(r->get_element_type(), element::Type_t::f32); + param, op::Constant::create(element::u64, {1}, Shape{1}), false); + ASSERT_EQ(r->get_element_type(), element::f32); ASSERT_EQ(r->get_shape(), (Shape{1})); } TEST(type_prop, reshape_deduce_s2m) { - auto param = make_shared(element::Type_t::f32, Shape{}); + auto param = make_shared(element::f32, Shape{}); auto r = make_shared( - param, op::Constant::create(element::Type_t::u64, {2}, Shape{1, 1}), false); - ASSERT_EQ(r->get_element_type(), element::Type_t::f32); + param, op::Constant::create(element::u64, {2}, Shape{1, 1}), false); + ASSERT_EQ(r->get_element_type(), element::f32); ASSERT_EQ(r->get_shape(), (Shape{1, 1})); } TEST(type_prop, reshape_deduce_s2t) { - auto param = make_shared(element::Type_t::f32, Shape{}); + auto param = make_shared(element::f32, Shape{}); auto r = make_shared( - param, op::Constant::create(element::Type_t::u64, {3}, Shape{1, 1, 1}), false); - ASSERT_EQ(r->get_element_type(), element::Type_t::f32); + param, op::Constant::create(element::u64, {3}, Shape{1, 1, 1}), false); + ASSERT_EQ(r->get_element_type(), element::f32); ASSERT_EQ(r->get_shape(), (Shape{1, 1, 1})); } TEST(type_prop, reshape_deduce_m2v_01) { - auto param = make_shared(element::Type_t::f32, Shape{3, 4}); + auto param = make_shared(element::f32, Shape{3, 4}); auto r = make_shared( - param, op::Constant::create(element::Type_t::u64, {1}, Shape{12}), false); - ASSERT_EQ(r->get_element_type(), element::Type_t::f32); + param, op::Constant::create(element::u64, {1}, Shape{12}), false); + ASSERT_EQ(r->get_element_type(), element::f32); ASSERT_EQ(r->get_shape(), (Shape{12})); } TEST(type_prop, reshape_deduce_m2v_10) { - auto param = make_shared(element::Type_t::f32, Shape{3, 4}); + auto param = make_shared(element::f32, Shape{3, 4}); auto r = make_shared( - param, op::Constant::create(element::Type_t::u64, {1}, Shape{12}), false); - ASSERT_EQ(r->get_element_type(), element::Type_t::f32); + param, op::Constant::create(element::u64, {1}, Shape{12}), false); + ASSERT_EQ(r->get_element_type(), element::f32); ASSERT_EQ(r->get_shape(), (Shape{12})); } TEST(type_prop, reshape_deduce_t2v_012) { - auto param = make_shared(element::Type_t::f32, Shape{3, 4, 5}); + auto param = make_shared(element::f32, Shape{3, 4, 5}); auto r = make_shared( - param, op::Constant::create(element::Type_t::u64, {1}, Shape{60}), false); - ASSERT_EQ(r->get_element_type(), element::Type_t::f32); + param, op::Constant::create(element::u64, {1}, Shape{60}), false); + ASSERT_EQ(r->get_element_type(), element::f32); ASSERT_EQ(r->get_shape(), (Shape{60})); } TEST(type_prop, reshape_deduce_t2v_120) { - auto param = make_shared(element::Type_t::f32, Shape{3, 4, 5}); + auto param = make_shared(element::f32, Shape{3, 4, 5}); auto r = make_shared( - param, op::Constant::create(element::Type_t::u64, {1}, Shape{60}), false); - ASSERT_EQ(r->get_element_type(), element::Type_t::f32); + param, op::Constant::create(element::u64, {1}, Shape{60}), false); + ASSERT_EQ(r->get_element_type(), element::f32); ASSERT_EQ(r->get_shape(), (Shape{60})); } TEST(type_prop, reshape_deduce_zero_special) { - auto param = make_shared(element::Type_t::f32, Shape{3, 4, 5}); + auto param = make_shared(element::f32, Shape{3, 4, 5}); auto r = make_shared( - param, op::Constant::create(element::Type_t::u64, {3}, Shape{6, 2, 0}), true); - ASSERT_EQ(r->get_element_type(), element::Type_t::f32); + param, op::Constant::create(element::u64, {3}, Shape{6, 2, 0}), true); + ASSERT_EQ(r->get_element_type(), element::f32); ASSERT_EQ(r->get_shape(), (Shape{6, 2, 5})); } TEST(type_prop, reshape_deduce_wrong_output_shape) { - auto param = make_shared(element::Type_t::f32, Shape{3, 4, 5}); + auto param = make_shared(element::f32, Shape{3, 4, 5}); try { auto r = make_shared( - param, op::Constant::create(element::Type_t::u64, {3}, Shape{3, 3, 3}), false); + param, op::Constant::create(element::u64, {3}, Shape{3, 3, 3}), false); // Should have thrown, so fail if it didn't FAIL() << "No exception was thrown"; } @@ -120,10 +120,10 @@ TEST(type_prop, reshape_deduce_wrong_output_shape) // TEST(type_prop, reshape_partial_rank_dynamic) { - auto param = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto param = make_shared(element::f32, PartialShape::dynamic()); auto r = make_shared( - param, op::Constant::create(element::Type_t::u64, {4}, Shape{3, 1, 8, 2}), false); - ASSERT_EQ(r->get_element_type(), element::Type_t::f32); + param, op::Constant::create(element::u64, {4}, Shape{3, 1, 8, 2}), false); + ASSERT_EQ(r->get_element_type(), element::f32); ASSERT_TRUE(r->get_output_partial_shape(0).is_static()); ASSERT_EQ(r->get_shape(), (Shape{3, 1, 8, 2})); } @@ -135,10 +135,10 @@ TEST(type_prop, reshape_partial_rank_static) { auto param_shape = PartialShape{Dimension::dynamic(), 6, Dimension::dynamic(), Dimension::dynamic()}; - auto param = make_shared(element::Type_t::f32, param_shape); + auto param = make_shared(element::f32, param_shape); auto r = make_shared( - param, op::Constant::create(element::Type_t::u64, {4}, Shape{3, 1, 8, 2}), false); - ASSERT_EQ(r->get_element_type(), element::Type_t::f32); + param, op::Constant::create(element::u64, {4}, Shape{3, 1, 8, 2}), false); + ASSERT_EQ(r->get_element_type(), element::f32); ASSERT_TRUE(r->get_output_partial_shape(0).is_static()); ASSERT_EQ(r->get_shape(), (Shape{3, 1, 8, 2})); } @@ -151,10 +151,10 @@ TEST(type_prop, reshape_partial_rank_static_dynamic_but_zero_ok) { auto param_shape = PartialShape{Dimension::dynamic(), 0, Dimension::dynamic(), Dimension::dynamic()}; - auto param = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto param = make_shared(element::f32, PartialShape::dynamic()); auto r = make_shared( - param, op::Constant::create(element::Type_t::u64, {4}, Shape{3, 1, 0, 2}), false); - ASSERT_EQ(r->get_element_type(), element::Type_t::f32); + param, op::Constant::create(element::u64, {4}, Shape{3, 1, 0, 2}), false); + ASSERT_EQ(r->get_element_type(), element::f32); ASSERT_TRUE(r->get_output_partial_shape(0).is_static()); ASSERT_EQ(r->get_shape(), (Shape{3, 1, 0, 2})); } diff --git a/ngraph/test/type_prop/reverse.cpp b/ngraph/test/type_prop/reverse.cpp index ce58bc9433597e..6a77fe367b8f02 100644 --- a/ngraph/test/type_prop/reverse.cpp +++ b/ngraph/test/type_prop/reverse.cpp @@ -26,140 +26,133 @@ using namespace ngraph; TEST(type_prop, reverse_1d_deduce) { // Deduce type - auto param = make_shared(element::Type_t::f32, Shape{5}); + auto param = make_shared(element::f32, Shape{5}); auto rev = make_shared( - param, op::Constant::create(element::Type_t::i64, {1}, {0}), op::v1::Reverse::Mode::INDEX); + param, op::Constant::create(element::i64, {1}, {0}), op::v1::Reverse::Mode::INDEX); - EXPECT_EQ(rev->get_element_type(), element::Type_t::f32); + EXPECT_EQ(rev->get_element_type(), element::f32); EXPECT_EQ(rev->get_shape(), (Shape{5})); } TEST(type_prop, reverse_2d_deduce_0) { // Deduce type - auto param = make_shared(element::Type_t::f32, Shape{5, 6}); + auto param = make_shared(element::f32, Shape{5, 6}); auto rev = make_shared( - param, op::Constant::create(element::Type_t::i64, {1}, {0}), op::v1::Reverse::Mode::INDEX); + param, op::Constant::create(element::i64, {1}, {0}), op::v1::Reverse::Mode::INDEX); - EXPECT_EQ(rev->get_element_type(), element::Type_t::f32); + EXPECT_EQ(rev->get_element_type(), element::f32); EXPECT_EQ(rev->get_shape(), (Shape{5, 6})); } TEST(type_prop, reverse_2d_deduce_1) { // Deduce type - auto param = make_shared(element::Type_t::f32, Shape{5, 6}); + auto param = make_shared(element::f32, Shape{5, 6}); auto rev = make_shared( - param, op::Constant::create(element::Type_t::i64, {1}, {1}), op::v1::Reverse::Mode::INDEX); + param, op::Constant::create(element::i64, {1}, {1}), op::v1::Reverse::Mode::INDEX); - EXPECT_EQ(rev->get_element_type(), element::Type_t::f32); + EXPECT_EQ(rev->get_element_type(), element::f32); EXPECT_EQ(rev->get_shape(), (Shape{5, 6})); } TEST(type_prop, reverse_2d_deduce_01) { // Deduce type - auto param = make_shared(element::Type_t::f32, Shape{5, 6}); - auto rev = make_shared(param, - op::Constant::create(element::Type_t::i64, {2}, {0, 1}), - op::v1::Reverse::Mode::INDEX); + auto param = make_shared(element::f32, Shape{5, 6}); + auto rev = make_shared( + param, op::Constant::create(element::i64, {2}, {0, 1}), op::v1::Reverse::Mode::INDEX); - EXPECT_EQ(rev->get_element_type(), element::Type_t::f32); + EXPECT_EQ(rev->get_element_type(), element::f32); EXPECT_EQ(rev->get_shape(), (Shape{5, 6})); } TEST(type_prop, reverse_3d_deduce_0) { // Deduce type - auto param = make_shared(element::Type_t::f32, Shape{5, 6, 7}); + auto param = make_shared(element::f32, Shape{5, 6, 7}); auto rev = make_shared( - param, op::Constant::create(element::Type_t::i64, {1}, {0}), op::v1::Reverse::Mode::INDEX); + param, op::Constant::create(element::i64, {1}, {0}), op::v1::Reverse::Mode::INDEX); - EXPECT_EQ(rev->get_element_type(), element::Type_t::f32); + EXPECT_EQ(rev->get_element_type(), element::f32); EXPECT_EQ(rev->get_shape(), (Shape{5, 6, 7})); } TEST(type_prop, reverse_3d_deduce_1) { // Deduce type - auto param = make_shared(element::Type_t::f32, Shape{5, 6, 7}); + auto param = make_shared(element::f32, Shape{5, 6, 7}); auto rev = make_shared( - param, op::Constant::create(element::Type_t::i64, {1}, {1}), op::v1::Reverse::Mode::INDEX); + param, op::Constant::create(element::i64, {1}, {1}), op::v1::Reverse::Mode::INDEX); - EXPECT_EQ(rev->get_element_type(), element::Type_t::f32); + EXPECT_EQ(rev->get_element_type(), element::f32); EXPECT_EQ(rev->get_shape(), (Shape{5, 6, 7})); } TEST(type_prop, reverse_3d_deduce_2) { // Deduce type - auto param = make_shared(element::Type_t::f32, Shape{5, 6, 7}); + auto param = make_shared(element::f32, Shape{5, 6, 7}); auto rev = make_shared( - param, op::Constant::create(element::Type_t::i64, {1}, {2}), op::v1::Reverse::Mode::INDEX); + param, op::Constant::create(element::i64, {1}, {2}), op::v1::Reverse::Mode::INDEX); - EXPECT_EQ(rev->get_element_type(), element::Type_t::f32); + EXPECT_EQ(rev->get_element_type(), element::f32); EXPECT_EQ(rev->get_shape(), (Shape{5, 6, 7})); } TEST(type_prop, reverse_3d_deduce_01) { // Deduce type - auto param = make_shared(element::Type_t::f32, Shape{5, 6, 7}); - auto rev = make_shared(param, - op::Constant::create(element::Type_t::i64, {2}, {0, 1}), - op::v1::Reverse::Mode::INDEX); + auto param = make_shared(element::f32, Shape{5, 6, 7}); + auto rev = make_shared( + param, op::Constant::create(element::i64, {2}, {0, 1}), op::v1::Reverse::Mode::INDEX); - EXPECT_EQ(rev->get_element_type(), element::Type_t::f32); + EXPECT_EQ(rev->get_element_type(), element::f32); EXPECT_EQ(rev->get_shape(), (Shape{5, 6, 7})); } TEST(type_prop, reverse_3d_deduce_02) { // Deduce type - auto param = make_shared(element::Type_t::f32, Shape{5, 6, 7}); - auto rev = make_shared(param, - op::Constant::create(element::Type_t::i64, {2}, {0, 2}), - op::v1::Reverse::Mode::INDEX); + auto param = make_shared(element::f32, Shape{5, 6, 7}); + auto rev = make_shared( + param, op::Constant::create(element::i64, {2}, {0, 2}), op::v1::Reverse::Mode::INDEX); - EXPECT_EQ(rev->get_element_type(), element::Type_t::f32); + EXPECT_EQ(rev->get_element_type(), element::f32); EXPECT_EQ(rev->get_shape(), (Shape{5, 6, 7})); } TEST(type_prop, reverse_3d_deduce_12) { // Deduce type - auto param = make_shared(element::Type_t::f32, Shape{5, 6, 7}); - auto rev = make_shared(param, - op::Constant::create(element::Type_t::i64, {2}, {1, 2}), - op::v1::Reverse::Mode::INDEX); + auto param = make_shared(element::f32, Shape{5, 6, 7}); + auto rev = make_shared( + param, op::Constant::create(element::i64, {2}, {1, 2}), op::v1::Reverse::Mode::INDEX); - EXPECT_EQ(rev->get_element_type(), element::Type_t::f32); + EXPECT_EQ(rev->get_element_type(), element::f32); EXPECT_EQ(rev->get_shape(), (Shape{5, 6, 7})); } TEST(type_prop, reverse_3d_deduce_012) { // Deduce type - auto param = make_shared(element::Type_t::f32, Shape{5, 6, 7}); - auto rev = - make_shared(param, - op::Constant::create(element::Type_t::i64, {3}, {0, 1, 2}), - op::v1::Reverse::Mode::INDEX); + auto param = make_shared(element::f32, Shape{5, 6, 7}); + auto rev = make_shared( + param, op::Constant::create(element::i64, {3}, {0, 1, 2}), op::v1::Reverse::Mode::INDEX); - EXPECT_EQ(rev->get_element_type(), element::Type_t::f32); + EXPECT_EQ(rev->get_element_type(), element::f32); EXPECT_EQ(rev->get_shape(), (Shape{5, 6, 7})); } TEST(type_prop, reverse_3d_deduce_oob) { // Deduce type - auto param = make_shared(element::Type_t::f32, Shape{5, 6, 7}); + auto param = make_shared(element::f32, Shape{5, 6, 7}); try { - auto rev = - make_shared(param, - op::Constant::create(element::Type_t::i64, {3}, {0, 3, 2}), - op::v1::Reverse::Mode::INDEX); + auto rev = make_shared(param, + op::Constant::create(element::i64, {3}, {0, 3, 2}), + op::v1::Reverse::Mode::INDEX); // Should have thrown, so fail if it didn't FAIL() << "Axis out of bounds not detected"; @@ -182,13 +175,13 @@ TEST(type_prop, reverse_3d_deduce_oob) // TEST(type_prop, reverse_partial_rank_dynamic) { - auto param = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto rev = make_shared( - param, - op::Constant::create(element::Type_t::i64, {4}, {0, 2, 1776, 90909}), - op::v1::Reverse::Mode::INDEX); + auto param = make_shared(element::f32, PartialShape::dynamic()); + auto rev = + make_shared(param, + op::Constant::create(element::i64, {4}, {0, 2, 1776, 90909}), + op::v1::Reverse::Mode::INDEX); - EXPECT_EQ(rev->get_element_type(), element::Type_t::f32); + EXPECT_EQ(rev->get_element_type(), element::f32); EXPECT_TRUE(rev->get_output_partial_shape(0).rank().is_dynamic()); } @@ -199,25 +192,23 @@ TEST(type_prop, reverse_partial_rank_dynamic) TEST(type_prop, reverse_partial_rank_static_dynamic_axes_ok) { PartialShape param_shape{Dimension::dynamic(), Dimension::dynamic(), 2, 3}; - auto param = make_shared(element::Type_t::f32, param_shape); - auto rev = make_shared(param, - op::Constant::create(element::Type_t::i64, {2}, {0, 2}), - op::v1::Reverse::Mode::INDEX); + auto param = make_shared(element::f32, param_shape); + auto rev = make_shared( + param, op::Constant::create(element::i64, {2}, {0, 2}), op::v1::Reverse::Mode::INDEX); - EXPECT_EQ(rev->get_element_type(), element::Type_t::f32); + EXPECT_EQ(rev->get_element_type(), element::f32); EXPECT_TRUE(rev->get_output_partial_shape(0).same_scheme(param_shape)); } TEST(type_prop, reverse_partial_rank_static_dynamic_axes_oob) { PartialShape param_shape{Dimension::dynamic(), Dimension::dynamic(), 2, 3}; - auto param = make_shared(element::Type_t::f32, param_shape); + auto param = make_shared(element::f32, param_shape); try { - auto rev = - make_shared(param, - op::Constant::create(element::Type_t::i64, {3}, {0, 4, 2}), - op::v1::Reverse::Mode::INDEX); + auto rev = make_shared(param, + op::Constant::create(element::i64, {3}, {0, 4, 2}), + op::v1::Reverse::Mode::INDEX); // Should have thrown, so fail if it didn't FAIL() << "Axis out of bounds not detected"; diff --git a/ngraph/test/type_prop/reverse_sequence.cpp b/ngraph/test/type_prop/reverse_sequence.cpp index 65819ceee51f4b..ade152fd77eef7 100644 --- a/ngraph/test/type_prop/reverse_sequence.cpp +++ b/ngraph/test/type_prop/reverse_sequence.cpp @@ -23,8 +23,8 @@ using namespace ngraph; TEST(type_prop, reverse_sequence_1_dim) { - auto data = make_shared(element::Type_t::f32, Shape{4, 3, 2}); - auto seq_lenghts = make_shared(element::Type_t::f32, Shape{4, 4}); + auto data = make_shared(element::f32, Shape{4, 3, 2}); + auto seq_lenghts = make_shared(element::f32, Shape{4, 4}); try { size_t batch_axis = 0; @@ -45,8 +45,8 @@ TEST(type_prop, reverse_sequence_1_dim) TEST(type_prop, reverse_sequence_batch_index_oob) { - auto data = make_shared(element::Type_t::f32, Shape{4, 3, 2}); - auto seq_lenghts = make_shared(element::Type_t::f32, Shape{3}); + auto data = make_shared(element::f32, Shape{4, 3, 2}); + auto seq_lenghts = make_shared(element::f32, Shape{3}); try { size_t batch_axis = 3; @@ -66,8 +66,8 @@ TEST(type_prop, reverse_sequence_batch_index_oob) TEST(type_prop, reverse_sequence_sequence_index_oob) { - auto data = make_shared(element::Type_t::f32, Shape{4, 3, 2}); - auto seq_lengths = make_shared(element::Type_t::f32, Shape{3}); + auto data = make_shared(element::f32, Shape{4, 3, 2}); + auto seq_lengths = make_shared(element::f32, Shape{3}); try { size_t batch_axis = 1; @@ -87,8 +87,8 @@ TEST(type_prop, reverse_sequence_sequence_index_oob) TEST(type_prop, reverse_sequence_seq_len_size_equal_to_batch_dim) { - auto data = make_shared(element::Type_t::f32, Shape{4, 3, 2}); - auto seq_lenghts = make_shared(element::Type_t::f32, Shape{3}); + auto data = make_shared(element::f32, Shape{4, 3, 2}); + auto seq_lenghts = make_shared(element::f32, Shape{3}); try { size_t batch_axis = 0; @@ -111,68 +111,67 @@ TEST(type_prop, reverse_sequence_seq_len_size_equal_to_batch_dim) TEST(type_prop, reverse_sequence_partial_both_rank_dynamic) { - auto data = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto seq_lengths = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto data = make_shared(element::f32, PartialShape::dynamic()); + auto seq_lengths = make_shared(element::f32, PartialShape::dynamic()); // Unrealistic values, but they don't matter here. size_t batch_axis = 202; size_t seq_axis = 909; auto rs = make_shared(data, seq_lengths, batch_axis, seq_axis); EXPECT_TRUE(rs->get_output_partial_shape(0).is_dynamic()); - EXPECT_EQ(rs->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(rs->get_output_element_type(0), element::f32); } TEST(type_prop, reverse_sequence_partial_left_rank_dynamic) { - auto data = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto seq_lengths = make_shared(element::Type_t::f32, PartialShape{3}); + auto data = make_shared(element::f32, PartialShape::dynamic()); + auto seq_lengths = make_shared(element::f32, PartialShape{3}); // Unrealistic values, but they don't matter here. size_t batch_axis = 202; size_t seq_axis = 909; auto rs = make_shared(data, seq_lengths, batch_axis, seq_axis); EXPECT_TRUE(rs->get_output_partial_shape(0).is_dynamic()); - EXPECT_EQ(rs->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(rs->get_output_element_type(0), element::f32); } TEST(type_prop, reverse_sequence_partial_right_rank_dynamic) { - auto data = make_shared(element::Type_t::f32, PartialShape{2, 4, 6, 8}); - auto seq_lengths = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto data = make_shared(element::f32, PartialShape{2, 4, 6, 8}); + auto seq_lengths = make_shared(element::f32, PartialShape::dynamic()); size_t batch_axis = 0; size_t seq_axis = 1; auto rs = make_shared(data, seq_lengths, batch_axis, seq_axis); EXPECT_TRUE(rs->get_output_partial_shape(0).same_scheme(PartialShape{2, 4, 6, 8})); - EXPECT_EQ(rs->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(rs->get_output_element_type(0), element::f32); } TEST(type_prop, reverse_sequence_partial_both_rank_static_dynamic) { - auto data = make_shared(element::Type_t::f32, + auto data = make_shared(element::f32, PartialShape{Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic()}); - auto seq_lengths = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto seq_lengths = make_shared(element::f32, PartialShape::dynamic()); size_t batch_axis = 0; size_t seq_axis = 1; auto rs = make_shared(data, seq_lengths, batch_axis, seq_axis); EXPECT_TRUE(rs->get_output_partial_shape(0).same_scheme(PartialShape{ Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic()})); - EXPECT_EQ(rs->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(rs->get_output_element_type(0), element::f32); } TEST(type_prop, reverse_sequence_partial_both_rank_static_dynamic_batch_axis_oob) { - auto data = make_shared(element::Type_t::f32, + auto data = make_shared(element::f32, PartialShape{Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic()}); - auto seq_lengths = - make_shared(element::Type_t::f32, PartialShape{Dimension::dynamic()}); + auto seq_lengths = make_shared(element::f32, PartialShape{Dimension::dynamic()}); size_t batch_axis = 4; size_t seq_axis = 1; try @@ -192,13 +191,12 @@ TEST(type_prop, reverse_sequence_partial_both_rank_static_dynamic_batch_axis_oob TEST(type_prop, reverse_sequence_partial_both_rank_static_dynamic_sequence_axis_oob) { - auto data = make_shared(element::Type_t::f32, + auto data = make_shared(element::f32, PartialShape{Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic()}); - auto seq_lengths = - make_shared(element::Type_t::f32, PartialShape{Dimension::dynamic()}); + auto seq_lengths = make_shared(element::f32, PartialShape{Dimension::dynamic()}); size_t batch_axis = 1; size_t seq_axis = 4; try @@ -219,51 +217,50 @@ TEST(type_prop, reverse_sequence_partial_both_rank_static_dynamic_sequence_axis_ TEST(type_prop, reverse_sequence_partial_left_rank_static_dynamic_right_static_left_seq_length_dynamic) { - auto data = make_shared(element::Type_t::f32, + auto data = make_shared(element::f32, PartialShape{Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic(), Dimension::dynamic()}); - auto seq_lengths = make_shared(element::Type_t::f32, PartialShape{3}); + auto seq_lengths = make_shared(element::f32, PartialShape{3}); size_t batch_axis = 2; size_t seq_axis = 1; auto rs = make_shared(data, seq_lengths, batch_axis, seq_axis); EXPECT_TRUE(rs->get_output_partial_shape(0).same_scheme( PartialShape{Dimension::dynamic(), Dimension::dynamic(), 3, Dimension::dynamic()})); - EXPECT_EQ(rs->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(rs->get_output_element_type(0), element::f32); } TEST(type_prop, reverse_sequence_partial_both_rank_static_dynamic_right_seq_length_dynamic) { auto data = make_shared( - element::Type_t::f32, + element::f32, PartialShape{Dimension::dynamic(), Dimension::dynamic(), 3, Dimension::dynamic()}); - auto seq_lengths = - make_shared(element::Type_t::f32, PartialShape{Dimension::dynamic()}); + auto seq_lengths = make_shared(element::f32, PartialShape{Dimension::dynamic()}); size_t batch_axis = 2; size_t seq_axis = 1; auto rs = make_shared(data, seq_lengths, batch_axis, seq_axis); EXPECT_TRUE(rs->get_output_partial_shape(0).same_scheme( PartialShape{Dimension::dynamic(), Dimension::dynamic(), 3, Dimension::dynamic()})); - EXPECT_EQ(rs->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(rs->get_output_element_type(0), element::f32); } TEST(type_prop, reverse_sequence_partial_left_rank_static_dynamic_right_static_left_seq_length_static) { auto data = make_shared( - element::Type_t::f32, + element::f32, PartialShape{Dimension::dynamic(), Dimension::dynamic(), 3, Dimension::dynamic()}); - auto seq_lengths = make_shared(element::Type_t::f32, PartialShape{3}); + auto seq_lengths = make_shared(element::f32, PartialShape{3}); size_t batch_axis = 2; size_t seq_axis = 1; auto rs = make_shared(data, seq_lengths, batch_axis, seq_axis); EXPECT_TRUE(rs->get_output_partial_shape(0).same_scheme( PartialShape{Dimension::dynamic(), Dimension::dynamic(), 3, Dimension::dynamic()})); - EXPECT_EQ(rs->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(rs->get_output_element_type(0), element::f32); } TEST( @@ -271,9 +268,9 @@ TEST( reverse_sequence_partial_left_rank_static_dynamic_right_static_left_seq_length_static_inconsistent) { auto data = make_shared( - element::Type_t::f32, + element::f32, PartialShape{Dimension::dynamic(), Dimension::dynamic(), 3, Dimension::dynamic()}); - auto seq_lengths = make_shared(element::Type_t::f32, PartialShape{4}); + auto seq_lengths = make_shared(element::f32, PartialShape{4}); size_t batch_axis = 2; size_t seq_axis = 1; try @@ -295,8 +292,8 @@ TEST( TEST(type_prop, reverse_sequence_negative_axis_dynamic_input_rank) { - auto data = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto seq_lengths = make_shared(element::Type_t::f32, PartialShape{1}); + auto data = make_shared(element::f32, PartialShape::dynamic()); + auto seq_lengths = make_shared(element::f32, PartialShape{1}); int64_t batch_axis = 1; int64_t seq_axis = -2; try @@ -318,8 +315,8 @@ TEST(type_prop, reverse_sequence_negative_axis_dynamic_input_rank) TEST(type_prop, reverse_sequence_negative_axes_support) { - auto data = make_shared(element::Type_t::f32, PartialShape{1, 2, 3, 4, 5}); - auto seq_lengths = make_shared(element::Type_t::f32, PartialShape{3}); + auto data = make_shared(element::f32, PartialShape{1, 2, 3, 4, 5}); + auto seq_lengths = make_shared(element::f32, PartialShape{3}); int64_t batch_axis = -3; int64_t seq_axis = -2; diff --git a/ngraph/test/type_prop/rnn_cell.cpp b/ngraph/test/type_prop/rnn_cell.cpp index aedc5c88fe26a3..627457edbb9c93 100644 --- a/ngraph/test/type_prop/rnn_cell.cpp +++ b/ngraph/test/type_prop/rnn_cell.cpp @@ -28,17 +28,13 @@ TEST(type_prop, rnn_cell) const size_t input_size = 3; const size_t hidden_size = 3; - const auto X = - make_shared(element::Type_t::f32, Shape{batch_size, input_size}); - const auto H_t = - make_shared(element::Type_t::f32, Shape{batch_size, hidden_size}); - const auto W = - make_shared(element::Type_t::f32, Shape{hidden_size, input_size}); - const auto R = - make_shared(element::Type_t::f32, Shape{hidden_size, hidden_size}); + const auto X = make_shared(element::f32, Shape{batch_size, input_size}); + const auto H_t = make_shared(element::f32, Shape{batch_size, hidden_size}); + const auto W = make_shared(element::f32, Shape{hidden_size, input_size}); + const auto R = make_shared(element::f32, Shape{hidden_size, hidden_size}); const auto rnn_cell = make_shared(X, H_t, W, R, hidden_size); - EXPECT_EQ(rnn_cell->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(rnn_cell->get_output_element_type(0), element::f32); EXPECT_EQ(rnn_cell->get_output_shape(0), (Shape{batch_size, hidden_size})); } @@ -48,13 +44,12 @@ TEST(type_prop, rnn_cell_invalid_input) const size_t input_size = 3; const size_t hidden_size = 3; - auto X = make_shared(element::Type_t::f32, Shape{batch_size, input_size}); - auto R = make_shared(element::Type_t::f32, Shape{hidden_size, hidden_size}); - auto H_t = make_shared(element::Type_t::f32, Shape{batch_size, hidden_size}); + auto X = make_shared(element::f32, Shape{batch_size, input_size}); + auto R = make_shared(element::f32, Shape{hidden_size, hidden_size}); + auto H_t = make_shared(element::f32, Shape{batch_size, hidden_size}); // Invalid W tensor shape. - auto W = - make_shared(element::Type_t::f32, Shape{2 * hidden_size, input_size}); + auto W = make_shared(element::f32, Shape{2 * hidden_size, input_size}); try { const auto rnn_cell = make_shared(X, H_t, W, R, hidden_size); @@ -67,8 +62,8 @@ TEST(type_prop, rnn_cell_invalid_input) } // Invalid R tensor shape. - W = make_shared(element::Type_t::f32, Shape{hidden_size, input_size}); - R = make_shared(element::Type_t::f32, Shape{hidden_size, 1}); + W = make_shared(element::f32, Shape{hidden_size, input_size}); + R = make_shared(element::f32, Shape{hidden_size, 1}); try { const auto rnn_cell = make_shared(X, H_t, W, R, hidden_size); @@ -83,8 +78,8 @@ TEST(type_prop, rnn_cell_invalid_input) } // Invalid H_t tensor shape. - R = make_shared(element::Type_t::f32, Shape{hidden_size, hidden_size}); - H_t = make_shared(element::Type_t::f32, Shape{4, hidden_size}); + R = make_shared(element::f32, Shape{hidden_size, hidden_size}); + H_t = make_shared(element::f32, Shape{4, hidden_size}); try { const auto rnn_cell = make_shared(X, H_t, W, R, hidden_size); @@ -98,8 +93,8 @@ TEST(type_prop, rnn_cell_invalid_input) } // Invalid B tensor shape. - H_t = make_shared(element::Type_t::f32, Shape{batch_size, hidden_size}); - auto B = make_shared(element::Type_t::f32, Shape{2 * hidden_size}); + H_t = make_shared(element::f32, Shape{batch_size, hidden_size}); + auto B = make_shared(element::f32, Shape{2 * hidden_size}); try { const auto rnn_cell = make_shared(X, H_t, W, R, B, hidden_size); @@ -119,16 +114,16 @@ TEST(type_prop, rnn_cell_dynamic_batch_size) const size_t hidden_size = 3; const auto X = - make_shared(element::Type_t::f32, PartialShape{batch_size, input_size}); + make_shared(element::f32, PartialShape{batch_size, input_size}); const auto H_t = - make_shared(element::Type_t::f32, PartialShape{batch_size, hidden_size}); + make_shared(element::f32, PartialShape{batch_size, hidden_size}); const auto W = - make_shared(element::Type_t::f32, PartialShape{hidden_size, input_size}); - const auto R = make_shared(element::Type_t::f32, - PartialShape{hidden_size, hidden_size}); + make_shared(element::f32, PartialShape{hidden_size, input_size}); + const auto R = + make_shared(element::f32, PartialShape{hidden_size, hidden_size}); const auto rnn_cell = make_shared(X, H_t, W, R, hidden_size); - EXPECT_EQ(rnn_cell->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(rnn_cell->get_output_element_type(0), element::f32); EXPECT_EQ(rnn_cell->get_output_partial_shape(0), (PartialShape{batch_size, hidden_size})); } @@ -139,16 +134,16 @@ TEST(type_prop, rnn_cell_dynamic_hidden_size) const auto hidden_size = Dimension::dynamic(); const auto X = - make_shared(element::Type_t::f32, PartialShape{batch_size, input_size}); + make_shared(element::f32, PartialShape{batch_size, input_size}); const auto H_t = - make_shared(element::Type_t::f32, PartialShape{batch_size, hidden_size}); + make_shared(element::f32, PartialShape{batch_size, hidden_size}); const auto W = - make_shared(element::Type_t::f32, PartialShape{hidden_size, input_size}); - const auto R = make_shared(element::Type_t::f32, - PartialShape{hidden_size, hidden_size}); + make_shared(element::f32, PartialShape{hidden_size, input_size}); + const auto R = + make_shared(element::f32, PartialShape{hidden_size, hidden_size}); const auto rnn_cell = make_shared(X, H_t, W, R, 3); - EXPECT_EQ(rnn_cell->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(rnn_cell->get_output_element_type(0), element::f32); EXPECT_EQ(rnn_cell->get_output_partial_shape(0), (PartialShape{batch_size, hidden_size})); } @@ -159,18 +154,18 @@ TEST(type_prop, rnn_cell_dynamic_inputs) const auto hidden_size = Dimension::dynamic(); const auto X = - make_shared(element::Type_t::f32, PartialShape{batch_size, input_size}); - const auto R = make_shared(element::Type_t::f32, - PartialShape{hidden_size, hidden_size}); + make_shared(element::f32, PartialShape{batch_size, input_size}); + const auto R = + make_shared(element::f32, PartialShape{hidden_size, hidden_size}); const auto W = - make_shared(element::Type_t::f32, PartialShape{hidden_size, input_size}); + make_shared(element::f32, PartialShape{hidden_size, input_size}); const auto H_t = - make_shared(element::Type_t::f32, PartialShape{batch_size, hidden_size}); + make_shared(element::f32, PartialShape{batch_size, hidden_size}); const auto rnn_cell = make_shared(X, H_t, W, R, 2); EXPECT_EQ(rnn_cell->get_output_partial_shape(0), (PartialShape{batch_size, hidden_size})); - EXPECT_EQ(rnn_cell->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(rnn_cell->get_output_element_type(0), element::f32); } TEST(type_prop, rnn_cell_invalid_input_rank0) @@ -179,41 +174,40 @@ TEST(type_prop, rnn_cell_invalid_input_rank0) const size_t input_size = 3; const size_t hidden_size = 3; - auto X = make_shared(element::Type_t::f32, Shape{batch_size, input_size}); - auto R = make_shared(element::Type_t::f32, Shape{hidden_size, hidden_size}); - auto H_t = make_shared(element::Type_t::f32, Shape{batch_size, hidden_size}); + auto X = make_shared(element::f32, Shape{batch_size, input_size}); + auto R = make_shared(element::f32, Shape{hidden_size, hidden_size}); + auto H_t = make_shared(element::f32, Shape{batch_size, hidden_size}); // Invalid rank0 for W tensor. - auto W = make_shared(element::Type_t::f32, PartialShape{}); + auto W = make_shared(element::f32, PartialShape{}); ASSERT_THROW(make_shared(X, H_t, W, R, hidden_size), ngraph::NodeValidationFailure) << "RNNCell node was created with invalid data."; // Invalid rank0 for X tensor. - W = make_shared(element::Type_t::f32, PartialShape{hidden_size, input_size}); - X = make_shared(element::Type_t::f32, PartialShape{}); + W = make_shared(element::f32, PartialShape{hidden_size, input_size}); + X = make_shared(element::f32, PartialShape{}); ASSERT_THROW(make_shared(X, H_t, W, R, hidden_size), ngraph::NodeValidationFailure) << "RNNCell node was created with invalid data."; // Invalid rank0 for H_t tensor. - X = make_shared(element::Type_t::f32, Shape{batch_size, input_size}); - H_t = make_shared(element::Type_t::f32, PartialShape{}); + X = make_shared(element::f32, Shape{batch_size, input_size}); + H_t = make_shared(element::f32, PartialShape{}); ASSERT_THROW(make_shared(X, H_t, W, R, hidden_size), ngraph::NodeValidationFailure) << "RNNCell node was created with invalid data."; // Invalid rank0 for R tensor. - H_t = make_shared(element::Type_t::f32, Shape{batch_size, hidden_size}); - R = make_shared(element::Type_t::f32, PartialShape{}); + H_t = make_shared(element::f32, Shape{batch_size, hidden_size}); + R = make_shared(element::f32, PartialShape{}); ASSERT_THROW(make_shared(X, H_t, W, R, hidden_size), ngraph::NodeValidationFailure) << "RNNCell node was created with invalid data."; // Invalid rank0 for B tensor. - R = make_shared(element::Type_t::f32, - PartialShape{hidden_size, hidden_size}); - auto B = make_shared(element::Type_t::f32, PartialShape{}); + R = make_shared(element::f32, PartialShape{hidden_size, hidden_size}); + auto B = make_shared(element::f32, PartialShape{}); ASSERT_THROW(make_shared(X, H_t, W, R, B, hidden_size), ngraph::NodeValidationFailure) << "RNNCell node was created with invalid data."; @@ -225,46 +219,40 @@ TEST(type_prop, rnn_cell_invalid_input_dynamic_rank) const size_t input_size = 3; const size_t hidden_size = 3; - auto X = make_shared(element::Type_t::f32, Shape{batch_size, input_size}); - auto R = make_shared(element::Type_t::f32, Shape{hidden_size, hidden_size}); - auto H_t = make_shared(element::Type_t::f32, Shape{batch_size, hidden_size}); + auto X = make_shared(element::f32, Shape{batch_size, input_size}); + auto R = make_shared(element::f32, Shape{hidden_size, hidden_size}); + auto H_t = make_shared(element::f32, Shape{batch_size, hidden_size}); auto check_dynamic_rnn = [](const shared_ptr& rnn) -> bool { return rnn->output(0).get_partial_shape() == PartialShape::dynamic() && rnn->output(0).get_element_type() == rnn->input(0).get_element_type(); }; // Invalid dynamic rank for W tensor. - auto W = make_shared(element::Type_t::f32, - PartialShape::dynamic(Rank::dynamic())); + auto W = make_shared(element::f32, PartialShape::dynamic(Rank::dynamic())); auto rnn_w = make_shared(X, H_t, W, R, hidden_size); EXPECT_EQ(check_dynamic_rnn(rnn_w), true); // Invalid dynamic rank for X tensor. - W = make_shared(element::Type_t::f32, PartialShape{hidden_size, input_size}); - X = make_shared(element::Type_t::f32, - PartialShape::dynamic(Rank::dynamic())); + W = make_shared(element::f32, PartialShape{hidden_size, input_size}); + X = make_shared(element::f32, PartialShape::dynamic(Rank::dynamic())); auto rnn_x = make_shared(X, H_t, W, R, hidden_size); EXPECT_EQ(check_dynamic_rnn(rnn_x), true); // Invalid dynamic rank for H_t tensor. - X = make_shared(element::Type_t::f32, Shape{batch_size, input_size}); - H_t = make_shared(element::Type_t::f32, - PartialShape::dynamic(Rank::dynamic())); + X = make_shared(element::f32, Shape{batch_size, input_size}); + H_t = make_shared(element::f32, PartialShape::dynamic(Rank::dynamic())); auto rnn_h = make_shared(X, H_t, W, R, hidden_size); EXPECT_EQ(check_dynamic_rnn(rnn_h), true); // Invalid dynamic rank for R tensor. - H_t = make_shared(element::Type_t::f32, Shape{batch_size, hidden_size}); - R = make_shared(element::Type_t::f32, - PartialShape::dynamic(Rank::dynamic())); + H_t = make_shared(element::f32, Shape{batch_size, hidden_size}); + R = make_shared(element::f32, PartialShape::dynamic(Rank::dynamic())); auto rnn_r = make_shared(X, H_t, W, R, hidden_size); EXPECT_EQ(check_dynamic_rnn(rnn_r), true); // Invalid dynamic rank for B tensor. - R = make_shared(element::Type_t::f32, - PartialShape{hidden_size, hidden_size}); - auto B = make_shared(element::Type_t::f32, - PartialShape::dynamic(Rank::dynamic())); + R = make_shared(element::f32, PartialShape{hidden_size, hidden_size}); + auto B = make_shared(element::f32, PartialShape::dynamic(Rank::dynamic())); auto rnn_b = make_shared(X, H_t, W, R, B, hidden_size); EXPECT_EQ(check_dynamic_rnn(rnn_b), true); } diff --git a/ngraph/test/type_prop/rnn_sequence.cpp b/ngraph/test/type_prop/rnn_sequence.cpp index 30c24dff42f3f6..94b500dbb02e4c 100644 --- a/ngraph/test/type_prop/rnn_sequence.cpp +++ b/ngraph/test/type_prop/rnn_sequence.cpp @@ -30,19 +30,17 @@ TEST(type_prop, rnn_sequence_forward) const size_t input_size = 4; const size_t hidden_size = 128; - const auto X = make_shared(element::Type_t::f32, - Shape{batch_size, seq_length, input_size}); + const auto X = + make_shared(element::f32, Shape{batch_size, seq_length, input_size}); const auto initial_hidden_state = make_shared( - element::Type_t::f32, Shape{batch_size, num_directions, hidden_size}); - const auto sequence_lengths = - make_shared(element::Type_t::i32, Shape{batch_size}); + element::f32, Shape{batch_size, num_directions, hidden_size}); + const auto sequence_lengths = make_shared(element::i32, Shape{batch_size}); - const auto W = make_shared(element::Type_t::f32, + const auto W = make_shared(element::f32, Shape{num_directions, hidden_size, input_size}); - const auto R = make_shared(element::Type_t::f32, + const auto R = make_shared(element::f32, Shape{num_directions, hidden_size, hidden_size}); - const auto B = - make_shared(element::Type_t::f32, Shape{num_directions, hidden_size}); + const auto B = make_shared(element::f32, Shape{num_directions, hidden_size}); const auto direction = op::RecurrentSequenceDirection::FORWARD; @@ -55,10 +53,10 @@ TEST(type_prop, rnn_sequence_forward) EXPECT_TRUE(sequence->get_activations_beta().empty()); EXPECT_EQ(sequence->get_activations()[0], "tanh"); EXPECT_EQ(sequence->get_clip(), 0.f); - EXPECT_EQ(sequence->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(sequence->get_output_element_type(0), element::f32); EXPECT_EQ(sequence->outputs().size(), 2); EXPECT_EQ(sequence->get_output_shape(0), (Shape{batch_size, num_directions, seq_length, hidden_size})); - EXPECT_EQ(sequence->get_output_element_type(1), element::Type_t::f32); + EXPECT_EQ(sequence->get_output_element_type(1), element::f32); EXPECT_EQ(sequence->get_output_shape(1), (Shape{batch_size, num_directions, hidden_size})); } diff --git a/ngraph/test/type_prop/roi_align.cpp b/ngraph/test/type_prop/roi_align.cpp index 0c32f24c5d6854..67b103606703a9 100644 --- a/ngraph/test/type_prop/roi_align.cpp +++ b/ngraph/test/type_prop/roi_align.cpp @@ -22,39 +22,37 @@ using namespace ngraph; TEST(type_prop_layers, roi_align_basic_shape_inference) { - const auto data = make_shared(element::Type_t::f32, Shape{2, 3, 5, 5}); - const auto rois = make_shared(element::Type_t::f32, Shape{7, 4}); - const auto batch_indices = make_shared(element::Type_t::i32, Shape{7}); + const auto data = make_shared(element::f32, Shape{2, 3, 5, 5}); + const auto rois = make_shared(element::f32, Shape{7, 4}); + const auto batch_indices = make_shared(element::i32, Shape{7}); const auto op = make_shared(data, rois, batch_indices, 2, 2, 1, 1.0f, "avg"); ASSERT_EQ(op->get_shape(), (Shape{7, 3, 2, 2})); } TEST(type_prop_layers, roi_align_dynamic_channels_dim) { - const auto data = - make_shared(element::Type_t::f32, PartialShape{10, Dimension(), 5, 5}); - const auto rois = make_shared(element::Type_t::f32, Shape{7, 4}); - const auto batch_indices = make_shared(element::Type_t::i32, Shape{7}); + const auto data = make_shared(element::f32, PartialShape{10, Dimension(), 5, 5}); + const auto rois = make_shared(element::f32, Shape{7, 4}); + const auto batch_indices = make_shared(element::i32, Shape{7}); const auto op = make_shared(data, rois, batch_indices, 3, 4, 1, 1.0f, "avg"); ASSERT_TRUE(op->get_output_partial_shape(0).same_scheme(PartialShape{7, Dimension(), 3, 4})); } TEST(type_prop_layers, roi_align_num_rois_from_batch_indices) { - const auto data = make_shared(element::Type_t::f32, PartialShape{10, 3, 5, 5}); + const auto data = make_shared(element::f32, PartialShape{10, 3, 5, 5}); const auto rois = - make_shared(element::Type_t::f32, PartialShape{Dimension{}, Dimension{}}); - const auto batch_indices = make_shared(element::Type_t::i32, Shape{9}); + make_shared(element::f32, PartialShape{Dimension{}, Dimension{}}); + const auto batch_indices = make_shared(element::i32, Shape{9}); const auto op = make_shared(data, rois, batch_indices, 3, 4, 1, 1.0f, "avg"); ASSERT_EQ(op->get_shape(), (Shape{9, 3, 3, 4})); } TEST(type_prop_layers, roi_align_incompatible_num_rois) { - const auto data = make_shared(element::Type_t::f32, Shape{10, 3, 5, 5}); - const auto rois = - make_shared(element::Type_t::f32, PartialShape{1, Dimension{}}); - const auto batch_indices = make_shared(element::Type_t::i32, Shape{2}); + const auto data = make_shared(element::f32, Shape{10, 3, 5, 5}); + const auto rois = make_shared(element::f32, PartialShape{1, Dimension{}}); + const auto batch_indices = make_shared(element::i32, Shape{2}); // the first dimension of rois and batch_indices should be equal ASSERT_THROW(make_shared(data, rois, batch_indices, 3, 4, 1, 1.0f, "avg"), ngraph::NodeValidationFailure); @@ -62,9 +60,9 @@ TEST(type_prop_layers, roi_align_incompatible_num_rois) TEST(type_prop_layers, roi_align_incompatible_input_rank) { - const auto data = make_shared(element::Type_t::f32, Shape{1, 10, 3, 5, 5}); - const auto rois = make_shared(element::Type_t::f32, Shape{1, 4}); - const auto batch_indices = make_shared(element::Type_t::i32, Shape{1}); + const auto data = make_shared(element::f32, Shape{1, 10, 3, 5, 5}); + const auto rois = make_shared(element::f32, Shape{1, 4}); + const auto batch_indices = make_shared(element::i32, Shape{1}); // data rank needs to be 4 ASSERT_THROW(make_shared(data, rois, batch_indices, 3, 4, 1, 1.0f, "avg"), ngraph::NodeValidationFailure); @@ -72,9 +70,9 @@ TEST(type_prop_layers, roi_align_incompatible_input_rank) TEST(type_prop_layers, roi_align_incompatible_rois_second_dim) { - const auto data = make_shared(element::Type_t::f32, Shape{10, 3, 5, 5}); - const auto rois = make_shared(element::Type_t::f32, Shape{1, 5}); - const auto batch_indices = make_shared(element::Type_t::i32, Shape{1}); + const auto data = make_shared(element::f32, Shape{10, 3, 5, 5}); + const auto rois = make_shared(element::f32, Shape{1, 5}); + const auto batch_indices = make_shared(element::i32, Shape{1}); // the second dim of rois needs to be 4 ASSERT_THROW(make_shared(data, rois, batch_indices, 3, 4, 1, 1.0f, "avg"), ngraph::NodeValidationFailure); diff --git a/ngraph/test/type_prop/roi_pooling.cpp b/ngraph/test/type_prop/roi_pooling.cpp index f9ce17a2b58966..5ab2b7759fe518 100644 --- a/ngraph/test/type_prop/roi_pooling.cpp +++ b/ngraph/test/type_prop/roi_pooling.cpp @@ -22,8 +22,8 @@ using namespace ngraph; TEST(type_prop, roi_pooling_basic_shape_inference) { - const auto feat_maps = make_shared(element::Type_t::f32, Shape{1, 3, 6, 6}); - const auto rois = make_shared(element::Type_t::f32, Shape{4, 5}); + const auto feat_maps = make_shared(element::f32, Shape{1, 3, 6, 6}); + const auto rois = make_shared(element::f32, Shape{4, 5}); const auto op = make_shared(feat_maps, rois, Shape{2, 2}, 0.625f); ASSERT_EQ(op->get_method(), "max"); ASSERT_EQ(op->get_shape(), (Shape{4, 3, 2, 2})); @@ -32,42 +32,40 @@ TEST(type_prop, roi_pooling_basic_shape_inference) TEST(type_prop, roi_pooling_dynamic_channels_dim) { const auto feat_maps = - make_shared(element::Type_t::f32, PartialShape{1, Dimension(), 6, 6}); - const auto rois = make_shared(element::Type_t::f32, Shape{4, 5}); + make_shared(element::f32, PartialShape{1, Dimension(), 6, 6}); + const auto rois = make_shared(element::f32, Shape{4, 5}); const auto op = make_shared(feat_maps, rois, Shape{2, 2}, 0.625f, "max"); ASSERT_TRUE(op->get_output_partial_shape(0).same_scheme(PartialShape{4, Dimension(), 2, 2})); } TEST(type_prop, roi_pooling_dynamic_num_rois_dim) { - const auto feat_maps = make_shared(element::Type_t::f32, Shape{1, 3, 6, 6}); - const auto rois = - make_shared(element::Type_t::f32, PartialShape{Dimension(), 5}); + const auto feat_maps = make_shared(element::f32, Shape{1, 3, 6, 6}); + const auto rois = make_shared(element::f32, PartialShape{Dimension(), 5}); const auto op = make_shared(feat_maps, rois, Shape{2, 2}, 0.625f); ASSERT_TRUE(op->get_output_partial_shape(0).same_scheme(PartialShape{Dimension(), 3, 2, 2})); } TEST(type_prop, roi_pooling_dynamic_rank_feat_maps) { - const auto feat_maps = - make_shared(element::Type_t::f32, PartialShape::dynamic()); - const auto rois = make_shared(element::Type_t::f32, Shape{4, 5}); + const auto feat_maps = make_shared(element::f32, PartialShape::dynamic()); + const auto rois = make_shared(element::f32, Shape{4, 5}); const auto op = make_shared(feat_maps, rois, Shape{2, 2}, 0.625f); ASSERT_TRUE(op->get_output_partial_shape(0).same_scheme(PartialShape{4, Dimension(), 2, 2})); } TEST(type_prop, roi_pooling_dynamic_rank_rois) { - const auto feat_maps = make_shared(element::Type_t::f32, Shape{1, 3, 6, 6}); - const auto rois = make_shared(element::Type_t::f32, PartialShape::dynamic()); + const auto feat_maps = make_shared(element::f32, Shape{1, 3, 6, 6}); + const auto rois = make_shared(element::f32, PartialShape::dynamic()); const auto op = make_shared(feat_maps, rois, Shape{2, 2}, 0.625f); ASSERT_TRUE(op->get_output_partial_shape(0).same_scheme(PartialShape{Dimension(), 3, 2, 2})); } TEST(type_prop, roi_pooling_incompatible_input_rank) { - const auto feat_maps = make_shared(element::Type_t::f32, Shape{1, 3, 2, 6, 6}); - const auto rois = make_shared(element::Type_t::f32, Shape{3, 5}); + const auto feat_maps = make_shared(element::f32, Shape{1, 3, 2, 6, 6}); + const auto rois = make_shared(element::f32, Shape{3, 5}); // feat_maps must be of rank 4 ASSERT_THROW(make_shared(feat_maps, rois, Shape{2, 2}, 0.625f, "max"), ngraph::NodeValidationFailure); @@ -76,8 +74,8 @@ TEST(type_prop, roi_pooling_incompatible_input_rank) TEST(type_prop, roi_pooling_incompatible_pooling_shape) { Shape pool_shape{2, 2, 2}; - const auto feat_maps = make_shared(element::Type_t::f32, Shape{3, 2, 6, 6}); - const auto rois = make_shared(element::Type_t::f32, Shape{3, 5}); + const auto feat_maps = make_shared(element::f32, Shape{3, 2, 6, 6}); + const auto rois = make_shared(element::f32, Shape{3, 5}); // pool_shape must be of rank 2 {pooled_h, pooled_w} ASSERT_THROW(make_shared(feat_maps, rois, pool_shape, 0.625f, "max"), ngraph::NodeValidationFailure); @@ -85,8 +83,8 @@ TEST(type_prop, roi_pooling_incompatible_pooling_shape) TEST(type_prop, roi_pooling_incompatible_rois_second_dim) { - const auto feat_maps = make_shared(element::Type_t::f32, Shape{3, 2, 6, 6}); - const auto rois = make_shared(element::Type_t::f32, Shape{3, 4}); + const auto feat_maps = make_shared(element::f32, Shape{3, 2, 6, 6}); + const auto rois = make_shared(element::f32, Shape{3, 4}); // the second dim of rois must be 5. [batch_id, x_1, y_1, x_2, y_2] ASSERT_THROW(make_shared(feat_maps, rois, Shape{2, 2}, 0.625f, "max"), ngraph::NodeValidationFailure); @@ -94,8 +92,8 @@ TEST(type_prop, roi_pooling_incompatible_rois_second_dim) TEST(type_prop, roi_pooling_incompatible_feature_maps_element_type) { - const auto feat_maps = make_shared(element::Type_t::i32, Shape{3, 2, 6, 6}); - const auto rois = make_shared(element::Type_t::f32, Shape{3, 5}); + const auto feat_maps = make_shared(element::i32, Shape{3, 2, 6, 6}); + const auto rois = make_shared(element::f32, Shape{3, 5}); // feat_maps element type must be floating point type ASSERT_THROW(make_shared(feat_maps, rois, Shape{2, 2}, 0.625f, "max"), ngraph::NodeValidationFailure); @@ -103,8 +101,8 @@ TEST(type_prop, roi_pooling_incompatible_feature_maps_element_type) TEST(type_prop, roi_pooling_incompatible_rois_element_type) { - const auto feat_maps = make_shared(element::Type_t::f32, Shape{3, 2, 6, 6}); - const auto rois = make_shared(element::Type_t::f16, Shape{3, 5}); + const auto feat_maps = make_shared(element::f32, Shape{3, 2, 6, 6}); + const auto rois = make_shared(element::f16, Shape{3, 5}); // rois element type must be equal to feat_maps element type (floating point type) ASSERT_THROW(make_shared(feat_maps, rois, Shape{2, 2}, 0.625f, "bilinear"), ngraph::NodeValidationFailure); @@ -112,8 +110,8 @@ TEST(type_prop, roi_pooling_incompatible_rois_element_type) TEST(type_prop, roi_pooling_invalid_pooling_method) { - const auto feat_maps = make_shared(element::Type_t::f32, Shape{3, 2, 6, 6}); - const auto rois = make_shared(element::Type_t::f16, Shape{3, 5}); + const auto feat_maps = make_shared(element::f32, Shape{3, 2, 6, 6}); + const auto rois = make_shared(element::f16, Shape{3, 5}); // ROIPooling method is invalid: not max nor bilinear ASSERT_THROW(make_shared(feat_maps, rois, Shape{2, 2}, 0.625f, "invalid"), ngraph::NodeValidationFailure); @@ -121,8 +119,8 @@ TEST(type_prop, roi_pooling_invalid_pooling_method) TEST(type_prop, roi_pooling_invalid_spatial_scale) { - const auto feat_maps = make_shared(element::Type_t::f32, Shape{3, 2, 6, 6}); - const auto rois = make_shared(element::Type_t::f16, Shape{3, 5}); + const auto feat_maps = make_shared(element::f32, Shape{3, 2, 6, 6}); + const auto rois = make_shared(element::f16, Shape{3, 5}); // ROIPooling spatial scale attribute must be a positive floating point number ASSERT_THROW(make_shared(feat_maps, rois, Shape{2, 2}, -0.625f, "max"), ngraph::NodeValidationFailure); @@ -130,8 +128,8 @@ TEST(type_prop, roi_pooling_invalid_spatial_scale) TEST(type_prop, roi_pooling_invalid_pooled_size) { - const auto feat_maps = make_shared(element::Type_t::f32, Shape{3, 2, 6, 6}); - const auto rois = make_shared(element::Type_t::f16, Shape{3, 5}); + const auto feat_maps = make_shared(element::f32, Shape{3, 2, 6, 6}); + const auto rois = make_shared(element::f16, Shape{3, 5}); // ROIPooling pooled_h and pooled_w must be non-negative integers ASSERT_THROW(make_shared(feat_maps, rois, Shape{1, 0}, 0.625f, "max"), ngraph::NodeValidationFailure); diff --git a/ngraph/test/type_prop/round.cpp b/ngraph/test/type_prop/round.cpp index dad253981a846b..dde3c7a7f01f89 100644 --- a/ngraph/test/type_prop/round.cpp +++ b/ngraph/test/type_prop/round.cpp @@ -23,60 +23,57 @@ using namespace ngraph; TEST(type_prop, rounding_to_even) { - auto data = make_shared(element::Type_t::f32, Shape{1, 3, 6}); + auto data = make_shared(element::f32, Shape{1, 3, 6}); auto round_func = make_shared(data, op::v5::Round::RoundMode::HALF_TO_EVEN); - EXPECT_EQ(round_func->get_element_type(), element::Type_t::f32); + EXPECT_EQ(round_func->get_element_type(), element::f32); EXPECT_EQ(round_func->get_shape(), (Shape{1, 3, 6})); } TEST(type_prop, rounding_away) { - auto data = make_shared(element::Type_t::f32, Shape{1, 3, 6}); + auto data = make_shared(element::f32, Shape{1, 3, 6}); auto round_func = make_shared(data, op::v5::Round::RoundMode::HALF_AWAY_FROM_ZERO); - EXPECT_EQ(round_func->get_element_type(), element::Type_t::f32); + EXPECT_EQ(round_func->get_element_type(), element::f32); EXPECT_EQ(round_func->get_shape(), (Shape{1, 3, 6})); } TEST(type_prop, rounding_to_even_partial) { - auto data = - make_shared(element::Type_t::f32, PartialShape{1, Dimension::dynamic(), 6}); + auto data = make_shared(element::f32, PartialShape{1, Dimension::dynamic(), 6}); auto round_func = make_shared(data, op::v5::Round::RoundMode::HALF_TO_EVEN); - EXPECT_EQ(round_func->get_element_type(), element::Type_t::f32); + EXPECT_EQ(round_func->get_element_type(), element::f32); ASSERT_TRUE(round_func->get_output_partial_shape(0).same_scheme( (PartialShape{1, Dimension::dynamic(), 6}))); // rank unknown auto round_partial = make_shared( - make_shared(element::Type_t::f32, PartialShape::dynamic()), + make_shared(element::f32, PartialShape::dynamic()), op::v5::Round::RoundMode::HALF_TO_EVEN); ASSERT_TRUE(round_partial->get_output_partial_shape(0).same_scheme(PartialShape::dynamic())); } TEST(type_prop, rounding_away_partial) { - auto data = - make_shared(element::Type_t::f32, PartialShape{1, Dimension::dynamic(), 6}); + auto data = make_shared(element::f32, PartialShape{1, Dimension::dynamic(), 6}); auto round_func = make_shared(data, op::v5::Round::RoundMode::HALF_AWAY_FROM_ZERO); - EXPECT_EQ(round_func->get_element_type(), element::Type_t::f32); + EXPECT_EQ(round_func->get_element_type(), element::f32); ASSERT_TRUE(round_func->get_output_partial_shape(0).same_scheme( (PartialShape{1, Dimension::dynamic(), 6}))); // rank unknown auto round_partial = make_shared( - make_shared(element::Type_t::f32, PartialShape::dynamic()), + make_shared(element::f32, PartialShape::dynamic()), op::v5::Round::RoundMode::HALF_AWAY_FROM_ZERO); ASSERT_TRUE(round_partial->get_output_partial_shape(0).same_scheme(PartialShape::dynamic())); } TEST(type_prop, rounding_to_even_partial_static_rank) { - auto data = - make_shared(element::Type_t::f32, PartialShape{1, Dimension::dynamic(), 6}); + auto data = make_shared(element::f32, PartialShape{1, Dimension::dynamic(), 6}); auto round_func = make_shared(data, op::v5::Round::RoundMode::HALF_TO_EVEN); - EXPECT_EQ(round_func->get_element_type(), element::Type_t::f32); + EXPECT_EQ(round_func->get_element_type(), element::f32); ASSERT_TRUE(round_func->get_output_partial_shape(0).same_scheme( (PartialShape{1, Dimension::dynamic(), 6}))); ASSERT_TRUE(round_func->get_output_partial_shape(0).rank().is_static()); @@ -84,11 +81,10 @@ TEST(type_prop, rounding_to_even_partial_static_rank) TEST(type_prop, rounding_away_partial_static_rank) { - auto data = - make_shared(element::Type_t::f32, PartialShape{1, Dimension::dynamic(), 6}); + auto data = make_shared(element::f32, PartialShape{1, Dimension::dynamic(), 6}); auto round_func = make_shared(data, op::v5::Round::RoundMode::HALF_AWAY_FROM_ZERO); - EXPECT_EQ(round_func->get_element_type(), element::Type_t::f32); + EXPECT_EQ(round_func->get_element_type(), element::f32); ASSERT_TRUE(round_func->get_output_partial_shape(0).same_scheme( (PartialShape{1, Dimension::dynamic(), 6}))); ASSERT_TRUE(round_func->get_output_partial_shape(0).rank().is_static()); diff --git a/ngraph/test/type_prop/scatter_elements_update.cpp b/ngraph/test/type_prop/scatter_elements_update.cpp index 02b28505ad5ed1..d1149b8e3778d1 100644 --- a/ngraph/test/type_prop/scatter_elements_update.cpp +++ b/ngraph/test/type_prop/scatter_elements_update.cpp @@ -29,10 +29,10 @@ TEST(type_prop, scatter_elements_update_output_shape) Shape axis_shape{}; Shape expected_output_shape{2, 4, 5, 7}; - auto data = make_shared(element::Type_t::f32, data_shape); - auto indices = make_shared(element::Type_t::i16, indices_shape); - auto updates = make_shared(element::Type_t::f32, updates_shape); - auto axis = make_shared(element::Type_t::i16, axis_shape); + auto data = make_shared(element::f32, data_shape); + auto indices = make_shared(element::i16, indices_shape); + auto updates = make_shared(element::f32, updates_shape); + auto axis = make_shared(element::i16, axis_shape); auto scatter = make_shared(data, indices, updates, axis); @@ -46,10 +46,10 @@ TEST(type_prop, scatter_elements_update_output_partial_dyn_shape) PartialShape updates_shape{2, 2, Dimension::dynamic()}; PartialShape axis_shape = PartialShape::dynamic(); - auto data = make_shared(element::Type_t::f32, data_shape); - auto indices = make_shared(element::Type_t::i16, indices_shape); - auto updates = make_shared(element::Type_t::f32, updates_shape); - auto axis = make_shared(element::Type_t::i16, axis_shape); + auto data = make_shared(element::f32, data_shape); + auto indices = make_shared(element::i16, indices_shape); + auto updates = make_shared(element::f32, updates_shape); + auto axis = make_shared(element::i16, axis_shape); auto scatter = make_shared(data, indices, updates, axis); @@ -63,10 +63,10 @@ TEST(type_prop, scatter_elements_update_output_full_dyn_shape) PartialShape updates_shape = PartialShape::dynamic(); PartialShape axis_shape = PartialShape::dynamic(); - auto data = make_shared(element::Type_t::f32, data_shape); - auto indices = make_shared(element::Type_t::i16, indices_shape); - auto updates = make_shared(element::Type_t::f32, updates_shape); - auto axis = make_shared(element::Type_t::i16, axis_shape); + auto data = make_shared(element::f32, data_shape); + auto indices = make_shared(element::i16, indices_shape); + auto updates = make_shared(element::f32, updates_shape); + auto axis = make_shared(element::i16, axis_shape); auto scatter = make_shared(data, indices, updates, axis); @@ -80,10 +80,10 @@ TEST(type_prop, scatter_elements_update_axis_validation) Shape updates_shape{2, 2, 2, 2}; Shape axis_shape{}; - auto data = make_shared(element::Type_t::f32, data_shape); - auto indices = make_shared(element::Type_t::i16, indices_shape); - auto updates = make_shared(element::Type_t::f32, updates_shape); - auto axis = make_shared(element::Type_t::i16, axis_shape, std::vector{8}); + auto data = make_shared(element::f32, data_shape); + auto indices = make_shared(element::i16, indices_shape); + auto updates = make_shared(element::f32, updates_shape); + auto axis = make_shared(element::i16, axis_shape, std::vector{8}); try { @@ -107,10 +107,10 @@ TEST(type_prop, scatter_elements_updates_indices_shape) Shape updates_shape{2, 2, 2, 2}; Shape axis_shape{}; - auto data = make_shared(element::Type_t::f32, data_shape); - auto indices = make_shared(element::Type_t::i16, indices_shape); - auto updates = make_shared(element::Type_t::f32, updates_shape); - auto axis = make_shared(element::Type_t::i16, axis_shape, std::vector{1}); + auto data = make_shared(element::f32, data_shape); + auto indices = make_shared(element::i16, indices_shape); + auto updates = make_shared(element::f32, updates_shape); + auto axis = make_shared(element::i16, axis_shape, std::vector{1}); try { @@ -135,10 +135,10 @@ TEST(type_prop, scatter_elements_updates_indices_rank) Shape updates_shape{2, 2, 2, 2}; Shape axis_shape{}; - auto data = make_shared(element::Type_t::f32, data_shape); - auto indices = make_shared(element::Type_t::i16, indices_shape); - auto updates = make_shared(element::Type_t::f32, updates_shape); - auto axis = make_shared(element::Type_t::i16, axis_shape, std::vector{1}); + auto data = make_shared(element::f32, data_shape); + auto indices = make_shared(element::i16, indices_shape); + auto updates = make_shared(element::f32, updates_shape); + auto axis = make_shared(element::i16, axis_shape, std::vector{1}); try { @@ -163,10 +163,10 @@ TEST(type_prop, scatter_elements_data_indices_rank) Shape updates_shape{2, 2}; Shape axis_shape{}; - auto data = make_shared(element::Type_t::f32, data_shape); - auto indices = make_shared(element::Type_t::i16, indices_shape); - auto updates = make_shared(element::Type_t::f32, updates_shape); - auto axis = make_shared(element::Type_t::i16, axis_shape, std::vector{1}); + auto data = make_shared(element::f32, data_shape); + auto indices = make_shared(element::i16, indices_shape); + auto updates = make_shared(element::f32, updates_shape); + auto axis = make_shared(element::i16, axis_shape, std::vector{1}); try { diff --git a/ngraph/test/type_prop/scatter_nd_update.cpp b/ngraph/test/type_prop/scatter_nd_update.cpp index a00baaa2610470..06010fcb3787fc 100644 --- a/ngraph/test/type_prop/scatter_nd_update.cpp +++ b/ngraph/test/type_prop/scatter_nd_update.cpp @@ -26,9 +26,9 @@ TEST(type_prop, scatter_nd_update_v3_fail_indices_element_type) Shape ref_shape{2, 3, 4}; Shape indices_shape{2, 1}; Shape updates_shape{2, 2, 1, 4}; - auto R = make_shared(element::Type_t::f32, ref_shape); - auto I = make_shared(element::Type_t::f16, indices_shape); - auto U = make_shared(element::Type_t::f32, updates_shape); + auto R = make_shared(element::f32, ref_shape); + auto I = make_shared(element::f16, indices_shape); + auto U = make_shared(element::f32, updates_shape); try { auto G = make_shared(R, I, U); @@ -51,9 +51,9 @@ TEST(type_prop, scatter_nd_update_v3_fail_updates_rank) Shape indices_shape{1}; Shape updates_shape{3, 3, 3}; Shape out_shape{3, 3, 3}; - auto R = make_shared(element::Type_t::f32, ref_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); - auto U = make_shared(element::Type_t::f32, updates_shape); + auto R = make_shared(element::f32, ref_shape); + auto I = make_shared(element::i32, indices_shape); + auto U = make_shared(element::f32, updates_shape); try { auto G = make_shared(R, I, U); @@ -78,9 +78,9 @@ TEST(type_prop, scatter_nd_update_fail_updates_element_type) Shape indices_shape{1}; Shape updates_shape{3, 3}; Shape out_shape{3, 3, 3}; - auto R = make_shared(element::Type_t::f32, ref_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); - auto U = make_shared(element::Type_t::i32, updates_shape); + auto R = make_shared(element::f32, ref_shape); + auto I = make_shared(element::i32, indices_shape); + auto U = make_shared(element::i32, updates_shape); try { auto G = make_shared(R, I, U); @@ -104,9 +104,9 @@ TEST(type_prop, scatter_nd_update_fail_updates_shape) Shape indices_shape{1}; Shape updates_shape{2, 3}; Shape out_shape{3, 3, 3}; - auto R = make_shared(element::Type_t::f32, ref_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); - auto U = make_shared(element::Type_t::f32, updates_shape); + auto R = make_shared(element::f32, ref_shape); + auto I = make_shared(element::i32, indices_shape); + auto U = make_shared(element::f32, updates_shape); try { auto G = make_shared(R, I, U); @@ -132,9 +132,9 @@ TEST(type_prop, scatter_nd_update_fail_indices_last_dim) Shape indices_shape{2, 4}; Shape updates_shape{2, 3, 3}; Shape out_shape{3, 3, 3}; - auto R = make_shared(element::Type_t::f32, ref_shape); - auto I = make_shared(element::Type_t::i32, indices_shape); - auto U = make_shared(element::Type_t::f32, updates_shape); + auto R = make_shared(element::f32, ref_shape); + auto I = make_shared(element::i32, indices_shape); + auto U = make_shared(element::f32, updates_shape); try { auto G = make_shared(R, I, U); diff --git a/ngraph/test/type_prop/scatter_update.cpp b/ngraph/test/type_prop/scatter_update.cpp index 3135ab79b38b40..4f113b22988427 100644 --- a/ngraph/test/type_prop/scatter_update.cpp +++ b/ngraph/test/type_prop/scatter_update.cpp @@ -26,10 +26,10 @@ TEST(type_prop, scatter_update_v3_fail_indices_element_type) Shape ref_shape{2, 3, 4}; Shape indices_shape{2, 1}; Shape updates_shape{2, 2, 1, 4}; - auto R = make_shared(element::Type_t::f32, ref_shape); - auto I = make_shared(element::Type_t::f16, indices_shape); - auto U = make_shared(element::Type_t::f32, updates_shape); - auto A = op::Constant::create(element::Type_t::i64, Shape{}, {1}); + auto R = make_shared(element::f32, ref_shape); + auto I = make_shared(element::f16, indices_shape); + auto U = make_shared(element::f32, updates_shape); + auto A = op::Constant::create(element::i64, Shape{}, {1}); try { auto G = make_shared(R, I, U, A); @@ -52,10 +52,10 @@ TEST(type_prop, scatter_update_v3_fail_updates_data_et_not_equal) Shape ref_shape{2, 3, 4}; Shape indices_shape{2, 1}; Shape updates_shape{2, 2, 1, 4}; - auto R = make_shared(element::Type_t::f32, ref_shape); - auto I = make_shared(element::Type_t::i16, indices_shape); - auto U = make_shared(element::Type_t::u32, updates_shape); - auto A = op::Constant::create(element::Type_t::u32, Shape{1}, {1}); + auto R = make_shared(element::f32, ref_shape); + auto I = make_shared(element::i16, indices_shape); + auto U = make_shared(element::u32, updates_shape); + auto A = op::Constant::create(element::u32, Shape{1}, {1}); try { auto G = make_shared(R, I, U, A); @@ -78,10 +78,10 @@ TEST(type_prop, scatter_update_v3_fail_axis_element_type) Shape ref_shape{2, 3, 4}; Shape indices_shape{2, 1}; Shape updates_shape{2, 2, 1, 4}; - auto R = make_shared(element::Type_t::i16, ref_shape); - auto I = make_shared(element::Type_t::u64, indices_shape); - auto U = make_shared(element::Type_t::i16, updates_shape); - auto A = op::Constant::create(element::Type_t::f32, Shape{1}, {1.5f}); + auto R = make_shared(element::i16, ref_shape); + auto I = make_shared(element::u64, indices_shape); + auto U = make_shared(element::i16, updates_shape); + auto A = op::Constant::create(element::f32, Shape{1}, {1.5f}); try { auto G = make_shared(R, I, U, A); @@ -104,10 +104,10 @@ TEST(type_prop, scatter_update_v3_fail_axis_shape) Shape ref_shape{2, 3, 4}; Shape indices_shape{2, 1}; Shape updates_shape{2, 2, 1, 4}; - auto R = make_shared(element::Type_t::u8, ref_shape); - auto I = make_shared(element::Type_t::u16, indices_shape); - auto U = make_shared(element::Type_t::u8, updates_shape); - auto A = op::Constant::create(element::Type_t::u8, Shape{2}, {1, 5}); + auto R = make_shared(element::u8, ref_shape); + auto I = make_shared(element::u16, indices_shape); + auto U = make_shared(element::u8, updates_shape); + auto A = op::Constant::create(element::u8, Shape{2}, {1, 5}); try { auto G = make_shared(R, I, U, A); @@ -130,10 +130,10 @@ TEST(type_prop, scatter_update_v3_fail_updates_rank) Shape ref_shape{2, 3, 4}; Shape indices_shape{2, 1}; Shape updates_shape{2, 1, 4}; - auto R = make_shared(element::Type_t::f64, ref_shape); - auto I = make_shared(element::Type_t::i16, indices_shape); - auto U = make_shared(element::Type_t::f64, updates_shape); - auto A = op::Constant::create(element::Type_t::u8, Shape{}, {0}); + auto R = make_shared(element::f64, ref_shape); + auto I = make_shared(element::i16, indices_shape); + auto U = make_shared(element::f64, updates_shape); + auto A = op::Constant::create(element::u8, Shape{}, {0}); try { auto G = make_shared(R, I, U, A); @@ -157,10 +157,10 @@ TEST(type_prop, scatter_update_v3_fail_updates_shape_axis) Shape ref_shape{2, 3, 4}; Shape indices_shape{2, 1}; Shape updates_shape{2, 2, 1, 4}; - auto R = make_shared(element::Type_t::u64, ref_shape); - auto I = make_shared(element::Type_t::i16, indices_shape); - auto U = make_shared(element::Type_t::u64, updates_shape); - auto A = op::Constant::create(element::Type_t::u16, Shape{}, {0}); + auto R = make_shared(element::u64, ref_shape); + auto I = make_shared(element::i16, indices_shape); + auto U = make_shared(element::u64, updates_shape); + auto A = op::Constant::create(element::u16, Shape{}, {0}); try { auto G = make_shared(R, I, U, A); @@ -185,10 +185,10 @@ TEST(type_prop, scatter_update_v3_fail_updates_shape_indices) Shape ref_shape{2, 3, 4}; Shape indices_shape{2, 1}; Shape updates_shape{2, 3, 1, 4}; - auto R = make_shared(element::Type_t::u32, ref_shape); - auto I = make_shared(element::Type_t::i16, indices_shape); - auto U = make_shared(element::Type_t::u32, updates_shape); - auto A = op::Constant::create(element::Type_t::i32, Shape{}, {1}); + auto R = make_shared(element::u32, ref_shape); + auto I = make_shared(element::i16, indices_shape); + auto U = make_shared(element::u32, updates_shape); + auto A = op::Constant::create(element::i32, Shape{}, {1}); try { auto G = make_shared(R, I, U, A); @@ -213,10 +213,10 @@ TEST(type_prop, scatter_update_v3_fail_updates_shape_data_before_axis) Shape ref_shape{2, 3, 4}; Shape indices_shape{2, 1}; Shape updates_shape{3, 2, 1, 4}; - auto R = make_shared(element::Type_t::u16, ref_shape); - auto I = make_shared(element::Type_t::i16, indices_shape); - auto U = make_shared(element::Type_t::u16, updates_shape); - auto A = op::Constant::create(element::Type_t::i8, Shape{}, {1}); + auto R = make_shared(element::u16, ref_shape); + auto I = make_shared(element::i16, indices_shape); + auto U = make_shared(element::u16, updates_shape); + auto A = op::Constant::create(element::i8, Shape{}, {1}); try { auto G = make_shared(R, I, U, A); @@ -241,10 +241,10 @@ TEST(type_prop, scatter_update_v3_fail_updates_shape_data_after_axis) Shape ref_shape{2, 3, 4}; Shape indices_shape{2, 1}; Shape updates_shape{2, 2, 1, 5}; - auto R = make_shared(element::Type_t::i8, ref_shape); - auto I = make_shared(element::Type_t::i16, indices_shape); - auto U = make_shared(element::Type_t::i8, updates_shape); - auto A = op::Constant::create(element::Type_t::i16, Shape{}, {1}); + auto R = make_shared(element::i8, ref_shape); + auto I = make_shared(element::i16, indices_shape); + auto U = make_shared(element::i8, updates_shape); + auto A = op::Constant::create(element::i16, Shape{}, {1}); try { auto G = make_shared(R, I, U, A); @@ -269,13 +269,13 @@ TEST(type_prop, scatter_update_v3) Shape ref_shape{2, 3, 4}; Shape indices_shape{2, 1}; Shape updates_shape{2, 2, 1, 4}; - auto R = make_shared(element::Type_t::i8, ref_shape); - auto I = make_shared(element::Type_t::i16, indices_shape); - auto U = make_shared(element::Type_t::i8, updates_shape); - auto A = op::Constant::create(element::Type_t::i16, Shape{}, {1}); + auto R = make_shared(element::i8, ref_shape); + auto I = make_shared(element::i16, indices_shape); + auto U = make_shared(element::i8, updates_shape); + auto A = op::Constant::create(element::i16, Shape{}, {1}); auto scatter_update = make_shared(R, I, U, A); - EXPECT_EQ(scatter_update->get_output_element_type(0), element::Type_t::i8); + EXPECT_EQ(scatter_update->get_output_element_type(0), element::i8); EXPECT_EQ(scatter_update->get_output_shape(0), ref_shape); } @@ -284,12 +284,12 @@ TEST(type_prop, scatter_update_v3_dynamic_data_shape) PartialShape ref_shape = PartialShape::dynamic(); Shape indices_shape{2, 1}; Shape updates_shape{2, 2, 1, 4}; - auto R = make_shared(element::Type_t::i8, ref_shape); - auto I = make_shared(element::Type_t::i16, indices_shape); - auto U = make_shared(element::Type_t::i8, updates_shape); - auto A = op::Constant::create(element::Type_t::i16, Shape{}, {1}); + auto R = make_shared(element::i8, ref_shape); + auto I = make_shared(element::i16, indices_shape); + auto U = make_shared(element::i8, updates_shape); + auto A = op::Constant::create(element::i16, Shape{}, {1}); auto scatter_update = make_shared(R, I, U, A); - EXPECT_EQ(scatter_update->get_output_element_type(0), element::Type_t::i8); + EXPECT_EQ(scatter_update->get_output_element_type(0), element::i8); EXPECT_TRUE(scatter_update->get_output_partial_shape(0).is_dynamic()); } diff --git a/ngraph/test/type_prop/select.cpp b/ngraph/test/type_prop/select.cpp index 0b9c4f46f70659..8e1dd8eddc4b26 100644 --- a/ngraph/test/type_prop/select.cpp +++ b/ngraph/test/type_prop/select.cpp @@ -25,19 +25,19 @@ using namespace ngraph; TEST(type_prop, select_deduce) { - auto tv0_2_4_param_0 = make_shared(element::Type_t::boolean, Shape{2, 4}); - auto tv0_2_4_param_1 = make_shared(element::Type_t::f32, Shape{2, 4}); - auto tv0_2_4_param_2 = make_shared(element::Type_t::f32, Shape{2, 4}); + auto tv0_2_4_param_0 = make_shared(element::boolean, Shape{2, 4}); + auto tv0_2_4_param_1 = make_shared(element::f32, Shape{2, 4}); + auto tv0_2_4_param_2 = make_shared(element::f32, Shape{2, 4}); auto bc = make_shared(tv0_2_4_param_0, tv0_2_4_param_1, tv0_2_4_param_2); - ASSERT_EQ(bc->get_element_type(), element::Type_t::f32); + ASSERT_EQ(bc->get_element_type(), element::f32); ASSERT_EQ(bc->get_shape(), (Shape{2, 4})); } TEST(type_prop, select_shape_mismatch_a) { - auto tv0_2_4_param_0 = make_shared(element::Type_t::boolean, Shape{3, 5}); - auto tv0_2_4_param_1 = make_shared(element::Type_t::f32, Shape{2, 4}); - auto tv0_2_4_param_2 = make_shared(element::Type_t::f32, Shape{2, 4}); + auto tv0_2_4_param_0 = make_shared(element::boolean, Shape{3, 5}); + auto tv0_2_4_param_1 = make_shared(element::f32, Shape{2, 4}); + auto tv0_2_4_param_2 = make_shared(element::f32, Shape{2, 4}); try { auto bc = make_shared(tv0_2_4_param_0, tv0_2_4_param_1, tv0_2_4_param_2); @@ -56,9 +56,9 @@ TEST(type_prop, select_shape_mismatch_a) TEST(type_prop, select_shape_mismatch_b) { - auto tv0_2_4_param_0 = make_shared(element::Type_t::boolean, Shape{2, 4}); - auto tv0_2_4_param_1 = make_shared(element::Type_t::f32, Shape{3, 5}); - auto tv0_2_4_param_2 = make_shared(element::Type_t::f32, Shape{2, 4}); + auto tv0_2_4_param_0 = make_shared(element::boolean, Shape{2, 4}); + auto tv0_2_4_param_1 = make_shared(element::f32, Shape{3, 5}); + auto tv0_2_4_param_2 = make_shared(element::f32, Shape{2, 4}); try { auto bc = make_shared(tv0_2_4_param_0, tv0_2_4_param_1, tv0_2_4_param_2); @@ -77,9 +77,9 @@ TEST(type_prop, select_shape_mismatch_b) TEST(type_prop, select_shape_mismatch_c) { - auto tv0_2_4_param_0 = make_shared(element::Type_t::boolean, Shape{2, 4}); - auto tv0_2_4_param_1 = make_shared(element::Type_t::f32, Shape{2, 4}); - auto tv0_2_4_param_2 = make_shared(element::Type_t::f32, Shape{3, 5}); + auto tv0_2_4_param_0 = make_shared(element::boolean, Shape{2, 4}); + auto tv0_2_4_param_1 = make_shared(element::f32, Shape{2, 4}); + auto tv0_2_4_param_2 = make_shared(element::f32, Shape{3, 5}); try { auto bc = make_shared(tv0_2_4_param_0, tv0_2_4_param_1, tv0_2_4_param_2); @@ -98,9 +98,9 @@ TEST(type_prop, select_shape_mismatch_c) TEST(type_prop, select_elem_mismatch_a) { - auto tv0_2_4_param_0 = make_shared(element::Type_t::f32, Shape{2, 4}); - auto tv0_2_4_param_1 = make_shared(element::Type_t::f32, Shape{2, 4}); - auto tv0_2_4_param_2 = make_shared(element::Type_t::f32, Shape{2, 4}); + auto tv0_2_4_param_0 = make_shared(element::f32, Shape{2, 4}); + auto tv0_2_4_param_1 = make_shared(element::f32, Shape{2, 4}); + auto tv0_2_4_param_2 = make_shared(element::f32, Shape{2, 4}); try { auto bc = make_shared(tv0_2_4_param_0, tv0_2_4_param_1, tv0_2_4_param_2); @@ -120,9 +120,9 @@ TEST(type_prop, select_elem_mismatch_a) TEST(type_prop, select_elem_mismatch_bc) { - auto tv0_2_4_param_0 = make_shared(element::Type_t::boolean, Shape{2, 4}); - auto tv0_2_4_param_1 = make_shared(element::Type_t::f32, Shape{2, 4}); - auto tv0_2_4_param_2 = make_shared(element::Type_t::i32, Shape{2, 4}); + auto tv0_2_4_param_0 = make_shared(element::boolean, Shape{2, 4}); + auto tv0_2_4_param_1 = make_shared(element::f32, Shape{2, 4}); + auto tv0_2_4_param_2 = make_shared(element::i32, Shape{2, 4}); try { auto bc = make_shared(tv0_2_4_param_0, tv0_2_4_param_1, tv0_2_4_param_2); @@ -142,21 +142,21 @@ TEST(type_prop, select_elem_mismatch_bc) TEST(type_prop, select_partial_all_rank_dynamic) { - auto param0 = make_shared(element::Type_t::boolean, PartialShape::dynamic()); - auto param1 = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto param2 = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto param0 = make_shared(element::boolean, PartialShape::dynamic()); + auto param1 = make_shared(element::f32, PartialShape::dynamic()); + auto param2 = make_shared(element::f32, PartialShape::dynamic()); auto sel = make_shared(param0, param1, param2); - ASSERT_EQ(sel->get_output_element_type(0), element::Type_t::f32); + ASSERT_EQ(sel->get_output_element_type(0), element::f32); ASSERT_TRUE(sel->get_output_partial_shape(0).rank().is_dynamic()); } TEST(type_prop, select_partial_all_rank_dynamic_arg0_et_dynamic_arg1_arg2_et_mismatch) { - auto param0 = make_shared(element::Type_t::dynamic, PartialShape::dynamic()); - auto param1 = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto param2 = make_shared(element::Type_t::i32, PartialShape::dynamic()); + auto param0 = make_shared(element::dynamic, PartialShape::dynamic()); + auto param1 = make_shared(element::f32, PartialShape::dynamic()); + auto param2 = make_shared(element::i32, PartialShape::dynamic()); try { @@ -177,52 +177,52 @@ TEST(type_prop, select_partial_all_rank_dynamic_arg0_et_dynamic_arg1_arg2_et_mis TEST(type_prop, select_partial_all_rank_dynamic_arg0_arg1_et_dynamic) { - auto param0 = make_shared(element::Type_t::dynamic, PartialShape::dynamic()); - auto param1 = make_shared(element::Type_t::dynamic, PartialShape::dynamic()); - auto param2 = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto param0 = make_shared(element::dynamic, PartialShape::dynamic()); + auto param1 = make_shared(element::dynamic, PartialShape::dynamic()); + auto param2 = make_shared(element::f32, PartialShape::dynamic()); auto sel = make_shared(param0, param1, param2); - ASSERT_EQ(sel->get_output_element_type(0), element::Type_t::f32); + ASSERT_EQ(sel->get_output_element_type(0), element::f32); ASSERT_TRUE(sel->get_output_partial_shape(0).rank().is_dynamic()); } TEST(type_prop, select_partial_all_rank_dynamic_arg0_arg2_et_dynamic) { - auto param0 = make_shared(element::Type_t::dynamic, PartialShape::dynamic()); - auto param1 = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto param2 = make_shared(element::Type_t::dynamic, PartialShape::dynamic()); + auto param0 = make_shared(element::dynamic, PartialShape::dynamic()); + auto param1 = make_shared(element::f32, PartialShape::dynamic()); + auto param2 = make_shared(element::dynamic, PartialShape::dynamic()); auto sel = make_shared(param0, param1, param2); - ASSERT_EQ(sel->get_output_element_type(0), element::Type_t::f32); + ASSERT_EQ(sel->get_output_element_type(0), element::f32); ASSERT_TRUE(sel->get_output_partial_shape(0).rank().is_dynamic()); } TEST(type_prop, select_partial_all_rank_dynamic_arg0_arg1_arg2_et_dynamic) { - auto param0 = make_shared(element::Type_t::dynamic, PartialShape::dynamic()); - auto param1 = make_shared(element::Type_t::dynamic, PartialShape::dynamic()); - auto param2 = make_shared(element::Type_t::dynamic, PartialShape::dynamic()); + auto param0 = make_shared(element::dynamic, PartialShape::dynamic()); + auto param1 = make_shared(element::dynamic, PartialShape::dynamic()); + auto param2 = make_shared(element::dynamic, PartialShape::dynamic()); auto sel = make_shared(param0, param1, param2); - ASSERT_EQ(sel->get_output_element_type(0), element::Type_t::dynamic); + ASSERT_EQ(sel->get_output_element_type(0), element::dynamic); ASSERT_TRUE(sel->get_output_partial_shape(0).rank().is_dynamic()); } TEST(type_prop, select_partial_all_rank_static_dynamic_ok) { auto param0 = make_shared( - element::Type_t::boolean, PartialShape{2, Dimension::dynamic(), Dimension::dynamic()}); + element::boolean, PartialShape{2, Dimension::dynamic(), Dimension::dynamic()}); auto param1 = make_shared( - element::Type_t::f32, PartialShape{Dimension::dynamic(), 8, Dimension::dynamic()}); + element::f32, PartialShape{Dimension::dynamic(), 8, Dimension::dynamic()}); auto param2 = make_shared( - element::Type_t::f32, PartialShape{Dimension::dynamic(), Dimension::dynamic(), 3}); + element::f32, PartialShape{Dimension::dynamic(), Dimension::dynamic(), 3}); auto sel = make_shared(param0, param1, param2); - ASSERT_EQ(sel->get_output_element_type(0), element::Type_t::f32); + ASSERT_EQ(sel->get_output_element_type(0), element::f32); ASSERT_TRUE(sel->get_output_partial_shape(0).is_static()); ASSERT_EQ(sel->get_output_shape(0), (Shape{2, 8, 3})); } @@ -230,11 +230,11 @@ TEST(type_prop, select_partial_all_rank_static_dynamic_ok) TEST(type_prop, select_partial_all_rank_static_intransitive_incompatibility) { auto param0 = make_shared( - element::Type_t::boolean, PartialShape{2, Dimension::dynamic(), Dimension::dynamic()}); + element::boolean, PartialShape{2, Dimension::dynamic(), Dimension::dynamic()}); auto param1 = make_shared( - element::Type_t::f32, PartialShape{Dimension::dynamic(), 8, Dimension::dynamic()}); + element::f32, PartialShape{Dimension::dynamic(), 8, Dimension::dynamic()}); auto param2 = - make_shared(element::Type_t::f32, PartialShape{3, Dimension::dynamic(), 3}); + make_shared(element::f32, PartialShape{3, Dimension::dynamic(), 3}); try { @@ -289,71 +289,43 @@ TEST_P(DeduceV1SelectTest, output_shape) INSTANTIATE_TEST_CASE_P( type_prop, DeduceV1SelectTest, - ::testing::Values( - SelectParams({{2, 4}, {2, 4}, {2, 4}, {2, 4}}, - {element::Type_t::boolean, - element::Type_t::f32, - element::Type_t::f32, - element::Type_t::f32}, - op::AutoBroadcastType::NONE), - SelectParams({{2, 4}, {2, 4}, {2, 4}, {2, 4}}, - {element::Type_t::boolean, - element::Type_t::f32, - element::Type_t::f32, - element::Type_t::f32}, - op::AutoBroadcastType::NUMPY), - SelectParams({{}, {2, 4}, {2, 4}, {2, 4}}, - {element::Type_t::boolean, - element::Type_t::f32, - element::Type_t::f32, - element::Type_t::f32}, - op::AutoBroadcastType::NUMPY), - SelectParams({{}, {4}, {2, 4}, {2, 4}}, - {element::Type_t::boolean, - element::Type_t::f32, - element::Type_t::dynamic, - element::Type_t::f32}, - op::AutoBroadcastType::NUMPY), - SelectParams({{}, {2, 4}, {4}, {2, 4}}, - {element::Type_t::boolean, - element::Type_t::f32, - element::Type_t::f32, - element::Type_t::f32}, - op::AutoBroadcastType::NUMPY), - SelectParams({{4}, {2, 4}, {4}, {2, 4}}, - {element::Type_t::boolean, - element::Type_t::i8, - element::Type_t::dynamic, - element::Type_t::i8}, - op::AutoBroadcastType::NUMPY), - SelectParams({{4}, {4}, {2, 4}, {2, 4}}, - {element::Type_t::dynamic, - element::Type_t::dynamic, - element::Type_t::i8, - element::Type_t::i8}, - op::AutoBroadcastType::NUMPY), - SelectParams({{2}, {2}, {2, 4}, {2, 4}}, - {element::Type_t::boolean, - element::Type_t::f32, - element::Type_t::dynamic, - element::Type_t::f32}, - {op::AutoBroadcastType::PDPD, 0}), - // TODO: Whats the right behavior here? - // SelectParams({{2}, {2, 4}, {2}, {2, 4}}, {element::Type_t::boolean, element::Type_t::f32, - // element::Type_t::dynamic, element::Type_t::f32}, {op::AutoBroadcastType::PDPD, 0}), - SelectParams({{4}, {4}, {2, 4}, {2, 4}}, - {element::Type_t::boolean, - element::Type_t::f32, - element::Type_t::dynamic, - element::Type_t::f32}, - {op::AutoBroadcastType::PDPD, 1})), + ::testing::Values(SelectParams({{2, 4}, {2, 4}, {2, 4}, {2, 4}}, + {element::boolean, element::f32, element::f32, element::f32}, + op::AutoBroadcastType::NONE), + SelectParams({{2, 4}, {2, 4}, {2, 4}, {2, 4}}, + {element::boolean, element::f32, element::f32, element::f32}, + op::AutoBroadcastType::NUMPY), + SelectParams({{}, {2, 4}, {2, 4}, {2, 4}}, + {element::boolean, element::f32, element::f32, element::f32}, + op::AutoBroadcastType::NUMPY), + SelectParams({{}, {4}, {2, 4}, {2, 4}}, + {element::boolean, element::f32, element::dynamic, element::f32}, + op::AutoBroadcastType::NUMPY), + SelectParams({{}, {2, 4}, {4}, {2, 4}}, + {element::boolean, element::f32, element::f32, element::f32}, + op::AutoBroadcastType::NUMPY), + SelectParams({{4}, {2, 4}, {4}, {2, 4}}, + {element::boolean, element::i8, element::dynamic, element::i8}, + op::AutoBroadcastType::NUMPY), + SelectParams({{4}, {4}, {2, 4}, {2, 4}}, + {element::dynamic, element::dynamic, element::i8, element::i8}, + op::AutoBroadcastType::NUMPY), + SelectParams({{2}, {2}, {2, 4}, {2, 4}}, + {element::boolean, element::f32, element::dynamic, element::f32}, + {op::AutoBroadcastType::PDPD, 0}), + // TODO: Whats the right behavior here? + // SelectParams({{2}, {2, 4}, {2}, {2, 4}}, {element::boolean, element::f32, + // element::dynamic, element::f32}, {op::AutoBroadcastType::PDPD, 0}), + SelectParams({{4}, {4}, {2, 4}, {2, 4}}, + {element::boolean, element::f32, element::dynamic, element::f32}, + {op::AutoBroadcastType::PDPD, 1})), PrintToDummyParamName()); TEST(type_prop, select_v1_partial_shape) { - auto a = make_shared(element::Type_t::boolean, PartialShape::dynamic()); - auto b = make_shared(element::Type_t::f32, Shape{2, 4}); - auto c = make_shared(element::Type_t::f32, Shape{2, 4}); + auto a = make_shared(element::boolean, PartialShape::dynamic()); + auto b = make_shared(element::f32, Shape{2, 4}); + auto c = make_shared(element::f32, Shape{2, 4}); auto select = make_shared(a, b, c, op::AutoBroadcastType::NONE); ASSERT_EQ(select->get_shape(), (Shape{2, 4})); @@ -361,11 +333,9 @@ TEST(type_prop, select_v1_partial_shape) TEST(type_prop, select_v1_partial_shape_autob) { - auto a = - make_shared(element::Type_t::boolean, PartialShape{Dimension::dynamic()}); - auto b = make_shared(element::Type_t::f32, PartialShape{Dimension::dynamic()}); - auto c = - make_shared(element::Type_t::f32, PartialShape{2, Dimension::dynamic()}); + auto a = make_shared(element::boolean, PartialShape{Dimension::dynamic()}); + auto b = make_shared(element::f32, PartialShape{Dimension::dynamic()}); + auto c = make_shared(element::f32, PartialShape{2, Dimension::dynamic()}); auto select = make_shared(a, b, c); ASSERT_TRUE( @@ -374,9 +344,9 @@ TEST(type_prop, select_v1_partial_shape_autob) TEST(type_prop, select_v1_wrong_et) { - auto param0 = make_shared(element::Type_t::i8, Shape{2, 4}); - auto param1 = make_shared(element::Type_t::f32, Shape{2, 4}); - auto param2 = make_shared(element::Type_t::f32, Shape{2, 4}); + auto param0 = make_shared(element::i8, Shape{2, 4}); + auto param1 = make_shared(element::f32, Shape{2, 4}); + auto param2 = make_shared(element::f32, Shape{2, 4}); try { @@ -396,9 +366,9 @@ TEST(type_prop, select_v1_wrong_et) TEST(type_prop, select_v1_et_mismatch) { - auto param0 = make_shared(element::Type_t::boolean, Shape{2, 4}); - auto param1 = make_shared(element::Type_t::f32, Shape{2, 4}); - auto param2 = make_shared(element::Type_t::i8, Shape{2, 4}); + auto param0 = make_shared(element::boolean, Shape{2, 4}); + auto param1 = make_shared(element::f32, Shape{2, 4}); + auto param2 = make_shared(element::i8, Shape{2, 4}); try { @@ -418,9 +388,9 @@ TEST(type_prop, select_v1_et_mismatch) TEST(type_prop, select_v1_shape_mismatch) { - auto param0 = make_shared(element::Type_t::boolean, Shape{2, 4}); - auto param1 = make_shared(element::Type_t::f32, Shape{2, 3}); - auto param2 = make_shared(element::Type_t::f32, Shape{2, 4}); + auto param0 = make_shared(element::boolean, Shape{2, 4}); + auto param1 = make_shared(element::f32, Shape{2, 3}); + auto param2 = make_shared(element::f32, Shape{2, 4}); try { @@ -440,10 +410,9 @@ TEST(type_prop, select_v1_shape_mismatch) TEST(type_prop, select_v1_partial_shape_mismatch) { auto param0 = - make_shared(element::Type_t::boolean, PartialShape{3, Dimension::dynamic()}); - auto param1 = - make_shared(element::Type_t::f32, PartialShape{2, Dimension::dynamic()}); - auto param2 = make_shared(element::Type_t::f32, Shape{2, 4}); + make_shared(element::boolean, PartialShape{3, Dimension::dynamic()}); + auto param1 = make_shared(element::f32, PartialShape{2, Dimension::dynamic()}); + auto param2 = make_shared(element::f32, Shape{2, 4}); try { diff --git a/ngraph/test/type_prop/shape_of.cpp b/ngraph/test/type_prop/shape_of.cpp index 9ea09f6cc28c56..812b9771a22312 100644 --- a/ngraph/test/type_prop/shape_of.cpp +++ b/ngraph/test/type_prop/shape_of.cpp @@ -23,85 +23,85 @@ using namespace ngraph; TEST(type_prop, shape_of_v0) { - auto a = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); + auto a = make_shared(element::f32, Shape{1, 2, 3, 4}); auto so = make_shared(a); - ASSERT_EQ(so->get_output_element_type(0), element::Type_t::i64); + ASSERT_EQ(so->get_output_element_type(0), element::i64); ASSERT_EQ(so->get_shape(), Shape{4}); } TEST(type_prop, shape_of_partial_et_dynamic_v0) { - auto a = make_shared(element::Type_t::dynamic, Shape{1, 2, 3, 4}); + auto a = make_shared(element::dynamic, Shape{1, 2, 3, 4}); auto so = make_shared(a); - ASSERT_EQ(so->get_output_element_type(0), element::Type_t::i64); + ASSERT_EQ(so->get_output_element_type(0), element::i64); ASSERT_EQ(so->get_shape(), Shape{4}); } TEST(type_prop, shape_of_partial_rank_static_dynamic_v0) { auto a = make_shared( - element::Type_t::f32, PartialShape{1, Dimension::dynamic(), Dimension::dynamic(), 4}); + element::f32, PartialShape{1, Dimension::dynamic(), Dimension::dynamic(), 4}); auto so = make_shared(a); - ASSERT_EQ(so->get_output_element_type(0), element::Type_t::i64); + ASSERT_EQ(so->get_output_element_type(0), element::i64); ASSERT_EQ(so->get_shape(), Shape{4}); } TEST(type_prop, shape_of_partial_rank_dynamic_v0) { - auto a = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto a = make_shared(element::f32, PartialShape::dynamic()); auto so = make_shared(a); - ASSERT_EQ(so->get_output_element_type(0), element::Type_t::i64); + ASSERT_EQ(so->get_output_element_type(0), element::i64); ASSERT_TRUE(so->get_output_partial_shape(0).same_scheme(PartialShape::dynamic(1))); } TEST(type_prop, shape_of_v3) { - auto a = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); + auto a = make_shared(element::f32, Shape{1, 2, 3, 4}); auto so = make_shared(a); - ASSERT_EQ(so->get_output_element_type(0), element::Type_t::i64); + ASSERT_EQ(so->get_output_element_type(0), element::i64); ASSERT_EQ(so->get_shape(), Shape{4}); } TEST(type_prop, shape_of_partial_et_dynamic_v3) { - auto a = make_shared(element::Type_t::dynamic, Shape{1, 2, 3, 4}); + auto a = make_shared(element::dynamic, Shape{1, 2, 3, 4}); auto so = make_shared(a); - ASSERT_EQ(so->get_output_element_type(0), element::Type_t::i64); + ASSERT_EQ(so->get_output_element_type(0), element::i64); ASSERT_EQ(so->get_shape(), Shape{4}); } TEST(type_prop, shape_of_partial_rank_static_dynamic_v3) { auto a = make_shared( - element::Type_t::f32, PartialShape{1, Dimension::dynamic(), Dimension::dynamic(), 4}); + element::f32, PartialShape{1, Dimension::dynamic(), Dimension::dynamic(), 4}); auto so = make_shared(a); - ASSERT_EQ(so->get_output_element_type(0), element::Type_t::i64); + ASSERT_EQ(so->get_output_element_type(0), element::i64); ASSERT_EQ(so->get_shape(), Shape{4}); } TEST(type_prop, shape_of_partial_rank_dynamic_v3) { - auto a = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto a = make_shared(element::f32, PartialShape::dynamic()); auto so = make_shared(a); - ASSERT_EQ(so->get_output_element_type(0), element::Type_t::i64); + ASSERT_EQ(so->get_output_element_type(0), element::i64); ASSERT_TRUE(so->get_output_partial_shape(0).same_scheme(PartialShape::dynamic(1))); } TEST(type_prop, shape_of_output_type_v3) { - auto a = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); - auto so = make_shared(a, element::Type_t::i32); + auto a = make_shared(element::f32, Shape{1, 2, 3, 4}); + auto so = make_shared(a, element::i32); try { - auto sx = make_shared(a, element::Type_t::i8); + auto sx = make_shared(a, element::i8); FAIL() << "Invalid output_type not detected"; } catch (NodeValidationFailure) @@ -113,7 +113,7 @@ TEST(type_prop, shape_of_output_type_v3) } try { - auto sx = make_shared(a, element::Type_t::i16); + auto sx = make_shared(a, element::i16); FAIL() << "Invalid output_type not detected"; } catch (NodeValidationFailure) @@ -125,7 +125,7 @@ TEST(type_prop, shape_of_output_type_v3) } try { - auto sx = make_shared(a, element::Type_t::f32); + auto sx = make_shared(a, element::f32); FAIL() << "Invalid output_type not detected"; } catch (NodeValidationFailure) @@ -136,6 +136,6 @@ TEST(type_prop, shape_of_output_type_v3) FAIL() << "Node validation error not thrown"; } - ASSERT_EQ(so->get_output_element_type(0), element::Type_t::i32); + ASSERT_EQ(so->get_output_element_type(0), element::i32); ASSERT_EQ(so->get_shape(), Shape{4}); } diff --git a/ngraph/test/type_prop/shuffle_channels.cpp b/ngraph/test/type_prop/shuffle_channels.cpp index ced139cea257e7..abef93c472b35c 100644 --- a/ngraph/test/type_prop/shuffle_channels.cpp +++ b/ngraph/test/type_prop/shuffle_channels.cpp @@ -25,7 +25,7 @@ TEST(type_prop, shuffle_channels_axis_validation) { try { - const auto data = make_shared(element::Type_t::f64, Shape{1, 2, 3, 4}); + const auto data = make_shared(element::f64, Shape{1, 2, 3, 4}); const auto shuffle_channels = make_shared(data, -5, 5); FAIL() << "ShuffleChannels validation did not work. Op node was created with incorrect " "params."; @@ -40,7 +40,7 @@ TEST(type_prop, shuffle_channels_axis_validation) TEST(type_prop, shuffle_channels_negative_axis_calculation) { - const auto data = make_shared(element::Type_t::f64, Shape{1, 2, 3, 4}); + const auto data = make_shared(element::f64, Shape{1, 2, 3, 4}); const auto shuffle_channels = make_shared(data, -3, 2); @@ -51,7 +51,7 @@ TEST(type_prop, shuffle_channels_invalid_input_shape) { try { - const auto data = make_shared(element::Type_t::f64, Shape{}); + const auto data = make_shared(element::f64, Shape{}); const auto shuffle_channels = make_shared(data, 0, 1); FAIL() << "ShuffleChannels validation did not work. Op node was created with incorrect " "params."; @@ -67,7 +67,7 @@ TEST(type_prop, shuffle_channels_invalid_groups_value) { try { - const auto data = make_shared(element::Type_t::f64, Shape{1, 2, 3, 15}); + const auto data = make_shared(element::f64, Shape{1, 2, 3, 15}); const auto shuffle_channels = make_shared(data, -1, 2); FAIL() << "ShuffleChannels validation did not work. Op node was created with incorrect " "params."; diff --git a/ngraph/test/type_prop/softmax.cpp b/ngraph/test/type_prop/softmax.cpp index 728cb5a1b45d99..e76761f061880e 100644 --- a/ngraph/test/type_prop/softmax.cpp +++ b/ngraph/test/type_prop/softmax.cpp @@ -23,7 +23,7 @@ using namespace ngraph; TEST(type_prop, softmax_default_axis) { const Shape arg_shape{2, 3}; - auto arg = make_shared(element::Type_t::f32, arg_shape); + auto arg = make_shared(element::f32, arg_shape); auto sm = make_shared(arg); ASSERT_EQ(sm->get_axis(), 1); } @@ -31,7 +31,7 @@ TEST(type_prop, softmax_default_axis) TEST(type_prop, softmax_out_of_bound_axis) { const Shape arg_shape{2, 3}; - auto arg = make_shared(element::Type_t::f32, arg_shape); + auto arg = make_shared(element::f32, arg_shape); // axis cannot be a negative number ASSERT_THROW(make_shared(arg, -1), ngraph::NodeValidationFailure); } diff --git a/ngraph/test/type_prop/softplus.cpp b/ngraph/test/type_prop/softplus.cpp index 918f05d993c091..7e40369209bc22 100644 --- a/ngraph/test/type_prop/softplus.cpp +++ b/ngraph/test/type_prop/softplus.cpp @@ -23,33 +23,31 @@ using namespace ngraph; TEST(type_prop, softplus) { - auto data = make_shared(element::Type_t::f32, Shape{1, 3, 6}); + auto data = make_shared(element::f32, Shape{1, 3, 6}); auto softplus_func = make_shared(data); - EXPECT_EQ(softplus_func->get_element_type(), element::Type_t::f32); + EXPECT_EQ(softplus_func->get_element_type(), element::f32); EXPECT_EQ(softplus_func->get_shape(), (Shape{1, 3, 6})); } TEST(type_prop, softplus_partial) { - auto data = - make_shared(element::Type_t::f32, PartialShape{1, Dimension::dynamic(), 6}); + auto data = make_shared(element::f32, PartialShape{1, Dimension::dynamic(), 6}); auto softplus_func = make_shared(data); - EXPECT_EQ(softplus_func->get_element_type(), element::Type_t::f32); + EXPECT_EQ(softplus_func->get_element_type(), element::f32); ASSERT_TRUE(softplus_func->get_output_partial_shape(0).same_scheme( (PartialShape{1, Dimension::dynamic(), 6}))); // rank unknown auto softplus_partial = make_shared( - make_shared(element::Type_t::f32, PartialShape::dynamic())); + make_shared(element::f32, PartialShape::dynamic())); ASSERT_TRUE(softplus_partial->get_output_partial_shape(0).same_scheme(PartialShape::dynamic())); } TEST(type_prop, softplus_partial_static_rank) { - auto data = - make_shared(element::Type_t::f32, PartialShape{1, Dimension::dynamic(), 6}); + auto data = make_shared(element::f32, PartialShape{1, Dimension::dynamic(), 6}); auto softplus_func = make_shared(data); - EXPECT_EQ(softplus_func->get_element_type(), element::Type_t::f32); + EXPECT_EQ(softplus_func->get_element_type(), element::f32); ASSERT_TRUE(softplus_func->get_output_partial_shape(0).same_scheme( (PartialShape{1, Dimension::dynamic(), 6}))); ASSERT_TRUE(softplus_func->get_output_partial_shape(0).rank().is_static()); diff --git a/ngraph/test/type_prop/space_to_batch.cpp b/ngraph/test/type_prop/space_to_batch.cpp index 2367ff250bbb8e..cd40078a0143b0 100644 --- a/ngraph/test/type_prop/space_to_batch.cpp +++ b/ngraph/test/type_prop/space_to_batch.cpp @@ -23,75 +23,70 @@ using namespace ngraph; TEST(type_prop, space_to_batch_output_shape_2D) { - auto data = make_shared(element::Type_t::f32, Shape{2, 128}); - auto block_shape = - make_shared(element::Type_t::i64, Shape{2}, vector{1, 5}); - auto pads_begin = - make_shared(element::Type_t::i64, Shape{2}, vector{0, 2}); - auto pads_end = - make_shared(element::Type_t::i64, Shape{2}, vector{0, 0}); + auto data = make_shared(element::f32, Shape{2, 128}); + auto block_shape = make_shared(element::i64, Shape{2}, vector{1, 5}); + auto pads_begin = make_shared(element::i64, Shape{2}, vector{0, 2}); + auto pads_end = make_shared(element::i64, Shape{2}, vector{0, 0}); auto space_to_batch = make_shared(data, block_shape, pads_begin, pads_end); - ASSERT_EQ(space_to_batch->get_element_type(), element::Type_t::f32); + ASSERT_EQ(space_to_batch->get_element_type(), element::f32); ASSERT_EQ(space_to_batch->get_shape(), (Shape{2 * 5, (128 + 2) / 5})); } TEST(type_prop, space_to_batch_output_shape_4D) { - auto data = make_shared(element::Type_t::f32, Shape{2, 64, 64, 3}); + auto data = make_shared(element::f32, Shape{2, 64, 64, 3}); auto block_shape = - make_shared(element::Type_t::i64, Shape{4}, vector{1, 10, 5, 1}); + make_shared(element::i64, Shape{4}, vector{1, 10, 5, 1}); auto pads_begin = - make_shared(element::Type_t::i64, Shape{4}, vector{0, 3, 1, 0}); - auto pads_end = - make_shared(element::Type_t::i64, Shape{4}, vector{0, 3, 0, 0}); + make_shared(element::i64, Shape{4}, vector{0, 3, 1, 0}); + auto pads_end = make_shared(element::i64, Shape{4}, vector{0, 3, 0, 0}); auto space_to_batch = make_shared(data, block_shape, pads_begin, pads_end); - ASSERT_EQ(space_to_batch->get_element_type(), element::Type_t::f32); + ASSERT_EQ(space_to_batch->get_element_type(), element::f32); ASSERT_EQ(space_to_batch->get_shape(), (Shape{2 * 10 * 5, (64 + 3 + 3) / 10, (64 + 1) / 5, 3})); } TEST(type_prop, space_to_batch_output_shape_5D) { - auto data = make_shared(element::Type_t::f32, Shape{2, 32, 64, 128, 256}); + auto data = make_shared(element::f32, Shape{2, 32, 64, 128, 256}); auto block_shape = - make_shared(element::Type_t::i32, Shape{5}, vector{1, 6, 5, 1, 16}); + make_shared(element::i32, Shape{5}, vector{1, 6, 5, 1, 16}); auto pads_begin = - make_shared(element::Type_t::i32, Shape{5}, vector{0, 2, 0, 0, 0}); + make_shared(element::i32, Shape{5}, vector{0, 2, 0, 0, 0}); auto pads_end = - make_shared(element::Type_t::i32, Shape{5}, vector{0, 2, 1, 0, 0}); + make_shared(element::i32, Shape{5}, vector{0, 2, 1, 0, 0}); auto space_to_batch = make_shared(data, block_shape, pads_begin, pads_end); - ASSERT_EQ(space_to_batch->get_element_type(), element::Type_t::f32); + ASSERT_EQ(space_to_batch->get_element_type(), element::f32); ASSERT_EQ(space_to_batch->get_shape(), (Shape{2 * 6 * 5 * 16, (32 + 2 + 2) / 6, (64 + 1) / 5, 128, 256 / 16})); } TEST(type_prop, space_to_batch_and_batch_to_space) { - auto data = make_shared(element::Type_t::f32, Shape{2, 100, 1024, 3}); + auto data = make_shared(element::f32, Shape{2, 100, 1024, 3}); auto block_shape = - make_shared(element::Type_t::i64, Shape{4}, vector{1, 12, 100, 2}); + make_shared(element::i64, Shape{4}, vector{1, 12, 100, 2}); auto pads_begin = - make_shared(element::Type_t::i64, Shape{4}, vector{0, 3, 38, 1}); - auto pads_end = - make_shared(element::Type_t::i64, Shape{4}, vector{0, 5, 38, 0}); + make_shared(element::i64, Shape{4}, vector{0, 3, 38, 1}); + auto pads_end = make_shared(element::i64, Shape{4}, vector{0, 5, 38, 0}); auto space_to_batch = make_shared(data, block_shape, pads_begin, pads_end); - ASSERT_EQ(space_to_batch->get_element_type(), element::Type_t::f32); + ASSERT_EQ(space_to_batch->get_element_type(), element::f32); ASSERT_EQ(space_to_batch->get_shape(), (Shape{2 * 12 * 100 * 2, (100 + 3 + 5) / 12, (1024 + 38 + 38) / 100, (3 + 1) / 2})); auto batch_to_space = make_shared(space_to_batch, block_shape, pads_begin, pads_end); - ASSERT_EQ(batch_to_space->get_element_type(), element::Type_t::f32); + ASSERT_EQ(batch_to_space->get_element_type(), element::f32); ASSERT_EQ(batch_to_space->get_shape(), (Shape{2, 100, 1024, 3})); } diff --git a/ngraph/test/type_prop/space_to_depth.cpp b/ngraph/test/type_prop/space_to_depth.cpp index 6055fcd16d5680..9c0ded0a64bf56 100644 --- a/ngraph/test/type_prop/space_to_depth.cpp +++ b/ngraph/test/type_prop/space_to_depth.cpp @@ -23,47 +23,47 @@ using namespace ngraph; TEST(type_prop, space_to_depth_output_shape_block_first_4D) { - auto A = make_shared(element::Type_t::f32, Shape{1, 2, 64, 64}); + auto A = make_shared(element::f32, Shape{1, 2, 64, 64}); const auto mode = ngraph::op::SpaceToDepth::SpaceToDepthMode::BLOCKS_FIRST; auto space_to_depth = make_shared(A, mode, 8); - ASSERT_EQ(space_to_depth->get_element_type(), element::Type_t::f32); + ASSERT_EQ(space_to_depth->get_element_type(), element::f32); ASSERT_EQ(space_to_depth->get_shape(), (Shape{1, 128, 8, 8})); } TEST(type_prop, space_to_depth_output_shape_block_first_4D_2) { - auto A = make_shared(element::Type_t::f32, Shape{1, 12, 1080, 1616}); + auto A = make_shared(element::f32, Shape{1, 12, 1080, 1616}); const auto mode = ngraph::op::SpaceToDepth::SpaceToDepthMode::BLOCKS_FIRST; auto space_to_depth = make_shared(A, mode, 2); - ASSERT_EQ(space_to_depth->get_element_type(), element::Type_t::f32); + ASSERT_EQ(space_to_depth->get_element_type(), element::f32); ASSERT_EQ(space_to_depth->get_shape(), (Shape{1, 12 * 4, 1080 / 2, 1616 / 2})); } TEST(type_prop, space_to_depth_output_shape_depth_first_4D) { - auto A = make_shared(element::Type_t::f32, Shape{1, 12, 1080, 1616}); + auto A = make_shared(element::f32, Shape{1, 12, 1080, 1616}); const auto mode = ngraph::op::SpaceToDepth::SpaceToDepthMode::DEPTH_FIRST; auto space_to_depth = make_shared(A, mode, 2); - ASSERT_EQ(space_to_depth->get_element_type(), element::Type_t::f32); + ASSERT_EQ(space_to_depth->get_element_type(), element::f32); ASSERT_EQ(space_to_depth->get_shape(), (Shape{1, 12 * 4, 1080 / 2, 1616 / 2})); } TEST(type_prop, space_to_depth_output_shape_depth_first_5D) { - auto A = make_shared(element::Type_t::f32, Shape{1, 12, 4, 1080, 1616}); + auto A = make_shared(element::f32, Shape{1, 12, 4, 1080, 1616}); const auto mode = ngraph::op::SpaceToDepth::SpaceToDepthMode::DEPTH_FIRST; auto space_to_depth = make_shared(A, mode, 2); - ASSERT_EQ(space_to_depth->get_element_type(), element::Type_t::f32); + ASSERT_EQ(space_to_depth->get_element_type(), element::f32); ASSERT_EQ(space_to_depth->get_shape(), (Shape{1, 12 * 8, 4 / 2, 1080 / 2, 1616 / 2})); } TEST(type_prop, space_to_depth_input_rank_not_supported) { - auto A = make_shared(element::Type_t::f32, Shape{1, 8}); + auto A = make_shared(element::f32, Shape{1, 8}); try { auto space_to_depth = @@ -84,7 +84,7 @@ TEST(type_prop, space_to_depth_input_rank_not_supported) TEST(type_prop, space_to_depth_blocksize_not_matched) { - auto A = make_shared(element::Type_t::f32, Shape{1, 3, 8, 7}); + auto A = make_shared(element::f32, Shape{1, 3, 8, 7}); try { auto space_to_depth = diff --git a/ngraph/test/type_prop/split.cpp b/ngraph/test/type_prop/split.cpp index 0fffd7f96662ce..8abbe593dcab87 100644 --- a/ngraph/test/type_prop/split.cpp +++ b/ngraph/test/type_prop/split.cpp @@ -25,11 +25,11 @@ using namespace ngraph; TEST(type_prop, split) { - const auto data = make_shared(element::Type_t::i32, Shape{2, 6}); + const auto data = make_shared(element::i32, Shape{2, 6}); try { - const auto axis = op::Constant::create(element::Type_t::i64, Shape{}, {1}); + const auto axis = op::Constant::create(element::i64, Shape{}, {1}); const auto split = make_shared(data, axis, 7); FAIL() << "Split node was created with incorrect data."; } @@ -43,7 +43,7 @@ TEST(type_prop, split) try { - const auto axis = op::Constant::create(element::Type_t::i64, Shape{}, {-5}); + const auto axis = op::Constant::create(element::i64, Shape{}, {-5}); const auto split = make_shared(data, axis, 4); // invalid axis FAIL() << "Split node was created with incorrect data."; } @@ -52,19 +52,19 @@ TEST(type_prop, split) EXPECT_HAS_SUBSTRING(error.what(), std::string("Parameter axis -5 out of the tensor rank")); } - const auto axis = op::Constant::create(element::Type_t::i64, Shape{}, {1}); + const auto axis = op::Constant::create(element::i64, Shape{}, {1}); const auto split = make_shared(data, axis, 2); EXPECT_EQ(split->outputs().size(), 2); EXPECT_EQ(split->get_output_shape(0), (Shape{2, 3})); EXPECT_EQ(split->get_output_shape(1), (Shape{2, 3})); - EXPECT_EQ(split->get_output_element_type(0), element::Type_t::i32); - EXPECT_EQ(split->get_output_element_type(1), element::Type_t::i32); + EXPECT_EQ(split->get_output_element_type(0), element::i32); + EXPECT_EQ(split->get_output_element_type(1), element::i32); } TEST(type_prop, split_axis_must_be_scalar) { - const auto data = make_shared(element::Type_t::i32, Shape{2, 6}); - const auto axis = op::Constant::create(element::Type_t::i64, Shape{2}, {0, 1}); + const auto data = make_shared(element::i32, Shape{2, 6}); + const auto axis = op::Constant::create(element::i64, Shape{2}, {0, 1}); try { @@ -84,15 +84,15 @@ TEST(type_prop, split_axis_must_be_scalar) TEST(type_prop, split_v1) { - const auto data = make_shared(element::Type_t::f16, Shape{2, 3, 4}); - const auto axis = op::Constant::create(element::Type_t::i64, {}, {1}); + const auto data = make_shared(element::f16, Shape{2, 3, 4}); + const auto axis = op::Constant::create(element::i64, {}, {1}); const size_t num_splits = 3; const auto split = make_shared(data, axis, num_splits); EXPECT_EQ(split->outputs().size(), num_splits); for (int i = 0; i < num_splits; ++i) { - EXPECT_EQ(split->get_output_element_type(i), element::Type_t::f16); + EXPECT_EQ(split->get_output_element_type(i), element::f16); EXPECT_EQ(split->get_output_shape(i), (Shape{2, 1, 4})); } } @@ -100,8 +100,8 @@ TEST(type_prop, split_v1) TEST(type_prop, split_v1_axis_const_data_axis_dim_known) { const auto data = - make_shared(element::Type_t::f32, PartialShape{2, 3, Dimension::dynamic()}); - const auto axis = op::Constant::create(element::Type_t::i32, {}, {1}); + make_shared(element::f32, PartialShape{2, 3, Dimension::dynamic()}); + const auto axis = op::Constant::create(element::i32, {}, {1}); const size_t num_splits = 3; const auto split = make_shared(data, axis, num_splits); @@ -115,8 +115,8 @@ TEST(type_prop, split_v1_axis_const_data_axis_dim_known) TEST(type_prop, split_v1_axis_const_only_data_axis_dim_known) { const auto data = make_shared( - element::Type_t::f32, PartialShape{2, Dimension::dynamic(), Dimension::dynamic()}); - const auto axis = op::Constant::create(element::Type_t::i16, {}, {0}); + element::f32, PartialShape{2, Dimension::dynamic(), Dimension::dynamic()}); + const auto axis = op::Constant::create(element::i16, {}, {0}); const size_t num_splits = 2; const auto split = make_shared(data, axis, num_splits); @@ -130,9 +130,9 @@ TEST(type_prop, split_v1_axis_const_only_data_axis_dim_known) TEST(type_prop, split_v1_axis_const_data_axis_dim_unknown) { - const auto data = make_shared(element::Type_t::f32, - PartialShape{4, Dimension::dynamic(), 3, 5}); - const auto axis = op::Constant::create(element::Type_t::i8, {}, {1}); + const auto data = + make_shared(element::f32, PartialShape{4, Dimension::dynamic(), 3, 5}); + const auto axis = op::Constant::create(element::i8, {}, {1}); const size_t num_splits = 3; const auto split = make_shared(data, axis, num_splits); @@ -146,8 +146,8 @@ TEST(type_prop, split_v1_axis_const_data_axis_dim_unknown) TEST(type_prop, split_v1_axis_const_only_data_rank_known) { - const auto data = make_shared(element::Type_t::f32, PartialShape::dynamic(4)); - const auto axis = op::Constant::create(element::Type_t::u64, {}, {1}); + const auto data = make_shared(element::f32, PartialShape::dynamic(4)); + const auto axis = op::Constant::create(element::u64, {}, {1}); const size_t num_splits = 3; const auto split = make_shared(data, axis, num_splits); @@ -160,8 +160,8 @@ TEST(type_prop, split_v1_axis_const_only_data_rank_known) TEST(type_prop, split_v1_axis_not_const_only_data_rank_known) { - const auto data = make_shared(element::Type_t::f32, PartialShape::dynamic(4)); - const auto axis = make_shared(element::Type_t::u32, PartialShape{}); + const auto data = make_shared(element::f32, PartialShape::dynamic(4)); + const auto axis = make_shared(element::u32, PartialShape{}); const size_t num_splits = 3; const auto split = make_shared(data, axis, num_splits); @@ -174,8 +174,8 @@ TEST(type_prop, split_v1_axis_not_const_only_data_rank_known) TEST(type_prop, split_v1_axis_const_data_rank_unknown) { - const auto data = make_shared(element::Type_t::f32, PartialShape::dynamic()); - const auto axis = op::Constant::create(element::Type_t::u16, {}, {2}); + const auto data = make_shared(element::f32, PartialShape::dynamic()); + const auto axis = op::Constant::create(element::u16, {}, {2}); const size_t num_splits = 3; const auto split = make_shared(data, axis, num_splits); @@ -188,8 +188,8 @@ TEST(type_prop, split_v1_axis_const_data_rank_unknown) TEST(type_prop, split_v1_axis_not_const_data_rank_unknown) { - const auto data = make_shared(element::Type_t::f32, PartialShape::dynamic()); - const auto axis = make_shared(element::Type_t::u8, PartialShape{}); + const auto data = make_shared(element::f32, PartialShape::dynamic()); + const auto axis = make_shared(element::u8, PartialShape{}); const size_t num_splits = 3; const auto split = make_shared(data, axis, num_splits); @@ -202,8 +202,8 @@ TEST(type_prop, split_v1_axis_not_const_data_rank_unknown) TEST(type_prop, split_v1_axis_dynamic_rank) { - const auto data = make_shared(element::Type_t::f32, PartialShape::dynamic()); - const auto axis = make_shared(element::Type_t::u8, PartialShape::dynamic()); + const auto data = make_shared(element::f32, PartialShape::dynamic()); + const auto axis = make_shared(element::u8, PartialShape::dynamic()); const size_t num_splits = 3; const auto split = make_shared(data, axis, num_splits); diff --git a/ngraph/test/type_prop/squared_difference.cpp b/ngraph/test/type_prop/squared_difference.cpp index 4646f41652a827..bdedbeb5ea824a 100644 --- a/ngraph/test/type_prop/squared_difference.cpp +++ b/ngraph/test/type_prop/squared_difference.cpp @@ -23,9 +23,9 @@ using namespace ngraph; TEST(type_prop, squared_difference) { - const auto x1 = make_shared(element::Type_t::f64, Shape{2, 2}); - const auto x2 = make_shared(element::Type_t::f64, Shape{3, 2}); - const auto x3 = make_shared(element::Type_t::f64, Shape{1, 2}); + const auto x1 = make_shared(element::f64, Shape{2, 2}); + const auto x2 = make_shared(element::f64, Shape{3, 2}); + const auto x3 = make_shared(element::f64, Shape{1, 2}); try { @@ -38,6 +38,6 @@ TEST(type_prop, squared_difference) } const auto clamp = make_shared(x1, x3); - EXPECT_EQ(clamp->get_element_type(), element::Type_t::f64); + EXPECT_EQ(clamp->get_element_type(), element::f64); EXPECT_EQ(clamp->get_shape(), (Shape{2, 2})); } diff --git a/ngraph/test/type_prop/squeeze.cpp b/ngraph/test/type_prop/squeeze.cpp index 7768589f450603..78b813a57d91e2 100644 --- a/ngraph/test/type_prop/squeeze.cpp +++ b/ngraph/test/type_prop/squeeze.cpp @@ -23,47 +23,45 @@ using namespace ngraph; TEST(type_prop, squeeze) { - auto param = make_shared(element::Type_t::f32, Shape{1, 4, 1, 4, 1, 8}); + auto param = make_shared(element::f32, Shape{1, 4, 1, 4, 1, 8}); auto axes_node = - make_shared(element::Type_t::u64, Shape{2}, vector{0, 2}); + make_shared(element::u64, Shape{2}, vector{0, 2}); auto squeeze = make_shared(param, axes_node); - ASSERT_EQ(squeeze->get_element_type(), element::Type_t::f32); + ASSERT_EQ(squeeze->get_element_type(), element::f32); ASSERT_EQ(squeeze->get_shape(), (Shape{4, 4, 1, 8})); - axes_node = - make_shared(element::Type_t::u64, Shape{0}, vector{}); + axes_node = make_shared(element::u64, Shape{0}, vector{}); auto squeeze_default_axes = make_shared(param, axes_node); - ASSERT_EQ(squeeze_default_axes->get_element_type(), element::Type_t::f32); + ASSERT_EQ(squeeze_default_axes->get_element_type(), element::f32); ASSERT_EQ(squeeze_default_axes->get_shape(), (Shape{4, 4, 8})); } TEST(type_prop, squeeze_dynamic) { - auto param = make_shared(element::Type_t::f32, PartialShape::dynamic(6)); + auto param = make_shared(element::f32, PartialShape::dynamic(6)); auto axes_node = - make_shared(element::Type_t::u64, Shape{2}, vector{0, 2}); + make_shared(element::u64, Shape{2}, vector{0, 2}); auto squeeze = make_shared(param, axes_node); - ASSERT_EQ(squeeze->get_element_type(), element::Type_t::f32); + ASSERT_EQ(squeeze->get_element_type(), element::f32); EXPECT_TRUE(squeeze->get_output_partial_shape(0).same_scheme(PartialShape::dynamic(4))); - axes_node = - make_shared(element::Type_t::u64, Shape{0}, vector{}); + axes_node = make_shared(element::u64, Shape{0}, vector{}); auto squeeze_default_axes = make_shared(param, axes_node); - ASSERT_EQ(squeeze_default_axes->get_element_type(), element::Type_t::f32); + ASSERT_EQ(squeeze_default_axes->get_element_type(), element::f32); EXPECT_TRUE( squeeze_default_axes->get_output_partial_shape(0).same_scheme(PartialShape::dynamic())); } TEST(type_prop, squeeze_axes_invalid_value) { - auto param = make_shared(element::Type_t::f32, Shape{1, 2, 3, 4}); + auto param = make_shared(element::f32, Shape{1, 2, 3, 4}); auto axes_node = - make_shared(element::Type_t::u64, Shape{2}, vector{0, 2}); + make_shared(element::u64, Shape{2}, vector{0, 2}); try { diff --git a/ngraph/test/type_prop/strided_slice.cpp b/ngraph/test/type_prop/strided_slice.cpp index 968deff1e5ae99..77bfa280f386dc 100644 --- a/ngraph/test/type_prop/strided_slice.cpp +++ b/ngraph/test/type_prop/strided_slice.cpp @@ -25,9 +25,9 @@ using namespace ngraph; TEST(type_prop, strided_slice_begin_incorrect_type) { - auto data = make_shared(element::Type_t::f32, Shape{2, 4, 6, 8}); - auto begin = make_shared(element::Type_t::f16, Shape{4}); - auto end = make_shared(element::Type_t::i64, Shape{4}); + auto data = make_shared(element::f32, Shape{2, 4, 6, 8}); + auto begin = make_shared(element::f16, Shape{4}); + auto end = make_shared(element::i64, Shape{4}); try { auto strided_slice = make_shared( @@ -47,9 +47,9 @@ TEST(type_prop, strided_slice_begin_incorrect_type) TEST(type_prop, strided_slice_end_incorrect_type) { - auto data = make_shared(element::Type_t::f32, Shape{2, 4, 6, 8}); - auto begin = make_shared(element::Type_t::i64, Shape{4}); - auto end = make_shared(element::Type_t::boolean, Shape{4}); + auto data = make_shared(element::f32, Shape{2, 4, 6, 8}); + auto begin = make_shared(element::i64, Shape{4}); + auto end = make_shared(element::boolean, Shape{4}); try { auto strided_slice = make_shared( @@ -69,9 +69,9 @@ TEST(type_prop, strided_slice_end_incorrect_type) TEST(type_prop, strided_slice_incompatible_size_of_masks_attr) { - auto data = make_shared(element::Type_t::f32, Shape{2, 4, 6, 8}); - auto begin = make_shared(element::Type_t::i64, Shape{4}); - auto end = make_shared(element::Type_t::i64, Shape{4}); + auto data = make_shared(element::f32, Shape{2, 4, 6, 8}); + auto begin = make_shared(element::i64, Shape{4}); + auto end = make_shared(element::i64, Shape{4}); try { auto strided_slice = make_shared(data, @@ -96,9 +96,9 @@ TEST(type_prop, strided_slice_incompatible_size_of_masks_attr) TEST(type_prop, strided_slice_mask_incorrect_value) { - auto data = make_shared(element::Type_t::f32, Shape{2, 4, 6, 8}); - auto begin = make_shared(element::Type_t::i64, Shape{4, 5}); - auto end = make_shared(element::Type_t::i64, Shape{4}); + auto data = make_shared(element::f32, Shape{2, 4, 6, 8}); + auto begin = make_shared(element::i64, Shape{4, 5}); + auto end = make_shared(element::i64, Shape{4}); try { auto strided_slice = make_shared( @@ -119,9 +119,9 @@ TEST(type_prop, strided_slice_mask_incorrect_value) TEST(type_prop, strided_slice_begin_incorrect_shape) { - auto data = make_shared(element::Type_t::f32, Shape{2, 4, 6, 8}); - auto begin = make_shared(element::Type_t::i64, Shape{4, 5}); - auto end = make_shared(element::Type_t::i64, Shape{4}); + auto data = make_shared(element::f32, Shape{2, 4, 6, 8}); + auto begin = make_shared(element::i64, Shape{4, 5}); + auto end = make_shared(element::i64, Shape{4}); try { auto strided_slice = make_shared( @@ -141,9 +141,9 @@ TEST(type_prop, strided_slice_begin_incorrect_shape) TEST(type_prop, strided_slice_end_incorrect_shape) { - auto data = make_shared(element::Type_t::f32, Shape{2, 4, 6, 8}); - auto begin = make_shared(element::Type_t::i64, Shape{4}); - auto end = make_shared(element::Type_t::i64, Shape{4, 5}); + auto data = make_shared(element::f32, Shape{2, 4, 6, 8}); + auto begin = make_shared(element::i64, Shape{4}); + auto end = make_shared(element::i64, Shape{4, 5}); try { auto strided_slice = make_shared( @@ -163,9 +163,9 @@ TEST(type_prop, strided_slice_end_incorrect_shape) TEST(type_prop, strided_slice_default_stride_dynamic_shape_input) { - auto data = make_shared(element::Type_t::f32, Shape{2, 4, 6, 8}); - auto begin = make_shared(element::Type_t::i64, PartialShape::dynamic()); - auto end = make_shared(element::Type_t::i64, Shape{2}); + auto data = make_shared(element::f32, Shape{2, 4, 6, 8}); + auto begin = make_shared(element::i64, PartialShape::dynamic()); + auto end = make_shared(element::i64, Shape{2}); auto strided_slice = make_shared( data, begin, end, vector{0, 0}, vector{0, 0}); @@ -173,7 +173,7 @@ TEST(type_prop, strided_slice_default_stride_dynamic_shape_input) try { - end = make_shared(element::Type_t::i64, PartialShape::dynamic()); + end = make_shared(element::i64, PartialShape::dynamic()); strided_slice = make_shared( data, begin, end, vector{0, 0}, vector{0, 0}); // Should have thrown, so fail if it didn't @@ -191,11 +191,10 @@ TEST(type_prop, strided_slice_default_stride_dynamic_shape_input) TEST(type_prop, strided_slice_reverse_out_of_bounds) { - auto data = - std::make_shared(ngraph::element::Type_t::f32, ngraph::Shape{3, 4, 5}); - auto begin = op::Constant::create(ngraph::element::Type_t::i64, ngraph::Shape{3}, {100}); - auto end = op::Constant::create(ngraph::element::Type_t::i64, ngraph::Shape{3}, {-100}); - auto stride = op::Constant::create(ngraph::element::Type_t::i64, ngraph::Shape{3}, {-1}); + auto data = std::make_shared(ngraph::element::f32, ngraph::Shape{3, 4, 5}); + auto begin = op::Constant::create(ngraph::element::i64, ngraph::Shape{3}, {100}); + auto end = op::Constant::create(ngraph::element::i64, ngraph::Shape{3}, {-100}); + auto stride = op::Constant::create(ngraph::element::i64, ngraph::Shape{3}, {-1}); std::vector begin_mask = {0, 0, 0, 0}; std::vector end_mask = {0, 0, 0, 0}; diff --git a/ngraph/test/type_prop/swish.cpp b/ngraph/test/type_prop/swish.cpp index b9091a5364a5a2..6611009e8d94d3 100644 --- a/ngraph/test/type_prop/swish.cpp +++ b/ngraph/test/type_prop/swish.cpp @@ -23,33 +23,31 @@ using namespace ngraph; TEST(type_prop, swish) { - auto data = make_shared(element::Type_t::f32, Shape{1, 3, 6}); + auto data = make_shared(element::f32, Shape{1, 3, 6}); auto swish_func = make_shared(data); - EXPECT_EQ(swish_func->get_element_type(), element::Type_t::f32); + EXPECT_EQ(swish_func->get_element_type(), element::f32); EXPECT_EQ(swish_func->get_shape(), data->get_output_shape(0)); } TEST(type_prop, swish_partial) { - auto data = - make_shared(element::Type_t::f32, PartialShape{1, Dimension::dynamic(), 6}); + auto data = make_shared(element::f32, PartialShape{1, Dimension::dynamic(), 6}); auto swish_func = make_shared(data); - EXPECT_EQ(swish_func->get_element_type(), element::Type_t::f32); + EXPECT_EQ(swish_func->get_element_type(), element::f32); ASSERT_TRUE( swish_func->get_output_partial_shape(0).same_scheme(data->get_output_partial_shape(0))); // rank unknown auto swish_partial = make_shared( - make_shared(element::Type_t::f32, PartialShape::dynamic())); + make_shared(element::f32, PartialShape::dynamic())); ASSERT_TRUE(swish_partial->get_output_partial_shape(0).same_scheme(PartialShape::dynamic())); } TEST(type_prop, swish_partial_static_rank) { - auto data = - make_shared(element::Type_t::f32, PartialShape{1, Dimension::dynamic(), 6}); + auto data = make_shared(element::f32, PartialShape{1, Dimension::dynamic(), 6}); auto swish_func = make_shared(data); - EXPECT_EQ(swish_func->get_element_type(), element::Type_t::f32); + EXPECT_EQ(swish_func->get_element_type(), element::f32); ASSERT_TRUE( swish_func->get_output_partial_shape(0).same_scheme(data->get_output_partial_shape(0))); ASSERT_TRUE(swish_func->get_output_partial_shape(0).rank().is_static()); @@ -57,8 +55,8 @@ TEST(type_prop, swish_partial_static_rank) TEST(type_prop, swish_incompatible_types) { - auto data = make_shared(element::Type_t::f32, Shape{1, 3, 6}); - auto beta = make_shared(element::Type_t::f16, Shape{}); + auto data = make_shared(element::f32, Shape{1, 3, 6}); + auto beta = make_shared(element::f16, Shape{}); try { const auto swish_func = make_shared(data, beta); @@ -72,8 +70,8 @@ TEST(type_prop, swish_incompatible_types) TEST(type_prop, swish_beta_not_scalar) { - auto data = make_shared(element::Type_t::f32, Shape{1, 3, 6}); - auto beta = make_shared(element::Type_t::f32, Shape{1}); + auto data = make_shared(element::f32, Shape{1, 3, 6}); + auto beta = make_shared(element::f32, Shape{1}); try { const auto swish_func = make_shared(data, beta); @@ -87,11 +85,11 @@ TEST(type_prop, swish_beta_not_scalar) TEST(type_prop, swish_2_inputs) { - auto data = make_shared(element::Type_t::f32, Shape{1, 3, 6}); - auto beta = make_shared(element::Type_t::f32, Shape{}); + auto data = make_shared(element::f32, Shape{1, 3, 6}); + auto beta = make_shared(element::f32, Shape{}); const auto swish_func = make_shared(data, beta); - EXPECT_EQ(swish_func->get_element_type(), element::Type_t::f32); + EXPECT_EQ(swish_func->get_element_type(), element::f32); ASSERT_TRUE(swish_func->get_output_partial_shape(0).same_scheme(data->get_output_shape(0))); ASSERT_TRUE(swish_func->get_output_partial_shape(0).rank().is_static()); } diff --git a/ngraph/test/type_prop/ti.cpp b/ngraph/test/type_prop/ti.cpp index 102da20f465a18..77df1f1e418488 100644 --- a/ngraph/test/type_prop/ti.cpp +++ b/ngraph/test/type_prop/ti.cpp @@ -30,20 +30,20 @@ TEST(type_prop, tensor_iterator_lstm) const size_t L = 10; // Sequence length const size_t I = 8; // Input size const size_t H = 32; // Hidden size - auto SENT = make_shared(element::Type_t::f32, Shape{N, L, I}); + auto SENT = make_shared(element::f32, Shape{N, L, I}); - auto H_init = make_shared(element::Type_t::f32, Shape{N, 1, H}); - auto C_init = make_shared(element::Type_t::f32, Shape{N, 1, H}); + auto H_init = make_shared(element::f32, Shape{N, 1, H}); + auto C_init = make_shared(element::f32, Shape{N, 1, H}); - auto W = make_shared(element::Type_t::f32, Shape{4 * H, I}); - auto R = make_shared(element::Type_t::f32, Shape{4 * H, H}); - auto H_t = make_shared(element::Type_t::f32, Shape{N, 1, H}); - auto C_t = make_shared(element::Type_t::f32, Shape{N, 1, H}); + auto W = make_shared(element::f32, Shape{4 * H, I}); + auto R = make_shared(element::f32, Shape{4 * H, H}); + auto H_t = make_shared(element::f32, Shape{N, 1, H}); + auto C_t = make_shared(element::f32, Shape{N, 1, H}); // Body - auto X = make_shared(element::Type_t::f32, Shape{N, 1, I}); - auto W_body = make_shared(element::Type_t::f32, Shape{4 * H, I}); - auto R_body = make_shared(element::Type_t::f32, Shape{4 * H, H}); + auto X = make_shared(element::f32, Shape{N, 1, I}); + auto W_body = make_shared(element::f32, Shape{4 * H, I}); + auto R_body = make_shared(element::f32, Shape{4 * H, H}); auto LSTM_cell = make_shared(builder::opset1::reshape(X, Shape{N, I}), builder::opset1::reshape(H_t, Shape{N, H}), builder::opset1::reshape(C_t, Shape{N, H}), @@ -77,15 +77,15 @@ TEST(type_prop, tensor_iterator_lstm) TEST(type_prop, tensor_iterator_2_slice_inputs_part_size_2) { // That which we iterate over - auto X = make_shared(element::Type_t::f32, Shape{32, 40, 10}); - auto Y = make_shared(element::Type_t::f32, Shape{32, 40, 10}); - auto M = make_shared(element::Type_t::f32, Shape{32, 2, 10}); + auto X = make_shared(element::f32, Shape{32, 40, 10}); + auto Y = make_shared(element::f32, Shape{32, 40, 10}); + auto M = make_shared(element::f32, Shape{32, 2, 10}); // Set up the cell body, a function from (Xi, Yi) -> (Zo) // Body parameters - auto Xi = make_shared(element::Type_t::f32, Shape{32, 2, 10}); - auto Yi = make_shared(element::Type_t::f32, Shape{32, 2, 10}); - auto M_body = make_shared(element::Type_t::f32, Shape{32, 2, 10}); + auto Xi = make_shared(element::f32, Shape{32, 2, 10}); + auto Yi = make_shared(element::f32, Shape{32, 2, 10}); + auto M_body = make_shared(element::f32, Shape{32, 2, 10}); // Body auto Zo = std::make_shared(std::make_shared(Xi, Yi), M_body); @@ -121,15 +121,15 @@ TEST(type_prop, tensor_iterator_2_slice_inputs_part_size_2) TEST(type_prop, tensor_iterator_2_slice_inputs_part_size_2_dynamic) { // That which we iterate over - auto X = make_shared(element::Type_t::f32, Shape{32, 40, 10}); - auto Y = make_shared(element::Type_t::f32, Shape{32, 40, 10}); - auto M = make_shared(element::Type_t::f32, Shape{32, 2, 10}); + auto X = make_shared(element::f32, Shape{32, 40, 10}); + auto Y = make_shared(element::f32, Shape{32, 40, 10}); + auto M = make_shared(element::f32, Shape{32, 2, 10}); // Set up the cell body, a function from (Xi, Yi) -> (Zo) // Body parameters - auto Xi = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto Yi = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto M_body = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto Xi = make_shared(element::f32, PartialShape::dynamic()); + auto Yi = make_shared(element::f32, PartialShape::dynamic()); + auto M_body = make_shared(element::f32, PartialShape::dynamic()); // Body auto Zo = std::make_shared(std::make_shared(Xi, Yi), M_body); diff --git a/ngraph/test/type_prop/tile.cpp b/ngraph/test/type_prop/tile.cpp index 8dfcadcbc45659..e3c9a30b95ac0c 100644 --- a/ngraph/test/type_prop/tile.cpp +++ b/ngraph/test/type_prop/tile.cpp @@ -23,27 +23,27 @@ using namespace ngraph; TEST(type_prop, tile) { - auto param0 = make_shared(element::Type_t::f32, Shape{6, 8, 10}); - auto param1 = op::Constant::create(element::Type_t::i64, Shape{3}, {3, 4, 1}); + auto param0 = make_shared(element::f32, Shape{6, 8, 10}); + auto param1 = op::Constant::create(element::i64, Shape{3}, {3, 4, 1}); auto top = make_shared(param0, param1); - ASSERT_EQ(top->get_element_type(), element::Type_t::f32); + ASSERT_EQ(top->get_element_type(), element::f32); ASSERT_EQ(top->get_shape(), (Shape{18, 32, 10})); } TEST(type_prop, tile_small_data_rank) { - auto param0 = make_shared(element::Type_t::f32, Shape{8, 10}); - auto param1 = op::Constant::create(element::Type_t::i64, Shape{3}, {3, 4, 1}); + auto param0 = make_shared(element::f32, Shape{8, 10}); + auto param1 = op::Constant::create(element::i64, Shape{3}, {3, 4, 1}); auto top = make_shared(param0, param1); - ASSERT_EQ(top->get_element_type(), element::Type_t::f32); + ASSERT_EQ(top->get_element_type(), element::f32); ASSERT_EQ(top->get_shape(), (Shape{3, 32, 10})); } TEST(type_prop, tile_few_repeats) { - auto param0 = make_shared(element::Type_t::f32, Shape{6, 8, 10}); - auto param1 = op::Constant::create(element::Type_t::i64, Shape{2}, {4, 1}); + auto param0 = make_shared(element::f32, Shape{6, 8, 10}); + auto param1 = op::Constant::create(element::i64, Shape{2}, {4, 1}); auto top = make_shared(param0, param1); - ASSERT_EQ(top->get_element_type(), element::Type_t::f32); + ASSERT_EQ(top->get_element_type(), element::f32); ASSERT_EQ(top->get_shape(), (Shape{6, 32, 10})); } diff --git a/ngraph/test/type_prop/top_k.cpp b/ngraph/test/type_prop/top_k.cpp index bde74878601570..644b60bac137b9 100644 --- a/ngraph/test/type_prop/top_k.cpp +++ b/ngraph/test/type_prop/top_k.cpp @@ -31,8 +31,8 @@ TYPED_TEST_CASE_P(topk_type_prop); TYPED_TEST_P(topk_type_prop, topk_negative_axis_support) { const auto data_shape = Shape{1, 2, 3, 4}; - const auto data = make_shared(element::Type_t::f32, data_shape); - const auto k = op::Constant::create(element::Type_t::i64, Shape{}, {2}); + const auto data = make_shared(element::f32, data_shape); + const auto k = op::Constant::create(element::i64, Shape{}, {2}); const int64_t axis = -2; const auto topk = make_shared(data, k, axis, "max", "value"); @@ -46,8 +46,8 @@ TYPED_TEST_P(topk_type_prop, topk_negative_axis_support) TYPED_TEST_P(topk_type_prop, topk_negative_axis_dynamic_rank) { const auto data_shape = PartialShape::dynamic(); - const auto data = make_shared(element::Type_t::f32, data_shape); - const auto k = op::Constant::create(element::Type_t::i64, Shape{}, {2}); + const auto data = make_shared(element::f32, data_shape); + const auto k = op::Constant::create(element::i64, Shape{}, {2}); const int64_t axis = -2; const auto topk = make_shared(data, k, axis, "max", "value"); @@ -68,14 +68,14 @@ TYPED_TEST_P(topk_type_prop, topk_negative_axis_dynamic_rank) TYPED_TEST_P(topk_type_prop, topk_v1_partial_ouptut) { auto data_shape = PartialShape{2, 10}; - auto data = make_shared(element::Type_t::f32, data_shape); + auto data = make_shared(element::f32, data_shape); { - auto k = make_shared(element::Type_t::i32, PartialShape({})); + auto k = make_shared(element::i32, PartialShape({})); auto topk = make_shared(data, k, 1, "max", "value"); EXPECT_EQ(topk->get_output_partial_shape(0), PartialShape({2, -1})); } { - auto k = make_shared(element::Type_t::i32, Shape{}, 3); + auto k = make_shared(element::i32, Shape{}, 3); auto topk = make_shared(data, k, 1, "max", "value"); EXPECT_EQ(topk->get_output_shape(0), Shape({2, 3})); EXPECT_EQ(topk->get_output_partial_shape(0), PartialShape({2, 3})); @@ -86,18 +86,18 @@ TYPED_TEST_P(topk_type_prop, topk_rank_static_k_unknown) { const int64_t axis = 1; const auto data_shape = Shape{1, 10, 100}; - const auto data = make_shared(element::Type_t::f32, data_shape); + const auto data = make_shared(element::f32, data_shape); { - const auto k = make_shared(element::Type_t::i32, PartialShape({})); + const auto k = make_shared(element::i32, PartialShape({})); const auto topk = make_shared(data, k, axis, "max", "value"); const PartialShape fully_dynamic_axis_shape{1, Dimension::dynamic(), 100}; EXPECT_EQ(topk->get_output_partial_shape(0), fully_dynamic_axis_shape); } { - const auto k = make_shared(element::Type_t::i64, Shape{}, 5); - const auto convert_k = make_shared(k, element::Type_t::i32); + const auto k = make_shared(element::i64, Shape{}, 5); + const auto convert_k = make_shared(k, element::i32); const auto topk = make_shared(data, convert_k, axis, "max", "value"); const PartialShape ranged_dynamic_axis_shape{1, Dimension{5, 10}, 100}; diff --git a/ngraph/test/type_prop/transpose.cpp b/ngraph/test/type_prop/transpose.cpp index e4cf09085099fc..ae57978fe7f781 100644 --- a/ngraph/test/type_prop/transpose.cpp +++ b/ngraph/test/type_prop/transpose.cpp @@ -23,32 +23,30 @@ using namespace ngraph; TEST(type_prop, transpose_arg_static_input_order_static_ok) { - auto arg = make_shared(element::Type_t::f32, Shape{2, 4, 6, 8}); - auto input_order = make_shared(element::Type_t::i64, Shape{4}); + auto arg = make_shared(element::f32, Shape{2, 4, 6, 8}); + auto input_order = make_shared(element::i64, Shape{4}); auto r = make_shared(arg, input_order); - EXPECT_EQ(r->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(r->get_output_element_type(0), element::f32); EXPECT_TRUE(r->get_output_partial_shape(0).same_scheme(PartialShape::dynamic(4))); } TEST(type_prop, transpose_arg_static_input_order_constant_ok) { - auto arg = make_shared(element::Type_t::f32, Shape{2, 4, 6, 8}); - auto input_order = - op::Constant::create(element::Type_t::i64, Shape{4}, vector{2, 1, 0, 3}); + auto arg = make_shared(element::f32, Shape{2, 4, 6, 8}); + auto input_order = op::Constant::create(element::i64, Shape{4}, vector{2, 1, 0, 3}); auto r = make_shared(arg, input_order); - EXPECT_EQ(r->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(r->get_output_element_type(0), element::f32); EXPECT_TRUE(r->get_output_partial_shape(0).same_scheme(PartialShape{6, 4, 2, 8})); } TEST(type_prop, transpose_arg_static_input_order_constant_invalid_perm) { - auto arg = make_shared(element::Type_t::f32, Shape{2, 4, 6, 8}); - auto input_order = - op::Constant::create(element::Type_t::i64, Shape{4}, vector{2, 9, 0, 3}); + auto arg = make_shared(element::f32, Shape{2, 4, 6, 8}); + auto input_order = op::Constant::create(element::i64, Shape{4}, vector{2, 9, 0, 3}); try { @@ -70,79 +68,76 @@ TEST(type_prop, transpose_arg_static_input_order_constant_invalid_perm) TEST(type_prop, transpose_arg_rank_static_dynamic_input_order_static_ok) { auto arg = make_shared( - element::Type_t::f32, PartialShape{2, Dimension::dynamic(), Dimension::dynamic(), 8}); - auto input_order = make_shared(element::Type_t::i64, Shape{4}); + element::f32, PartialShape{2, Dimension::dynamic(), Dimension::dynamic(), 8}); + auto input_order = make_shared(element::i64, Shape{4}); auto r = make_shared(arg, input_order); - EXPECT_EQ(r->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(r->get_output_element_type(0), element::f32); EXPECT_TRUE(r->get_output_partial_shape(0).same_scheme(PartialShape::dynamic(4))); } TEST(type_prop, transpose_arg_static_input_order_rank_static_dynamic_ok) { - auto arg = make_shared(element::Type_t::f32, Shape{2, 4, 6, 8}); - auto input_order = - make_shared(element::Type_t::i64, PartialShape{Dimension::dynamic()}); + auto arg = make_shared(element::f32, Shape{2, 4, 6, 8}); + auto input_order = make_shared(element::i64, PartialShape{Dimension::dynamic()}); auto r = make_shared(arg, input_order); - EXPECT_EQ(r->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(r->get_output_element_type(0), element::f32); EXPECT_TRUE(r->get_output_partial_shape(0).same_scheme(PartialShape::dynamic(4))); } TEST(type_prop, transpose_arg_rank_static_dynamic_input_order_rank_static_dynamic_ok) { auto arg = make_shared( - element::Type_t::f32, PartialShape{2, Dimension::dynamic(), Dimension::dynamic(), 8}); - auto input_order = - make_shared(element::Type_t::i64, PartialShape{Dimension::dynamic()}); + element::f32, PartialShape{2, Dimension::dynamic(), Dimension::dynamic(), 8}); + auto input_order = make_shared(element::i64, PartialShape{Dimension::dynamic()}); auto r = make_shared(arg, input_order); - EXPECT_EQ(r->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(r->get_output_element_type(0), element::f32); EXPECT_TRUE(r->get_output_partial_shape(0).same_scheme(PartialShape::dynamic(4))); } TEST(type_prop, transpose_arg_rank_dynamic_input_order_rank_static_dynamic_ok) { - auto arg = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto input_order = - make_shared(element::Type_t::i64, PartialShape{Dimension::dynamic()}); + auto arg = make_shared(element::f32, PartialShape::dynamic()); + auto input_order = make_shared(element::i64, PartialShape{Dimension::dynamic()}); auto r = make_shared(arg, input_order); - EXPECT_EQ(r->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(r->get_output_element_type(0), element::f32); EXPECT_TRUE(r->get_output_partial_shape(0).same_scheme(PartialShape::dynamic())); } TEST(type_prop, transpose_arg_rank_dynamic_input_order_rank_dynamic_ok) { - auto arg = make_shared(element::Type_t::f32, PartialShape::dynamic()); - auto input_order = make_shared(element::Type_t::i64, PartialShape::dynamic()); + auto arg = make_shared(element::f32, PartialShape::dynamic()); + auto input_order = make_shared(element::i64, PartialShape::dynamic()); auto r = make_shared(arg, input_order); - EXPECT_EQ(r->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(r->get_output_element_type(0), element::f32); EXPECT_TRUE(r->get_output_partial_shape(0).same_scheme(PartialShape::dynamic())); } TEST(type_prop, transpose_arg_rank_static_dynamic_input_order_rank_dynamic_ok) { auto arg = make_shared( - element::Type_t::f32, PartialShape{2, Dimension::dynamic(), Dimension::dynamic(), 8}); - auto input_order = make_shared(element::Type_t::i64, PartialShape::dynamic()); + element::f32, PartialShape{2, Dimension::dynamic(), Dimension::dynamic(), 8}); + auto input_order = make_shared(element::i64, PartialShape::dynamic()); auto r = make_shared(arg, input_order); - EXPECT_EQ(r->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(r->get_output_element_type(0), element::f32); EXPECT_TRUE(r->get_output_partial_shape(0).same_scheme(PartialShape::dynamic(4))); } TEST(type_prop, transpose_arg_static_input_order_static_input_order_not_vector) { - auto arg = make_shared(element::Type_t::f32, PartialShape{2, 4, 6, 8}); - auto input_order = make_shared(element::Type_t::i64, PartialShape{2, 2}); + auto arg = make_shared(element::f32, PartialShape{2, 4, 6, 8}); + auto input_order = make_shared(element::i64, PartialShape{2, 2}); try { @@ -161,9 +156,9 @@ TEST(type_prop, transpose_arg_static_input_order_static_input_order_not_vector) TEST(type_prop, transpose_arg_static_input_order_rank_static_dynamic_input_order_not_vector) { - auto arg = make_shared(element::Type_t::f32, PartialShape{2, 4, 6, 8}); + auto arg = make_shared(element::f32, PartialShape{2, 4, 6, 8}); auto input_order = - make_shared(element::Type_t::i64, PartialShape{2, Dimension::dynamic()}); + make_shared(element::i64, PartialShape{2, Dimension::dynamic()}); try { @@ -182,8 +177,8 @@ TEST(type_prop, transpose_arg_static_input_order_rank_static_dynamic_input_order TEST(type_prop, transpose_arg_static_input_order_static_input_order_wrong_size) { - auto arg = make_shared(element::Type_t::f32, PartialShape{2, 4, 6, 8}); - auto input_order = make_shared(element::Type_t::i64, PartialShape{5}); + auto arg = make_shared(element::f32, PartialShape{2, 4, 6, 8}); + auto input_order = make_shared(element::i64, PartialShape{5}); try { @@ -205,8 +200,8 @@ TEST(type_prop, transpose_arg_static_input_order_static_input_order_wrong_size) TEST(type_prop, transpose_arg_rank_static_dynamic_input_order_static_input_order_not_vector) { auto arg = make_shared( - element::Type_t::f32, PartialShape{2, Dimension::dynamic(), Dimension::dynamic(), 8}); - auto input_order = make_shared(element::Type_t::i64, PartialShape{2, 2}); + element::f32, PartialShape{2, Dimension::dynamic(), Dimension::dynamic(), 8}); + auto input_order = make_shared(element::i64, PartialShape{2, 2}); try { @@ -227,9 +222,9 @@ TEST(type_prop, transpose_arg_rank_static_dynamic_input_order_rank_static_dynamic_input_order_not_vector) { auto arg = make_shared( - element::Type_t::f32, PartialShape{2, Dimension::dynamic(), Dimension::dynamic(), 8}); + element::f32, PartialShape{2, Dimension::dynamic(), Dimension::dynamic(), 8}); auto input_order = - make_shared(element::Type_t::i64, PartialShape{2, Dimension::dynamic()}); + make_shared(element::i64, PartialShape{2, Dimension::dynamic()}); try { @@ -248,9 +243,9 @@ TEST(type_prop, TEST(type_prop, transpose_arg_rank_dynamic_input_order_rank_static_dynamic_input_order_not_vector) { - auto arg = make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto arg = make_shared(element::f32, PartialShape::dynamic()); auto input_order = - make_shared(element::Type_t::i64, PartialShape{2, Dimension::dynamic()}); + make_shared(element::i64, PartialShape{2, Dimension::dynamic()}); try { @@ -269,19 +264,19 @@ TEST(type_prop, transpose_arg_rank_dynamic_input_order_rank_static_dynamic_input TEST(type_prop, transpose_input_order_et_dynamic_ok) { - auto arg = make_shared(element::Type_t::f32, Shape{2, 4, 6, 8}); - auto input_order = make_shared(element::Type_t::dynamic, Shape{4}); + auto arg = make_shared(element::f32, Shape{2, 4, 6, 8}); + auto input_order = make_shared(element::dynamic, Shape{4}); auto r = make_shared(arg, input_order); - EXPECT_EQ(r->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(r->get_output_element_type(0), element::f32); EXPECT_TRUE(r->get_output_partial_shape(0).same_scheme(PartialShape::dynamic(4))); } TEST(type_prop, transpose_input_order_et_wrong) { - auto arg = make_shared(element::Type_t::f32, Shape{2, 4, 6, 8}); - auto input_order = make_shared(element::Type_t::boolean, Shape{4}); + auto arg = make_shared(element::f32, Shape{2, 4, 6, 8}); + auto input_order = make_shared(element::boolean, Shape{4}); try { @@ -301,12 +296,11 @@ TEST(type_prop, transpose_input_order_et_wrong) TEST(type_prop, transpose_with_empty_order) { - auto arg = make_shared(element::Type_t::f32, Shape{1, 300}); - auto input_order = - make_shared(element::Type_t::i64, Shape({0}), std::vector()); + auto arg = make_shared(element::f32, Shape{1, 300}); + auto input_order = make_shared(element::i64, Shape({0}), std::vector()); auto r = make_shared(arg, input_order); - EXPECT_EQ(r->get_output_element_type(0), element::Type_t::f32); + EXPECT_EQ(r->get_output_element_type(0), element::f32); EXPECT_TRUE(r->get_output_partial_shape(0).same_scheme(PartialShape({300, 1}))); } diff --git a/ngraph/test/type_prop/unary_elementwise.cpp b/ngraph/test/type_prop/unary_elementwise.cpp index aa60efcbd094a7..1cbddb4d3ada05 100644 --- a/ngraph/test/type_prop/unary_elementwise.cpp +++ b/ngraph/test/type_prop/unary_elementwise.cpp @@ -23,7 +23,7 @@ using namespace ngraph; TEST(type_prop, unary_arithmetic_bad_argument_element_types) { - auto tv0_2_4_param = make_shared(element::Type_t::boolean, Shape{2, 4}); + auto tv0_2_4_param = make_shared(element::boolean, Shape{2, 4}); try { auto bc = make_shared(tv0_2_4_param); diff --git a/ngraph/test/type_prop/unsqueeze.cpp b/ngraph/test/type_prop/unsqueeze.cpp index b49e14ae22746e..484a60b0ea1e0e 100644 --- a/ngraph/test/type_prop/unsqueeze.cpp +++ b/ngraph/test/type_prop/unsqueeze.cpp @@ -23,23 +23,23 @@ using namespace ngraph; TEST(type_prop, unsqueeze) { - auto param = make_shared(element::Type_t::f32, Shape{4, 1, 4, 1, 8}); + auto param = make_shared(element::f32, Shape{4, 1, 4, 1, 8}); auto axes_node = - make_shared(element::Type_t::u64, Shape{2}, vector{1, 2}); + make_shared(element::u64, Shape{2}, vector{1, 2}); auto unsqueeze = make_shared(param, axes_node); - ASSERT_EQ(unsqueeze->get_element_type(), element::Type_t::f32); + ASSERT_EQ(unsqueeze->get_element_type(), element::f32); ASSERT_EQ(unsqueeze->get_shape(), (Shape{4, 1, 1, 1, 4, 1, 8})); } TEST(type_prop, unsqueeze_dynamic) { - auto param = make_shared(element::Type_t::f32, PartialShape::dynamic(5)); + auto param = make_shared(element::f32, PartialShape::dynamic(5)); auto axes_node = - make_shared(element::Type_t::u64, Shape{2}, vector{1, 2}); + make_shared(element::u64, Shape{2}, vector{1, 2}); auto unsqueeze = make_shared(param, axes_node); - ASSERT_EQ(unsqueeze->get_element_type(), element::Type_t::f32); + ASSERT_EQ(unsqueeze->get_element_type(), element::f32); EXPECT_TRUE( unsqueeze->get_output_partial_shape(0).same_scheme(PartialShape{Dimension::dynamic(), 1, diff --git a/ngraph/test/type_prop/variadic_split.cpp b/ngraph/test/type_prop/variadic_split.cpp index 63cf9f4fdaf98b..15da2bbcd18fe1 100644 --- a/ngraph/test/type_prop/variadic_split.cpp +++ b/ngraph/test/type_prop/variadic_split.cpp @@ -23,44 +23,44 @@ using namespace ngraph; TEST(type_prop, variadic_split) { - const auto data = make_shared(element::Type_t::i32, Shape{2, 6}); - const auto axis = op::Constant::create(element::Type_t::i64, Shape{}, {1}); - const auto splits = op::Constant::create(element::Type_t::i64, Shape{2}, {2, 4}); + const auto data = make_shared(element::i32, Shape{2, 6}); + const auto axis = op::Constant::create(element::i64, Shape{}, {1}); + const auto splits = op::Constant::create(element::i64, Shape{2}, {2, 4}); const auto split = make_shared(data, axis, splits); EXPECT_EQ(split->outputs().size(), 2); EXPECT_EQ(split->get_output_shape(0), (Shape{2, 2})); EXPECT_EQ(split->get_output_shape(1), (Shape{2, 4})); - EXPECT_EQ(split->get_output_element_type(0), element::Type_t::i32); - EXPECT_EQ(split->get_output_element_type(1), element::Type_t::i32); + EXPECT_EQ(split->get_output_element_type(0), element::i32); + EXPECT_EQ(split->get_output_element_type(1), element::i32); EXPECT_EQ(make_shared( - make_shared(element::Type_t::i32, Shape{12, 6}), - op::Constant::create(element::Type_t::i64, Shape{}, {-2}), - op::Constant::create(element::Type_t::i64, Shape{3}, {7, -1, 2})) + make_shared(element::i32, Shape{12, 6}), + op::Constant::create(element::i64, Shape{}, {-2}), + op::Constant::create(element::i64, Shape{3}, {7, -1, 2})) ->output(1) .get_shape(), (Shape{3, 6})); EXPECT_EQ(make_shared( - make_shared(element::Type_t::i32, Shape{12, 6}), - op::Constant::create(element::Type_t::i64, Shape{}, {-2}), - op::Constant::create(element::Type_t::i64, Shape{3}, {-1, 7, 2})) + make_shared(element::i32, Shape{12, 6}), + op::Constant::create(element::i64, Shape{}, {-2}), + op::Constant::create(element::i64, Shape{3}, {-1, 7, 2})) ->output(0) .get_shape(), (Shape{3, 6})); EXPECT_EQ(make_shared( - make_shared(element::Type_t::i32, Shape{12, 1, 6}), - op::Constant::create(element::Type_t::i64, Shape{1}, {2}), - op::Constant::create(element::Type_t::i64, Shape{3}, {3, 1, 2})) + make_shared(element::i32, Shape{12, 1, 6}), + op::Constant::create(element::i64, Shape{1}, {2}), + op::Constant::create(element::i64, Shape{3}, {3, 1, 2})) ->output(2) .get_shape(), (Shape{12, 1, 2})); EXPECT_EQ(make_shared( - make_shared(element::Type_t::i32, Shape{12, 6}), - op::Constant::create(element::Type_t::i64, Shape{1}, {1}), - op::Constant::create(element::Type_t::i64, Shape{2}, {6, 0})) + make_shared(element::i32, Shape{12, 6}), + op::Constant::create(element::i64, Shape{1}, {1}), + op::Constant::create(element::i64, Shape{2}, {6, 0})) ->output(1) .get_shape(), (Shape{12, 0})); @@ -68,13 +68,12 @@ TEST(type_prop, variadic_split) TEST(type_prop, variadic_split_splits_rank) { - const auto data = make_shared(element::Type_t::i32, Shape{2, 6}); + const auto data = make_shared(element::i32, Shape{2, 6}); try { - const auto axis = op::Constant::create(element::Type_t::i64, Shape{}, {1}); - const auto splits = - op::Constant::create(element::Type_t::i64, Shape{1, 2}, {2, 4}); + const auto axis = op::Constant::create(element::i64, Shape{}, {1}); + const auto splits = op::Constant::create(element::i64, Shape{1, 2}, {2, 4}); const auto split = make_shared(data, axis, splits); FAIL() << "Split node was created with incorrect data."; } @@ -87,12 +86,12 @@ TEST(type_prop, variadic_split_splits_rank) TEST(type_prop, variadic_split_incorrect_sum) { - const auto data = make_shared(element::Type_t::i32, Shape{2, 6}); + const auto data = make_shared(element::i32, Shape{2, 6}); try { - const auto axis = op::Constant::create(element::Type_t::i64, Shape{}, {1}); - const auto splits = op::Constant::create(element::Type_t::i64, Shape{2}, {1, 6}); + const auto axis = op::Constant::create(element::i64, Shape{}, {1}); + const auto splits = op::Constant::create(element::i64, Shape{2}, {1, 6}); const auto split = make_shared(data, axis, splits); FAIL() << "Split node was created with incorrect data."; } @@ -106,12 +105,12 @@ TEST(type_prop, variadic_split_incorrect_sum) TEST(type_prop, variadic_split_incorrect_axis) { - const auto data = make_shared(element::Type_t::i32, Shape{2, 6}); + const auto data = make_shared(element::i32, Shape{2, 6}); try { - const auto axis = op::Constant::create(element::Type_t::i64, Shape{}, {-5}); - const auto splits = op::Constant::create(element::Type_t::i64, Shape{2}, {2, 4}); + const auto axis = op::Constant::create(element::i64, Shape{}, {-5}); + const auto splits = op::Constant::create(element::i64, Shape{2}, {2, 4}); const auto split = make_shared(data, axis, splits); FAIL() << "Split node was created with incorrect data."; } @@ -124,12 +123,12 @@ TEST(type_prop, variadic_split_incorrect_axis) TEST(type_prop, variadic_split_splits_invalid_negative) { - const auto data = make_shared(element::Type_t::i32, Shape{2, 6}); + const auto data = make_shared(element::i32, Shape{2, 6}); try { - const auto axis = op::Constant::create(element::Type_t::i64, Shape{}, {1}); - const auto splits = op::Constant::create(element::Type_t::i64, Shape{2}, {-2, 4}); + const auto axis = op::Constant::create(element::i64, Shape{}, {1}); + const auto splits = op::Constant::create(element::i64, Shape{2}, {-2, 4}); const auto split = make_shared(data, axis, splits); FAIL() << "Split node was created with incorrect data."; } @@ -142,13 +141,12 @@ TEST(type_prop, variadic_split_splits_invalid_negative) TEST(type_prop, variadic_split_splits_multiple_negatives) { - const auto data = make_shared(element::Type_t::i32, Shape{2, 6}); + const auto data = make_shared(element::i32, Shape{2, 6}); try { - const auto axis = op::Constant::create(element::Type_t::i64, Shape{}, {1}); - const auto splits = - op::Constant::create(element::Type_t::i64, Shape{3}, {-1, -1, 3}); + const auto axis = op::Constant::create(element::i64, Shape{}, {1}); + const auto splits = op::Constant::create(element::i64, Shape{3}, {-1, -1, 3}); const auto split = make_shared(data, axis, splits); FAIL() << "Split node was created with incorrect data."; } @@ -163,9 +161,9 @@ TEST(type_prop, variadic_split_shape_partially_dynamic) { // Variadic split shape {12,?} into {7,?}, {3,?} and {2,?} auto var_split1 = make_shared( - make_shared(element::Type_t::i32, PartialShape{12, Dimension()}), - op::Constant::create(element::Type_t::i64, Shape{}, {-2}), - op::Constant::create(element::Type_t::i64, Shape{3}, {7, -1, 2})); + make_shared(element::i32, PartialShape{12, Dimension()}), + op::Constant::create(element::i64, Shape{}, {-2}), + op::Constant::create(element::i64, Shape{3}, {7, -1, 2})); EXPECT_TRUE( var_split1->get_output_partial_shape(0).same_scheme(PartialShape{7, Dimension::dynamic()})); @@ -176,9 +174,9 @@ TEST(type_prop, variadic_split_shape_partially_dynamic) // Variadic split shape {?,?,6} into {?,?,3}, {?,?,1} and {?,?,2} auto var_split2 = make_shared( - make_shared(element::Type_t::i32, PartialShape{Dimension(), Dimension(), 6}), - op::Constant::create(element::Type_t::i64, Shape{}, {2}), - op::Constant::create(element::Type_t::i64, Shape{3}, {3, 1, 2})); + make_shared(element::i32, PartialShape{Dimension(), Dimension(), 6}), + op::Constant::create(element::i64, Shape{}, {2}), + op::Constant::create(element::i64, Shape{3}, {3, 1, 2})); EXPECT_TRUE(var_split2->get_output_partial_shape(0).same_scheme( PartialShape{Dimension::dynamic(), Dimension::dynamic(), 3})); @@ -189,9 +187,9 @@ TEST(type_prop, variadic_split_shape_partially_dynamic) // Variadic split shape {?,6} into {?,6}, and {?,0} auto var_split3 = make_shared( - make_shared(element::Type_t::i32, PartialShape{Dimension(), 6}), - op::Constant::create(element::Type_t::i64, Shape{}, {1}), - op::Constant::create(element::Type_t::i64, Shape{2}, {6, 0})); + make_shared(element::i32, PartialShape{Dimension(), 6}), + op::Constant::create(element::i64, Shape{}, {1}), + op::Constant::create(element::i64, Shape{2}, {6, 0})); EXPECT_TRUE( var_split3->get_output_partial_shape(0).same_scheme(PartialShape{Dimension::dynamic(), 6})); diff --git a/ngraph/test/type_prop_layers.cpp b/ngraph/test/type_prop_layers.cpp index 2841deb129dcc9..1e2c0f01a79ea4 100644 --- a/ngraph/test/type_prop_layers.cpp +++ b/ngraph/test/type_prop_layers.cpp @@ -33,19 +33,19 @@ using namespace ngraph; TEST(type_prop_layers, ctc_greedy_decoder) { - auto input = make_shared(element::Type_t::f32, Shape{88, 2, 48}); - auto seq_len = make_shared(element::Type_t::f32, Shape{88, 2}); + auto input = make_shared(element::f32, Shape{88, 2, 48}); + auto seq_len = make_shared(element::f32, Shape{88, 2}); auto op = make_shared(input, seq_len, false); ASSERT_EQ(op->get_shape(), (Shape{2, 88, 1, 1})); } TEST(type_prop_layers, detection_output) { - auto box_logits = make_shared(element::Type_t::f32, Shape{4, 1, 5, 5}); - auto class_preds = make_shared(element::Type_t::f32, Shape{2, 1, 4, 5}); - auto proposals = make_shared(element::Type_t::f32, Shape{2, 1, 4, 5}); - auto aux_class_preds = make_shared(element::Type_t::f32, Shape{2, 1, 4, 5}); - auto aux_box_preds = make_shared(element::Type_t::f32, Shape{2, 1, 4, 5}); + auto box_logits = make_shared(element::f32, Shape{4, 1, 5, 5}); + auto class_preds = make_shared(element::f32, Shape{2, 1, 4, 5}); + auto proposals = make_shared(element::f32, Shape{2, 1, 4, 5}); + auto aux_class_preds = make_shared(element::f32, Shape{2, 1, 4, 5}); + auto aux_box_preds = make_shared(element::f32, Shape{2, 1, 4, 5}); op::DetectionOutputAttrs attrs; attrs.keep_top_k = {200}; auto op = make_shared( @@ -55,9 +55,9 @@ TEST(type_prop_layers, detection_output) TEST(type_prop_layers, interpolate) { - auto image = make_shared(element::Type_t::f32, Shape{2, 2, 33, 65}); - auto dyn_output_shape = make_shared(element::Type_t::i64, Shape{2}); - auto output_shape = op::v0::Constant::create(element::Type_t::i64, Shape{2}, {15, 30}); + auto image = make_shared(element::f32, Shape{2, 2, 33, 65}); + auto dyn_output_shape = make_shared(element::i64, Shape{2}); + auto output_shape = op::v0::Constant::create(element::i64, Shape{2}, {15, 30}); op::v0::InterpolateAttrs attrs; attrs.axes = {2, 3}; @@ -80,8 +80,8 @@ TEST(type_prop_layers, prior_box1) attrs.min_size = {2.0f, 3.0f}; attrs.aspect_ratio = {1.5f, 2.0f, 2.5f}; - auto layer_shape = op::Constant::create(element::Type_t::i64, Shape{2}, {32, 32}); - auto image_shape = op::Constant::create(element::Type_t::i64, Shape{2}, {300, 300}); + auto layer_shape = op::Constant::create(element::i64, Shape{2}, {32, 32}); + auto image_shape = op::Constant::create(element::i64, Shape{2}, {300, 300}); auto pb = make_shared(layer_shape, image_shape, attrs); ASSERT_EQ(pb->get_shape(), (Shape{2, 20480})); } @@ -93,8 +93,8 @@ TEST(type_prop_layers, prior_box2) attrs.aspect_ratio = {1.5f, 2.0f, 2.5f}; attrs.flip = true; - auto layer_shape = op::Constant::create(element::Type_t::i64, Shape{2}, {32, 32}); - auto image_shape = op::Constant::create(element::Type_t::i64, Shape{2}, {300, 300}); + auto layer_shape = op::Constant::create(element::i64, Shape{2}, {32, 32}); + auto image_shape = op::Constant::create(element::i64, Shape{2}, {300, 300}); auto pb = make_shared(layer_shape, image_shape, attrs); ASSERT_EQ(pb->get_shape(), (Shape{2, 32768})); } @@ -108,8 +108,8 @@ TEST(type_prop_layers, prior_box3) attrs.flip = true; attrs.scale_all_sizes = true; - auto layer_shape = op::Constant::create(element::Type_t::i64, Shape{2}, {1, 1}); - auto image_shape = op::Constant::create(element::Type_t::i64, Shape{2}, {300, 300}); + auto layer_shape = op::Constant::create(element::i64, Shape{2}, {1, 1}); + auto image_shape = op::Constant::create(element::i64, Shape{2}, {300, 300}); auto pb = make_shared(layer_shape, image_shape, attrs); ASSERT_EQ(pb->get_shape(), (Shape{2, 16})); } @@ -120,8 +120,8 @@ TEST(type_prop_layers, prior_box_clustered) attrs.widths = {4.0f, 2.0f, 3.2f}; attrs.heights = {1.0f, 2.0f, 1.1f}; - auto layer_shape = op::Constant::create(element::Type_t::i64, Shape{2}, {19, 19}); - auto image_shape = op::Constant::create(element::Type_t::i64, Shape{2}, {300, 300}); + auto layer_shape = op::Constant::create(element::i64, Shape{2}, {19, 19}); + auto image_shape = op::Constant::create(element::i64, Shape{2}, {300, 300}); auto pbc = make_shared(layer_shape, image_shape, attrs); // Output shape - 4 * 19 * 19 * 3 (attrs.widths.size()) ASSERT_EQ(pbc->get_shape(), (Shape{2, 4332})); @@ -129,21 +129,21 @@ TEST(type_prop_layers, prior_box_clustered) TEST(type_prop_layers, region_yolo1) { - auto inputs = make_shared(element::Type_t::f32, Shape{1, 125, 13, 13}); + auto inputs = make_shared(element::f32, Shape{1, 125, 13, 13}); auto op = make_shared(inputs, 0, 0, 0, true, std::vector{}, 0, 1); ASSERT_EQ(op->get_shape(), (Shape{1 * 125, 13, 13})); } TEST(type_prop_layers, region_yolo2) { - auto inputs = make_shared(element::Type_t::f32, Shape{1, 125, 13, 13}); + auto inputs = make_shared(element::f32, Shape{1, 125, 13, 13}); auto op = make_shared(inputs, 0, 0, 0, true, std::vector{}, 0, 2); ASSERT_EQ(op->get_shape(), (Shape{1 * 125 * 13, 13})); } TEST(type_prop_layers, region_yolo3) { - auto inputs = make_shared(element::Type_t::f32, Shape{1, 125, 13, 13}); + auto inputs = make_shared(element::f32, Shape{1, 125, 13, 13}); auto op = make_shared(inputs, 4, 80, 1, false, std::vector{6, 7, 8}, 0, -1); ASSERT_EQ(op->get_shape(), (Shape{1, (80 + 4 + 1) * 3, 13, 13})); @@ -151,23 +151,23 @@ TEST(type_prop_layers, region_yolo3) TEST(type_prop_layers, reorg_yolo) { - auto inputs = make_shared(element::Type_t::f32, Shape{2, 24, 34, 62}); + auto inputs = make_shared(element::f32, Shape{2, 24, 34, 62}); auto op = make_shared(inputs, Strides{2}); ASSERT_EQ(op->get_shape(), (Shape{2, 96, 17, 31})); } TEST(type_prop_layers, psroi_pooling) { - auto inputs = make_shared(element::Type_t::f32, Shape{1, 3, 4, 5}); - auto coords = make_shared(element::Type_t::f32, Shape{150, 5}); + auto inputs = make_shared(element::f32, Shape{1, 3, 4, 5}); + auto coords = make_shared(element::f32, Shape{150, 5}); auto op = make_shared(inputs, coords, 2, 6, 0.0625, 0, 0, "Avg"); ASSERT_EQ(op->get_shape(), (Shape{150, 2, 6, 6})); } TEST(type_prop_layers, roi_pooling) { - auto inputs = make_shared(element::Type_t::f32, Shape{2, 3, 4, 5}); - auto coords = make_shared(element::Type_t::f32, Shape{150, 5}); + auto inputs = make_shared(element::f32, Shape{2, 3, 4, 5}); + auto coords = make_shared(element::f32, Shape{150, 5}); auto op = make_shared(inputs, coords, Shape{6, 6}, 0.0625, "max"); ASSERT_EQ(op->get_shape(), (Shape{150, 3, 6, 6})); } diff --git a/ngraph/test/util.cpp b/ngraph/test/util.cpp index 311f0385145a21..0143613fe3b6e8 100644 --- a/ngraph/test/util.cpp +++ b/ngraph/test/util.cpp @@ -145,15 +145,15 @@ TEST(util, all_close) auto backend = runtime::Backend::create("INTERPRETER"); // Create some tensors for input/output - auto a = backend->create_tensor(element::Type_t::f32, Shape{2, 3}); - auto b = backend->create_tensor(element::Type_t::f32, Shape{2, 3}); + auto a = backend->create_tensor(element::f32, Shape{2, 3}); + auto b = backend->create_tensor(element::f32, Shape{2, 3}); copy_data(a, test::NDArray({{1, 2, 3}, {3, 4, 5}}).get_vector()); copy_data(b, test::NDArray({{1, 2, 3}, {3, 4, 5}}).get_vector()); EXPECT_TRUE(ngraph::test::all_close(a, b)); - auto c = backend->create_tensor(element::Type_t::f32, Shape{2, 3}); + auto c = backend->create_tensor(element::f32, Shape{2, 3}); copy_data(c, test::NDArray({{1.1f, 2, 3}, {3, 4, 5}}).get_vector()); EXPECT_FALSE(ngraph::test::all_close(c, a, 0, .05f)); @@ -169,9 +169,9 @@ class CloneTest : public ::testing::Test public: // (A + B) * C Shape shape = Shape{2, 2}; - std::shared_ptr A = make_shared(element::Type_t::f32, shape); - std::shared_ptr B = make_shared(element::Type_t::f32, shape); - std::shared_ptr C = make_shared(element::Type_t::f32, shape); + std::shared_ptr A = make_shared(element::f32, shape); + std::shared_ptr B = make_shared(element::f32, shape); + std::shared_ptr C = make_shared(element::f32, shape); std::shared_ptr AplusB = make_shared(A, B); std::shared_ptr AplusBtimesC = make_shared(AplusB, C); @@ -231,7 +231,7 @@ TEST_F(CloneTest, clone_nodes_full) TEST_F(CloneTest, clone_nodes_partial) { // map A -> A' prior to clone - auto Aprime = make_shared(element::Type_t::f32, shape); + auto Aprime = make_shared(element::f32, shape); node_map[A.get()] = Aprime; auto cloned_nodes = clone_nodes(nodes, node_map); @@ -250,9 +250,9 @@ TEST_F(CloneTest, clone_function_full) TEST(graph_util, clone_multiple_results) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); - auto C = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); + auto C = make_shared(element::f32, shape); auto A_add_B = make_shared(A, B); auto A_add_B_mul_C = make_shared(A_add_B, C); @@ -294,7 +294,7 @@ TEST(graph_util, get_subgraph_outputs_trivial_tests) ASSERT_EQ(outputs.size(), 0); Shape shape{}; - auto A = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); auto absn = make_shared(A); auto neg_absn = make_shared(absn); outputs = ngraph::get_subgraph_outputs(NodeVector{A}, NodeVector{}); @@ -306,7 +306,7 @@ TEST(graph_util, get_subgraph_outputs_trivial_tests) outputs = ngraph::get_subgraph_outputs(NodeVector{A, absn}, NodeVector{}); ASSERT_EQ(outputs, (NodeVector{absn})); - auto B = make_shared(element::Type_t::f32, shape); + auto B = make_shared(element::f32, shape); auto abs_b = make_shared(B); auto neg_b = make_shared(B); auto abs_b_neg = make_shared(abs_b); @@ -332,9 +332,9 @@ TEST(graph_util, get_subgraph_outputs_trivial_tests) TEST(graph_util, test_subgraph_topological_sort) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); - auto C = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); + auto C = make_shared(element::f32, shape); auto add = make_shared(A, B); auto mul = make_shared(C, add); auto result = make_shared(mul); @@ -346,9 +346,9 @@ TEST(graph_util, test_subgraph_topological_sort) TEST(graph_util, test_subgraph_topological_sort_control_dependencies) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); - auto C = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); + auto C = make_shared(element::f32, shape); auto D = make_shared(A); auto E = make_shared(B); auto add = make_shared(A, B); @@ -509,7 +509,7 @@ TEST(graph, huge) { std::vector> weak_nodes; { - auto param = make_shared(element::Type_t::f32, Shape{3, 3}); + auto param = make_shared(element::f32, Shape{3, 3}); std::shared_ptr n = param; weak_nodes.push_back(n); for (size_t i = 0; i < 1000000; i++) @@ -600,8 +600,8 @@ TEST(util, apply_permutation_pshape_rank_dynamic_inviable_permutation_fails) TEST(util, clone_function_friendly_name) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); auto f = make_shared(make_shared(A, B), ParameterVector{A, B}); A->set_friendly_name("A"); @@ -623,9 +623,9 @@ TEST(util, clone_function_friendly_name) TEST(util, clone_function_op_annotations) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); - auto C = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); + auto C = make_shared(element::f32, shape); auto f = make_shared(make_shared(make_shared(A, B), C), ParameterVector{A, B, C}); @@ -662,9 +662,9 @@ TEST(util, clone_function_op_annotations) TEST(util, topological_sort_replace) { Shape shape{2, 2}; - auto A = make_shared(element::Type_t::f32, shape); - auto B = make_shared(element::Type_t::f32, shape); - auto C = make_shared(element::Type_t::f32, shape); + auto A = make_shared(element::f32, shape); + auto B = make_shared(element::f32, shape); + auto C = make_shared(element::f32, shape); auto f = make_shared(make_shared(make_shared(A, B), C), ParameterVector{A, B, C}); bool custom_sorter_used = false; @@ -756,7 +756,7 @@ TEST(util_host_tensor_2_vector, ht_boolean_2_vec_bool) vector input{1, 0, 1, 0}; vector output{true, false, true, false}; host_tensor_2_vector_test( - input, output, element::Type_t::boolean); + input, output, element::boolean); } TEST(util_host_tensor_2_vector, ht_boolean_2_vec_int64) @@ -764,7 +764,7 @@ TEST(util_host_tensor_2_vector, ht_boolean_2_vec_int64) vector input{1, 0, 1, 0}; vector output{true, false, true, false}; host_tensor_2_vector_test( - input, output, element::Type_t::boolean); + input, output, element::boolean); } TEST(util_host_tensor_2_vector, ht_i8_2_vec_int64) @@ -774,7 +774,7 @@ TEST(util_host_tensor_2_vector, ht_i8_2_vec_int64) vector output{ 0, 1, std::numeric_limits::min(), std::numeric_limits::max()}; host_tensor_2_vector_test( - input, output, element::Type_t::i8); + input, output, element::i8); } TEST(util_host_tensor_2_vector, ht_i16_2_vec_int64) @@ -784,7 +784,7 @@ TEST(util_host_tensor_2_vector, ht_i16_2_vec_int64) vector output{ 0, 1, std::numeric_limits::min(), std::numeric_limits::max()}; host_tensor_2_vector_test( - input, output, element::Type_t::i16); + input, output, element::i16); } TEST(util_host_tensor_2_vector, ht_i32_2_vec_int64) @@ -794,7 +794,7 @@ TEST(util_host_tensor_2_vector, ht_i32_2_vec_int64) vector output{ 0, 1, std::numeric_limits::min(), std::numeric_limits::max()}; host_tensor_2_vector_test( - input, output, element::Type_t::i32); + input, output, element::i32); } TEST(util_host_tensor_2_vector, ht_i64_2_vec_int64) @@ -803,7 +803,7 @@ TEST(util_host_tensor_2_vector, ht_i64_2_vec_int64) 0, 1, std::numeric_limits::min(), std::numeric_limits::max()}; vector output{input}; host_tensor_2_vector_test( - input, output, element::Type_t::i64); + input, output, element::i64); } TEST(util_host_tensor_2_vector, ht_bf16_2_vec_double) @@ -813,7 +813,7 @@ TEST(util_host_tensor_2_vector, ht_bf16_2_vec_double) vector output{ 0, 1, std::numeric_limits::min(), std::numeric_limits::max()}; host_tensor_2_vector_test( - input, output, element::Type_t::bf16); + input, output, element::bf16); } TEST(util_host_tensor_2_vector, ht_f16_2_vec_double) @@ -823,7 +823,7 @@ TEST(util_host_tensor_2_vector, ht_f16_2_vec_double) vector output{ 0, 1, std::numeric_limits::min(), std::numeric_limits::max()}; host_tensor_2_vector_test( - input, output, element::Type_t::f16); + input, output, element::f16); } TEST(util_host_tensor_2_vector, ht_f32_2_vec_double) @@ -832,7 +832,7 @@ TEST(util_host_tensor_2_vector, ht_f32_2_vec_double) vector output{ 0, 1, std::numeric_limits::min(), std::numeric_limits::max()}; host_tensor_2_vector_test( - input, output, element::Type_t::f32); + input, output, element::f32); } TEST(util_host_tensor_2_vector, ht_f64_2_vec_double) @@ -842,7 +842,7 @@ TEST(util_host_tensor_2_vector, ht_f64_2_vec_double) vector output{ 0, 1, std::numeric_limits::min(), std::numeric_limits::max()}; host_tensor_2_vector_test( - input, output, element::Type_t::f64); + input, output, element::f64); } TEST(util_host_tensor_2_vector, ht_u8_2_vec_uint64) @@ -852,7 +852,7 @@ TEST(util_host_tensor_2_vector, ht_u8_2_vec_uint64) vector output{ 0, 1, std::numeric_limits::min(), std::numeric_limits::max()}; host_tensor_2_vector_test( - input, output, element::Type_t::u8); + input, output, element::u8); } TEST(util_host_tensor_2_vector, ht_u16_2_vec_uint64) @@ -862,7 +862,7 @@ TEST(util_host_tensor_2_vector, ht_u16_2_vec_uint64) vector output{ 0, 1, std::numeric_limits::min(), std::numeric_limits::max()}; host_tensor_2_vector_test( - input, output, element::Type_t::u16); + input, output, element::u16); } TEST(util_host_tensor_2_vector, ht_u32_2_vec_uint64) @@ -872,7 +872,7 @@ TEST(util_host_tensor_2_vector, ht_u32_2_vec_uint64) vector output{ 0, 1, std::numeric_limits::min(), std::numeric_limits::max()}; host_tensor_2_vector_test( - input, output, element::Type_t::u32); + input, output, element::u32); } TEST(util_host_tensor_2_vector, ht_u64_2_vec_uint64) @@ -881,5 +881,5 @@ TEST(util_host_tensor_2_vector, ht_u64_2_vec_uint64) 0, 1, std::numeric_limits::min(), std::numeric_limits::max()}; vector output{input}; host_tensor_2_vector_test( - input, output, element::Type_t::u64); + input, output, element::u64); } diff --git a/ngraph/test/util/test_tools.cpp b/ngraph/test/util/test_tools.cpp index 75e8705b781701..37ddf5f6763f8d 100644 --- a/ngraph/test/util/test_tools.cpp +++ b/ngraph/test/util/test_tools.cpp @@ -62,12 +62,12 @@ bool validate_list(const vector>& nodes) shared_ptr make_test_graph() { - auto arg_0 = make_shared(element::Type_t::f32, Shape{2, 2}); - auto arg_1 = make_shared(element::Type_t::f32, Shape{2, 2}); - auto arg_2 = make_shared(element::Type_t::f32, Shape{2, 2}); - auto arg_3 = make_shared(element::Type_t::f32, Shape{2, 2}); - auto arg_4 = make_shared(element::Type_t::f32, Shape{2, 2}); - auto arg_5 = make_shared(element::Type_t::f32, Shape{2, 2}); + auto arg_0 = make_shared(element::f32, Shape{2, 2}); + auto arg_1 = make_shared(element::f32, Shape{2, 2}); + auto arg_2 = make_shared(element::f32, Shape{2, 2}); + auto arg_3 = make_shared(element::f32, Shape{2, 2}); + auto arg_4 = make_shared(element::f32, Shape{2, 2}); + auto arg_5 = make_shared(element::f32, Shape{2, 2}); auto t0 = make_shared(arg_0, arg_1); auto t1 = make_shared(t0, arg_2); @@ -141,47 +141,47 @@ void init_int_tv(ngraph::runtime::Tensor* tv, void random_init(ngraph::runtime::Tensor* tv, std::default_random_engine& engine) { element::Type et = tv->get_element_type(); - if (et == element::Type_t::boolean) + if (et == element::boolean) { init_int_tv(tv, engine, 0, 1); } - else if (et == element::Type_t::f32) + else if (et == element::f32) { init_real_tv(tv, engine, numeric_limits::min(), 1.0f); } - else if (et == element::Type_t::f64) + else if (et == element::f64) { init_real_tv(tv, engine, numeric_limits::min(), 1.0); } - else if (et == element::Type_t::i8) + else if (et == element::i8) { init_int_tv(tv, engine, -1, 1); } - else if (et == element::Type_t::i16) + else if (et == element::i16) { init_int_tv(tv, engine, -1, 1); } - else if (et == element::Type_t::i32) + else if (et == element::i32) { init_int_tv(tv, engine, 0, 1); } - else if (et == element::Type_t::i64) + else if (et == element::i64) { init_int_tv(tv, engine, 0, 1); } - else if (et == element::Type_t::u8) + else if (et == element::u8) { init_int_tv(tv, engine, 0, 1); } - else if (et == element::Type_t::u16) + else if (et == element::u16) { init_int_tv(tv, engine, 0, 1); } - else if (et == element::Type_t::u32) + else if (et == element::u32) { init_int_tv(tv, engine, 0, 1); } - else if (et == element::Type_t::u64) + else if (et == element::u64) { init_int_tv(tv, engine, 0, 1); } diff --git a/ngraph/test/util/visitor.hpp b/ngraph/test/util/visitor.hpp index c366a84beafd0d..f9a01cd07c60c2 100644 --- a/ngraph/test/util/visitor.hpp +++ b/ngraph/test/util/visitor.hpp @@ -333,7 +333,7 @@ namespace ngraph void on_adapter(const std::string& name, ValueAccessor& adapter) override { HostTensorPtr data = - std::make_shared(element::Type_t::u8, Shape{adapter.size()}); + std::make_shared(element::u8, Shape{adapter.size()}); data->write(adapter.get_ptr(), adapter.size()); m_values.insert(name, data); } From 29b8ffa40b03721ad405b31c1b5b6ce433785670 Mon Sep 17 00:00:00 2001 From: Liubov Batanina Date: Fri, 4 Dec 2020 13:56:01 +0300 Subject: [PATCH 013/244] Fixed ReduceL2Decomposition (#3452) * Fixed ReduceL2Decomposition * Added test --- .../op_conversions/reduce_l2_decomposition.cpp | 2 +- .../transformations/reduce_l2_decomposition_test.cpp | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/inference-engine/src/transformations/src/transformations/op_conversions/reduce_l2_decomposition.cpp b/inference-engine/src/transformations/src/transformations/op_conversions/reduce_l2_decomposition.cpp index 14ebe79551376d..bcd6b4e0ca9db3 100644 --- a/inference-engine/src/transformations/src/transformations/op_conversions/reduce_l2_decomposition.cpp +++ b/inference-engine/src/transformations/src/transformations/op_conversions/reduce_l2_decomposition.cpp @@ -28,7 +28,7 @@ ngraph::pass::ReduceL2Decomposition::ReduceL2Decomposition() { auto square = std::make_shared(reduce_l2_node->input_value(0), const_2); auto reduce_sum = register_new_node(square, reduce_l2_node->input_value(1), reduce_l2_node->get_keep_dims()); auto sqrt = std::make_shared(reduce_sum); - reduce_sum->set_friendly_name(m.get_match_root()->get_friendly_name()); + sqrt->set_friendly_name(m.get_match_root()->get_friendly_name()); ngraph::copy_runtime_info(reduce_l2_node, {sqrt, reduce_sum, square, const_2}); ngraph::replace_node(m.get_match_root(), sqrt); diff --git a/inference-engine/tests/functional/inference_engine/transformations/reduce_l2_decomposition_test.cpp b/inference-engine/tests/functional/inference_engine/transformations/reduce_l2_decomposition_test.cpp index 31a4d47256659b..38e968eae4f183 100644 --- a/inference-engine/tests/functional/inference_engine/transformations/reduce_l2_decomposition_test.cpp +++ b/inference-engine/tests/functional/inference_engine/transformations/reduce_l2_decomposition_test.cpp @@ -23,10 +23,10 @@ TEST(TransformationTests, ReduceL2DecompositionTest) { { auto data = std::make_shared(ngraph::element::f32, ngraph::PartialShape::dynamic(1)); auto axes = std::make_shared(ngraph::element::i32, ngraph::Shape{1}); - auto reduce_l1 = std::make_shared(data, axes, true); - - f = std::make_shared(ngraph::NodeVector{reduce_l1}, ngraph::ParameterVector{data, axes}); + auto reduce_l2 = std::make_shared(data, axes, true); + reduce_l2->set_friendly_name("reduce_l2"); + f = std::make_shared(ngraph::NodeVector{reduce_l2}, ngraph::ParameterVector{data, axes}); ngraph::pass::Manager manager; manager.register_pass(); manager.register_pass(); @@ -46,4 +46,8 @@ TEST(TransformationTests, ReduceL2DecompositionTest) { auto res = compare_functions(f, f_ref); ASSERT_TRUE(res.first) << res.second; + + auto result_node_of_converted_f = f->get_output_op(0); + auto output_node = result_node_of_converted_f->input(0).get_source_output().get_node_shared_ptr(); + ASSERT_TRUE(output_node->get_friendly_name() == "reduce_l2") << "Transformation ReduceL2Decomposition should keep output names.\n"; } From 2da6546841a25318be17362c7125194e7525c932 Mon Sep 17 00:00:00 2001 From: Bartosz Lesniewski Date: Fri, 4 Dec 2020 17:49:36 +0100 Subject: [PATCH 014/244] Remove ops from Layer Creator/ Node Converter - part 2 (#3226) * remove power op from layer creator * remove prelu op from layer creator * remove tile op from layer creator * remove relu op from layer creator * remove selu op from layer creator * remove softmax op from layer creator * remove tanh op from layer creator * remove split op from layer creator * remove reshape op from layer creator * remove reverse sequence op from layer creator * remove proposal op from layer creator * remove priorbox op from layer creator * remove roipooling op from layer creator * remove priorboxclustered op from layer creator * style fix * utility function to parse bool-containing strings * align priorbox scale_all_sizes parameter to specification * change location of getBoolStrParamAsIntStr function * align prelu creator to new constant op changes * adjust priorbox tests to align with scale_all_sizes default value * adjust priorbox python tests to align with scale_all_sizes default value * align priorboxclustered attributes initlialization to specification * fix checking wrong container's end iterator for opset name search * improve comment on roipooling parameters * Apply review suggestion 1 Co-authored-by: Ilya Churaev * Apply review suggestion 2 Co-authored-by: Ilya Churaev * align priorbox step initial value to specification * align roipooling method attribute to specification * remove roipooling specific creator * align with review comments Co-authored-by: Ilya Churaev --- .../src/legacy_api/include/legacy/ie_layers.h | 9 + .../ngraph_ops/prior_box_clustered_ie.hpp | 2 +- .../legacy/ngraph_ops/prior_box_ie.hpp | 1 + .../include/legacy/ngraph_ops/proposal_ie.hpp | 2 +- .../include/legacy/ngraph_ops/selu_ie.hpp | 2 +- .../include/legacy/ngraph_ops/tile_ie.hpp | 2 +- .../src/convert_function_to_cnn_network.cpp | 242 +++++++++++--- .../src/ie_cnn_layer_builder_ngraph.cpp | 306 ------------------ .../src/legacy_api/src/ie_layers.cpp | 10 + .../src/ngraph_ops/prior_box_clustered_ie.cpp | 24 ++ .../src/ngraph_ops/prior_box_ie.cpp | 16 + .../legacy_api/src/ngraph_ops/proposal_ie.cpp | 18 ++ .../src/legacy_api/src/ngraph_ops/selu_ie.cpp | 6 + .../src/legacy_api/src/ngraph_ops/tile_ie.cpp | 6 + .../src/readers/ir_reader/ie_ir_parser.cpp | 204 +----------- .../functional_test_utils/network_utils.cpp | 3 + ngraph/core/include/ngraph/op/prior_box.hpp | 4 +- .../include/ngraph/op/prior_box_clustered.hpp | 6 +- ngraph/core/include/ngraph/op/relu.hpp | 1 + .../include/ngraph/op/reverse_sequence.hpp | 2 +- ngraph/core/include/ngraph/op/roi_pooling.hpp | 4 +- ngraph/core/include/ngraph/opsets/opset.hpp | 2 +- ngraph/core/src/op/prior_box_clustered.cpp | 28 +- ngraph/core/src/op/relu.cpp | 5 + ngraph/core/src/op/roi_pooling.cpp | 2 + .../tests/test_ngraph/test_create_op.py | 5 +- ngraph/test/type_prop_layers.cpp | 3 +- 27 files changed, 353 insertions(+), 562 deletions(-) diff --git a/inference-engine/src/legacy_api/include/legacy/ie_layers.h b/inference-engine/src/legacy_api/include/legacy/ie_layers.h index b298ac969fa6b3..9766715814204e 100644 --- a/inference-engine/src/legacy_api/include/legacy/ie_layers.h +++ b/inference-engine/src/legacy_api/include/legacy/ie_layers.h @@ -361,6 +361,15 @@ class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(CNNLayer) { */ std::string GetParamAsString(const char* param) const; + /** + * @brief Returns a string containing an integer if parameters value was + * "true" or "false" + * + * @param param Name of the layer parameter + * @return A string containing an integer or the parameter as string + */ + std::string getBoolStrParamAsIntStr(const char *param) const; + /** * @brief Gets the parameter as a std::vector * @param param The parameter name diff --git a/inference-engine/src/legacy_api/include/legacy/ngraph_ops/prior_box_clustered_ie.hpp b/inference-engine/src/legacy_api/include/legacy/ngraph_ops/prior_box_clustered_ie.hpp index 9f1193ca6bfc2a..ff785c89308c01 100644 --- a/inference-engine/src/legacy_api/include/legacy/ngraph_ops/prior_box_clustered_ie.hpp +++ b/inference-engine/src/legacy_api/include/legacy/ngraph_ops/prior_box_clustered_ie.hpp @@ -31,7 +31,7 @@ class INFERENCE_ENGINE_API_CLASS(PriorBoxClusteredIE) : public Op { void validate_and_infer_types() override; std::shared_ptr clone_with_new_inputs(const OutputVector& new_args) const override; - + bool visit_attributes(AttributeVisitor& visitor) override; const PriorBoxClusteredAttrs& get_attrs() const { return m_attrs; } private: diff --git a/inference-engine/src/legacy_api/include/legacy/ngraph_ops/prior_box_ie.hpp b/inference-engine/src/legacy_api/include/legacy/ngraph_ops/prior_box_ie.hpp index 334a86b02ff2da..824b5d4bd2717a 100644 --- a/inference-engine/src/legacy_api/include/legacy/ngraph_ops/prior_box_ie.hpp +++ b/inference-engine/src/legacy_api/include/legacy/ngraph_ops/prior_box_ie.hpp @@ -32,6 +32,7 @@ class INFERENCE_ENGINE_API_CLASS(PriorBoxIE) : public Op { std::shared_ptr clone_with_new_inputs(const OutputVector& new_args) const override; const PriorBoxAttrs& get_attrs() const { return m_attrs; } + bool visit_attributes(AttributeVisitor& visitor) override; private: PriorBoxAttrs m_attrs; diff --git a/inference-engine/src/legacy_api/include/legacy/ngraph_ops/proposal_ie.hpp b/inference-engine/src/legacy_api/include/legacy/ngraph_ops/proposal_ie.hpp index d5a15561ef4196..d1fcc6a95edf54 100644 --- a/inference-engine/src/legacy_api/include/legacy/ngraph_ops/proposal_ie.hpp +++ b/inference-engine/src/legacy_api/include/legacy/ngraph_ops/proposal_ie.hpp @@ -34,7 +34,7 @@ class INFERENCE_ENGINE_API_CLASS(ProposalIE) : public Op { std::shared_ptr clone_with_new_inputs(const OutputVector& new_args) const override; - + bool visit_attributes(AttributeVisitor& visitor) override; const ProposalAttrs& get_attrs() const { return m_attrs; } private: diff --git a/inference-engine/src/legacy_api/include/legacy/ngraph_ops/selu_ie.hpp b/inference-engine/src/legacy_api/include/legacy/ngraph_ops/selu_ie.hpp index b776a9da33329d..80fef80c9c6770 100644 --- a/inference-engine/src/legacy_api/include/legacy/ngraph_ops/selu_ie.hpp +++ b/inference-engine/src/legacy_api/include/legacy/ngraph_ops/selu_ie.hpp @@ -25,7 +25,7 @@ class INFERENCE_ENGINE_API_CLASS(SeluIE) : public Op { void validate_and_infer_types() override; std::shared_ptr clone_with_new_inputs(const OutputVector& new_args) const override; - + bool visit_attributes(AttributeVisitor& visitor) override; float gamma, alpha; }; diff --git a/inference-engine/src/legacy_api/include/legacy/ngraph_ops/tile_ie.hpp b/inference-engine/src/legacy_api/include/legacy/ngraph_ops/tile_ie.hpp index 63102253d8eb61..ac08cf3573597b 100644 --- a/inference-engine/src/legacy_api/include/legacy/ngraph_ops/tile_ie.hpp +++ b/inference-engine/src/legacy_api/include/legacy/ngraph_ops/tile_ie.hpp @@ -23,7 +23,7 @@ class INFERENCE_ENGINE_API_CLASS(TileIE) : public Op { const int64_t tiles); void validate_and_infer_types() override; - + bool visit_attributes(AttributeVisitor& visitor) override; std::shared_ptr clone_with_new_inputs(const OutputVector& new_args) const override; int64_t axis, tiles; diff --git a/inference-engine/src/legacy_api/src/convert_function_to_cnn_network.cpp b/inference-engine/src/legacy_api/src/convert_function_to_cnn_network.cpp index b163cbeeaac04c..c728b732c4b15d 100644 --- a/inference-engine/src/legacy_api/src/convert_function_to_cnn_network.cpp +++ b/inference-engine/src/legacy_api/src/convert_function_to_cnn_network.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include "ngraph_ops/convolution_ie.hpp" @@ -105,7 +106,10 @@ class CNNLayerCreator : public ::ngraph::AttributeVisitor { } void on_adapter(const std::string& name, ::ngraph::ValueAccessor& adapter) override { - params[name] = std::to_string(adapter.get()); + std::ostringstream stream; + stream.precision(8); + stream << std::fixed << adapter.get(); + params[name] = stream.str(); } void on_adapter(const std::string& name, ::ngraph::ValueAccessor& adapter) override { @@ -458,32 +462,25 @@ InferenceEngine::details::CNNLayerCreator::CNNLayerCreator(const std::shared_ptr details::convertPrecision(node->get_output_element_type(0))}; auto res = std::make_shared(attrs); res->params = params; - auto parseBoolStrToIntStr = [](const std::string ¶m) -> const std::string { - if (param == "true") { - return "1"; - } - else if (param == "false") { - return "0"; - } - return param; - }; + if (res->params["code_type"] == "caffe.priorboxparameter.center_size"){ res->params["code_type"] = "caffe.PriorBoxParameter.CENTER_SIZE"; } else{ res->params["code_type"] = "caffe.PriorBoxParameter.CORNER"; } - res->params["variance_encoded_in_target"] = parseBoolStrToIntStr(res->params["variance_encoded_in_target"]); - res->params["share_location"] = parseBoolStrToIntStr(res->params["share_location"]); - res->params["clip_after_nms"] = parseBoolStrToIntStr(res->params["clip_after_nms"]); - res->params["clip_before_nms"] = parseBoolStrToIntStr(res->params["clip_before_nms"]); - res->params["decrease_label_id"] = parseBoolStrToIntStr(res->params["decrease_label_id"]); - res->params["normalized"] = parseBoolStrToIntStr(res->params["normalized"]); + res->params["variance_encoded_in_target"] = res->getBoolStrParamAsIntStr("variance_encoded_in_target"); + res->params["share_location"] = res->getBoolStrParamAsIntStr("share_location"); + res->params["clip_after_nms"] = res->getBoolStrParamAsIntStr("clip_after_nms"); + res->params["clip_before_nms"] = res->getBoolStrParamAsIntStr("clip_before_nms"); + res->params["decrease_label_id"] = res->getBoolStrParamAsIntStr("decrease_label_id"); + res->params["normalized"] = res->getBoolStrParamAsIntStr("normalized"); return res; }); - addSpecificCreator({"LogicalNot"}, [](const std::shared_ptr<::ngraph::Node>& node, - const std::map params) -> CNNLayerPtr { + addSpecificCreator({"LogicalNot"}, + [](const std::shared_ptr<::ngraph::Node>& node, + const std::map params) -> CNNLayerPtr { LayerParams attrs = {node->get_friendly_name(), "Activation", details::convertPrecision(node->get_output_element_type(0))}; auto res = std::make_shared(attrs); @@ -491,8 +488,9 @@ InferenceEngine::details::CNNLayerCreator::CNNLayerCreator(const std::shared_ptr return res; }); - addSpecificCreator({"LSTMCellIE"}, [](const std::shared_ptr<::ngraph::Node>& node, - const std::map params) -> CNNLayerPtr { + addSpecificCreator({"LSTMCellIE"}, + [](const std::shared_ptr<::ngraph::Node>& node, + const std::map params) -> CNNLayerPtr { LayerParams attrs = {node->get_friendly_name(), "LSTMCell", details::convertPrecision(node->get_output_element_type(0))}; auto res = std::make_shared(attrs); @@ -506,8 +504,9 @@ InferenceEngine::details::CNNLayerCreator::CNNLayerCreator(const std::shared_ptr return res; }); - addSpecificCreator({"RNNCellIE"}, [](const std::shared_ptr<::ngraph::Node>& node, - const std::map& params) -> CNNLayerPtr { + addSpecificCreator({"RNNCellIE"}, + [](const std::shared_ptr<::ngraph::Node>& node, + const std::map& params) -> CNNLayerPtr { LayerParams attrs = {node->get_friendly_name(), "RNNCell", details::convertPrecision(node->get_output_element_type(0))}; auto res = std::make_shared(attrs); @@ -522,8 +521,9 @@ InferenceEngine::details::CNNLayerCreator::CNNLayerCreator(const std::shared_ptr return res; }); - addSpecificCreator({"GRUCellIE"}, [](const std::shared_ptr<::ngraph::Node>& node, - const std::map& params) -> CNNLayerPtr { + addSpecificCreator({"GRUCellIE"}, + [](const std::shared_ptr<::ngraph::Node>& node, + const std::map& params) -> CNNLayerPtr { LayerParams attrs = {node->get_friendly_name(), "GRUCell", details::convertPrecision(node->get_output_element_type(0))}; auto res = std::make_shared(attrs); @@ -538,6 +538,186 @@ InferenceEngine::details::CNNLayerCreator::CNNLayerCreator(const std::shared_ptr return res; }); + addSpecificCreator({"PRelu"}, + [](const std::shared_ptr<::ngraph::Node>& node, + const std::map& params) -> CNNLayerPtr { + LayerParams attrs = {node->get_friendly_name(), "PReLU", + details::convertPrecision(node->get_output_element_type(0))}; + auto res = std::make_shared(attrs); + res->params = params; + + const auto weightsNode = node->input_value(1).get_node_shared_ptr(); + InferenceEngine::details::addBlob(weightsNode, res, InferenceEngine::details::weights); + + return res; + }); + + addSpecificCreator({"TileIE"}, + [](const std::shared_ptr<::ngraph::Node>& node, + const std::map& params) -> CNNLayerPtr { + LayerParams attrs = {node->get_friendly_name(), "Tile", + details::convertPrecision(node->get_output_element_type(0))}; + auto res = std::make_shared(attrs); + res->params = params; + return res; + }); + + addSpecificCreator({"PriorBoxIE"}, + [](const std::shared_ptr<::ngraph::Node>& node, + const std::map& params) -> CNNLayerPtr { + LayerParams attrs = {node->get_friendly_name(), "PriorBox", + details::convertPrecision(node->get_output_element_type(0))}; + + auto res = std::make_shared(attrs); + res->params = params; + res->params["clip"] = res->getBoolStrParamAsIntStr("clip"); + res->params["flip"] = res->getBoolStrParamAsIntStr("flip"); + res->params["scale_all_sizes"] = res->getBoolStrParamAsIntStr("scale_all_sizes"); + + auto scale_all_sizes = std::stoi(res->params["scale_all_sizes"]); + if (!scale_all_sizes) { + auto data_pshape = node->get_input_partial_shape(0); + if (data_pshape.is_dynamic()) THROW_IE_EXCEPTION << "Dynamic 0-port input of PriorBox is not supported"; + auto data_shape = data_pshape.to_shape(); + if (data_shape.size() != 4) THROW_IE_EXCEPTION << "PriorBox has " << data_shape.size() << " items in 0-port input, 4 expected"; + auto img_pshape = node->get_input_partial_shape(1); + if (img_pshape.is_dynamic()) THROW_IE_EXCEPTION << "Dynamic 1-port input of PriorBox is not supported"; + auto img_shape = img_pshape.to_shape(); + if (img_shape.size() != 4) THROW_IE_EXCEPTION << "PriorBox has " << data_shape.size() << " items in 1-port input, 4 expected"; + + // mxnet-like PriorBox + auto img_H = img_shape[2]; + auto data_H = data_shape[2]; + + auto step = std::stof(res->params["step"]); + if (step == -1) + step = img_H / static_cast(data_H); + else + step *= img_H; + res->params["step"] = Builder::asString(step); + + auto min_size = details::split(res->params["min_size"], ","); + for (auto &size : min_size) { + size = Builder::asString(std::stof(size) * img_H); + } + res->params["min_size"] = details::joinVec(min_size); + } + return res; + }); + + addSpecificCreator({"PriorBoxClusteredIE"}, + [](const std::shared_ptr<::ngraph::Node>& node, + const std::map& params) -> CNNLayerPtr { + LayerParams attrs = {node->get_friendly_name(), "PriorBoxClustered", + details::convertPrecision(node->get_output_element_type(0))}; + auto res = std::make_shared(attrs); + res->params = params; + res->params["clip"] = + res->getBoolStrParamAsIntStr("clip"); + + auto step_h = std::stof(res->params["step_h"]); + auto step_w = std::stof(res->params["step_w"]); + if (std::abs(step_h - step_w) < 1e-5) { + res->params["step"] = res->params["step_w"]; + } + return res; + }); + + addSpecificCreator({"ProposalIE"}, + [](const std::shared_ptr<::ngraph::Node>& node, + const std::map& params) -> CNNLayerPtr { + LayerParams attrs = {node->get_friendly_name(), "Proposal", + details::convertPrecision(node->get_output_element_type(0))}; + auto res = std::make_shared(attrs); + res->params = params; + res->params["clip_before_nms"] = + res->getBoolStrParamAsIntStr("clip_before_nms"); + res->params["clip_after_nms"] = + res->getBoolStrParamAsIntStr("clip_after_nms"); + res->params["normalize"] = res->getBoolStrParamAsIntStr("normalize"); + return res; + }); + + addSpecificCreator({"Relu"}, + [](const std::shared_ptr<::ngraph::Node>& node, + const std::map& params) -> CNNLayerPtr { + LayerParams attrs = {node->get_friendly_name(), "ReLU", + details::convertPrecision(node->get_output_element_type(0))}; + auto res = std::make_shared(attrs); + res->params = params; + return res; + }); + + addSpecificCreator({"Reshape"}, + [](const std::shared_ptr<::ngraph::Node>& node, + const std::map& params) -> CNNLayerPtr { + LayerParams attrs = {node->get_friendly_name(), "Reshape", + details::convertPrecision(node->get_output_element_type(0))}; + auto res = std::make_shared(attrs); + return res; + }); + + addSpecificCreator({"ReverseSequence"}, + [](const std::shared_ptr<::ngraph::Node>& node, + const std::map& params) -> CNNLayerPtr { + LayerParams attrs = {node->get_friendly_name(), "ReverseSequence", + details::convertPrecision(node->get_output_element_type(0))}; + auto res = std::make_shared(attrs); + res->params = params; + return res; + }); + + addSpecificCreator({"SeluIE"}, + [](const std::shared_ptr<::ngraph::Node>& node, + const std::map& params) -> CNNLayerPtr { + LayerParams attrs = {node->get_friendly_name(), "Selu", + details::convertPrecision(node->get_output_element_type(0))}; + auto res = std::make_shared(attrs); + res->params = params; + return res; + }); + + addSpecificCreator({"Softmax"}, + [](const std::shared_ptr<::ngraph::Node>& node, + const std::map& params) -> CNNLayerPtr { + LayerParams attrs = {node->get_friendly_name(), "SoftMax", + details::convertPrecision(node->get_output_element_type(0))}; + auto res = std::make_shared(attrs); + res->params = params; + return res; + }); + + addSpecificCreator({"Split"}, + [](const std::shared_ptr<::ngraph::Node>& node, + const std::map& params) -> CNNLayerPtr { + LayerParams attrs = {node->get_friendly_name(), "Split", + details::convertPrecision(node->get_output_element_type(0))}; + auto res = std::make_shared(attrs); + + auto axis_node = node->input_value(1).get_node_shared_ptr(); + const auto axis_node_const = std::dynamic_pointer_cast(axis_node); + if (!axis_node_const) { + THROW_IE_EXCEPTION << "Split " << node->get_friendly_name() << " has no axes as Constant"; + } + auto axis = axis_node_const->cast_vector()[0]; + if (axis < 0) { + axis += node->get_input_shape(0).size(); + } + res->params["axis"] = Builder::asString(axis); + + return res; + }); + + addSpecificCreator({"Tanh"}, + [](const std::shared_ptr<::ngraph::Node>& node, + const std::map& params) -> CNNLayerPtr { + LayerParams attrs = {node->get_friendly_name(), "TanH", + details::convertPrecision(node->get_output_element_type(0))}; + auto res = std::make_shared(attrs); + res->params = params; + return res; + }); + addSpecificCreator({"ScatterElementsUpdate"}, [](const std::shared_ptr<::ngraph::Node>& node, const std::map& params) -> CNNLayerPtr { LayerParams attrs = {node->get_friendly_name(), node->description(), @@ -1032,7 +1212,6 @@ void convertFunctionToICNNNetwork(const std::shared_ptr>(), std::make_shared>(), std::make_shared>(), - std::make_shared>(), std::make_shared>(), std::make_shared>(), std::make_shared>(), @@ -1042,29 +1221,16 @@ void convertFunctionToICNNNetwork(const std::shared_ptr>(), std::make_shared>(), std::make_shared>(), - std::make_shared>(), - std::make_shared>(), std::make_shared>(), - std::make_shared>(), - std::make_shared>(), - std::make_shared>(), - std::make_shared>(), - std::make_shared>(), std::make_shared>(), - std::make_shared>(), std::make_shared>(), std::make_shared>(), std::make_shared>(), - std::make_shared>(), std::make_shared>(), std::make_shared>(), std::make_shared>(), - std::make_shared>(), - std::make_shared>(), std::make_shared>(), std::make_shared>(), - std::make_shared>(), - std::make_shared>(), std::make_shared>(), std::make_shared>(), std::make_shared>(), diff --git a/inference-engine/src/legacy_api/src/ie_cnn_layer_builder_ngraph.cpp b/inference-engine/src/legacy_api/src/ie_cnn_layer_builder_ngraph.cpp index 50bba3d3b5fdd5..faedfc71f9f63d 100644 --- a/inference-engine/src/legacy_api/src/ie_cnn_layer_builder_ngraph.cpp +++ b/inference-engine/src/legacy_api/src/ie_cnn_layer_builder_ngraph.cpp @@ -424,28 +424,6 @@ CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ptr return res; } -template <> -CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ptr& layer) const { - LayerParams params = {layer->get_friendly_name(), "ReLU", - details::convertPrecision(layer->get_output_element_type(0))}; - auto res = std::make_shared(params); - return res; -} - -template <> -CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ptr& layer) const { - LayerParams params = {layer->get_friendly_name(), "Selu", - details::convertPrecision(layer->get_output_element_type(0))}; - auto res = std::make_shared(params); - - auto castedLayer = ngraph::as_type_ptr(layer); - if (castedLayer == nullptr) THROW_IE_EXCEPTION << "Cannot get " << params.type << " layer " << params.name; - - res->params["alpha"] = asString(castedLayer->alpha); - res->params["gamma"] = asString(castedLayer->gamma); - return res; -} - template <> CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ptr& layer) const { LayerParams params = {layer->get_friendly_name(), "ReLU", @@ -524,18 +502,6 @@ CNNLayer::Ptr NodeConverter::createLayer(const std::shared_p return res; } -template <> -CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ptr& layer) const { - LayerParams params = {layer->get_friendly_name(), "SoftMax", - details::convertPrecision(layer->get_output_element_type(0))}; - auto res = std::make_shared(params); - auto castedLayer = ngraph::as_type_ptr(layer); - if (castedLayer == nullptr) THROW_IE_EXCEPTION << "Cannot get " << params.type << " layer " << params.name; - - res->params["axis"] = asString(castedLayer->get_axis()); - return res; -} - template <> CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ptr& layer) const { LayerParams params = {layer->get_friendly_name(), "Eltwise", @@ -545,15 +511,6 @@ CNNLayer::Ptr NodeConverter::createLayer(const std::sh return res; } -template <> -CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ptr& layer) const { - LayerParams params = {layer->get_friendly_name(), "Eltwise", - details::convertPrecision(layer->get_output_element_type(0))}; - auto res = std::make_shared(params); - res->params["operation"] = "pow"; - return res; -} - template <> CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ptr& layer) const { LayerParams params = {layer->get_friendly_name(), "Eltwise", @@ -814,22 +771,6 @@ CNNLayer::Ptr NodeConverter::createLayer(const std::sha return res; } -template <> -CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ptr& layer) const { - LayerParams params = {layer->get_friendly_name(), "ROIPooling", - details::convertPrecision(layer->get_output_element_type(0))}; - auto res = std::make_shared(params); - auto castedLayer = ngraph::as_type_ptr(layer); - if (castedLayer == nullptr) THROW_IE_EXCEPTION << "Cannot get " << params.type << " layer " << params.name; - - res->params["pooled_h"] = asString(castedLayer->get_output_size()[0]); - res->params["pooled_w"] = asString(castedLayer->get_output_size()[1]); - res->params["spatial_scale"] = asString(castedLayer->get_spatial_scale()); - res->params["method"] = castedLayer->get_method(); - - return res; -} - template <> CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ptr& layer) const { LayerParams params = {layer->get_friendly_name(), "PSROIPooling", @@ -873,56 +814,6 @@ CNNLayer::Ptr NodeConverter::createLayer return res; } -template <> -CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ptr& layer) const { - LayerParams params = {layer->get_friendly_name(), "PReLU", - details::convertPrecision(layer->get_output_element_type(0))}; - auto res = std::make_shared(params); - auto castedLayer = ngraph::as_type_ptr(layer); - if (castedLayer == nullptr) THROW_IE_EXCEPTION << "Cannot get " << params.type << " layer " << params.name; - - const auto weightsNode = castedLayer->input_value(1).get_node_shared_ptr(); - if (auto const_weights = ngraph::as_type_ptr(weightsNode)) { - SizeVector dataShape = const_weights->get_shape(); - if (dataShape.size() >= 2 && ngraph::shape_size(dataShape) == dataShape[1]) { - dataShape = {dataShape[1]}; - } - - Blob::Ptr dataBlb = InferenceEngine::details::shareWeights(const_weights); - - res->blobs["weights"] = dataBlb; - res->_weights = dataBlb; - } - - auto const_shape = castedLayer->input(1).get_shape(), tensor_shape = castedLayer->input(0).get_shape(); - if (const_shape.size() == 1 && const_shape[0] == 1) { - res->params["channel_shared"] = "true"; - } - - return res; -} - -template <> -CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ptr& layer) const { - LayerParams params = {layer->get_friendly_name(), "Split", - details::convertPrecision(layer->get_output_element_type(0))}; - auto res = std::make_shared(params); - auto castedLayer = ngraph::as_type_ptr(layer); - if (castedLayer == nullptr) THROW_IE_EXCEPTION << "Cannot get " << params.type << " layer " << params.name; - - auto axis_node = castedLayer->input_value(1).get_node_shared_ptr(); - const auto axis_node_const = std::dynamic_pointer_cast(axis_node); - if (!axis_node_const) { - THROW_IE_EXCEPTION << "Split " << castedLayer->get_friendly_name() << " has no axes as Constant"; - } - auto axis = axis_node_const->cast_vector()[0]; - if (axis < 0) { - axis += castedLayer->get_input_shape(0).size(); - } - res->params["axis"] = asString(axis); - return res; -} - template <> CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ptr& layer) const { LayerParams params = {layer->get_friendly_name(), "Split", @@ -995,31 +886,6 @@ CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ return res; } -template <> -CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ptr& layer) const { - LayerParams params = {layer->get_friendly_name(), "Reshape", - details::convertPrecision(layer->get_output_element_type(0))}; - - auto castedLayer = ngraph::as_type_ptr(layer); - if (castedLayer == nullptr) - THROW_IE_EXCEPTION << "Cannot get " << params.type << " layer " << params.name; - - - const auto constNode = castedLayer->input_value(1).get_node_shared_ptr(); - if (auto constValue = ngraph::as_type_ptr(constNode)) { - auto value = constValue->cast_vector(); - for (auto & i : value) { - if (i == 0 && !castedLayer->get_special_zero()) - THROW_IE_EXCEPTION << "Reshape " << params.name << " has `special_zero`=False and zeros in second input. This combination is not supported"; - } - } else { - THROW_IE_EXCEPTION << "Reshape " << params.name << " has dynamic second input!"; - } - - auto res = std::make_shared(params); - return res; -} - template <> CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ptr& layer) const { LayerParams params = {layer->get_friendly_name(), "ScaleShift", @@ -1057,164 +923,6 @@ CNNLayer::Ptr NodeConverter::createLayer(const std: return res; } -template <> -CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ptr& layer) const { - LayerParams params = {layer->get_friendly_name(), "Proposal", - details::convertPrecision(layer->get_output_element_type(0))}; - auto res = std::make_shared(params); - auto castedLayer = ngraph::as_type_ptr(layer); - if (castedLayer == nullptr) THROW_IE_EXCEPTION << "Cannot get " << params.type << " layer " << params.name; - - auto attr = castedLayer->get_attrs(); - std::string param; - for (const auto& val : attr.ratio) { - if (!param.empty()) param += ","; - param += asString(val); - } - res->params["ratio"] = param; - - param.clear(); - for (const auto& val : attr.scale) { - if (!param.empty()) param += ","; - param += asString(val); - } - res->params["scale"] = param; - - res->params["base_size"] = asString(attr.base_size); - res->params["pre_nms_topn"] = asString(attr.pre_nms_topn); - res->params["post_nms_topn"] = asString(attr.post_nms_topn); - res->params["nms_thresh"] = asString(attr.nms_thresh); - res->params["feat_stride"] = asString(attr.feat_stride); - res->params["min_size"] = asString(attr.min_size); - res->params["box_size_scale"] = asString(attr.box_size_scale); - res->params["box_coordinate_scale"] = asString(attr.box_coordinate_scale); - res->params["clip_before_nms"] = asString(attr.clip_before_nms ? 1 : 0); - res->params["clip_after_nms"] = asString(attr.clip_after_nms ? 1 : 0); - res->params["normalize"] = asString(attr.normalize ? 1 : 0); - res->params["framework"] = attr.framework; - - return res; -} - -template <> -CNNLayer::Ptr NodeConverter::createLayer( - const std::shared_ptr& layer) const { - LayerParams params = {layer->get_friendly_name(), "PriorBoxClustered", - details::convertPrecision(layer->get_output_element_type(0))}; - auto res = std::make_shared(params); - auto castedLayer = ngraph::as_type_ptr(layer); - if (castedLayer == nullptr) THROW_IE_EXCEPTION << "Cannot get " << params.type << " layer " << params.name; - - auto attr = castedLayer->get_attrs(); - std::string param; - for (const auto& val : attr.widths) { - if (!param.empty()) param += ","; - param += asString(val); - } - res->params["width"] = param; - - param.clear(); - for (const auto& val : attr.heights) { - if (!param.empty()) param += ","; - param += asString(val); - } - res->params["height"] = param; - - param.clear(); - for (const auto& val : attr.variances) { - if (!param.empty()) param += ","; - param += asString(val); - } - res->params["variance"] = param; - - if (std::abs(attr.step_heights - attr.step_widths) < 1e-5) { - res->params["step"] = asString(attr.step_widths); - } else { - res->params["step_w"] = asString(attr.step_widths); - res->params["step_h"] = asString(attr.step_heights); - } - res->params["offset"] = asString(attr.offset); - res->params["clip"] = asString(attr.clip ? 1 : 0); - res->params["flip"] = "1"; - - return res; -} - -template <> -CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ptr& layer) const { - LayerParams params = {layer->get_friendly_name(), "PriorBox", - details::convertPrecision(layer->get_output_element_type(0))}; - auto res = std::make_shared(params); - auto castedLayer = ngraph::as_type_ptr(layer); - auto layer_info = params.type + " layer " + params.name; - - if (castedLayer == nullptr) THROW_IE_EXCEPTION << "Cannot get " << layer_info; - - auto attr = castedLayer->get_attrs(); - std::string param; - - auto data_pshape = castedLayer->get_input_partial_shape(0); - if (data_pshape.is_dynamic()) THROW_IE_EXCEPTION << "Dynamic 0-port input of " << layer_info << " is not supported"; - auto data_shape = data_pshape.to_shape(); - if (data_shape.size() != 4) THROW_IE_EXCEPTION << layer_info << " has " << data_shape.size() << " items in 0-port input, 4 expected"; - - auto img_pshape = castedLayer->get_input_partial_shape(1); - if (img_pshape.is_dynamic()) THROW_IE_EXCEPTION << "Dynamic 1-port input of " << layer_info << " is not supported"; - auto img_shape = img_pshape.to_shape(); - if (img_shape.size() != 4) THROW_IE_EXCEPTION << layer_info << " has " << data_shape.size() << " items in 1-port input, 4 expected"; - - if (!attr.scale_all_sizes) { - // mxnet-like PriorBox - auto img_H = img_shape[2]; - auto data_H = data_shape[2]; - if (attr.step == -1) - attr.step = static_cast(1. * img_H / data_H); - else - attr.step *= img_H; - for (auto& size : attr.min_size) - size *= img_H; - } - - for (const auto& val : attr.max_size) { - if (!param.empty()) param += ","; - param += asString(val); - } - res->params["max_size"] = param; - - param.clear(); - for (const auto& val : attr.min_size) { - if (!param.empty()) param += ","; - param += asString(val); - } - res->params["min_size"] = param; - - param.clear(); - for (const auto& val : attr.aspect_ratio) { - if (!param.empty()) param += ","; - param += asString(val); - } - res->params["aspect_ratio"] = param; - - param.clear(); - for (const auto& val : attr.variance) { - if (!param.empty()) param += ","; - param += asString(val); - } - res->params["variance"] = param; - - res->params["step"] = asString(attr.step); - res->params["offset"] = asString(attr.offset); - res->params["clip"] = asString(attr.clip ? 1 : 0); - res->params["flip"] = asString(attr.flip ? 1 : 0); - res->params["scale_all_sizes"] = asString(attr.scale_all_sizes ? 1 : 0); - - res->params["density"] = asString(attr.density); - res->params["fixed_size"] = asString(attr.fixed_size); - res->params["fixed_ratio"] = asString(attr.fixed_ratio); - - return res; -} - template <> CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ptr& layer) const { LayerParams params = {layer->get_friendly_name(), "Power", @@ -1258,20 +966,6 @@ CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ return res; } -template <> -CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ptr& layer) const { - LayerParams params = {layer->get_friendly_name(), "Tile", - details::convertPrecision(layer->get_output_element_type(0))}; - auto res = std::make_shared(params); - auto castedLayer = ngraph::as_type_ptr(layer); - if (castedLayer == nullptr) THROW_IE_EXCEPTION << "Cannot get " << params.type << " layer " << params.name; - - res->params["axis"] = asString(castedLayer->axis); - res->params["tiles"] = asString(castedLayer->tiles); - - return res; -} - template <> CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ptr& layer) const { LayerParams params = {layer->get_friendly_name(), "Resample", details::convertPrecision(layer->get_output_element_type(0))}; diff --git a/inference-engine/src/legacy_api/src/ie_layers.cpp b/inference-engine/src/legacy_api/src/ie_layers.cpp index 55d0c88f265291..11f8f8b0fe82d0 100644 --- a/inference-engine/src/legacy_api/src/ie_layers.cpp +++ b/inference-engine/src/legacy_api/src/ie_layers.cpp @@ -306,6 +306,16 @@ std::string CNNLayer::GetParamAsString(const char* param) const { return (*it).second; } +std::string CNNLayer::getBoolStrParamAsIntStr(const char *param) const { + std::string val = GetParamAsString(param); + if (val == "true" || val == "True") { + return "1"; + } else if (val == "false" || val == "False") { + return "0"; + } + return val; +} + std::vector CNNLayer::GetParamAsStrings(const char* param, std::vector def) const { std::string vals = GetParamAsString(param, ""); std::vector result; diff --git a/inference-engine/src/legacy_api/src/ngraph_ops/prior_box_clustered_ie.cpp b/inference-engine/src/legacy_api/src/ngraph_ops/prior_box_clustered_ie.cpp index 3bacb014fd1881..4f0234c05fcbf4 100644 --- a/inference-engine/src/legacy_api/src/ngraph_ops/prior_box_clustered_ie.cpp +++ b/inference-engine/src/legacy_api/src/ngraph_ops/prior_box_clustered_ie.cpp @@ -37,3 +37,27 @@ std::shared_ptr op::PriorBoxClusteredIE::clone_with_new_inputs(const Outpu check_new_args_count(this, new_args); return make_shared(new_args.at(0), new_args.at(1), m_attrs); } + +bool op::PriorBoxClusteredIE::visit_attributes(AttributeVisitor& visitor) +{ + float step = 0; + + visitor.on_attribute("step", step); + visitor.on_attribute("step_w", m_attrs.step_widths); + visitor.on_attribute("step_h", m_attrs.step_heights); + if(step != 0) { + // deserialization: if step_w/h is 0 replace it with step + if (m_attrs.step_widths == 0) { + m_attrs.step_widths = step; + } + if (m_attrs.step_heights == 0) { + m_attrs.step_heights = step; + } + } + visitor.on_attribute("width", m_attrs.widths); + visitor.on_attribute("height", m_attrs.heights); + visitor.on_attribute("clip", m_attrs.clip); + visitor.on_attribute("offset", m_attrs.offset); + visitor.on_attribute("variance", m_attrs.variances); + return true; +} diff --git a/inference-engine/src/legacy_api/src/ngraph_ops/prior_box_ie.cpp b/inference-engine/src/legacy_api/src/ngraph_ops/prior_box_ie.cpp index 7dbe4280348d73..8429807b91d4f7 100644 --- a/inference-engine/src/legacy_api/src/ngraph_ops/prior_box_ie.cpp +++ b/inference-engine/src/legacy_api/src/ngraph_ops/prior_box_ie.cpp @@ -34,3 +34,19 @@ std::shared_ptr op::PriorBoxIE::clone_with_new_inputs(const OutputVector& check_new_args_count(this, new_args); return make_shared(new_args.at(0), new_args.at(1), m_attrs); } + +bool op::PriorBoxIE::visit_attributes(AttributeVisitor& visitor) { + visitor.on_attribute("min_size", m_attrs.min_size); + visitor.on_attribute("max_size", m_attrs.max_size); + visitor.on_attribute("aspect_ratio", m_attrs.aspect_ratio); + visitor.on_attribute("density", m_attrs.density); + visitor.on_attribute("fixed_ratio", m_attrs.fixed_ratio); + visitor.on_attribute("fixed_size", m_attrs.fixed_size); + visitor.on_attribute("clip", m_attrs.clip); + visitor.on_attribute("flip", m_attrs.flip); + visitor.on_attribute("step", m_attrs.step); + visitor.on_attribute("offset", m_attrs.offset); + visitor.on_attribute("variance", m_attrs.variance); + visitor.on_attribute("scale_all_sizes", m_attrs.scale_all_sizes); + return true; +} diff --git a/inference-engine/src/legacy_api/src/ngraph_ops/proposal_ie.cpp b/inference-engine/src/legacy_api/src/ngraph_ops/proposal_ie.cpp index 385a70a06bd49d..a77bcec2089633 100644 --- a/inference-engine/src/legacy_api/src/ngraph_ops/proposal_ie.cpp +++ b/inference-engine/src/legacy_api/src/ngraph_ops/proposal_ie.cpp @@ -60,3 +60,21 @@ shared_ptr op::ProposalIE::clone_with_new_inputs(const OutputVector& new_a check_new_args_count(this, new_args); return make_shared(new_args.at(0), new_args.at(1), new_args.at(2), m_attrs); } + +bool op::ProposalIE::visit_attributes(AttributeVisitor& visitor){ + visitor.on_attribute("ratio", m_attrs.ratio); + visitor.on_attribute("scale", m_attrs.scale); + visitor.on_attribute("base_size", m_attrs.base_size); + visitor.on_attribute("pre_nms_topn", m_attrs.pre_nms_topn); + visitor.on_attribute("post_nms_topn", m_attrs.post_nms_topn); + visitor.on_attribute("nms_thresh", m_attrs.nms_thresh); + visitor.on_attribute("feat_stride", m_attrs.feat_stride); + visitor.on_attribute("min_size", m_attrs.min_size); + visitor.on_attribute("box_size_scale", m_attrs.box_size_scale); + visitor.on_attribute("box_coordinate_scale", m_attrs.box_coordinate_scale); + visitor.on_attribute("clip_before_nms", m_attrs.clip_before_nms); + visitor.on_attribute("clip_after_nms", m_attrs.clip_after_nms); + visitor.on_attribute("normalize", m_attrs.normalize); + visitor.on_attribute("framework", m_attrs.framework); + return true; +} diff --git a/inference-engine/src/legacy_api/src/ngraph_ops/selu_ie.cpp b/inference-engine/src/legacy_api/src/ngraph_ops/selu_ie.cpp index c55d4b8b9e9e2d..172e7c639447eb 100644 --- a/inference-engine/src/legacy_api/src/ngraph_ops/selu_ie.cpp +++ b/inference-engine/src/legacy_api/src/ngraph_ops/selu_ie.cpp @@ -30,3 +30,9 @@ std::shared_ptr op::SeluIE::clone_with_new_inputs(const OutputVector& new_ void op::SeluIE::validate_and_infer_types() { set_output_type(0, get_input_element_type(0), get_input_partial_shape(0)); } + +bool op::SeluIE::visit_attributes(AttributeVisitor& visitor) { + visitor.on_attribute("alpha", alpha); + visitor.on_attribute("gamma", gamma); + return true; +} diff --git a/inference-engine/src/legacy_api/src/ngraph_ops/tile_ie.cpp b/inference-engine/src/legacy_api/src/ngraph_ops/tile_ie.cpp index 01a87887ff9820..082ae48c7570cf 100644 --- a/inference-engine/src/legacy_api/src/ngraph_ops/tile_ie.cpp +++ b/inference-engine/src/legacy_api/src/ngraph_ops/tile_ie.cpp @@ -41,3 +41,9 @@ void op::TileIE::validate_and_infer_types() { set_output_type(0, get_input_element_type(0), output_pshape); } + +bool op::TileIE::visit_attributes(AttributeVisitor& visitor){ + visitor.on_attribute("axis", axis); + visitor.on_attribute("tiles", tiles); + return true; +} diff --git a/inference-engine/src/readers/ir_reader/ie_ir_parser.cpp b/inference-engine/src/readers/ir_reader/ie_ir_parser.cpp index 306c9aad0740d7..7bc61a5494c9ef 100644 --- a/inference-engine/src/readers/ir_reader/ie_ir_parser.cpp +++ b/inference-engine/src/readers/ir_reader/ie_ir_parser.cpp @@ -405,7 +405,6 @@ std::shared_ptr V10Parser::createNode(const std::vector>("DepthToSpace"), std::make_shared>("Subtract"), std::make_shared>("Broadcast"), - std::make_shared>("Reshape"), std::make_shared>("StridedSlice"), std::make_shared>("Gather"), std::make_shared>("GreaterEqual"), @@ -424,23 +423,11 @@ std::shared_ptr V10Parser::createNode(const std::vector>("Minimum"), std::make_shared>("NonMaxSuppression"), std::make_shared>("NormalizeL2"), - std::make_shared>("PReLU"), - std::make_shared>("ReLU"), - std::make_shared>("Power"), - std::make_shared>("ReverseSequence"), - std::make_shared>("PriorBox"), - std::make_shared>("PriorBoxClustered"), std::make_shared>("ReorgYolo"), std::make_shared>("RegionYolo"), std::make_shared>("Result"), - std::make_shared>("ROIPooling"), std::make_shared>("PSROIPooling"), - std::make_shared>("Selu"), - std::make_shared>("Softmax"), - std::make_shared>("Split"), std::make_shared>("VariadicSplit"), - std::make_shared>("TanH"), - std::make_shared>("Tile"), std::make_shared>("TensorIterator"), std::make_shared>("Loop"), std::make_shared>("LogicalAnd"), @@ -496,11 +483,16 @@ std::shared_ptr V10Parser::createNode(const std::vector(opset.create(type)); + ngraphNode = std::shared_ptr(opset.create_insensitive(type)); ngraphNode->set_friendly_name(params.name); ngraphNode->set_arguments(inputs); XmlDeserializer visitor(node, weights); @@ -769,72 +761,6 @@ std::shared_ptr V10Parser::LayerCreator::cre return fillSubGraphLayer(inputs, node, weights, layerParsePrms, loop); } -// PriorBoxClustered layer -template <> -std::shared_ptr V10Parser::LayerCreator::createLayer( - const ngraph::OutputVector& inputs, const pugi::xml_node& node, const Blob::CPtr& weights, - const GenericLayerParams& layerParsePrms) { - checkParameters(inputs, layerParsePrms, 2); - pugi::xml_node dn = node.child("data"); - - if (dn.empty()) - THROW_IE_EXCEPTION << "Cannot read parameter for " << getType() << " layer with name: " << layerParsePrms.name; - - ngraph::op::PriorBoxClusteredAttrs attr; - attr.widths = getParameters(dn, "width"); - attr.heights = getParameters(dn, "height"); - attr.variances = getParameters(dn, "variance"); - attr.offset = GetFloatAttr(dn, "offset"); - float step = GetFloatAttr(dn, "step", 0); - attr.step_heights = GetFloatAttr(dn, "step_h", step); - attr.step_widths = GetFloatAttr(dn, "step_w", step); - if (step != 0) { - attr.step_heights = step; - attr.step_widths = step; - } - attr.clip = (GetIntAttr(dn, "clip") != 0); - - return std::make_shared(inputs[0], inputs[1], attr); -} - -// PriorBox layer -template <> -std::shared_ptr V10Parser::LayerCreator::createLayer( - const ngraph::OutputVector& inputs, const pugi::xml_node& node, const Blob::CPtr& weights, - const GenericLayerParams& layerParsePrms) { - checkParameters(inputs, layerParsePrms, 2); - pugi::xml_node dn = node.child("data"); - - if (dn.empty()) - THROW_IE_EXCEPTION << "Cannot read parameter for " << getType() << " layer with name: " << layerParsePrms.name; - - ngraph::op::PriorBoxAttrs attr; - attr.min_size = getParameters(dn, "min_size", {}); - attr.max_size = getParameters(dn, "max_size", {}); - attr.density = getParameters(dn, "density", {}); - attr.fixed_size = getParameters(dn, "fixed_size", {}); - attr.fixed_ratio = getParameters(dn, "fixed_ratio", {}); - attr.aspect_ratio = getParameters(dn, "aspect_ratio", {}); - attr.variance = getParameters(dn, "variance", {}); - attr.step = GetFloatAttr(dn, "step", 0); - attr.offset = GetFloatAttr(dn, "offset"); - attr.clip = (GetIntAttr(dn, "clip") != 0); - attr.flip = (GetIntAttr(dn, "flip") != 0); - attr.scale_all_sizes = (GetIntAttr(dn, "scale_all_sizes", 1) != 0); - - return std::make_shared(inputs[0], inputs[1], attr); -} - -// ReverseSequence layer -template <> -std::shared_ptr V10Parser::LayerCreator::createLayer(const ngraph::OutputVector & inputs, const pugi::xml_node& node, - const Blob::CPtr& weights, - const GenericLayerParams& layerParsePrms) { - checkParameters(inputs, layerParsePrms, 2); - pugi::xml_node dn = node.child("data"); - return std::make_shared(inputs[0], inputs[1], GetIntAttr(dn, "batch_axis", 0), GetIntAttr(dn, "seq_axis", 1)); -} - // Covnert layer template <> std::shared_ptr V10Parser::LayerCreator::createLayer( @@ -962,21 +888,6 @@ std::shared_ptr V10Parser::LayerCreator return std::make_shared(inputs[0], inputs[1], inputs[2]); } -// Split layer -template <> -std::shared_ptr V10Parser::LayerCreator::createLayer( - const ngraph::OutputVector& inputs, const pugi::xml_node& node, const Blob::CPtr& weights, - const GenericLayerParams& layerParsePrms) { - pugi::xml_node dn = node.child("data"); - - if (dn.empty()) - THROW_IE_EXCEPTION << "Cannot read parameter for " << getType() << " layer with name: " << layerParsePrms.name; - - int num_splits = GetIntAttr(dn, "num_splits"); - checkParameters(inputs, layerParsePrms, 2); - return std::make_shared(inputs[0], inputs[1], num_splits); -} - // SpaceToDepth layer template <> std::shared_ptr V10Parser::LayerCreator::createLayer( @@ -1005,42 +916,6 @@ std::shared_ptr V10Parser::LayerCreator: return std::make_shared(inputs[0], GetStrAttr(dn, "mode"), GetIntAttr(dn, "block_size", 1)); } -// SeLU layer -template <> -std::shared_ptr V10Parser::LayerCreator::createLayer( - const ngraph::OutputVector& inputs, const pugi::xml_node& node, const Blob::CPtr& weights, - const GenericLayerParams& layerParsePrms) { - checkParameters(inputs, layerParsePrms, 3); - return std::make_shared(inputs[0], inputs[1], inputs[2]); -} - -// PReLU layer -template <> -std::shared_ptr V10Parser::LayerCreator::createLayer( - const ngraph::OutputVector& inputs, const pugi::xml_node& node, const Blob::CPtr& weights, - const GenericLayerParams& layerParsePrms) { - checkParameters(inputs, layerParsePrms, 2); - return std::make_shared(inputs[0], inputs[1]); -} - -// ReLU layer -template <> -std::shared_ptr V10Parser::LayerCreator::createLayer( - const ngraph::OutputVector& inputs, const pugi::xml_node& node, const Blob::CPtr& weights, - const GenericLayerParams& layerParsePrms) { - checkParameters(inputs, layerParsePrms, 1); - return std::make_shared(inputs[0]); -} - -// Tanh layer -template <> -std::shared_ptr V10Parser::LayerCreator::createLayer( - const ngraph::OutputVector& inputs, const pugi::xml_node& node, const Blob::CPtr& weights, - const GenericLayerParams& layerParsePrms) { - checkParameters(inputs, layerParsePrms, 1); - return std::make_shared(inputs[0]); -} - // Result layer template <> std::shared_ptr V10Parser::LayerCreator::createLayer( @@ -1050,15 +925,6 @@ std::shared_ptr V10Parser::LayerCreator::creat return std::make_shared(inputs[0]); } -// Tile layer -template <> -std::shared_ptr V10Parser::LayerCreator::createLayer( - const ngraph::OutputVector& inputs, const pugi::xml_node& node, const Blob::CPtr& weights, - const GenericLayerParams& layerParsePrms) { - checkParameters(inputs, layerParsePrms, 2); - return std::make_shared(inputs[0], inputs[1]); -} - // StridedSlice layer template <> std::shared_ptr V10Parser::LayerCreator::createLayer( @@ -1084,20 +950,6 @@ std::shared_ptr V10Parser::LayerCreator -std::shared_ptr V10Parser::LayerCreator::createLayer( - const ngraph::OutputVector& inputs, const pugi::xml_node& node, const Blob::CPtr& weights, - const GenericLayerParams& layerParsePrms) { - checkParameters(inputs, layerParsePrms, 2); - - pugi::xml_node dn = node.child("data"); - if (dn.empty()) - THROW_IE_EXCEPTION << "Cannot read parameter for " << getType() << " layer with name: " << layerParsePrms.name; - - return std::make_shared(inputs[0], inputs[1], GetBoolAttr(dn, "special_zero")); -} - // Minimum layer template <> std::shared_ptr V10Parser::LayerCreator::createLayer( @@ -1129,29 +981,6 @@ std::shared_ptr V10Parser::LayerCreator THROW_IE_EXCEPTION << "Invalid number of inputs: " << layerParsePrms.inputPorts.size(); } -// Power layer -template <> -std::shared_ptr V10Parser::LayerCreator::createLayer( - const ngraph::OutputVector& inputs, const pugi::xml_node& node, const Blob::CPtr& weights, - const GenericLayerParams& layerParsePrms) { - checkParameters(inputs, layerParsePrms, 2); - return std::make_shared(inputs[0], inputs[1]); -} - -// Softmax layer -template <> -std::shared_ptr V10Parser::LayerCreator::createLayer( - const ngraph::OutputVector& inputs, const pugi::xml_node& node, const Blob::CPtr& weights, - const GenericLayerParams& layerParsePrms) { - checkParameters(inputs, layerParsePrms, 1); - pugi::xml_node dn = node.child("data"); - - if (dn.empty()) - THROW_IE_EXCEPTION << "Cannot read parameter for " << getType() << " layer with name: " << layerParsePrms.name; - - return std::make_shared(inputs[0], GetUIntAttr(dn, "axis")); -} - // RegionYolo layer template <> std::shared_ptr V10Parser::LayerCreator::createLayer( @@ -1447,25 +1276,6 @@ std::shared_ptr V10Parser::LayerCreator:: pad_type); } -// ROIPooling layer -template <> -std::shared_ptr V10Parser::LayerCreator::createLayer( - const ngraph::OutputVector& inputs, const pugi::xml_node& node, const Blob::CPtr& weights, - const GenericLayerParams& layerParsePrms) { - checkParameters(inputs, layerParsePrms, 2); - pugi::xml_node dn = node.child("data"); - - if (dn.empty()) - THROW_IE_EXCEPTION << "Cannot read parameter for " << getType() << " layer with name: " << layerParsePrms.name; - - auto pooled_h = GetUIntAttr(dn, "pooled_h"); - auto pooled_w = GetUIntAttr(dn, "pooled_w"); - auto spatial_scale = GetFloatAttr(dn, "spatial_scale"); - auto method = GetStrAttr(dn, "method", "max"); - return std::make_shared(inputs[0], inputs[1], - ngraph::Shape {pooled_h, pooled_w}, spatial_scale, method); -} - // PSROIPooling layer template <> std::shared_ptr V10Parser::LayerCreator::createLayer( diff --git a/inference-engine/tests/ie_test_utils/functional_test_utils/network_utils.cpp b/inference-engine/tests/ie_test_utils/functional_test_utils/network_utils.cpp index 8f4a507eec94ed..ced9fc340c6a07 100644 --- a/inference-engine/tests/ie_test_utils/functional_test_utils/network_utils.cpp +++ b/inference-engine/tests/ie_test_utils/functional_test_utils/network_utils.cpp @@ -159,6 +159,9 @@ namespace FuncTestUtils { } } else { if (item.first == "originalLayersNames") continue; + // ROIPooling specification says that there should be two parameters- pooled_h and pooled_w + // our implementation of this op has a single parameter - output_size. + if (item.first == "output_size" && layer->type == "ROIPooling") continue; // autob is a WA for nGraph ops if ((item.first != "auto_broadcast" && item.first != "autob") || item.second != "numpy") { success = false; diff --git a/ngraph/core/include/ngraph/op/prior_box.hpp b/ngraph/core/include/ngraph/op/prior_box.hpp index 5256826a26dd5a..c861e680e912c5 100644 --- a/ngraph/core/include/ngraph/op/prior_box.hpp +++ b/ngraph/core/include/ngraph/op/prior_box.hpp @@ -41,10 +41,10 @@ namespace ngraph std::vector fixed_size; bool clip = false; bool flip = false; - float step = 1.0f; + float step = 0.0f; float offset = 0.0f; std::vector variance; - bool scale_all_sizes = false; + bool scale_all_sizes = true; }; namespace v0 diff --git a/ngraph/core/include/ngraph/op/prior_box_clustered.hpp b/ngraph/core/include/ngraph/op/prior_box_clustered.hpp index f97b15bbbeb8aa..9af4a621640914 100644 --- a/ngraph/core/include/ngraph/op/prior_box_clustered.hpp +++ b/ngraph/core/include/ngraph/op/prior_box_clustered.hpp @@ -33,9 +33,9 @@ namespace ngraph // variances Values to adjust prior boxes with std::vector widths; std::vector heights; - bool clip = false; - float step_widths = 1.0f; - float step_heights = 1.0f; + bool clip = true; + float step_widths = 0.0f; + float step_heights = 0.0f; float offset = 0.0f; std::vector variances; }; diff --git a/ngraph/core/include/ngraph/op/relu.hpp b/ngraph/core/include/ngraph/op/relu.hpp index df85a57f8d9d87..53a47e26de569a 100644 --- a/ngraph/core/include/ngraph/op/relu.hpp +++ b/ngraph/core/include/ngraph/op/relu.hpp @@ -46,6 +46,7 @@ namespace ngraph bool evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const override; + bool visit_attributes(AttributeVisitor& visitor) override; }; } using v0::Relu; diff --git a/ngraph/core/include/ngraph/op/reverse_sequence.hpp b/ngraph/core/include/ngraph/op/reverse_sequence.hpp index 0746eb296d1013..1e7ef15544e6e6 100644 --- a/ngraph/core/include/ngraph/op/reverse_sequence.hpp +++ b/ngraph/core/include/ngraph/op/reverse_sequence.hpp @@ -56,7 +56,7 @@ namespace ngraph void set_sequence_axis(int64_t sequence_axis) { m_seq_axis = sequence_axis; } private: int64_t m_batch_axis; - int64_t m_seq_axis; + int64_t m_seq_axis = 1; size_t m_normalized_batch_axis; size_t m_normalized_seq_axis; }; diff --git a/ngraph/core/include/ngraph/op/roi_pooling.hpp b/ngraph/core/include/ngraph/op/roi_pooling.hpp index 0c45f2e4b7d54c..de38d26bbb77a2 100644 --- a/ngraph/core/include/ngraph/op/roi_pooling.hpp +++ b/ngraph/core/include/ngraph/op/roi_pooling.hpp @@ -54,9 +54,9 @@ namespace ngraph bool visit_attributes(AttributeVisitor& visitor) override; private: - Shape m_output_size; + Shape m_output_size{0, 0}; float m_spatial_scale; - std::string m_method; + std::string m_method = "max"; }; } // namespace v0 diff --git a/ngraph/core/include/ngraph/opsets/opset.hpp b/ngraph/core/include/ngraph/opsets/opset.hpp index 0b3b585f9cbfe8..510500a48a1ea9 100644 --- a/ngraph/core/include/ngraph/opsets/opset.hpp +++ b/ngraph/core/include/ngraph/opsets/opset.hpp @@ -98,7 +98,7 @@ namespace ngraph { std::lock_guard guard(get_mutex()); return m_case_insensitive_type_info_map.find(to_upper_name(name)) != - m_name_type_info_map.end(); + m_case_insensitive_type_info_map.end(); } /// \brief Return true if node's type is in the opset diff --git a/ngraph/core/src/op/prior_box_clustered.cpp b/ngraph/core/src/op/prior_box_clustered.cpp index 4b173c6a007774..d0ad2773c436c7 100644 --- a/ngraph/core/src/op/prior_box_clustered.cpp +++ b/ngraph/core/src/op/prior_box_clustered.cpp @@ -96,13 +96,31 @@ shared_ptr op::PriorBoxClustered::clone_with_new_inputs(const OutputVector bool op::PriorBoxClustered::visit_attributes(AttributeVisitor& visitor) { - visitor.on_attribute("widths", m_attrs.widths); - visitor.on_attribute("heights", m_attrs.heights); + float step = 0; + float step_w_tmp = m_attrs.step_widths; + float step_h_tmp = m_attrs.step_heights; + + visitor.on_attribute("step", step); + visitor.on_attribute("step_w", m_attrs.step_widths); + visitor.on_attribute("step_h", m_attrs.step_heights); + if (step != 0) + { + // deserialization: + // if step_w/h is 0 or did not change, replace it with step + if (m_attrs.step_widths == 0 || m_attrs.step_widths == step_w_tmp) + { + m_attrs.step_widths = step; + } + if (m_attrs.step_heights == 0 || m_attrs.step_heights == step_h_tmp) + { + m_attrs.step_heights = step; + } + } + visitor.on_attribute("width", m_attrs.widths); + visitor.on_attribute("height", m_attrs.heights); visitor.on_attribute("clip", m_attrs.clip); - visitor.on_attribute("step_widths", m_attrs.step_widths); - visitor.on_attribute("step_heights", m_attrs.step_heights); visitor.on_attribute("offset", m_attrs.offset); - visitor.on_attribute("variances", m_attrs.variances); + visitor.on_attribute("variance", m_attrs.variances); return true; } diff --git a/ngraph/core/src/op/relu.cpp b/ngraph/core/src/op/relu.cpp index 634d654e66e4fb..253db2653adc9e 100644 --- a/ngraph/core/src/op/relu.cpp +++ b/ngraph/core/src/op/relu.cpp @@ -81,3 +81,8 @@ bool op::Relu::evaluate(const HostTensorVector& outputs, const HostTensorVector& OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::Relu::evaluate"); return relu::evaluate_relu(inputs[0], outputs[0], shape_size(get_output_shape(0))); } + +bool op::Relu::visit_attributes(AttributeVisitor& visitor) +{ + return true; +} diff --git a/ngraph/core/src/op/roi_pooling.cpp b/ngraph/core/src/op/roi_pooling.cpp index 31dc072ea091bd..2002dc3654ac3f 100644 --- a/ngraph/core/src/op/roi_pooling.cpp +++ b/ngraph/core/src/op/roi_pooling.cpp @@ -147,6 +147,8 @@ shared_ptr op::ROIPooling::clone_with_new_inputs(const OutputVector& new_a bool op::ROIPooling::visit_attributes(AttributeVisitor& visitor) { visitor.on_attribute("output_size", m_output_size); + visitor.on_attribute("pooled_h", m_output_size[0]); + visitor.on_attribute("pooled_w", m_output_size[1]); visitor.on_attribute("spatial_scale", m_spatial_scale); visitor.on_attribute("method", m_method); return true; diff --git a/ngraph/python/tests/test_ngraph/test_create_op.py b/ngraph/python/tests/test_ngraph/test_create_op.py index 996cad6eb1af2f..7c8d13b1c87077 100644 --- a/ngraph/python/tests/test_ngraph/test_create_op.py +++ b/ngraph/python/tests/test_ngraph/test_create_op.py @@ -866,6 +866,7 @@ def test_prior_box(int_dtype, fp_dtype): "offset": fp_dtype(0), "min_size": np.array([2, 3], dtype=fp_dtype), "aspect_ratio": np.array([1.5, 2.0, 2.5], dtype=fp_dtype), + "scale_all_sizes": False } layer_shape = ng.constant(np.array([32, 32], dtype=int_dtype), int_dtype) @@ -896,8 +897,8 @@ def test_prior_box_clustered(int_dtype, fp_dtype): image_size = np.array([64, 64], dtype=int_dtype) attributes = { "offset": fp_dtype(0.5), - "widths": np.array([4.0, 2.0, 3.2], dtype=fp_dtype), - "heights": np.array([1.0, 2.0, 1.0], dtype=fp_dtype), + "width": np.array([4.0, 2.0, 3.2], dtype=fp_dtype), + "height": np.array([1.0, 2.0, 1.0], dtype=fp_dtype), } output_size = ng.constant(np.array([19, 19], dtype=int_dtype), int_dtype) diff --git a/ngraph/test/type_prop_layers.cpp b/ngraph/test/type_prop_layers.cpp index 1e2c0f01a79ea4..1d4c012089d346 100644 --- a/ngraph/test/type_prop_layers.cpp +++ b/ngraph/test/type_prop_layers.cpp @@ -79,6 +79,7 @@ TEST(type_prop_layers, prior_box1) op::PriorBoxAttrs attrs; attrs.min_size = {2.0f, 3.0f}; attrs.aspect_ratio = {1.5f, 2.0f, 2.5f}; + attrs.scale_all_sizes = false; auto layer_shape = op::Constant::create(element::i64, Shape{2}, {32, 32}); auto image_shape = op::Constant::create(element::i64, Shape{2}, {300, 300}); @@ -92,6 +93,7 @@ TEST(type_prop_layers, prior_box2) attrs.min_size = {2.0f, 3.0f}; attrs.aspect_ratio = {1.5f, 2.0f, 2.5f}; attrs.flip = true; + attrs.scale_all_sizes = false; auto layer_shape = op::Constant::create(element::i64, Shape{2}, {32, 32}); auto image_shape = op::Constant::create(element::i64, Shape{2}, {300, 300}); @@ -106,7 +108,6 @@ TEST(type_prop_layers, prior_box3) attrs.max_size = {315.0f}; attrs.aspect_ratio = {2.0f}; attrs.flip = true; - attrs.scale_all_sizes = true; auto layer_shape = op::Constant::create(element::i64, Shape{2}, {1, 1}); auto image_shape = op::Constant::create(element::i64, Shape{2}, {300, 300}); From 8581a0730d7ce24da282e8da8be8d159f769bf08 Mon Sep 17 00:00:00 2001 From: Alexey Suhov Date: Mon, 7 Dec 2020 00:42:31 +0300 Subject: [PATCH 015/244] update OpenCV to 4.5.1 (#3482) * update OpenCV to 4.5.1 --- .ci/azure/windows.yml | 4 ++-- inference-engine/cmake/dependencies.cmake | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.ci/azure/windows.yml b/.ci/azure/windows.yml index efd5afba0a0a9d..882fecad7f1b02 100644 --- a/.ci/azure/windows.yml +++ b/.ci/azure/windows.yml @@ -169,7 +169,7 @@ jobs: # Add for gtest-parallel, it hangs now (CVS-33386) #python $(BUILD_DIR)\gtest-parallel\gtest-parallel $(BIN_DIR)\MklDnnFunctionalTests --workers=$(WORKERS_NUMBER) --dump_json_test_results=MklDnnFunctionalTests.json --gtest_filter=*smoke* -- --gtest_print_time=1 - script: | - set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;$(REPO_DIR)\inference-engine\temp\opencv_4.5.0\opencv\bin;%PATH% + set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;$(REPO_DIR)\inference-engine\temp\opencv_4.5.1\opencv\bin;%PATH% set DATA_PATH=$(MODELS_PATH) set MODELS_PATH=$(MODELS_PATH) $(BIN_DIR)\MklDnnFunctionalTests --gtest_filter=*smoke* --gtest_print_time=1 --gtest_output=xml:TEST-MklDnnFunctionalTests.xml @@ -177,7 +177,7 @@ jobs: continueOnError: false - script: | - set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;$(REPO_DIR)\inference-engine\temp\opencv_4.5.0\opencv\bin;%PATH% + set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;$(REPO_DIR)\inference-engine\temp\opencv_4.5.1\opencv\bin;%PATH% set DATA_PATH=$(MODELS_PATH) set MODELS_PATH=$(MODELS_PATH) $(BIN_DIR)\InferenceEngineCAPITests --gtest_output=xml:TEST-InferenceEngineCAPITests.xml diff --git a/inference-engine/cmake/dependencies.cmake b/inference-engine/cmake/dependencies.cmake index 4c1a7ff18d1e31..86822bbbfd2946 100644 --- a/inference-engine/cmake/dependencies.cmake +++ b/inference-engine/cmake/dependencies.cmake @@ -194,8 +194,8 @@ endif () if (ENABLE_OPENCV) reset_deps_cache(OpenCV_DIR) - set(OPENCV_VERSION "4.5.0") - set(OPENCV_BUILD "36") + set(OPENCV_VERSION "4.5.1") + set(OPENCV_BUILD "044") set(OPENCV_BUILD_YOCTO "337") if (AARCH64) @@ -227,36 +227,36 @@ if (ENABLE_OPENCV) TARGET_PATH "${TEMP}/opencv_${OPENCV_VERSION}/opencv" ENVIRONMENT "OpenCV_DIR" VERSION_REGEX ".*_([0-9]+.[0-9]+.[0-9]+).*" - SHA256 "f20bfbf47281895fe488b594090958bb37f6893e5d9845ae56bc84079987f1df") + SHA256 "5250bfe5860c15eb1b31963c78804ee9b301a19d8d6e920c06ef41de681cb99e") elseif(APPLE AND X86_64) RESOLVE_DEPENDENCY(OPENCV ARCHIVE_MAC "opencv/opencv_${OPENCV_VERSION}-${OPENCV_BUILD}_osx.txz" TARGET_PATH "${TEMP}/opencv_${OPENCV_VERSION}_osx/opencv" ENVIRONMENT "OpenCV_DIR" VERSION_REGEX ".*_([0-9]+.[0-9]+.[0-9]+).*" - SHA256 "3c0d81b6450e209daea9597906b24fab2c2654fa3a966d38c7ac87e4de5043a6") + SHA256 "f3ebc5cc72c86106c30cc711ac689e02281556bb43c09a89cd45cb99b6bef9a8") elseif(LINUX) if (AARCH64) set(OPENCV_SUFFIX "yocto_kmb") set(OPENCV_BUILD "${OPENCV_BUILD_YOCTO}") elseif (ARM) set(OPENCV_SUFFIX "debian9arm") - set(OPENCV_HASH "120336ac7696779a8152c2b71ace3fa5cf868b452d03032ef66513ed8446a794") + set(OPENCV_HASH "0e787d6738092993bc92bb55975f52caabae45dc73473b5196d15e65e87d6b9d") elseif (LINUX_OS_NAME STREQUAL "CentOS 7" OR CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9") set(OPENCV_SUFFIX "centos7") - set(OPENCV_HASH "ed68bc21ae62ac892f61ba7bad266be3a1a1937e692f9dc7eb080c167a5fd37a") + set(OPENCV_HASH "9b813af064d463b31fa1603b11b6559532a031d59bb0782d234380955fd397e0") elseif (LINUX_OS_NAME MATCHES "CentOS 8") set(OPENCV_SUFFIX "centos8") - set(OPENCV_HASH "94b6a22eecd99c1c7383ef171750b75ea8b5c13e6399937387c6fb11ec1ecd69") + set(OPENCV_HASH "8ec3e3552500dee334162386b98cc54a5608de1f1a18f283523fc0cc13ee2f83") elseif (LINUX_OS_NAME STREQUAL "Ubuntu 16.04") set(OPENCV_SUFFIX "ubuntu16") set(OPENCV_HASH "cd46831b4d8d1c0891d8d22ff5b2670d0a465a8a8285243059659a50ceeae2c3") elseif (LINUX_OS_NAME STREQUAL "Ubuntu 18.04") set(OPENCV_SUFFIX "ubuntu18") - set(OPENCV_HASH "94b6a22eecd99c1c7383ef171750b75ea8b5c13e6399937387c6fb11ec1ecd69") + set(OPENCV_HASH "8ec3e3552500dee334162386b98cc54a5608de1f1a18f283523fc0cc13ee2f83") elseif (LINUX_OS_NAME STREQUAL "Ubuntu 20.04") set(OPENCV_SUFFIX "ubuntu20") - set(OPENCV_HASH "85ddb4df514e47b8451c5416e8ba91a3caa6b0c97ea8129d0c89cd005bd4995f") + set(OPENCV_HASH "2b7808d002864acdc5fc0b19cd30dadc31a37cc267931cad605f23f2383bfc21") else() message(FATAL_ERROR "OpenCV is not available on current platform (${LINUX_OS_NAME})") endif() From fc049fc6ce1b10e8881a341078b3014cb5ae6c7d Mon Sep 17 00:00:00 2001 From: Jozef Daniecki Date: Mon, 7 Dec 2020 04:55:10 +0100 Subject: [PATCH 016/244] Fix serialization dynamic shapes (#3475) * Align EpsMode attribute to specification. * Change dynamic shape resolving in serialization. --- .../src/transformations/src/transformations/serialize.cpp | 6 ++---- ngraph/core/src/op/util/attr_types.cpp | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/inference-engine/src/transformations/src/transformations/serialize.cpp b/inference-engine/src/transformations/src/transformations/serialize.cpp index 33c64233bd9908..2630be432a5f4e 100644 --- a/inference-engine/src/transformations/src/transformations/serialize.cpp +++ b/inference-engine/src/transformations/src/transformations/serialize.cpp @@ -303,15 +303,13 @@ bool is_exec_graph(const ngraph::Function& f) { } bool resolve_dynamic_shapes(const ngraph::Function& f) { - const auto & f_results = f.get_results(); - if (std::all_of(f_results.begin(), f_results.end(), + const auto & f_ops = f.get_ordered_ops(); + if (std::all_of(f_ops.begin(), f_ops.end(), [](std::shared_ptr results) { return !results->is_dynamic(); })) { return false; } auto f_clone = ngraph::clone_function(f); - - const auto & f_ops = f.get_ordered_ops(); const auto & f_clone_ops = f_clone->get_ordered_ops(); NGRAPH_CHECK(f_ops.size() == f_clone_ops.size(), "Unexpected get_ordered_ops method behaviour"); diff --git a/ngraph/core/src/op/util/attr_types.cpp b/ngraph/core/src/op/util/attr_types.cpp index d0713631158f65..ee102f4bfff600 100644 --- a/ngraph/core/src/op/util/attr_types.cpp +++ b/ngraph/core/src/op/util/attr_types.cpp @@ -118,7 +118,7 @@ namespace ngraph NGRAPH_API EnumNames& EnumNames::get() { static auto enum_names = EnumNames( - "op::EpsMode", {{"ADD", op::EpsMode::ADD}, {"MAX", op::EpsMode::MAX}}); + "op::EpsMode", {{"add", op::EpsMode::ADD}, {"max", op::EpsMode::MAX}}); return enum_names; } From fc40104c7fafc5201b3ea9c54f3e849ac0728b68 Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Mon, 7 Dec 2020 08:16:00 +0300 Subject: [PATCH 017/244] Make the Python tools directly executable (#3476) --- inference-engine/tools/benchmark_tool/benchmark_app.py | 2 ++ inference-engine/tools/cross_check_tool/cross_check_tool.py | 2 ++ 2 files changed, 4 insertions(+) mode change 100644 => 100755 inference-engine/tools/benchmark_tool/benchmark_app.py mode change 100644 => 100755 inference-engine/tools/cross_check_tool/cross_check_tool.py diff --git a/inference-engine/tools/benchmark_tool/benchmark_app.py b/inference-engine/tools/benchmark_tool/benchmark_app.py old mode 100644 new mode 100755 index a575c15d9b0122..d0644d32475092 --- a/inference-engine/tools/benchmark_tool/benchmark_app.py +++ b/inference-engine/tools/benchmark_tool/benchmark_app.py @@ -1,3 +1,5 @@ +#!/usr/bin/python3 + """ Copyright (C) 2018-2019 Intel Corporation diff --git a/inference-engine/tools/cross_check_tool/cross_check_tool.py b/inference-engine/tools/cross_check_tool/cross_check_tool.py old mode 100644 new mode 100755 index d45d9601eacbb9..543a7cdcc7b2b7 --- a/inference-engine/tools/cross_check_tool/cross_check_tool.py +++ b/inference-engine/tools/cross_check_tool/cross_check_tool.py @@ -1,3 +1,5 @@ +#!/usr/bin/python3 + # Copyright (C) 2018-2019 Intel Corporation # SPDX-License-Identifier: Apache-2.0 # From 5cc08367b21e0e6344762df95b460d854d03b1a1 Mon Sep 17 00:00:00 2001 From: Andrey Somsikov Date: Mon, 7 Dec 2020 12:56:37 +0300 Subject: [PATCH 018/244] Build time_tests with OpenVINO install (#3484) --- tests/time_tests/CMakeLists.txt | 5 ++- tests/time_tests/README.md | 14 ++++++-- .../src/timetests_helper/CMakeLists.txt | 36 +++++++++++++++++-- 3 files changed, 48 insertions(+), 7 deletions(-) diff --git a/tests/time_tests/CMakeLists.txt b/tests/time_tests/CMakeLists.txt index f4b4c670387390..4175c7f5503a34 100644 --- a/tests/time_tests/CMakeLists.txt +++ b/tests/time_tests/CMakeLists.txt @@ -9,6 +9,9 @@ if (CMAKE_BUILD_TYPE STREQUAL "") set(CMAKE_BUILD_TYPE "Release") endif() -find_package(InferenceEngineDeveloperPackage REQUIRED) +find_package(InferenceEngineDeveloperPackage QUIET) +if (NOT InferenceEngineDeveloperPackage_FOUND) + find_package(InferenceEngine REQUIRED) +endif() add_subdirectory(src) diff --git a/tests/time_tests/README.md b/tests/time_tests/README.md index a68b2ff4814efb..282f0d8394c7d7 100644 --- a/tests/time_tests/README.md +++ b/tests/time_tests/README.md @@ -6,19 +6,27 @@ pipelines and calcuates the average execution time. ## Prerequisites -To build the time tests, you need to have the `build` folder, which is created -when you configure and build OpenVINO™. +To build the time tests, you need to have OpenVINO™ installed or build from source. ## Measure Time -To build and run the tests, open a terminal and run the commands below: +To build and run the tests, open a terminal, set OpenVINO™ environment and run +the commands below: 1. Build tests: ``` bash mkdir build && cd build +cmake .. && make time_tests +``` + +If you don't have OpenVINO™ installed you need to have the `build` folder, which +is created when you configure and build OpenVINO™ from sources: + +``` bash cmake .. -DInferenceEngineDeveloperPackage_DIR=$(realpath ../../../build) && make time_tests ``` + 2. Run test: ``` bash ./scripts/run_timetest.py ../../bin/intel64/Release/timetest_infer -m model.xml -d CPU diff --git a/tests/time_tests/src/timetests_helper/CMakeLists.txt b/tests/time_tests/src/timetests_helper/CMakeLists.txt index ba5760edecf887..072805bd42a0b3 100644 --- a/tests/time_tests/src/timetests_helper/CMakeLists.txt +++ b/tests/time_tests/src/timetests_helper/CMakeLists.txt @@ -4,10 +4,40 @@ set (TARGET_NAME "timetests_helper") -find_package(gflags REQUIRED) - file (GLOB SRC *.cpp) add_library(${TARGET_NAME} STATIC ${SRC}) target_include_directories(${TARGET_NAME} PUBLIC "${CMAKE_SOURCE_DIR}/include") -target_link_libraries(${TARGET_NAME} gflags) +find_package(gflags QUIET) +if (gflags_FOUND) + set(GFLAGS_LIBRARIES gflags) # use gflags from developer package +else() + include(ExternalProject) + find_package(Threads) + set(gflags_PREFIX ${CMAKE_BINARY_DIR}/external/gflags-prefix) + set(gflags_INSTALL ${CMAKE_BINARY_DIR}/external/gflags-install) + set(gflags_LIB ${gflags_INSTALL}/lib/libgflags.a) + + ExternalProject_Add( + gflags + PREFIX ${gflags_PREFIX} + GIT_REPOSITORY "https://github.com/gflags/gflags.git" + GIT_TAG "v2.2.2" + UPDATE_COMMAND "" + INSTALL_DIR ${gflags_INSTALL} + CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} + CMAKE_GENERATOR ${CMAKE_GENERATOR} + CMAKE_GENERATOR_PLATFORM ${CMAKE_GENERATOR_PLATFORM} + CMAKE_GENERATOR_TOOLSET ${CMAKE_GENERATOR_TOOLSET} + CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${gflags_INSTALL} + EXCLUDE_FROM_ALL TRUE + BUILD_BYPRODUCTS ${gflags_LIB} + LOG_DOWNLOAD 1 + LOG_INSTALL 1 + ) + set(GFLAGS_LIBRARIES ${gflags_LIB} ${CMAKE_THREAD_LIBS_INIT}) + add_dependencies(${TARGET_NAME} gflags) + target_include_directories(${TARGET_NAME} PRIVATE "${gflags_INSTALL}/include") +endif() + +target_link_libraries(${TARGET_NAME} ${GFLAGS_LIBRARIES}) From 33ca1760f0da2ce7d9e703fc231ca76bd1e8cf1a Mon Sep 17 00:00:00 2001 From: Alexandra Sidorova Date: Mon, 7 Dec 2020 14:48:10 +0300 Subject: [PATCH 019/244] [CPU][IE TESTS] Covered Round .5 cases with tests (#3473) --- .../src/single_layer_tests/activation.cpp | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/activation.cpp b/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/activation.cpp index d0fe8056b6d2b3..ed115aed9e6f0a 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/activation.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/activation.cpp @@ -62,36 +62,55 @@ InferenceEngine::Blob::Ptr ActivationLayerTest::GenerateInput(const InferenceEng bool inPrcSigned = function->get_parameters()[0]->get_element_type().is_signed(); int32_t data_start_from; uint32_t data_range; + int32_t resolution; switch (activationType) { case ngraph::helpers::ActivationTypes::Log: { data_start_from = 1; data_range = 20; + resolution = 32768; break; } case ngraph::helpers::ActivationTypes::Sqrt: { data_start_from = 0; data_range = 20; + resolution = 32768; break; } case ngraph::helpers::ActivationTypes::Asin: { data_start_from = -1; data_range = 2; + resolution = 32768; break; } case ngraph::helpers::ActivationTypes::Acos: { data_start_from = -1; data_range = 2; + resolution = 32768; break; } case ngraph::helpers::ActivationTypes::Ceiling: { data_start_from = -1000; data_range = 2000; + resolution = 32768; + break; + } + case ngraph::helpers::ActivationTypes::RoundHalfToEven: { + data_start_from = -10; + data_range = 20; + resolution = 4; + break; + } + case ngraph::helpers::ActivationTypes::RoundHalfAwayFromZero: { + data_start_from = -10; + data_range = 20; + resolution = 4; break; } default: { data_start_from = -10; data_range = 20; + resolution = 32768; break; } } @@ -112,7 +131,7 @@ InferenceEngine::Blob::Ptr ActivationLayerTest::GenerateInput(const InferenceEng } return FuncTestUtils::createAndFillBlob(info.getTensorDesc(), data_range, data_start_from, - 32768); + resolution); } ngraph::ParameterVector ActivationParamLayerTest::createActivationParams(ngraph::element::Type ngPrc, std::vector inShape) { From 6bad345df9572cea036e21658185868820e2f83b Mon Sep 17 00:00:00 2001 From: Bartek Szmelczynski Date: Mon, 7 Dec 2020 13:42:28 +0100 Subject: [PATCH 020/244] Refactor boolean attribute type (#3478) * Refactor boolean attribute type * fix python code --- docs/ops/condition/Bucketize_3.md | 6 +++--- docs/ops/detection/DetectionOutput_1.md | 4 ++-- docs/ops/detection/PriorBoxClustered_1.md | 6 +++--- docs/ops/detection/PriorBox_1.md | 18 +++++++++--------- docs/ops/detection/Proposal_1.md | 12 ++++++------ docs/ops/detection/Proposal_4.md | 12 ++++++------ docs/ops/image/Interpolate_1.md | 10 +++++----- docs/ops/image/Interpolate_4.md | 8 ++++---- docs/ops/matrix/MatMul_1.md | 12 ++++++------ docs/ops/movement/Reverse_1.md | 4 ++-- docs/ops/pooling/AvgPool_1.md | 2 +- docs/ops/reduction/ReduceL1_4.md | 16 ++++++++-------- docs/ops/reduction/ReduceL2_4.md | 16 ++++++++-------- docs/ops/reduction/ReduceLogicalAnd_1.md | 16 ++++++++-------- docs/ops/reduction/ReduceLogicalOr_1.md | 16 ++++++++-------- docs/ops/reduction/ReduceMax_1.md | 16 ++++++++-------- docs/ops/reduction/ReduceMean_1.md | 16 ++++++++-------- docs/ops/reduction/ReduceMin_1.md | 16 ++++++++-------- docs/ops/reduction/ReduceProd_1.md | 16 ++++++++-------- docs/ops/reduction/ReduceSum_1.md | 16 ++++++++-------- docs/ops/sequence/CTCGreedyDecoder_1.md | 4 ++-- docs/ops/sequence/CTCLoss_4.md | 20 ++++++++++---------- docs/ops/sequence/GRUCell_3.md | 4 ++-- docs/ops/sort/NonMaxSuppression_1.md | 8 ++++---- docs/ops/sort/NonMaxSuppression_3.md | 8 ++++---- docs/ops/sort/NonMaxSuppression_4.md | 8 ++++---- docs/ops/sort/NonMaxSuppression_5.md | 8 ++++---- 27 files changed, 149 insertions(+), 149 deletions(-) diff --git a/docs/ops/condition/Bucketize_3.md b/docs/ops/condition/Bucketize_3.md index f1b23cc0cb9d9b..066b6d8dae9dc2 100644 --- a/docs/ops/condition/Bucketize_3.md +++ b/docs/ops/condition/Bucketize_3.md @@ -24,10 +24,10 @@ For example, if the first input tensor is `[[3, 50], [10, -1]]` and the second i * **Description**: indicates whether bucket includes the right or the left edge of interval. * **Range of values**: - * True - bucket includes the right interval edge - * False - bucket includes the left interval edge + * true - bucket includes the right interval edge + * false - bucket includes the left interval edge * **Type**: `boolean` - * **Default value**: True + * **Default value**: true * **Required**: *no* **Inputs**: diff --git a/docs/ops/detection/DetectionOutput_1.md b/docs/ops/detection/DetectionOutput_1.md index 84cd483d6d5b88..d6ab50950ddf7f 100644 --- a/docs/ops/detection/DetectionOutput_1.md +++ b/docs/ops/detection/DetectionOutput_1.md @@ -39,9 +39,9 @@ At each feature map cell, *DetectionOutput* predicts the offsets relative to the * *variance_encoded_in_target* * **Description**: *variance_encoded_in_target* is a flag that denotes if variance is encoded in target. If flag is false then it is necessary to adjust the predicted offset accordingly. - * **Range of values**: False or True + * **Range of values**: false or true * **Type**: boolean - * **Default value**: False + * **Default value**: false * **Required**: *no* * *keep_top_k* diff --git a/docs/ops/detection/PriorBoxClustered_1.md b/docs/ops/detection/PriorBoxClustered_1.md index 33eaf9ed78bf05..5d798442a92b6b 100644 --- a/docs/ops/detection/PriorBoxClustered_1.md +++ b/docs/ops/detection/PriorBoxClustered_1.md @@ -20,10 +20,10 @@ * **Description**: *clip* is a flag that denotes if each value in the output tensor should be clipped within [0,1]. * **Range of values**: - * False - clipping is not performed - * True - each value in the output tensor is within [0,1] + * false - clipping is not performed + * true - each value in the output tensor is within [0,1] * **Type**: boolean - * **Default value**: True + * **Default value**: true * **Required**: *no* * *step (step_w, step_h)* diff --git a/docs/ops/detection/PriorBox_1.md b/docs/ops/detection/PriorBox_1.md index 8cec849b965104..99842bc05caac1 100644 --- a/docs/ops/detection/PriorBox_1.md +++ b/docs/ops/detection/PriorBox_1.md @@ -28,20 +28,20 @@ * **Description**: *flip* is a flag that denotes that each *aspect_ratio* is duplicated and flipped. For example, *flip* equals 1 and *aspect_ratio* equals to "4.0,2.0" mean that aspect_ratio is equal to "4.0,2.0,0.25,0.5". * **Range of values**: - * False - each *aspect_ratio* is flipped - * True - each *aspect_ratio* is not flipped + * false - each *aspect_ratio* is flipped + * true - each *aspect_ratio* is not flipped * **Type**: boolean - * **Default value**: False + * **Default value**: false * **Required**: *no* * *clip* * **Description**: *clip* is a flag that denotes if each value in the output tensor should be clipped to [0,1] interval. * **Range of values**: - * False - clipping is not performed - * True - each value in the output tensor is clipped to [0,1] interval. + * false - clipping is not performed + * true - each value in the output tensor is clipped to [0,1] interval. * **Type**: boolean - * **Default value**: False + * **Default value**: false * **Required**: *no* * *step* @@ -72,10 +72,10 @@ * **Description**: *scale_all_sizes* is a flag that denotes type of inference. For example, *scale_all_sizes* equals 0 means that the PriorBox layer is inferred in MXNet-like manner. In particular, *max_size* attribute is ignored. * **Range of values**: - * False - *max_size* is ignored - * True - *max_size* is used + * false - *max_size* is ignored + * true - *max_size* is used * **Type**: boolean - * **Default value**: True + * **Default value**: true * **Required**: *no* * *fixed_ratio* diff --git a/docs/ops/detection/Proposal_1.md b/docs/ops/detection/Proposal_1.md index 84a0a1c8c93309..6d2681a86036bc 100644 --- a/docs/ops/detection/Proposal_1.md +++ b/docs/ops/detection/Proposal_1.md @@ -87,25 +87,25 @@ * *clip_before_nms* * **Description**: *clip_before_nms* flag that specifies whether to perform clip bounding boxes before non-maximum suppression or not. - * **Range of values**: True or False + * **Range of values**: true or false * **Type**: `boolean` - * **Default value**: True + * **Default value**: true * **Required**: *no* * *clip_after_nms* * **Description**: *clip_after_nms* is a flag that specifies whether to perform clip bounding boxes after non-maximum suppression or not. - * **Range of values**: True or False + * **Range of values**: true or false * **Type**: `boolean` - * **Default value**: False + * **Default value**: false * **Required**: *no* * *normalize* * **Description**: *normalize* is a flag that specifies whether to perform normalization of output boxes to *[0,1]* interval or not. - * **Range of values**: True or False + * **Range of values**: true or false * **Type**: `boolean` - * **Default value**: False + * **Default value**: false * **Required**: *no* * *box_size_scale* diff --git a/docs/ops/detection/Proposal_4.md b/docs/ops/detection/Proposal_4.md index a22cd1684c64b1..a6c57b1be812e9 100644 --- a/docs/ops/detection/Proposal_4.md +++ b/docs/ops/detection/Proposal_4.md @@ -94,25 +94,25 @@ the second optional tensor of shape `[batch_size * post_nms_topn]` with probabil * *clip_before_nms* * **Description**: *clip_before_nms* flag that specifies whether to perform clip bounding boxes before non-maximum suppression or not. - * **Range of values**: True or False + * **Range of values**: true or false * **Type**: `boolean` - * **Default value**: True + * **Default value**: true * **Required**: *no* * *clip_after_nms* * **Description**: *clip_after_nms* is a flag that specifies whether to perform clip bounding boxes after non-maximum suppression or not. - * **Range of values**: True or False + * **Range of values**: true or false * **Type**: `boolean` - * **Default value**: False + * **Default value**: false * **Required**: *no* * *normalize* * **Description**: *normalize* is a flag that specifies whether to perform normalization of output boxes to *[0,1]* interval or not. - * **Range of values**: True or False + * **Range of values**: true or false * **Type**: `boolean` - * **Default value**: False + * **Default value**: false * **Required**: *no* * *box_size_scale* diff --git a/docs/ops/image/Interpolate_1.md b/docs/ops/image/Interpolate_1.md index 28935c4e80e8a3..b3a45838394353 100644 --- a/docs/ops/image/Interpolate_1.md +++ b/docs/ops/image/Interpolate_1.md @@ -27,19 +27,19 @@ * *align_corners* * **Description**: *align_corners* is a flag that specifies whether to align corners or not. 1 means the alignment is applied, 0 means the alignment isn't applied. - * **Range of values**: True or False + * **Range of values**: true or false * **Type**: `boolean` - * **Default value**: True + * **Default value**: true * **Required**: *no* * *antialias* * **Description**: *antialias* is a flag that specifies whether to perform anti-aliasing. * **Range of values**: - * False - do not perform anti-aliasing - * True - perform anti-aliasing + * false - do not perform anti-aliasing + * true - perform anti-aliasing * **Type**: boolean - * **Default value**: False + * **Default value**: false * **Required**: *no* * *pads_begin* diff --git a/docs/ops/image/Interpolate_4.md b/docs/ops/image/Interpolate_4.md index 6a29876997b964..72bb435227381f 100644 --- a/docs/ops/image/Interpolate_4.md +++ b/docs/ops/image/Interpolate_4.md @@ -56,10 +56,10 @@ * **Description**: *antialias* is a flag that specifies whether to perform anti-aliasing. * **Range of values**: - * False - do not perform anti-aliasing - * True - perform anti-aliasing + * false - do not perform anti-aliasing + * true - perform anti-aliasing * **Type**: boolean - * **Default value**: False + * **Default value**: false * **Required**: *no* * *pads_begin* @@ -492,4 +492,4 @@ class InterpolateCalculation:
-``` \ No newline at end of file +``` diff --git a/docs/ops/matrix/MatMul_1.md b/docs/ops/matrix/MatMul_1.md index 29376972bdab48..346b7e1cc45c25 100644 --- a/docs/ops/matrix/MatMul_1.md +++ b/docs/ops/matrix/MatMul_1.md @@ -40,18 +40,18 @@ Two attributes, `transpose_a` and `transpose_b` specify embedded transposition f * *transpose_a* - * **Description**: transposes dimensions ROW_INDEX_DIM and COL_INDEX_DIM of the 1st input; **False** means no transpose, **True** means transpose. It is ignored if first input is 1D tensor. - * **Range of values**: False or True + * **Description**: transposes dimensions ROW_INDEX_DIM and COL_INDEX_DIM of the 1st input; **false** means no transpose, **true** means transpose. It is ignored if first input is 1D tensor. + * **Range of values**: false or true * **Type**: boolean - * **Default value**: False + * **Default value**: false * **Required**: *no* * *transpose_b* - * **Description**: transposes dimensions ROW_INDEX_DIM and COL_INDEX_DIM of the 2nd input; **False** means no transpose, **True** means transpose. It is ignored if second input is 1D tensor. - * **Range of values**: False or True + * **Description**: transposes dimensions ROW_INDEX_DIM and COL_INDEX_DIM of the 2nd input; **false** means no transpose, **true** means transpose. It is ignored if second input is 1D tensor. + * **Range of values**: false or true * **Type**: boolean - * **Default value**: False + * **Default value**: false * **Required**: *no* diff --git a/docs/ops/movement/Reverse_1.md b/docs/ops/movement/Reverse_1.md index 4b96f0f035093e..aef9a5320c7937 100644 --- a/docs/ops/movement/Reverse_1.md +++ b/docs/ops/movement/Reverse_1.md @@ -10,9 +10,9 @@ If `index` mode is used, the second tensor should contain indices of axes that should be reversed. The length of the second tensor should be in a range from 0 to rank of the 1st input tensor. -In case if `mask` mode is used, then the second input tensor length should be equal to the rank of the 1st input. And each value has boolean value `True` or `False`. `True` means the corresponding axes should be reverted, `False` means it should be untouched. +In case if `mask` mode is used, then the second input tensor length should be equal to the rank of the 1st input. And each value has boolean value `true` or `false`. `true` means the corresponding axes should be reverted, `false` means it should be untouched. -If no axis specified, that means either the second input is empty if `index` mode is used or second input has only `False` elements if `mask` mode is used, then *Reverse* just passes the source tensor through output not doing any data movements. +If no axis specified, that means either the second input is empty if `index` mode is used or second input has only `false` elements if `mask` mode is used, then *Reverse* just passes the source tensor through output not doing any data movements. **Attributes** diff --git a/docs/ops/pooling/AvgPool_1.md b/docs/ops/pooling/AvgPool_1.md index b8f0ecb2f31ff3..7ea9be03fd7be6 100644 --- a/docs/ops/pooling/AvgPool_1.md +++ b/docs/ops/pooling/AvgPool_1.md @@ -47,7 +47,7 @@ * *exclude_pad* * **Description**: *exclude_pad* is a type of pooling strategy for values in the padding area. For example, if *exclude_pad* is "true", zero-values in the padding are not used. - * **Range of values**: True or False + * **Range of values**: true or false * **Type**: boolean * **Default value**: None * **Required**: *yes* diff --git a/docs/ops/reduction/ReduceL1_4.md b/docs/ops/reduction/ReduceL1_4.md index d3f9d3160cc8d6..7a119bf8014ffd 100644 --- a/docs/ops/reduction/ReduceL1_4.md +++ b/docs/ops/reduction/ReduceL1_4.md @@ -10,10 +10,10 @@ * *keep_dims* - * **Description**: If set to `True` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1. - * **Range of values**: True or False + * **Description**: If set to `true` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1. + * **Range of values**: true or false * **Type**: `boolean` - * **Default value**: False + * **Default value**: false * **Required**: *no* **Inputs** @@ -24,7 +24,7 @@ **Outputs** -* **1**: Tensor of the same type as the 1st input tensor and `shape[i] = shapeOf(input1)[i]` for all `i` that is not in the list of axes from the 2nd input. For dimensions from the 2nd input tensor, `shape[i] == 1` if `keep_dims == True`, or `i`-th dimension is removed from the output otherwise. +* **1**: Tensor of the same type as the 1st input tensor and `shape[i] = shapeOf(input1)[i]` for all `i` that is not in the list of axes from the 2nd input. For dimensions from the 2nd input tensor, `shape[i] == 1` if `keep_dims == true`, or `i`-th dimension is removed from the output otherwise. **Types** @@ -48,7 +48,7 @@ Corner cases: ```xml - + 6 @@ -73,7 +73,7 @@ Corner cases: ```xml - + 6 @@ -96,7 +96,7 @@ Corner cases: ```xml - + 6 @@ -120,7 +120,7 @@ Corner cases: ```xml - + 6 diff --git a/docs/ops/reduction/ReduceL2_4.md b/docs/ops/reduction/ReduceL2_4.md index 918f8cb4d5caf7..d2d6f140af0d02 100644 --- a/docs/ops/reduction/ReduceL2_4.md +++ b/docs/ops/reduction/ReduceL2_4.md @@ -10,10 +10,10 @@ * *keep_dims* - * **Description**: If set to `True` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1. - * **Range of values**: True or False + * **Description**: If set to `true` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1. + * **Range of values**: true or false * **Type**: `boolean` - * **Default value**: False + * **Default value**: false * **Required**: *no* **Inputs** @@ -24,7 +24,7 @@ **Outputs** -* **1**: Tensor of the same type as the 1st input tensor and `shape[i] = shapeOf(input1)[i]` for all `i` that is not in the list of axes from the 2nd input. For dimensions from the 2nd input tensor, `shape[i] == 1` if `keep_dims == True`, or `i`-th dimension is removed from the output otherwise. +* **1**: Tensor of the same type as the 1st input tensor and `shape[i] = shapeOf(input1)[i]` for all `i` that is not in the list of axes from the 2nd input. For dimensions from the 2nd input tensor, `shape[i] == 1` if `keep_dims == true`, or `i`-th dimension is removed from the output otherwise. **Types** @@ -48,7 +48,7 @@ Corner cases: ```xml - + 6 @@ -73,7 +73,7 @@ Corner cases: ```xml - + 6 @@ -96,7 +96,7 @@ Corner cases: ```xml - + 6 @@ -120,7 +120,7 @@ Corner cases: ```xml - + 6 diff --git a/docs/ops/reduction/ReduceLogicalAnd_1.md b/docs/ops/reduction/ReduceLogicalAnd_1.md index 6ff706e1ed23af..054ab224f4c468 100644 --- a/docs/ops/reduction/ReduceLogicalAnd_1.md +++ b/docs/ops/reduction/ReduceLogicalAnd_1.md @@ -10,10 +10,10 @@ * *keep_dims* - * **Description**: If set to `True` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1. - * **Range of values**: True or False + * **Description**: If set to `true` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1. + * **Range of values**: true or false * **Type**: `boolean` - * **Default value**: False + * **Default value**: false * **Required**: *no* **Inputs** @@ -24,7 +24,7 @@ **Outputs** -* **1**: Tensor of the same type as the 1st input tensor and `shape[i] = shapeOf(input1)[i]` for all `i` that is not in the list of axes from the 2nd input. For dimensions from the 2nd input tensor, `shape[i] == 1` if `keep_dims == True`, or `i`-th dimension is removed from the output otherwise. +* **1**: Tensor of the same type as the 1st input tensor and `shape[i] = shapeOf(input1)[i]` for all `i` that is not in the list of axes from the 2nd input. For dimensions from the 2nd input tensor, `shape[i] == 1` if `keep_dims == true`, or `i`-th dimension is removed from the output otherwise. **Types** @@ -47,7 +47,7 @@ Corner cases: ```xml - + 6 @@ -72,7 +72,7 @@ Corner cases: ```xml - + 6 @@ -95,7 +95,7 @@ Corner cases: ```xml - + 6 @@ -119,7 +119,7 @@ Corner cases: ```xml - + 6 diff --git a/docs/ops/reduction/ReduceLogicalOr_1.md b/docs/ops/reduction/ReduceLogicalOr_1.md index e2b30dd024443c..5193c2a1c5f06a 100644 --- a/docs/ops/reduction/ReduceLogicalOr_1.md +++ b/docs/ops/reduction/ReduceLogicalOr_1.md @@ -10,10 +10,10 @@ * *keep_dims* - * **Description**: If set to `True` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1. - * **Range of values**: True or False + * **Description**: If set to `true` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1. + * **Range of values**: true or false * **Type**: `boolean` - * **Default value**: False + * **Default value**: false * **Required**: *no* **Inputs** @@ -24,7 +24,7 @@ **Outputs** -* **1**: Tensor of the same type as the 1st input tensor and `shape[i] = shapeOf(input1)[i]` for all `i` that is not in the list of axes from the 2nd input. For dimensions from the 2nd input tensor, `shape[i] == 1` if `keep_dims == True`, or `i`-th dimension is removed from the output otherwise. +* **1**: Tensor of the same type as the 1st input tensor and `shape[i] = shapeOf(input1)[i]` for all `i` that is not in the list of axes from the 2nd input. For dimensions from the 2nd input tensor, `shape[i] == 1` if `keep_dims == true`, or `i`-th dimension is removed from the output otherwise. **Types** @@ -47,7 +47,7 @@ Corner cases: ```xml - + 6 @@ -72,7 +72,7 @@ Corner cases: ```xml - + 6 @@ -95,7 +95,7 @@ Corner cases: ```xml - + 6 @@ -119,7 +119,7 @@ Corner cases: ```xml - + 6 diff --git a/docs/ops/reduction/ReduceMax_1.md b/docs/ops/reduction/ReduceMax_1.md index e6a512efe8951a..2882d5a8208fd1 100644 --- a/docs/ops/reduction/ReduceMax_1.md +++ b/docs/ops/reduction/ReduceMax_1.md @@ -10,10 +10,10 @@ * *keep_dims* - * **Description**: If set to `True` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1. - * **Range of values**: True or False + * **Description**: If set to `true` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1. + * **Range of values**: true or false * **Type**: `boolean` - * **Default value**: False + * **Default value**: false * **Required**: *no* **Inputs** @@ -24,7 +24,7 @@ **Outputs** -* **1**: Tensor of the same type as the 1st input tensor and `shape[i] = shapeOf(input1)[i]` for all `i` that is not in the list of axes from the 2nd input. For dimensions from the 2nd input tensor, `shape[i] == 1` if `keep_dims == True`, or `i`-th dimension is removed from the output otherwise. +* **1**: Tensor of the same type as the 1st input tensor and `shape[i] = shapeOf(input1)[i]` for all `i` that is not in the list of axes from the 2nd input. For dimensions from the 2nd input tensor, `shape[i] == 1` if `keep_dims == true`, or `i`-th dimension is removed from the output otherwise. ** Types ** @@ -47,7 +47,7 @@ Corner cases: ```xml - + 6 @@ -72,7 +72,7 @@ Corner cases: ```xml - + 6 @@ -95,7 +95,7 @@ Corner cases: ```xml - + 6 @@ -119,7 +119,7 @@ Corner cases: ```xml - + 6 diff --git a/docs/ops/reduction/ReduceMean_1.md b/docs/ops/reduction/ReduceMean_1.md index 91ca61a17ad591..92472346503232 100644 --- a/docs/ops/reduction/ReduceMean_1.md +++ b/docs/ops/reduction/ReduceMean_1.md @@ -10,10 +10,10 @@ * *keep_dims* - * **Description**: If set to `True` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1. - * **Range of values**: True or False + * **Description**: If set to `true` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1. + * **Range of values**: true or false * **Type**: `boolean` - * **Default value**: False + * **Default value**: false * **Required**: *no* **Inputs** @@ -24,7 +24,7 @@ **Outputs** -* **1**: Tensor of the same type as the 1st input tensor and `shape[i] = shapeOf(input1)[i]` for all `i` that is not in the list of axes from the 2nd input. For dimensions from the 2nd input tensor, `shape[i] == 1` if `keep_dims == True`, or `i`-th dimension is removed from the output otherwise. +* **1**: Tensor of the same type as the 1st input tensor and `shape[i] = shapeOf(input1)[i]` for all `i` that is not in the list of axes from the 2nd input. For dimensions from the 2nd input tensor, `shape[i] == 1` if `keep_dims == true`, or `i`-th dimension is removed from the output otherwise. **Types** @@ -47,7 +47,7 @@ Corner cases: ```xml - + 6 @@ -72,7 +72,7 @@ Corner cases: ```xml - + 6 @@ -95,7 +95,7 @@ Corner cases: ```xml - + 6 @@ -119,7 +119,7 @@ Corner cases: ```xml - + 6 diff --git a/docs/ops/reduction/ReduceMin_1.md b/docs/ops/reduction/ReduceMin_1.md index 83eb004bdca4e9..a7cf59f0b51f3a 100644 --- a/docs/ops/reduction/ReduceMin_1.md +++ b/docs/ops/reduction/ReduceMin_1.md @@ -10,10 +10,10 @@ * *keep_dims* - * **Description**: If set to `True` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1. - * **Range of values**: True or False + * **Description**: If set to `true` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1. + * **Range of values**: true or false * **Type**: `boolean` - * **Default value**: False + * **Default value**: false * **Required**: *no* **Inputs** @@ -24,7 +24,7 @@ **Outputs** -* **1**: Tensor of the same type as the 1st input tensor and `shape[i] = shapeOf(input1)[i]` for all `i` that is not in the list of axes from the 2nd input. For dimensions from the 2nd input tensor, `shape[i] == 1` if `keep_dims == True`, or `i`-th dimension is removed from the output otherwise. +* **1**: Tensor of the same type as the 1st input tensor and `shape[i] = shapeOf(input1)[i]` for all `i` that is not in the list of axes from the 2nd input. For dimensions from the 2nd input tensor, `shape[i] == 1` if `keep_dims == true`, or `i`-th dimension is removed from the output otherwise. **Types** @@ -47,7 +47,7 @@ Corner cases: ```xml - + 6 @@ -72,7 +72,7 @@ Corner cases: ```xml - + 6 @@ -95,7 +95,7 @@ Corner cases: ```xml - + 6 @@ -119,7 +119,7 @@ Corner cases: ```xml - + 6 diff --git a/docs/ops/reduction/ReduceProd_1.md b/docs/ops/reduction/ReduceProd_1.md index fce7cdf9187d52..6ad2e6653bc70d 100644 --- a/docs/ops/reduction/ReduceProd_1.md +++ b/docs/ops/reduction/ReduceProd_1.md @@ -10,10 +10,10 @@ * *keep_dims* - * **Description**: If set to `True` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1. - * **Range of values**: True or False + * **Description**: If set to `true` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1. + * **Range of values**: true or false * **Type**: `boolean` - * **Default value**: False + * **Default value**: false * **Required**: *no* **Inputs** @@ -24,7 +24,7 @@ **Outputs** -* **1**: Tensor of the same type as the 1st input tensor and `shape[i] = shapeOf(input1)[i]` for all `i` that is not in the list of axes from the 2nd input. For dimensions from the 2nd input tensor, `shape[i] == 1` if `keep_dims == True`, or `i`-th dimension is removed from the output otherwise. +* **1**: Tensor of the same type as the 1st input tensor and `shape[i] = shapeOf(input1)[i]` for all `i` that is not in the list of axes from the 2nd input. For dimensions from the 2nd input tensor, `shape[i] == 1` if `keep_dims == true`, or `i`-th dimension is removed from the output otherwise. **Types** @@ -47,7 +47,7 @@ Corner cases: ```xml - + 6 @@ -72,7 +72,7 @@ Corner cases: ```xml - + 6 @@ -95,7 +95,7 @@ Corner cases: ```xml - + 6 @@ -119,7 +119,7 @@ Corner cases: ```xml - + 6 diff --git a/docs/ops/reduction/ReduceSum_1.md b/docs/ops/reduction/ReduceSum_1.md index decab8e292a51e..3fcc53fbaa9215 100644 --- a/docs/ops/reduction/ReduceSum_1.md +++ b/docs/ops/reduction/ReduceSum_1.md @@ -10,10 +10,10 @@ * *keep_dims* - * **Description**: If set to `True` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1. - * **Range of values**: True or False + * **Description**: If set to `true` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1. + * **Range of values**: true or false * **Type**: `boolean` - * **Default value**: False + * **Default value**: false * **Required**: *no* **Inputs** @@ -24,7 +24,7 @@ **Outputs** -* **1**: Tensor of the same type as the 1st input tensor and `shape[i] = shapeOf(input1)[i]` for all `i` that is not in the list of axes from the 2nd input. For dimensions from the 2nd input tensor, `shape[i] == 1` if `keep_dims == True`, or `i`-th dimension is removed from the output otherwise. +* **1**: Tensor of the same type as the 1st input tensor and `shape[i] = shapeOf(input1)[i]` for all `i` that is not in the list of axes from the 2nd input. For dimensions from the 2nd input tensor, `shape[i] == 1` if `keep_dims == true`, or `i`-th dimension is removed from the output otherwise. **Types** @@ -47,7 +47,7 @@ Corner cases: ```xml - + 6 @@ -72,7 +72,7 @@ Corner cases: ```xml - + 6 @@ -95,7 +95,7 @@ Corner cases: ```xml - + 6 @@ -119,7 +119,7 @@ Corner cases: ```xml - + 6 diff --git a/docs/ops/sequence/CTCGreedyDecoder_1.md b/docs/ops/sequence/CTCGreedyDecoder_1.md index ca9acfa29d7e3e..59c6bf267eea7b 100644 --- a/docs/ops/sequence/CTCGreedyDecoder_1.md +++ b/docs/ops/sequence/CTCGreedyDecoder_1.md @@ -22,9 +22,9 @@ Sequences in the batch can have different length. The lengths of sequences are c * *merge_repeated* * **Description**: *merge_repeated* is a flag for merging repeated labels during the CTC calculation. - * **Range of values**: True or False + * **Range of values**: true or false * **Type**: `boolean` - * **Default value**: True + * **Default value**: true * **Required**: *no* **Inputs** diff --git a/docs/ops/sequence/CTCLoss_4.md b/docs/ops/sequence/CTCLoss_4.md index 8927c393252996..67def3a2250366 100644 --- a/docs/ops/sequence/CTCLoss_4.md +++ b/docs/ops/sequence/CTCLoss_4.md @@ -27,9 +27,9 @@ p_{i,t,j} = \frac{\exp(logits[i,t,j])}{\sum^{K}_{k=0}{\exp(logits[i,t,k])}} 2. For a given `i`-th target from `labels[i,:]` find all aligned paths. A path `S = (c1,c2,...,cT)` is aligned with a target `G=(g1,g2,...,gT)` if both chains are equal after decoding. -The decoding extracts substring of length `label_length[i]` from a target `G`, merges repeated characters in `G` in case *preprocess_collapse_repeated* equal to True and -finds unique elements in the order of character occurrence in case *unique* equal to True. -The decoding merges repeated characters in `S` in case *ctc_merge_repeated* equal to True and removes blank characters represented by `blank_index`. +The decoding extracts substring of length `label_length[i]` from a target `G`, merges repeated characters in `G` in case *preprocess_collapse_repeated* equal to true and +finds unique elements in the order of character occurrence in case *unique* equal to true. +The decoding merges repeated characters in `S` in case *ctc_merge_repeated* equal to true and removes blank characters represented by `blank_index`. By default, `blank_index` is equal to `C-1`, where `C` is a number of classes including the blank. For example, in case default *ctc_merge_repeated*, *preprocess_collapse_repeated*, *unique* and `blank_index` a target sequence `G=(0,3,2,2,2,2,2,4,3)` of a length `label_length[i]=4` is processed to `(0,3,2,2)` and a path `S=(0,0,4,3,2,2,4,2,4)` of a length `logit_length[i]=9` is also processed to `(0,3,2,2)`, where `C=5`. @@ -57,25 +57,25 @@ Having log-probabilities for aligned paths, log of summed up probabilities for t * *preprocess_collapse_repeated* * **Description**: *preprocess_collapse_repeated* is a flag for a preprocessing step before loss calculation, wherein repeated labels in `labels[i,:]` passed to the loss are merged into single labels. - * **Range of values**: True or False + * **Range of values**: true or false * **Type**: `boolean` - * **Default value**: False + * **Default value**: false * **Required**: *no* * *ctc_merge_repeated* * **Description**: *ctc_merge_repeated* is a flag for merging repeated characters in a potential alignment during the CTC loss calculation. - * **Range of values**: True or False + * **Range of values**: true or false * **Type**: `boolean` - * **Default value**: True + * **Default value**: true * **Required**: *no* * *unique* - * **Description**: *unique* is a flag to find unique elements for a target `labels[i,:]` before matching with potential alignments. Unique elements in the processed `labels[i,:]` are sorted in the order of their occurrence in original `labels[i,:]`. For example, the processed sequence for `labels[i,:]=(0,1,1,0,1,3,3,2,2,3)` of length `label_length[i]=10` will be `(0,1,3,2)` in case *unique* equal to True. - * **Range of values**: True or False + * **Description**: *unique* is a flag to find unique elements for a target `labels[i,:]` before matching with potential alignments. Unique elements in the processed `labels[i,:]` are sorted in the order of their occurrence in original `labels[i,:]`. For example, the processed sequence for `labels[i,:]=(0,1,1,0,1,3,3,2,2,3)` of length `label_length[i]=10` will be `(0,1,3,2)` in case *unique* equal to true. + * **Range of values**: true or false * **Type**: `boolean` - * **Default value**: False + * **Default value**: false * **Required**: *no* **Inputs** diff --git a/docs/ops/sequence/GRUCell_3.md b/docs/ops/sequence/GRUCell_3.md index 19778c8bbd6a74..c154c686238af7 100644 --- a/docs/ops/sequence/GRUCell_3.md +++ b/docs/ops/sequence/GRUCell_3.md @@ -43,9 +43,9 @@ * *linear_before_reset* * **Description**: *linear_before_reset* flag denotes if the layer behaves according to the modification of *GRUCell* described in the formula in the [ONNX documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#GRU). - * **Range of values**: True or False + * **Range of values**: true or false * **Type**: `boolean` - * **Default value**: False + * **Default value**: false * **Required**: *no* **Inputs** diff --git a/docs/ops/sort/NonMaxSuppression_1.md b/docs/ops/sort/NonMaxSuppression_1.md index 5ed2d93730adff..eb9aae89aeb7b1 100644 --- a/docs/ops/sort/NonMaxSuppression_1.md +++ b/docs/ops/sort/NonMaxSuppression_1.md @@ -32,11 +32,11 @@ class must not exceed `max_output_boxes_per_class`. * *sort_result_descending* * **Description**: *sort_result_descending* is a flag that specifies whenever it is necessary to sort selected boxes across batches or not. - * **Range of values**: True of False - * *True* - sort selected boxes across batches. - * *False* - do not sort selected boxes across batches (boxes are sorted per class). + * **Range of values**: true of false + * *true* - sort selected boxes across batches. + * *false* - do not sort selected boxes across batches (boxes are sorted per class). * **Type**: boolean - * **Default value**: True + * **Default value**: true * **Required**: *no* **Inputs**: diff --git a/docs/ops/sort/NonMaxSuppression_3.md b/docs/ops/sort/NonMaxSuppression_3.md index 04a22511593052..a92e30ac68687b 100644 --- a/docs/ops/sort/NonMaxSuppression_3.md +++ b/docs/ops/sort/NonMaxSuppression_3.md @@ -32,11 +32,11 @@ class must not exceed `max_output_boxes_per_class`. * *sort_result_descending* * **Description**: *sort_result_descending* is a flag that specifies whenever it is necessary to sort selected boxes across batches or not. - * **Range of values**: True of False - * *True* - sort selected boxes across batches. - * *False* - do not sort selected boxes across batches (boxes are sorted per class). + * **Range of values**: true of false + * *true* - sort selected boxes across batches. + * *false* - do not sort selected boxes across batches (boxes are sorted per class). * **Type**: boolean - * **Default value**: True + * **Default value**: true * **Required**: *no* * *output_type* diff --git a/docs/ops/sort/NonMaxSuppression_4.md b/docs/ops/sort/NonMaxSuppression_4.md index ec6558a93955e6..e8fb7f842f0f2a 100644 --- a/docs/ops/sort/NonMaxSuppression_4.md +++ b/docs/ops/sort/NonMaxSuppression_4.md @@ -32,11 +32,11 @@ class must not exceed `max_output_boxes_per_class`. * *sort_result_descending* * **Description**: *sort_result_descending* is a flag that specifies whenever it is necessary to sort selected boxes across batches or not. - * **Range of values**: True of False - * *True* - sort selected boxes across batches. - * *False* - do not sort selected boxes across batches (boxes are sorted per class). + * **Range of values**: true of false + * *true* - sort selected boxes across batches. + * *false* - do not sort selected boxes across batches (boxes are sorted per class). * **Type**: boolean - * **Default value**: True + * **Default value**: true * **Required**: *no* * *output_type* diff --git a/docs/ops/sort/NonMaxSuppression_5.md b/docs/ops/sort/NonMaxSuppression_5.md index 6fc70ed7424999..75d6881f2168ed 100644 --- a/docs/ops/sort/NonMaxSuppression_5.md +++ b/docs/ops/sort/NonMaxSuppression_5.md @@ -37,11 +37,11 @@ class must not exceed `max_output_boxes_per_class`. * *sort_result_descending* * **Description**: *sort_result_descending* is a flag that specifies whenever it is necessary to sort selected boxes across batches or not. - * **Range of values**: True of False - * *True* - sort selected boxes across batches. - * *False* - do not sort selected boxes across batches (boxes are sorted per class). + * **Range of values**: true of false + * *true* - sort selected boxes across batches. + * *false* - do not sort selected boxes across batches (boxes are sorted per class). * **Type**: boolean - * **Default value**: True + * **Default value**: true * **Required**: *no* * *output_type* From 57fda7f2a8d8f3c047b08f00c45b218d1bd6be31 Mon Sep 17 00:00:00 2001 From: Maxim Shevtsov Date: Mon, 7 Dec 2020 16:58:26 +0300 Subject: [PATCH 021/244] fixed data race introduced in the https://github.com/openvinotoolkit/openvino/pull/3300 (#3490) it is easy to capture when there are 2 app-level inference requests, but only single worker (MULTI) request main thread | callback thread ___________________________________________________________________________ | | | 1) idleGuard.Release()->try_push(workerRequestPtr) 2) | 3) starts another request with StartAsync | ... 4) | workerInferRequest->_task = std::move(task); | if (_inferPipelineTasks.try_pop(workerRequestPtr->task)) the last line introduces DATA RACE (sporadically manifested in the bad_function_call exception), the fix is in this commit --- .../src/multi_device/multi_device_exec_network.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/inference-engine/src/multi_device/multi_device_exec_network.cpp b/inference-engine/src/multi_device/multi_device_exec_network.cpp index 10b9a280963624..d9c1bf0a9b3ff4 100644 --- a/inference-engine/src/multi_device/multi_device_exec_network.cpp +++ b/inference-engine/src/multi_device/multi_device_exec_network.cpp @@ -95,10 +95,11 @@ MultiDeviceExecutableNetwork::MultiDeviceExecutableNetwork(const DeviceMaptry_push(workerRequestPtr)) { + Task t; // try pop the task, as we know there is at least one idle request - if (_inferPipelineTasks.try_pop(workerRequestPtr->_task)) { + if (_inferPipelineTasks.try_pop(t)) { // if succeeded, let's schedule that - ScheduleToWorkerInferRequest(std::move(workerRequestPtr->_task)); + ScheduleToWorkerInferRequest(std::move(t)); } } }); From 78d09d9691d1c8dfa455bc38a7eaa473f017a4d3 Mon Sep 17 00:00:00 2001 From: Alina Alborova Date: Mon, 7 Dec 2020 17:41:39 +0300 Subject: [PATCH 022/244] Cherry-pick #2922 into master (#3494) * Checrry-pick GNA doc review * Addressed comments * Removed an inexistent link --- docs/IE_DG/supported_plugins/GNA.md | 164 ++++++++++++++-------------- 1 file changed, 82 insertions(+), 82 deletions(-) diff --git a/docs/IE_DG/supported_plugins/GNA.md b/docs/IE_DG/supported_plugins/GNA.md index d40db457abc05d..3a1bada28ba68c 100644 --- a/docs/IE_DG/supported_plugins/GNA.md +++ b/docs/IE_DG/supported_plugins/GNA.md @@ -2,98 +2,98 @@ ## Introducing the GNA Plugin -Intel® Gaussian & Neural Accelerator is a low-power neural coprocessor for continuous inference at the edge. +Intel® Gaussian & Neural Accelerator is a low-power neural coprocessor for continuous inference at the edge. -Intel® GNA is not intended to replace classic inference devices such as -CPU, graphics processing unit (GPU), or vision processing unit (VPU) . It is designed for offloading +Intel® GNA is not intended to replace classic inference devices such as +CPU, graphics processing unit (GPU), or vision processing unit (VPU). It is designed for offloading continuous inference workloads including but not limited to noise reduction or speech recognition to save power and free CPU resources. -The GNA plugin provides a way to run inference on Intel® GNA, as well as in the software execution mode on CPU. +The GNA plugin provides a way to run inference on Intel® GNA, as well as in the software execution mode on CPU. -## Devices with Intel® GNA +## Devices with Intel® GNA -Devices with Intel® GNA support: +Devices with Intel® GNA support: -* [Intel® Speech Enabling Developer Kit](https://www.intel.com/content/www/us/en/support/articles/000026156/boards-and-kits/smart-home.html) +* [Intel® Speech Enabling Developer Kit](https://www.intel.com/content/www/us/en/support/articles/000026156/boards-and-kits/smart-home.html) -* [Amazon Alexa* Premium Far-Field Developer Kit](https://developer.amazon.com/en-US/alexa/alexa-voice-service/dev-kits/amazon-premium-voice) +* [Amazon Alexa\* Premium Far-Field Developer Kit](https://developer.amazon.com/en-US/alexa/alexa-voice-service/dev-kits/amazon-premium-voice) -* [Intel® Pentium® Silver Processors N5xxx, J5xxx and Intel® Celeron® Processors N4xxx, J4xxx](https://ark.intel.com/content/www/us/en/ark/products/codename/83915/gemini-lake.html): - - Intel® Pentium® Silver J5005 Processor - - Intel® Pentium® Silver N5000 Processor - - Intel® Celeron® J4005 Processor - - Intel® Celeron® J4105 Processor - - Intel® Celeron® Processor N4100 - - Intel® Celeron® Processor N4000 +* [Intel® Pentium® Silver Processors N5xxx, J5xxx and Intel® Celeron® Processors N4xxx, J4xxx](https://ark.intel.com/content/www/us/en/ark/products/codename/83915/gemini-lake.html): + - Intel® Pentium® Silver J5005 Processor + - Intel® Pentium® Silver N5000 Processor + - Intel® Celeron® J4005 Processor + - Intel® Celeron® J4105 Processor + - Intel® Celeron® Processor N4100 + - Intel® Celeron® Processor N4000 -* [Intel® Core™ Processors (formerly codenamed Cannon Lake)](https://ark.intel.com/content/www/us/en/ark/products/136863/intel-core-i3-8121u-processor-4m-cache-up-to-3-20-ghz.html): -Intel® Core™ i3-8121U Processor +* [Intel® Core™ Processors (formerly codenamed Cannon Lake)](https://ark.intel.com/content/www/us/en/ark/products/136863/intel-core-i3-8121u-processor-4m-cache-up-to-3-20-ghz.html): +Intel® Core™ i3-8121U Processor -* [10th Generation Intel® Core™ Processors (formerly codenamed Ice Lake)](https://ark.intel.com/content/www/us/en/ark/products/codename/74979/ice-lake.html): - - Intel® Core™ i7-1065G7 Processor - - Intel® Core™ i7-1060G7 Processor - - Intel® Core™ i5-1035G4 Processor - - Intel® Core™ i5-1035G7 Processor - - Intel® Core™ i5-1035G1 Processor - - Intel® Core™ i5-1030G7 Processor - - Intel® Core™ i5-1030G4 Processor - - Intel® Core™ i3-1005G1 Processor - - Intel® Core™ i3-1000G1 Processor - - Intel® Core™ i3-1000G4 Processor +* [10th Generation Intel® Core™ Processors (formerly codenamed Ice Lake)](https://ark.intel.com/content/www/us/en/ark/products/codename/74979/ice-lake.html): + - Intel® Core™ i7-1065G7 Processor + - Intel® Core™ i7-1060G7 Processor + - Intel® Core™ i5-1035G4 Processor + - Intel® Core™ i5-1035G7 Processor + - Intel® Core™ i5-1035G1 Processor + - Intel® Core™ i5-1030G7 Processor + - Intel® Core™ i5-1030G4 Processor + - Intel® Core™ i3-1005G1 Processor + - Intel® Core™ i3-1000G1 Processor + - Intel® Core™ i3-1000G4 Processor -* All [11th Generation Intel® Core™ Processors (formerly codenamed Tiger Lake)](https://ark.intel.com/content/www/us/en/ark/products/codename/88759/tiger-lake.html). +* All [11th Generation Intel® Core™ Processors (formerly codenamed Tiger Lake)](https://ark.intel.com/content/www/us/en/ark/products/codename/88759/tiger-lake.html). -> **NOTE**: On platforms where Intel® GNA is not enabled in the BIOS, the driver cannot be installed, so the GNA plugin uses the software emulation mode only. +> **NOTE**: On platforms where Intel® GNA is not enabled in the BIOS, the driver cannot be installed, so the GNA plugin uses the software emulation mode only. ## Drivers and Dependencies -Intel® GNA hardware requires a driver to be installed on the system. +Intel® GNA hardware requires a driver to be installed on the system. * Linux\* OS: -[Download Intel® GNA driver for Ubuntu Linux 18.04.3 LTS (with HWE Kernel version 5.0+)](https://download.01.org/opencv/drivers/gna/) +[Download Intel® GNA driver for Ubuntu Linux 18.04.3 LTS (with HWE Kernel version 5.0+)](https://download.01.org/opencv/drivers/gna/) * Windows\* OS: -Intel® GNA driver for Windows is available through Windows Update\* +Intel® GNA driver for Windows is available through Windows Update\* ## Models and Layers Limitations -Because of specifics of hardware architecture, Intel® GNA supports a limited set of layers, their kinds and combinations. -For example, you should not expect the GNA Plugin to be able to run computer vision models, except those specifically adapted for the GNA Plugin, because the plugin does not fully support -2D convolutions. +Because of specifics of hardware architecture, Intel® GNA supports a limited set of layers, their kinds and combinations. +For example, you should not expect the GNA Plugin to be able to run computer vision models, except those specifically adapted +for the GNA Plugin, because the plugin does not fully support 2D convolutions. + +For the list of supported layers, see the **GNA** column of the **Supported Layers** section in [Supported Devices](Supported_Devices.md). -The list of supported layers can be found -[here](Supported_Devices.md) (see the GNA column of Supported Layers section). Limitations include: - Only 1D convolutions are natively supported in the models converted from: - - [Kaldi](../../MO_DG/prepare_model/convert_model/Convert_Model_From_Kaldi.md) framework; - - [TensorFlow](../../MO_DG/prepare_model/convert_model/Convert_Model_From_TensorFlow.md) framework; note that for TensorFlow models, the option `--disable_nhwc_to_nchw` must be used when running the Model Optimizer. -- The number of output channels for convolutions must be a multiple of 4 -- Permute layer support is limited to the cases where no data reordering is needed, or when reordering is happening for 2 dimensions, at least one of which is not greater than 8 + - [Kaldi](../../MO_DG/prepare_model/convert_model/Convert_Model_From_Kaldi.md) framework + - [TensorFlow](../../MO_DG/prepare_model/convert_model/Convert_Model_From_TensorFlow.md) framework. For TensorFlow models, use the `--disable_nhwc_to_nchw` option when running the Model Optimizer. +- The number of output channels for convolutions must be a multiple of 4. +- Permute layer support is limited to the cases where no data reordering is needed or when reordering is happening for two dimensions, at least one of which is not greater than 8. #### Experimental Support for 2D Convolutions -The Intel® GNA hardware natively supports only 1D convolution. +The Intel® GNA hardware natively supports only 1D convolution. -However, 2D convolutions can be mapped to 1D when a convolution kernel moves in a single direction. Such a transformation is performed by the GNA Plugin for Kaldi `nnet1` convolution. From this perspective, the Intel® GNA hardware convolution operation accepts a `NHWC` input and produces `NHWC` output. Because OpenVINO™ only supports the `NCHW` layout, it may be necessary to insert `Permute` layers before or after convolutions. +However, 2D convolutions can be mapped to 1D when a convolution kernel moves in a single direction. GNA Plugin performs such a transformation for Kaldi `nnet1` convolution. From this perspective, the Intel® GNA hardware convolution operation accepts an `NHWC` input and produces an `NHWC` output. Because OpenVINO™ only supports the `NCHW` layout, you may need to insert `Permute` layers before or after convolutions. -For example, the Kaldi model optimizer inserts such a permute after convolution for the [rm_cnn4a network](https://download.01.org/openvinotoolkit/models_contrib/speech/kaldi/rm_cnn4a_smbr/). This `Permute` layer is automatically removed by the GNA Plugin, because the Intel® GNA hardware convolution layer already produces the required `NHWC` result. +For example, the Kaldi model optimizer inserts such a permute after convolution for the [rm_cnn4a network](https://download.01.org/openvinotoolkit/models_contrib/speech/kaldi/rm_cnn4a_smbr/). This `Permute` layer is automatically removed by the GNA Plugin, because the Intel® GNA hardware convolution layer already produces the required `NHWC` result. ## Operation Precision -Intel® GNA essentially operates in the low-precision mode, which represents a mix of 8-bit (`I8`), 16-bit (`I16`), and 32-bit (`I32`) integer computations, so compared to 32-bit floating point (`FP32`) results – for example, calculated on CPU using Inference Engine [CPU Plugin](CPU.md) – outputs calculated using reduced integer precision are different from the scores calculated using floating point. +Intel® GNA essentially operates in the low-precision mode, which represents a mix of 8-bit (`I8`), 16-bit (`I16`), and 32-bit (`I32`) integer computations. Outputs calculated using a reduced integer precision are different from the scores calculated using the floating point format, for example, `FP32` outputs calculated on CPU using the Inference Engine [CPU Plugin](CPU.md). -Unlike other plugins supporting low-precision execution, the GNA plugin calculates quantization factors at the model loading time, so a model can run without calibration. +Unlike other plugins supporting low-precision execution, the GNA plugin calculates quantization factors at the model loading time, so you can run a model without calibration. -## Execution Modes +## Execution Modes | Mode | Description | | :---------------------------------| :---------------------------------------------------------| -| `GNA_AUTO` | Uses Intel® GNA if available, otherwise uses software execution mode on CPU. | -| `GNA_HW` | Uses Intel® GNA if available, otherwise raises an error. | -| `GNA_SW` | *Deprecated*. Executes the GNA-compiled graph on CPU performing calculations in the same precision as the Intel® GNA, but not in the bit-exact mode. | -| `GNA_SW_EXACT` | Executes the GNA-compiled graph on CPU performing calculations in the same precision as the Intel® GNA in the bit-exact mode. | +| `GNA_AUTO` | Uses Intel® GNA if available, otherwise uses software execution mode on CPU. | +| `GNA_HW` | Uses Intel® GNA if available, otherwise raises an error. | +| `GNA_SW` | *Deprecated*. Executes the GNA-compiled graph on CPU performing calculations in the same precision as the Intel® GNA, but not in the bit-exact mode. | +| `GNA_SW_EXACT` | Executes the GNA-compiled graph on CPU performing calculations in the same precision as the Intel® GNA in the bit-exact mode. | | `GNA_SW_FP32` | Executes the GNA-compiled graph on CPU but substitutes parameters and calculations from low precision to floating point (`FP32`). | ## Supported Configuration Parameters @@ -101,42 +101,42 @@ Unlike other plugins supporting low-precision execution, the GNA plugin calculat The plugin supports the configuration parameters listed below. The parameters are passed as `std::map` on `InferenceEngine::Core::LoadNetwork` or `InferenceEngine::SetConfig`. -The parameter `KEY_GNA_DEVICE_MODE` can also be changed at run time using `InferenceEngine::ExecutableNetwork::SetConfig` (for any values excluding `GNA_SW_FP32`). This allows switching the +You can change the `KEY_GNA_DEVICE_MODE` parameter at run time using `InferenceEngine::ExecutableNetwork::SetConfig`, which works for any value excluding `GNA_SW_FP32`. This enables you to switch the execution between software emulation mode and hardware emulation mode after the model is loaded. The parameter names below correspond to their usage through API keys, such as `GNAConfigParams::KEY_GNA_DEVICE_MODE` or `PluginConfigParams::KEY_PERF_COUNT`. -When specifying key values as raw strings (that is, when using Python API), omit the `KEY_` prefix. +When specifying key values as raw strings, that is, when using Python API, omit the `KEY_` prefix. | Parameter Name | Parameter Values | Default Value | Description | | :---------------------------------| :---------------------------------------------------------| :-----------| :------------------------------------------------------------------------| -| `KEY_GNA_COMPACT_MODE` | `YES`/`NO` | `NO` | Reuse I/O buffers to save space (makes debugging harder) | -| `KEY_GNA_SCALE_FACTOR` | `FP32` number | 1.0 | Scale factor to use for input quantization | -| `KEY_GNA_DEVICE_MODE` | `GNA_AUTO`/`GNA_HW`/`GNA_SW_EXACT`/`GNA_SW_FP32` | `GNA_AUTO` | One of the modes described Execution Models | -| `KEY_GNA_FIRMWARE_MODEL_IMAGE` | `std::string` | `""` | Name for embedded model binary dump file | -| `KEY_GNA_PRECISION` | `I16`/`I8` | `I16` | Hint to GNA plugin: preferred integer weight resolution for quantization | -| `KEY_PERF_COUNT` | `YES`/`NO` | `NO` | Turn on performance counters reporting | -| `KEY_GNA_LIB_N_THREADS` | 1-127 integer number | 1 | Sets the number of GNA accelerator library worker threads used for inference computation in software modes +| `KEY_GNA_COMPACT_MODE` | `YES`/`NO` | `NO` | Enables I/O buffers reuse to save space. Makes debugging harder. | +| `KEY_GNA_SCALE_FACTOR` | `FP32` number | 1.0 | Sets the scale factor to use for input quantization. | +| `KEY_GNA_DEVICE_MODE` | `GNA_AUTO`/`GNA_HW`/`GNA_SW_EXACT`/`GNA_SW_FP32` | `GNA_AUTO` | One of the modes described in Execution Modes | +| `KEY_GNA_FIRMWARE_MODEL_IMAGE` | `std::string` | `""` | Sets the name for the embedded model binary dump file. | +| `KEY_GNA_PRECISION` | `I16`/`I8` | `I16` | Sets the preferred integer weight resolution for quantization. | +| `KEY_PERF_COUNT` | `YES`/`NO` | `NO` | Turns on performance counters reporting. | +| `KEY_GNA_LIB_N_THREADS` | 1-127 integer number | 1 | Sets the number of GNA accelerator library worker threads used for inference computation in software modes. ## How to Interpret Performance Counters As a result of collecting performance counters using `InferenceEngine::InferRequest::GetPerformanceCounts`, you can find various performance data about execution on GNA. -Returned map stores a counter description as a key, counter value is stored in the `realTime_uSec` field of the `InferenceEngineProfileInfo` structure. Current GNA implementation calculates counters for the whole utterance scoring and does not provide per-layer information. API allows to retrieve counter units in cycles, but they can be converted to seconds as follows: +Returned map stores a counter description as a key, and a counter value in the `realTime_uSec` field of the `InferenceEngineProfileInfo` structure. Current GNA implementation calculates counters for the whole utterance scoring and does not provide per-layer information. The API enables you to retrieve counter units in cycles, you can convert cycles to seconds as follows: ``` seconds = cycles / frequency ``` -Refer to the table below to learn about the frequency of Intel® GNA inside a particular processor. -Processor | Frequency of Intel® GNA +Refer to the table below to learn about the frequency of Intel® GNA inside a particular processor. +Processor | Frequency of Intel® GNA ---|--- -Intel® Ice Lake processors| 400MHz -Intel® Core™ i3-8121U processor| 400MHz -Intel® Gemini Lake processors | 200MHz +Intel® Ice Lake processors| 400MHz +Intel® Core™ i3-8121U processor| 400MHz +Intel® Gemini Lake processors | 200MHz Performance counters provided for the time being: * Scoring request performance results - * Number of total cycles spent on scoring in hardware (including compute and memory stall cycles) + * Number of total cycles spent on scoring in hardware including compute and memory stall cycles * Number of stall cycles spent in hardware ## Multithreading Support in GNA Plugin @@ -151,40 +151,40 @@ The GNA plugin supports the following configuration parameters for multithreadin ## Network Batch Size -Intel® GNA plugin supports the processing of context-windowed speech frames in batches of 1-8 frames in one +Intel® GNA plugin supports the processing of context-windowed speech frames in batches of 1-8 frames in one input blob using `InferenceEngine::ICNNNetwork::setBatchSize`. Increasing batch size only improves efficiency of `Fully Connected` layers. > **NOTE**: For networks with `Convolutional`, `LSTM`, or `Memory` layers, the only supported batch size is 1. ## Compatibility with Heterogeneous Plugin -Heterogeneous plugin was tested with the Intel® GNA as a primary device and CPU as a secondary device. To run inference of networks with layers unsupported by the GNA plugin (for example, Softmax), use the Heterogeneous plugin with the `HETERO:GNA,CPU` configuration. For the list of supported networks, see the [Supported Frameworks](#supported-frameworks). +Heterogeneous plugin was tested with the Intel® GNA as a primary device and CPU as a secondary device. To run inference of networks with layers unsupported by the GNA plugin, such as Softmax, use the Heterogeneous plugin with the `HETERO:GNA,CPU` configuration. -> **NOTE:** Due to limitation of the Intel® GNA backend library, heterogeneous support is limited to cases where in the resulted sliced graph, only one subgraph is scheduled to run on GNA\_HW or GNA\_SW devices. +> **NOTE:** Due to limitation of the Intel® GNA backend library, heterogenous support is limited to cases where in the resulted sliced graph, only one subgraph is scheduled to run on GNA\_HW or GNA\_SW devices. -## Recovery from interruption by high-priority Windows audio processes\* +## Recovery from Interruption by High-Priority Windows Audio Processes\* -As noted in the introduction, GNA is designed for real-time workloads such as noise reduction. +GNA is designed for real-time workloads such as noise reduction. For such workloads, processing should be time constrained, otherwise extra delays may cause undesired effects such as -audio "glitches". To make sure that processing can satisfy real time requirements, the GNA driver provides a QoS -(Quality of Service) mechanism which interrupts requests that might cause high-priority Windows audio processes to miss -schedule, thereby causing long running GNA tasks to terminate early. +*audio glitches*. To make sure that processing can satisfy real-time requirements, the GNA driver provides a Quality of Service +(QoS) mechanism, which interrupts requests that might cause high-priority Windows audio processes to miss +the schedule, thereby causing long running GNA tasks to terminate early. Applications should be prepared for this situation. -If an inference (in `GNA_HW` mode) cannot be executed because of such an interruption, then `InferRequest::Wait()` will return status code -`StatusCode::INFER_NOT_STARTED` (note that it will be changed to a more meaningful status code in future releases). +If an inference in the `GNA_HW` mode cannot be executed because of such an interruption, then `InferRequest::Wait()` returns status code +`StatusCode::INFER_NOT_STARTED`. In future releases, it will be changed to a more meaningful status code. -Any application working with GNA must properly react if it receives this code. Various strategies are possible. -One of the options is to immediately switch to GNA SW emulation mode: +Any application working with GNA must properly react to this code. +One of the strategies to adapt an application: +1. Immediately switch to the GNA_SW emulation mode: ```cpp std::map newConfig; newConfig[GNAConfigParams::KEY_GNA_DEVICE_MODE] = Parameter("GNA_SW_EXACT"); executableNet.SetConfig(newConfig); ``` - -then resubmit and switch back to GNA_HW after some time hoping that the competing application has finished. +2. Resubmit and switch back to GNA_HW expecting that the competing application has finished. ## See Also From ec48fcb29bef94cca480573110a598afc3515019 Mon Sep 17 00:00:00 2001 From: Vladislav Volkov Date: Mon, 7 Dec 2020 17:49:08 +0300 Subject: [PATCH 023/244] CPU plugin selective build (#3360) --- .../src/mkldnn_plugin/CMakeLists.txt | 3 +- .../src/mkldnn_plugin/mkldnn_node.cpp | 30 +-- .../src/mkldnn_plugin/mkldnn_node.h | 54 +++-- .../mkldnn_plugin/mkldnn_selective_build.h | 10 + .../src/mkldnn_plugin/nodes/base.hpp | 11 +- .../nodes/common/cpu_convert.cpp | 144 ++++++------- .../src/mkldnn_plugin/nodes/list.cpp | 3 +- .../src/mkldnn_plugin/nodes/list.hpp | 35 ++-- .../nodes/mkldnn_def_conv_node.h | 1 - .../nodes/mkldnn_eltwise_node.cpp | 195 ++++++++++++------ .../nodes/mkldnn_memory_node.hpp | 2 - .../nodes/mkldnn_normalize_node.cpp | 91 ++++---- .../nodes/mkldnn_normalize_node.h | 3 + .../graph/layers/extensions/mvn_tests.cpp | 11 +- .../layers/extensions/normalize_tests.cpp | 11 +- .../layers/internal/graph_permute_test.cpp | 16 +- .../conditional_compilation/CMakeLists.txt | 5 +- .../include/openvino/cc/factory.h | 10 +- 18 files changed, 356 insertions(+), 279 deletions(-) create mode 100644 inference-engine/src/mkldnn_plugin/mkldnn_selective_build.h diff --git a/inference-engine/src/mkldnn_plugin/CMakeLists.txt b/inference-engine/src/mkldnn_plugin/CMakeLists.txt index d33e3385f684d4..43b10caa7e56e6 100644 --- a/inference-engine/src/mkldnn_plugin/CMakeLists.txt +++ b/inference-engine/src/mkldnn_plugin/CMakeLists.txt @@ -169,7 +169,7 @@ set_ie_threading_interface_for(${TARGET_NAME}) target_compile_definitions(${TARGET_NAME} PUBLIC -DMKLDNN_THR=${MKLDNN_THR}) target_link_libraries(${TARGET_NAME} PRIVATE mkldnn inference_engine inference_engine_legacy - inference_engine_transformations inference_engine_lp_transformations) + inference_engine_transformations inference_engine_lp_transformations openvino::conditional_compilation) # Cross compiled function # TODO: The same for proposal, proposalONNX, topk @@ -198,6 +198,7 @@ target_include_directories(${TARGET_NAME}_obj PRIVATE $ $ $ + $ $) set_ie_threading_interface_for(${TARGET_NAME}_obj) diff --git a/inference-engine/src/mkldnn_plugin/mkldnn_node.cpp b/inference-engine/src/mkldnn_plugin/mkldnn_node.cpp index a316784c17be29..6ee060f3940767 100644 --- a/inference-engine/src/mkldnn_plugin/mkldnn_node.cpp +++ b/inference-engine/src/mkldnn_plugin/mkldnn_node.cpp @@ -152,8 +152,8 @@ Type TypeFromName(const std::string type) { } // namespace MKLDNNPlugin -MKLDNNNode::Factory & MKLDNNNode::factory() { - static Factory factoryInstance; +MKLDNNNode::NodesFactory & MKLDNNNode::factory() { + static NodesFactory factoryInstance; return factoryInstance; } @@ -1121,28 +1121,20 @@ void MKLDNNNode::appendPostOps(mkldnn::post_ops& ops) { THROW_IE_EXCEPTION << "Fusing of " << this->getType() << " operation is not implemented"; } -MKLDNNNode* MKLDNNNode::Factory::create(const InferenceEngine::CNNLayerPtr& layer, const mkldnn::engine& eng, - const MKLDNNExtensionManager::Ptr& extMgr, MKLDNNWeightsSharing::Ptr &w_cache) { +MKLDNNNode* MKLDNNNode::NodesFactory::create(const InferenceEngine::CNNLayerPtr& layer, const mkldnn::engine& eng, + const MKLDNNExtensionManager::Ptr& extMgr, MKLDNNWeightsSharing::Ptr &w_cache) { MKLDNNNode *newNode = nullptr; - auto builder = builders.find(Generic); + std::unique_ptr ol(createNodeIfRegistered(MKLDNNPlugin, Generic, layer, eng, w_cache)); + if (ol != nullptr && ol->created(extMgr)) + newNode = ol.release(); - if (builder != builders.end()) { - std::unique_ptr ol(builder->second(layer, eng, w_cache)); + if (newNode == nullptr) { + std::unique_ptr ol(createNodeIfRegistered(MKLDNNPlugin, TypeFromName(layer->type), layer, eng, w_cache)); if (ol != nullptr && ol->created(extMgr)) newNode = ol.release(); } - if (newNode == nullptr) { - builder = builders.find(TypeFromName(layer->type)); - - if (builder != builders.end()) { - std::unique_ptr ol(builder->second(layer, eng, w_cache)); - if (ol != nullptr && ol->created(extMgr)) - newNode = ol.release(); - } - } - // WA-start : TI node requires all attributes to construct internal subgpath // including extManager, socket and mkldnn::eng. #if defined (COMPILED_CPU_MKLDNN_TENSORITERATOR_NODE) @@ -1157,7 +1149,3 @@ MKLDNNNode* MKLDNNNode::Factory::create(const InferenceEngine::CNNLayerPtr& laye return newNode; } - -void MKLDNNNode::Factory::registerNode(Type type, builder_t builder) { - builders[type] = builder; -} diff --git a/inference-engine/src/mkldnn_plugin/mkldnn_node.h b/inference-engine/src/mkldnn_plugin/mkldnn_node.h index 1319a713a7d2fc..369f109932fdfb 100644 --- a/inference-engine/src/mkldnn_plugin/mkldnn_node.h +++ b/inference-engine/src/mkldnn_plugin/mkldnn_node.h @@ -16,6 +16,7 @@ #include "mkldnn_memory.h" #include "mkldnn_edge.h" #include "mkldnn_descriptor.h" +#include "mkldnn_selective_build.h" #include "mkldnn/iml_type_mapper.h" #include "mkldnn_extension_mngr.h" #include "mkldnn_primitive.h" @@ -257,10 +258,6 @@ class PrimitiveDescInfo { class MKLDNNNode : public InferenceEngine::details::no_copy { public: - class Factory; - template - class Registrar; - template struct Tag {}; @@ -294,7 +291,8 @@ class MKLDNNNode : public InferenceEngine::details::no_copy { openvino::itt::handle_t initOptimalPrimitiveDescriptor; }; - static Factory & factory(); + class NodesFactory; + static NodesFactory & factory(); ~MKLDNNNode() override = default; @@ -628,40 +626,36 @@ class MKLDNNNode : public InferenceEngine::details::no_copy { ConstantType checkConstant(LOOK look, std::vector& checkNodes); }; -class MKLDNNNode::Factory : InferenceEngine::details::no_copy { +class MKLDNNNode::NodesFactory : public openvino::cc::Factory { public: - using builder_t = std::function; + NodesFactory() + : Factory("NodesFactory") {} MKLDNNNode* create(const InferenceEngine::CNNLayerPtr& layer, const mkldnn::engine& eng, const MKLDNNExtensionManager::Ptr& extMgr, MKLDNNWeightsSharing::Ptr &w_cache); - - void registerNode(Type type, builder_t builder); - -private: - using map_t = std::unordered_map::type>>; - map_t builders; }; -template -class MKLDNNNode::Registrar { -public: - explicit Registrar(Type type) { - MKLDNNNode::factory().registerNode(type, - [type](const InferenceEngine::CNNLayerPtr& layer, const mkldnn::engine& eng, - MKLDNNWeightsSharing::Ptr &w_cache) -> MKLDNNNode* { - MKLDNNNode *node = new To(layer, eng, w_cache); - node->perfCounters().buildClassCounters(NameFromType(type)); - return node; - }); +template +struct MKLDNNNodeImpl : public MKLDNNNodeType { + MKLDNNNodeImpl(const InferenceEngine::CNNLayerPtr& layer, const mkldnn::engine& eng, MKLDNNWeightsSharing::Ptr &cache) + : MKLDNNNodeType(layer, eng, cache) { + MKLDNNNodeType::perfCounters().template buildClassCounters(NameFromType(MKLDNNNodeType::getType())); } }; -#define REG_MKLDNN_CONCAT2(X, Y) X ## Y -#define REG_MKLDNN_CONCAT(X, Y) REG_MKLDNN_CONCAT2(X, Y) -#define REG_MKLDNN_PRIM_FOR(__prim, __type) \ -static MKLDNNNode::Registrar<__prim> REG_MKLDNN_CONCAT(_reg_, __LINE__)(__type) +#define REG_MKLDNN_CONCAT3_(X, Y, Z) X ## Y ## Z +#define REG_MKLDNN_CONCAT3(X, Y, Z) REG_MKLDNN_CONCAT3_(X, Y, Z) + +#define REG_MKLDNN_PRIM_FOR(__prim, __type) \ +static struct REG_MKLDNN_CONCAT3(Registrar4, __prim, __LINE__) { \ + REG_MKLDNN_CONCAT3(Registrar4, __prim, __LINE__)() { \ + MKLDNNNode::factory() \ + .registerNodeIfRequired(MKLDNNPlugin, __prim, __type, MKLDNNNodeImpl<__prim>); \ + } \ +} REG_MKLDNN_CONCAT3(_reg_, __prim, __LINE__); template inline T div_up(const T a, const U b) { diff --git a/inference-engine/src/mkldnn_plugin/mkldnn_selective_build.h b/inference-engine/src/mkldnn_plugin/mkldnn_selective_build.h new file mode 100644 index 00000000000000..69d2462a32a48c --- /dev/null +++ b/inference-engine/src/mkldnn_plugin/mkldnn_selective_build.h @@ -0,0 +1,10 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once +#include + +namespace MKLDNNPlugin { + OV_CC_DOMAINS(MKLDNNPlugin) +} diff --git a/inference-engine/src/mkldnn_plugin/nodes/base.hpp b/inference-engine/src/mkldnn_plugin/nodes/base.hpp index b9b650b3eca616..8205c52acc860f 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/base.hpp +++ b/inference-engine/src/mkldnn_plugin/nodes/base.hpp @@ -169,17 +169,10 @@ class ImplFactory : public ILayerImplFactory { InferenceEngine::CNNLayerPtr cnnLayer; }; -template -inline void extRegister(MKLDNNExtensions * extInstance, const char * __type) { - extInstance->AddExt(__type, - [](const CNNLayer* layer) -> InferenceEngine::ILayerImplFactory* { - return new __prim(layer); - }); -} - #define REG_FACTORY_FOR(__prim, __type) \ void __prim ## __type(MKLDNNExtensions * extInstance) { \ - extRegister>(extInstance, #__type); \ + using namespace MKLDNNPlugin; \ + extInstance->layersFactory.registerNodeIfRequired(MKLDNNPlugin, __type, OV_CC_TOSTRING(__type), ImplFactory<__prim>); \ } } // namespace Cpu diff --git a/inference-engine/src/mkldnn_plugin/nodes/common/cpu_convert.cpp b/inference-engine/src/mkldnn_plugin/nodes/common/cpu_convert.cpp index 17a79325f2f649..3ad00c96e7ef16 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/common/cpu_convert.cpp +++ b/inference-engine/src/mkldnn_plugin/nodes/common/cpu_convert.cpp @@ -5,11 +5,15 @@ #include "cpu_convert.h" #include "cpu_memcpy.h" #include "utils/bfloat16.hpp" +#include #include +#include #include using namespace InferenceEngine; +namespace { + template void convert(const void *srcPtr, void *dstPtr, const size_t size) { if (std::is_same::value) { @@ -24,45 +28,41 @@ void convert(const void *srcPtr, void *dstPtr, const size_t size) { } } -template -void convertFrom(const void *srcPtr, void *dstPtr, Precision dstPrc, const size_t size) { - switch (dstPrc) { - case Precision::U8: - convert::value_type>(srcPtr, dstPtr, size); - break; - case Precision::I8: - convert::value_type>(srcPtr, dstPtr, size); - break; - case Precision::U16: - convert::value_type>(srcPtr, dstPtr, size); - break; - case Precision::I16: - convert::value_type>(srcPtr, dstPtr, size); - break; - case Precision::I32: - convert::value_type>(srcPtr, dstPtr, size); - break; - case Precision::U64: - convert::value_type>(srcPtr, dstPtr, size); - break; - case Precision::I64: - convert::value_type>(srcPtr, dstPtr, size); - break; - case Precision::FP32: - convert::value_type>(srcPtr, dstPtr, size); - break; - case Precision::BF16: - convert(srcPtr, dstPtr, size); - break; - case Precision::BOOL: - convert::value_type>(srcPtr, dstPtr, size); - break; - default: - THROW_IE_EXCEPTION << "cpu_convert can't convert to: " << dstPrc << " precision"; +template +struct PrecisionInfo { + using value_type = typename PrecisionTrait

::value_type; +}; + +template <> +struct PrecisionInfo { + using value_type = MKLDNNPlugin::bfloat16_t; +}; + +struct ConvertContext { + const void *srcPtr; + void *dstPtr; + size_t size; + bool converted; +}; + +template +struct ConvertPrecision { + using src_t = typename std::tuple_element<0, T>::type; + using dst_t = typename std::tuple_element<1, T>::type; + + void operator()(ConvertContext & ctx) { + convert(ctx.srcPtr, ctx.dstPtr, ctx.size); + ctx.converted = true; } -} +}; + +} // namespace + +#define MKLDNN_CVT(ST, DT) OV_CASE2(Precision::ST, Precision::DT, PrecisionInfo::value_type, PrecisionInfo::value_type) void cpu_convert(const void *srcPtr, void *dstPtr, Precision srcPrc, Precision dstPrc, const size_t size) { + using namespace MKLDNNPlugin; + if (srcPtr == nullptr || dstPtr == nullptr) THROW_IE_EXCEPTION << "cpu_convert has null data pointer"; @@ -71,38 +71,42 @@ void cpu_convert(const void *srcPtr, void *dstPtr, Precision srcPrc, Precision d return; } - switch (srcPrc) { - case Precision::U8: - convertFrom::value_type>(srcPtr, dstPtr, dstPrc, size); - break; - case Precision::I8: - convertFrom::value_type>(srcPtr, dstPtr, dstPrc, size); - break; - case Precision::U16: - convertFrom::value_type>(srcPtr, dstPtr, dstPrc, size); - break; - case Precision::I16: - convertFrom::value_type>(srcPtr, dstPtr, dstPrc, size); - break; - case Precision::I32: - convertFrom::value_type>(srcPtr, dstPtr, dstPrc, size); - break; - case Precision::U64: - convertFrom::value_type>(srcPtr, dstPtr, dstPrc, size); - break; - case Precision::I64: - convertFrom::value_type>(srcPtr, dstPtr, dstPrc, size); - break; - case Precision::FP32: - convertFrom::value_type>(srcPtr, dstPtr, dstPrc, size); - break; - case Precision::BF16: - convertFrom(srcPtr, dstPtr, dstPrc, size); - break; - case Precision::BOOL: - convertFrom::value_type>(srcPtr, dstPtr, dstPrc, size); - break; - default: - THROW_IE_EXCEPTION << "cpu_convert can't convert from: " << srcPrc << " precision"; - } + ConvertContext ctx = { srcPtr, dstPtr, size, false }; + + OV_SWITCH(MKLDNNPlugin, ConvertPrecision, ctx, std::tie(srcPrc, dstPrc), + MKLDNN_CVT(U8, I8), MKLDNN_CVT(U8, U16), MKLDNN_CVT(U8, I16), + MKLDNN_CVT(U8, I32), MKLDNN_CVT(U8, U64), MKLDNN_CVT(U8, I64), + MKLDNN_CVT(U8, FP32), MKLDNN_CVT(U8, BF16), MKLDNN_CVT(U8, BOOL), + MKLDNN_CVT(I8, U8), MKLDNN_CVT(I8, U16), MKLDNN_CVT(I8, I16), + MKLDNN_CVT(I8, I32), MKLDNN_CVT(I8, U64), MKLDNN_CVT(I8, I64), + MKLDNN_CVT(I8, FP32), MKLDNN_CVT(I8, BF16), MKLDNN_CVT(I8, BOOL), + MKLDNN_CVT(U16, U8), MKLDNN_CVT(U16, I8), MKLDNN_CVT(U16, I16), + MKLDNN_CVT(U16, I32), MKLDNN_CVT(U16, U64), MKLDNN_CVT(U16, I64), + MKLDNN_CVT(U16, FP32), MKLDNN_CVT(U16, BF16), MKLDNN_CVT(U16, BOOL), + MKLDNN_CVT(I16, U8), MKLDNN_CVT(I16, I8), MKLDNN_CVT(I16, U16), + MKLDNN_CVT(I16, I32), MKLDNN_CVT(I16, U64), MKLDNN_CVT(I16, I64), + MKLDNN_CVT(I16, FP32), MKLDNN_CVT(I16, BF16), MKLDNN_CVT(I16, BOOL), + MKLDNN_CVT(I32, U8), MKLDNN_CVT(I32, I8), MKLDNN_CVT(I32, U16), + MKLDNN_CVT(I32, I16), MKLDNN_CVT(I32, U64), MKLDNN_CVT(I32, I64), + MKLDNN_CVT(I32, FP32), MKLDNN_CVT(I32, BF16), MKLDNN_CVT(I32, BOOL), + MKLDNN_CVT(U64, U8), MKLDNN_CVT(U64, I8), MKLDNN_CVT(U64, U16), + MKLDNN_CVT(U64, I16), MKLDNN_CVT(U64, I32), MKLDNN_CVT(U64, I64), + MKLDNN_CVT(U64, FP32), MKLDNN_CVT(U64, BF16), MKLDNN_CVT(U64, BOOL), + MKLDNN_CVT(I64, U8), MKLDNN_CVT(I64, I8), MKLDNN_CVT(I64, U16), + MKLDNN_CVT(I64, I16), MKLDNN_CVT(I64, I32), MKLDNN_CVT(I64, U64), + MKLDNN_CVT(I64, FP32), MKLDNN_CVT(I64, BF16), MKLDNN_CVT(I64, BOOL), + MKLDNN_CVT(FP32, U8), MKLDNN_CVT(FP32, I8), MKLDNN_CVT(FP32, U16), + MKLDNN_CVT(FP32, I16), MKLDNN_CVT(FP32, I32), MKLDNN_CVT(FP32, U64), + MKLDNN_CVT(FP32, I64), MKLDNN_CVT(FP32, BF16), MKLDNN_CVT(FP32, BOOL), + MKLDNN_CVT(BF16, U8), MKLDNN_CVT(BF16, I8), MKLDNN_CVT(BF16, U16), + MKLDNN_CVT(BF16, I16), MKLDNN_CVT(BF16, I32), MKLDNN_CVT(BF16, U64), + MKLDNN_CVT(BF16, I64), MKLDNN_CVT(BF16, FP32), MKLDNN_CVT(BF16, BOOL), + MKLDNN_CVT(BOOL, U8), MKLDNN_CVT(BOOL, I8), MKLDNN_CVT(BOOL, U16), + MKLDNN_CVT(BOOL, I16), MKLDNN_CVT(BOOL, I32), MKLDNN_CVT(BOOL, U64), + MKLDNN_CVT(BOOL, I64), MKLDNN_CVT(BOOL, FP32), MKLDNN_CVT(BOOL, BF16)); + + if (!ctx.converted) + THROW_IE_EXCEPTION << "cpu_convert can't convert from: " << srcPrc << " precision to: " << dstPrc; } + +#undef MKLDNN_CVT diff --git a/inference-engine/src/mkldnn_plugin/nodes/list.cpp b/inference-engine/src/mkldnn_plugin/nodes/list.cpp index e017bae6c38f9c..22155f51f3e505 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/list.cpp +++ b/inference-engine/src/mkldnn_plugin/nodes/list.cpp @@ -18,7 +18,8 @@ namespace Cpu { # include "list_tbl.hpp" #undef MKLDNN_EXTENSION_NODE -MKLDNNExtensions::MKLDNNExtensions() { +MKLDNNExtensions::MKLDNNExtensions() + : layersFactory("LayersFactory") { #define MKLDNN_EXTENSION_NODE(__prim, __type) FACTORY_CALL(__prim, __type) # include "list_tbl.hpp" #undef MKLDNN_EXTENSION_NODE diff --git a/inference-engine/src/mkldnn_plugin/nodes/list.hpp b/inference-engine/src/mkldnn_plugin/nodes/list.hpp index c6ba1d1923204c..7ab386313473c4 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/list.hpp +++ b/inference-engine/src/mkldnn_plugin/nodes/list.hpp @@ -4,6 +4,8 @@ #pragma once +#include + #include #include @@ -53,19 +55,19 @@ class MKLDNNExtensions : public IExtension { virtual StatusCode getPrimitiveTypes(char**& types, unsigned int& size, ResponseDesc* resp) noexcept { - collectTypes(types, size, extensionsHolder->list); + collectTypes(types, size); return OK; } virtual StatusCode getFactoryFor(ILayerImplFactory*& factory, const CNNLayer* cnnLayer, ResponseDesc* resp) noexcept { - auto& factories = extensionsHolder->list; - if (factories.find(cnnLayer->type) == factories.end()) { + using namespace MKLDNNPlugin; + factory = layersFactory.createNodeIfRegistered(MKLDNNPlugin, cnnLayer->type, cnnLayer); + if (!factory) { std::string errorMsg = std::string("Factory for ") + cnnLayer->type + " wasn't found!"; errorMsg.copy(resp->msg, sizeof(resp->msg) - 1); return NOT_FOUND; } - factory = factories[cnnLayer->type](cnnLayer); return OK; } @@ -85,22 +87,21 @@ class MKLDNNExtensions : public IExtension { delete this; } - void AddExt(std::string name, ext_factory factory) { - extensionsHolder->list[name] = factory; - } + using LayersFactory = openvino::cc::Factory< + std::string, + InferenceEngine::ILayerImplFactory*(const InferenceEngine::CNNLayer*)>; -private: - std::shared_ptr extensionsHolder = std::make_shared(); + LayersFactory layersFactory; - template - void collectTypes(char**& types, unsigned int& size, const std::map &factories) { - types = new char *[factories.size()]; +private: + void collectTypes(char**& types, unsigned int& size) const { + types = new char *[layersFactory.size()]; unsigned count = 0; - for (auto it = factories.begin(); it != factories.end(); it++, count ++) { - types[count] = new char[it->first.size() + 1]; - std::copy(it->first.begin(), it->first.end(), types[count]); - types[count][it->first.size() ] = '\0'; - } + layersFactory.foreach([&](std::pair const &builder) { + types[count] = new char[builder.first.size() + 1]; + std::copy(builder.first.begin(), builder.first.end(), types[count]); + types[count][builder.first.size() ] = '\0'; + }); size = count; } }; diff --git a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_def_conv_node.h b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_def_conv_node.h index 7dcab5e81ffef6..fdf2c4cbe4d41a 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_def_conv_node.h +++ b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_def_conv_node.h @@ -29,7 +29,6 @@ class MKLDNNDeformableConvolutionNode : public MKLDNNNode { } private: - static Registrar reg; bool withBiases = false; bool isDW = false; bool isMerged = false; diff --git a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_eltwise_node.cpp b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_eltwise_node.cpp index f8150684a3fc10..0320dfb3cff381 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_eltwise_node.cpp +++ b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_eltwise_node.cpp @@ -21,6 +21,7 @@ #include "jit_mkldnn_emitters.hpp" #include "ref_eltwise.hpp" #include "mkldnn_pooling_node.h" +#include using namespace MKLDNNPlugin; using namespace InferenceEngine; @@ -31,6 +32,32 @@ using namespace Xbyak; #define GET_OFF(field) offsetof(jit_eltwise_call_args, field) +namespace { + +template +struct SupportedPrecisions { + void operator()(std::set &precisions) { + precisions = T::get_supported_precisions(); + } +}; + +struct EltwiseEmitterContext { + std::shared_ptr emitter; + mkldnn::impl::cpu::jit_generator *host; + mkldnn::impl::cpu::cpu_isa_t host_isa; + const MKLDNNNode & node; + InferenceEngine::Precision exec_prc; +}; + +template +struct EltwiseEmitter { + void operator()(EltwiseEmitterContext & ctx) { + ctx.emitter = std::make_shared(ctx.host, ctx.host_isa, ctx.node, ctx.exec_prc); + } +}; + +} // namespace + template struct jit_uni_eltwise_generic : public jit_uni_eltwise_kernel, public jit_generator { DECLARE_CPU_JIT_AUX_FUNCTIONS(jit_uni_eltwise_generic) @@ -310,70 +337,118 @@ struct jit_uni_eltwise_generic : public jit_uni_eltwise_kernel, public jit_gener std::set get_supported_precisions(MKLDNNNode& node) { auto& eltwiseNode = dynamic_cast(node); - switch (eltwiseNode.getOpType()) { - case Relu: case Gelu: case Elu: case Tanh: case Logistic: case Square: case Abs: case Sqrt: - case Linear: case BoundedRelu: case SoftRelu: case Relu6: case Exp: case Clamp: case Swish: case Hswish: - case Mish: case Hsigmoid: case Round: - return jit_mkldnn_emitter::get_supported_precisions(); - case Add: return jit_add_emitter::get_supported_precisions(); - case MulAdd: return jit_mul_add_emitter::get_supported_precisions(); - case Subtract: return jit_subtract_emitter::get_supported_precisions(); - case Multiply: return jit_multiply_emitter::get_supported_precisions(); - case Divide: return jit_divide_emitter::get_supported_precisions(); - case FloorMod: return jit_floor_mod_emitter::get_supported_precisions(); - case Mod: return jit_mod_emitter::get_supported_precisions(); - case Maximum: return jit_maximum_emitter::get_supported_precisions(); - case Minimum: return jit_minimum_emitter::get_supported_precisions(); - case SquaredDifference: return jit_squared_difference_emitter::get_supported_precisions(); - case PowerDynamic: return jit_power_dynamic_emitter::get_supported_precisions(); - case Equal: return jit_equal_emitter::get_supported_precisions(); - case NotEqual: return jit_not_equal_emitter::get_supported_precisions(); - case Greater: return jit_greater_emitter::get_supported_precisions(); - case GreaterEqual: return jit_greater_equal_emitter::get_supported_precisions(); - case Less: return jit_less_emitter::get_supported_precisions(); - case LessEqual: return jit_less_equal_emitter::get_supported_precisions(); - case LogicalAnd: return jit_logical_and_emitter::get_supported_precisions(); - case LogicalOr: return jit_logical_or_emitter::get_supported_precisions(); - case LogicalXor: return jit_logical_xor_emitter::get_supported_precisions(); - case LogicalNot: return jit_logical_not_emitter::get_supported_precisions(); - case PowerStatic: return jit_power_static_emitter::get_supported_precisions(); - case Prelu: return jit_prelu_emitter::get_supported_precisions(); - default: THROW_IE_EXCEPTION << "Unsupported operation type for Eltwise emitter"; - } + + std::set precisions; + + OV_SWITCH(MKLDNNPlugin, SupportedPrecisions, precisions, eltwiseNode.getOpType(), + OV_CASE(Relu, jit_mkldnn_emitter), + OV_CASE(Gelu, jit_mkldnn_emitter), + OV_CASE(Elu, jit_mkldnn_emitter), + OV_CASE(Tanh, jit_mkldnn_emitter), + OV_CASE(Logistic, jit_mkldnn_emitter), + OV_CASE(Square, jit_mkldnn_emitter), + OV_CASE(Abs, jit_mkldnn_emitter), + OV_CASE(Sqrt, jit_mkldnn_emitter), + OV_CASE(Linear, jit_mkldnn_emitter), + OV_CASE(BoundedRelu, jit_mkldnn_emitter), + OV_CASE(SoftRelu, jit_mkldnn_emitter), + OV_CASE(Relu6, jit_mkldnn_emitter), + OV_CASE(Exp, jit_mkldnn_emitter), + OV_CASE(Clamp, jit_mkldnn_emitter), + OV_CASE(Swish, jit_mkldnn_emitter), + OV_CASE(Hswish, jit_mkldnn_emitter), + OV_CASE(Mish, jit_mkldnn_emitter), + OV_CASE(Hsigmoid, jit_mkldnn_emitter), + OV_CASE(Round, jit_mkldnn_emitter), + OV_CASE(Add, jit_add_emitter), + OV_CASE(MulAdd, jit_mul_add_emitter), + OV_CASE(Subtract, jit_subtract_emitter), + OV_CASE(Multiply, jit_multiply_emitter), + OV_CASE(Divide, jit_divide_emitter), + OV_CASE(FloorMod, jit_floor_mod_emitter), + OV_CASE(Mod, jit_mod_emitter), + OV_CASE(Maximum, jit_maximum_emitter), + OV_CASE(Minimum, jit_minimum_emitter), + OV_CASE(SquaredDifference, jit_squared_difference_emitter), + OV_CASE(PowerDynamic, jit_power_dynamic_emitter), + OV_CASE(Equal, jit_equal_emitter), + OV_CASE(NotEqual, jit_not_equal_emitter), + OV_CASE(Greater, jit_greater_emitter), + OV_CASE(GreaterEqual, jit_greater_equal_emitter), + OV_CASE(Less, jit_less_emitter), + OV_CASE(LessEqual, jit_less_equal_emitter), + OV_CASE(LogicalAnd, jit_logical_and_emitter), + OV_CASE(LogicalOr, jit_logical_or_emitter), + OV_CASE(LogicalXor, jit_logical_xor_emitter), + OV_CASE(LogicalNot, jit_logical_not_emitter), + OV_CASE(PowerStatic, jit_power_static_emitter), + OV_CASE(Prelu, jit_prelu_emitter)); + + if (precisions.empty()) + THROW_IE_EXCEPTION << "Unsupported operation type for Eltwise emitter"; + + return precisions; } std::shared_ptr create_eltwise_emitter(MKLDNNNode& node, Precision exec_prec) { auto& eltwiseNode = dynamic_cast(node); - switch (eltwiseNode.getOpType()) { - case Relu: case Gelu: case Elu: case Tanh: case Logistic: case Square: case Abs: case Sqrt: - case Linear: case BoundedRelu: case SoftRelu: case Relu6: case Exp: case Clamp: case Swish: case Hswish: - case Mish: case Hsigmoid: case Round: - return std::make_shared(this, isa, eltwiseNode, exec_prec); - case Add: return std::make_shared(this, isa, eltwiseNode, exec_prec); - case MulAdd: return std::make_shared(this, isa, eltwiseNode, exec_prec); - case Subtract: return std::make_shared(this, isa, eltwiseNode, exec_prec); - case Multiply: return std::make_shared(this, isa, eltwiseNode, exec_prec); - case Divide: return std::make_shared(this, isa, eltwiseNode, exec_prec); - case FloorMod: return std::make_shared(this, isa, eltwiseNode, exec_prec); - case Mod: return std::make_shared(this, isa, eltwiseNode, exec_prec); - case Maximum: return std::make_shared(this, isa, eltwiseNode, exec_prec); - case Minimum: return std::make_shared(this, isa, eltwiseNode, exec_prec); - case SquaredDifference: return std::make_shared(this, isa, eltwiseNode, exec_prec); - case PowerDynamic: return std::make_shared(this, isa, eltwiseNode, exec_prec); - case Equal: return std::make_shared(this, isa, eltwiseNode, exec_prec); - case NotEqual: return std::make_shared(this, isa, eltwiseNode, exec_prec); - case Greater: return std::make_shared(this, isa, eltwiseNode, exec_prec); - case GreaterEqual: return std::make_shared(this, isa, eltwiseNode, exec_prec); - case Less: return std::make_shared(this, isa, eltwiseNode, exec_prec); - case LessEqual: return std::make_shared(this, isa, eltwiseNode, exec_prec); - case LogicalAnd: return std::make_shared(this, isa, eltwiseNode, exec_prec); - case LogicalOr: return std::make_shared(this, isa, eltwiseNode, exec_prec); - case LogicalXor: return std::make_shared(this, isa, eltwiseNode, exec_prec); - case LogicalNot: return std::make_shared(this, isa, eltwiseNode, exec_prec); - case PowerStatic: return std::make_shared(this, isa, eltwiseNode, exec_prec); - case Prelu: return std::make_shared(this, isa, eltwiseNode, exec_prec); - default: THROW_IE_EXCEPTION << "Unsupported operation type for Eltwise emitter"; - } + + EltwiseEmitterContext ctx = { + nullptr, + this, + isa, + eltwiseNode, + exec_prec + }; + + OV_SWITCH(MKLDNNPlugin, EltwiseEmitter, ctx, eltwiseNode.getOpType(), + OV_CASE(Relu, jit_mkldnn_emitter), + OV_CASE(Gelu, jit_mkldnn_emitter), + OV_CASE(Elu, jit_mkldnn_emitter), + OV_CASE(Tanh, jit_mkldnn_emitter), + OV_CASE(Logistic, jit_mkldnn_emitter), + OV_CASE(Square, jit_mkldnn_emitter), + OV_CASE(Abs, jit_mkldnn_emitter), + OV_CASE(Sqrt, jit_mkldnn_emitter), + OV_CASE(Linear, jit_mkldnn_emitter), + OV_CASE(BoundedRelu, jit_mkldnn_emitter), + OV_CASE(SoftRelu, jit_mkldnn_emitter), + OV_CASE(Relu6, jit_mkldnn_emitter), + OV_CASE(Exp, jit_mkldnn_emitter), + OV_CASE(Clamp, jit_mkldnn_emitter), + OV_CASE(Swish, jit_mkldnn_emitter), + OV_CASE(Hswish, jit_mkldnn_emitter), + OV_CASE(Mish, jit_mkldnn_emitter), + OV_CASE(Hsigmoid, jit_mkldnn_emitter), + OV_CASE(Round, jit_mkldnn_emitter), + OV_CASE(Add, jit_add_emitter), + OV_CASE(MulAdd, jit_mul_add_emitter), + OV_CASE(Subtract, jit_subtract_emitter), + OV_CASE(Multiply, jit_multiply_emitter), + OV_CASE(Divide, jit_divide_emitter), + OV_CASE(FloorMod, jit_floor_mod_emitter), + OV_CASE(Mod, jit_mod_emitter), + OV_CASE(Maximum, jit_maximum_emitter), + OV_CASE(Minimum, jit_minimum_emitter), + OV_CASE(SquaredDifference, jit_squared_difference_emitter), + OV_CASE(PowerDynamic, jit_power_dynamic_emitter), + OV_CASE(Equal, jit_equal_emitter), + OV_CASE(NotEqual, jit_not_equal_emitter), + OV_CASE(Greater, jit_greater_emitter), + OV_CASE(GreaterEqual, jit_greater_equal_emitter), + OV_CASE(Less, jit_less_emitter), + OV_CASE(LessEqual, jit_less_equal_emitter), + OV_CASE(LogicalAnd, jit_logical_and_emitter), + OV_CASE(LogicalOr, jit_logical_or_emitter), + OV_CASE(LogicalXor, jit_logical_xor_emitter), + OV_CASE(LogicalNot, jit_logical_not_emitter), + OV_CASE(PowerStatic, jit_power_static_emitter), + OV_CASE(Prelu, jit_prelu_emitter)); + + if (!ctx.emitter) + THROW_IE_EXCEPTION << "Unsupported operation type for Eltwise emitter"; + + return ctx.emitter; } inline void compute_eltwise_op() { diff --git a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_memory_node.hpp b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_memory_node.hpp index b96e14545fcc33..cf4fae798a2be3 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_memory_node.hpp +++ b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_memory_node.hpp @@ -84,7 +84,6 @@ class MKLDNNMemoryOutputNode : public MKLDNNNode, public MKLDNNMemoryNode { * @brief keeps reference to input sibling node */ MKLDNNNode* inputNode = nullptr; - static Registrar reg; MKLDNNMemoryNodeVirtualEdge::Holder* holder = nullptr; }; @@ -106,7 +105,6 @@ class MKLDNNMemoryInputNode : public MKLDNNInputNode, public MKLDNNMemoryNode { MKLDNNMemoryPtr getStore(); private: MKLDNNMemoryPtr dataStore; - static Registrar reg; MKLDNNMemoryNodeVirtualEdge::Holder* holder = nullptr; }; #endif diff --git a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_normalize_node.cpp b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_normalize_node.cpp index 6ce21a3911723c..e56ffd49a4b165 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_normalize_node.cpp +++ b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_normalize_node.cpp @@ -14,6 +14,7 @@ #include "bf16transformer.h" #include "common/cpu_memcpy.h" #include "mkldnn_normalize_node.h" +#include using namespace mkldnn; using namespace MKLDNNPlugin; @@ -922,6 +923,29 @@ void MKLDNNNormalizeNode::createPrimitive() { } } +namespace { + +struct NormalizeContext { + MKLDNNNormalizeNode &node; + const uint8_t *src; + uint8_t *dst; + const InferenceEngine::SizeVector& dims; +}; + +} // namespace + +template +struct MKLDNNNormalizeNode::NormalizeExecute { + using src_t = typename std::tuple_element<0, T>::type; + using dst_t = typename std::tuple_element<1, T>::type; + + void operator()(NormalizeContext & ctx) { + auto src = reinterpret_cast(ctx.src); + auto dst = reinterpret_cast(ctx.dst); + ctx.node.normalize_function(src, dst, ctx.dims); + } +}; + void MKLDNNNormalizeNode::execute(mkldnn::stream strm) { auto &srcMemPtr = getParentEdgeAt(0)->getMemoryPtr(); auto &dstMemPtr = getChildEdgeAt(0)->getMemoryPtr(); @@ -934,55 +958,24 @@ void MKLDNNNormalizeNode::execute(mkldnn::stream strm) { auto dims = getParentEdgeAt(0)->getDesc().getDims(); - if (output_prec == Precision::U8) { - auto dst_data = reinterpret_cast(dst_ptr); - if (input_prec == Precision::U8) { - auto src_data = reinterpret_cast(src_ptr); - normalize_function(src_data, dst_data, dims); - } else if (input_prec == Precision::I8) { - auto src_data = reinterpret_cast(src_ptr); - normalize_function(src_data, dst_data, dims); - } else if (input_prec == Precision::FP32) { - auto src_data = reinterpret_cast(src_ptr); - normalize_function(src_data, dst_data, dims); - } else { - THROW_IE_EXCEPTION << "Unsupported input precision: " << input_prec.name(); - } - } else if (output_prec == Precision::I8) { - auto dst_data = reinterpret_cast(dst_ptr); - if (input_prec == Precision::U8) { - auto src_data = reinterpret_cast(src_ptr); - normalize_function(src_data, dst_data, dims); - } else if (input_prec == Precision::I8) { - auto src_data = reinterpret_cast(src_ptr); - normalize_function(src_data, dst_data, dims); - } else if (input_prec == Precision::FP32) { - auto src_data = reinterpret_cast(src_ptr); - normalize_function(src_data, dst_data, dims); - } else { - THROW_IE_EXCEPTION << "Unsupported input precision: " << input_prec.name(); - } - } else if (output_prec == Precision::FP32) { - auto dst_data = reinterpret_cast(dst_ptr); - if (input_prec == Precision::U8) { - auto src_data = reinterpret_cast(src_ptr); - normalize_function(src_data, dst_data, dims); - } else if (input_prec == Precision::I8) { - auto src_data = reinterpret_cast(src_ptr); - normalize_function(src_data, dst_data, dims); - } else if (input_prec == Precision::FP32) { - auto src_data = reinterpret_cast(src_ptr); - normalize_function(src_data, dst_data, dims); - } else { - THROW_IE_EXCEPTION << "Unsupported input precision: " << input_prec.name(); - } - } else if (output_prec == Precision::BF16) { - auto dst_data = reinterpret_cast(dst_ptr); - auto src_data = reinterpret_cast(src_ptr); - normalize_function(src_data, dst_data, dims); - } else { - THROW_IE_EXCEPTION << "Unsupported output precision: " << output_prec.name(); - } + NormalizeContext ctx = { + *this, + src_ptr, + dst_ptr, + dims + }; + + OV_SWITCH(MKLDNNPlugin, NormalizeExecute, ctx, std::tie(input_prec, output_prec), + OV_CASE2(Precision::U8, Precision::U8, uint8_t, uint8_t), + OV_CASE2(Precision::I8, Precision::U8, int8_t, uint8_t), + OV_CASE2(Precision::FP32, Precision::U8, float, uint8_t), + OV_CASE2(Precision::U8, Precision::I8, uint8_t, int8_t), + OV_CASE2(Precision::I8, Precision::I8, int8_t, int8_t), + OV_CASE2(Precision::FP32, Precision::I8, float, int8_t), + OV_CASE2(Precision::U8, Precision::FP32, uint8_t, float), + OV_CASE2(Precision::I8, Precision::FP32, int8_t, float), + OV_CASE2(Precision::FP32, Precision::FP32, float, float), + OV_CASE2(Precision::BF16, Precision::BF16, bfloat16_t, bfloat16_t)); } template diff --git a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_normalize_node.h b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_normalize_node.h index 4c131faea0510c..0efb8eb018af25 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_normalize_node.h +++ b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_normalize_node.h @@ -80,6 +80,9 @@ class MKLDNNNormalizeNode : public MKLDNNNode { } private: + template + struct NormalizeExecute; + template void normalize_nchw(const in_data_t* src_data, out_data_t* dst_data, const InferenceEngine::SizeVector& dims); diff --git a/inference-engine/tests_deprecated/unit/engines/mkldnn/graph/layers/extensions/mvn_tests.cpp b/inference-engine/tests_deprecated/unit/engines/mkldnn/graph/layers/extensions/mvn_tests.cpp index ee0643916a8920..b6d4ba38efa2da 100644 --- a/inference-engine/tests_deprecated/unit/engines/mkldnn/graph/layers/extensions/mvn_tests.cpp +++ b/inference-engine/tests_deprecated/unit/engines/mkldnn/graph/layers/extensions/mvn_tests.cpp @@ -20,6 +20,12 @@ using namespace single_layer_tests; using namespace Extensions; using namespace ::Cpu; +namespace { + +OV_CC_DOMAINS(MVNTests); + +} // namespace + struct mvn_test_params { vector dims; @@ -528,10 +534,7 @@ class MKLDNNCPUExtMVNTests_Blocked: public TestsCommon, public WithParamInterfac auto manager = std::make_shared(); { auto defaultExt = std::make_shared(); - defaultExt->AddExt("FakeLayer_MVN", - [](const CNNLayer* layer) -> InferenceEngine::ILayerImplFactory* { - return new Cpu::ImplFactory(layer); - }); + defaultExt->layersFactory.registerNodeIfRequired(MVNTests, FakeLayer_MVN, "FakeLayer_MVN", Cpu::ImplFactory); manager->AddExtension(defaultExt); } graph.CreateGraph(network, manager); diff --git a/inference-engine/tests_deprecated/unit/engines/mkldnn/graph/layers/extensions/normalize_tests.cpp b/inference-engine/tests_deprecated/unit/engines/mkldnn/graph/layers/extensions/normalize_tests.cpp index c40a8c5a19ae6e..05406c119349ef 100644 --- a/inference-engine/tests_deprecated/unit/engines/mkldnn/graph/layers/extensions/normalize_tests.cpp +++ b/inference-engine/tests_deprecated/unit/engines/mkldnn/graph/layers/extensions/normalize_tests.cpp @@ -23,6 +23,12 @@ using namespace single_layer_tests; using namespace Extensions; using namespace ::Cpu; +namespace { + +OV_CC_DOMAINS(NormalizeTests); + +} // namespace + struct normalize_test_params { struct { size_t n; @@ -510,10 +516,7 @@ class MKLDNNCPUExtNormalizeTests_Blocked: public TestsCommon, public WithParamIn auto manager = std::make_shared(); { auto defaultExt = std::make_shared(); - defaultExt->AddExt("FakeLayer_Normalize", - [](const CNNLayer* layer) -> InferenceEngine::ILayerImplFactory* { - return new Cpu::ImplFactory(layer); - }); + defaultExt->layersFactory.registerNodeIfRequired(NormalizeTests, FakeLayer_Normalize, "FakeLayer_Normalize", Cpu::ImplFactory); manager->AddExtension(defaultExt); } graph.CreateGraph(network, manager); diff --git a/inference-engine/tests_deprecated/unit/engines/mkldnn/graph/layers/internal/graph_permute_test.cpp b/inference-engine/tests_deprecated/unit/engines/mkldnn/graph/layers/internal/graph_permute_test.cpp index 21d588768ecca5..aaddef2714dbaa 100644 --- a/inference-engine/tests_deprecated/unit/engines/mkldnn/graph/layers/internal/graph_permute_test.cpp +++ b/inference-engine/tests_deprecated/unit/engines/mkldnn/graph/layers/internal/graph_permute_test.cpp @@ -18,6 +18,12 @@ using namespace InferenceEngine; using namespace Extensions; using namespace ::Cpu; +namespace { + +OV_CC_DOMAINS(GraphPermuteTests); + +} // namespace + struct permute_test_params { Layout layout_in, layout_out; Precision precision; @@ -255,10 +261,7 @@ public WithParamInterface { auto manager = std::make_shared(); { auto defaultExt = std::make_shared(); - defaultExt->AddExt("FakeLayer_permute", - [](const CNNLayer* layer) -> InferenceEngine::ILayerImplFactory* { - return new Cpu::ImplFactory(layer); - }); + defaultExt->layersFactory.registerNodeIfRequired(GraphPermuteTests, FakeLayer_permute, "FakeLayer_permute", Cpu::ImplFactory); manager->AddExtension(defaultExt); } graph.CreateGraph(network, manager); @@ -560,10 +563,7 @@ class MKLDNNGraphDynBatchPermuteTests: public permute_f32 { auto manager = std::make_shared(); { auto defaultExt = std::make_shared(); - defaultExt->AddExt("FakeLayer_permute", - [](const CNNLayer* layer) -> InferenceEngine::ILayerImplFactory* { - return new Cpu::ImplFactory(layer); - }); + defaultExt->layersFactory.registerNodeIfRequired(GraphPermuteTests, FakeLayer_permute, "FakeLayer_permute", Cpu::ImplFactory); manager->AddExtension(defaultExt); } MKLDNNGraphTestClass graph; diff --git a/openvino/conditional_compilation/CMakeLists.txt b/openvino/conditional_compilation/CMakeLists.txt index de5e1d9ace89d2..3427d07227cdb0 100644 --- a/openvino/conditional_compilation/CMakeLists.txt +++ b/openvino/conditional_compilation/CMakeLists.txt @@ -32,13 +32,16 @@ elseif(SELECTIVE_BUILD STREQUAL "ON") Usage: -DSELECTIVE_BUILD=ON -DSELECTIVE_BUILD_STAT=/path/*.csv") endif() + file(GLOB STAT_FILES ${SELECTIVE_BUILD_STAT}) + target_compile_definitions(${TARGET_NAME} INTERFACE SELECTIVE_BUILD) set(GENERATED_HEADER ${CMAKE_CURRENT_BINARY_DIR}/conditional_compilation_gen.h) set(GENERATOR ${CMAKE_CURRENT_SOURCE_DIR}/scripts/ccheader.py) add_custom_command(OUTPUT ${GENERATED_HEADER} - COMMAND python3 ${GENERATOR} --stat ${SELECTIVE_BUILD_STAT} --out ${GENERATED_HEADER}) + COMMAND python3 ${GENERATOR} --stat ${SELECTIVE_BUILD_STAT} --out ${GENERATED_HEADER} + DEPENDS ${STAT_FILES}) add_custom_target(conditional_compilation_gen DEPENDS ${GENERATED_HEADER}) add_dependencies(${TARGET_NAME} conditional_compilation_gen) diff --git a/openvino/conditional_compilation/include/openvino/cc/factory.h b/openvino/conditional_compilation/include/openvino/cc/factory.h index 476155491d3ef2..7aa8dd1a389b1f 100644 --- a/openvino/conditional_compilation/include/openvino/cc/factory.h +++ b/openvino/conditional_compilation/include/openvino/cc/factory.h @@ -137,7 +137,15 @@ class Factory { return std::to_string(val); } - using map_t = std::unordered_map; + template + struct EnumClassHash { + std::size_t operator()(K t) const { + return static_cast(t); + } + }; + + using hash_t = typename std::conditional::value, EnumClassHash, std::hash>::type; + using map_t = std::unordered_map; const std::string name; map_t builders; From 305f0056059b091e0290b983dabd93f655e86e8d Mon Sep 17 00:00:00 2001 From: Mateusz Tabaka Date: Tue, 8 Dec 2020 04:35:52 +0100 Subject: [PATCH 024/244] Add reference implementation for PSROIPooling operator (#3245) * Add reference implementation for PSROIPooling operator * fix test_roi_pooling * use std::roundf * remove unnecessary copies in single layer tets * Fixes after review * fixes after review * use element::Type_t instead of element:: * apply code format * add PSROIPooling to evaluates_map * apply code format --- docs/ops/detection/PSROIPooling_1.md | 13 +- .../src/mkldnn_plugin/nodes/psroi.cpp | 8 +- .../single_layer_tests/psroi_pooling.cpp | 43 +++ .../single_layer_tests/psroi_pooling.hpp | 48 +++ .../src/single_layer_tests/psroi_pooling.cpp | 146 ++++++++ .../runtime/reference/psroi_pooling.hpp | 206 +++++++++++ ngraph/core/src/op/psroi_pooling.cpp | 84 ++++- .../tests/test_ngraph/test_create_op.py | 4 +- ngraph/test/CMakeLists.txt | 2 + ngraph/test/attributes.cpp | 6 +- ngraph/test/backend/psroi_pooling.in.cpp | 234 +++++++++++++ .../runtime/interpreter/evaluates_map.cpp | 23 +- .../runtime/interpreter/opset_int_tbl.hpp | 1 + ngraph/test/type_prop/psroi_pooling.cpp | 323 ++++++++++++++++++ ngraph/test/type_prop_layers.cpp | 9 - 15 files changed, 1111 insertions(+), 39 deletions(-) create mode 100644 inference-engine/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/psroi_pooling.cpp create mode 100644 inference-engine/tests/functional/plugin/shared/include/single_layer_tests/psroi_pooling.hpp create mode 100644 inference-engine/tests/functional/plugin/shared/src/single_layer_tests/psroi_pooling.cpp create mode 100644 ngraph/core/reference/include/ngraph/runtime/reference/psroi_pooling.hpp create mode 100644 ngraph/test/backend/psroi_pooling.in.cpp create mode 100644 ngraph/test/type_prop/psroi_pooling.cpp diff --git a/docs/ops/detection/PSROIPooling_1.md b/docs/ops/detection/PSROIPooling_1.md index ae82d0f93dc898..98841ccf4dc633 100644 --- a/docs/ops/detection/PSROIPooling_1.md +++ b/docs/ops/detection/PSROIPooling_1.md @@ -24,7 +24,7 @@ ROIs coordinates are specified in absolute values for the average mode and in no * *group_size* - * **Description**: *group_size* is the number of groups to encode position-sensitive score maps. Use for *average* mode only. + * **Description**: *group_size* is the number of groups to encode position-sensitive score maps. * **Range of values**: a positive integer * **Type**: `int` * **Default value**: 1 @@ -63,14 +63,19 @@ ROIs coordinates are specified in absolute values for the average mode and in no **Inputs**: -* **1**: 4D input blob with feature maps. Required. +* **1**: 4D input tensor with shape `[N, C, H, W]` and type *T* with feature maps. Required. -* **2**: 2D input blob describing box consisting of five element tuples: `[batch_id, x_1, y_1, x_2, y_2]`. Required. +* **2**: 2D input tensor with shape `[num_boxes, 5]`. It contains a list of five element tuples that describe a region of interest: `[batch_id, x_1, y_1, x_2, y_2]`. Required. +Batch indices must be in the range of `[0, N-1]`. **Outputs**: * **1**: 4D output tensor with areas copied and interpolated from the 1st input tensor by coordinates of boxes from the 2nd input. +**Types** + +* *T*: any supported floating point type. + **Example** ```xml @@ -97,4 +102,4 @@ ROIs coordinates are specified in absolute values for the average mode and in no -``` \ No newline at end of file +``` diff --git a/inference-engine/src/mkldnn_plugin/nodes/psroi.cpp b/inference-engine/src/mkldnn_plugin/nodes/psroi.cpp index 7b03df16e83cd2..7e0d7709b254c1 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/psroi.cpp +++ b/inference-engine/src/mkldnn_plugin/nodes/psroi.cpp @@ -102,10 +102,10 @@ class PSROIPoolingImpl: public ExtLayerBase { roi_width = roi_end_w - roi_start_w; roi_height = roi_end_h - roi_start_h; } else if (mode_ == "average") { - roi_start_w = static_cast(round(bottom_rois[1])) * spatial_scale_; - roi_start_h = static_cast(round(bottom_rois[2])) * spatial_scale_; - roi_end_w = static_cast(round(bottom_rois[3]) + 1.0f) * spatial_scale_; - roi_end_h = static_cast(round(bottom_rois[4]) + 1.0f) * spatial_scale_; + roi_start_w = round(bottom_rois[1] * spatial_scale_); + roi_start_h = round(bottom_rois[2] * spatial_scale_); + roi_end_w = round(bottom_rois[3] * spatial_scale_) + 1.0f; + roi_end_h = round(bottom_rois[4] * spatial_scale_) + 1.0f; // Force too small ROIs to be 1x1 roi_width = std::max(roi_end_w - roi_start_w, 0.1f); // avoid 0 roi_height = std::max(roi_end_h - roi_start_h, 0.1f); diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/psroi_pooling.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/psroi_pooling.cpp new file mode 100644 index 00000000000000..c648a990667f79 --- /dev/null +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/psroi_pooling.cpp @@ -0,0 +1,43 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include + +#include "single_layer_tests/psroi_pooling.hpp" +#include "common_test_utils/test_constants.hpp" + +using namespace LayerTestsDefinitions; + +std::vector spatialScales = {1, 0.625}; + +const auto PSROICases_average = ::testing::Combine( + ::testing::Values(std::vector{3, 8, 16, 16}), + ::testing::Values(std::vector{10, 5}), + ::testing::Values(2), + ::testing::Values(2), + ::testing::ValuesIn(spatialScales), + ::testing::Values(1), + ::testing::Values(1), + ::testing::Values("average"), + ::testing::Values(InferenceEngine::Precision::FP32), + ::testing::Values(CommonTestUtils::DEVICE_CPU) +); + +INSTANTIATE_TEST_CASE_P(smoke_TestsPSROIPooling_average, PSROIPoolingLayerTest, PSROICases_average, PSROIPoolingLayerTest::getTestCaseName); + + +const auto PSROICases_bilinear = ::testing::Combine( + ::testing::Values(std::vector{3, 32, 20, 20}), + ::testing::Values(std::vector{10, 5}), + ::testing::Values(4), + ::testing::Values(3), + ::testing::ValuesIn(spatialScales), + ::testing::Values(4), + ::testing::Values(2), + ::testing::Values("bilinear"), + ::testing::Values(InferenceEngine::Precision::FP32), + ::testing::Values(CommonTestUtils::DEVICE_CPU) +); + +INSTANTIATE_TEST_CASE_P(smoke_TestsPSROIPooling_bilinear, PSROIPoolingLayerTest, PSROICases_bilinear, PSROIPoolingLayerTest::getTestCaseName); diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/psroi_pooling.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/psroi_pooling.hpp new file mode 100644 index 00000000000000..8234502d795432 --- /dev/null +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/psroi_pooling.hpp @@ -0,0 +1,48 @@ +// Copyright (C) 2020 Intel Corporation +// +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +#include "functional_test_utils/layer_test_utils.hpp" + +namespace LayerTestsDefinitions { + +using psroiParams = std::tuple, // input shape + std::vector, // coords shape + size_t, // output_dim + size_t, // group_size + float, // Spatial scale + size_t, // spatial_bins_x + size_t, // spatial_bins_y + std::string, // mode + InferenceEngine::Precision, // Net precision + LayerTestsUtils::TargetDevice>; // Device name + +class PSROIPoolingLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { + public: + static std::string getTestCaseName(testing::TestParamInfo obj); + void Infer() override; + + protected: + void SetUp() override; + + private: + size_t groupSize_; + float spatialScale_; + size_t spatialBinsX_; + size_t spatialBinsY_; + std::string mode_; + }; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/psroi_pooling.cpp b/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/psroi_pooling.cpp new file mode 100644 index 00000000000000..d184a8ec456588 --- /dev/null +++ b/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/psroi_pooling.cpp @@ -0,0 +1,146 @@ +// Copyright (C) 2020 Intel Corporation +// +// SPDX-License-Identifier: Apache-2.0 +// + +#include +#include +#include +#include + +#include "common_test_utils/common_utils.hpp" +#include "functional_test_utils/skip_tests_config.hpp" +#include "functional_test_utils/layer_test_utils.hpp" + +#include "single_layer_tests/psroi_pooling.hpp" + +using namespace InferenceEngine; +using namespace FuncTestUtils::PrecisionUtils; + +namespace LayerTestsDefinitions { + + std::string PSROIPoolingLayerTest::getTestCaseName(testing::TestParamInfo obj) { + std::vector inputShape; + std::vector coordsShape; + size_t outputDim; + size_t groupSize; + float spatialScale; + size_t spatialBinsX; + size_t spatialBinsY; + std::string mode; + InferenceEngine::Precision netPrecision; + std::string targetDevice; + std::tie(inputShape, coordsShape, outputDim, groupSize, spatialScale, spatialBinsX, spatialBinsY, mode, netPrecision, targetDevice) = obj.param; + + std::ostringstream result; + + result << "in_shape=" << CommonTestUtils::vec2str(inputShape) << "_"; + result << "coord_shape=" << CommonTestUtils::vec2str(coordsShape) << "_"; + result << "out_dim=" << outputDim << "_"; + result << "group_size=" << groupSize << "_"; + result << "scale=" << spatialScale << "_"; + result << "bins_x=" << spatialBinsX << "_"; + result << "bins_y=" << spatialBinsY << "_"; + result << "mode=" << mode << "_"; + result << "prec=" << netPrecision.name() << "_"; + result << "dev=" << targetDevice; + return result.str(); + } + + static int randInt(int low, int high) { + std::random_device rd; + std::mt19937 gen(rd()); + std::uniform_int_distribution dis(low, high); + return dis(gen); + } + + static void fillROITensor(float* buffer, int numROIs, int batchSize, + int height, int width, int groupSize, + float spatialScale, int spatialBinsX, int spatialBinsY, const std::string& mode) { + int minRoiWidth = groupSize; + int maxRoiWidth = width / groupSize * groupSize; + int minRoiHeight = groupSize; + int maxRoiHeight = height / groupSize * groupSize; + float scaleX = spatialScale; + float scaleY = spatialScale; + if (mode == "bilinear") { + minRoiWidth = spatialBinsX; + maxRoiWidth = width / spatialBinsX * spatialBinsX; + minRoiHeight = spatialBinsY; + maxRoiHeight = height / spatialBinsY * spatialBinsY; + scaleX *= width; + scaleY *= height; + } + int batchId = 0; + for (int i = 0; i < numROIs; i++) { + int sizeX = std::min(width, randInt(minRoiWidth, maxRoiWidth)); + int sizeY = std::min(height, randInt(minRoiHeight, maxRoiHeight)); + int startX = randInt(0, std::max(1, width - sizeX - 1)); + int startY = randInt(0, std::max(1, height - sizeY - 1)); + + float* roi = buffer + i * 5; + roi[0] = batchId; + roi[1] = startX / scaleX; + roi[2] = startY / scaleY; + roi[3] = (startX + sizeX - 1) / scaleX; + roi[4] = (startY + sizeY - 1) / scaleY; + + batchId = (batchId + 1) % batchSize; + } + } + + void PSROIPoolingLayerTest::Infer() { + inferRequest = executableNetwork.CreateInferRequest(); + inputs.clear(); + + auto inputShape = cnnNetwork.getInputShapes().begin()->second; + + size_t it = 0; + for (const auto &input : cnnNetwork.getInputsInfo()) { + const auto &info = input.second; + Blob::Ptr blob; + + if (it == 1) { + blob = make_blob_with_precision(info->getTensorDesc()); + blob->allocate(); + fillROITensor(blob->buffer(), blob->size() / 5, + inputShape[0], inputShape[2], inputShape[3], groupSize_, + spatialScale_, spatialBinsX_, spatialBinsY_, mode_); + } else { + blob = GenerateInput(*info); + } + inferRequest.SetBlob(info->name(), blob); + inputs.push_back(blob); + it++; + } + inferRequest.Infer(); + } + + void PSROIPoolingLayerTest::SetUp() { + std::vector inputShape; + std::vector coordsShape; + size_t outputDim; + InferenceEngine::Precision netPrecision; + std::tie(inputShape, coordsShape, outputDim, groupSize_, spatialScale_, + spatialBinsX_, spatialBinsY_, mode_, netPrecision, targetDevice) = this->GetParam(); + + auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecision); + auto params = ngraph::builder::makeParams(ngPrc, {inputShape, coordsShape}); + auto paramOuts = ngraph::helpers::convert2OutputVector( + ngraph::helpers::castOps2Nodes(params)); + std::shared_ptr psroiPooling = std::make_shared(paramOuts[0], + paramOuts[1], + outputDim, + groupSize_, + spatialScale_, + spatialBinsX_, + spatialBinsY_, + mode_); + ngraph::ResultVector results{std::make_shared(psroiPooling)}; + function = std::make_shared(results, params, "psroi_pooling"); + } + + TEST_P(PSROIPoolingLayerTest, CompareWithRefs) { + Run(); + } +} // namespace LayerTestsDefinitions diff --git a/ngraph/core/reference/include/ngraph/runtime/reference/psroi_pooling.hpp b/ngraph/core/reference/include/ngraph/runtime/reference/psroi_pooling.hpp new file mode 100644 index 00000000000000..0034e486fcdbfc --- /dev/null +++ b/ngraph/core/reference/include/ngraph/runtime/reference/psroi_pooling.hpp @@ -0,0 +1,206 @@ +//***************************************************************************** +// Copyright 2020 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//***************************************************************************** + +#pragma once + +#include +#include + +#include "ngraph/shape.hpp" + +namespace ngraph +{ + namespace runtime + { + namespace reference + { + enum PSROIPoolingMode + { + AVG, + BILINEAR + }; + template + void psroi_pooling(const T* input, + const Shape& input_shape, + const T* rois, + const Shape& rois_shape, + T* output, + const Shape& output_shape, + const std::string& mode_str, + float spatial_scale, + int spatial_bins_x, + int spatial_bins_y) + { + PSROIPoolingMode mode; + if (mode_str == "average") + { + mode = AVG; + } + else if (mode_str == "bilinear") + { + mode = BILINEAR; + } + else + { + NGRAPH_CHECK(false, "Invalid PS ROI pooling mode: " + mode_str); + } + size_t channels_in = input_shape[1]; + size_t height = input_shape[2]; + size_t width = input_shape[3]; + size_t num_rois = output_shape[0]; + size_t channels_out = output_shape[1]; + size_t pooling_height = output_shape[2]; + size_t pooling_width = output_shape[3]; + int num_spatial_bins = spatial_bins_x * spatial_bins_y; + for (size_t roi = 0; roi < num_rois; roi++) + { + const T* box = rois + roi * 5; + int batch_id = box[0]; + float start_w = box[1] * spatial_scale; + float start_h = box[2] * spatial_scale; + float end_w = box[3] * spatial_scale; + float end_h = box[4] * spatial_scale; + if (mode == AVG) + { + start_w = std::roundf(start_w); + start_h = std::roundf(start_h); + end_w = std::roundf(end_w) + 1; + end_h = std::roundf(end_h) + 1; + } + float box_width = end_w - start_w; + float box_height = end_h - start_h; + float bin_width = box_width / pooling_width; + float bin_height = box_height / pooling_height; + float width_scale = 0; + float height_scale = 0; + if (mode == BILINEAR) + { + bin_width = box_width / spatial_bins_x; + bin_height = box_height / spatial_bins_y; + if (pooling_width > 1) + width_scale = bin_width * (width - 1) / (pooling_width - 1); + if (pooling_height > 1) + height_scale = bin_height * (height - 1) / (pooling_height - 1); + } + size_t c_in = 0; + for (size_t c_out = 0; c_out < channels_out; c_out++) + { + for (size_t ph = 0; ph < pooling_height; ph++) + { + for (size_t pw = 0; pw < pooling_width; pw++) + { + size_t index = + ((roi * channels_out + c_out) * pooling_height + ph) * + pooling_width + + pw; + output[index] = 0; + if (mode == AVG) + { + size_t bin_start_w = std::min( + static_cast(start_w + floorf(pw * bin_width)), + width - 1); + size_t bin_start_h = std::min( + static_cast(start_h + floorf(ph * bin_height)), + height - 1); + size_t current_bin_width = + std::min(static_cast(start_w + + ceilf((pw + 1) * bin_width)), + width) - + bin_start_w; + size_t current_bin_height = + std::min(static_cast(start_h + + ceilf((ph + 1) * bin_height)), + height) - + bin_start_h; + T sum = 0; + const T* input_offset = + input + + ((batch_id * channels_in + c_in) * height + bin_start_h) * + width + + bin_start_w; + for (size_t h = 0; h < current_bin_height; h++) + { + for (size_t w = 0; w < current_bin_width; w++) + { + sum += input_offset[h * width + w]; + } + } + output[index] = sum / (current_bin_width * current_bin_height); + c_in++; + } + else if (mode == BILINEAR) + { + c_in = 0; + for (size_t sby = 0; sby < spatial_bins_y; sby++) + { + for (size_t sbx = 0; sbx < spatial_bins_x; sbx++) + { + float bin_start_w = start_w + sbx * bin_width; + float bin_start_h = start_h + sby * bin_height; + + const T* input_offset = input + + (batch_id * channels_in + + c_in * channels_out + c_out) * + height * width; + float point_x = + pooling_width > 1 + ? (pw * width_scale + bin_start_w * (width - 1)) + : (bin_start_w + bin_start_w + bin_width) * + (width - 1) / 2; + float point_y = + pooling_height > 1 + ? (ph * height_scale + + bin_start_h * (height - 1)) + : (bin_start_h + bin_start_h + bin_height) * + (height - 1) / 2; + if (point_x < width && point_y < height) + { + size_t left = floorf(point_x); + size_t right = std::min( + static_cast(ceilf(point_x)), width - 1); + size_t top = floorf(point_y); + size_t bottom = + std::min(static_cast(ceilf(point_y)), + height - 1); + T top_left = input_offset[top * width + left]; + T top_right = input_offset[top * width + right]; + T bottom_left = input_offset[bottom * width + left]; + T bottom_right = + input_offset[bottom * width + right]; + + T top_interp = + top_left + + (top_right - top_left) * (point_x - left); + T bottom_interp = + bottom_left + + (bottom_right - bottom_left) * (point_x - left); + output[index] += + top_interp + + (bottom_interp - top_interp) * (point_y - top); + } + c_in++; + } + } + output[index] /= num_spatial_bins; + } + } + } + } + } + } + } + } +} diff --git a/ngraph/core/src/op/psroi_pooling.cpp b/ngraph/core/src/op/psroi_pooling.cpp index 2ba3035fcfc079..b6217438e81cac 100644 --- a/ngraph/core/src/op/psroi_pooling.cpp +++ b/ngraph/core/src/op/psroi_pooling.cpp @@ -54,29 +54,81 @@ bool ngraph::op::v0::PSROIPooling::visit_attributes(AttributeVisitor& visitor) void op::PSROIPooling::validate_and_infer_types() { - auto input_et = get_input_element_type(0); - if (get_input_partial_shape(0).is_static() && get_input_partial_shape(1).is_static()) + auto feat_maps_et = get_input_element_type(0); + auto coords_et = get_input_element_type(1); + NODE_VALIDATION_CHECK(this, + feat_maps_et.is_real(), + "Feature maps' data type must be floating point. Got " + + feat_maps_et.get_type_name()); + NODE_VALIDATION_CHECK(this, + coords_et.is_real(), + "Coords' data type must be floating point. Got " + + coords_et.get_type_name()); + NODE_VALIDATION_CHECK(this, + m_mode == "average" || m_mode == "bilinear", + "Expected 'average' or 'bilinear' mode. Got " + m_mode); + NODE_VALIDATION_CHECK(this, m_group_size > 0, "group_size has to be greater than 0"); + if (m_mode == "bilinear") + { + NODE_VALIDATION_CHECK( + this, m_spatial_bins_x > 0, "spatial_bins_x has to be greater than 0"); + NODE_VALIDATION_CHECK( + this, m_spatial_bins_y > 0, "spatial_bins_y has to be greater than 0"); + } + + const PartialShape& feat_map_pshape = get_input_partial_shape(0); + const PartialShape& coords_pshape = get_input_partial_shape(1); + if (feat_map_pshape.rank().is_dynamic() || coords_pshape.rank().is_dynamic()) + { + set_output_type(0, feat_maps_et, PartialShape::dynamic()); + } + else { - Shape input_shape = get_input_partial_shape(0).to_shape(); - Shape coords_shape = get_input_partial_shape(1).to_shape(); NODE_VALIDATION_CHECK(this, - input_shape.size() >= 3, - "PSROIPooling expects 3 or higher dimensions for input. Got ", - input_shape.size()); + feat_map_pshape.rank().get_length() == 4, + "PSROIPooling expects 4 dimensions for input. Got ", + feat_map_pshape.rank().get_length()); NODE_VALIDATION_CHECK(this, - coords_shape.size() == 2, + coords_pshape.rank().get_length() == 2, "PSROIPooling expects 2 dimensions for box coordinates. Got ", - coords_shape.size()); - Shape output_shape{coords_shape[0], m_output_dim}; - for (size_t i = 2; i < input_shape.size(); i++) + coords_pshape.rank().get_length()); + + if (feat_map_pshape[1].is_static()) + { + auto num_input_channels = feat_map_pshape[1].get_interval().get_min_val(); + if (m_mode == "average") + { + NODE_VALIDATION_CHECK( + this, + num_input_channels % (m_group_size * m_group_size) == 0, + "Number of input's channels must be a multiply of group_size * group_size"); + NODE_VALIDATION_CHECK(this, + m_output_dim == + num_input_channels / (m_group_size * m_group_size), + "output_dim must be equal to input channels divided by " + "group_size * group_size"); + } + else if (m_mode == "bilinear") + { + NODE_VALIDATION_CHECK(this, + num_input_channels % (m_spatial_bins_x * m_spatial_bins_y) == + 0, + "Number of input's channels must be a multiply of " + "spatial_bins_x * spatial_bins_y"); + NODE_VALIDATION_CHECK( + this, + m_output_dim == num_input_channels / (m_spatial_bins_x * m_spatial_bins_y), + "output_dim must be equal to input channels divided by " + "spatial_bins_x * spatial_bins_y"); + } + } + std::vector output_shape{coords_pshape[0], + static_cast(m_output_dim)}; + for (size_t i = 2; i < feat_map_pshape.rank().get_length(); i++) { output_shape.push_back(m_group_size); } - set_output_type(0, input_et, output_shape); - } - else - { - set_output_type(0, input_et, PartialShape::dynamic()); + set_output_type(0, feat_maps_et, output_shape); } } diff --git a/ngraph/python/tests/test_ngraph/test_create_op.py b/ngraph/python/tests/test_ngraph/test_create_op.py index 7c8d13b1c87077..4a3b6d0eeef051 100644 --- a/ngraph/python/tests/test_ngraph/test_create_op.py +++ b/ngraph/python/tests/test_ngraph/test_create_op.py @@ -700,9 +700,9 @@ def test_roi_pooling(): def test_psroi_pooling(): - inputs = ng.parameter([1, 3, 4, 5], dtype=np.float32) + inputs = ng.parameter([1, 72, 4, 5], dtype=np.float32) coords = ng.parameter([150, 5], dtype=np.float32) - node = ng.psroi_pooling(inputs, coords, 2, 6, 0.0625, 0, 0, "Avg") + node = ng.psroi_pooling(inputs, coords, 2, 6, 0.0625, 0, 0, "average") assert node.get_type_name() == "PSROIPooling" assert node.get_output_size() == 1 diff --git a/ngraph/test/CMakeLists.txt b/ngraph/test/CMakeLists.txt index 70b90a36596d4e..ddbbcd5f2bd940 100644 --- a/ngraph/test/CMakeLists.txt +++ b/ngraph/test/CMakeLists.txt @@ -153,6 +153,7 @@ set(SRC type_prop/parameter.cpp type_prop/prelu.cpp type_prop/proposal.cpp + type_prop/psroi_pooling.cpp type_prop/quantize.cpp type_prop/range.cpp type_prop/read_value.cpp @@ -317,6 +318,7 @@ set(MULTI_TEST_SRC backend/pad.in.cpp backend/parameter_as_output.in.cpp backend/power.in.cpp + backend/psroi_pooling.in.cpp backend/range.in.cpp backend/reduce_max.in.cpp backend/reduce_mean.in.cpp diff --git a/ngraph/test/attributes.cpp b/ngraph/test/attributes.cpp index 88efac34f63ef8..f015be27f03d77 100644 --- a/ngraph/test/attributes.cpp +++ b/ngraph/test/attributes.cpp @@ -652,12 +652,12 @@ TEST(attributes, psroi_pooling_op) auto input = make_shared(element::f32, Shape{1, 1024, 63, 38}); auto coords = make_shared(element::f32, Shape{300, 5}); - const int64_t output_dim = 882; - const int64_t group_size = 3; + const int64_t output_dim = 64; + const int64_t group_size = 4; const float spatial_scale = 0.0625; int spatial_bins_x = 1; int spatial_bins_y = 1; - string mode = "Avg"; + string mode = "average"; auto psroi_pool = make_shared( input, coords, output_dim, group_size, spatial_scale, spatial_bins_x, spatial_bins_y, mode); diff --git a/ngraph/test/backend/psroi_pooling.in.cpp b/ngraph/test/backend/psroi_pooling.in.cpp new file mode 100644 index 00000000000000..725ab8fce7c689 --- /dev/null +++ b/ngraph/test/backend/psroi_pooling.in.cpp @@ -0,0 +1,234 @@ +//***************************************************************************** +// Copyright 2020 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//***************************************************************************** + +#include "gtest/gtest.h" + +#include "ngraph/op/psroi_pooling.hpp" +#include "util/engine/test_engines.hpp" +#include "util/test_case.hpp" +#include "util/test_control.hpp" + +using namespace ngraph; + +static std::string s_manifest = "${MANIFEST}"; +using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); + +NGRAPH_TEST(${BACKEND_NAME}, psroi_pooling_average) +{ + size_t num_channels = 8; + size_t group_size = 2; + size_t output_dim = num_channels / (group_size * group_size); + size_t num_boxes = 3; + Shape image_shape{2, num_channels, 20, 20}; + Shape coords_shape{num_boxes, 5}; + auto image = std::make_shared(element::Type_t::f32, image_shape); + auto coords = std::make_shared(element::Type_t::f32, coords_shape); + auto f = + std::make_shared(std::make_shared( + image, coords, output_dim, group_size, 1, 1, 1, "average"), + ParameterVector{image, coords}); + Shape output_shape{num_boxes, output_dim, group_size, group_size}; + + std::vector image_input(shape_size(image_shape)); + float val = 0; + std::generate( + image_input.begin(), image_input.end(), [val]() mutable -> float { return val += 0.1; }); + std::vector coords_input{ + // batch_id, x1, y1, x2, y2 + 0, + 1, + 2, + 4, + 6, + 1, + 0, + 3, + 10, + 4, + 0, + 10, + 7, + 11, + 13, + }; + std::vector output{ + 6.2499962, 46.44986, 90.249184, 130.44876, 166.25095, 206.45341, 250.25606, 290.45853, + 326.36069, 366.86316, 408.36572, 448.86816, 486.37045, 526.86841, 568.35828, 608.84839, + 18.100033, 58.199684, 104.09898, 144.1996, 178.10167, 218.20412, 264.1069, 304.20935, + + }; + + auto tc = test::TestCase(f); + tc.add_input(image_input); + tc.add_input(coords_input); + tc.add_expected_output(output_shape, output); + tc.run(); +} + +NGRAPH_TEST(${BACKEND_NAME}, psroi_pooling_average_spatial_scale) +{ + size_t num_channels = 8; + size_t group_size = 2; + size_t output_dim = num_channels / (group_size * group_size); + size_t num_boxes = 4; + float spatial_scale = 0.2; + Shape image_shape{2, num_channels, 20, 20}; + Shape coords_shape{num_boxes, 5}; + auto image = std::make_shared(element::Type_t::f32, image_shape); + auto coords = std::make_shared(element::Type_t::f32, coords_shape); + auto f = std::make_shared( + std::make_shared( + image, coords, output_dim, group_size, spatial_scale, 1, 1, "average"), + ParameterVector{image, coords}); + Shape output_shape{num_boxes, output_dim, group_size, group_size}; + + std::vector image_input(shape_size(image_shape)); + float val = 0; + std::generate( + image_input.begin(), image_input.end(), [val]() mutable -> float { return val += 0.1; }); + std::vector coords_input{ + // batch_id, x1, y1, x2, y2 + 0, 5, 10, 20, 30, 0, 0, 15, 50, 20, 1, 50, 35, 55, 65, 1, 0, 60, 5, 70, + }; + std::vector output{ + 6.2499962, 46.44986, 90.249184, 130.44876, 166.25095, 206.45341, 250.25606, 290.45853, + 6.3499966, 46.849857, 88.349236, 128.84866, 166.35095, 206.85341, 248.35596, 288.8584, + 338.11142, 378.21387, 424.11667, 464.21912, 498.12119, 538.21564, 584.10443, 624.19464, + 345.11185, 385.21429, 427.11685, 467.2193, 505.12161, 545.21393, 587.1037, 627.19391, + + }; + + auto tc = test::TestCase(f); + tc.add_input(image_input); + tc.add_input(coords_input); + tc.add_expected_output(output_shape, output); + tc.run(); +} + +NGRAPH_TEST(${BACKEND_NAME}, psroi_pooling_bilinear) +{ + size_t num_channels = 12; + size_t group_size = 3; + size_t spatial_bins_x = 2; + size_t spatial_bins_y = 3; + size_t output_dim = num_channels / (spatial_bins_x * spatial_bins_y); + size_t num_boxes = 5; + Shape image_shape{2, num_channels, 20, 20}; + Shape coords_shape{num_boxes, 5}; + auto image = std::make_shared(element::Type_t::f32, image_shape); + auto coords = std::make_shared(element::Type_t::f32, coords_shape); + auto f = std::make_shared( + std::make_shared( + image, coords, output_dim, group_size, 1, spatial_bins_x, spatial_bins_y, "bilinear"), + ParameterVector{image, coords}); + Shape output_shape{num_boxes, output_dim, group_size, group_size}; + + std::vector image_input(shape_size(image_shape)); + float val = 0; + std::generate( + image_input.begin(), image_input.end(), [val]() mutable -> float { return val += 0.1; }); + std::vector coords_input{ + 0, 0.1, 0.2, 0.7, 0.4, 1, 0.4, 0.1, 0.9, 0.3, 0, 0.5, 0.7, + 0.7, 0.9, 1, 0.15, 0.3, 0.65, 0.35, 0, 0.0, 0.2, 0.7, 0.8, + }; + std::vector output{ + 210.71394, 210.99896, 211.28398, 211.98065, 212.26567, 212.55066, 213.24738, 213.53239, + 213.8174, 250.71545, 251.00047, 251.28548, 251.98218, 252.2672, 252.5522, 253.2489, + 253.53392, 253.81892, 687.40869, 687.64606, 687.88354, 688.67511, 688.91254, 689.14996, + 689.94147, 690.17896, 690.41644, 727.40021, 727.6377, 727.87518, 728.66669, 728.90405, + 729.14154, 729.93292, 730.17041, 730.4079, 230.28471, 230.3797, 230.47472, 231.55144, + 231.64642, 231.74141, 232.81813, 232.91313, 233.00813, 270.28638, 270.38141, 270.47641, + 271.5531, 271.64813, 271.74313, 272.81985, 272.91486, 273.00986, 692.63281, 692.87018, + 693.1076, 692.94928, 693.18683, 693.42426, 693.26593, 693.50342, 693.74078, 732.62402, + 732.86139, 733.09888, 732.94049, 733.17804, 733.41547, 733.25714, 733.49463, 733.73199, + 215.63843, 215.97093, 216.30345, 219.43855, 219.77106, 220.10358, 223.23871, 223.57123, + 223.90375, 255.63994, 255.97246, 256.30496, 259.44009, 259.77261, 260.10513, 263.2403, + 263.57281, 263.9053, + + }; + + auto tc = test::TestCase(f); + tc.add_input(image_input); + tc.add_input(coords_input); + tc.add_expected_output(output_shape, output); + tc.run(); +} + +NGRAPH_TEST(${BACKEND_NAME}, psroi_pooling_bilinear_spatial_scale) +{ + size_t num_channels = 12; + size_t group_size = 4; + size_t spatial_bins_x = 2; + size_t spatial_bins_y = 3; + size_t output_dim = num_channels / (spatial_bins_x * spatial_bins_y); + size_t num_boxes = 6; + float spatial_scale = 0.5; + Shape image_shape{2, num_channels, 20, 20}; + Shape coords_shape{num_boxes, 5}; + auto image = std::make_shared(element::Type_t::f32, image_shape); + auto coords = std::make_shared(element::Type_t::f32, coords_shape); + auto f = std::make_shared(std::make_shared(image, + coords, + output_dim, + group_size, + spatial_scale, + spatial_bins_x, + spatial_bins_y, + "bilinear"), + ParameterVector{image, coords}); + Shape output_shape{num_boxes, output_dim, group_size, group_size}; + + std::vector image_input(shape_size(image_shape)); + float val = 0; + std::generate( + image_input.begin(), image_input.end(), [val]() mutable -> float { return val += 0.1; }); + std::vector coords_input{ + 0, 0.1, 0.2, 0.7, 0.4, 0, 0.5, 0.7, 1.2, 1.3, 0, 1.0, 1.3, 1.2, 1.8, + 1, 0.5, 1.1, 0.7, 1.44, 1, 0.2, 1.1, 0.5, 1.2, 1, 0.34, 1.3, 1.15, 1.35, + }; + std::vector output{ + 205.40955, 205.50456, 205.59955, 205.69453, 205.83179, 205.9268, 206.0218, 206.11681, + 206.25403, 206.34901, 206.44403, 206.53905, 206.67627, 206.77126, 206.86627, 206.96129, + 245.41107, 245.50606, 245.60106, 245.69604, 245.8333, 245.9283, 246.02327, 246.1183, + 246.25554, 246.35052, 246.44556, 246.54054, 246.67778, 246.77277, 246.86775, 246.96278, + 217.84717, 217.95801, 218.06885, 218.17969, 219.11389, 219.22473, 219.33557, 219.44641, + 220.3806, 220.49144, 220.60228, 220.71312, 221.64732, 221.75816, 221.86897, 221.97981, + 257.84872, 257.95956, 258.0704, 258.18124, 259.11545, 259.22629, 259.33713, 259.44797, + 260.38217, 260.49301, 260.60385, 260.71469, 261.6489, 261.75974, 261.87057, 261.98141, + 228.9705, 229.00215, 229.03383, 229.06549, 230.02608, 230.05774, 230.08943, 230.12109, + 231.08168, 231.11334, 231.14502, 231.1767, 232.13728, 232.16895, 232.20062, 232.23228, + 268.97217, 269.00385, 269.03549, 269.06717, 270.02777, 270.05945, 270.09109, 270.12277, + 271.08337, 271.11502, 271.1467, 271.17838, 272.13901, 272.17065, 272.2023, 272.23398, + 703.65057, 703.68219, 703.71387, 703.74554, 704.36816, 704.39984, 704.43146, 704.4632, + 705.08575, 705.11749, 705.14911, 705.18085, 705.80347, 705.83514, 705.86676, 705.89844, + 743.64136, 743.67291, 743.70459, 743.73633, 744.35889, 744.39056, 744.42218, 744.45392, + 745.07648, 745.10815, 745.13983, 745.17157, 745.79413, 745.82574, 745.85742, 745.8891, + 701.86963, 701.91724, 701.9646, 702.01221, 702.08081, 702.12823, 702.17578, 702.22321, + 702.29181, 702.33936, 702.38678, 702.43433, 702.50293, 702.55035, 702.5979, 702.64545, + 741.86041, 741.90796, 741.95538, 742.00293, 742.07153, 742.11896, 742.1665, 742.21405, + 742.28253, 742.33008, 742.3775, 742.42505, 742.49365, 742.54108, 742.58862, 742.63617, + 705.60645, 705.73468, 705.86298, 705.99115, 705.71198, 705.84027, 705.96844, 706.09668, + 705.81757, 705.94574, 706.07397, 706.20215, 705.9231, 706.05127, 706.1795, 706.3078, + 745.59698, 745.72534, 745.85352, 745.98169, 745.70264, 745.83081, 745.95898, 746.08722, + 745.80811, 745.93628, 746.06451, 746.19269, 745.91364, 746.04181, 746.1701, 746.29834, + }; + + auto tc = test::TestCase(f); + tc.add_input(image_input); + tc.add_input(coords_input); + tc.add_expected_output(output_shape, output); + tc.run(); +} diff --git a/ngraph/test/runtime/interpreter/evaluates_map.cpp b/ngraph/test/runtime/interpreter/evaluates_map.cpp index 32505a58e6dc2f..b40942d3f5d494 100644 --- a/ngraph/test/runtime/interpreter/evaluates_map.cpp +++ b/ngraph/test/runtime/interpreter/evaluates_map.cpp @@ -56,6 +56,7 @@ #include "ngraph/runtime/reference/lrn.hpp" #include "ngraph/runtime/reference/mvn.hpp" #include "ngraph/runtime/reference/normalize_l2.hpp" +#include "ngraph/runtime/reference/psroi_pooling.hpp" #include "ngraph/runtime/reference/region_yolo.hpp" #include "ngraph/runtime/reference/roi_pooling.hpp" #include "ngraph/runtime/reference/scatter_nd_update.hpp" @@ -1629,6 +1630,26 @@ namespace return true; } + template + bool evaluate(const shared_ptr& op, + const HostTensorVector& outputs, + const HostTensorVector& inputs) + { + using T = typename element_type_traits::value_type; + runtime::reference::psroi_pooling(inputs[0]->get_data_ptr(), + inputs[0]->get_shape(), + inputs[1]->get_data_ptr(), + inputs[1]->get_shape(), + outputs[0]->get_data_ptr(), + outputs[0]->get_shape(), + op->get_mode(), + op->get_spatial_scale(), + op->get_spatial_bins_x(), + op->get_spatial_bins_y()); + + return true; + } + template bool evaluate_node(std::shared_ptr node, const HostTensorVector& outputs, @@ -1701,4 +1722,4 @@ runtime::interpreter::EvaluatorsMap& runtime::interpreter::get_evaluators_map() #undef NGRAPH_OP }; return evaluatorsMap; -} \ No newline at end of file +} diff --git a/ngraph/test/runtime/interpreter/opset_int_tbl.hpp b/ngraph/test/runtime/interpreter/opset_int_tbl.hpp index 85d25805282e42..d9d00a1747ba12 100644 --- a/ngraph/test/runtime/interpreter/opset_int_tbl.hpp +++ b/ngraph/test/runtime/interpreter/opset_int_tbl.hpp @@ -35,6 +35,7 @@ NGRAPH_OP(LRN, ngraph::op::v0) NGRAPH_OP(MVN, ngraph::op::v0) NGRAPH_OP(NormalizeL2, op::v0) NGRAPH_OP(PriorBox, ngraph::op::v0) +NGRAPH_OP(PSROIPooling, op::v0) NGRAPH_OP(RegionYolo, op::v0) NGRAPH_OP(Relu, op::v0) NGRAPH_OP(ReorgYolo, op::v0) diff --git a/ngraph/test/type_prop/psroi_pooling.cpp b/ngraph/test/type_prop/psroi_pooling.cpp new file mode 100644 index 00000000000000..1c6057af0a6ecd --- /dev/null +++ b/ngraph/test/type_prop/psroi_pooling.cpp @@ -0,0 +1,323 @@ +//***************************************************************************** +// Copyright 2020 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//***************************************************************************** + +#include "gtest/gtest.h" + +#include "ngraph/ngraph.hpp" +#include "ngraph/op/psroi_pooling.hpp" +#include "util/type_prop.hpp" + +using namespace ngraph; + +TEST(type_prop, psroi_pooling_average) +{ + auto inputs = std::make_shared(element::Type_t::f32, Shape{1, 72, 4, 5}); + auto coords = std::make_shared(element::Type_t::f32, Shape{150, 5}); + auto op = std::make_shared(inputs, coords, 2, 6, 0.0625, 0, 0, "average"); + ASSERT_EQ(op->get_shape(), (Shape{150, 2, 6, 6})); + ASSERT_EQ(op->get_element_type(), element::Type_t::f32); +} + +TEST(type_prop, psroi_pooling_bilinear) +{ + auto inputs = std::make_shared(element::Type_t::f32, Shape{1, 72, 4, 5}); + auto coords = std::make_shared(element::Type_t::f32, Shape{150, 5}); + auto op = std::make_shared(inputs, coords, 18, 6, 1, 2, 2, "bilinear"); + ASSERT_EQ(op->get_shape(), (Shape{150, 18, 6, 6})); + ASSERT_EQ(op->get_element_type(), element::Type_t::f32); +} + +TEST(type_prop, psroi_pooling_invalid_type) +{ + try + { + auto inputs = std::make_shared(element::Type_t::i32, Shape{1, 72, 4, 5}); + auto coords = std::make_shared(element::Type_t::f32, Shape{150, 5}); + auto op = std::make_shared(inputs, coords, 2, 6, 0.0625, 0, 0, "average"); + FAIL() << "Exception expected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING(error.what(), + std::string("Feature maps' data type must be floating point")); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } + + try + { + auto inputs = std::make_shared(element::Type_t::f32, Shape{1, 72, 4, 5}); + auto coords = std::make_shared(element::Type_t::i32, Shape{150, 5}); + auto op = std::make_shared(inputs, coords, 2, 6, 0.0625, 0, 0, "average"); + FAIL() << "Exception expected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING(error.what(), std::string("Coords' data type must be floating point")); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } +} + +TEST(type_prop, psroi_pooling_invalid_mode) +{ + try + { + auto inputs = std::make_shared(element::Type_t::f32, Shape{1, 72, 4, 5}); + auto coords = std::make_shared(element::Type_t::f32, Shape{150, 5}); + auto op = + std::make_shared(inputs, coords, 2, 6, 0.0625, 0, 0, "invalid_mode"); + FAIL() << "Exception expected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING(error.what(), std::string("Expected 'average' or 'bilinear' mode")); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } +} + +TEST(type_prop, psroi_pooling_invalid_shapes) +{ + try + { + auto inputs = std::make_shared(element::Type_t::f32, Shape{1, 72, 5}); + auto coords = std::make_shared(element::Type_t::f32, Shape{150, 5}); + auto op = std::make_shared(inputs, coords, 2, 6, 0.0625, 0, 0, "average"); + FAIL() << "Exception expected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING(error.what(), + std::string("PSROIPooling expects 4 dimensions for input")); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } + + try + { + auto inputs = std::make_shared(element::Type_t::f32, Shape{1, 1, 72, 5}); + auto coords = std::make_shared(element::Type_t::f32, Shape{150}); + auto op = std::make_shared(inputs, coords, 2, 6, 0.0625, 0, 0, "average"); + FAIL() << "Exception expected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING(error.what(), + std::string("PSROIPooling expects 2 dimensions for box coordinates")); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } +} + +TEST(type_prop, psroi_pooling_invalid_group_size) +{ + try + { + auto inputs = std::make_shared(element::Type_t::f32, Shape{1, 72, 5, 5}); + auto coords = std::make_shared(element::Type_t::f32, Shape{150, 5}); + auto op = std::make_shared(inputs, coords, 2, 0, 1, 0, 0, "average"); + FAIL() << "Exception expected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING(error.what(), std::string("group_size has to be greater than 0")); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } + + try + { + auto inputs = std::make_shared(element::Type_t::f32, Shape{1, 72, 5, 5}); + auto coords = std::make_shared(element::Type_t::f32, Shape{150, 5}); + auto op = std::make_shared(inputs, coords, 2, 5, 1, 0, 0, "average"); + FAIL() << "Exception expected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING( + error.what(), + std::string( + "Number of input's channels must be a multiply of group_size * group_size")); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } +} + +TEST(type_prop, psroi_pooling_invalid_output_dim) +{ + try + { + auto inputs = std::make_shared(element::Type_t::f32, Shape{1, 72, 5, 5}); + auto coords = std::make_shared(element::Type_t::f32, Shape{150, 5}); + auto op = std::make_shared(inputs, coords, 17, 2, 1, 0, 0, "average"); + FAIL() << "Exception expected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING( + error.what(), + std::string( + "output_dim must be equal to input channels divided by group_size * group_size")); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } +} + +TEST(type_prop, psroi_pooling_invalid_spatial_bins) +{ + try + { + auto inputs = std::make_shared(element::Type_t::f32, Shape{1, 72, 5, 5}); + auto coords = std::make_shared(element::Type_t::f32, Shape{150, 5}); + auto op = std::make_shared(inputs, coords, 17, 2, 1, 0, 0, "bilinear"); + FAIL() << "Exception expected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING(error.what(), std::string("spatial_bins_x has to be greater than 0")); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } + + try + { + auto inputs = std::make_shared(element::Type_t::f32, Shape{1, 72, 5, 5}); + auto coords = std::make_shared(element::Type_t::f32, Shape{150, 5}); + auto op = std::make_shared(inputs, coords, 17, 2, 1, 1, 0, "bilinear"); + FAIL() << "Exception expected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING(error.what(), std::string("spatial_bins_y has to be greater than 0")); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } + + try + { + auto inputs = std::make_shared(element::Type_t::f32, Shape{1, 72, 5, 5}); + auto coords = std::make_shared(element::Type_t::f32, Shape{150, 5}); + auto op = std::make_shared(inputs, coords, 17, 2, 1, 2, 5, "bilinear"); + FAIL() << "Exception expected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING(error.what(), + std::string("Number of input's channels must be a multiply of " + "spatial_bins_x * spatial_bins_y")); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } + + try + { + auto inputs = std::make_shared(element::Type_t::f32, Shape{1, 72, 5, 5}); + auto coords = std::make_shared(element::Type_t::f32, Shape{150, 5}); + auto op = std::make_shared(inputs, coords, 10, 2, 1, 2, 4, "bilinear"); + FAIL() << "Exception expected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING(error.what(), + std::string("output_dim must be equal to input channels divided by " + "spatial_bins_x * spatial_bins_y")); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } +} + +TEST(type_prop, psroi_pooling_dynamic_ranks) +{ + { + auto inputs = + std::make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto coords = std::make_shared(element::Type_t::f32, Shape{150, 5}); + auto op = std::make_shared(inputs, coords, 2, 6, 0.0625, 0, 0, "average"); + ASSERT_EQ(op->get_output_partial_shape(0), PartialShape::dynamic()); + ASSERT_EQ(op->get_element_type(), element::Type_t::f32); + } + { + auto inputs = std::make_shared(element::Type_t::f32, Shape{1, 72, 4, 5}); + auto coords = + std::make_shared(element::Type_t::f32, PartialShape::dynamic()); + auto op = std::make_shared(inputs, coords, 2, 6, 0.0625, 0, 0, "average"); + ASSERT_EQ(op->get_output_partial_shape(0), PartialShape::dynamic()); + ASSERT_EQ(op->get_element_type(), element::Type_t::f32); + } +} + +TEST(type_prop, psroi_pooling_dynamic_num_boxes) +{ + auto inputs = std::make_shared(element::Type_t::f32, Shape{1, 72, 4, 5}); + auto coords = std::make_shared(element::Type_t::f32, + PartialShape{{Dimension::dynamic(), 5}}); + auto op = std::make_shared(inputs, coords, 2, 6, 0.0625, 0, 0, "average"); + ASSERT_EQ(op->get_output_partial_shape(0), (PartialShape{{Dimension::dynamic(), 2, 6, 6}})); + ASSERT_EQ(op->get_element_type(), element::Type_t::f32); +} + +TEST(type_prop, psroi_pooling_static_rank_dynamic_shape) +{ + { + auto inputs = std::make_shared(element::Type_t::f32, + PartialShape{{Dimension::dynamic(), + Dimension::dynamic(), + Dimension::dynamic(), + Dimension::dynamic()}}); + auto coords = std::make_shared( + element::Type_t::f32, PartialShape{{Dimension::dynamic(), Dimension::dynamic()}}); + auto op = std::make_shared(inputs, coords, 2, 6, 0.0625, 0, 0, "average"); + ASSERT_EQ(op->get_output_partial_shape(0), (PartialShape{{Dimension::dynamic(), 2, 6, 6}})); + ASSERT_EQ(op->get_element_type(), element::Type_t::f32); + } + { + auto inputs = std::make_shared(element::Type_t::f32, + PartialShape{{Dimension::dynamic(), + Dimension::dynamic(), + Dimension::dynamic(), + Dimension::dynamic()}}); + auto coords = std::make_shared(element::Type_t::f32, + PartialShape{{200, Dimension::dynamic()}}); + auto op = std::make_shared(inputs, coords, 2, 6, 0.0625, 0, 0, "average"); + ASSERT_EQ(op->get_shape(), (Shape{200, 2, 6, 6})); + ASSERT_EQ(op->get_element_type(), element::Type_t::f32); + } +} diff --git a/ngraph/test/type_prop_layers.cpp b/ngraph/test/type_prop_layers.cpp index 1d4c012089d346..10050741c43a73 100644 --- a/ngraph/test/type_prop_layers.cpp +++ b/ngraph/test/type_prop_layers.cpp @@ -22,7 +22,6 @@ #include "ngraph/op/interpolate.hpp" #include "ngraph/op/prior_box.hpp" #include "ngraph/op/prior_box_clustered.hpp" -#include "ngraph/op/psroi_pooling.hpp" #include "ngraph/op/region_yolo.hpp" #include "ngraph/op/reorg_yolo.hpp" #include "ngraph/op/roi_pooling.hpp" @@ -157,14 +156,6 @@ TEST(type_prop_layers, reorg_yolo) ASSERT_EQ(op->get_shape(), (Shape{2, 96, 17, 31})); } -TEST(type_prop_layers, psroi_pooling) -{ - auto inputs = make_shared(element::f32, Shape{1, 3, 4, 5}); - auto coords = make_shared(element::f32, Shape{150, 5}); - auto op = make_shared(inputs, coords, 2, 6, 0.0625, 0, 0, "Avg"); - ASSERT_EQ(op->get_shape(), (Shape{150, 2, 6, 6})); -} - TEST(type_prop_layers, roi_pooling) { auto inputs = make_shared(element::f32, Shape{2, 3, 4, 5}); From 86347bd9094d13c92f1dcdecf00be4e11858ea2c Mon Sep 17 00:00:00 2001 From: Bartosz Lesniewski Date: Tue, 8 Dec 2020 04:42:47 +0100 Subject: [PATCH 025/244] Remove ops from Layer Creator/ Node Converter - part 3 (#3356) * remove convert op from layer creator * remove depthtospace op from layer creator * remove mvn op from layer creator * remove normalizel2 op from layer creator * remove notequal op from layer creator * remove subtract op from layer creator * correct mvn op behavior when copied with new input * fix trying to get precision from empty output of normalize layer * fix normalize layer not setting output type * remove trailing whitespace * add fp64 to possible convert op precision types * use a function to translate bool string representation * merge emergency opset changes for mvn and roipooling ops --- .../legacy/ngraph_ops/normalize_ie.hpp | 4 +- .../src/convert_function_to_cnn_network.cpp | 100 +++++++++++++++++- .../src/ie_cnn_layer_builder_ngraph.cpp | 81 -------------- .../src/ngraph_ops/normalize_ie.cpp | 7 ++ .../src/readers/ir_reader/ie_ir_parser.cpp | 90 ++-------------- ngraph/core/include/ngraph/op/not_equal.hpp | 1 + ngraph/core/src/op/mvn.cpp | 2 + ngraph/core/src/op/normalize_l2.cpp | 1 + ngraph/core/src/op/not_equal.cpp | 5 + 9 files changed, 121 insertions(+), 170 deletions(-) diff --git a/inference-engine/src/legacy_api/include/legacy/ngraph_ops/normalize_ie.hpp b/inference-engine/src/legacy_api/include/legacy/ngraph_ops/normalize_ie.hpp index df800ce564bd60..5bb17795117594 100644 --- a/inference-engine/src/legacy_api/include/legacy/ngraph_ops/normalize_ie.hpp +++ b/inference-engine/src/legacy_api/include/legacy/ngraph_ops/normalize_ie.hpp @@ -33,8 +33,8 @@ class INFERENCE_ENGINE_API_CLASS(NormalizeIE) : public Op { bool get_across_spatial() const { return m_across_spatial;} void validate_and_infer_types() override; - - std::shared_ptr clone_with_new_inputs(const OutputVector& new_args) const override; + bool visit_attributes(AttributeVisitor &visitor) override; + std::shared_ptr clone_with_new_inputs(const OutputVector &new_args) const override; protected: float m_eps; diff --git a/inference-engine/src/legacy_api/src/convert_function_to_cnn_network.cpp b/inference-engine/src/legacy_api/src/convert_function_to_cnn_network.cpp index c728b732c4b15d..40f8b03bf6e049 100644 --- a/inference-engine/src/legacy_api/src/convert_function_to_cnn_network.cpp +++ b/inference-engine/src/legacy_api/src/convert_function_to_cnn_network.cpp @@ -1029,6 +1029,93 @@ InferenceEngine::details::CNNLayerCreator::CNNLayerCreator(const std::shared_ptr return res; }); + addSpecificCreator({"Convert"}, [](const std::shared_ptr<::ngraph::Node>& node, + const std::map& params) -> CNNLayerPtr { + LayerParams attrs = {node->get_friendly_name(), "Convert", + details::convertPrecision(node->get_output_element_type(0))}; + auto res = std::make_shared(attrs); + + auto p = details::convertPrecision(node->get_output_element_type(0)); + std::string precision_str; + switch (p) { + case Precision::FP16: + precision_str = "FP16"; + break; + case Precision::BF16: + precision_str = "BF16"; + break; + case Precision::FP32: + precision_str = "FP32"; + break; + case Precision::FP64: + precision_str = "FP64"; + break; + case Precision::I8: + precision_str = "I8"; + break; + case Precision::I16: + precision_str = "I16"; + break; + case Precision::I32: + precision_str = "I32"; + break; + case Precision::I64: + precision_str = "I64"; + break; + case Precision::U8: + precision_str = "U8"; + break; + case Precision::U16: + precision_str = "U16"; + break; + case Precision::U32: + precision_str = "U32"; + break; + case Precision::U64: + precision_str = "U64"; + break; + case Precision::BOOL: + precision_str = "BOOL"; + break; + default: + THROW_IE_EXCEPTION << "Unsupported type"; + } + + res->params["precision"] = precision_str; + return res; + }); + + addSpecificCreator({"MVN"}, [](const std::shared_ptr<::ngraph::Node>& node, + const std::map ¶ms) -> CNNLayerPtr { + LayerParams attrs = {node->get_friendly_name(), "MVN", + details::convertPrecision(node->get_output_element_type(0))}; + auto res = std::make_shared(attrs); + + res->params["normalize_variance"] = params.at("normalize_variance"); + res->params["normalize_variance"] = res->getBoolStrParamAsIntStr("normalize_variance"); + res->params["eps"] = params.at("eps"); + res->params["across_channels"] = params.at("across_channels"); + res->params["across_channels"] = res->getBoolStrParamAsIntStr("across_channels"); + return res; + }); + + addSpecificCreator({"NormalizeIE"}, [](const std::shared_ptr<::ngraph::Node> &node, + const std::map ¶ms) -> CNNLayerPtr { + LayerParams attrs = {node->get_friendly_name(), "Normalize", + details::convertPrecision(node->get_output_element_type(0))}; + auto res = std::make_shared(attrs); + + res->params = params; + res->params["channel_shared"] = res->getBoolStrParamAsIntStr("channel_shared"); + res->params["across_spatial"] = res->getBoolStrParamAsIntStr("across_spatial"); + + const auto weightsNode = node->input_value(1).get_node_shared_ptr(); + if (auto castedLayer = ngraph::as_type_ptr(weightsNode)) { + res->blobs["weights"] = InferenceEngine::details::shareWeights(castedLayer); + } + return res; + }); + addSpecificCreator({"Clamp"}, [](const std::shared_ptr<::ngraph::Node>& node, const std::map& params) -> CNNLayerPtr { LayerParams attrs = {node->get_friendly_name(), "Clamp", details::convertPrecision(node->get_output_element_type(0))}; @@ -1138,6 +1225,15 @@ InferenceEngine::details::CNNLayerCreator::CNNLayerCreator(const std::shared_ptr return res; }); + addSpecificCreator({"Subtract"}, [](const std::shared_ptr<::ngraph::Node> &node, + const std::map ¶ms) -> CNNLayerPtr { + LayerParams attrs = {node->get_friendly_name(), "Eltwise", + details::convertPrecision(node->get_output_element_type(0))}; + auto res = std::make_shared(attrs); + res->params["operation"] = "sub"; + return res; + }); + addSpecificCreator({"FakeQuantize"}, [](const std::shared_ptr<::ngraph::Node>& node, const std::map& params) -> CNNLayerPtr { LayerParams attrs = {node->get_friendly_name(), "FakeQuantize", details::convertPrecision(node->get_output_element_type(0))}; @@ -1208,19 +1304,16 @@ void convertFunctionToICNNNetwork(const std::shared_ptr> convertors = { std::make_shared>(), std::make_shared>(), - std::make_shared>(), std::make_shared>(), std::make_shared>(), std::make_shared>(), std::make_shared>(), std::make_shared>(), std::make_shared>(), - std::make_shared>(), std::make_shared>(), std::make_shared>(), std::make_shared>(), std::make_shared>(), - std::make_shared>(), std::make_shared>(), std::make_shared>(), std::make_shared>(), @@ -1230,7 +1323,6 @@ void convertFunctionToICNNNetwork(const std::shared_ptr>(), std::make_shared>(), std::make_shared>(), - std::make_shared>(), std::make_shared>(), std::make_shared>(), std::make_shared>(), diff --git a/inference-engine/src/legacy_api/src/ie_cnn_layer_builder_ngraph.cpp b/inference-engine/src/legacy_api/src/ie_cnn_layer_builder_ngraph.cpp index faedfc71f9f63d..6b3317daf26a83 100644 --- a/inference-engine/src/legacy_api/src/ie_cnn_layer_builder_ngraph.cpp +++ b/inference-engine/src/legacy_api/src/ie_cnn_layer_builder_ngraph.cpp @@ -337,61 +337,6 @@ CNNLayer::Ptr NodeConverter::createLayer(const std::shared return res; } -template <> -CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ptr& layer) const { - LayerParams params = {layer->get_friendly_name(), "Convert", - details::convertPrecision(layer->get_output_element_type(0))}; - auto res = std::make_shared(params); - auto p = details::convertPrecision(layer->get_output_element_type(0)); - std::string precision_str; - switch (p) { - case Precision::FP16: - precision_str = "FP16"; - break; - case Precision::BF16: - precision_str = "BF16"; - break; - case Precision::FP32: - precision_str = "FP32"; - break; - case Precision::FP64: - precision_str = "FP64"; - break; - case Precision::I8: - precision_str = "I8"; - break; - case Precision::I16: - precision_str = "I16"; - break; - case Precision::I32: - precision_str = "I32"; - break; - case Precision::I64: - precision_str = "I64"; - break; - case Precision::U8: - precision_str = "U8"; - break; - case Precision::U16: - precision_str = "U16"; - break; - case Precision::U32: - precision_str = "U32"; - break; - case Precision::U64: - precision_str = "U64"; - break; - case Precision::BOOL: - precision_str = "BOOL"; - break; - default: - THROW_IE_EXCEPTION << "Unsupported type"; - } - - res->params["precision"] = precision_str; - return res; -} - template <> CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ptr& layer) const { LayerParams params = {layer->get_friendly_name(), "Ceiling", @@ -453,23 +398,6 @@ CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ptr< return res; } -template <> -CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ptr& layer) const { - LayerParams params = {layer->get_friendly_name(), "MVN", details::convertPrecision(layer->get_output_element_type(0))}; - auto res = std::make_shared(params); - auto castedLayer = ngraph::as_type_ptr(layer); - if (castedLayer == nullptr) THROW_IE_EXCEPTION << "Cannot get " << params.type << " layer " << params.name; - - res->params["eps"] = asString(castedLayer->get_eps()); - - const size_t chanelAxis = 1; - ngraph::AxisSet reductionAxes = castedLayer->get_reduction_axes(); - res->params["across_channels"] = asString(reductionAxes.count(chanelAxis) > 0); - - res->params["normalize_variance"] = asString(castedLayer->get_normalize_variance()); - return res; -} - template <> CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ptr& layer) const { LayerParams params = {layer->get_friendly_name(), "Crop", @@ -502,15 +430,6 @@ CNNLayer::Ptr NodeConverter::createLayer(const std::shared_p return res; } -template <> -CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ptr& layer) const { - LayerParams params = {layer->get_friendly_name(), "Eltwise", - details::convertPrecision(layer->get_output_element_type(0))}; - auto res = std::make_shared(params); - res->params["operation"] = "sub"; - return res; -} - template <> CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ptr& layer) const { LayerParams params = {layer->get_friendly_name(), "Eltwise", diff --git a/inference-engine/src/legacy_api/src/ngraph_ops/normalize_ie.cpp b/inference-engine/src/legacy_api/src/ngraph_ops/normalize_ie.cpp index 7d672d4d685070..6fb3893876764e 100644 --- a/inference-engine/src/legacy_api/src/ngraph_ops/normalize_ie.cpp +++ b/inference-engine/src/legacy_api/src/ngraph_ops/normalize_ie.cpp @@ -35,3 +35,10 @@ shared_ptr op::NormalizeIE::clone_with_new_inputs(const OutputVector& new_ check_new_args_count(this, new_args); return make_shared(new_args.at(0), new_args.at(1), m_eps, m_across_spatial, m_channel_shared, m_output_type); } + +bool op::NormalizeIE::visit_attributes(AttributeVisitor& visitor) { + visitor.on_attribute("eps", m_eps); + visitor.on_attribute("channel_shared", m_channel_shared); + visitor.on_attribute("across_spatial", m_across_spatial); + return true; +} diff --git a/inference-engine/src/readers/ir_reader/ie_ir_parser.cpp b/inference-engine/src/readers/ir_reader/ie_ir_parser.cpp index 7bc61a5494c9ef..1dadcbb46f24bf 100644 --- a/inference-engine/src/readers/ir_reader/ie_ir_parser.cpp +++ b/inference-engine/src/readers/ir_reader/ie_ir_parser.cpp @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -397,13 +396,10 @@ std::shared_ptr V10Parser::createNode(const std::vector> creators = { std::make_shared>("AvgPool"), - std::make_shared>("Convert"), std::make_shared>("CTCGreedyDecoder"), std::make_shared>("DeformableConvolution"), std::make_shared>("DeformablePSROIPooling"), std::make_shared>("SpaceToDepth"), - std::make_shared>("DepthToSpace"), - std::make_shared>("Subtract"), std::make_shared>("Broadcast"), std::make_shared>("StridedSlice"), std::make_shared>("Gather"), @@ -415,14 +411,11 @@ std::shared_ptr V10Parser::createNode(const std::vector>("SquaredDifference"), std::make_shared>("LessEqual"), std::make_shared>("Equal"), - std::make_shared>("NotEqual"), std::make_shared>("FloorMod"), - std::make_shared>("MVN"), std::make_shared>("LSTMCell"), std::make_shared>("MaxPool"), std::make_shared>("Minimum"), std::make_shared>("NonMaxSuppression"), - std::make_shared>("NormalizeL2"), std::make_shared>("ReorgYolo"), std::make_shared>("RegionYolo"), std::make_shared>("Result"), @@ -480,12 +473,16 @@ std::shared_ptr V10Parser::createNode(const std::vector V10Parser::LayerCreator::cre return fillSubGraphLayer(inputs, node, weights, layerParsePrms, loop); } -// Covnert layer -template <> -std::shared_ptr V10Parser::LayerCreator::createLayer( - const ngraph::OutputVector& inputs, const pugi::xml_node& node, const Blob::CPtr& weights, - const GenericLayerParams& layerParsePrms) { - checkParameters(inputs, layerParsePrms, 1); - pugi::xml_node dn = node.child("data"); - if (dn.empty()) - THROW_IE_EXCEPTION << "Cannot read parameter for " << getType() << " layer with name: " << layerParsePrms.name; - - return std::make_shared(inputs[0], - details::convertPrecision(GetStrAttr(dn, "destination_type"))); -} - // LSTMCell layer template <> std::shared_ptr V10Parser::LayerCreator::createLayer( @@ -844,15 +827,6 @@ std::shared_ptr V10Parser::LayerCreator::cr return std::make_shared(inputs[0], inputs[1]); } -// NotEqual layer -template <> -std::shared_ptr V10Parser::LayerCreator::createLayer( - const ngraph::OutputVector& inputs, const pugi::xml_node& node, const Blob::CPtr& weights, - const GenericLayerParams& layerParsePrms) { - checkParameters(inputs, layerParsePrms, 2); - return std::make_shared(inputs[0], inputs[1]); -} - // FloorMod layer template <> std::shared_ptr V10Parser::LayerCreator::createLayer( @@ -862,23 +836,6 @@ std::shared_ptr V10Parser::LayerCreator: return std::make_shared(inputs[0], inputs[1]); } -// MVN layer -template <> -std::shared_ptr V10Parser::LayerCreator::createLayer( - const ngraph::OutputVector& inputs, const pugi::xml_node& node, const Blob::CPtr& weights, - const GenericLayerParams& layerParsePrms) { - checkParameters(inputs, layerParsePrms, 1); - pugi::xml_node dn = node.child("data"); - - if (dn.empty()) - THROW_IE_EXCEPTION << "Cannot read parameter for " << getType() << " layer with name: " << layerParsePrms.name; - - double eps = GetFloatAttr(dn, "eps"); - bool across = GetUIntAttr(dn, "across_channels", 0) == 1; - bool normalize_variance = GetUIntAttr(dn, "normalize_variance", 0) == 1; - return std::make_shared(inputs[0], across, normalize_variance, eps); -} - // VariadicSplit layer template <> std::shared_ptr V10Parser::LayerCreator::createLayer( @@ -959,14 +916,6 @@ std::shared_ptr V10Parser::LayerCreator:: return std::make_shared(inputs[0], inputs[1]); } -// Subtract layer -template <> -std::shared_ptr V10Parser::LayerCreator::createLayer( - const ngraph::OutputVector& inputs, const pugi::xml_node& node, const Blob::CPtr& weights, - const GenericLayerParams& layerParsePrms) { - checkParameters(inputs, layerParsePrms, 2); - return std::make_shared(inputs[0], inputs[1]); -} // Broadcast layer template <> @@ -1344,31 +1293,6 @@ std::shared_ptr V10Parser::LayerCreator::c return std::make_shared(inputs[0], inputs[1], inputs[2]); } -// NormalizeL2 layer -template <> -std::shared_ptr V10Parser::LayerCreator::createLayer( - const ngraph::OutputVector& inputs, const pugi::xml_node& node, const Blob::CPtr& weights, - const GenericLayerParams& layerParsePrms) { - checkParameters(inputs, layerParsePrms, 2); - pugi::xml_node dn = node.child("data"); - - if (dn.empty()) - THROW_IE_EXCEPTION << "Cannot read parameter for " << getType() << " layer with name: " << layerParsePrms.name; - - float eps = GetFloatAttr(dn, "eps"); - std::string eps_mode = GetStrAttr(dn, "eps_mode"); - ngraph::op::EpsMode em; - if (eps_mode == "add") { - em = ngraph::op::EpsMode::ADD; - } else if (eps_mode == "max") { - em = ngraph::op::EpsMode::MAX; - } else { - THROW_IE_EXCEPTION << "NormalizeL2 unsupported eps_mode: " << eps_mode; - } - - return std::make_shared(inputs[0], inputs[1], eps, em); -} - // LogicalAnd layer template <> std::shared_ptr V10Parser::LayerCreator::createLayer( diff --git a/ngraph/core/include/ngraph/op/not_equal.hpp b/ngraph/core/include/ngraph/op/not_equal.hpp index dfd551ddbefdca..ca511dc2fe15cd 100644 --- a/ngraph/core/include/ngraph/op/not_equal.hpp +++ b/ngraph/core/include/ngraph/op/not_equal.hpp @@ -49,6 +49,7 @@ namespace ngraph bool evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const override; + virtual bool visit_attributes(AttributeVisitor& visitor) override; }; } // namespace v1 } diff --git a/ngraph/core/src/op/mvn.cpp b/ngraph/core/src/op/mvn.cpp index 8408e09939b2ee..4247482fb4d31d 100644 --- a/ngraph/core/src/op/mvn.cpp +++ b/ngraph/core/src/op/mvn.cpp @@ -49,6 +49,8 @@ op::MVN::MVN(const Output& data, AxisSet reduction_axes, bool normalize_va , m_reduction_axes{reduction_axes} { constructor_validate_and_infer_types(); + const size_t chanelAxis = 1; + m_across_channels = (m_reduction_axes.count(chanelAxis) > 0); } // decompose_op() relies on knowing the data type of input data which might diff --git a/ngraph/core/src/op/normalize_l2.cpp b/ngraph/core/src/op/normalize_l2.cpp index 689810489365d7..bf0d6abf850eb9 100644 --- a/ngraph/core/src/op/normalize_l2.cpp +++ b/ngraph/core/src/op/normalize_l2.cpp @@ -84,6 +84,7 @@ void op::NormalizeL2::pre_validate_and_infer_types() } } } + set_output_type(0, get_input_element_type(0), get_input_partial_shape(0)); } AxisSet op::NormalizeL2::get_reduction_axes() const diff --git a/ngraph/core/src/op/not_equal.cpp b/ngraph/core/src/op/not_equal.cpp index 9990bd3126cf23..6dd5d2dcb09916 100644 --- a/ngraph/core/src/op/not_equal.cpp +++ b/ngraph/core/src/op/not_equal.cpp @@ -94,3 +94,8 @@ bool op::v1::NotEqual::evaluate(const HostTensorVector& outputs, OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::NotEqual::evaluate"); return not_equalop::evaluate_not_equal(inputs[0], inputs[1], outputs[0], get_autob()); } + +bool op::v1::NotEqual::visit_attributes(AttributeVisitor& visitor) +{ + return true; +} From e81201ea35d9f820e4b37d60d3c5222662a8e7c9 Mon Sep 17 00:00:00 2001 From: Andrew Bakalin Date: Tue, 8 Dec 2020 15:19:27 +0300 Subject: [PATCH 026/244] [VPU][TESTS][GNA] Fix dynamic models import on VPU (#3427) * [VPU] Fix dynamic networks import * [IE][GNA][TESTS] Move ImportExport tests from GNA to shared part * [VPU][Tests] Add ExportImport test for dynamic network * [VPU] Review fixes * [VPU][Tests] Review and test fixes * [VPU][Tests] Move TEST_P to shared part --- .../include/vpu/utils/shape_io.hpp | 15 ++ .../vpu/graph_transformer/src/blob_reader.cpp | 127 +++++------- .../middleend/passes/propagate_dynamism.cpp | 6 +- .../src/stages/dynamic_shape_resolver.cpp | 4 +- .../graph_transformer/src/utils/shape_io.cpp | 17 ++ .../myriad_plugin/myriad_infer_request.cpp | 4 +- .../plugin/gna/import_export_network.cpp | 196 ------------------ .../import_reshape_permute_conv.cpp | 70 +++++++ .../import_export_tests/import_nonzero.cpp | 32 +++ .../import_export_tests/import_nonzero.hpp | 16 ++ .../import_reshape_permute_conv.hpp | 16 ++ .../import_export_tests/import_nonzero.cpp | 26 +++ .../import_reshape_permute_conv.cpp | 43 ++++ .../import_export_base/import_export_base.cpp | 73 +++++++ .../import_export_base/import_export_base.hpp | 34 +++ 15 files changed, 399 insertions(+), 280 deletions(-) create mode 100644 inference-engine/src/vpu/graph_transformer/include/vpu/utils/shape_io.hpp create mode 100644 inference-engine/src/vpu/graph_transformer/src/utils/shape_io.cpp delete mode 100644 inference-engine/tests/functional/plugin/gna/import_export_network.cpp create mode 100644 inference-engine/tests/functional/plugin/gna/shared_tests_instances/import_export_tests/import_reshape_permute_conv.cpp create mode 100644 inference-engine/tests/functional/plugin/myriad/shared_tests_instances/import_export_tests/import_nonzero.cpp create mode 100644 inference-engine/tests/functional/plugin/shared/include/import_export_tests/import_nonzero.hpp create mode 100644 inference-engine/tests/functional/plugin/shared/include/import_export_tests/import_reshape_permute_conv.hpp create mode 100644 inference-engine/tests/functional/plugin/shared/src/import_export_tests/import_nonzero.cpp create mode 100644 inference-engine/tests/functional/plugin/shared/src/import_export_tests/import_reshape_permute_conv.cpp create mode 100644 inference-engine/tests/ie_test_utils/functional_test_utils/import_export_base/import_export_base.cpp create mode 100644 inference-engine/tests/ie_test_utils/functional_test_utils/import_export_base/import_export_base.hpp diff --git a/inference-engine/src/vpu/graph_transformer/include/vpu/utils/shape_io.hpp b/inference-engine/src/vpu/graph_transformer/include/vpu/utils/shape_io.hpp new file mode 100644 index 00000000000000..e0315feba28a77 --- /dev/null +++ b/inference-engine/src/vpu/graph_transformer/include/vpu/utils/shape_io.hpp @@ -0,0 +1,15 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include + +namespace vpu { + +std::string createIOShapeName(std::string srcName); + +bool isIOShapeName(std::string name); + +} //namespace vpu diff --git a/inference-engine/src/vpu/graph_transformer/src/blob_reader.cpp b/inference-engine/src/vpu/graph_transformer/src/blob_reader.cpp index 80b34c8e3a7349..03dc2f9489417e 100644 --- a/inference-engine/src/vpu/graph_transformer/src/blob_reader.cpp +++ b/inference-engine/src/vpu/graph_transformer/src/blob_reader.cpp @@ -14,6 +14,7 @@ #include #include #include +#include namespace vpu { @@ -49,101 +50,71 @@ void BlobReader::parse(const std::vector& blob) { _inputInfo.totalSize = _blobHeader.inputs_size; _outputInfo.totalSize = _blobHeader.outputs_size; - auto inputInfoSecOffset = _blobHeader.input_info_section_offset; - for (uint32_t i = 0; i < _blobHeader.inputs_count; i++) { - auto ioIdx = readFromBlob(blob, inputInfoSecOffset); - IE_ASSERT(ioIdx == i); + const auto readIO = [this, &blob](DataInfo& ioInfo, uint32_t& ioSectionOffset, uint32_t idx) { + auto ioIdx = readFromBlob(blob, ioSectionOffset); + VPU_THROW_UNLESS(ioIdx == idx, "BlobReader failed on I/O processing, its' ioIdx parameter (which is {}) is " + "different from its' processing order (which is {})", ioIdx, idx); - auto ioBufferOffset = readFromBlob(blob, inputInfoSecOffset); + auto ioBufferOffset = readFromBlob(blob, ioSectionOffset); - auto nameLength = readFromBlob(blob, inputInfoSecOffset); - std::string inputName(nameLength, 0); - for (auto& c : inputName) { - c = readFromBlob(blob, inputInfoSecOffset); - } + auto nameLength = readFromBlob(blob, ioSectionOffset); + std::string ioName(nameLength, 0); + for (auto& c : ioName) { + c = readFromBlob(blob, ioSectionOffset); + } - // Truncate zeros - inputName = inputName.c_str(); + // Truncate zeros + ioName = ioName.c_str(); - auto dataType = readFromBlob(blob, inputInfoSecOffset); - auto orderCode = readFromBlob(blob, inputInfoSecOffset); + auto dataType = readFromBlob(blob, ioSectionOffset); + auto orderCode = readFromBlob(blob, ioSectionOffset); - auto numDims = readFromBlob(blob, inputInfoSecOffset); + auto numDims = readFromBlob(blob, ioSectionOffset); - auto dimsOrder = DimsOrder::fromCode(orderCode); - auto perm = dimsOrder.toPermutation(); - IE_ASSERT(perm.size() == numDims); + auto dimsOrder = DimsOrder::fromCode(orderCode); + auto perm = dimsOrder.toPermutation(); + IE_ASSERT(perm.size() == numDims); - auto dimsLocation = readFromBlob(blob, inputInfoSecOffset); - VPU_THROW_UNLESS(dimsLocation == Location::Blob, - "BlobReader error while parsing {} input data: only Blob location for input shape is supported, but {} was given", - inputName, dimsLocation); - auto dimsOffset = _blobHeader.const_data_section_offset + readFromBlob(blob, inputInfoSecOffset); + auto dimsLocation = readFromBlob(blob, ioSectionOffset); + VPU_THROW_UNLESS(dimsLocation == Location::Blob, + "BlobReader error while parsing data {}: only Blob location for input/output shape is supported, but {} was given", + ioName, dimsLocation); + auto dimsOffset = _blobHeader.const_data_section_offset + readFromBlob(blob, ioSectionOffset); - // Skip strides' location and offset - inputInfoSecOffset += 2 * sizeof(uint32_t); + // Skip strides' location and offset + ioSectionOffset += 2 * sizeof(uint32_t); - DimValues vpuDims; + DimValues vpuDims; - for (int i = 0; i < perm.size(); ++i) { - vpuDims.set(perm[i], readFromBlob(blob, dimsOffset)); - } + for (const auto& dim : perm) { + vpuDims.set(dim, readFromBlob(blob, dimsOffset)); + } - ie::TensorDesc ieDesc = DataDesc(dataType, dimsOrder, vpuDims).toTensorDesc(); - ie::Data inputData(inputName, ieDesc); + ie::TensorDesc ieDesc = DataDesc(dataType, dimsOrder, vpuDims).toTensorDesc(); + ie::Data ioData(ioName, ieDesc); - ie::InputInfo input; - input.setInputData(std::make_shared(inputData)); - - _networkInputs[input.name()] = std::make_shared(input); - _inputInfo.offset[input.name()] = ioBufferOffset; - } + ioInfo.offset[ioName] = ioBufferOffset; + ioInfo.descFromPlugin[ioName] = ieDesc; - auto outputInfoSecOffset = _blobHeader.output_info_section_offset; - for (size_t i = 0; i < _blobHeader.outputs_count; i++) { - auto ioIdx = readFromBlob(blob, outputInfoSecOffset); - IE_ASSERT(ioIdx == i); + return ioData; + }; - auto ioBufferOffset = readFromBlob(blob, outputInfoSecOffset); - - auto nameLength = readFromBlob(blob, outputInfoSecOffset); - std::string outputName(nameLength, 0); - for (auto& c : outputName) { - c = readFromBlob(blob, outputInfoSecOffset); + auto inputSectionOffset = _blobHeader.input_info_section_offset; + for (uint32_t i = 0; i < _blobHeader.inputs_count; i++) { + const auto processedInput = readIO(_inputInfo, inputSectionOffset, i); + if (!isIOShapeName(processedInput.getName())) { + ie::InputInfo input; + input.setInputData(std::make_shared(processedInput)); + _networkInputs[processedInput.getName()] = std::make_shared(input); } + } - // Truncate zeros - outputName = outputName.c_str(); - - auto dataType = readFromBlob(blob, outputInfoSecOffset); - auto orderCode = readFromBlob(blob, outputInfoSecOffset); - - auto numDims = readFromBlob(blob, outputInfoSecOffset); - - auto dimsOrder = DimsOrder::fromCode(orderCode); - auto perm = dimsOrder.toPermutation(); - IE_ASSERT(perm.size() == numDims); - - auto dimsLocation = readFromBlob(blob, outputInfoSecOffset); - VPU_THROW_UNLESS(dimsLocation == Location::Blob, - "BlobReader error while parsing {} output data: only Blob location for output shape is supported, but {} was given", - outputName, dimsLocation); - auto dimsOffset = _blobHeader.const_data_section_offset + readFromBlob(blob, outputInfoSecOffset); - - // Skip strides' location and offset - outputInfoSecOffset += 2 * sizeof(uint32_t); - - DimValues vpuDims; - - for (int i = 0; i < perm.size(); ++i) { - vpuDims.set(perm[i], readFromBlob(blob, dimsOffset)); + auto outputSectionOffset = _blobHeader.output_info_section_offset; + for (uint32_t i = 0; i < _blobHeader.outputs_count; i++) { + const auto processedOutput = readIO(_outputInfo, outputSectionOffset, i); + if (!isIOShapeName(processedOutput.getName())) { + _networkOutputs[processedOutput.getName()] = std::make_shared(processedOutput); } - - ie::TensorDesc ieDesc = DataDesc(dataType, dimsOrder, vpuDims).toTensorDesc(); - ie::Data outputData(outputName, ieDesc); - - _networkOutputs[outputData.getName()] = std::make_shared(outputData); - _outputInfo.offset[outputData.getName()] = ioBufferOffset; } } diff --git a/inference-engine/src/vpu/graph_transformer/src/middleend/passes/propagate_dynamism.cpp b/inference-engine/src/vpu/graph_transformer/src/middleend/passes/propagate_dynamism.cpp index 503855316767a6..406c1d052bd9e2 100644 --- a/inference-engine/src/vpu/graph_transformer/src/middleend/passes/propagate_dynamism.cpp +++ b/inference-engine/src/vpu/graph_transformer/src/middleend/passes/propagate_dynamism.cpp @@ -4,6 +4,8 @@ #include "vpu/middleend/pass_manager.hpp" +#include "vpu/utils/shape_io.hpp" + #include #include @@ -70,9 +72,7 @@ class PassImpl final : public Pass { model->connectDataWithShape(shape, output); if (output->usage() == DataUsage::Output) { - // MyriadInferRequest::GetResult assumes that dynamic data object has shape data object - // with the same name + suffix "@shape" - const auto shapeName = output->name() + "@shape"; + const auto shapeName = createIOShapeName(output->name()); const auto& shapeOutput = model->addOutputData(shapeName, shape->desc()); const auto& shapeProducer = shape->producer(); diff --git a/inference-engine/src/vpu/graph_transformer/src/stages/dynamic_shape_resolver.cpp b/inference-engine/src/vpu/graph_transformer/src/stages/dynamic_shape_resolver.cpp index 5c6283c327ea02..03bdeccf94993e 100644 --- a/inference-engine/src/vpu/graph_transformer/src/stages/dynamic_shape_resolver.cpp +++ b/inference-engine/src/vpu/graph_transformer/src/stages/dynamic_shape_resolver.cpp @@ -3,6 +3,8 @@ // #include +#include + #include namespace vpu { @@ -92,7 +94,7 @@ void FrontEnd::parseDSR(const Model& model, const ie::CNNLayerPtr& layer, const auto shapeDataObject = shape; if (dataOutput->usage() == DataUsage::Output && shapeDataObject->usage() != DataUsage::Output) { - const auto& shapeOutput = model->addOutputData(dataOutput->name() + "@shape", shape->desc()); + const auto& shapeOutput = model->addOutputData(createIOShapeName(dataOutput->name()), shape->desc()); bindData(shapeOutput, shape->origData()); for (const auto& shapeConsumerEdge : shape->consumerEdges()) { diff --git a/inference-engine/src/vpu/graph_transformer/src/utils/shape_io.cpp b/inference-engine/src/vpu/graph_transformer/src/utils/shape_io.cpp new file mode 100644 index 00000000000000..19725e5d7b634b --- /dev/null +++ b/inference-engine/src/vpu/graph_transformer/src/utils/shape_io.cpp @@ -0,0 +1,17 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "vpu/utils/shape_io.hpp" + +namespace vpu { + +std::string createIOShapeName(std::string srcName) { + return srcName + "@shape"; +} + +bool isIOShapeName(std::string name) { + return name.find("@shape") != std::string::npos; +} + +} // namespace vpu diff --git a/inference-engine/src/vpu/myriad_plugin/myriad_infer_request.cpp b/inference-engine/src/vpu/myriad_plugin/myriad_infer_request.cpp index 061a910808b61b..c36322c66aa753 100644 --- a/inference-engine/src/vpu/myriad_plugin/myriad_infer_request.cpp +++ b/inference-engine/src/vpu/myriad_plugin/myriad_infer_request.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include "myriad_executable_network.h" #include "myriad_infer_request.h" @@ -236,8 +237,7 @@ void MyriadInferRequest::GetResult() { auto ieOutDims = ieOutDesc.getDims(); - // Eject dynamic output shape (suffix "@shape") and copy it to vector of dimensions in reverse order - const auto& shapeInfo = _outputInfo.offset.find(ieBlobName + "@shape"); + const auto& shapeInfo = _outputInfo.offset.find(createIOShapeName(ieBlobName)); // if (isDynamic) if (shapeInfo != _outputInfo.offset.end()) { auto outData = networkOutputs[ieBlobName]; diff --git a/inference-engine/tests/functional/plugin/gna/import_export_network.cpp b/inference-engine/tests/functional/plugin/gna/import_export_network.cpp deleted file mode 100644 index 9c0313ffef7953..00000000000000 --- a/inference-engine/tests/functional/plugin/gna/import_export_network.cpp +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (C) 2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include -#include -#include -#include -#include -#include - -#include - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" -#include "ngraph_functions/builders.hpp" - -#include "ngraph_functions/pass/convert_prc.hpp" - -typedef std::tuple< - InferenceEngine::Precision, // Network Precision - std::string, // Target Device - std::map, // Export Configuration - std::map // Import Configuration -> exportImportNetworkParams; - -namespace LayerTestsDefinitions { - -class ImportNetworkTest : public testing::WithParamInterface, - public LayerTestsUtils::LayerTestsCommon { - public: - static std::string getTestCaseName(testing::TestParamInfo obj) { - InferenceEngine::Precision netPrecision; - std::string targetDevice; - std::map exportConfiguration; - std::map importConfiguration; - std::tie(netPrecision, targetDevice, exportConfiguration, importConfiguration) = obj.param; - - std::ostringstream result; - result << "netPRC=" << netPrecision.name() << "_"; - result << "targetDevice=" << targetDevice << "_"; - for (auto const& configItem : exportConfiguration) { - result << "_exportConfigItem=" << configItem.first << "_" << configItem.second; - } - for (auto const& configItem : importConfiguration) { - result << "_importConfigItem=" << configItem.first << "_" << configItem.second; - } - return result.str(); - } - - void Run() override { - SKIP_IF_CURRENT_TEST_IS_DISABLED() - - configuration.insert(exportConfiguration.begin(), exportConfiguration.end()); - LoadNetwork(); - Infer(); - executableNetwork.Export("exported_model.blob"); - - const auto& actualOutputs = GetOutputs(); - auto referenceOutputs = CalculateRefs(); - Compare(referenceOutputs, actualOutputs); - - for (auto const& configItem : importConfiguration) { - configuration[configItem.first] = configItem.second; - } - std::fstream inputStream("exported_model.blob", std::ios_base::in | std::ios_base::binary); - if (inputStream.fail()) { - FAIL() << "Cannot open file to import model: exported_model.blob"; - } - auto importedNetwork = core->ImportNetwork(inputStream, targetDevice, configuration); - for (const auto& next_input : importedNetwork.GetInputsInfo()) { - ASSERT_NO_THROW(executableNetwork.GetInputsInfo()[next_input.first]); - } - for (const auto& next_output : importedNetwork.GetOutputsInfo()) { - ASSERT_NO_THROW(executableNetwork.GetOutputsInfo()[next_output.first]); - } - auto importedOutputs = CalculateImportedNetwork(importedNetwork); - Compare(importedOutputs, actualOutputs); - } - - protected: - void SetUp() override { - InferenceEngine::Precision netPrecision; - std::tie(netPrecision, targetDevice, exportConfiguration, importConfiguration) = this->GetParam(); - auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecision); - - auto params = ngraph::builder::makeParams(ngPrc, { {1, 336} }); - - std::vector outFormShapes1 = { 1, 1, 168, 2 }; - auto pattern1 = std::make_shared(ngraph::element::Type_t::i64, ngraph::Shape{ 4 }, outFormShapes1); - auto reshape1 = std::make_shared(params[0], pattern1, false); - - auto permute1 = std::make_shared(reshape1, - ngraph::opset1::Constant::create(ngraph::element::i64, ngraph::Shape{ 4 }, { 0, 3, 1, 2 })); - - auto conv1 = ngraph::builder::makeConvolution(permute1, ngPrc, { 1, 8 }, { 1, 1 }, { 0, 0 }, { 0, 0 }, { 1, 1 }, - ngraph::op::PadType::VALID, 12); - - auto permute2 = std::make_shared(conv1, - ngraph::opset1::Constant::create(ngraph::element::i64, ngraph::Shape{ 4 }, { 0, 2, 3, 1 })); - - std::vector outFormShapes2 = { 1, 1932 }; - auto pattern2 = std::make_shared(ngraph::element::Type_t::i64, ngraph::Shape{ 2 }, outFormShapes2); - auto reshape2 = std::make_shared(permute2, pattern2, false); - - ngraph::ResultVector results{ std::make_shared(reshape2) }; - function = std::make_shared(results, params, "ExportImportNetwork"); - } - - private: - std::map exportConfiguration; - std::map importConfiguration; - - std::vector> CalculateImportedNetwork(InferenceEngine::ExecutableNetwork& importedNetwork) { - auto refInferRequest = importedNetwork.CreateInferRequest(); - std::vector refInfos; - for (const auto& input : importedNetwork.GetInputsInfo()) { - const auto& info = input.second; - refInfos.push_back(info); - } - - for (std::size_t i = 0; i < inputs.size(); ++i) { - const auto& input = inputs[i]; - const auto& info = refInfos[i]; - - refInferRequest.SetBlob(info->name(), input); - } - - refInferRequest.Infer(); - - auto refOutputs = std::vector{}; - for (const auto& output : importedNetwork.GetOutputsInfo()) { - const auto& name = output.first; - refOutputs.push_back(refInferRequest.GetBlob(name)); - } - - auto referenceOutputs = std::vector>(refOutputs.size()); - for (std::size_t i = 0; i < refOutputs.size(); ++i) { - const auto& reference = refOutputs[i]; - const auto refSize = reference->byteSize(); - - auto& expectedOutput = referenceOutputs[i]; - expectedOutput.resize(refSize); - - auto refMemory = InferenceEngine::as(reference); - IE_ASSERT(refMemory); - const auto refLockedMemory = refMemory->wmap(); - const auto referenceBuffer = refLockedMemory.as(); - - std::copy(referenceBuffer, referenceBuffer + refSize, expectedOutput.data()); - } - - return referenceOutputs; - } -}; - - TEST_P(ImportNetworkTest, CompareWithRefImpl) { - Run(); - }; - - const std::vector netPrecisions = { - InferenceEngine::Precision::FP32, - InferenceEngine::Precision::FP16 - }; - - const std::vector> exportConfigs = { - { - {"GNA_DEVICE_MODE", "GNA_SW_EXACT"}, - {"GNA_SCALE_FACTOR_0", "327.67"} - } - }; - - const std::vector> importConfigs = { - { - {"GNA_DEVICE_MODE", "GNA_SW_EXACT"}, - {"GNA_SCALE_FACTOR_0", "32767"} - }, - { - {"GNA_DEVICE_MODE", "GNA_SW_EXACT"}, - {"GNA_SCALE_FACTOR_0", "327.67"} - }, - }; - - INSTANTIATE_TEST_CASE_P(smoke_ImportNetworkCase, ImportNetworkTest, - ::testing::Combine( - ::testing::ValuesIn(netPrecisions), - ::testing::Values(CommonTestUtils::DEVICE_GNA), - ::testing::ValuesIn(exportConfigs), - ::testing::ValuesIn(importConfigs)), - ImportNetworkTest::getTestCaseName); - -} // namespace LayerTestsDefinitions - diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/import_export_tests/import_reshape_permute_conv.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/import_export_tests/import_reshape_permute_conv.cpp new file mode 100644 index 00000000000000..27f92bd88d0708 --- /dev/null +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/import_export_tests/import_reshape_permute_conv.cpp @@ -0,0 +1,70 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "import_export_tests/import_reshape_permute_conv.hpp" + +#include +#include + +using namespace LayerTestsDefinitions; + +namespace { + +class ImportReshapePermuteConvGNA : public ImportReshapePermuteConv { +private: + void exportImportNetwork() override { + executableNetwork.Export(fileName); + std::fstream inputStream(fileName, std::ios_base::in | std::ios_base::binary); + if (inputStream.fail()) { + FAIL() << "Cannot open file to import model: " << fileName; + } + executableNetwork = core->ImportNetwork(inputStream, targetDevice, configuration); + } +protected: + void TearDown() override { + if (remove(fileName.c_str()) != 0) { + FAIL() << "Error: could not delete file " << fileName; + } + } + +private: + std::string fileName = "exported_model.blob"; +}; + +TEST_P(ImportReshapePermuteConvGNA, CompareWithRefImpl) { + Run(); +}; + +const std::vector netPrecisions = { + InferenceEngine::Precision::FP32, + InferenceEngine::Precision::FP16 +}; + +const std::vector> exportConfigs = { + { + {"GNA_DEVICE_MODE", "GNA_SW_EXACT"}, + {"GNA_SCALE_FACTOR_0", "327.67"} + } +}; + +const std::vector> importConfigs = { + { + {"GNA_DEVICE_MODE", "GNA_SW_EXACT"}, + {"GNA_SCALE_FACTOR_0", "32767"} + }, + { + {"GNA_DEVICE_MODE", "GNA_SW_EXACT"}, + {"GNA_SCALE_FACTOR_0", "327.67"} + }, +}; + +INSTANTIATE_TEST_CASE_P(smoke_ImportNetworkCase, ImportReshapePermuteConvGNA, + ::testing::Combine( + ::testing::ValuesIn(netPrecisions), + ::testing::Values(CommonTestUtils::DEVICE_GNA), + ::testing::ValuesIn(exportConfigs), + ::testing::ValuesIn(importConfigs)), + ImportReshapePermuteConvGNA::getTestCaseName); + +} // namespace diff --git a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/import_export_tests/import_nonzero.cpp b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/import_export_tests/import_nonzero.cpp new file mode 100644 index 00000000000000..e863bb62e72e3d --- /dev/null +++ b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/import_export_tests/import_nonzero.cpp @@ -0,0 +1,32 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "import_export_tests/import_nonzero.hpp" +#include "vpu/private_plugin_config.hpp" + +using namespace LayerTestsDefinitions; + +namespace { + +const std::vector netPrecisions = { + InferenceEngine::Precision::FP32, +}; + +const std::vector> exportConfigs = { + {} +}; + +const std::vector> importConfigs = { + {} +}; + +INSTANTIATE_TEST_CASE_P(smoke_ImportNetworkCase, ImportNonZero, + ::testing::Combine( + ::testing::ValuesIn(netPrecisions), + ::testing::Values(CommonTestUtils::DEVICE_MYRIAD), + ::testing::ValuesIn(exportConfigs), + ::testing::ValuesIn(importConfigs)), + ImportNonZero::getTestCaseName); + +} // namespace diff --git a/inference-engine/tests/functional/plugin/shared/include/import_export_tests/import_nonzero.hpp b/inference-engine/tests/functional/plugin/shared/include/import_export_tests/import_nonzero.hpp new file mode 100644 index 00000000000000..58d863f3b88dc4 --- /dev/null +++ b/inference-engine/tests/functional/plugin/shared/include/import_export_tests/import_nonzero.hpp @@ -0,0 +1,16 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include "functional_test_utils/import_export_base/import_export_base.hpp" + +namespace LayerTestsDefinitions { + +class ImportNonZero : public FuncTestUtils::ImportNetworkTestBase { +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/import_export_tests/import_reshape_permute_conv.hpp b/inference-engine/tests/functional/plugin/shared/include/import_export_tests/import_reshape_permute_conv.hpp new file mode 100644 index 00000000000000..e08d4e5dcc570a --- /dev/null +++ b/inference-engine/tests/functional/plugin/shared/include/import_export_tests/import_reshape_permute_conv.hpp @@ -0,0 +1,16 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include "functional_test_utils/import_export_base/import_export_base.hpp" + +namespace LayerTestsDefinitions { + +class ImportReshapePermuteConv : public FuncTestUtils::ImportNetworkTestBase { +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/import_export_tests/import_nonzero.cpp b/inference-engine/tests/functional/plugin/shared/src/import_export_tests/import_nonzero.cpp new file mode 100644 index 00000000000000..9ea9634dbd9d5d --- /dev/null +++ b/inference-engine/tests/functional/plugin/shared/src/import_export_tests/import_nonzero.cpp @@ -0,0 +1,26 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "import_export_tests/import_nonzero.hpp" + +#include "ngraph/opsets/opset5.hpp" + +namespace LayerTestsDefinitions { + +void ImportNonZero::SetUp() { + InferenceEngine::Precision netPrecision; + std::tie(netPrecision, targetDevice, exportConfiguration, importConfiguration) = this->GetParam(); + const auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecision); + + const auto parameter = std::make_shared(ngPrc, ngraph::Shape{1000}); + const auto nonZero = std::make_shared(parameter); + + function = std::make_shared(nonZero->outputs(), ngraph::ParameterVector{parameter}, "ExportImportNetwork"); +} + +TEST_P(ImportNonZero, CompareWithRefImpl) { + Run(); +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/import_export_tests/import_reshape_permute_conv.cpp b/inference-engine/tests/functional/plugin/shared/src/import_export_tests/import_reshape_permute_conv.cpp new file mode 100644 index 00000000000000..8fa48a4bdc276b --- /dev/null +++ b/inference-engine/tests/functional/plugin/shared/src/import_export_tests/import_reshape_permute_conv.cpp @@ -0,0 +1,43 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "import_export_tests/import_reshape_permute_conv.hpp" + +#include "ngraph_functions/builders.hpp" + +namespace LayerTestsDefinitions { + +void ImportReshapePermuteConv::SetUp() { + InferenceEngine::Precision netPrecision; + std::tie(netPrecision, targetDevice, exportConfiguration, importConfiguration) = this->GetParam(); + auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecision); + + auto params = ngraph::builder::makeParams(ngPrc, { {1, 336} }); + + std::vector outFormShapes1 = { 1, 1, 168, 2 }; + auto pattern1 = std::make_shared(ngraph::element::Type_t::i64, ngraph::Shape{ 4 }, outFormShapes1); + auto reshape1 = std::make_shared(params[0], pattern1, false); + + auto permute1 = std::make_shared(reshape1, + ngraph::opset1::Constant::create(ngraph::element::i64, ngraph::Shape{ 4 }, { 0, 3, 1, 2 })); + + auto conv1 = ngraph::builder::makeConvolution(permute1, ngPrc, { 1, 8 }, { 1, 1 }, { 0, 0 }, { 0, 0 }, { 1, 1 }, + ngraph::op::PadType::VALID, 12); + + auto permute2 = std::make_shared(conv1, + ngraph::opset1::Constant::create(ngraph::element::i64, ngraph::Shape{ 4 }, { 0, 2, 3, 1 })); + + std::vector outFormShapes2 = { 1, 1932 }; + auto pattern2 = std::make_shared(ngraph::element::Type_t::i64, ngraph::Shape{ 2 }, outFormShapes2); + auto reshape2 = std::make_shared(permute2, pattern2, false); + + ngraph::ResultVector results{ std::make_shared(reshape2) }; + function = std::make_shared(results, params, "ExportImportNetwork"); +} + +TEST_P(ImportReshapePermuteConv, CompareWithRefImpl) { + Run(); +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/ie_test_utils/functional_test_utils/import_export_base/import_export_base.cpp b/inference-engine/tests/ie_test_utils/functional_test_utils/import_export_base/import_export_base.cpp new file mode 100644 index 00000000000000..af17eb82d1cb9a --- /dev/null +++ b/inference-engine/tests/ie_test_utils/functional_test_utils/import_export_base/import_export_base.cpp @@ -0,0 +1,73 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "import_export_base.hpp" + +#include + +namespace FuncTestUtils { + +std::string ImportNetworkTestBase::getTestCaseName(testing::TestParamInfo obj) { + InferenceEngine::Precision netPrecision; + std::string targetDevice; + std::map exportConfiguration; + std::map importConfiguration; + std::tie(netPrecision, targetDevice, exportConfiguration, importConfiguration) = obj.param; + + std::ostringstream result; + result << "netPRC=" << netPrecision.name() << "_"; + result << "targetDevice=" << targetDevice << "_"; + for (auto const& configItem : exportConfiguration) { + result << "_exportConfigItem=" << configItem.first << "_" << configItem.second; + } + for (auto const& configItem : importConfiguration) { + result << "_importConfigItem=" << configItem.first << "_" << configItem.second; + } + return result.str(); +} + +void ImportNetworkTestBase::exportImportNetwork() { + std::stringstream strm; + executableNetwork.Export(strm); + executableNetwork = core->ImportNetwork(strm, targetDevice, configuration); +} + +void ImportNetworkTestBase::Run() { + SKIP_IF_CURRENT_TEST_IS_DISABLED() + + configuration.insert(exportConfiguration.begin(), exportConfiguration.end()); + LoadNetwork(); + Infer(); + + const auto& actualOutputs = GetOutputs(); + auto referenceOutputs = CalculateRefs(); + Compare(referenceOutputs, actualOutputs); + + for (auto const& configItem : importConfiguration) { + configuration[configItem.first] = configItem.second; + } + + const auto compiledExecNetwork = executableNetwork; + exportImportNetwork(); + const auto importedExecNetwork = executableNetwork; + + Infer(); + + ASSERT_EQ(importedExecNetwork.GetInputsInfo().size(), compiledExecNetwork.GetInputsInfo().size()); + ASSERT_EQ(importedExecNetwork.GetOutputsInfo().size(), compiledExecNetwork.GetOutputsInfo().size()); + + for (const auto& next_input : importedExecNetwork.GetInputsInfo()) { + ASSERT_NO_THROW(compiledExecNetwork.GetInputsInfo()[next_input.first]); + } + for (const auto& next_output : importedExecNetwork.GetOutputsInfo()) { + ASSERT_NO_THROW(compiledExecNetwork.GetOutputsInfo()[next_output.first]); + } + auto importedOutputs = GetOutputs(); + ASSERT_EQ(actualOutputs.size(), importedOutputs.size()); + for (size_t i = 0; i < actualOutputs.size(); i++) { + Compare(actualOutputs[i], importedOutputs[i]); + } +} + +} // namespace FuncTestUtils diff --git a/inference-engine/tests/ie_test_utils/functional_test_utils/import_export_base/import_export_base.hpp b/inference-engine/tests/ie_test_utils/functional_test_utils/import_export_base/import_export_base.hpp new file mode 100644 index 00000000000000..4bb5da58bae20a --- /dev/null +++ b/inference-engine/tests/ie_test_utils/functional_test_utils/import_export_base/import_export_base.hpp @@ -0,0 +1,34 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include "functional_test_utils/layer_test_utils.hpp" + +#include + +typedef std::tuple< + InferenceEngine::Precision, // Network Precision + std::string, // Target Device + std::map, // Export Configuration + std::map // Import Configuration +> exportImportNetworkParams; + +namespace FuncTestUtils { + +class ImportNetworkTestBase : public testing::WithParamInterface, + public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + void Run() override; + +protected: + std::map exportConfiguration; + std::map importConfiguration; + +private: + virtual void exportImportNetwork(); +}; + +} // namespace FuncTestUtils From 6888ffa328e91a01da03f3a74702b7c206531c87 Mon Sep 17 00:00:00 2001 From: Gabriele Galiero Casay Date: Tue, 8 Dec 2020 14:05:00 +0100 Subject: [PATCH 027/244] Revise Reference Implementation of Range op (#3409) * Range: Align operator with spec and add unit tests * Range: Remove output shape from range ref impl signature * Range: Exclude backend unit tests for CPU and GPU due to unsupported dynamic ops * Range: Add single layer test class for Range-4 * Range: Add unit test for shape inference * Range: Add unit tests for i32 and f32 * Range: Refactor Range v0 backend test and added test for f32 type * Range: Add floating point tolerance in unit tests to avoid failures due to precision * Range: Add subgraph tests for Range add element-wise * Range: Refactor Range class for single layer tests and add range add element-wise test with truncated inputs --- .../skip_tests_config.cpp | 1 + .../subgraph_tests/range_add.cpp | 48 +- .../include/single_layer_tests/range.hpp | 11 + .../include/subgraph_tests/range_add.hpp | 15 +- .../shared/src/single_layer_tests/range.cpp | 59 ++ .../shared/src/subgraph_tests/range_add.cpp | 50 +- ngraph/core/include/ngraph/op/range.hpp | 12 +- .../ngraph/runtime/reference/range.hpp | 8 +- ngraph/core/src/op/range.cpp | 44 +- ngraph/test/backend/range.in.cpp | 156 ++++- ngraph/test/runtime/ie/unit_test.manifest | 11 +- ngraph/test/runtime/pass/dyn_elimination.cpp | 3 +- ngraph/test/type_prop/range.cpp | 572 +++++++++++++++++- 13 files changed, 934 insertions(+), 56 deletions(-) diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/skip_tests_config.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/skip_tests_config.cpp index 2ba662994afc30..07b53781d6d5b7 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/skip_tests_config.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/skip_tests_config.cpp @@ -30,6 +30,7 @@ std::vector disabledTestPatterns() { // TODO: Issue: 34518 R"(.*RangeLayerTest.*)", R"(.*(RangeAddSubgraphTest).*Start=1.2.*Stop=(5.2|-5.2).*Step=(0.1|-0.1).*netPRC=FP16.*)", + R"(.*(RangeNumpyAddSubgraphTest).*netPRC=FP16.*)", // TODO: Issue: 34083 #if (defined(_WIN32) || defined(_WIN64)) R"(.*(CoreThreadingTestsWithIterations).*(smoke_LoadNetworkAccuracy).*)", diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/range_add.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/range_add.cpp index 39f85d5fe10418..0f16373c665d7c 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/range_add.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/range_add.cpp @@ -19,11 +19,17 @@ const std::vector negativeStart = { 1.0f, 1.2f }; const std::vector negativeStop = { -5.0f, -5.2f }; const std::vector negativeStep = { -1.0f, -0.1f }; +const std::vector trunc_start = { 1.2f, 1.9f }; +const std::vector trunc_stop = { 11.4f, 11.8f }; +const std::vector trunc_step = { 1.3f, 2.8f }; + const std::vector netPrecisions = { InferenceEngine::Precision::FP32, - InferenceEngine::Precision::FP16 + InferenceEngine::Precision::FP16 // "[NOT_IMPLEMENTED] Input image format FP16 is not supported yet... }; +// ------------------------------ V0 ------------------------------ + INSTANTIATE_TEST_CASE_P(smoke_BasicPositive, RangeAddSubgraphTest, ::testing::Combine( ::testing::ValuesIn(positiveStart), @@ -49,4 +55,44 @@ INSTANTIATE_TEST_CASE_P(smoke_BasicNegative, RangeAddSubgraphTest, ::testing::Values(InferenceEngine::Layout::ANY), ::testing::Values(CommonTestUtils::DEVICE_CPU)), RangeAddSubgraphTest::getTestCaseName); + +// ------------------------------ V4 ------------------------------ +INSTANTIATE_TEST_CASE_P(smoke_BasicPositive, RangeNumpyAddSubgraphTest, + ::testing::Combine( + ::testing::ValuesIn(positiveStart), + ::testing::ValuesIn(positiveStop), + ::testing::ValuesIn(positiveStep), + ::testing::ValuesIn(netPrecisions), + ::testing::ValuesIn(netPrecisions), + ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), + ::testing::Values(InferenceEngine::Layout::ANY), + ::testing::Values(InferenceEngine::Layout::ANY), + ::testing::Values(CommonTestUtils::DEVICE_CPU)), + RangeNumpyAddSubgraphTest::getTestCaseName); + +INSTANTIATE_TEST_CASE_P(smoke_BasicNegative, RangeNumpyAddSubgraphTest, + ::testing::Combine( + ::testing::ValuesIn(negativeStart), + ::testing::ValuesIn(negativeStop), + ::testing::ValuesIn(negativeStep), + ::testing::ValuesIn(netPrecisions), + ::testing::ValuesIn(netPrecisions), + ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), + ::testing::Values(InferenceEngine::Layout::ANY), + ::testing::Values(InferenceEngine::Layout::ANY), + ::testing::Values(CommonTestUtils::DEVICE_CPU)), + RangeNumpyAddSubgraphTest::getTestCaseName); + +INSTANTIATE_TEST_CASE_P(smoke_BasicTruncateInputs, RangeNumpyAddSubgraphTest, + ::testing::Combine( + ::testing::ValuesIn(trunc_start), + ::testing::ValuesIn(trunc_stop), + ::testing::ValuesIn(trunc_step), + ::testing::ValuesIn(netPrecisions), + ::testing::Values(InferenceEngine::Precision::I32), + ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), + ::testing::Values(InferenceEngine::Layout::ANY), + ::testing::Values(InferenceEngine::Layout::ANY), + ::testing::Values(CommonTestUtils::DEVICE_CPU)), + RangeNumpyAddSubgraphTest::getTestCaseName); } // namespace diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/range.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/range.hpp index b541d5be97c797..2dbd52a7a10b01 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/range.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/range.hpp @@ -36,4 +36,15 @@ class RangeLayerTest : public testing::WithParamInterface, void SetUp() override; }; +class RangeNumpyLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + void Infer() override; +protected: + void SetUp() override; +private: + float start, stop, step; +}; + } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/range_add.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/range_add.hpp index 4372db37b2f483..145742e6fe937e 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/range_add.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/range_add.hpp @@ -16,6 +16,8 @@ namespace LayerTestsDefinitions { +// ------------------------------ V0 ------------------------------ + class RangeAddSubgraphTest : public testing::WithParamInterface, virtual public LayerTestsUtils::LayerTestsCommon { public: @@ -23,4 +25,15 @@ class RangeAddSubgraphTest : public testing::WithParamInterface, protected: void SetUp() override; }; -} // namespace LayerTestsDefinitions \ No newline at end of file + +// ------------------------------ V4 ------------------------------ + +class RangeNumpyAddSubgraphTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/range.cpp b/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/range.cpp index 94a87d37d006ea..55dcc0cf129d54 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/range.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/range.cpp @@ -74,4 +74,63 @@ TEST_P(RangeLayerTest, CompareWithRefs) { Run(); } +std::string RangeNumpyLayerTest::getTestCaseName(testing::TestParamInfo obj) { + InferenceEngine::Precision netPrc; + InferenceEngine::Precision paramPrc; + InferenceEngine::Precision outPrc; + InferenceEngine::Layout inLayout, outLayout; + float start, stop, step; + std::string targetDevice; + std::tie(start, stop, step, paramPrc, netPrc, outPrc, inLayout, outLayout, targetDevice) = obj.param; + + std::ostringstream result; + const char separator = '_'; + result << "Start=" << start << separator; + result << "Stop=" << stop << separator; + result << "Step=" << step << separator; + result << "paramPRC=" << paramPrc.name() << separator; + result << "netPRC=" << netPrc.name() << separator; + result << "inL=" << inLayout << separator; + result << "outL=" << outLayout << separator; + result << "trgDev=" << targetDevice; + return result.str(); +} + +void RangeNumpyLayerTest::Infer() { + inferRequest = executableNetwork.CreateInferRequest(); + inputs.clear(); + + auto blobStart = inferRequest.GetBlob("start"); + blobStart = FuncTestUtils::createAndFillBlobWithFloatArray(blobStart->getTensorDesc(), &start, 1); + + auto blobStop = inferRequest.GetBlob("stop"); + blobStop = FuncTestUtils::createAndFillBlobWithFloatArray(blobStop->getTensorDesc(), &stop, 1); + + auto blobStep = inferRequest.GetBlob("step"); + blobStep = FuncTestUtils::createAndFillBlobWithFloatArray(blobStep->getTensorDesc(), &step, 1); + + inferRequest.Infer(); +} + +void RangeNumpyLayerTest::SetUp() { + InferenceEngine::Precision netPrc; + InferenceEngine::Precision paramPrc; + std::tie(start, stop, step, paramPrc, netPrc, outPrc, inLayout, outLayout, targetDevice) = GetParam(); + auto ngNetPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrc); + auto ngParamPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(paramPrc); + + auto params = ngraph::builder::makeParams(ngParamPrc, {std::vector(), std::vector(), std::vector()}); + params[0]->set_friendly_name("start"); + params[1]->set_friendly_name("stop"); + params[2]->set_friendly_name("step"); + + auto range = std::make_shared(params[0], params[1], params[2], ngNetPrc); + const ngraph::ResultVector results{std::make_shared(range)}; + function = std::make_shared(results, params, "Range"); +} + +TEST_P(RangeNumpyLayerTest, CompareWithRefs) { + Run(); +} + } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/range_add.cpp b/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/range_add.cpp index 8e3be5e7882316..6ea03edde43021 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/range_add.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/range_add.cpp @@ -6,6 +6,8 @@ namespace LayerTestsDefinitions { +// ------------------------------ V0 ------------------------------ + std::string RangeAddSubgraphTest::getTestCaseName(testing::TestParamInfo obj) { InferenceEngine::Precision netPrecision; InferenceEngine::Precision inPrc, outPrc; @@ -44,4 +46,50 @@ void RangeAddSubgraphTest::SetUp() { TEST_P(RangeAddSubgraphTest, CompareWithRefs) { Run(); } -} // namespace LayerTestsDefinitions \ No newline at end of file + +// ------------------------------ V4 ------------------------------ + +std::string RangeNumpyAddSubgraphTest::getTestCaseName(testing::TestParamInfo obj) { + InferenceEngine::Precision netPrc; + InferenceEngine::Precision constPrc; + InferenceEngine::Precision outPrc; + InferenceEngine::Layout inLayout, outLayout; + float start, stop, step; + std::string targetDevice; + std::tie(start, stop, step, constPrc, netPrc, outPrc, inLayout, outLayout, targetDevice) = obj.param; + + std::ostringstream result; + const char separator = '_'; + result << "Start=" << start << separator; + result << "Stop=" << stop << separator; + result << "Step=" << step << separator; + result << "constPRC=" << constPrc.name() << separator; + result << "netPRC=" << netPrc.name() << separator; + result << "targetDevice=" << targetDevice; + return result.str(); +} + +void RangeNumpyAddSubgraphTest::SetUp() { + InferenceEngine::Precision netPrc; + InferenceEngine::Precision constPrc; + float start, stop, step; + std::tie(start, stop, step, constPrc, netPrc, outPrc, inLayout, outLayout, targetDevice) = GetParam(); + auto ngConstPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(constPrc); + auto ngNetPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrc); + + auto startConstant = std::make_shared(ngConstPrc, ngraph::Shape{}, start); + auto stopConstant = std::make_shared(ngConstPrc, ngraph::Shape{}, stop); + auto stepConstant = std::make_shared(ngConstPrc, ngraph::Shape{}, step); + auto range = std::make_shared(startConstant, stopConstant, stepConstant, ngNetPrc); + + auto params = ngraph::builder::makeParams(ngNetPrc, {range->get_shape()}); + auto eltwise = ngraph::builder::makeEltwise(params.front(), range, ngraph::helpers::EltwiseTypes::ADD); + const ngraph::ResultVector results{std::make_shared(eltwise)}; + function = std::make_shared(results, params, "RangeEltwise"); +} + +TEST_P(RangeNumpyAddSubgraphTest, CompareWithRefs) { + Run(); +} + +} // namespace LayerTestsDefinitions diff --git a/ngraph/core/include/ngraph/op/range.hpp b/ngraph/core/include/ngraph/op/range.hpp index b33c034498deee..d5b07068173e01 100644 --- a/ngraph/core/include/ngraph/op/range.hpp +++ b/ngraph/core/include/ngraph/op/range.hpp @@ -35,12 +35,12 @@ namespace ngraph /// \brief Constructs a range operation. /// - /// \param start The tensor producing the start value. Must be a scalar of integer - /// element type, and same element type as `stop` and `step`. - /// \param stop The tensor producing the stop value. Must be a scalar of integer - /// element type, and same element type as `start` and `step`. - /// \param step The tensor producing the step value. Must be a scalar of integer - /// element type, and same element type as `start` and `stop`. + /// \param start The tensor producing the start value. Must be a scalar of numeric + /// element type. + /// \param stop The tensor producing the stop value. Must be a scalar of numeric + /// element type. + /// \param step The tensor producing the step value. Must be a scalar of numeric + /// element type. /// \param output_type The type of the output. Range(const Output& start, const Output& stop, diff --git a/ngraph/core/reference/include/ngraph/runtime/reference/range.hpp b/ngraph/core/reference/include/ngraph/runtime/reference/range.hpp index 489752246ce548..819a2b9cc02a09 100644 --- a/ngraph/core/reference/include/ngraph/runtime/reference/range.hpp +++ b/ngraph/core/reference/include/ngraph/runtime/reference/range.hpp @@ -37,9 +37,9 @@ namespace ngraph typename std::enable_if::value || std::is_same::value || std::is_same::value>::type - range(const T* start, const T* step, const Shape& out_shape, T* out) + range(const T* start, const T* step, const size_t& num_elem, T* out) { - for (size_t i = 0; i < shape_size(out_shape); i++) + for (size_t i = 0; i < num_elem; i++) { out[i] = *start + (static_cast(i) * (*step)); } @@ -48,11 +48,11 @@ namespace ngraph // Return type is `void`, only enabled if `T` is `is_integral`. template typename std::enable_if::value>::type - range(const T* start, const T* step, const Shape& out_shape, T* out) + range(const T* start, const T* step, const size_t& num_elem, T* out) { T val = *start; - for (size_t i = 0; i < shape_size(out_shape); i++) + for (size_t i = 0; i < num_elem; i++) { out[i] = val; val += *step; diff --git a/ngraph/core/src/op/range.cpp b/ngraph/core/src/op/range.cpp index b8083cafff022c..c214410925da44 100644 --- a/ngraph/core/src/op/range.cpp +++ b/ngraph/core/src/op/range.cpp @@ -46,6 +46,11 @@ bool ngraph::op::v4::Range::visit_attributes(AttributeVisitor& visitor) void op::v4::Range::validate_and_infer_types() { + NODE_VALIDATION_CHECK(this, + m_output_type.is_integral_number() || m_output_type.is_real(), + "output tensor type should be a numeric type. Got: ", + m_output_type); + set_input_is_relevant_to_shape(0); set_input_is_relevant_to_shape(1); set_input_is_relevant_to_shape(2); @@ -57,6 +62,22 @@ void op::v4::Range::validate_and_infer_types() NODE_VALIDATION_CHECK( this, get_input_partial_shape(2).compatible(Shape{}), "'step' input is not a scalar"); + NODE_VALIDATION_CHECK(this, + get_input_element_type(0).is_integral_number() || + get_input_element_type(0).is_real(), + "'start' input scalar should be a numeric type. Got: ", + get_input_element_type(0)); + NODE_VALIDATION_CHECK(this, + get_input_element_type(1).is_integral_number() || + get_input_element_type(1).is_real(), + "'stop' input scalar should be a numeric type. Got: ", + get_input_element_type(1)); + NODE_VALIDATION_CHECK(this, + get_input_element_type(2).is_integral_number() || + get_input_element_type(2).is_real(), + "'step' input scalar should be a numeric type. Got: ", + get_input_element_type(2)); + auto const_start = as_type_ptr(this->input_value(0).get_node_shared_ptr()); auto const_stop = as_type_ptr(this->input_value(1).get_node_shared_ptr()); auto const_step = as_type_ptr(this->input_value(2).get_node_shared_ptr()); @@ -96,8 +117,23 @@ void op::v4::Range::validate_and_infer_types() if (const_start != nullptr && const_stop != nullptr && const_step != nullptr) { - double span; + // all inputs must be casted to output_type before + // the rounding for casting values are done towards zero + if (m_output_type.is_integral_number() && get_input_element_type(0).is_real()) + { + start = std::trunc(start); + } + if (m_output_type.is_integral_number() && get_input_element_type(1).is_real()) + { + stop = std::trunc(stop); + } + if (m_output_type.is_integral_number() && get_input_element_type(2).is_real()) + { + step = std::trunc(step); + } + // the number of elements is: max(ceil((stop − start) / step), 0) + double span; if ((step > 0 && start >= stop) || (step < 0 && start <= stop)) { span = 0; @@ -182,7 +218,8 @@ bool evaluate_v4_range(const HostTensorPtr& out, } Shape out_shape = Shape({static_cast(out_size)}); out->set_shape(out_shape); - runtime::reference::range(&start_val, &step_val, out_shape, out->get_data_ptr()); + runtime::reference::range( + &start_val, &step_val, shape_size(out_shape), out->get_data_ptr()); return true; } @@ -457,7 +494,8 @@ bool try_evaluate_range(const HostTensorPtr& out, } Shape out_shape = Shape({static_cast(out_size)}); out->set_shape(out_shape); - runtime::reference::range(&start_val, &step_val, out_shape, out->get_data_ptr()); + runtime::reference::range( + &start_val, &step_val, shape_size(out_shape), out->get_data_ptr()); return true; } else diff --git a/ngraph/test/backend/range.in.cpp b/ngraph/test/backend/range.in.cpp index 8aa970796528bd..f6eabbfc33207c 100644 --- a/ngraph/test/backend/range.in.cpp +++ b/ngraph/test/backend/range.in.cpp @@ -16,16 +16,17 @@ #include "gtest/gtest.h" #include "ngraph/ngraph.hpp" -#include "ngraph/runtime/tensor.hpp" -#include "runtime/backend.hpp" -#include "util/all_close_f.hpp" +#include "util/engine/test_engines.hpp" +#include "util/test_case.hpp" #include "util/test_control.hpp" #include "util/test_tools.hpp" using namespace std; using namespace ngraph; +using namespace ngraph::test; static string s_manifest = "${MANIFEST}"; +using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); template struct RangeTest @@ -37,26 +38,94 @@ struct RangeTest std::vector expected_result; }; +// ------------------------------ V0 ------------------------------ + // TODO(amprocte): We should test this with more than just int32, but there is a bug in the // handling of element type-changing that is currently blocking doing that easily. -NGRAPH_TEST(${BACKEND_NAME}, range) +NGRAPH_TEST(${BACKEND_NAME}, range_v0_int32) { - // Create a graph for f(start,stop,step) = Range(start,stop,step). - auto start = make_shared(element::i32, Shape{}); - auto stop = make_shared(element::i32, Shape{}); - auto step = make_shared(element::i32, Shape{}); - - auto range = make_shared(start, stop, step); - ASSERT_TRUE(range->get_output_partial_shape(0).same_scheme(PartialShape::dynamic(1))); + element::Type_t et = element::i32; + std::vector> int32_tests = { + RangeTest{0, 10, 1, Shape{10}, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}}, + RangeTest{-5, 6, 3, Shape{4}, {-5, -2, 1, 4}}, + RangeTest{10, 5, -3, Shape{2}, {10, 7}}}; - auto f = make_shared(NodeVector{range}, ParameterVector{start, stop, step}); + for (auto& test : int32_tests) + { + // Create a graph for f(start,stop,step) = Range(start,stop,step). + auto start = make_shared(et, Shape{}, std::vector{test.start}); + auto stop = make_shared(et, Shape{}, std::vector{test.stop}); + auto step = make_shared(et, Shape{}, std::vector{test.step}); + auto range = make_shared(start, stop, step); + auto pshape_out = range->get_output_partial_shape(0); + ASSERT_TRUE(pshape_out.rank().is_static() && pshape_out.rank() == Dimension{1}); + auto f = make_shared(NodeVector{range}, ParameterVector{}); + + auto test_case = test::TestCase(f); + + test_case.add_expected_output(test.expected_result_shape, test.expected_result); + test_case.run(); + } +} - auto backend = runtime::Backend::create("${BACKEND_NAME}", true); +NGRAPH_TEST(${BACKEND_NAME}, range_v0_float32) +{ + element::Type_t et = element::f32; + std::vector> float32_tests = { + RangeTest{0, 1, 0.25, Shape{4}, {0.0f, 0.25f, 0.5f, 0.75f}}, + RangeTest{-1, + 0.875, + 0.2, + Shape{10}, + {-1.0f, -0.8f, -0.6f, -0.4f, -0.2f, 0.0f, 0.2f, 0.4f, 0.6f, 0.8f}}, + RangeTest{ + 2, 0, -0.25, Shape{8}, {2.0f, 1.75f, 1.5f, 1.25f, 1.0f, 0.75f, 0.5f, 0.25f}}}; + + for (auto& test : float32_tests) + { + // Create a graph for f(start,stop,step) = Range(start,stop,step). + auto start = make_shared(et, Shape{}, std::vector{test.start}); + auto stop = make_shared(et, Shape{}, std::vector{test.stop}); + auto step = make_shared(et, Shape{}, std::vector{test.step}); + auto range = make_shared(start, stop, step); + auto pshape_out = range->get_output_partial_shape(0); + ASSERT_TRUE(pshape_out.rank().is_static() && pshape_out.rank() == Dimension{1}); + auto f = make_shared(NodeVector{range}, ParameterVector{}); + + auto test_case = test::TestCase(f); + + test_case.add_expected_output(test.expected_result_shape, test.expected_result); + test_case.run_with_tolerance_as_fp(1.0e-4f); + } +} - auto ex = backend->compile(f); +// ------------------------------ V4 ------------------------------ - auto t_r = backend->create_dynamic_tensor(element::i32, PartialShape::dynamic()); +NGRAPH_TEST(${BACKEND_NAME}, range_v4_trunc_inputs) +{ + auto start = make_shared(element::f32, Shape{}); + auto stop = make_shared(element::f32, Shape{}); + auto step = make_shared(element::f32, Shape{}); + + auto range = make_shared(start, stop, step, element::i32); + auto f = make_shared(range, ParameterVector{start, stop, step}); + + std::vector start_vect{1.2}; + std::vector stop_vect{11.3}; + std::vector step_vect{1.6f}; + + auto test_case = test::TestCase(f); + test_case.add_input(Shape{}, start_vect); + test_case.add_input(Shape{}, stop_vect); + test_case.add_input(Shape{}, step_vect); + test_case.add_expected_output(Shape{10}, + std::vector{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}); + test_case.run(); +} +NGRAPH_TEST(${BACKEND_NAME}, range_v4_int32) +{ + element::Type_t et = element::i32; std::vector> int32_tests = { RangeTest{0, 10, 1, Shape{10}, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}}, RangeTest{-5, 6, 3, Shape{4}, {-5, -2, 1, 4}}, @@ -65,21 +134,48 @@ NGRAPH_TEST(${BACKEND_NAME}, range) for (auto& test : int32_tests) { - auto t_start = backend->create_tensor(element::i32, Shape{}); - auto t_stop = backend->create_tensor(element::i32, Shape{}); - auto t_step = backend->create_tensor(element::i32, Shape{}); - - copy_data(t_start, std::vector{test.start}); - copy_data(t_stop, std::vector{test.stop}); - copy_data(t_step, std::vector{test.step}); - - ex->call_with_validate({t_r}, {t_start, t_stop, t_step}); - - ASSERT_EQ(t_r->get_element_type(), element::i32); - ASSERT_EQ(t_r->get_shape(), test.expected_result_shape); - - auto results = read_vector(t_r); + auto start = make_shared(et, Shape{}, std::vector{test.start}); + auto stop = make_shared(et, Shape{}, std::vector{test.stop}); + auto step = make_shared(et, Shape{}, std::vector{test.step}); + auto range = make_shared(start, stop, step, et); + auto pshape_out = range->get_output_partial_shape(0); + ASSERT_TRUE(pshape_out.rank().is_static() && pshape_out.rank() == Dimension{1}); + auto f = make_shared(NodeVector{range}, ParameterVector{}); + + auto test_case = test::TestCase(f); + + test_case.add_expected_output(test.expected_result_shape, test.expected_result); + test_case.run(); + } +} - ASSERT_EQ(results, test.expected_result); +NGRAPH_TEST(${BACKEND_NAME}, range_v4_float32) +{ + element::Type_t et = element::f32; + std::vector> float32_tests = { + RangeTest{0, 1, 0.25, Shape{4}, {0.0f, 0.25f, 0.5f, 0.75f}}, + RangeTest{-1, + 0.875, + 0.2, + Shape{10}, + {-1.0f, -0.8f, -0.6f, -0.4f, -0.2f, 0.0f, 0.2f, 0.4f, 0.6f, 0.8f}}, + RangeTest{10, 0, 1, Shape{0}, {}}, + RangeTest{ + 2, 0, -0.25, Shape{8}, {2.0f, 1.75f, 1.5f, 1.25f, 1.0f, 0.75f, 0.5f, 0.25f}}}; + + for (auto& test : float32_tests) + { + auto start = make_shared(et, Shape{}, std::vector{test.start}); + auto stop = make_shared(et, Shape{}, std::vector{test.stop}); + auto step = make_shared(et, Shape{}, std::vector{test.step}); + auto range = make_shared(start, stop, step, et); + auto pshape_out = range->get_output_partial_shape(0); + ASSERT_TRUE(pshape_out.rank().is_static() && pshape_out.rank() == Dimension{1}); + auto f = make_shared(NodeVector{range}, ParameterVector{}); + + auto test_case = test::TestCase(f); + + test_case.add_expected_output(test.expected_result_shape, test.expected_result); + test_case.run_with_tolerance_as_fp(1.0e-4f); } } diff --git a/ngraph/test/runtime/ie/unit_test.manifest b/ngraph/test/runtime/ie/unit_test.manifest index b2893af79a014b..f61598ddada39e 100644 --- a/ngraph/test/runtime/ie/unit_test.manifest +++ b/ngraph/test/runtime/ie/unit_test.manifest @@ -671,9 +671,14 @@ relu_2Dbackprop relu_4Dbackprop # data [] doesn't exist -range parameter_as_output +# MKLDNNGraph::CreateGraph: No inputs for the topology +range_v0_int32 +range_v0_float32 +range_v4_int32 +range_v4_float32 + # Cannot cast ngraph node QuantizedDot to CNNLayer! quantized_dot_u8u8 quantized_dot_int32_output @@ -1144,6 +1149,9 @@ IE_CPU.nonmaxsuppression_two_classes # Bug in CPU plugin for ROIPooling when pooled size is 1x1 and method is bilinear IE_CPU.roi_pooling_1x1_bilinear +# Unsupported dynamic op +IE_CPU.range_v4_trunc_inputs + # output mismatch IE_CPU.gather_nd_batch_1d_from_3d_negative @@ -1513,3 +1521,4 @@ onnx_controlflow_loop_infinite # unsupported dynamic ops onnx_dyn_shapes_reduce_max_dynamic_input_rank_negative_axis +IE_GPU.range_v4_trunc_inputs diff --git a/ngraph/test/runtime/pass/dyn_elimination.cpp b/ngraph/test/runtime/pass/dyn_elimination.cpp index 0f82643a877519..791f3d24f94c97 100644 --- a/ngraph/test/runtime/pass/dyn_elimination.cpp +++ b/ngraph/test/runtime/pass/dyn_elimination.cpp @@ -49,7 +49,8 @@ std::shared_ptr make_range_replacement(const element::Type& et, NGRAPH_CHECK(start_vec.size() == 1 && step_vec.size() == 1); - runtime::reference::range(start_vec.data(), step_vec.data(), shape, elements.data()); + runtime::reference::range( + start_vec.data(), step_vec.data(), shape_size(shape), elements.data()); return make_shared(et, shape, elements); } diff --git a/ngraph/test/type_prop/range.cpp b/ngraph/test/type_prop/range.cpp index 5fcfc8e33682da..594e641e049330 100644 --- a/ngraph/test/type_prop/range.cpp +++ b/ngraph/test/type_prop/range.cpp @@ -21,6 +21,16 @@ using namespace std; using namespace ngraph; +struct RangeParams +{ + double start; + double stop; + double step; + PartialShape expected_shape; +}; + +// ------------------------------ V0 ------------------------------ + TEST(type_prop, range_nonconst_ok) { auto start = make_shared(element::i32, Shape{}); @@ -341,14 +351,6 @@ TEST(type_prop, range_all_const_zero_stride_fails) } } -struct RangeParams -{ - double start; - double stop; - double step; - PartialShape expected_shape; -}; - template void run_range_test(const element::Type& et, const RangeParams& params) { @@ -522,3 +524,557 @@ INSTANTIATE_TEST_CASE_P(type_prop, RangeParams{-1, 1, 0.25, PartialShape{8}}, RangeParams{-1, 0.875, 0.25, PartialShape{8}}), PrintToDummyParamName()); + +// ------------------------------ V4 ------------------------------ + +TEST(type_prop, range_v4_all_const_shape_inference) +{ + int num_elems = 100; + int step_val = 5; + int start_val = 0; + int stop_val = num_elems * step_val + start_val; + element::Type_t et = element::i32; + auto start = make_shared(et, Shape{}, std::vector{start_val}); + auto stop = make_shared(et, Shape{}, std::vector{stop_val}); + auto step = make_shared(et, Shape{}, std::vector{step_val}); + auto range = make_shared(start, stop, step, et); + auto pshape_out = range->get_output_partial_shape(0); + ASSERT_TRUE(pshape_out.rank().is_static() && pshape_out.rank() == Dimension{1}); + ASSERT_TRUE(pshape_out.same_scheme(PartialShape{Dimension{num_elems}})); +} + +TEST(type_prop, range_v4_some_const_shape_inference) +{ + int step_val = 5; + int start_val = 0; + element::Type_t et = element::i32; + auto start = make_shared(et, Shape{}, std::vector{start_val}); + auto stop = make_shared(et, Shape{}); + auto step = make_shared(et, Shape{}, std::vector{step_val}); + auto range = make_shared(start, stop, step, et); + auto pshape_out = range->get_output_partial_shape(0); + ASSERT_TRUE(pshape_out.rank().is_static() && pshape_out.rank() == Dimension{1}); + ASSERT_TRUE(pshape_out.same_scheme(PartialShape{Dimension::dynamic()})); +} + +TEST(type_prop, range_v4_trunc_inputs_shape_inference) +{ + element::Type_t et = element::f32; + auto start = make_shared(et, Shape{}, std::vector{0.9}); + auto stop = make_shared(et, Shape{}, std::vector{10.3}); + auto step = make_shared(et, Shape{}, std::vector{1.7}); + auto range = make_shared(start, stop, step, element::i32); + auto pshape_out = range->get_output_partial_shape(0); + ASSERT_TRUE(pshape_out.rank().is_static() && pshape_out.rank() == Dimension{1}); + ASSERT_TRUE(pshape_out.same_scheme(PartialShape{Dimension{10}})); +} + +TEST(type_prop, range_v4_invalid_inputs_elem_type) +{ + // invalid element type for start scalar + try + { + auto start = make_shared(element::boolean, Shape{}); + auto stop = make_shared(element::i32, Shape{}); + auto step = make_shared(element::i32, Shape{}); + auto range = make_shared(start, stop, step, element::i32); + FAIL() << "Exception expected"; + } + catch (ngraph::NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING(error.what(), + std::string("'start' input scalar should be a numeric type")); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } + + // invalid element type for stop scalar + try + { + auto start = make_shared(element::dynamic, Shape{}); + auto stop = make_shared(element::boolean, Shape{}); + auto step = make_shared(element::i32, Shape{}); + auto range = make_shared(start, stop, step, element::i32); + FAIL() << "Exception expected"; + } + catch (ngraph::NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING(error.what(), + std::string("'stop' input scalar should be a numeric type")); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } + + // invalid element type for step scalar + try + { + auto start = make_shared(element::i32, Shape{}); + auto stop = make_shared(element::undefined, Shape{}); + auto step = make_shared(element::boolean, Shape{}); + auto range = make_shared(start, stop, step, element::i32); + FAIL() << "Exception expected"; + } + catch (const ngraph::NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING(error.what(), + std::string("'step' input scalar should be a numeric type")); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } +} + +TEST(type_prop, range_v4_invalid_output_elem_type) +{ + try + { + auto start = make_shared(element::f16, Shape{1}); + auto stop = make_shared(element::f16, Shape{}); + auto step = make_shared(element::f16, Shape{}); + auto range = make_shared(start, stop, step, element::boolean); + } + catch (const ngraph::NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING(error.what(), + std::string("output tensor type should be a numeric type")); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } +} + +TEST(type_prop, range_v4_invalid_inputs_non_scalar) +{ + // start input not a scalar + try + { + auto start = make_shared(element::f32, Shape{1}); + auto stop = make_shared(element::f32, Shape{}); + auto step = make_shared(element::f32, Shape{}); + auto range = make_shared(start, stop, step, element::f32); + FAIL() << "Exception expected"; + } + catch (const ngraph::NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING(error.what(), std::string("'start' input is not a scalar")); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } + + // stop input not a scalar + try + { + auto start = make_shared(element::f32, Shape{}); + auto stop = make_shared(element::f32, PartialShape{Dimension::dynamic()}); + auto step = make_shared(element::f32, Shape{}); + auto range = make_shared(start, stop, step, element::f32); + FAIL() << "Exception expected"; + } + catch (const ngraph::NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING(error.what(), std::string("'stop' input is not a scalar")); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } + + // step input not a scalar + try + { + auto start = make_shared(element::f32, Shape{}); + auto stop = make_shared(element::f32, Shape{}); + auto step = make_shared(element::f32, PartialShape::dynamic(2)); + auto range = make_shared(start, stop, step, element::f32); + FAIL() << "Exception expected"; + } + catch (const ngraph::NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING(error.what(), std::string("'step' input is not a scalar")); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } +} + +TEST(type_prop, range_v4_invalid_inputs_plus_inf) +{ + // invalid start input scalar, +inf + try + { + auto start = make_shared( + element::f32, Shape{}, std::vector{std::numeric_limits::infinity()}); + auto stop = make_shared(element::f32, Shape{}); + auto step = make_shared(element::f32, Shape{}, std::vector{1}); + auto range = make_shared(start, stop, step, element::f32); + FAIL() << "+Infinity start not detected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING(error.what(), "'start' cannot be nan or infinite."); + } + catch (...) + { + FAIL() << "Test failed for unexpected reason"; + } + + // invalid stop input scalar, +inf + try + { + auto start = make_shared(element::f32, Shape{}); + auto stop = make_shared( + element::f32, Shape{}, std::vector{std::numeric_limits::infinity()}); + auto step = make_shared(element::f32, Shape{}, std::vector{1}); + auto range = make_shared(start, stop, step, element::f32); + FAIL() << "+Infinity stop not detected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING(error.what(), "'stop' cannot be nan or infinite."); + } + catch (...) + { + FAIL() << "Test failed for unexpected reason"; + } + + // invalid step input scalar, +inf + try + { + auto start = make_shared(element::f32, Shape{}, std::vector{3}); + auto stop = make_shared(element::f32, Shape{}); + auto step = make_shared( + element::f32, Shape{}, std::vector{std::numeric_limits::infinity()}); + auto range = make_shared(start, stop, step, element::f32); + FAIL() << "+Infinity step not detected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING(error.what(), "'step' cannot be nan or infinite."); + } + catch (...) + { + FAIL() << "Test failed for unexpected reason"; + } +} + +TEST(type_prop, range_v4_invalid_inputs_minus_inf) +{ + // invalid start input scalar, -inf + try + { + auto start = make_shared( + element::f32, Shape{}, std::vector{-std::numeric_limits::infinity()}); + auto stop = make_shared(element::f32, Shape{}); + auto step = make_shared(element::f32, Shape{}, std::vector{1}); + auto range = make_shared(start, stop, step, element::f32); + FAIL() << "-Infinity start not detected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING(error.what(), "'start' cannot be nan or infinite."); + } + catch (...) + { + FAIL() << "Test failed for unexpected reason"; + } + + // invalid stop input scalar, -inf + try + { + auto start = make_shared(element::f32, Shape{}); + auto stop = make_shared( + element::f32, Shape{}, std::vector{-std::numeric_limits::infinity()}); + auto step = make_shared(element::f32, Shape{}, std::vector{1}); + auto range = make_shared(start, stop, step, element::f32); + FAIL() << "-Infinity stop not detected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING(error.what(), "'stop' cannot be nan or infinite."); + } + catch (...) + { + FAIL() << "Test failed for unexpected reason"; + } + + // invalid step input scalar, -inf + try + { + auto start = make_shared(element::f32, Shape{}, std::vector{3}); + auto stop = make_shared(element::f32, Shape{}); + auto step = make_shared( + element::f32, Shape{}, std::vector{-std::numeric_limits::infinity()}); + auto range = make_shared(start, stop, step, element::f32); + FAIL() << "-Infinity step not detected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING(error.what(), "'step' cannot be nan or infinite."); + } + catch (...) + { + FAIL() << "Test failed for unexpected reason"; + } +} + +TEST(type_prop, range_v4_invalid_inputs_nan) +{ + // invalid start input scalar, nan + try + { + auto start = + make_shared(element::f32, Shape{}, std::vector{std::nanf("")}); + auto stop = make_shared(element::f32, Shape{}); + auto step = make_shared(element::f32, Shape{}, std::vector{1}); + auto range = make_shared(start, stop, step, element::f32); + FAIL() << "NaN start not detected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING(error.what(), "'start' cannot be nan or infinite."); + } + catch (...) + { + FAIL() << "Test failed for unexpected reason"; + } + + // invalid stop input scalar, nan + try + { + auto start = make_shared(element::f32, Shape{}); + auto stop = + make_shared(element::f32, Shape{}, std::vector{std::nanf("")}); + auto step = make_shared(element::f32, Shape{}, std::vector{1}); + auto range = make_shared(start, stop, step, element::f32); + FAIL() << "NaN stop not detected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING(error.what(), "'stop' cannot be nan or infinite."); + } + catch (...) + { + FAIL() << "Test failed for unexpected reason"; + } + + // invalid step input scalar, nan + try + { + auto start = make_shared(element::f32, Shape{}, std::vector{1}); + auto stop = make_shared(element::f32, Shape{}); + auto step = + make_shared(element::f32, Shape{}, std::vector{std::nanf("")}); + auto range = make_shared(start, stop, step, element::f32); + FAIL() << "NaN step not detected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING(error.what(), "'step' cannot be nan or infinite."); + } + catch (...) + { + FAIL() << "Test failed for unexpected reason"; + } +} + +TEST(type_prop, range_v4_zero_output_elem_pos_step) +{ + auto start = make_shared(element::f32, Shape{}, std::vector{5}); + auto stop = make_shared(element::f32, Shape{}, std::vector{1}); + auto step = make_shared(element::f32, Shape{}, std::vector{1}); + auto range = make_shared(start, stop, step, element::f32); + // if step is positive and start >= stop, number of output elements is zero + ASSERT_TRUE(range->get_output_partial_shape(0).same_scheme(PartialShape{Dimension(0)})); +} + +TEST(type_prop, range_v4_zero_output_elem_neg_step) +{ + auto start = make_shared(element::f32, Shape{}, std::vector{1}); + auto stop = make_shared(element::f32, Shape{}, std::vector{5}); + auto step = make_shared(element::f32, Shape{}, std::vector{-1}); + auto range = make_shared(start, stop, step, element::f32); + // if step is negative and start <= stop, number of output elements is zero + ASSERT_TRUE(range->get_output_partial_shape(0).same_scheme(PartialShape{Dimension(0)})); +} + +template +void run_range_v4_test(const element::Type& et, const RangeParams& params) +{ + auto start = + make_shared(et, Shape{}, std::vector{static_cast(params.start)}); + auto stop = make_shared(et, Shape{}, std::vector{static_cast(params.stop)}); + auto step = make_shared(et, Shape{}, std::vector{static_cast(params.step)}); + + auto range = make_shared(start, stop, step, et); + + EXPECT_TRUE(range->get_output_partial_shape(0).same_scheme(params.expected_shape)) + << "Expected shape " << params.expected_shape << " but got " + << range->get_output_partial_shape(0); +} + +struct RangeNumpyTest : ::testing::TestWithParam +{ +}; + +TEST_P(RangeNumpyTest, deduce_shape_i8) +{ + run_range_v4_test(element::i8, GetParam()); +} + +TEST_P(RangeNumpyTest, deduce_shape_i16) +{ + run_range_v4_test(element::i16, GetParam()); +} + +TEST_P(RangeNumpyTest, deduce_shape_i32) +{ + run_range_v4_test(element::i32, GetParam()); +} + +TEST_P(RangeNumpyTest, deduce_shape_i64) +{ + run_range_v4_test(element::i64, GetParam()); +} + +TEST_P(RangeNumpyTest, deduce_shape_u8) +{ + run_range_v4_test(element::u8, GetParam()); +} + +TEST_P(RangeNumpyTest, deduce_shape_u16) +{ + run_range_v4_test(element::u16, GetParam()); +} + +TEST_P(RangeNumpyTest, deduce_shape_u32) +{ + run_range_v4_test(element::u32, GetParam()); +} + +TEST_P(RangeNumpyTest, deduce_shape_u64) +{ + run_range_v4_test(element::u64, GetParam()); +} + +TEST_P(RangeNumpyTest, deduce_shape_bf16) +{ + run_range_v4_test(element::bf16, GetParam()); +} + +TEST_P(RangeNumpyTest, deduce_shape_f16) +{ + run_range_v4_test(element::f16, GetParam()); +} + +TEST_P(RangeNumpyTest, deduce_shape_f32) +{ + run_range_v4_test(element::f32, GetParam()); +} + +TEST_P(RangeNumpyTest, deduce_shape_f64) +{ + run_range_v4_test(element::f64, GetParam()); +} + +INSTANTIATE_TEST_CASE_P(type_prop, + RangeNumpyTest, + ::testing::Values(RangeParams{0, 5, 1, PartialShape{5}}, + RangeParams{0, 22, 2, PartialShape{11}}, + RangeParams{1, 23, 2, PartialShape{11}}, + RangeParams{1, 22, 2, PartialShape{11}}, + RangeParams{0, 0, 1, PartialShape{0}}, + RangeParams{1, 0, 2, PartialShape{0}}), + PrintToDummyParamName()); + +struct RangeNumpyTestWithNegatives : ::testing::TestWithParam +{ +}; + +TEST_P(RangeNumpyTestWithNegatives, deduce_shape_i8) +{ + run_range_v4_test(element::i8, GetParam()); +} + +TEST_P(RangeNumpyTestWithNegatives, deduce_shape_i16) +{ + run_range_v4_test(element::i16, GetParam()); +} + +TEST_P(RangeNumpyTestWithNegatives, deduce_shape_i32) +{ + run_range_v4_test(element::i32, GetParam()); +} + +TEST_P(RangeNumpyTestWithNegatives, deduce_shape_i64) +{ + run_range_v4_test(element::i64, GetParam()); +} + +TEST_P(RangeNumpyTestWithNegatives, deduce_shape_bf16) +{ + run_range_v4_test(element::bf16, GetParam()); +} + +TEST_P(RangeNumpyTestWithNegatives, deduce_shape_f16) +{ + run_range_v4_test(element::f16, GetParam()); +} + +TEST_P(RangeNumpyTestWithNegatives, deduce_shape_f32) +{ + run_range_v4_test(element::f32, GetParam()); +} + +TEST_P(RangeNumpyTestWithNegatives, deduce_shape_f64) +{ + run_range_v4_test(element::f64, GetParam()); +} + +INSTANTIATE_TEST_CASE_P(type_prop, + RangeNumpyTestWithNegatives, + ::testing::Values(RangeParams{2, 0, -2, PartialShape{1}}, + RangeParams{2, 0, -1, PartialShape{2}}, + RangeParams{-19, 19, 1, PartialShape{38}}, + RangeParams{-19, 19, 3, PartialShape{13}}, + RangeParams{20, -19, 1, PartialShape{0}}), + PrintToDummyParamName()); + +struct RangeNumpyTestFloating : ::testing::TestWithParam +{ +}; + +TEST_P(RangeNumpyTestFloating, deduce_shape_bf16) +{ + run_range_v4_test(element::bf16, GetParam()); +} + +TEST_P(RangeNumpyTestFloating, deduce_shape_f16) +{ + run_range_v4_test(element::f16, GetParam()); +} + +TEST_P(RangeNumpyTestFloating, deduce_shape_f32) +{ + run_range_v4_test(element::f32, GetParam()); +} + +TEST_P(RangeNumpyTestFloating, deduce_shape_f64) +{ + run_range_v4_test(element::f64, GetParam()); +} + +INSTANTIATE_TEST_CASE_P(type_prop, + RangeNumpyTestFloating, + ::testing::Values(RangeParams{0, 1, 0.25, PartialShape{4}}, + RangeParams{-1, 1, 0.25, PartialShape{8}}, + RangeParams{-1, 0.875, 0.25, PartialShape{8}}), + PrintToDummyParamName()); From 8b90c9e7e2d7ce892c5e2905f65c1129e20bb2c9 Mon Sep 17 00:00:00 2001 From: Mateusz Tabaka Date: Tue, 8 Dec 2020 14:53:24 +0100 Subject: [PATCH 028/244] [ONNX] Set defaults in LSTMSequence even if dimensions are dynamic (#3491) Ticket: 43221 --- ngraph/frontend/onnx_import/src/op/lstm.cpp | 193 ++++--------- .../lstm_dyn_batch_seq_3_inputs.prototxt | 185 ++++++++++++ ...tm_dynamic_batch_size_and_seq_len.prototxt | 269 ++++++++++++++++++ ngraph/test/onnx/onnx_import_rnn.in.cpp | 38 +++ 4 files changed, 551 insertions(+), 134 deletions(-) create mode 100644 ngraph/test/models/onnx/dynamic_shapes/lstm_dyn_batch_seq_3_inputs.prototxt create mode 100644 ngraph/test/models/onnx/lstm_dynamic_batch_size_and_seq_len.prototxt diff --git a/ngraph/frontend/onnx_import/src/op/lstm.cpp b/ngraph/frontend/onnx_import/src/op/lstm.cpp index c67b260e78c16e..7b76a1f0eb3def 100644 --- a/ngraph/frontend/onnx_import/src/op/lstm.cpp +++ b/ngraph/frontend/onnx_import/src/op/lstm.cpp @@ -60,62 +60,8 @@ namespace ngraph LSTM_INPUT_P }; - enum class LSTMInputDimension - { - BATCH_SIZE, - SEQ_LENGTH, - NUM_DIRECTIONS, - HIDDEN_SIZE, - }; - struct LSTMNgInputMap { - // Check if input shape dimension at dimension_index is static - bool check_static_input_dim(LSTMInput input, const size_t dimension_index) - { - return m_input_map[input].get_partial_shape().rank().is_static() && - m_input_map[input].get_partial_shape().rank().get_length() > - dimension_index && - m_input_map[input].get_partial_shape()[dimension_index].is_static(); - } - - // Validate and handle dimensions required to create default inputs - void init_dim_map() - { - // batch_size - if (check_static_input_dim(LSTMInput::LSTM_INPUT_X, 0)) - { - m_dim_map[LSTMInputDimension::BATCH_SIZE] = - m_input_map[LSTMInput::LSTM_INPUT_X] - .get_partial_shape()[0] - .get_length(); - } - // seq_length - if (check_static_input_dim(LSTMInput::LSTM_INPUT_X, 1)) - { - m_dim_map[LSTMInputDimension::SEQ_LENGTH] = - m_input_map[LSTMInput::LSTM_INPUT_X] - .get_partial_shape()[1] - .get_length(); - } - // num_directions - if (check_static_input_dim(LSTMInput::LSTM_INPUT_R, 0)) - { - m_dim_map[LSTMInputDimension::NUM_DIRECTIONS] = - m_input_map[LSTMInput::LSTM_INPUT_R] - .get_partial_shape()[0] - .get_length(); - } - // hidden_size - if (check_static_input_dim(LSTMInput::LSTM_INPUT_R, 2)) - { - m_dim_map[LSTMInputDimension::HIDDEN_SIZE] = - m_input_map[LSTMInput::LSTM_INPUT_R] - .get_partial_shape()[2] - .get_length(); - } - } - explicit LSTMNgInputMap(const Node& node) { const auto& ng_inputs = node.get_ng_inputs(); @@ -150,7 +96,29 @@ namespace ngraph 1); // Get dimensions needed for default inputs creation - init_dim_map(); + auto shape_of_x = std::make_shared( + m_input_map[LSTMInput::LSTM_INPUT_X]); + auto axes = + default_opset::Constant::create(element::Type_t::i32, Shape{1}, {0}); + auto batch_size_node = std::make_shared( + shape_of_x, + default_opset::Constant::create(element::Type_t::i32, Shape{1}, {0}), + axes); + auto seq_length_node = std::make_shared( + shape_of_x, + default_opset::Constant::create(element::Type_t::i32, Shape{1}, {1}), + axes); + + auto shape_of_r = std::make_shared( + m_input_map[LSTMInput::LSTM_INPUT_R]); + auto num_directions_node = std::make_shared( + shape_of_r, + default_opset::Constant::create(element::Type_t::i32, Shape{1}, {0}), + axes); + auto hidden_size_node = std::make_shared( + shape_of_r, + default_opset::Constant::create(element::Type_t::i32, Shape{1}, {2}), + axes); // ------ Optional inputs ------ // `B` - The bias tensor for input gate. @@ -174,23 +142,20 @@ namespace ngraph } else { - NGRAPH_CHECK(m_dim_map.count(LSTMInputDimension::NUM_DIRECTIONS) && - m_dim_map.count(LSTMInputDimension::HIDDEN_SIZE), - "ONNX LSTM: Can't create default `B` input, " - "because at least one of required dimensions " - "(num_directions, hidden_size) is dynamic. " - "\n`R` input onnx shape {num_directions, " - "gates_count*hidden_size, hidden_size}: ", - ng_inputs.at(2).get_partial_shape()); - - m_input_map[LSTMInput::LSTM_INPUT_B] = default_opset::Constant::create( - m_input_map[LSTMInput::LSTM_INPUT_X].get_element_type(), - Shape{m_dim_map[LSTMInputDimension::NUM_DIRECTIONS], - gates_count * m_dim_map[LSTMInputDimension::HIDDEN_SIZE]}, - std::vector(m_dim_map[LSTMInputDimension::NUM_DIRECTIONS] * - gates_count * - m_dim_map[LSTMInputDimension::HIDDEN_SIZE], - 0.f)); + auto b_shape = std::make_shared( + OutputVector{num_directions_node, + std::make_shared( + default_opset::Constant::create( + element::Type_t::i64, Shape{1}, {gates_count}), + hidden_size_node)}, + 0); + m_input_map[LSTMInput::LSTM_INPUT_B] = + std::make_shared( + default_opset::Constant::create( + m_input_map[LSTMInput::LSTM_INPUT_X].get_element_type(), + Shape{}, + {0}), + b_shape); } // `sequence_lens`- The lengths of the sequences in a batch. // Shape: [batch_size] @@ -200,22 +165,9 @@ namespace ngraph } else { - NGRAPH_CHECK( - m_dim_map.count(LSTMInputDimension::BATCH_SIZE) && - m_dim_map.count(LSTMInputDimension::SEQ_LENGTH), - "ONNX LSTM: Can't create default `sequence_lens` input, ", - "because at least one of required dimensions " - "(batch_size, seq_length) is dynamic. " - "\n`X` input onnx shape {seq_length, batch_size, input_size} is ", - ng_inputs.at(0).get_partial_shape()); - m_input_map[LSTMInput::LSTM_INPUT_SEQ_LENGTHS] = - default_opset::Constant::create( - element::i32, - Shape{m_dim_map[LSTMInputDimension::BATCH_SIZE]}, - std::vector( - m_dim_map[LSTMInputDimension::BATCH_SIZE], - m_dim_map[LSTMInputDimension::SEQ_LENGTH])); + std::make_shared(seq_length_node, + batch_size_node); } // `initial_h` - The initial value of the hidden. // ONNX Shape: [num_directions, batch_size, hidden_size] @@ -227,30 +179,17 @@ namespace ngraph } else { - NGRAPH_CHECK( - m_dim_map.count(LSTMInputDimension::BATCH_SIZE) && - m_dim_map.count(LSTMInputDimension::NUM_DIRECTIONS) && - m_dim_map.count(LSTMInputDimension::HIDDEN_SIZE), - "ONNX LSTM: Can't create default `initial_h` input, " - "because at least one of required dimensions " - "(batch_size, num_directions, hidden_size) is dynamic. " - "\n`X` input onnx shape {seq_length, batch_size, input_size} is ", - ng_inputs.at(0).get_partial_shape(), - "\n`R` input onnx shape {num_directions, 4*hidden_size, " - "hidden_size} is ", - ng_inputs.at(2).get_partial_shape()); - + auto init_h_shape = std::make_shared( + OutputVector{ + batch_size_node, num_directions_node, hidden_size_node}, + 0); m_input_map[LSTMInput::LSTM_INPUT_INIT_H] = - default_opset::Constant::create( - m_input_map[LSTMInput::LSTM_INPUT_X].get_element_type(), - Shape{m_dim_map[LSTMInputDimension::BATCH_SIZE], - m_dim_map[LSTMInputDimension::NUM_DIRECTIONS], - m_dim_map[LSTMInputDimension::HIDDEN_SIZE]}, - std::vector( - m_dim_map[LSTMInputDimension::BATCH_SIZE] * - m_dim_map[LSTMInputDimension::NUM_DIRECTIONS] * - m_dim_map[LSTMInputDimension::HIDDEN_SIZE], - 0.f)); + std::make_shared( + default_opset::Constant::create( + m_input_map[LSTMInput::LSTM_INPUT_X].get_element_type(), + Shape{}, + {0}), + init_h_shape); } // `initial_c` - The initial value of the cell. // ONNX Shape: [num_directions, batch_size, hidden_size] @@ -262,30 +201,17 @@ namespace ngraph } else { - NGRAPH_CHECK( - m_dim_map.count(LSTMInputDimension::BATCH_SIZE) && - m_dim_map.count(LSTMInputDimension::NUM_DIRECTIONS) && - m_dim_map.count(LSTMInputDimension::HIDDEN_SIZE), - "ONNX LSTM: Can't create default `initial_c` input, " - "because at least one of required dimensions " - "(batch_size, num_directions, hidden_size) is dynamic. " - "\n`X` input onnx shape {seq_length, batch_size, input_size} is ", - ng_inputs.at(0).get_partial_shape(), - "\n`R` input onnx shape {num_directions, 4*hidden_size, " - "hidden_size} is ", - ng_inputs.at(2).get_partial_shape()); - + auto init_c_shape = std::make_shared( + OutputVector{ + batch_size_node, num_directions_node, hidden_size_node}, + 0); m_input_map[LSTMInput::LSTM_INPUT_INIT_C] = - default_opset::Constant::create( - m_input_map[LSTMInput::LSTM_INPUT_X].get_element_type(), - Shape{m_dim_map[LSTMInputDimension::BATCH_SIZE], - m_dim_map[LSTMInputDimension::NUM_DIRECTIONS], - m_dim_map[LSTMInputDimension::HIDDEN_SIZE]}, - std::vector( - m_dim_map[LSTMInputDimension::BATCH_SIZE] * - m_dim_map[LSTMInputDimension::NUM_DIRECTIONS] * - m_dim_map[LSTMInputDimension::HIDDEN_SIZE], - 0.f)); + std::make_shared( + default_opset::Constant::create( + m_input_map[LSTMInput::LSTM_INPUT_X].get_element_type(), + Shape{}, + {0}), + init_c_shape); } // `P` - The weight tensor for peepholes. // Peepholes input is not supported by OpenVino @@ -299,7 +225,6 @@ namespace ngraph Output& at(const LSTMInput& key) { return m_input_map.at(key); } std::map> m_input_map; - std::map m_dim_map; }; // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ATTRIBUTES PARSING ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/ngraph/test/models/onnx/dynamic_shapes/lstm_dyn_batch_seq_3_inputs.prototxt b/ngraph/test/models/onnx/dynamic_shapes/lstm_dyn_batch_seq_3_inputs.prototxt new file mode 100644 index 00000000000000..3dc8eba455b0ab --- /dev/null +++ b/ngraph/test/models/onnx/dynamic_shapes/lstm_dyn_batch_seq_3_inputs.prototxt @@ -0,0 +1,185 @@ +ir_version: 7 +producer_name: "onnx-importer-test" +graph { + node { + output: "W" + op_type: "Constant" + attribute { + name: "value" + t { + dims: 1 + dims: 12 + dims: 1 + data_type: 1 + float_data: 0.31403765082359314 + float_data: -0.16793324053287506 + float_data: 1.3882579803466797 + float_data: -0.690295398235321 + float_data: -0.39940449595451355 + float_data: -0.7833511233329773 + float_data: -0.30992957949638367 + float_data: 0.35575729608535767 + float_data: -0.46826308965682983 + float_data: 1.1741459369659424 + float_data: -2.4147889614105225 + float_data: -0.42783254384994507 + name: "const_tensor_W" + } + type: TENSOR + } + } + node { + output: "R" + op_type: "Constant" + attribute { + name: "value" + t { + dims: 1 + dims: 12 + dims: 3 + data_type: 1 + float_data: 0.8490582704544067 + float_data: 0.45121243596076965 + float_data: -1.179901361465454 + float_data: 0.13536448776721954 + float_data: 0.813286542892456 + float_data: 0.6017516255378723 + float_data: 0.4847572445869446 + float_data: -1.2136037349700928 + float_data: 0.16383321583271027 + float_data: 1.5106260776519775 + float_data: 1.1177502870559692 + float_data: 0.2358246147632599 + float_data: 0.8490582704544067 + float_data: 0.45121243596076965 + float_data: -1.179901361465454 + float_data: 0.13536448776721954 + float_data: 0.813286542892456 + float_data: 0.6017516255378723 + float_data: 0.4847572445869446 + float_data: -1.2136037349700928 + float_data: 0.16383321583271027 + float_data: 1.5106260776519775 + float_data: 1.1177502870559692 + float_data: 0.2358246147632599 + float_data: 0.8490582704544067 + float_data: 0.45121243596076965 + float_data: -1.179901361465454 + float_data: 0.13536448776721954 + float_data: 0.813286542892456 + float_data: 0.6017516255378723 + float_data: 0.4847572445869446 + float_data: -1.2136037349700928 + float_data: 0.16383321583271027 + float_data: 1.5106260776519775 + float_data: 1.1177502870559692 + float_data: 0.2358246147632599 + name: "const_tensor" + } + type: TENSOR + } + } + node { + input: "X" + input: "W" + input: "R" + output: "Y" + output: "Y_h" + output: "Y_c" + op_type: "LSTM" + attribute { + name: "direction" + s: "forward" + type: STRING + } + attribute { + name: "hidden_size" + i: 3 + type: INT + } + } + name: "test-model-lstm" + input { + name: "X" + type { + tensor_type { + elem_type: 1 + shape { + dim { + dim_value: -1 + } + dim { + dim_value: -1 + } + dim { + dim_value: 1 + } + } + } + } + } + output { + name: "Y" + type { + tensor_type { + elem_type: 1 + shape { + dim { + dim_value: -1 + } + dim { + dim_value: 1 + } + dim { + dim_value: -1 + } + dim { + dim_value: 3 + } + } + } + } + } + output { + name: "Y_h" + type { + tensor_type { + elem_type: 1 + shape { + dim { + dim_value: 1 + } + dim { + dim_value: -1 + } + dim { + dim_value: 3 + } + } + } + } + } + output { + name: "Y_c" + type { + tensor_type { + elem_type: 1 + shape { + dim { + dim_value: 1 + } + dim { + dim_value: -1 + } + dim { + dim_value: 3 + } + } + } + } + } +} +opset_import { + domain: "" + version: 12 +} diff --git a/ngraph/test/models/onnx/lstm_dynamic_batch_size_and_seq_len.prototxt b/ngraph/test/models/onnx/lstm_dynamic_batch_size_and_seq_len.prototxt new file mode 100644 index 00000000000000..479822f559f9d9 --- /dev/null +++ b/ngraph/test/models/onnx/lstm_dynamic_batch_size_and_seq_len.prototxt @@ -0,0 +1,269 @@ +ir_version: 7 +producer_name: "onnx-importer-test" +graph { + node { + input: "A" + output: "shape" + op_type: "Shape" + } + node { + output: "zero" + op_type: "Constant" + attribute { + name: "value" + t { + dims: 1 + data_type: 7 + int64_data: 0 + } + type: TENSOR + } + } + node { + output: "one" + op_type: "Constant" + attribute { + name: "value" + t { + dims: 1 + data_type: 7 + int64_data: 1 + } + type: TENSOR + } + } + node { + input: "shape" + input: "one" + output: "mul" + op_type: "Mul" + } + node { + input: "mul" + output: "constantofshape" + op_type: "ConstantOfShape" + attribute { + name: "value" + t { + dims: 1 + data_type: 1 + float_data: 1 + } + type: TENSOR + } + } + node { + input: "constantofshape" + input: "A" + output: "conv" + op_type: "Conv" + } + node { + input: "conv" + output: "transposed" + op_type: "Transpose" + attribute { + name: "perm" + ints: 2 + ints: 0 + ints: 1 + type: INTS + } + } + node { + input: "shape" + input: "zero" + output: "batch_size" + op_type: "Gather" + attribute { + name: "axis" + i: 0 + type: INT + } + } + node { + output: "hidden_size" + op_type: "Constant" + attribute { + name: "value" + t { + dims: 1 + data_type: 7 + int64_data: 2 + } + type: TENSOR + } + } + node { + input: "one" + input: "batch_size" + input: "hidden_size" + output: "concat" + op_type: "Concat" + attribute { + name: "axis" + i: 0 + type: INT + } + } + node { + input: "concat" + output: "initial_hc" + op_type: "ConstantOfShape" + attribute { + name: "value" + t { + dims: 1 + data_type: 1 + float_data: 0 + } + type: TENSOR + } + } + node { + output: "W" + op_type: "Constant" + attribute { + name: "value" + t { + dims: 1 + dims: 8 + dims: 3 + data_type: 1 + float_data: 4.0 + } + type: TENSOR + } + } + node { + output: "R" + op_type: "Constant" + attribute { + name: "value" + t { + dims: 1 + dims: 8 + dims: 2 + data_type: 1 + float_data: 2.0 + } + type: TENSOR + } + } + node { + output: "B" + op_type: "Constant" + attribute { + name: "value" + t { + dims: 1 + dims: 16 + data_type: 1 + float_data: 3.0 + } + type: TENSOR + } + } + node { + input: "transposed" + input: "W" + input: "R" + input: "B" + input: "" + input: "initial_hc" + input: "initial_hc" + output: "Y" + output: "Y_h" + output: "Y_c" + op_type: "LSTM" + attribute { + name: "hidden_size" + i: 2 + type: INT + } + } + name: "test-model-lstm" + input { + name: "A" + type { + tensor_type { + elem_type: 1 + shape { + dim { + dim_value: 3 + } + dim { + dim_value: 2 + } + dim { + dim_value: 1 + } + } + } + } + } + output { + name: "Y" + type { + tensor_type { + elem_type: 1 + shape { + dim { + dim_value: 1 + } + dim { + dim_value: 1 + } + dim { + dim_value: 3 + } + dim { + dim_value: 2 + } + } + } + } + } + output { + name: "Y_h" + type { + tensor_type { + elem_type: 1 + shape { + dim { + dim_value: 1 + } + dim { + dim_value: 3 + } + dim { + dim_value: 2 + } + } + } + } + } + output { + name: "Y_c" + type { + tensor_type { + elem_type: 1 + shape { + dim { + dim_value: 1 + } + dim { + dim_value: 3 + } + dim { + dim_value: 2 + } + } + } + } + } +} +opset_import { + domain: "" + version: 12 +} diff --git a/ngraph/test/onnx/onnx_import_rnn.in.cpp b/ngraph/test/onnx/onnx_import_rnn.in.cpp index 12d662f23c39e3..8cb27db4d77bf9 100644 --- a/ngraph/test/onnx/onnx_import_rnn.in.cpp +++ b/ngraph/test/onnx/onnx_import_rnn.in.cpp @@ -566,6 +566,44 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_import_only_lstm_dynamic_batch_seq_all_i EXPECT_EQ(count_ops_of_type(function), 1); } +NGRAPH_TEST(${BACKEND_NAME}, onnx_model_import_only_lstm_dynamic_batch_seq_3_inputs) +{ + auto function = onnx_import::import_onnx_model(file_util::path_join( + SERIALIZED_ZOO, "onnx/dynamic_shapes/lstm_dyn_batch_seq_3_inputs.prototxt")); + + auto batch_size = Dimension::dynamic(); + auto seq_length = Dimension::dynamic(); + int64_t hidden_size = 3; + int64_t num_directions = 1; + auto Y_expected_output = PartialShape{batch_size, num_directions, seq_length, hidden_size}; + auto Y_h_expected_output = PartialShape{num_directions, batch_size, hidden_size}; + auto Y_c_expected_output = PartialShape{num_directions, batch_size, hidden_size}; + + EXPECT_EQ(function->get_output_size(), 3); + EXPECT_EQ(function->get_output_partial_shape(0), Y_expected_output); + EXPECT_EQ(function->get_output_partial_shape(1), Y_h_expected_output); + EXPECT_EQ(function->get_output_partial_shape(2), Y_c_expected_output); + + EXPECT_EQ(count_ops_of_type(function), 1); +} + +NGRAPH_TEST(${BACKEND_NAME}, onnx_model_lstm_dynamic_batch_size_and_seq_len) +{ + auto function = onnx_import::import_onnx_model( + file_util::path_join(SERIALIZED_ZOO, "onnx/lstm_dynamic_batch_size_and_seq_len.prototxt")); + + auto test_case = test::TestCase(function); + test_case.add_input({1, 2, 3, 4, 5, 6}); + + test_case.add_expected_output( + Shape{1, 1, 3, 2}, {0.761594, 0.761594, 0.761594, 0.761594, 0.761594, 0.761594}); // Y + test_case.add_expected_output( + Shape{1, 3, 2}, {0.761594, 0.761594, 0.761594, 0.761594, 0.761594, 0.761594}); // Y_c + test_case.add_expected_output(Shape{1, 3, 2}, {1, 1, 1, 1, 1, 1}); // Y_h + + test_case.run(DEFAULT_FLOAT_TOLERANCE_BITS + 1); +} + // RNNLikeSequenceOp test fixture for test setup reuse class GRUSequenceOp : public testing::Test { From 2aec8a610b185d22712b2987724e9b642842d326 Mon Sep 17 00:00:00 2001 From: Maksim Makridin Date: Tue, 8 Dec 2020 22:54:00 +0300 Subject: [PATCH 029/244] Adding Hello Reshape Python sample (#3375) * Initialized hello_reshape_ssd Python sample * * removed multiple input images functionality * added couple of checks whether input topology is supported in sample * Added readme * Switched to single-quotes strings style * Switched to f-strings * Removed redundant code * Simplified image original resolution handling * Simplified some checks and assertions * Simplified reading inference results and drawing bounding boxes --- .../python/sample/hello_reshape_ssd/README.md | 30 ++++ .../hello_reshape_ssd/hello_reshape_ssd.py | 169 ++++++++++++++++++ 2 files changed, 199 insertions(+) create mode 100644 inference-engine/ie_bridges/python/sample/hello_reshape_ssd/README.md create mode 100644 inference-engine/ie_bridges/python/sample/hello_reshape_ssd/hello_reshape_ssd.py diff --git a/inference-engine/ie_bridges/python/sample/hello_reshape_ssd/README.md b/inference-engine/ie_bridges/python/sample/hello_reshape_ssd/README.md new file mode 100644 index 00000000000000..b08704bede0e14 --- /dev/null +++ b/inference-engine/ie_bridges/python/sample/hello_reshape_ssd/README.md @@ -0,0 +1,30 @@ +# Hello Reshape SSD C++ Sample {#openvino_inference_engine_samples_hello_reshape_ssd_README} + +This topic demonstrates how to run the Hello Reshape SSD application, which does inference using object detection +networks like SSD-VGG. The sample shows how to use [Shape Inference feature](../../../docs/IE_DG/ShapeInference.md). + +> **NOTE**: By default, Inference Engine samples and demos expect input with BGR channels order. If you trained your model to work with RGB order, you need to manually rearrange the default channels order in the sample or demo application or reconvert your model using the Model Optimizer tool with `--reverse_input_channels` argument specified. For more information about the argument, refer to **When to Reverse Input Channels** section of [Converting a Model Using General Conversion Parameters](../../../docs/MO_DG/prepare_model/convert_model/Converting_Model_General.md). + +## Running + +To run the sample, you can use public or pre-trained models. To download the pre-trained models, use the OpenVINO [Model Downloader](@ref omz_tools_downloader_README) or go to [https://download.01.org/opencv/](https://download.01.org/opencv/). + +> **NOTE**: Before running the sample with a trained model, make sure the model is converted to the Inference Engine format (\*.xml + \*.bin) using the [Model Optimizer tool](../../../docs/MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md). +> +> The sample accepts models in ONNX format (.onnx) that do not require preprocessing. + +You can use the following command to do inference on CPU of an image using a trained SSD network: +```sh +python3 ./hello_reshape_ssd.py -m /ssd_300.xml -i /500x500.bmp -d CPU +``` + +## Sample Output + +The application renders an image with detected objects enclosed in rectangles. It outputs the list of classes +of the detected objects along with the respective confidence values and the coordinates of the +rectangles to the standard output stream. + +## See Also +* [Using Inference Engine Samples](../../../docs/IE_DG/Samples_Overview.md) +* [Model Downloader](@ref omz_tools_downloader_README) +* [Model Optimizer](../../../docs/MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md) diff --git a/inference-engine/ie_bridges/python/sample/hello_reshape_ssd/hello_reshape_ssd.py b/inference-engine/ie_bridges/python/sample/hello_reshape_ssd/hello_reshape_ssd.py new file mode 100644 index 00000000000000..47679011953b4f --- /dev/null +++ b/inference-engine/ie_bridges/python/sample/hello_reshape_ssd/hello_reshape_ssd.py @@ -0,0 +1,169 @@ +#!/usr/bin/env python +''' + Copyright (c) 2018 Intel Corporation + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +''' +from __future__ import print_function +from argparse import ArgumentParser, SUPPRESS +import logging as log +import os +import sys + +import cv2 +import ngraph as ng +import numpy as np +from openvino.inference_engine import IECore + +def build_argparser(): + parser = ArgumentParser(add_help=False) + args = parser.add_argument_group('Options') + args.add_argument('-h', '--help', action='help', default=SUPPRESS, help='Show this help message and exit.') + args.add_argument('-m', '--model', help='Required. Path to an .xml or .onnx file with a trained model.', + required=True, type=str) + args.add_argument('-i', '--input', help='Required. Path to an image file.', + required=True, type=str) + args.add_argument('-d', '--device', + help='Optional. Specify the target device to infer on; ' + 'CPU, GPU, FPGA or MYRIAD is acceptable. ' + 'Sample will look for a suitable plugin for device specified (CPU by default)', + default='CPU', type=str) + return parser + + +def main(): + log.basicConfig(format='[ %(levelname)s ] %(message)s', level=log.INFO, stream=sys.stdout) + args = build_argparser().parse_args() + log.info('Loading Inference Engine') + ie = IECore() + + # ---1. Read a model in OpenVINO Intermediate Representation (.xml and .bin files) or ONNX (.onnx file) format --- + model = args.model + log.info(f'Loading network:') + log.info(f' {model}') + net = ie.read_network(model=model) + # ----------------------------------------------------------------------------------------------------- + + # ------------- 2. Load Plugin for inference engine and extensions library if specified -------------- + log.info('Device info:') + versions = ie.get_versions(args.device) + log.info(f' {args.device}') + log.info(f' MKLDNNPlugin version ......... {versions[args.device].major}.{versions[args.device].minor}') + log.info(f' Build ........... {versions[args.device].build_number}') + # ----------------------------------------------------------------------------------------------------- + + # --------------------------- 3. Read and preprocess input -------------------------------------------- + + log.info(f'Inputs number: {len(net.input_info.keys())}') + assert len(net.input_info.keys()) == 1, 'Sample supports clean SSD network with one input' + assert len(net.outputs.keys()) == 1, 'Sample supports clean SSD network with one output' + input_name = list(net.input_info.keys())[0] + input_info = net.input_info[input_name] + supported_input_dims = 4 # Supported input layout - NHWC + + log.info(f' Input name: {input_name}') + log.info(f' Input shape: {str(input_info.input_data.shape)}') + if len(input_info.input_data.layout) == supported_input_dims: + n, c, h, w = input_info.input_data.shape + assert n == 1, 'Sample supports topologies with one input image only' + else: + raise AssertionError('Sample supports input with NHWC shape only') + + image = cv2.imread(args.input) + h_new, w_new = image.shape[:-1] + images = np.ndarray(shape=(n, c, h_new, w_new)) + log.info('File was added: ') + log.info(f' {args.input}') + image = image.transpose((2, 0, 1)) # Change data layout from HWC to CHW + images[0] = image + + log.info('Reshaping the network to the height and width of the input image') + net.reshape({input_name: [n, c, h_new, w_new]}) + log.info(f'Input shape after reshape: {str(net.input_info["data"].input_data.shape)}') + + # ----------------------------------------------------------------------------------------------------- + + # --------------------------- 4. Configure input & output --------------------------------------------- + # --------------------------- Prepare input blobs ----------------------------------------------------- + log.info('Preparing input blobs') + + if len(input_info.layout) == supported_input_dims: + input_info.precision = 'U8' + + data = {} + data[input_name] = images + + # --------------------------- Prepare output blobs ---------------------------------------------------- + log.info('Preparing output blobs') + + func = ng.function_from_cnn(net) + ops = func.get_ordered_ops() + output_name, output_info = '', net.outputs[next(iter(net.outputs.keys()))] + output_ops = {op.friendly_name : op for op in ops \ + if op.friendly_name in net.outputs and op.get_type_name() == 'DetectionOutput'} + if len(output_ops) == 1: + output_name, output_info = output_ops.popitem() + + assert output_name != '', 'Can''t find a DetectionOutput layer in the topology' + + output_dims = output_info.shape + assert output_dims != 4, 'Incorrect output dimensions for SSD model' + assert output_dims[3] == 7, 'Output item should have 7 as a last dimension' + + output_info.precision = 'FP32' + # ----------------------------------------------------------------------------------------------------- + + # --------------------------- Performing inference ---------------------------------------------------- + log.info('Loading model to the device') + exec_net = ie.load_network(network=net, device_name=args.device) + log.info('Creating infer request and starting inference') + exec_result = exec_net.infer(inputs=data) + # ----------------------------------------------------------------------------------------------------- + + # --------------------------- Read and postprocess output --------------------------------------------- + log.info('Processing output blobs') + result = exec_result[output_name] + boxes = {} + detections = result[0][0] # [0][0] - location of detections in result blob + for number, proposal in enumerate(detections): + imid, label, confidence, coords = np.int(proposal[0]), np.int(proposal[1]), proposal[2], proposal[3:] + if confidence > 0.5: + # correcting coordinates to actual image resolution + xmin, ymin, xmax, ymax = w_new * coords[0], h_new * coords[1], w_new * coords[2], h_new * coords[3] + + log.info(f' [{number},{label}] element, prob = {confidence:.6f}, ' + f'bbox = ({xmin:.3f},{ymin:.3f})-({xmax:.3f},{ymax:.3f}), batch id = {imid}') + if not imid in boxes.keys(): + boxes[imid] = [] + boxes[imid].append([xmin, ymin, xmax, ymax]) + + imid = 0 # as sample supports one input image only, imid in results will always be 0 + + tmp_image = cv2.imread(args.input) + for box in boxes[imid]: + # drawing bounding boxes on the output image + cv2.rectangle( + tmp_image, + (np.int(box[0]), np.int(box[1])), (np.int(box[2]), np.int(box[3])), + color=(232, 35, 244), thickness=2) + cv2.imwrite('out.bmp', tmp_image) + log.info('Image out.bmp created!') + # ----------------------------------------------------------------------------------------------------- + + log.info('Execution successful\n') + log.info( + 'This sample is an API example, for any performance measurements please use the dedicated benchmark_app tool') + + +if __name__ == '__main__': + sys.exit(main() or 0) From 7d8144f16071a4607391c89bb8026b91c23ffa70 Mon Sep 17 00:00:00 2001 From: Maksim Makridin Date: Tue, 8 Dec 2020 23:16:59 +0300 Subject: [PATCH 030/244] Fixes for Object Detection SSD Python sample (#3518) * added check so that sample only supports networks with one input * moved ngraph-realted operations to related segment of the sample * fix for output image not being saved correcly due --- .../object_detection_sample_ssd.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/inference-engine/ie_bridges/python/sample/object_detection_sample_ssd/object_detection_sample_ssd.py b/inference-engine/ie_bridges/python/sample/object_detection_sample_ssd/object_detection_sample_ssd.py index 904b36a64b9c27..31a4e1500f2f3f 100644 --- a/inference-engine/ie_bridges/python/sample/object_detection_sample_ssd/object_detection_sample_ssd.py +++ b/inference-engine/ie_bridges/python/sample/object_detection_sample_ssd/object_detection_sample_ssd.py @@ -58,8 +58,6 @@ def main(): model = args.model log.info(f"Loading network:\n\t{model}") net = ie.read_network(model=model) - func = ng.function_from_cnn(net) - ops = func.get_ordered_ops() # ----------------------------------------------------------------------------------------------------- # ------------- 2. Load Plugin for inference engine and extensions library if specified -------------- @@ -78,6 +76,7 @@ def main(): # --------------------------- 3. Read and preprocess input -------------------------------------------- print("inputs number: " + str(len(net.input_info.keys()))) + assert len(net.input_info.keys()) == 1, 'Sample supports networks with one input' for input_key in net.input_info: print("input shape: " + str(net.input_info[input_key].input_data.shape)) @@ -92,9 +91,9 @@ def main(): ih, iw = image.shape[:-1] images_hw.append((ih, iw)) log.info("File was added: ") - log.info(" {}".format(args.input[i])) + log.info(" {}".format(args.input)) if (ih, iw) != (h, w): - log.warning("Image {} is resized from {} to {}".format(args.input[i], image.shape[:-1], (h, w))) + log.warning("Image {} is resized from {} to {}".format(args.input, image.shape[:-1], (h, w))) image = cv2.resize(image, (w, h)) image = image.transpose((2, 0, 1)) # Change data layout from HWC to CHW images[i] = image @@ -134,6 +133,8 @@ def main(): # --------------------------- Prepare output blobs ---------------------------------------------------- log.info('Preparing output blobs') + func = ng.function_from_cnn(net) + ops = func.get_ordered_ops() output_name, output_info = "", net.outputs[next(iter(net.outputs.keys()))] output_ops = {op.friendly_name : op for op in ops \ if op.friendly_name in net.outputs and op.get_type_name() == "DetectionOutput"} @@ -190,7 +191,7 @@ def main(): print() for imid in classes: - tmp_image = cv2.imread(args.input[imid]) + tmp_image = cv2.imread(args.input) for box in boxes[imid]: cv2.rectangle(tmp_image, (box[0], box[1]), (box[2], box[3]), (232, 35, 244), 2) cv2.imwrite("out.bmp", tmp_image) From 8b9feed60360791ef56c57901ca4d9f274b11f06 Mon Sep 17 00:00:00 2001 From: Vladimir Paramuzov Date: Wed, 9 Dec 2020 09:38:29 +0300 Subject: [PATCH 031/244] [IE CLDNN] Fixed bias/scales data type in ScaleShift layer (#3477) --- inference-engine/src/cldnn_engine/cldnn_program.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/inference-engine/src/cldnn_engine/cldnn_program.cpp b/inference-engine/src/cldnn_engine/cldnn_program.cpp index 43b89630349bbc..535821e187a321 100644 --- a/inference-engine/src/cldnn_engine/cldnn_program.cpp +++ b/inference-engine/src/cldnn_engine/cldnn_program.cpp @@ -1563,14 +1563,17 @@ void Program::CreateScaleShiftPrimitive(cldnn::topology& topology, InferenceEngi default: weightTensor = CldnnTensorFromIEDims(wDims); break; } - cldnn::layout blobLayout(DataTypeFromPrecision(layer->precision), m_defaultFormat, weightTensor); - scalePrimID = CreatePrimitiveFromBlob(topology, scalePrimID, scaleShiftLayer->_weights, blobLayout); + auto scales_dt = DataTypeFromPrecision(scaleShiftLayer->_weights->getTensorDesc().getPrecision()); + cldnn::layout scalesLayout(scales_dt, m_defaultFormat, weightTensor); + scalePrimID = CreatePrimitiveFromBlob(topology, scalePrimID, scaleShiftLayer->_weights, scalesLayout); if (scaleShiftLayer->_biases != nullptr) { + auto shifts_dt = DataTypeFromPrecision(scaleShiftLayer->_biases->getTensorDesc().getPrecision()); + cldnn::layout shiftsLayout(shifts_dt, m_defaultFormat, weightTensor); const auto& bDims = scaleShiftLayer->_biases->getTensorDesc().getDims(); if (bDims != wDims) { THROW_CLDNN_EXCEPTION("Invalid bias blob dimensions in layer " << layer->name); } - biasPrimID = CreatePrimitiveFromBlob(topology, biasPrimID, scaleShiftLayer->_biases, blobLayout); + biasPrimID = CreatePrimitiveFromBlob(topology, biasPrimID, scaleShiftLayer->_biases, shiftsLayout); } else { biasPrimID = ""; // 0-bias } From d0eef043fd978e710cf0f468c2362d0d329fb682 Mon Sep 17 00:00:00 2001 From: Maxim Shevtsov Date: Wed, 9 Dec 2020 09:52:19 +0300 Subject: [PATCH 032/244] [MULTI]Data affinity remote context and blobs (#3342) * zero-copy (assuming determenistic app-level scheduling) for the multi-device, via "borrowing" the corresponding device-specific blobs and letting the app to implicitly use these * Optimized Infer Request Scheduling * remoteblob checks in the conventional SetBlob * correctly (with status) reporting NOT_IMPLEMENTED * SetBlob to accomodate for the RemoteBobs * Tests for remote blobs support via MULTI: creating the shared_test in case the other (closed source) plugins would want to use that (in the private shared_tests instantiations). Also instantiating the remote blobs tests for the some basic combinations to test the MULTI supports them * macos compilation (and general plugin platform support) fix * shuffled files, so that the MULTI tests are now part of the ieFuncTests (and need no separate target). Also brushed the macro that handales the NOT_IMPLEMENTED as bit * further shuffled files, so that the initial MULTI tests are now part of the IE tests, yet specific instances do need separate targets * Fixed misprint * Brushing the code and comments a bit * further brushing of the ScheduleToWorkerRequest: moving the task execution directly into the loop over devices (avoids pointers and 'else' clause) * 1) zero-copy (assuming determenistic app-level scheduling) for the multi-device, via "borrowing" the corresponding device-specific blobs and letting the app to implicitly use these 2) Initial MULTI section in the opt guide (primarily to document a tip on helping the MULTI to keep the zero-copy path) * [MULTI] remote context support and associated scheduling (respecting the remote data affinity) * fix CentOS (old) gcc issue: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81880 since the intriduced therad_local string is template the bug manifests itself (and the string is not allocated/initialized). the QA is to wrap the std::string into the function * further fix for the old gcc versions issue, now with non-trivial thread_local destruction sefault: switching from the std::string to the plain const char* * additional tests for the MULTI and remote blobs (no remote context and multi GPUs cases) * fix for the tests (that now can check for more specific NotImplemented exeption). Alos couple of line endings --- .../include/cpp/ie_infer_request.hpp | 4 +- .../multi_device_async_infer_request.cpp | 61 +++++++++++++----- .../multi_device_exec_network.cpp | 51 +++++++++++---- .../multi_device_exec_network.hpp | 11 +++- .../impl/ie_executable_network_internal.hpp | 12 ++-- .../impl/ie_infer_request_internal.hpp | 6 +- .../tests/functional/plugin/CMakeLists.txt | 3 +- .../multi/cpu_remote_blob_tests.cpp | 15 +++++ .../multi/gpu_remote_blob_tests.cpp | 57 +++++++++++++++++ .../myriad_remote_blobs_tests.cpp | 18 ++++++ .../include/behavior/core_integration.hpp | 7 +- .../include/behavior/exec_graph_info.hpp | 18 +++--- .../include/multi/multi_remote_blob_tests.hpp | 36 +++++++++++ .../ie_test_utils/multi/multi_helpers.hpp | 64 +++++++++++++++++++ 14 files changed, 312 insertions(+), 51 deletions(-) create mode 100644 inference-engine/tests/functional/plugin/cpu/shared_tests_instances/multi/cpu_remote_blob_tests.cpp create mode 100644 inference-engine/tests/functional/plugin/gpu/shared_tests_instances/multi/gpu_remote_blob_tests.cpp create mode 100644 inference-engine/tests/functional/plugin/myriad/shared_tests_instances/myriad_remote_blobs_tests.cpp create mode 100644 inference-engine/tests/functional/plugin/shared/include/multi/multi_remote_blob_tests.hpp create mode 100644 inference-engine/tests/ie_test_utils/multi/multi_helpers.hpp diff --git a/inference-engine/include/cpp/ie_infer_request.hpp b/inference-engine/include/cpp/ie_infer_request.hpp index 8cae1255188fc6..55085e2c1067c1 100644 --- a/inference-engine/include/cpp/ie_infer_request.hpp +++ b/inference-engine/include/cpp/ie_infer_request.hpp @@ -14,6 +14,7 @@ #include #include "cpp/ie_memory_state.hpp" +#include "ie_remote_context.hpp" #include "ie_iinfer_request.hpp" #include "details/ie_exception_conversion.hpp" #include "details/ie_so_loader.h" @@ -123,8 +124,9 @@ class InferRequest { CALL_STATUS_FNC(GetBlob, name.c_str(), data); std::string error = "Internal error: blob with name `" + name + "` is not allocated!"; auto blobPtr = data.get(); + const bool remoteBlobPassed = blobPtr->is(); if (blobPtr == nullptr) THROW_IE_EXCEPTION << error; - if (blobPtr->buffer() == nullptr) THROW_IE_EXCEPTION << error; + if (!remoteBlobPassed && blobPtr->buffer() == nullptr) THROW_IE_EXCEPTION << error; return data; } diff --git a/inference-engine/src/multi_device/multi_device_async_infer_request.cpp b/inference-engine/src/multi_device/multi_device_async_infer_request.cpp index 0761e2ae595afd..9c578e32666ef7 100644 --- a/inference-engine/src/multi_device/multi_device_async_infer_request.cpp +++ b/inference-engine/src/multi_device/multi_device_async_infer_request.cpp @@ -22,6 +22,7 @@ MultiDeviceAsyncInferRequest::MultiDeviceAsyncInferRequest( _multiDeviceExecutableNetwork{multiDeviceExecutableNetwork}, _inferRequest{inferRequest}, _needPerfCounters{needPerfCounters} { + // this executor starts the inference while the task (checking the result) is passed to the next stage struct ThisRequestExecutor : public ITaskExecutor { explicit ThisRequestExecutor(MultiDeviceAsyncInferRequest* _this_) : _this{_this_} {} void run(Task task) override { @@ -32,22 +33,52 @@ MultiDeviceAsyncInferRequest::MultiDeviceAsyncInferRequest( MultiDeviceAsyncInferRequest* _this = nullptr; }; _pipeline = { - {_multiDeviceExecutableNetwork, [this] { - _workerInferRequest = MultiDeviceExecutableNetwork::_thisWorkerInferRequest; - _inferRequest->SetBlobsToAnotherRequest(_workerInferRequest->_inferRequest); + // if the request is coming with device-specific remote blobs make sure it is scheduled to the specific device only: + { /*TaskExecutor*/ std::make_shared(), /*task*/ [this] { + // by default, no preferred device: + _multiDeviceExecutableNetwork->_thisPreferredDeviceName = ""; + // if any input is remote (e.g. was set with SetBlob), let' use the corresponding device + for (const auto &it : _multiDeviceExecutableNetwork->GetInputsInfo()) { + Blob::Ptr b; + _inferRequest->GetBlob(it.first.c_str(), b); + auto r = b->as(); + if (r) { + const auto name = r->getDeviceName(); + const auto res = std::find_if( + _multiDeviceExecutableNetwork->_devicePrioritiesInitial.cbegin(), + _multiDeviceExecutableNetwork->_devicePrioritiesInitial.cend(), + [&name](const MultiDevicePlugin::DeviceInformation& d){ return d.deviceName == name; }); + if (_multiDeviceExecutableNetwork->_devicePrioritiesInitial.cend() == res) { + THROW_IE_EXCEPTION << "None of the devices (for which current MULTI-device configuration was " + "initialized) supports a remote blob created on the device named " << name; + + } else { + // it is ok to take the c_str() here (as pointed in the multi_device_exec_network.hpp we need to use const char*) + // as the original strings are from the "persistent" vector (with the right lifetime) + _multiDeviceExecutableNetwork->_thisPreferredDeviceName = res->deviceName.c_str(); + break; + } + } + } + }}, + // as the scheduling algo may select any device, this stage accepts the scheduling decision (actual workerRequest) + // then sets the device-agnostic blobs to the actual (device-specific) request + { + /*TaskExecutor*/ _multiDeviceExecutableNetwork, /*task*/ [this] { + _workerInferRequest = MultiDeviceExecutableNetwork::_thisWorkerInferRequest; + _inferRequest->SetBlobsToAnotherRequest(_workerInferRequest->_inferRequest); }}, - {std::make_shared(this), [this] { - auto status = _workerInferRequest->_status; - if (InferenceEngine::StatusCode::OK != status) { - if (nullptr != InferenceEngine::CurrentException()) { - std::rethrow_exception(InferenceEngine::CurrentException()); - } else { - THROW_IE_EXCEPTION << InferenceEngine::details::as_status << status; - } - } - if (_needPerfCounters) { - _perfMap = _workerInferRequest->_inferRequest.GetPerformanceCounts(); - } + // final task in the pipeline: + { /*TaskExecutor*/std::make_shared(this), /*task*/ [this] { + auto status = _workerInferRequest->_status; + if (InferenceEngine::StatusCode::OK != status) { + if (nullptr != InferenceEngine::CurrentException()) + std::rethrow_exception(InferenceEngine::CurrentException()); + else + THROW_IE_EXCEPTION << InferenceEngine::details::as_status << status; + } + if (_needPerfCounters) + _perfMap = _workerInferRequest->_inferRequest.GetPerformanceCounts(); }} }; } diff --git a/inference-engine/src/multi_device/multi_device_exec_network.cpp b/inference-engine/src/multi_device/multi_device_exec_network.cpp index d9c1bf0a9b3ff4..b8795376b51009 100644 --- a/inference-engine/src/multi_device/multi_device_exec_network.cpp +++ b/inference-engine/src/multi_device/multi_device_exec_network.cpp @@ -3,9 +3,7 @@ // /////////////////////////////////////////////////////////////////////////////////////////////////// -#include #include -#include #include #include #include @@ -27,6 +25,8 @@ namespace MultiDevicePlugin { using namespace InferenceEngine; thread_local MultiDeviceExecutableNetwork::WorkerInferRequest* MultiDeviceExecutableNetwork::_thisWorkerInferRequest = nullptr; +// TODO: revert to the plain variable (see header file), when we moved to the next CentOS 8.x in our support matrix +thread_local const char* MultiDeviceExecutableNetwork::_thisPreferredDeviceName = ""; struct IdleGuard { explicit IdleGuard(MultiDeviceExecutableNetwork::WorkerInferRequest* workerInferRequestPtr, @@ -68,7 +68,7 @@ MultiDeviceExecutableNetwork::MultiDeviceExecutableNetwork(const DeviceMap(); - } catch (const details::InferenceEngineException &iie) { + } catch (const InferenceEngine::details::InferenceEngineException &iie) { THROW_IE_EXCEPTION << "Every device used with the Multi-Device should " << "support OPTIMAL_NUMBER_OF_INFER_REQUESTS ExecutableNetwork metric. " @@ -79,6 +79,7 @@ MultiDeviceExecutableNetwork::MultiDeviceExecutableNetwork(const DeviceMap>(new ThreadSafeQueue); auto* idleWorkerRequestsPtr = &(idleWorkerRequests); idleWorkerRequests.set_capacity(numRequests); for (auto&& workerRequest : workerRequests) { @@ -95,24 +96,27 @@ MultiDeviceExecutableNetwork::MultiDeviceExecutableNetwork(const DeviceMaptry_push(workerRequestPtr)) { + // let's try to pop a task, as we know there is at least one idle request, schedule if succeeded + // if no device-agnostic tasks, let's try pop the device specific task, schedule if succeeded Task t; - // try pop the task, as we know there is at least one idle request - if (_inferPipelineTasks.try_pop(t)) { - // if succeeded, let's schedule that + if (_inferPipelineTasks.try_pop(t)) ScheduleToWorkerInferRequest(std::move(t)); - } + else if (_inferPipelineTasksDeviceSpecific[device]->try_pop(t)) + ScheduleToWorkerInferRequest(std::move(t), device); } }); } } } -void MultiDeviceExecutableNetwork::ScheduleToWorkerInferRequest(Task inferPipelineTask) { +void MultiDeviceExecutableNetwork::ScheduleToWorkerInferRequest(Task inferPipelineTask, DeviceName preferred_device) { auto devices = [&] { std::lock_guard lock(_mutex); return _devicePriorities; }(); for (auto&& device : devices) { + if (!preferred_device.empty() && (device.deviceName != preferred_device)) + continue; WorkerInferRequest* workerRequestPtr = nullptr; NotBusyWorkerRequests& idleWorkerRequests = _idleWorkerRequests[device.deviceName]; if (idleWorkerRequests.try_pop(workerRequestPtr)) { @@ -126,12 +130,15 @@ void MultiDeviceExecutableNetwork::ScheduleToWorkerInferRequest(Task inferPipeli return; } } - // no vacant requests this time, storing the task to the queue - _inferPipelineTasks.push(std::move(inferPipelineTask)); + // no vacant requests this time, storing the task to the respective queue + if (!preferred_device.empty()) + _inferPipelineTasksDeviceSpecific[preferred_device]->push(std::move(inferPipelineTask)); + else + _inferPipelineTasks.push(std::move(inferPipelineTask)); } void MultiDeviceExecutableNetwork::run(Task inferPipelineTask) { - ScheduleToWorkerInferRequest(std::move(inferPipelineTask)); + ScheduleToWorkerInferRequest(std::move(inferPipelineTask), _thisPreferredDeviceName); } MultiDeviceExecutableNetwork::~MultiDeviceExecutableNetwork() { @@ -149,6 +156,26 @@ MultiDeviceExecutableNetwork::~MultiDeviceExecutableNetwork() { _workerRequests.clear(); } +RemoteContext::Ptr MultiDeviceExecutableNetwork::GetContext() const { + auto devices = [&] { + std::lock_guard lock(_mutex); + return _devicePriorities; + }(); + + std::string devices_names; + for (auto&& device : devices) { + devices_names += device.deviceName + " "; + const auto& n = _networksPerDevice.at(device.deviceName); + try { + return n.GetContext(); + } catch (const NotImplemented& ex) { + } + } + THROW_IE_EXCEPTION << InferenceEngine::details::as_status << StatusCode::NOT_IMPLEMENTED + << NOT_IMPLEMENTED_str << "None of the devices in the MULTI has an associated remote context." + << "Current list of devices allowed via the DEVICE_PRIORITIES config: " << devices_names; +} + InferenceEngine::InferRequestInternal::Ptr MultiDeviceExecutableNetwork::CreateInferRequestImpl(InferenceEngine::InputsDataMap networkInputs, InferenceEngine::OutputsDataMap networkOutputs) { auto num = _numRequestsCreated++; @@ -230,7 +257,7 @@ InferenceEngine::Parameter MultiDeviceExecutableNetwork::GetMetric(const std::st for (auto n : _networksPerDevice) { try { res += n.second.GetMetric(METRIC_KEY(OPTIMAL_NUMBER_OF_INFER_REQUESTS)).as(); - } catch (const details::InferenceEngineException &iie) { + } catch (const InferenceEngine::details::InferenceEngineException &iie) { THROW_IE_EXCEPTION << "Every device used with the Multi-Device should " << "support OPTIMAL_NUMBER_OF_INFER_REQUESTS ExecutableNetwork metric. " diff --git a/inference-engine/src/multi_device/multi_device_exec_network.hpp b/inference-engine/src/multi_device/multi_device_exec_network.hpp index bdea1e449e4041..9251f892d1c69c 100644 --- a/inference-engine/src/multi_device/multi_device_exec_network.hpp +++ b/inference-engine/src/multi_device/multi_device_exec_network.hpp @@ -117,17 +117,22 @@ class MultiDeviceExecutableNetwork : public InferenceEngine::ExecutableNetworkTh InferenceEngine::IInferRequest::Ptr CreateInferRequest() override; InferenceEngine::InferRequestInternal::Ptr CreateInferRequestImpl(InferenceEngine::InputsDataMap networkInputs, InferenceEngine::OutputsDataMap networkOutputs) override; + InferenceEngine::RemoteContext::Ptr GetContext() const override; ~MultiDeviceExecutableNetwork() override; - void ScheduleToWorkerInferRequest(InferenceEngine::Task); + void ScheduleToWorkerInferRequest(InferenceEngine::Task, DeviceName preferred_device = ""); static thread_local WorkerInferRequest* _thisWorkerInferRequest; - std::atomic_bool _terminate = {false}; - std::mutex _mutex; + // have to use the const char* ptr rather than std::string due to a bug in old gcc versions, + // the bug is e.g. manifesting on the old CentOS (and it's 4.8.x gcc) used in our testing + // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81880 + static thread_local const char* _thisPreferredDeviceName; + mutable std::mutex _mutex; std::vector _devicePriorities; const std::vector _devicePrioritiesInitial; DeviceMap _networksPerDevice; ThreadSafeQueue _inferPipelineTasks; + DeviceMap>> _inferPipelineTasksDeviceSpecific; DeviceMap _idleWorkerRequests; DeviceMap> _workerRequests; std::unordered_map _config; diff --git a/inference-engine/src/plugin_api/cpp_interfaces/impl/ie_executable_network_internal.hpp b/inference-engine/src/plugin_api/cpp_interfaces/impl/ie_executable_network_internal.hpp index c2e70b5bf73b12..765fe365d88914 100644 --- a/inference-engine/src/plugin_api/cpp_interfaces/impl/ie_executable_network_internal.hpp +++ b/inference-engine/src/plugin_api/cpp_interfaces/impl/ie_executable_network_internal.hpp @@ -64,7 +64,7 @@ class ExecutableNetworkInternal : public IExecutableNetworkInternal { void Export(const std::string& modelFileName) override { (void)modelFileName; - THROW_IE_EXCEPTION << NOT_IMPLEMENTED_str; + THROW_IE_EXCEPTION << InferenceEngine::details::as_status << StatusCode::NOT_IMPLEMENTED << NOT_IMPLEMENTED_str; } void Export(std::ostream& networkModel) override { @@ -76,7 +76,7 @@ class ExecutableNetworkInternal : public IExecutableNetworkInternal { } CNNNetwork GetExecGraphInfo() override { - THROW_IE_EXCEPTION << NOT_IMPLEMENTED_str; + THROW_IE_EXCEPTION << InferenceEngine::details::as_status << StatusCode::NOT_IMPLEMENTED << NOT_IMPLEMENTED_str; } /** @@ -89,7 +89,7 @@ class ExecutableNetworkInternal : public IExecutableNetworkInternal { } std::vector QueryState() override { - THROW_IE_EXCEPTION << NOT_IMPLEMENTED_str; + THROW_IE_EXCEPTION << InferenceEngine::details::as_status << StatusCode::NOT_IMPLEMENTED << NOT_IMPLEMENTED_str; } void SetConfig(const std::map& config) override { @@ -107,11 +107,11 @@ class ExecutableNetworkInternal : public IExecutableNetworkInternal { Parameter GetMetric(const std::string& name) const override { (void)name; - THROW_IE_EXCEPTION << NOT_IMPLEMENTED_str; + THROW_IE_EXCEPTION << InferenceEngine::details::as_status << StatusCode::NOT_IMPLEMENTED << NOT_IMPLEMENTED_str; } RemoteContext::Ptr GetContext() const override { - THROW_IE_EXCEPTION << NOT_IMPLEMENTED_str; + THROW_IE_EXCEPTION << InferenceEngine::details::as_status << StatusCode::NOT_IMPLEMENTED << NOT_IMPLEMENTED_str; } protected: @@ -123,7 +123,7 @@ class ExecutableNetworkInternal : public IExecutableNetworkInternal { */ virtual void ExportImpl(std::ostream& networkModel) { (void)networkModel; - THROW_IE_EXCEPTION << NOT_IMPLEMENTED_str; + THROW_IE_EXCEPTION << InferenceEngine::details::as_status << StatusCode::NOT_IMPLEMENTED << NOT_IMPLEMENTED_str; } InferenceEngine::InputsDataMap _networkInputs; //!< Holds infromation about network inputs info diff --git a/inference-engine/src/plugin_api/cpp_interfaces/impl/ie_infer_request_internal.hpp b/inference-engine/src/plugin_api/cpp_interfaces/impl/ie_infer_request_internal.hpp index f0d5316686bf6d..7add8e862a75e2 100644 --- a/inference-engine/src/plugin_api/cpp_interfaces/impl/ie_infer_request_internal.hpp +++ b/inference-engine/src/plugin_api/cpp_interfaces/impl/ie_infer_request_internal.hpp @@ -76,7 +76,8 @@ class InferRequestInternal : virtual public IInferRequestInternal { } if (!data) THROW_IE_EXCEPTION << NOT_ALLOCATED_str << "Failed to set empty blob with name: \'" << name << "\'"; const bool compoundBlobPassed = data->is(); - if (!compoundBlobPassed && data->buffer() == nullptr) + const bool remoteBlobPassed = data->is(); + if (!compoundBlobPassed && !remoteBlobPassed && data->buffer() == nullptr) THROW_IE_EXCEPTION << "Input data was not allocated. Input name: \'" << name << "\'"; if (data->size() == 0) { THROW_IE_EXCEPTION << "Input data is empty. Input name: \'" << name << "\'"; @@ -348,7 +349,8 @@ class InferRequestInternal : virtual public IInferRequestInternal { if (refSize != blob->size()) { THROW_IE_EXCEPTION << strNotMatched + ": got " << blob->size() << " expecting " << refSize; } - if (blob->buffer() == nullptr) THROW_IE_EXCEPTION << strNotAllocated; + const bool remoteBlobPassed = blob->is(); + if (!remoteBlobPassed && blob->buffer() == nullptr) THROW_IE_EXCEPTION << strNotAllocated; } /** diff --git a/inference-engine/tests/functional/plugin/CMakeLists.txt b/inference-engine/tests/functional/plugin/CMakeLists.txt index 339d97fa430a36..9b1aae9cff0271 100644 --- a/inference-engine/tests/functional/plugin/CMakeLists.txt +++ b/inference-engine/tests/functional/plugin/CMakeLists.txt @@ -18,4 +18,5 @@ endif() if (ENABLE_MYRIAD) add_subdirectory(myriad) -endif() \ No newline at end of file +endif() + diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/multi/cpu_remote_blob_tests.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/multi/cpu_remote_blob_tests.cpp new file mode 100644 index 00000000000000..5f52d3f4afa6a9 --- /dev/null +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/multi/cpu_remote_blob_tests.cpp @@ -0,0 +1,15 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include +#include +#include "multi/multi_remote_blob_tests.hpp" +#include "common_test_utils/test_constants.hpp" + +const std::vector device_names_and_support_for_remote_blobs { + {{CPU}, false}, // CPU via MULTI +}; + +INSTANTIATE_TEST_CASE_P(smoke_RemoteBlobMultiCPU, MultiDevice_SupportTest, + ::testing::ValuesIn(device_names_and_support_for_remote_blobs), MultiDevice_SupportTest::getTestCaseName); diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/multi/gpu_remote_blob_tests.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/multi/gpu_remote_blob_tests.cpp new file mode 100644 index 00000000000000..7a576dad03d0aa --- /dev/null +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/multi/gpu_remote_blob_tests.cpp @@ -0,0 +1,57 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include +#include +#include "multi/multi_remote_blob_tests.hpp" +#include "common_test_utils/test_constants.hpp" + +const std::vector device_names_and_support_for_remote_blobs { + {{GPU}, true}, // GPU via MULTI, +#if ENABLE_MKL_DNN + {{GPU, CPU}, true}, // GPU+CPU + {{CPU, GPU}, true}, // CPU+GPU +#endif +}; + +INSTANTIATE_TEST_CASE_P(smoke_RemoteBlobMultiGPU, MultiDevice_SupportTest, + ::testing::ValuesIn(device_names_and_support_for_remote_blobs), MultiDevice_SupportTest::getTestCaseName); + +TEST_P(MultiDevice_Test, cannotInferRemoteBlobIfNotInitializedForDevice) { + InferenceEngine::CNNNetwork net; + net = CNNNetwork(fn_ptr); + auto ie = PluginCache::get().ie(); + // load a network to the GPU to make sure we have a remote context + auto exec_net = ie->LoadNetwork(net, GPU); + auto ctx = exec_net.GetContext(); + + const InferenceEngine::ConstInputsDataMap inputInfo = exec_net.GetInputsInfo(); + auto& first_input_name = inputInfo.begin()->first; + auto& first_input = inputInfo.begin()->second; + auto rblob = InferenceEngine::make_shared_blob(first_input->getTensorDesc(), ctx); + rblob->allocate(); + + ExecutableNetwork exec_net_multi; + try { + exec_net_multi = ie->LoadNetwork(net, device_names); + } catch(...) { + // device is unavailable (e.g. for the "second GPU" test) or other (e.g. env) issues not related to the test + return; + } + InferRequest req = exec_net_multi.CreateInferRequest(); + ASSERT_NE((std::shared_ptr)req, nullptr); + ASSERT_NO_THROW(req.SetBlob(first_input_name, rblob)); + ASSERT_NO_THROW(req.StartAsync()); + ASSERT_THROW(req.Wait(InferenceEngine::IInferRequest::WaitMode::RESULT_READY), InferenceEngine::details::InferenceEngineException); +} + +const std::vector device_names_and_support_for_remote_blobs2 { +#if ENABLE_MKL_DNN + {CPU}, // stand-alone CPU via MULTI (no GPU), no OCL context +#endif + {"GPU.1"}, // another GPU (the test will test its presence), different OCL contexts +}; + +INSTANTIATE_TEST_CASE_P(smoke_RemoteBlobMultiInitializedWithoutGPU, MultiDevice_Test, + ::testing::ValuesIn(device_names_and_support_for_remote_blobs2), MultiDevice_Test::getTestCaseName); diff --git a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/myriad_remote_blobs_tests.cpp b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/myriad_remote_blobs_tests.cpp new file mode 100644 index 00000000000000..49e442cf117788 --- /dev/null +++ b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/myriad_remote_blobs_tests.cpp @@ -0,0 +1,18 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include +#include +#include "multi/multi_remote_blob_tests.hpp" +#include "common_test_utils/test_constants.hpp" + +const std::vector device_names_and_support_for_remote_blobs { + {{MYRIAD}, false}, // MYX via MULTI +#if ENABLE_MKL_DNN + {{CPU, MYRIAD}, false}, // CPU+MYX +#endif +}; + +INSTANTIATE_TEST_CASE_P(smoke_RemoteBlobMultiMyriad, MultiDevice_SupportTest, + ::testing::ValuesIn(device_names_and_support_for_remote_blobs), MultiDevice_SupportTest::getTestCaseName); \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/core_integration.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/core_integration.hpp index 4aff2bb283efa5..769a684359020e 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/core_integration.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/core_integration.hpp @@ -23,6 +23,7 @@ #include #include #include +#include #ifdef ENABLE_UNICODE_PATH_SUPPORT #include @@ -60,16 +61,18 @@ namespace BehaviorTestsDefinitions { { \ try { \ __VA_ARGS__; \ - } catch(InferenceEngine::details::InferenceEngineException ieException) { \ + } catch(InferenceEngine::details::InferenceEngineException& ieException) { \ auto notImplementedExceptionIsThrown = \ std::string::npos != std::string {ieException.what()} \ - .find(std::string{"[NOT_IMPLEMENTED] "}); \ + .find(NOT_IMPLEMENTED_str); \ if (notImplementedExceptionIsThrown) { \ GTEST_SKIP(); \ } else { \ FAIL() << "thrown from expression: " # __VA_ARGS__ << std::endl \ << "what: " << ieException.what(); \ } \ + } catch (const InferenceEngine::NotImplemented& ex) { \ + GTEST_SKIP(); \ } \ } diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/exec_graph_info.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/exec_graph_info.hpp index e010f3a4e9ddd8..bc060854e77782 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/exec_graph_info.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/exec_graph_info.hpp @@ -61,7 +61,7 @@ TEST_P(ExecGraphTests, CheckExecGraphInfoBeforeExecution) { InferenceEngine::CNNNetwork execGraph; if (targetDevice != CommonTestUtils::DEVICE_MULTI && targetDevice != CommonTestUtils::DEVICE_GNA) { // Load CNNNetwork to target plugins - auto execNet = ie->LoadNetwork(cnnNet, targetDevice); + auto execNet = ie->LoadNetwork(cnnNet, targetDevice, configuration); ASSERT_NO_THROW(execGraph = execNet.GetExecGraphInfo()); // Create InferRequest InferenceEngine::InferRequest req; @@ -135,8 +135,8 @@ TEST_P(ExecGraphTests, CheckExecGraphInfoBeforeExecution) { ASSERT_GE(layer.second, 0); } } else { - ASSERT_THROW(ie->LoadNetwork(cnnNet, targetDevice).GetExecGraphInfo(), - InferenceEngine::details::InferenceEngineException); + ASSERT_THROW(ie->LoadNetwork(cnnNet, targetDevice, configuration).GetExecGraphInfo(), + InferenceEngine::NotImplemented); } } @@ -148,7 +148,7 @@ TEST_P(ExecGraphTests, CheckExecGraphInfoAfterExecution) { InferenceEngine::CNNNetwork execGraph; if (targetDevice != CommonTestUtils::DEVICE_MULTI && targetDevice != CommonTestUtils::DEVICE_GNA) { // Load CNNNetwork to target plugins - auto execNet = ie->LoadNetwork(cnnNet, targetDevice); + auto execNet = ie->LoadNetwork(cnnNet, targetDevice, configuration); ASSERT_NO_THROW(execGraph = execNet.GetExecGraphInfo()); // Create InferRequest InferenceEngine::InferRequest req; @@ -235,8 +235,8 @@ TEST_P(ExecGraphTests, CheckExecGraphInfoAfterExecution) { ASSERT_GE(layer.second, 0); } } else { - ASSERT_THROW(ie->LoadNetwork(cnnNet, targetDevice).GetExecGraphInfo(), - InferenceEngine::details::InferenceEngineException); + ASSERT_THROW(ie->LoadNetwork(cnnNet, targetDevice, configuration).GetExecGraphInfo(), + InferenceEngine::NotImplemented); } } @@ -252,7 +252,7 @@ TEST_P(ExecGraphTests, CheckExecGraphInfoSerialization) { InferenceEngine::CNNNetwork execGraph; if (targetDevice != CommonTestUtils::DEVICE_MULTI && targetDevice != CommonTestUtils::DEVICE_GNA) { // Load CNNNetwork to target plugins - auto execNet = ie->LoadNetwork(cnnNet, targetDevice); + auto execNet = ie->LoadNetwork(cnnNet, targetDevice, configuration); ASSERT_NO_THROW(execGraph = execNet.GetExecGraphInfo()); // Create InferRequest InferenceEngine::InferRequest req; @@ -261,8 +261,8 @@ TEST_P(ExecGraphTests, CheckExecGraphInfoSerialization) { ASSERT_EQ(0, std::remove(out_xml_path.c_str())); ASSERT_EQ(0, std::remove(out_bin_path.c_str())); } else { - ASSERT_THROW(ie->LoadNetwork(cnnNet, targetDevice).GetExecGraphInfo(), - InferenceEngine::details::InferenceEngineException); + ASSERT_THROW(ie->LoadNetwork(cnnNet, targetDevice, configuration).GetExecGraphInfo(), + InferenceEngine::NotImplemented); } } } // namespace BehaviorTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/multi/multi_remote_blob_tests.hpp b/inference-engine/tests/functional/plugin/shared/include/multi/multi_remote_blob_tests.hpp new file mode 100644 index 00000000000000..89d388044511ac --- /dev/null +++ b/inference-engine/tests/functional/plugin/shared/include/multi/multi_remote_blob_tests.hpp @@ -0,0 +1,36 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include +#include +#include "multi/multi_helpers.hpp" +#include "functional_test_utils/plugin_cache.hpp" + +TEST_P(MultiDevice_SupportTest, canCreateContextThenRequestThenBlobsAndInfer) { + InferenceEngine::CNNNetwork net; + net = CNNNetwork(fn_ptr); + net.getInputsInfo().begin()->second->setLayout(Layout::NCHW); + net.getInputsInfo().begin()->second->setPrecision(Precision::U8); + + auto ie = PluginCache::get().ie(); + + auto exec_net = ie->LoadNetwork(net, device_names); + if (expected_status) { + InferenceEngine::RemoteContext::Ptr ctx; + ASSERT_NE(ctx = exec_net.GetContext(), nullptr); + InferRequest req = exec_net.CreateInferRequest(); + ASSERT_NE((std::shared_ptr)req, nullptr); + const InferenceEngine::ConstInputsDataMap inputInfo = exec_net.GetInputsInfo(); + for (auto i : inputInfo) { + auto rblob = InferenceEngine::make_shared_blob(i.second->getTensorDesc(), ctx); + rblob->allocate(); + req.SetBlob(i.first, rblob); + } + ASSERT_NO_THROW(req.StartAsync()); + ASSERT_EQ(req.Wait(IInferRequest::RESULT_READY), StatusCode::OK); + + } else { + ASSERT_THROW(exec_net.GetContext(), InferenceEngine::NotImplemented); + } +} diff --git a/inference-engine/tests/ie_test_utils/multi/multi_helpers.hpp b/inference-engine/tests/ie_test_utils/multi/multi_helpers.hpp new file mode 100644 index 00000000000000..064c75006db640 --- /dev/null +++ b/inference-engine/tests/ie_test_utils/multi/multi_helpers.hpp @@ -0,0 +1,64 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include +#include + +#include "multi-device/multi_device_config.hpp" +#include "common_test_utils/test_common.hpp" +#include "common_test_utils/test_constants.hpp" +#include "ngraph_functions/subgraph_builders.hpp" + +using namespace ::testing; +using namespace InferenceEngine; + +static std::string getDeviceStringWithMulti(std::vector names) { + std::string allDevices = "MULTI:"; + for (auto && device : names) { + allDevices += device; + allDevices += ((device == names[names.size()-1]) ? "" : ","); + } + return allDevices; +} +using DeviceName = std::string; +using DevicesNames = std::vector; +using DevicesNamesAndSupportPair = std::pair; + +class MultiDevice_Test : public CommonTestUtils::TestsCommon, public testing::WithParamInterface { + void SetUp() override { + device_names = getDeviceStringWithMulti(this->GetParam()); + fn_ptr = ngraph::builder::subgraph::makeSplitMultiConvConcat(); + } +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj) { + auto s = getDeviceStringWithMulti(obj.param); + std::replace(s.begin(), s.end(), ',', '_'); + return "device_names_" + s; + } +protected: + std::string device_names; + std::shared_ptr fn_ptr; +}; + +class MultiDevice_SupportTest : public CommonTestUtils::TestsCommon, public testing::WithParamInterface { + void SetUp() override { + device_names = getDeviceStringWithMulti(this->GetParam().first); + expected_status = this->GetParam().second; + fn_ptr = ngraph::builder::subgraph::makeSplitMultiConvConcat(); + } +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj) { + auto s = getDeviceStringWithMulti(obj.param.first); + std::replace(s.begin(), s.end(), ',', '_'); + return "device_names_" + s; + } +protected: + std::string device_names; + bool expected_status; + std::shared_ptr fn_ptr; +}; +#define MULTI CommonTestUtils::DEVICE_MULTI +#define CPU CommonTestUtils::DEVICE_CPU +#define GPU CommonTestUtils::DEVICE_GPU +#define MYRIAD CommonTestUtils::DEVICE_MYRIAD From 521b6f3b97f56f38d850685855ea03741f4c6fac Mon Sep 17 00:00:00 2001 From: Alexey Ershov Date: Wed, 9 Dec 2020 11:28:48 +0300 Subject: [PATCH 033/244] [IE][VPU]: Eltwise: 'person-detection-retail-0013' performance fix - firmware update (#3497) * Eltwise: performance fix for 'person-detection-retail-0013' - firmware update * Eltwise: fix hash values for updated firmware --- inference-engine/cmake/vpu_dependencies.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inference-engine/cmake/vpu_dependencies.cmake b/inference-engine/cmake/vpu_dependencies.cmake index 636f285acdc800..aa2c220de710ae 100644 --- a/inference-engine/cmake/vpu_dependencies.cmake +++ b/inference-engine/cmake/vpu_dependencies.cmake @@ -15,14 +15,14 @@ include(dependency_solver) set(VPU_SUPPORTED_FIRMWARES usb-ma2x8x pcie-ma2x8x) set(VPU_SUPPORTED_FIRMWARES_HASH - "2980b6d0726107888ec7ba02c43a245a699c19a0f1e25b54f0bb928c91bfa045" - "c4692a7c3f44e6cdf6743c21d99570946d81ece9370fcd07725da95ad8fcd657") + "e687ed209ff72b215d3d648b980747faa8287215935bef4a87faa79d1d141df7" + "32a3f529385d9ceec6f6a842dd1927b69c83f9e04f40819c168f8149316402e6") # # Default packages # -set(FIRMWARE_PACKAGE_VERSION 1532) +set(FIRMWARE_PACKAGE_VERSION 1534) set(VPU_CLC_MA2X8X_VERSION "movi-cltools-20.09.2") # From 76e489a161e0c51a0ad24e47d60523438172ef4b Mon Sep 17 00:00:00 2001 From: "Roman Vyunov (Intel)" Date: Wed, 9 Dec 2020 15:31:25 +0300 Subject: [PATCH 034/244] [IE][VPU]: Performance fix for efficientnet-b0 (#3515) --- .../src/vpu/graph_transformer/src/stages/swish.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/inference-engine/src/vpu/graph_transformer/src/stages/swish.cpp b/inference-engine/src/vpu/graph_transformer/src/stages/swish.cpp index d5b0418bca628b..e64e0b68dc4579 100644 --- a/inference-engine/src/vpu/graph_transformer/src/stages/swish.cpp +++ b/inference-engine/src/vpu/graph_transformer/src/stages/swish.cpp @@ -23,10 +23,6 @@ class SwishStage final : public PostOpStage { serializer.append(static_cast(beta)); } - - StageSHAVEsRequirements getSHAVEsRequirementsImpl() const override { - return StageSHAVEsRequirements::NeedMax; - } }; } // namespace From 9d4b778234011eaa0fffc076a6b960fac31a414b Mon Sep 17 00:00:00 2001 From: Kate Generalova Date: Wed, 9 Dec 2020 16:04:12 +0300 Subject: [PATCH 035/244] [DOC] add Docker on Windows GPU infer instruction (#3492) (#3531) * odc: add Docker on Windows GPU infer instruction * Update docs/install_guides/installing-openvino-docker-windows.md Co-authored-by: Alina Alborova * Update docs/install_guides/installing-openvino-docker-windows.md Co-authored-by: Alina Alborova * Update docs/install_guides/installing-openvino-docker-windows.md Co-authored-by: Alina Alborova * Update docs/install_guides/installing-openvino-docker-windows.md Co-authored-by: Alina Alborova * Update docs/install_guides/installing-openvino-docker-windows.md Co-authored-by: Alina Alborova * Update docs/install_guides/installing-openvino-docker-windows.md Co-authored-by: Alina Alborova * Update docs/install_guides/installing-openvino-docker-windows.md Co-authored-by: Alina Alborova * Update docs/install_guides/installing-openvino-docker-windows.md Co-authored-by: Alina Alborova * Update docs/install_guides/installing-openvino-docker-windows.md Co-authored-by: Alina Alborova * Update docs/install_guides/installing-openvino-docker-windows.md Co-authored-by: Alina Alborova * Update docs/install_guides/installing-openvino-docker-windows.md Co-authored-by: Alina Alborova * Update docs/install_guides/installing-openvino-docker-windows.md Co-authored-by: Alina Alborova * Update docs/install_guides/installing-openvino-docker-windows.md Co-authored-by: Kate Generalova * Removed an extra colon * Update docs/install_guides/installing-openvino-docker-windows.md Co-authored-by: Alina Alborova Co-authored-by: Alina Alborova --- .../installing-openvino-docker-windows.md | 60 ++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/docs/install_guides/installing-openvino-docker-windows.md b/docs/install_guides/installing-openvino-docker-windows.md index 04295a901591e9..c87015cfa89052 100644 --- a/docs/install_guides/installing-openvino-docker-windows.md +++ b/docs/install_guides/installing-openvino-docker-windows.md @@ -66,7 +66,7 @@ In case of proxy issues, please use an offline installer for Build Tools (follow ## Run the Docker* Image for CPU -To install the OpenVINO toolkit from the prepared Docker image, run the image with the following command (currently support only CPU target): +To install the OpenVINO toolkit from the prepared Docker image, run the image with the following command: ~~~ docker run -it --rm ~~~ @@ -76,6 +76,64 @@ If you want to try some demos then run image with the root privileges (some addi docker run -itu ContainerAdministrator --rm cmd /S /C "cd deployment_tools\demo && demo_security_barrier_camera.bat -d CPU -sample-options -no_show" ~~~ +## Build and Run the Docker* Image for GPU + +GPU Acceleration in Windows containers feature requires to meet Windows host, OpenVINO toolkit and Docker* requirements: +* [Windows requirements](https://docs.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/gpu-acceleration): + * The container host must be running Windows Server 2019 or Windows 10 of version 1809 or higher. + * The container base image must be `mcr.microsoft.com/windows:1809` or higher. Windows Server Core and Nano Server container images are not currently supported. + * The container host must be running Docker Engine 19.03 or higher. + * The container host must have GPU running display drivers of version WDDM 2.5 or higher. +* [OpenVINO™ GPU requirement](https://docs.openvinotoolkit.org/latest/openvino_docs_install_guides_installing_openvino_windows.html#Install-GPU): + * Intel Graphics Driver for Windows of version 15.65 or higher. +* [Docker isolation mode requirement](https://docs.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/hyperv-container): + * Windows host and container version tags must match. + * [Windows host and container isolation process support](https://docs.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/version-compatibility) + +## Build a Docker* Image for Your Host System + +1. Reuse one of [available Dockerfiles](https://github.com/openvinotoolkit/docker_ci/tree/master/dockerfiles). You can also use your own Dockerfile. +2. Check your [Windows host and container isolation process compatibility](https://docs.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/version-compatibility). +3. Find the appropriate Windows container base image on [DockerHub*](https://hub.docker.com/_/microsoft-windows) and set up your host/container version in the `FROM` Dockerfile instruction. + For example, in [openvino_c_dev_2021.dockerfile](https://github.com/openvinotoolkit/docker_ci/blob/master/dockerfiles/winserver2019/openvino_c_dev_2021.dockerfile), change: + ~~~ + FROM mcr.microsoft.com/windows/servercore:ltsc2019 AS ov_base + ~~~ + to + ~~~ + FROM mcr.microsoft.com/windows:20H2 + ~~~ +4. Build the Docker image + ~~~ + docker build --build-arg package_url= -f -t . + ~~~ +5. Copy `OpenCL.dll` from your `C:\Windows\System32` host folder to any `temp` directory: + ~~~ + mkdir C:\tmp + copy C:\Windows\System32\OpenCL.dll C:\tmp + ~~~ + +## Run the Docker* Image for GPU + +1. To try inference on a GPU, run the image with the following command: + ~~~ + docker run -it --rm -u ContainerAdministrator --isolation process --device class/5B45201D-F2F2-4F3B-85BB-30FF1F953599 -v C:\Windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_518f2921ba495409:C:\Windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_518f2921ba495409 -v C:\tmp:C:\tmp + ~~~ + where + * `--device class/5B45201D-F2F2-4F3B-85BB-30FF1F953599` is a reserved interface class GUID for a GPU device. + * `C:\Windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_518f2921ba495409` is the path to OpenCL driver home directory. To find it on your PC, run the `C:\Windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_*` regular expression. + * `C:\tmp` is the folder with the copy of `OpenCL.dll` from your `C:\Windows\System32` host folder. + +2. Copy `OpenCL.dll` to the `C:\Windows\System32` folder inside the container and set appropriate registry entry. Now you can run inference on a GPU device: + ~~~ + copy C:\tmp\OpenCL.dll C:\Windows\System32\ && reg add "HKLM\SOFTWARE\Khronos\OpenCL\Vendors" /v "C:\Windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_518f2921ba495409\ocl\bin\x64\intelocl64.dll" /t REG_DWORD /d 0 + ~~~ +3. For example, run the `demo_security_barrier_camera` demo with the command below: + ~~~ + cd bin && setupvars.bat && cd ../ && cd deployment_tools\demo && demo_security_barrier_camera.bat -d GPU -sample-options -no_show + ~~~ + > **NOTE**: Addittional third-party dependencies will be installed. + ## Troubleshooting If you got proxy issues, please setup proxy settings for Docker. See the Proxy section in the [Install the DL Workbench from Docker Hub* ](@ref workbench_docs_Workbench_DG_Install_from_Docker_Hub) topic. From 4a6e153d5a9f560311249c94e1261d2d964511f6 Mon Sep 17 00:00:00 2001 From: Anastasiya Ageeva Date: Wed, 9 Dec 2020 17:02:38 +0300 Subject: [PATCH 036/244] Added uninstallation instructions (#3446) --- .../installing-openvino-linux.md | 50 ++++++++++++++----- .../installing-openvino-macos.md | 18 +++++-- .../installing-openvino-windows.md | 8 +++ 3 files changed, 59 insertions(+), 17 deletions(-) diff --git a/docs/install_guides/installing-openvino-linux.md b/docs/install_guides/installing-openvino-linux.md index 828c858d38aa81..9ceed341bda9b8 100644 --- a/docs/install_guides/installing-openvino-linux.md +++ b/docs/install_guides/installing-openvino-linux.md @@ -71,7 +71,8 @@ This guide provides step-by-step instructions on how to install the Intel® Dist 8. Steps for Intel® Vision Accelerator Design with Intel® Movidius™ VPU
After installing your Intel® Movidius™ VPU, you will return to this guide to complete OpenVINO™ installation. 9. Run a Sample Application -10. Use the Face Detection Tutorial +10. Uninstall the Intel® Distribution of OpenVINO™ Toolkit. +11. Use the Face Detection Tutorial ## Install the Intel® Distribution of OpenVINO™ Toolkit Core Components @@ -102,7 +103,7 @@ toolkit installed, rename or delete these two directories: **Installation Notes:** - Choose an installation option and run the related script as root. - - You can use either a GUI installation wizard or command-line instructions (CLI). + - You can use either a GUI installation wizard or command line instructions (CLI). - Screenshots are provided for the GUI, but not for CLI. The following information also applies to CLI and will be helpful to your installation where you will be presented with the same choices and tasks. 5. Choose your installation option: @@ -110,11 +111,11 @@ toolkit installed, rename or delete these two directories: ```sh sudo ./install_GUI.sh ``` - - **Option 2:** Command-Line Instructions: + - **Option 2:** Command Line Instructions: ```sh sudo ./install.sh ``` - - **Option 3:** Command-Line Silent Instructions: + - **Option 3:** Command Line Silent Instructions: ```sh sudo sed -i 's/decline/accept/g' silent.cfg sudo ./install.sh -s silent.cfg @@ -128,16 +129,15 @@ messages such as the following in case you must complete additional steps: ![](../img/openvino-install-linux-01.png) -7. If you select the default options, the **Installation summary** GUI screen -looks like this: +7. If you select the default options, the **Installation summary** GUI screen looks like this: ![](../img/openvino-install-linux-02.png) - - **Optional:** You can choose **Customize** to change the installation directory or the components you want to install: - ![](../img/openvino-install-linux-03.png) - When installed as **root** the default installation directory for the Intel Distribution of OpenVINO is - `/opt/intel/openvino_/`.
- For simplicity, a symbolic link to the latest installation is also created: `/opt/intel/openvino_2021/`. +**Optional:** You can choose **Customize** to change the installation directory or the components you want to install: +![](../img/openvino-install-linux-03.png) +By default, the Intel® Distribution of OpenVINO™ is installed to the following directory, referred to as ``: + - For root or administrator: `/opt/intel/openvino_/` + - For regular users: `/home//intel/openvino_/` +For simplicity, a symbolic link to the latest installation is also created: `/opt/intel/openvino_2021/`. > **NOTE**: The Intel® Media SDK component is always installed in the `/opt/intel/mediasdk` directory regardless of the OpenVINO installation path chosen. - 8. A Complete screen indicates that the core components have been installed: ![](../img/openvino-install-linux-04.png) @@ -441,6 +441,32 @@ Congratulations, you have finished the installation of the Intel® Distribution See the [OpenVINO™ Hello World Face Detection Exercise](https://github.com/intel-iot-devkit/inference-tutorials-generic). +## Uninstall the Intel® Distribution of OpenVINO™ Toolkit +Choose one of the options provided below to uninstall the Intel® Distribution of OpenVINO™ Toolkit from your system. + +### Uninstall with GUI +1. Run the uninstallation script from `/openvino_toolkit_uninstaller`: + ```sh + sudo ./uninstall_GUI.sh + ``` +2. Follow the uninstallation wizard instructions. + + +### Uninstall with Command Line (Interactive Mode) +1. Run the uninstallation script from `/openvino_toolkit_uninstaller`: + ```sh + sudo ./uninstall.sh + ``` +2. Follow the instructions on your screen. +4. When uninstallation is complete, press **Enter**. + +### Uninstall with Command Line (Silent Mode) +1. Run the following command from `/openvino_toolkit_uninstaller`: + ```sh + sudo ./uninstall.sh -s + ``` +2. Intel® Distribution of OpenVINO™ Toolkit is now uninstalled from your system. + ## Troubleshooting PRC developers might encounter pip installation related issues during OpenVINO™ installation. To resolve the issues, you may use one of the following options at your discretion: diff --git a/docs/install_guides/installing-openvino-macos.md b/docs/install_guides/installing-openvino-macos.md index 82f488981f5c39..a3e081e7c8e212 100644 --- a/docs/install_guides/installing-openvino-macos.md +++ b/docs/install_guides/installing-openvino-macos.md @@ -66,6 +66,7 @@ The following steps will be covered: 2. Set the OpenVINO environment variables and (optional) Update to .bash_profile. 4. Configure the Model Optimizer. 5. Run verification scripts to verify installation and compile samples. +6. Uninstall the Intel® Distribution of OpenVINO™ Toolkit. ## Install the Intel® Distribution of OpenVINO™ toolkit Core Components @@ -104,13 +105,12 @@ The disk image is mounted to `/Volumes/m_openvino_toolkit_p_` and autom 8. The **Installation summary** screen shows you the default component set to install: ![](../img/openvino-install-macos-03.png) - - If you used **root** or **administrator** privileges to run the installer, it installs the OpenVINO toolkit to `/opt/intel/openvino_/` + By default, the Intel® Distribution of OpenVINO™ is installed to the following directory, referred to as ``: - For simplicity, a symbolic link to the latest installation is also created: `/opt/intel/openvino_2021/` +* For root or administrator: `/opt/intel/openvino_/` +* For regular users: `/home//intel/openvino_/` - - If you used **regular user** privileges to run the installer, it installs the OpenVINO toolkit to `/home//intel/openvino_/` - - For simplicity, a symbolic link to the latest installation is also created: `/home//intel/openvino_2021/` +For simplicity, a symbolic link to the latest installation is also created: `/home//intel/openvino_2021/`. 9. If needed, click **Customize** to change the installation directory or the components you want to install: ![](../img/openvino-install-macos-04.png) @@ -295,6 +295,14 @@ brew install libusb Visit the Intel Distribution of OpenVINO Toolkit [Inference Tutorials for Face Detection and Car Detection Exercises](https://github.com/intel-iot-devkit/inference-tutorials-generic/tree/openvino_toolkit_r3_0) +## Uninstall the Intel® Distribution of OpenVINO™ Toolkit + +Follow the steps below to uninstall the Intel® Distribution of OpenVINO™ Toolkit from your system: + +1. From the ``, locate and open `openvino_toolkit_uninstaller.app`. +2. Follow the uninstallation wizard instructions. +3. When uninstallation is complete, click **Finish**. + ## Additional Resources diff --git a/docs/install_guides/installing-openvino-windows.md b/docs/install_guides/installing-openvino-windows.md index 269c3b057e05e4..af6c16247cb234 100644 --- a/docs/install_guides/installing-openvino-windows.md +++ b/docs/install_guides/installing-openvino-windows.md @@ -36,6 +36,8 @@ Your installation is complete when these are all completed: - Update Windows* environment variables +7. Uninstall the Intel® Distribution of OpenVINO™ Toolkit + ### About the Intel® Distribution of OpenVINO™ toolkit OpenVINO™ toolkit is a comprehensive toolkit for quickly developing applications and solutions that solve a variety of tasks including emulation of human vision, automatic speech recognition, natural language processing, recommendation systems, and many others. Based on latest generations of artificial neural networks, including Convolutional Neural Networks (CNNs), recurrent and attention-based networks, the toolkit extends computer vision and non-vision workloads across Intel® hardware, maximizing performance. It accelerates applications with high-performance, AI and deep learning inference deployed from edge to cloud. @@ -444,6 +446,12 @@ For information on Sample Applications, see the [Inference Engine Samples Overvi Congratulations, you have finished the installation of the Intel® Distribution of OpenVINO™ toolkit for Windows*. To learn more about how the Intel® Distribution of OpenVINO™ toolkit works, the Hello World tutorial and other resources are provided below. +## Uninstall the Intel® Distribution of OpenVINO™ Toolkit +Follow the steps below to uninstall the Intel® Distribution of OpenVINO™ Toolkit from your system: +1. Choose the **Apps & Features** option from the Windows* Settings app. +2. From the list of installed applications, select the Intel® Distribution of OpenVINO™ Toolkit and click **Uninstall**. +3. Follow the uninstallation wizard instructions. +4. When uninstallation is complete, click **Finish**. ## Summary From 17df09967d6a6f33eb3f384bc3c3be0901e89590 Mon Sep 17 00:00:00 2001 From: Nikolay Tyukaev Date: Wed, 9 Dec 2020 17:03:46 +0300 Subject: [PATCH 037/244] math formula fix (#3512) Co-authored-by: Nikolay Tyukaev --- .../convert_model/Legacy_IR_Layers_Catalog_Spec.md | 10 ++++++---- docs/ops/activation/Mish_4.md | 6 +++--- docs/ops/activation/Sigmoid_1.md | 6 +++--- docs/ops/activation/Swish_4.md | 6 +++--- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/docs/MO_DG/prepare_model/convert_model/Legacy_IR_Layers_Catalog_Spec.md b/docs/MO_DG/prepare_model/convert_model/Legacy_IR_Layers_Catalog_Spec.md index dc35ff0fba7271..abd997f36c3f2c 100644 --- a/docs/MO_DG/prepare_model/convert_model/Legacy_IR_Layers_Catalog_Spec.md +++ b/docs/MO_DG/prepare_model/convert_model/Legacy_IR_Layers_Catalog_Spec.md @@ -1582,9 +1582,9 @@ OI, which means that Input changes the fastest, then Output. **Mathematical Formulation** - \f[ - output[:, ... ,:, i, ... , j,:, ... ,:] = input2[:, ... ,:, input1[i, ... ,j],:, ... ,:] - \f] +\f[ + output[:, ... ,:, i, ... , j,:, ... ,:] = input2[:, ... ,:, input1[i, ... ,j],:, ... ,:] +\f] **Inputs** @@ -5086,7 +5086,9 @@ t \in \left ( 0, \quad tiles \right ) Output tensor is populated by values computes in the following way: - output[i1, ..., i(axis-1), j, i(axis+1) ..., iN] = top_k(input[i1, ...., i(axis-1), :, i(axis+1), ..., iN]), k, sort, mode) +\f[ +output[i1, ..., i(axis-1), j, i(axis+1) ..., iN] = top_k(input[i1, ...., i(axis-1), :, i(axis+1), ..., iN]), k, sort, mode) +\f] So for each slice `input[i1, ...., i(axis-1), :, i(axis+1), ..., iN]` which represents 1D array, top_k value is computed individually. Sorting and minimum/maximum are controlled by `sort` and `mode` attributes. diff --git a/docs/ops/activation/Mish_4.md b/docs/ops/activation/Mish_4.md index 6163131e11073f..8eda674f5039f4 100644 --- a/docs/ops/activation/Mish_4.md +++ b/docs/ops/activation/Mish_4.md @@ -26,9 +26,9 @@ For each element from the input tensor calculates corresponding element in the output tensor with the following formula: - \f[ - Mish(x) = x*tanh(ln(1.0+e^{x})) - \f] +\f[ +Mish(x) = x*tanh(ln(1.0+e^{x})) +\f] **Examples** diff --git a/docs/ops/activation/Sigmoid_1.md b/docs/ops/activation/Sigmoid_1.md index 17e012061f9c70..305bd81b1644de 100644 --- a/docs/ops/activation/Sigmoid_1.md +++ b/docs/ops/activation/Sigmoid_1.md @@ -14,9 +14,9 @@ For each element from the input tensor calculates corresponding element in the output tensor with the following formula: - \f[ - sigmoid( x ) = \frac{1}{1+e^{-x}} - \f] +\f[ +sigmoid( x ) = \frac{1}{1+e^{-x}} +\f] **Inputs**: diff --git a/docs/ops/activation/Swish_4.md b/docs/ops/activation/Swish_4.md index e8a51c9dc048db..78bcb3866e7b91 100644 --- a/docs/ops/activation/Swish_4.md +++ b/docs/ops/activation/Swish_4.md @@ -9,9 +9,9 @@ **Detailed description**: For each element from the input tensor calculates corresponding element in the output tensor with the following formula: - \f[ - Swish(x) = x / (1.0 + e^{-(beta * x)}) - \f] +\f[ +Swish(x) = x / (1.0 + e^{-(beta * x)}) +\f] The Swish operation is introduced in the [article](https://arxiv.org/pdf/1710.05941.pdf). From e4260cdc3f867908d932616fd3a02735576c004b Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Wed, 9 Dec 2020 17:13:32 +0300 Subject: [PATCH 038/244] Template device testing (#3521) * Added template plugin testing on public CI * Updated tests config * Added DEVICE_TEMPLATE constant to tests * Updated tests * Disable template plugin by default * Fixes * Fixed HETERO tests --- .ci/azure/linux.yml | 15 ++- .ci/azure/windows.yml | 8 +- CMakeLists.txt | 4 - cmake/features.cmake | 2 + docs/CMakeLists.txt | 4 +- docs/template_plugin/src/CMakeLists.txt | 6 +- .../behavior/config.cpp | 8 +- .../behavior/core_integration.cpp | 106 +++++++++--------- .../behavior/cpp_holders.cpp | 2 +- .../behavior/exec_graph_info.cpp | 2 +- .../behavior/infer_request.cpp | 2 +- .../behavior/infer_request_callback.cpp | 2 +- .../behavior/infer_request_config.cpp | 2 +- .../behavior/infer_request_input.cpp | 2 +- .../behavior/infer_request_output.cpp | 2 +- .../behavior/layout.cpp | 2 +- .../behavior/preprocessing.cpp | 4 +- .../behavior/set_preprocess.cpp | 2 +- .../behavior/test_plugin.cpp | 6 +- .../behavior/version.cpp | 2 +- .../hetero/query_network.cpp | 2 +- .../single_layer_tests/convolution.cpp | 8 +- .../single_layer_tests/reshape.cpp | 4 +- .../single_layer_tests/softmax.cpp | 4 +- .../single_layer_tests/split.cpp | 2 +- .../tests/functional/skip_tests_config.cpp | 18 ++- .../include/behavior/exec_graph_info.hpp | 12 +- .../shared/src/hetero/query_network.cpp | 2 + .../plugin/shared/src/hetero/synthetic.cpp | 10 +- .../common_test_utils/test_constants.hpp | 1 + 30 files changed, 145 insertions(+), 101 deletions(-) diff --git a/.ci/azure/linux.yml b/.ci/azure/linux.yml index 0e0df7af27b3fa..343588be2f5451 100644 --- a/.ci/azure/linux.yml +++ b/.ci/azure/linux.yml @@ -90,7 +90,16 @@ jobs: - task: CMake@1 inputs: # CMake must get Python 3.x version by default - cmakeArgs: -GNinja -DVERBOSE_BUILD=ON -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_PYTHON=ON -DPYTHON_EXECUTABLE=/usr/bin/python3.6 -DENABLE_TESTS=ON -DIE_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)/modules $(REPO_DIR) + cmakeArgs: > + -GNinja + -DVERBOSE_BUILD=ON + -DENABLE_TEMPLATE_PLUGIN=ON + -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) + -DENABLE_PYTHON=ON + -DPYTHON_EXECUTABLE=/usr/bin/python3.6 + -DENABLE_TESTS=ON + -DIE_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)/modules + $(REPO_DIR) workingDirectory: $(BUILD_DIR) - script: ninja @@ -132,6 +141,10 @@ jobs: displayName: 'IE FuncTests' continueOnError: false + - script: $(BIN_DIR)/templateFuncTests --gtest_filter=*smoke* --gtest_output=xml:TEST-templateFuncTests.xml + displayName: 'TEMPLATE FuncTests' + continueOnError: false + - script: $(BIN_DIR)/cpuFuncTests --gtest_filter=*smoke* --gtest_print_time=1 --gtest_output=xml:TEST-cpuFuncTests.xml displayName: 'CPU FuncTests' continueOnError: false diff --git a/.ci/azure/windows.yml b/.ci/azure/windows.yml index 882fecad7f1b02..4ca0a08f76f8f3 100644 --- a/.ci/azure/windows.yml +++ b/.ci/azure/windows.yml @@ -90,7 +90,7 @@ jobs: - script: | set PATH=$(WORK_DIR)\ninja-win;%PATH% - call "$(MSVS_VARS_PATH)" && cmake -GNinja -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_TESTS=ON -DIE_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)\modules -DCMAKE_C_COMPILER:PATH="$(MSVC_COMPILER_PATH)" -DCMAKE_CXX_COMPILER:PATH="$(MSVC_COMPILER_PATH)" $(REPO_DIR) + call "$(MSVS_VARS_PATH)" && cmake -GNinja -DENABLE_TEMPLATE_PLUGIN=ON -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_TESTS=ON -DIE_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)\modules -DCMAKE_C_COMPILER:PATH="$(MSVC_COMPILER_PATH)" -DCMAKE_CXX_COMPILER:PATH="$(MSVC_COMPILER_PATH)" $(REPO_DIR) workingDirectory: $(BUILD_DIR) displayName: 'CMake' @@ -154,6 +154,12 @@ jobs: displayName: 'IE FuncTests' continueOnError: false + - script: | + set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;%PATH% + $(BIN_DIR)\templateFuncTests --gtest_output=xml:TEST-templateFuncTests.xml + displayName: 'TEMPLATE FuncTests' + continueOnError: false + - script: | set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;%PATH% $(BIN_DIR)\cpuFuncTests --gtest_filter=*smoke* --gtest_print_time=1 --gtest_output=xml:TEST-cpuFuncTests.xml diff --git a/CMakeLists.txt b/CMakeLists.txt index d6bf93044b9ce5..ff0a58f05c21d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -120,7 +120,6 @@ function(build_ngraph) endfunction() file(REMOVE "${CMAKE_BINARY_DIR}/openvino_targets_developer.cmake") - unset(OpenVINODeveloperPackageTargets CACHE) function(openvino_developer_export_targets) @@ -145,11 +144,8 @@ function(openvino_developer_export_targets) endfunction() add_subdirectory(openvino) - build_ngraph() - add_subdirectory(inference-engine) - add_subdirectory(model-optimizer) add_subdirectory(docs) diff --git a/cmake/features.cmake b/cmake/features.cmake index a99de90445a92f..e0a8d7ee40f7f6 100644 --- a/cmake/features.cmake +++ b/cmake/features.cmake @@ -58,6 +58,8 @@ ie_dependent_option(ENABLE_CPPLINT "Enable cpplint checks during the build" ON " ie_dependent_option(ENABLE_CPPLINT_REPORT "Build cpplint report instead of failing the build" OFF "ENABLE_CPPLINT" OFF) +ie_option(ENABLE_TEMPLATE_PLUGIN "Register template plugin into plugins.xml" OFF) + ie_option(ENABLE_CLANG_FORMAT "Enable clang-format checks during the build" ON) ie_option_enum(SELECTIVE_BUILD "Enable OpenVINO conditional compilation or statistics collection. \ diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 8c8d9b95036a73..3ca9985fbb8127 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -224,9 +224,9 @@ function(build_docs) # added linkcheker - if(EXISTS "${LINKCHECKER}") + if(EXISTS "${LINKCHECKER_PY}") add_custom_target(docs_check - COMMAND ${Python3_EXECUTABLE} "${LINKCHECKER}" -v "${DOCS_BUILD_DIR}/html/" + COMMAND ${Python3_EXECUTABLE} "${LINKCHECKER_PY}" -v "${DOCS_BUILD_DIR}/html/" COMMENT "Check links in generated documentation" WORKING_DIRECTORY "${DOCS_BUILD_DIR}" VERBATIM) diff --git a/docs/template_plugin/src/CMakeLists.txt b/docs/template_plugin/src/CMakeLists.txt index 8c4fa6937c1a54..6332fc04e1536d 100644 --- a/docs/template_plugin/src/CMakeLists.txt +++ b/docs/template_plugin/src/CMakeLists.txt @@ -33,8 +33,10 @@ target_link_libraries(${TARGET_NAME} PRIVATE set_target_properties(${TARGET_NAME} PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO}) # ATTENTION: uncomment to register a plugin in the plugins.xml file -# ie_register_plugins(MAIN_TARGET ${TARGET_NAME} -# POSSIBLE_PLUGINS ${TARGET_NAME}) +if(ENABLE_TEMPLATE_PLUGIN) + ie_register_plugins(MAIN_TARGET ${TARGET_NAME} + POSSIBLE_PLUGINS ${TARGET_NAME}) +endif() # [cmake:plugin] # ATTENTION: uncomment to install component diff --git a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/config.cpp b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/config.cpp index 981e0527a9b7a9..8b714fca32798b 100644 --- a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/config.cpp +++ b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/config.cpp @@ -29,14 +29,14 @@ const std::vector> inconfigs = { INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, IncorrectConfigTests, ::testing::Combine( ::testing::ValuesIn(netPrecisions), - ::testing::Values("TEMPLATE"), + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE), ::testing::ValuesIn(inconfigs)), IncorrectConfigTests::getTestCaseName); INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, IncorrectConfigAPITests, ::testing::Combine( ::testing::ValuesIn(netPrecisions), - ::testing::Values("TEMPLATE"), + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE), ::testing::ValuesIn(inconfigs)), IncorrectConfigAPITests::getTestCaseName); @@ -44,14 +44,14 @@ INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, IncorrectConfigAPITests, INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, CorrectConfigAPITests, ::testing::Combine( ::testing::ValuesIn(netPrecisions), - ::testing::Values("TEMPLATE"), + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE), ::testing::ValuesIn(configs)), CorrectConfigAPITests::getTestCaseName); INSTANTIATE_TEST_CASE_P(smoke_Multi_BehaviorTests, CorrectConfigTests, ::testing::Combine( ::testing::ValuesIn(netPrecisions), - ::testing::Values("TEMPLATE"), + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE), ::testing::ValuesIn(configs)), CorrectConfigAPITests::getTestCaseName); diff --git a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/core_integration.cpp b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/core_integration.cpp index 5a4562eee63351..f9c51e91fbb595 100644 --- a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/core_integration.cpp +++ b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/core_integration.cpp @@ -17,52 +17,52 @@ namespace { // INSTANTIATE_TEST_CASE_P( - nightly_IEClassBasicTestP, IEClassBasicTestP, - ::testing::Values(std::make_pair("templatePlugin", "TEMPLATE"))); + smoke_IEClassBasicTestP, IEClassBasicTestP, + ::testing::Values(std::make_pair("templatePlugin", CommonTestUtils::DEVICE_TEMPLATE))); INSTANTIATE_TEST_CASE_P( - nightly_IEClassNetworkTestP, IEClassNetworkTestP, - ::testing::Values("TEMPLATE")); + smoke_IEClassNetworkTestP, IEClassNetworkTestP, + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)); // // IE Class GetMetric // INSTANTIATE_TEST_CASE_P( - nightly_IEClassGetMetricTest, IEClassGetMetricTest_SUPPORTED_CONFIG_KEYS, - ::testing::Values("TEMPLATE")); + smoke_IEClassGetMetricTest, IEClassGetMetricTest_SUPPORTED_CONFIG_KEYS, + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)); INSTANTIATE_TEST_CASE_P( - nightly_IEClassGetMetricTest, IEClassGetMetricTest_SUPPORTED_METRICS, - ::testing::Values("TEMPLATE")); + smoke_IEClassGetMetricTest, IEClassGetMetricTest_SUPPORTED_METRICS, + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)); INSTANTIATE_TEST_CASE_P( - nightly_IEClassGetMetricTest, IEClassGetMetricTest_AVAILABLE_DEVICES, - ::testing::Values("TEMPLATE")); + smoke_IEClassGetMetricTest, IEClassGetMetricTest_AVAILABLE_DEVICES, + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)); INSTANTIATE_TEST_CASE_P( - nightly_IEClassGetMetricTest, IEClassGetMetricTest_FULL_DEVICE_NAME, - ::testing::Values("TEMPLATE")); + smoke_IEClassGetMetricTest, IEClassGetMetricTest_FULL_DEVICE_NAME, + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)); INSTANTIATE_TEST_CASE_P( - nightly_IEClassGetMetricTest, IEClassGetMetricTest_OPTIMIZATION_CAPABILITIES, - ::testing::Values("TEMPLATE")); + smoke_IEClassGetMetricTest, IEClassGetMetricTest_OPTIMIZATION_CAPABILITIES, + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)); INSTANTIATE_TEST_CASE_P( - nightly_IEClassGetMetricTest, IEClassGetMetricTest_RANGE_FOR_ASYNC_INFER_REQUESTS, - ::testing::Values("TEMPLATE")); + smoke_IEClassGetMetricTest, IEClassGetMetricTest_RANGE_FOR_ASYNC_INFER_REQUESTS, + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)); INSTANTIATE_TEST_CASE_P( - nightly_IEClassGetMetricTest, IEClassGetMetricTest_ThrowUnsupported, - ::testing::Values("TEMPLATE")); + smoke_IEClassGetMetricTest, IEClassGetMetricTest_ThrowUnsupported, + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)); INSTANTIATE_TEST_CASE_P( - nightly_IEClassGetConfigTest, IEClassGetConfigTest_ThrowUnsupported, - ::testing::Values("TEMPLATE")); + smoke_IEClassGetConfigTest, IEClassGetConfigTest_ThrowUnsupported, + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)); INSTANTIATE_TEST_CASE_P( - nightly_IEClassGetAvailableDevices, IEClassGetAvailableDevices, - ::testing::Values("TEMPLATE")); + smoke_IEClassGetAvailableDevices, IEClassGetAvailableDevices, + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)); // @@ -71,7 +71,7 @@ INSTANTIATE_TEST_CASE_P( using IEClassSetConfigTestHETERO = IEClassNetworkTest; -TEST_F(IEClassSetConfigTestHETERO, nightly_SetConfigNoThrow) { +TEST_F(IEClassSetConfigTestHETERO, smoke_SetConfigNoThrow) { { Core ie; Parameter p; @@ -112,15 +112,15 @@ TEST_F(IEClassSetConfigTestHETERO, nightly_SetConfigNoThrow) { // INSTANTIATE_TEST_CASE_P( - nightly_IEClassGetConfigTest, IEClassGetConfigTest, - ::testing::Values("TEMPLATE")); + smoke_IEClassGetConfigTest, IEClassGetConfigTest, + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)); using IEClassGetConfigTestTEMPLATE = IEClassNetworkTest; -TEST_F(IEClassGetConfigTestTEMPLATE, nightly_GetConfigNoThrow) { +TEST_F(IEClassGetConfigTestTEMPLATE, smoke_GetConfigNoThrow) { Core ie; Parameter p; - std::string deviceName = "TEMPLATE"; + std::string deviceName = CommonTestUtils::DEVICE_TEMPLATE; ASSERT_NO_THROW(p = ie.GetMetric(deviceName, METRIC_KEY(SUPPORTED_CONFIG_KEYS))); std::vector configValues = p; @@ -144,47 +144,47 @@ TEST_F(IEClassGetConfigTestTEMPLATE, nightly_GetConfigNoThrow) { // INSTANTIATE_TEST_CASE_P( - nightly_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS, - ::testing::Values("TEMPLATE", "MULTI:TEMPLATE", "HETERO:TEMPLATE")); + smoke_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS, + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE, "MULTI:TEMPLATE", "HETERO:TEMPLATE")); INSTANTIATE_TEST_CASE_P( - nightly_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_SUPPORTED_METRICS, - ::testing::Values("TEMPLATE", "MULTI:TEMPLATE", "HETERO:TEMPLATE")); + smoke_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_SUPPORTED_METRICS, + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE, "MULTI:TEMPLATE", "HETERO:TEMPLATE")); INSTANTIATE_TEST_CASE_P( - nightly_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_NETWORK_NAME, - ::testing::Values("TEMPLATE", "MULTI:TEMPLATE", "HETERO:TEMPLATE")); + smoke_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_NETWORK_NAME, + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE, "MULTI:TEMPLATE", "HETERO:TEMPLATE")); INSTANTIATE_TEST_CASE_P( - nightly_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_OPTIMAL_NUMBER_OF_INFER_REQUESTS, - ::testing::Values("TEMPLATE", "MULTI:TEMPLATE", "HETERO:TEMPLATE")); + smoke_IEClassExecutableNetworkGetMetricTest, IEClassExecutableNetworkGetMetricTest_OPTIMAL_NUMBER_OF_INFER_REQUESTS, + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE, "MULTI:TEMPLATE", "HETERO:TEMPLATE")); INSTANTIATE_TEST_CASE_P( - nightly_IEClassExecutableNetworkGetMetricTest_ThrowsUnsupported, IEClassExecutableNetworkGetMetricTest, - ::testing::Values("TEMPLATE", "MULTI:TEMPLATE", "HETERO:TEMPLATE")); + smoke_IEClassExecutableNetworkGetMetricTest_ThrowsUnsupported, IEClassExecutableNetworkGetMetricTest, + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE, "MULTI:TEMPLATE", "HETERO:TEMPLATE")); // // Executable Network GetConfig / SetConfig // INSTANTIATE_TEST_CASE_P( - nightly_IEClassExecutableNetworkGetConfigTest, IEClassExecutableNetworkGetConfigTest, - ::testing::Values("TEMPLATE")); + smoke_IEClassExecutableNetworkGetConfigTest, IEClassExecutableNetworkGetConfigTest, + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)); INSTANTIATE_TEST_CASE_P( - nightly_IEClassExecutableNetworkSetConfigTest, IEClassExecutableNetworkSetConfigTest, - ::testing::Values("TEMPLATE")); + smoke_IEClassExecutableNetworkSetConfigTest, IEClassExecutableNetworkSetConfigTest, + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)); // IE Class Query network INSTANTIATE_TEST_CASE_P( - nightly_IEClassQueryNetworkTest, IEClassQueryNetworkTest, - ::testing::Values("TEMPLATE")); + smoke_IEClassQueryNetworkTest, IEClassQueryNetworkTest, + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)); // IE Class Load network INSTANTIATE_TEST_CASE_P( - nightly_IEClassLoadNetworkTest, IEClassLoadNetworkTest, - ::testing::Values("TEMPLATE")); + smoke_IEClassLoadNetworkTest, IEClassLoadNetworkTest, + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)); // // Hetero Executable Network GetMetric @@ -193,20 +193,20 @@ INSTANTIATE_TEST_CASE_P( #ifdef ENABLE_MKL_DNN INSTANTIATE_TEST_CASE_P( - nightly_IEClassHeteroExecutableNetworlGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS, - ::testing::Values("TEMPLATE")); + smoke_IEClassHeteroExecutableNetworlGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS, + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)); INSTANTIATE_TEST_CASE_P( - nightly_IEClassHeteroExecutableNetworlGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_METRICS, - ::testing::Values("TEMPLATE")); + smoke_IEClassHeteroExecutableNetworlGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_METRICS, + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)); INSTANTIATE_TEST_CASE_P( - nightly_IEClassHeteroExecutableNetworlGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_NETWORK_NAME, - ::testing::Values("TEMPLATE")); + smoke_IEClassHeteroExecutableNetworlGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_NETWORK_NAME, + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)); INSTANTIATE_TEST_CASE_P( - nightly_IEClassHeteroExecutableNetworlGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_TARGET_FALLBACK, - ::testing::Values("TEMPLATE")); + smoke_IEClassHeteroExecutableNetworlGetMetricTest, IEClassHeteroExecutableNetworkGetMetricTest_TARGET_FALLBACK, + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)); #endif // ENABLE_MKL_DNN } // namespace \ No newline at end of file diff --git a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/cpp_holders.cpp b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/cpp_holders.cpp index 354572bbaf295c..cd50234d30af20 100644 --- a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/cpp_holders.cpp +++ b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/cpp_holders.cpp @@ -22,7 +22,7 @@ const std::vector> orders = { INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, HoldersTest, ::testing::Combine( - ::testing::Values("TEMPLATE"), + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE), ::testing::ValuesIn(orders)), HoldersTest::getTestCaseName); diff --git a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/exec_graph_info.cpp b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/exec_graph_info.cpp index 8951fdd037b11f..ecaa8620dc0ea4 100644 --- a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/exec_graph_info.cpp +++ b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/exec_graph_info.cpp @@ -22,7 +22,7 @@ const std::vector> configs = { INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, ExecGraphTests, ::testing::Combine( ::testing::ValuesIn(netPrecisions), - ::testing::Values("TEMPLATE"), + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE), ::testing::ValuesIn(configs)), ExecGraphTests::getTestCaseName); diff --git a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request.cpp b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request.cpp index be37bf7bff8a84..d689497dd36e6b 100644 --- a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request.cpp +++ b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request.cpp @@ -22,7 +22,7 @@ const std::vector> configs = { INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, InferRequestTests, ::testing::Combine( ::testing::ValuesIn(netPrecisions), - ::testing::Values("TEMPLATE"), + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE), ::testing::ValuesIn(configs)), InferRequestTests::getTestCaseName); diff --git a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request_callback.cpp b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request_callback.cpp index 8b02fad1a403c1..5349d1c32c1e7b 100644 --- a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request_callback.cpp +++ b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request_callback.cpp @@ -22,7 +22,7 @@ const std::vector> configs = { INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, CallbackTests, ::testing::Combine( ::testing::ValuesIn(netPrecisions), - ::testing::Values("TEMPLATE"), + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE), ::testing::ValuesIn(configs)), CallbackTests::getTestCaseName); } // namespace diff --git a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request_config.cpp b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request_config.cpp index 1ad90802218609..df830d9cad843d 100644 --- a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request_config.cpp +++ b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request_config.cpp @@ -22,7 +22,7 @@ const std::vector> configs = { INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, InferConfigTests, ::testing::Combine( ::testing::ValuesIn(netPrecisions), - ::testing::Values("TEMPLATE"), + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE), ::testing::ValuesIn(configs)), InferConfigTests::getTestCaseName); diff --git a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request_input.cpp b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request_input.cpp index 91154881495d4d..6bd1095c0c1235 100644 --- a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request_input.cpp +++ b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request_input.cpp @@ -22,7 +22,7 @@ const std::vector> configs = { INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, InferRequestInputTests, ::testing::Combine( ::testing::ValuesIn(netPrecisions), - ::testing::Values("TEMPLATE"), + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE), ::testing::ValuesIn(configs)), InferRequestInputTests::getTestCaseName); diff --git a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request_output.cpp b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request_output.cpp index 0bb9bd7583085f..47a1c3f014869d 100644 --- a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request_output.cpp +++ b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/infer_request_output.cpp @@ -22,7 +22,7 @@ const std::vector> configs = { INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, InferRequestOutputTests, ::testing::Combine( ::testing::ValuesIn(netPrecisions), - ::testing::Values("TEMPLATE"), + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE), ::testing::ValuesIn(configs)), InferRequestOutputTests::getTestCaseName); diff --git a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/layout.cpp b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/layout.cpp index 96a25da7a32d8f..a3b244befc2e23 100644 --- a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/layout.cpp +++ b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/layout.cpp @@ -29,7 +29,7 @@ const std::vector> inputShapes = { INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, LayoutTest, ::testing::Combine( ::testing::Values(InferenceEngine::Precision::FP32), - ::testing::Values("TEMPLATE"), + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE), ::testing::ValuesIn(configs), ::testing::ValuesIn(Layout), ::testing::ValuesIn(inputShapes)), diff --git a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/preprocessing.cpp b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/preprocessing.cpp index 344ceacf4da865..49901287457bab 100644 --- a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/preprocessing.cpp +++ b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/preprocessing.cpp @@ -24,7 +24,7 @@ INSTANTIATE_TEST_CASE_P(PreprocessingPrecisionConvertTestsViaSetInput, Preproces ::testing::ValuesIn(inputPrecisions), ::testing::Values(1, 2, 3, 4, 5), // Number of input tensor channels ::testing::Values(true), // Use SetInput - ::testing::Values("TEMPLATE"), + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE), ::testing::ValuesIn(configs)), PreprocessingPrecisionConvertTest::getTestCaseName); @@ -33,7 +33,7 @@ INSTANTIATE_TEST_CASE_P(PreprocessingPrecisionConvertTestsViaGetBlob, Preprocess ::testing::ValuesIn(inputPrecisions), ::testing::Values(4, 5), // Number of input tensor channels (blob_copy only supports 4d and 5d tensors) ::testing::Values(false), // use GetBlob - ::testing::Values("TEMPLATE"), + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE), ::testing::ValuesIn(configs)), PreprocessingPrecisionConvertTest::getTestCaseName); diff --git a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/set_preprocess.cpp b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/set_preprocess.cpp index bd87269a9a058b..c90fdefc88a4a6 100644 --- a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/set_preprocess.cpp +++ b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/set_preprocess.cpp @@ -22,7 +22,7 @@ const std::vector> configs = { INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, PreprocessTest, ::testing::Combine( ::testing::ValuesIn(netPrecisions), - ::testing::Values("TEMPLATE"), + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE), ::testing::ValuesIn(configs)), PreprocessTest::getTestCaseName); diff --git a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/test_plugin.cpp b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/test_plugin.cpp index a6c11635869ce2..70f5dd83d357f9 100644 --- a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/test_plugin.cpp +++ b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/test_plugin.cpp @@ -20,21 +20,21 @@ const std::vector> configs = { INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, BehaviorTests, ::testing::Combine( ::testing::Values(InferenceEngine::Precision::FP32), - ::testing::Values("TEMPLATE"), + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE), ::testing::ValuesIn(configs)), BehaviorTests::getTestCaseName); INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, BehaviorTestInput, ::testing::Combine( ::testing::ValuesIn(netPrecisions), - ::testing::Values("TEMPLATE"), + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE), ::testing::ValuesIn(configs)), BehaviorTestInput::getTestCaseName); INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, BehaviorTestOutput, ::testing::Combine( ::testing::ValuesIn(netPrecisions), - ::testing::Values("TEMPLATE"), + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE), ::testing::ValuesIn(configs)), BehaviorTestOutput::getTestCaseName); diff --git a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/version.cpp b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/version.cpp index 131e6872c687d3..11e71777566def 100644 --- a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/version.cpp +++ b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/version.cpp @@ -15,7 +15,7 @@ const std::vector> configs = { INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, VersionTest, ::testing::Combine( ::testing::Values(InferenceEngine::Precision::FP32), - ::testing::Values("TEMPLATE"), + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE), ::testing::ValuesIn(configs)), VersionTest::getTestCaseName); diff --git a/docs/template_plugin/tests/functional/shared_tests_instances/hetero/query_network.cpp b/docs/template_plugin/tests/functional/shared_tests_instances/hetero/query_network.cpp index 53d77774d83fea..98d41cb452e67f 100644 --- a/docs/template_plugin/tests/functional/shared_tests_instances/hetero/query_network.cpp +++ b/docs/template_plugin/tests/functional/shared_tests_instances/hetero/query_network.cpp @@ -15,7 +15,7 @@ auto ConvBias = ngraph::builder::subgraph::makeConvBias(); INSTANTIATE_TEST_CASE_P(smoke_FullySupportedTopologies, QueryNetworkTest, ::testing::Combine( - ::testing::Values("TEMPLATE", "HETERO:TEMPLATE", "MULTI:TEMPLATE"), + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE, "HETERO:TEMPLATE", "MULTI:TEMPLATE"), ::testing::Values(ConvBias)), QueryNetworkTest::getTestCaseName); } // namespace diff --git a/docs/template_plugin/tests/functional/shared_tests_instances/single_layer_tests/convolution.cpp b/docs/template_plugin/tests/functional/shared_tests_instances/single_layer_tests/convolution.cpp index d4a5dd02f09906..675b607de2b5b5 100644 --- a/docs/template_plugin/tests/functional/shared_tests_instances/single_layer_tests/convolution.cpp +++ b/docs/template_plugin/tests/functional/shared_tests_instances/single_layer_tests/convolution.cpp @@ -65,7 +65,7 @@ INSTANTIATE_TEST_CASE_P(Convolution2D_ExplicitPadding, ConvolutionLayerTest, ::testing::Values(InferenceEngine::Layout::ANY), ::testing::Values(InferenceEngine::Layout::ANY), ::testing::Values(std::vector({1, 3, 30, 30})), - ::testing::Values("TEMPLATE")), + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)), ConvolutionLayerTest::getTestCaseName); // ! [test_convolution:instantiate] @@ -78,7 +78,7 @@ INSTANTIATE_TEST_CASE_P(Convolution2D_AutoPadValid, ConvolutionLayerTest, ::testing::Values(InferenceEngine::Layout::ANY), ::testing::Values(InferenceEngine::Layout::ANY), ::testing::Values(std::vector({1, 3, 30, 30})), - ::testing::Values("TEMPLATE")), + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)), ConvolutionLayerTest::getTestCaseName); /* ============= 3D Convolution ============= */ @@ -121,7 +121,7 @@ INSTANTIATE_TEST_CASE_P(Convolution3D_ExplicitPadding, ConvolutionLayerTest, ::testing::Values(InferenceEngine::Layout::ANY), ::testing::Values(InferenceEngine::Layout::ANY), ::testing::Values(std::vector({1, 3, 10, 10, 10})), - ::testing::Values("TEMPLATE")), + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)), ConvolutionLayerTest::getTestCaseName); INSTANTIATE_TEST_CASE_P(Convolution3D_AutoPadValid, ConvolutionLayerTest, @@ -133,7 +133,7 @@ INSTANTIATE_TEST_CASE_P(Convolution3D_AutoPadValid, ConvolutionLayerTest, ::testing::Values(InferenceEngine::Layout::ANY), ::testing::Values(InferenceEngine::Layout::ANY), ::testing::Values(std::vector({1, 3, 10, 10, 10})), - ::testing::Values("TEMPLATE")), + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)), ConvolutionLayerTest::getTestCaseName); } // namespace diff --git a/docs/template_plugin/tests/functional/shared_tests_instances/single_layer_tests/reshape.cpp b/docs/template_plugin/tests/functional/shared_tests_instances/single_layer_tests/reshape.cpp index f9c0fc623d1bb3..10561e623967c2 100644 --- a/docs/template_plugin/tests/functional/shared_tests_instances/single_layer_tests/reshape.cpp +++ b/docs/template_plugin/tests/functional/shared_tests_instances/single_layer_tests/reshape.cpp @@ -24,7 +24,7 @@ INSTANTIATE_TEST_CASE_P(ReshapeCheckDynBatch, ReshapeLayerTest, ::testing::Values(InferenceEngine::Layout::ANY), ::testing::Values(std::vector({30, 30, 30, 30})), ::testing::Values(std::vector({30, 30, 30, 30})), - ::testing::Values("TEMPLATE"), + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE), ::testing::Values(std::map({}))), ReshapeLayerTest::getTestCaseName); @@ -38,7 +38,7 @@ INSTANTIATE_TEST_CASE_P(ReshapeCheck, ReshapeLayerTest, ::testing::Values(InferenceEngine::Layout::ANY), ::testing::Values(std::vector({10, 10, 10, 10})), ::testing::Values(std::vector({10, 0, 100})), - ::testing::Values("TEMPLATE"), + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE), ::testing::Values(std::map({}))), ReshapeLayerTest::getTestCaseName); } // namespace \ No newline at end of file diff --git a/docs/template_plugin/tests/functional/shared_tests_instances/single_layer_tests/softmax.cpp b/docs/template_plugin/tests/functional/shared_tests_instances/single_layer_tests/softmax.cpp index 0d6df87ff32d74..290b0a2fd96930 100644 --- a/docs/template_plugin/tests/functional/shared_tests_instances/single_layer_tests/softmax.cpp +++ b/docs/template_plugin/tests/functional/shared_tests_instances/single_layer_tests/softmax.cpp @@ -37,7 +37,7 @@ const auto params2D = testing::Combine( testing::Values(InferenceEngine::Layout::ANY), testing::ValuesIn(inputShapes2D), testing::ValuesIn(axis2D), - testing::Values("TEMPLATE"), + testing::Values(CommonTestUtils::DEVICE_TEMPLATE), testing::Values(std::map()) ); @@ -64,7 +64,7 @@ const auto params4D = testing::Combine( testing::Values(InferenceEngine::Layout::ANY), testing::ValuesIn(inputShapes4D), testing::ValuesIn(axis4D), - testing::Values("TEMPLATE"), + testing::Values(CommonTestUtils::DEVICE_TEMPLATE), testing::Values(std::map()) ); diff --git a/docs/template_plugin/tests/functional/shared_tests_instances/single_layer_tests/split.cpp b/docs/template_plugin/tests/functional/shared_tests_instances/single_layer_tests/split.cpp index fdb1901dbb3d2c..1372a797e28d74 100644 --- a/docs/template_plugin/tests/functional/shared_tests_instances/single_layer_tests/split.cpp +++ b/docs/template_plugin/tests/functional/shared_tests_instances/single_layer_tests/split.cpp @@ -22,7 +22,7 @@ INSTANTIATE_TEST_CASE_P(NumSplitsCheck, SplitLayerTest, ::testing::Values(InferenceEngine::Layout::ANY), ::testing::Values(std::vector({30, 30, 30, 30})), ::testing::Values(std::vector({})), - ::testing::Values("TEMPLATE")), + ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)), SplitLayerTest::getTestCaseName); } // namespace diff --git a/docs/template_plugin/tests/functional/skip_tests_config.cpp b/docs/template_plugin/tests/functional/skip_tests_config.cpp index f44a56087972c4..0e3979b5d2cc61 100644 --- a/docs/template_plugin/tests/functional/skip_tests_config.cpp +++ b/docs/template_plugin/tests/functional/skip_tests_config.cpp @@ -11,8 +11,20 @@ std::vector disabledTestPatterns() { return { ".*ExclusiveAsyncRequests.*", ".*reusableCPUStreamsExecutor.*", - ".*registerPlugin.*", - ".*IEClassGetAvailableDevices.*", - R"(.*SplitLayerTest.*numSplits\=30.*)" + R"(.*SplitLayerTest.*numSplits\=30.*)", + // CVS-44775: for all cases below + ".*Hetero.*", + ".*QueryNetwork.*", + ".*SetAffinityWithKSO.*", + ".*queryNetworkResultContainAllAndOnlyInputLayers.*", + R"(.*IEClassExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS.*)", + R"(.*IEClassExecutableNetworkGetMetricTest_SUPPORTED_METRICS.*/2)", + R"(.*IEClassExecutableNetworkGetMetricTest_NETWORK_NAME.*/2)", + R"(.*IEClassExecutableNetworkGetMetricTest_OPTIMAL_NUMBER_OF_INFER_REQUESTS.*/2)", + ".*LoadNetworkActualHeteroDeviceNoThrow.*", + ".*LoadNetworkActualHeteroDevice2NoThrow.*", + ".*IEClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS.*", + // CVS-44774 + ".*PreprocessTest.*", }; } \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/exec_graph_info.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/exec_graph_info.hpp index bc060854e77782..e8d85ef8c5eb9b 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/exec_graph_info.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/exec_graph_info.hpp @@ -59,7 +59,9 @@ TEST_P(ExecGraphTests, CheckExecGraphInfoBeforeExecution) { // Create CNNNetwork from ngrpah::Function InferenceEngine::CNNNetwork cnnNet(function); InferenceEngine::CNNNetwork execGraph; - if (targetDevice != CommonTestUtils::DEVICE_MULTI && targetDevice != CommonTestUtils::DEVICE_GNA) { + if (targetDevice != CommonTestUtils::DEVICE_MULTI && + targetDevice != CommonTestUtils::DEVICE_TEMPLATE && + targetDevice != CommonTestUtils::DEVICE_GNA) { // Load CNNNetwork to target plugins auto execNet = ie->LoadNetwork(cnnNet, targetDevice, configuration); ASSERT_NO_THROW(execGraph = execNet.GetExecGraphInfo()); @@ -146,7 +148,9 @@ TEST_P(ExecGraphTests, CheckExecGraphInfoAfterExecution) { // Create CNNNetwork from ngrpah::Function InferenceEngine::CNNNetwork cnnNet(function); InferenceEngine::CNNNetwork execGraph; - if (targetDevice != CommonTestUtils::DEVICE_MULTI && targetDevice != CommonTestUtils::DEVICE_GNA) { + if (targetDevice != CommonTestUtils::DEVICE_MULTI && + targetDevice != CommonTestUtils::DEVICE_TEMPLATE && + targetDevice != CommonTestUtils::DEVICE_GNA) { // Load CNNNetwork to target plugins auto execNet = ie->LoadNetwork(cnnNet, targetDevice, configuration); ASSERT_NO_THROW(execGraph = execNet.GetExecGraphInfo()); @@ -250,7 +254,9 @@ TEST_P(ExecGraphTests, CheckExecGraphInfoSerialization) { // Create CNNNetwork from ngrpah::Function InferenceEngine::CNNNetwork cnnNet(function); InferenceEngine::CNNNetwork execGraph; - if (targetDevice != CommonTestUtils::DEVICE_MULTI && targetDevice != CommonTestUtils::DEVICE_GNA) { + if (targetDevice != CommonTestUtils::DEVICE_MULTI && + targetDevice != CommonTestUtils::DEVICE_TEMPLATE && + targetDevice != CommonTestUtils::DEVICE_GNA) { // Load CNNNetwork to target plugins auto execNet = ie->LoadNetwork(cnnNet, targetDevice, configuration); ASSERT_NO_THROW(execGraph = execNet.GetExecGraphInfo()); diff --git a/inference-engine/tests/functional/plugin/shared/src/hetero/query_network.cpp b/inference-engine/tests/functional/plugin/shared/src/hetero/query_network.cpp index 5926ad98b6fa11..cbae179dc95f4e 100644 --- a/inference-engine/tests/functional/plugin/shared/src/hetero/query_network.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/hetero/query_network.cpp @@ -23,6 +23,8 @@ std::string QueryNetworkTest::getTestCaseName(const ::testing::TestParamInfoQueryNetwork(cnnNetwork, std::get(param)); ASSERT_NE(nullptr, cnnNetwork.getFunction()); diff --git a/inference-engine/tests/functional/plugin/shared/src/hetero/synthetic.cpp b/inference-engine/tests/functional/plugin/shared/src/hetero/synthetic.cpp index 1dbb29142a49c9..06567643092829 100644 --- a/inference-engine/tests/functional/plugin/shared/src/hetero/synthetic.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/hetero/synthetic.cpp @@ -110,8 +110,10 @@ void HeteroSyntheticTest::SetUp() { } void HeteroSyntheticTest::TearDown() { - for (auto&& pluginName : _registredPlugins) { - PluginCache::get().ie()->UnregisterPlugin(pluginName); + if (!FuncTestUtils::SkipTestsConfig::currentTestIsDisabled()) { + for (auto&& pluginName : _registredPlugins) { + PluginCache::get().ie()->UnregisterPlugin(pluginName); + } } } @@ -144,7 +146,9 @@ TEST_P(HeteroSyntheticTest, someLayersToMajorPluginOthersToFallback) { auto affinities = SetUpAffinity(); SCOPED_TRACE(affinities); Run(); - ASSERT_NE(nullptr, cnnNetwork.getFunction()); + if (!FuncTestUtils::SkipTestsConfig::currentTestIsDisabled()) { + ASSERT_NE(nullptr, cnnNetwork.getFunction()); + } } } // namespace HeteroTests diff --git a/inference-engine/tests/ie_test_utils/common_test_utils/test_constants.hpp b/inference-engine/tests/ie_test_utils/common_test_utils/test_constants.hpp index 3577ab049c2315..466b3c3016f3b2 100644 --- a/inference-engine/tests/ie_test_utils/common_test_utils/test_constants.hpp +++ b/inference-engine/tests/ie_test_utils/common_test_utils/test_constants.hpp @@ -13,6 +13,7 @@ const char DEVICE_FPGA[] = "FPGA"; const char DEVICE_MYRIAD[] = "MYRIAD"; const char DEVICE_KEEMBAY[] = "VPUX"; const char DEVICE_MULTI[] = "MULTI"; +const char DEVICE_TEMPLATE[] = "TEMPLATE"; const char DEVICE_HETERO[] = "HETERO"; #ifdef _WIN32 From 6254b150c337796bd41fe37406b17bd8022e110d Mon Sep 17 00:00:00 2001 From: Nikolay Tyukaev Date: Thu, 10 Dec 2020 02:30:10 +0300 Subject: [PATCH 039/244] add animation (#2865) (#3545) --- docs/benchmarks/performance_benchmarks.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/benchmarks/performance_benchmarks.md b/docs/benchmarks/performance_benchmarks.md index 9f172d82d99ae8..9247d63541ba28 100644 --- a/docs/benchmarks/performance_benchmarks.md +++ b/docs/benchmarks/performance_benchmarks.md @@ -19,6 +19,7 @@ Measuring inference performance involves many variables and is extremely use-cas + \endhtmlonly From 6f512142b6cef760e4448308996feb2f024ee8c4 Mon Sep 17 00:00:00 2001 From: Eugeny Volosenkov Date: Thu, 10 Dec 2020 09:24:24 +0300 Subject: [PATCH 040/244] Re-implement onnx old-style extractors with extractor extensions (#3459) * add class ConcatFrontExtractor for onnx * add class ConcatFrontExtractor for onnx * Delete concat from mo/front/onnx/extractor.py * Add identity, reshape extractors classes for onnx * import FrontExtractorOp * Added BatchNormalizationExtractor * Added extra line * Fix import modules * fix caffe bn.py and bn_test.py * Fix BatchNormInference * Modify convert_batch_norm * Modify convert_batch_norm * Modify bn_test.py * Fix old comments BN->batchNormInference --- model-optimizer/automation/package_BOM.txt | 12 +++---- model-optimizer/extensions/front/caffe/bn.py | 2 +- .../extensions/front/caffe/bn_test.py | 2 +- .../front/onnx/concat_ext.py} | 33 +++++++++---------- .../front/onnx/fused_bn_ext.py} | 26 ++++++++------- .../front/onnx/identity_ext.py} | 17 +++++----- .../front/onnx/reshape_ext.py} | 25 +++++++------- model-optimizer/extensions/middle/fusings.py | 2 +- .../ops/{bn.py => BatchNormInference.py} | 16 +++++---- model-optimizer/mo/front/onnx/extractor.py | 12 +------ .../mo/middle/passes/fusing/decomposition.py | 2 +- 11 files changed, 72 insertions(+), 77 deletions(-) rename model-optimizer/{mo/front/onnx/extractors/eltwise.py => extensions/front/onnx/concat_ext.py} (54%) rename model-optimizer/{mo/front/onnx/extractors/fused_bn.py => extensions/front/onnx/fused_bn_ext.py} (58%) rename model-optimizer/{mo/front/onnx/extractors/concat.py => extensions/front/onnx/identity_ext.py} (66%) rename model-optimizer/{mo/front/onnx/extractors/reshape.py => extensions/front/onnx/reshape_ext.py} (58%) rename model-optimizer/extensions/ops/{bn.py => BatchNormInference.py} (68%) diff --git a/model-optimizer/automation/package_BOM.txt b/model-optimizer/automation/package_BOM.txt index 3fcebe98abd631..34a3f8ffbd40a9 100644 --- a/model-optimizer/automation/package_BOM.txt +++ b/model-optimizer/automation/package_BOM.txt @@ -241,6 +241,7 @@ extensions/front/onnx/aten_ext.py extensions/front/onnx/AttributedSliceToSlice.py extensions/front/onnx/cast_ext.py extensions/front/onnx/clip_ext.py +extensions/front/onnx/concat_ext.py extensions/front/onnx/const_ext.py extensions/front/onnx/constant_fill_ext.py extensions/front/onnx/constant_of_shape_ext.py @@ -260,12 +261,14 @@ extensions/front/onnx/expand_ext.py extensions/front/onnx/faster_rcnn.json extensions/front/onnx/flatten_ext.py extensions/front/onnx/flattenONNX_to_reshape.py +extensions/front/onnx/fused_bn_ext.py extensions/front/onnx/gather_ext.py extensions/front/onnx/gathernd_ext.py extensions/front/onnx/gemm_ext.py extensions/front/onnx/group_norm_ext.py extensions/front/onnx/gru_ext.py extensions/front/onnx/hard_sigmoid_ext.py +extensions/front/onnx/identity_ext.py extensions/front/onnx/image_scaler_ext.py extensions/front/onnx/instance_normalization_ext.py extensions/front/onnx/logsoftmaxONNX_to_logsoftmax.py @@ -301,6 +304,7 @@ extensions/front/onnx/quantize_linear_resolver.py extensions/front/onnx/range_ext.py extensions/front/onnx/reduce_ext.py extensions/front/onnx/remove_filtering_boxes_by_size.py +extensions/front/onnx/reshape_ext.py extensions/front/onnx/resize_ext.py extensions/front/onnx/resize_to_interpolate.py extensions/front/onnx/reverse_sequence_ext.py @@ -602,9 +606,9 @@ extensions/ops/argmax.py extensions/ops/assert_op.py extensions/ops/aten.py extensions/ops/axpy.py +extensions/ops/BatchNormInference.py extensions/ops/binarization.py extensions/ops/BlockLSTM.py -extensions/ops/bn.py extensions/ops/box_nms.py extensions/ops/bucketize.py extensions/ops/Cast.py @@ -843,10 +847,6 @@ mo/front/mxnet/register_custom_ops.py mo/front/onnx/__init__.py mo/front/onnx/extractor.py mo/front/onnx/extractors/__init__.py -mo/front/onnx/extractors/concat.py -mo/front/onnx/extractors/eltwise.py -mo/front/onnx/extractors/fused_bn.py -mo/front/onnx/extractors/reshape.py mo/front/onnx/extractors/utils.py mo/front/onnx/loader.py mo/front/onnx/register_custom_ops.py @@ -1011,4 +1011,4 @@ requirements_kaldi.txt requirements_mxnet.txt requirements_onnx.txt requirements_tf.txt -requirements_tf2.txt +requirements_tf2.txt \ No newline at end of file diff --git a/model-optimizer/extensions/front/caffe/bn.py b/model-optimizer/extensions/front/caffe/bn.py index 4f7b33a39b2fb7..3ad77c441c512e 100644 --- a/model-optimizer/extensions/front/caffe/bn.py +++ b/model-optimizer/extensions/front/caffe/bn.py @@ -27,7 +27,7 @@ class BNToScaleShift(FrontReplacementOp): """ Replaces BN layer with ScaleShift. """ - op = "BN" + op = "batchNormInference" enabled = True def replace_op(self, graph: Graph, node: Node): diff --git a/model-optimizer/extensions/front/caffe/bn_test.py b/model-optimizer/extensions/front/caffe/bn_test.py index fd899d8ca63308..37c0c3fa5b5cd4 100644 --- a/model-optimizer/extensions/front/caffe/bn_test.py +++ b/model-optimizer/extensions/front/caffe/bn_test.py @@ -47,7 +47,7 @@ def test_bn(self): FakeParam('data', shift)]) nodes = [ ('input', {'kind': 'op', 'type': 'Identity', 'op': 'Identity'}), - ('bn', {'type': 'BN', 'kind': 'op', 'op': 'BN', 'pb': bn_pb, 'model_pb': bn_bin}), + ('bn', {'type': None, 'kind': 'op', 'op': 'batchNormInference', 'pb': bn_pb, 'model_pb': bn_bin}), ('output', {'kind': 'op', 'type': 'Identity', 'op': 'Identity'}), ] edges = [ diff --git a/model-optimizer/mo/front/onnx/extractors/eltwise.py b/model-optimizer/extensions/front/onnx/concat_ext.py similarity index 54% rename from model-optimizer/mo/front/onnx/extractors/eltwise.py rename to model-optimizer/extensions/front/onnx/concat_ext.py index 55df7acec61a00..287de77e082fe7 100644 --- a/model-optimizer/mo/front/onnx/extractors/eltwise.py +++ b/model-optimizer/extensions/front/onnx/concat_ext.py @@ -14,21 +14,18 @@ limitations under the License. """ -from mo.front.common.partial_infer.eltwise import eltwise_infer - - -def tf_eltwise_ext(pb, op=None, attrs=None): - """ - Generic eltwise extractor that supports n-ary operations. - It supports reasonable broadcast semantics from TF/NumPy - """ - res = { - 'infer': lambda node: eltwise_infer(node, op) - } - if attrs is not None: - res.update(attrs) - return res - - -def make_tf_eltwise(op, attrs=None): - return lambda node: tf_eltwise_ext(node, op, attrs) +from mo.front.onnx.extractors.utils import onnx_attr +from mo.front.extractor import FrontExtractorOp +from mo.ops.concat import Concat + +class ConcatFrontExtractor(FrontExtractorOp): + op = 'Concat' + enabled = True + + @classmethod + def extract(cls, node): + mapping_rule = { + 'axis': onnx_attr(node, 'axis', 'i', default=0) + } + Concat.update_node_stat(node, mapping_rule) + return cls.enabled diff --git a/model-optimizer/mo/front/onnx/extractors/fused_bn.py b/model-optimizer/extensions/front/onnx/fused_bn_ext.py similarity index 58% rename from model-optimizer/mo/front/onnx/extractors/fused_bn.py rename to model-optimizer/extensions/front/onnx/fused_bn_ext.py index d4e0a3c788d67c..7493210d53f5b9 100644 --- a/model-optimizer/mo/front/onnx/extractors/fused_bn.py +++ b/model-optimizer/extensions/front/onnx/fused_bn_ext.py @@ -15,19 +15,21 @@ """ import logging as log -from mo.front.common.partial_infer.elemental import copy_shape_infer +from extensions.ops.BatchNormInference import BatchNormInference +from mo.front.extractor import FrontExtractorOp from mo.front.onnx.extractors.utils import onnx_attr -def tf_fused_bn_extractor(node): - pb = node.pb - # This statement covers different opset versions - if onnx_attr(node, 'is_test', 'i', None) == 0: - log.error('FusedBatchNorm doesn\'t support is_test=False') - return None - return { - 'data_format': 'NCHW', - 'eps': onnx_attr(node, 'epsilon', 'f', 1e-5), - 'infer': copy_shape_infer, - } +class BatchNormalizationExtractor(FrontExtractorOp): + op = 'BatchNormalization' + enabled = True + + @classmethod + def extract(cls, node): + attr_dict = { + 'data_format': 'NCHW', + 'eps': onnx_attr(node, 'epsilon', 'f', 1e-5), + } + BatchNormInference.update_node_stat(node, attr_dict) + return cls.enabled diff --git a/model-optimizer/mo/front/onnx/extractors/concat.py b/model-optimizer/extensions/front/onnx/identity_ext.py similarity index 66% rename from model-optimizer/mo/front/onnx/extractors/concat.py rename to model-optimizer/extensions/front/onnx/identity_ext.py index d5c5e894dba452..5ec3eb3f86681a 100644 --- a/model-optimizer/mo/front/onnx/extractors/concat.py +++ b/model-optimizer/extensions/front/onnx/identity_ext.py @@ -13,14 +13,15 @@ See the License for the specific language governing permissions and limitations under the License. """ +from mo.front.extractor import FrontExtractorOp +from extensions.ops.identity import Identity -from mo.front.common.partial_infer.concat import concat_infer -from mo.front.onnx.extractors.utils import onnx_attr +class IdentityFrontExtractor(FrontExtractorOp): + op = 'Identity' + enabled = True -def concat_ext(node): - return { - 'type': "Concat", - 'axis': onnx_attr(node, 'axis', 'i', default=0), - 'infer': concat_infer - } + @classmethod + def extract(cls, node): + Identity.update_node_stat(node) + return cls.enabled diff --git a/model-optimizer/mo/front/onnx/extractors/reshape.py b/model-optimizer/extensions/front/onnx/reshape_ext.py similarity index 58% rename from model-optimizer/mo/front/onnx/extractors/reshape.py rename to model-optimizer/extensions/front/onnx/reshape_ext.py index 089566cc858c7f..9c79f9d9783696 100644 --- a/model-optimizer/mo/front/onnx/extractors/reshape.py +++ b/model-optimizer/extensions/front/onnx/reshape_ext.py @@ -16,19 +16,20 @@ import numpy as np +from mo.front.extractor import FrontExtractorOp from mo.front.onnx.extractors.utils import onnx_attr from mo.ops.reshape import Reshape +class ReshapeFrontExtractor(FrontExtractorOp): + op = 'Reshape' + enabled = True -def onnx_reshape_ext(node): - ''' Extract ONNX Reshape op of different versions. - Support both latest Reshape and Reshape-1. - The first one has 2 arguments, Reshape-1 has one input and shape is coded in attribute. - ''' - dim = onnx_attr(node, 'shape', 'ints', None) - if dim is not None: - dim = np.array(dim, dtype=np.int64) - Reshape.update_node_stat(node, {'dim': dim}) - else: - Reshape.update_node_stat(node) - return node.graph.node[node.id] + @classmethod + def extract(cls, node): + dim = onnx_attr(node, 'shape', 'ints', None) + if dim is not None: + dim = np.array(dim, dtype=np.int64) + Reshape.update_node_stat(node, {'dim': dim}) + else: + Reshape.update_node_stat(node) + return cls.enabled diff --git a/model-optimizer/extensions/middle/fusings.py b/model-optimizer/extensions/middle/fusings.py index 40ce7b2bda7794..55abb15499a880 100644 --- a/model-optimizer/extensions/middle/fusings.py +++ b/model-optimizer/extensions/middle/fusings.py @@ -61,7 +61,7 @@ def find_and_replace_pattern(self, graph: Graph): for_graph_and_each_sub_graph_recursively(graph, lambda graph: mark_unfused_nodes(graph, argv.finegrain_fusing)) # Converting FusedBatchNorm layer to Mul->Add->Mul->Add sequence - # IE doesn't support BN with 4 inputs, so we have to split it to two ScaleShift + # IE doesn't support batchNormInference with 4 inputs, so we have to split it to two ScaleShift for_graph_and_each_sub_graph_recursively(graph, convert_batch_norm) if fw == 'caffe': diff --git a/model-optimizer/extensions/ops/bn.py b/model-optimizer/extensions/ops/BatchNormInference.py similarity index 68% rename from model-optimizer/extensions/ops/bn.py rename to model-optimizer/extensions/ops/BatchNormInference.py index ae3edc02bc588d..307a2ed9af376e 100644 --- a/model-optimizer/extensions/ops/bn.py +++ b/model-optimizer/extensions/ops/BatchNormInference.py @@ -18,18 +18,22 @@ from mo.ops.op import Op -class BNOp(Op): +class BatchNormInference(Op): """ - Empty Op for BN layer. It will be replaced by BNToScaleShift FrontReplacer + BatchNormInference will be replaced by BNToScaleShift FrontReplacer for Caffe or convert_batch_norm + function for other frameworks """ - op = 'BN' - enabled = True + op = 'batchNormInference' + enabled = False def __init__(self, graph: Graph, attrs: dict): super().__init__(graph, { 'type': None, - 'op': __class__.op, + 'op': self.op, 'in_ports_count': 5, 'out_ports_count': 1, - 'infer': None + 'infer': self.infer }, attrs) + @staticmethod + def infer(node): + node.out_port(0).data.set_shape(node.in_port(0).data.get_shape()) diff --git a/model-optimizer/mo/front/onnx/extractor.py b/model-optimizer/mo/front/onnx/extractor.py index 05e524de04694a..48abd3e0e12958 100644 --- a/model-optimizer/mo/front/onnx/extractor.py +++ b/model-optimizer/mo/front/onnx/extractor.py @@ -14,11 +14,6 @@ limitations under the License. """ - -from mo.front.onnx.extractors.concat import concat_ext -from mo.front.onnx.extractors.eltwise import make_tf_eltwise -from mo.front.onnx.extractors.fused_bn import tf_fused_bn_extractor -from mo.front.onnx.extractors.reshape import onnx_reshape_ext from mo.graph.graph import Node @@ -26,12 +21,7 @@ def node_pb_arg(pb_extractor: callable): return lambda node: pb_extractor(node.pb) -onnx_op_extractors = { - 'BatchNormalization': tf_fused_bn_extractor, - 'Concat': concat_ext, - 'Identity': node_pb_arg(make_tf_eltwise(lambda v: v, attrs={'identity': True})), - 'Reshape': onnx_reshape_ext, -} +onnx_op_extractors = {} def common_onnx_fields(node: Node): diff --git a/model-optimizer/mo/middle/passes/fusing/decomposition.py b/model-optimizer/mo/middle/passes/fusing/decomposition.py index 365b2d4954f797..36ac103b9a0520 100644 --- a/model-optimizer/mo/middle/passes/fusing/decomposition.py +++ b/model-optimizer/mo/middle/passes/fusing/decomposition.py @@ -40,7 +40,7 @@ def convert_batch_norm(graph: Graph): nodes = graph.get_op_nodes() for node in nodes: if node.has_valid('op') and (node.op in ['FusedBatchNorm', 'FusedBatchNormV2', 'FusedBatchNormV3', - 'BatchNorm', 'BatchNormalization']): + 'BatchNorm', 'BatchNormalization', 'batchNormInference']): if any([node.in_port(i).data.get_value() is None for i in range(1, len(node.in_ports()))]): log.warning('Cannot translate FusedBatchNorm {} node with non-constant weights'.format( From 1ac3caf4728b5d2f73e37aa3032d1fdfbd44493e Mon Sep 17 00:00:00 2001 From: Ivan Tikhonov Date: Thu, 10 Dec 2020 11:56:16 +0300 Subject: [PATCH 041/244] fix constant folding for sub graph ops (#3534) --- ngraph/core/src/pass/constant_folding.cpp | 23 +++++---- ngraph/test/constant_folding.cpp | 63 +++++++++++++++++++++++ 2 files changed, 75 insertions(+), 11 deletions(-) diff --git a/ngraph/core/src/pass/constant_folding.cpp b/ngraph/core/src/pass/constant_folding.cpp index 6bbeb759704b0b..a09ecffb03b5de 100644 --- a/ngraph/core/src/pass/constant_folding.cpp +++ b/ngraph/core/src/pass/constant_folding.cpp @@ -27,20 +27,10 @@ bool ngraph::pass::ConstantFolding::run_on_function(std::shared_ptrget_ordered_ops()) + for (const auto& node : f->get_ordered_ops()) { node->revalidate_and_infer_types(); - // recursively constant fold operators containing subgraphs (ie: TensorIterator) - if (auto sub_graph_node = std::dynamic_pointer_cast(node)) - { - if (auto sub_graph = sub_graph_node->get_function()) - { - rewritten |= run_on_function(sub_graph); - continue; - } - } - OutputVector replacements(node->get_output_size()); if (node->constant_fold(replacements, node->input_values())) { @@ -72,6 +62,17 @@ bool ngraph::pass::ConstantFolding::run_on_function(std::shared_ptr(node)) + { + if (const auto& sub_graph = sub_graph_node->get_function()) + { + rewritten |= run_on_function(sub_graph); + } + } + } } return rewritten; diff --git a/ngraph/test/constant_folding.cpp b/ngraph/test/constant_folding.cpp index ed315acac9e8e7..3c039e372e1324 100644 --- a/ngraph/test/constant_folding.cpp +++ b/ngraph/test/constant_folding.cpp @@ -17,6 +17,7 @@ #include "gtest/gtest.h" #include "ngraph/ngraph.hpp" +#include "ngraph/opsets/opset5.hpp" #include "ngraph/pass/constant_folding.hpp" #include "ngraph/pass/manager.hpp" #include "util/all_close_f.hpp" @@ -3107,3 +3108,65 @@ TEST(constant_folding, disable_constant_folding) ASSERT_EQ(count_ops_of_type(f), 1); ASSERT_EQ(count_ops_of_type(f), 1); } + +TEST(constant_folding, constant_loop) +{ + auto X = make_shared( + element::f32, Shape{2, 1, 3}, std::vector{0, 1, 2, 3, 4, 5}); + auto Y = + make_shared(element::f32, Shape{1, 1, 3}, std::vector{1, 2, 3}); + + // Body parameters + auto Xi = make_shared(element::f32, PartialShape::dynamic()); + auto Yi = make_shared(element::f32, PartialShape::dynamic()); + auto body_condition = std::make_shared( + ngraph::element::boolean, ngraph::Shape{1}, true); + + auto trip_count = + std::make_shared(ngraph::element::i64, ngraph::Shape{1}, 2); + auto exec_condition = std::make_shared( + ngraph::element::boolean, ngraph::Shape{1}, true); + // Body + auto sum = make_shared(Xi, Yi); + auto body = + make_shared(OutputVector{body_condition, sum}, ParameterVector{Xi, Yi}); + auto loop = make_shared(trip_count, exec_condition); + loop->set_function(body); + loop->set_special_body_ports(ngraph::opset5::Loop::SpecialBodyPorts{-1, 0}); + + loop->set_sliced_input(Xi, X, 0, 1, 1, -1, 0); + loop->set_invariant_input(Yi, Y); + + auto out0 = loop->get_iter_value(sum, -1); + auto out1 = loop->get_concatenated_slices(sum, 0, 1, 1, -1, 0); + + auto result0 = make_shared(out0); + auto result1 = make_shared(out1); + + auto results = ResultVector{result0, result1}; + auto f = make_shared(results, ParameterVector{}); + + pass::Manager pass_manager; + pass_manager.register_pass(); + pass_manager.run_passes(f); + + ASSERT_EQ(count_ops_of_type(f), 0); + ASSERT_EQ(count_ops_of_type(f), 2); + + auto result_node_0 = + as_type_ptr(f->get_results().at(0)->input_value(0).get_node_shared_ptr()); + auto result_node_1 = + as_type_ptr(f->get_results().at(1)->input_value(0).get_node_shared_ptr()); + ASSERT_TRUE(result_node_0); + ASSERT_TRUE(result_node_1); + + const ngraph::Shape shape_0{1, 1, 3}; + const ngraph::Shape shape_1{2, 1, 3}; + + ASSERT_EQ(shape_0, result_node_0->get_output_shape(0)); + ASSERT_EQ(shape_1, result_node_1->get_output_shape(0)); + std::vector expected_0{4, 6, 8}; + std::vector expected_1{1, 3, 5, 4, 6, 8}; + range_test_check(result_node_0->cast_vector(), expected_0); + range_test_check(result_node_1->cast_vector(), expected_1); +} From 9ea24c5b3378240e57de300fa6aee406fbea1118 Mon Sep 17 00:00:00 2001 From: Ilya Churaev Date: Thu, 10 Dec 2020 12:00:48 +0300 Subject: [PATCH 042/244] Removed reference implementations from tests (#3541) --- .../include/ngraph/runtime/reference/elu.hpp | 4 +- .../ngraph/runtime}/reference/gelu.hpp | 0 .../include/ngraph/runtime}/reference/grn.hpp | 0 .../include/ngraph/runtime}/reference/mod.hpp | 0 .../ngraph/runtime}/reference/selu.hpp | 0 .../ngraph/runtime}/reference/transpose.hpp | 0 .../runtime/interpreter/evaluates_map.cpp | 51 +++++++++---------- .../runtime/interpreter/reference/elu.hpp | 38 -------------- 8 files changed, 27 insertions(+), 66 deletions(-) rename ngraph/{test/runtime/interpreter => core/reference/include/ngraph/runtime}/reference/gelu.hpp (100%) rename ngraph/{test/runtime/interpreter => core/reference/include/ngraph/runtime}/reference/grn.hpp (100%) rename ngraph/{test/runtime/interpreter => core/reference/include/ngraph/runtime}/reference/mod.hpp (100%) rename ngraph/{test/runtime/interpreter => core/reference/include/ngraph/runtime}/reference/selu.hpp (100%) rename ngraph/{test/runtime/interpreter => core/reference/include/ngraph/runtime}/reference/transpose.hpp (100%) delete mode 100644 ngraph/test/runtime/interpreter/reference/elu.hpp diff --git a/ngraph/core/reference/include/ngraph/runtime/reference/elu.hpp b/ngraph/core/reference/include/ngraph/runtime/reference/elu.hpp index 3440ece42aa105..d04b4c3a88abdc 100644 --- a/ngraph/core/reference/include/ngraph/runtime/reference/elu.hpp +++ b/ngraph/core/reference/include/ngraph/runtime/reference/elu.hpp @@ -30,9 +30,9 @@ namespace ngraph { for (size_t i = 0; i < count; i++) { - out[i] = arg[i] < 0 ? alpha * (std::exp(arg[i]) - 1.0) : arg[i]; + out[i] = arg[i] < T(0) ? T(alpha * (std::exp(arg[i]) - 1.0)) : arg[i]; } } } } -} +} \ No newline at end of file diff --git a/ngraph/test/runtime/interpreter/reference/gelu.hpp b/ngraph/core/reference/include/ngraph/runtime/reference/gelu.hpp similarity index 100% rename from ngraph/test/runtime/interpreter/reference/gelu.hpp rename to ngraph/core/reference/include/ngraph/runtime/reference/gelu.hpp diff --git a/ngraph/test/runtime/interpreter/reference/grn.hpp b/ngraph/core/reference/include/ngraph/runtime/reference/grn.hpp similarity index 100% rename from ngraph/test/runtime/interpreter/reference/grn.hpp rename to ngraph/core/reference/include/ngraph/runtime/reference/grn.hpp diff --git a/ngraph/test/runtime/interpreter/reference/mod.hpp b/ngraph/core/reference/include/ngraph/runtime/reference/mod.hpp similarity index 100% rename from ngraph/test/runtime/interpreter/reference/mod.hpp rename to ngraph/core/reference/include/ngraph/runtime/reference/mod.hpp diff --git a/ngraph/test/runtime/interpreter/reference/selu.hpp b/ngraph/core/reference/include/ngraph/runtime/reference/selu.hpp similarity index 100% rename from ngraph/test/runtime/interpreter/reference/selu.hpp rename to ngraph/core/reference/include/ngraph/runtime/reference/selu.hpp diff --git a/ngraph/test/runtime/interpreter/reference/transpose.hpp b/ngraph/core/reference/include/ngraph/runtime/reference/transpose.hpp similarity index 100% rename from ngraph/test/runtime/interpreter/reference/transpose.hpp rename to ngraph/core/reference/include/ngraph/runtime/reference/transpose.hpp diff --git a/ngraph/test/runtime/interpreter/evaluates_map.cpp b/ngraph/test/runtime/interpreter/evaluates_map.cpp index b40942d3f5d494..c96a14b3d9055e 100644 --- a/ngraph/test/runtime/interpreter/evaluates_map.cpp +++ b/ngraph/test/runtime/interpreter/evaluates_map.cpp @@ -19,52 +19,51 @@ #include "backend.hpp" #include "ngraph/ops.hpp" -#include #include +#include #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include #include +#include +#include +#include #include +#include +#include +#include #include +#include +#include #include +#include #include #include #include +#include #include #include #include #include +#include +#include #include +#include #include #include +#include #include -#include "ngraph/runtime/reference/avg_pool.hpp" -#include "ngraph/runtime/reference/convolution.hpp" -#include "ngraph/runtime/reference/ctc_greedy_decoder.hpp" -#include "ngraph/runtime/reference/ctc_loss.hpp" -#include "ngraph/runtime/reference/cum_sum.hpp" -#include "ngraph/runtime/reference/detection_output.hpp" -#include "ngraph/runtime/reference/embedding_bag_offsets_sum.hpp" -#include "ngraph/runtime/reference/embedding_bag_packed_sum.hpp" -#include "ngraph/runtime/reference/embedding_segments_sum.hpp" -#include "ngraph/runtime/reference/fake_quantize.hpp" -#include "ngraph/runtime/reference/gather_tree.hpp" -#include "ngraph/runtime/reference/hard_sigmoid.hpp" -#include "ngraph/runtime/reference/log_softmax.hpp" -#include "ngraph/runtime/reference/lrn.hpp" -#include "ngraph/runtime/reference/mvn.hpp" -#include "ngraph/runtime/reference/normalize_l2.hpp" -#include "ngraph/runtime/reference/psroi_pooling.hpp" -#include "ngraph/runtime/reference/region_yolo.hpp" -#include "ngraph/runtime/reference/roi_pooling.hpp" -#include "ngraph/runtime/reference/scatter_nd_update.hpp" -#include "ngraph/runtime/reference/squared_difference.hpp" -#include "reference/elu.hpp" -#include "reference/gelu.hpp" -#include "reference/grn.hpp" -#include "reference/selu.hpp" using namespace ngraph; using namespace std; diff --git a/ngraph/test/runtime/interpreter/reference/elu.hpp b/ngraph/test/runtime/interpreter/reference/elu.hpp deleted file mode 100644 index d04b4c3a88abdc..00000000000000 --- a/ngraph/test/runtime/interpreter/reference/elu.hpp +++ /dev/null @@ -1,38 +0,0 @@ -//***************************************************************************** -// Copyright 2017-2020 Intel Corporation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -//***************************************************************************** - -#pragma once - -#include -#include - -namespace ngraph -{ - namespace runtime - { - namespace reference - { - template - void elu(const T* arg, T* out, size_t count, double alpha) - { - for (size_t i = 0; i < count; i++) - { - out[i] = arg[i] < T(0) ? T(alpha * (std::exp(arg[i]) - 1.0)) : arg[i]; - } - } - } - } -} \ No newline at end of file From 0a84b230bdde45420b6d8ff12527b8982250fe2c Mon Sep 17 00:00:00 2001 From: Alina Kladieva Date: Thu, 10 Dec 2020 12:05:03 +0300 Subject: [PATCH 043/244] [Jenkinsfile] Disable failFast & enable propagateStatus (#3503) Co-authored-by: akladiev --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 49a10fd921a5b7..739f5cd99909ad 100755 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,10 +2,10 @@ properties([ parameters([ - booleanParam(defaultValue: true, + booleanParam(defaultValue: false, description: 'Cancel the rest of parallel stages if one of them fails and return status immediately', name: 'failFast'), - booleanParam(defaultValue: false, + booleanParam(defaultValue: true, description: 'Whether to propagate commit status to GitHub', name: 'propagateStatus'), string(defaultValue: '', From cf3213a9c5731f0d690d2dc291313b181f8becc8 Mon Sep 17 00:00:00 2001 From: Nikolay Tyukaev Date: Thu, 10 Dec 2020 12:11:30 +0300 Subject: [PATCH 044/244] cmake build all docs (#3539) * cmake build all docs * update doxy log parser * update build_main_layout.py --- docs/CMakeLists.txt | 125 ++++++++++++++++++++++++++---- docs/doxygen/build_main_layout.py | 23 ++++++ docs/doxygen/ie_docs.config | 2 +- docs/doxygen/log.py | 32 +++++++- docs/doxygen/openvino_docs.xml | 32 ++++++-- 5 files changed, 187 insertions(+), 27 deletions(-) create mode 100644 docs/doxygen/build_main_layout.py diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 3ca9985fbb8127..be94c8c9185b4a 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -40,6 +40,11 @@ if(NOT ENABLE_DOCKER) endforeach() endif() +set(OMZ_DOCS_DIR "" CACHE PATH "Path to open_model_zoo documentation") +set(WORKBENCH_DOCS_DIR "" CACHE PATH "Path to workbench documentation") +set(POT_DOCS_DIR "" CACHE PATH "Path to post-training-compression-tool documentation") +set(GST_DOCS_DIR "" CACHE PATH "Path to gst-video-analytics documentation") + function(build_docs) find_package(Doxygen REQUIRED dot) find_package(Python3 COMPONENTS Interpreter) @@ -53,6 +58,16 @@ function(build_docs) message(FATAL_ERROR "Python3 is required to build the documentation") endif() + execute_process( + COMMAND ${Python3_EXECUTABLE} -m pip show lxml + RESULT_VARIABLE PIP_EXIT_CODE + OUTPUT_QUIET + ) + + if (NOT ${PIP_EXIT_CODE} EQUAL 0) + message(FATAL_ERROR "lxml package is not installed. Please use \"pip install lxml\".") + endif() + if(NOT LATEX_FOUND) message(FATAL_ERROR "LATEX is required to build the documentation") endif() @@ -70,20 +85,10 @@ function(build_docs) # Preprocessing scripts set(DOXY_MD_FILTER "${DOXYGEN_DIR}/doxy_md_filter.py") + set(DOXY_LAYOUT_SCRIPT "${DOXYGEN_DIR}/build_main_layout.py") set(DOXY_LOG_SCRIPT "${DOXYGEN_DIR}/log.py") set(PYX_FILTER "${DOXYGEN_DIR}/pyx_filter.py") - file(GLOB_RECURSE doc_source_files - LIST_DIRECTORIES true RELATIVE ${OpenVINO_MAIN_SOURCE_DIR} - "${OpenVINO_MAIN_SOURCE_DIR}/docs/*.md" - "${OpenVINO_MAIN_SOURCE_DIR}/docs/*.png" - "${OpenVINO_MAIN_SOURCE_DIR}/docs/*.gif" - "${OpenVINO_MAIN_SOURCE_DIR}/docs/*.jpg" - "${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/*.md" - "${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/*.png" - "${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/*.gif" - "${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/*.jpg") - configure_file(${PYTHON_API_IN} ${PYTHON_API_OUT} @ONLY) set(NGRAPH_CPP_CONFIG_SOURCE "${DOXYGEN_DIR}/ngraph_cpp_api.config") @@ -103,6 +108,7 @@ function(build_docs) set(NGRAPH_CPP_LAYOUT_SOURCE "${DOXYGEN_DIR}/ngraph_cpp_api.xml") set(NGRAPH_PY_LAYOUT_SOURCE "${DOXYGEN_DIR}/ngraph_py_api.xml") set(IE_LAYOUT_SOURCE "${DOXYGEN_DIR}/ie_docs.xml") + set(OPENVINO_LAYOUT_SOURCE "${DOXYGEN_DIR}/openvino_docs.xml") set(C_LAYOUT_SOURCE "${DOXYGEN_DIR}/ie_c_api.xml") set(PY_LAYOUT_SOURCE "${DOXYGEN_DIR}/ie_py_api.xml") set(PLUGIN_LAYOUT_SOURCE "${DOXYGEN_DIR}/ie_plugin_api.xml") @@ -110,6 +116,7 @@ function(build_docs) set(NGRAPH_CPP_LAYOUT_BUILD "${DOCS_BUILD_DIR}/ngraph_cpp_api.xml") set(NGRAPH_PY_LAYOUT_BUILD "${DOCS_BUILD_DIR}/ngraph_py_api.xml") set(IE_LAYOUT_BUILD "${DOCS_BUILD_DIR}/ie_docs.xml") + set(OPENVINO_LAYOUT_BUILD "${DOCS_BUILD_DIR}/openvino_docs.xml") set(C_LAYOUT_BUILD "${DOCS_BUILD_DIR}/ie_c_api.xml") set(PY_LAYOUT_BUILD "${DOCS_BUILD_DIR}/ie_py_api.xml") set(PLUGIN_LAYOUT_BUILD "${DOCS_BUILD_DIR}/ie_plugin_api.xml") @@ -118,6 +125,7 @@ function(build_docs) configure_file(${NGRAPH_CPP_LAYOUT_SOURCE} ${NGRAPH_CPP_LAYOUT_BUILD} @ONLY) configure_file(${NGRAPH_PY_LAYOUT_SOURCE} ${NGRAPH_PY_LAYOUT_BUILD} @ONLY) configure_file(${IE_LAYOUT_SOURCE} ${IE_LAYOUT_BUILD} @ONLY) + configure_file(${OPENVINO_LAYOUT_SOURCE} ${OPENVINO_LAYOUT_BUILD} @ONLY) configure_file(${C_LAYOUT_SOURCE} ${C_LAYOUT_BUILD} @ONLY) configure_file(${PY_LAYOUT_SOURCE} ${PY_LAYOUT_BUILD} @ONLY) configure_file(${PLUGIN_LAYOUT_SOURCE} ${PLUGIN_LAYOUT_BUILD} @ONLY) @@ -175,14 +183,98 @@ function(build_docs) COMMENT "Pre-process docs" VERBATIM) - foreach(source_file ${doc_source_files}) + # ovino doc files + file(GLOB_RECURSE ovino_doc_files + LIST_DIRECTORIES true RELATIVE ${OpenVINO_MAIN_SOURCE_DIR} + "${OpenVINO_MAIN_SOURCE_DIR}/docs/*.md" + "${OpenVINO_MAIN_SOURCE_DIR}/docs/*.png" + "${OpenVINO_MAIN_SOURCE_DIR}/docs/*.gif" + "${OpenVINO_MAIN_SOURCE_DIR}/docs/*.jpg" + "${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/*.md" + "${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/*.png" + "${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/*.gif" + "${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/*.jpg") + + foreach(source_file ${ovino_doc_files}) list(APPEND commands COMMAND ${CMAKE_COMMAND} -E copy - "${OpenVINO_MAIN_SOURCE_DIR}/${source_file}" "${DOCS_BUILD_DIR}/${source_file}") + "${OpenVINO_MAIN_SOURCE_DIR}/${source_file}" "${DOCS_BUILD_DIR}/openvino/${source_file}") endforeach() + # omz doc files + if(EXISTS "${OMZ_DOCS_DIR}") + get_filename_component(OMZ_DOCS_DIR "${OMZ_DOCS_DIR}" ABSOLUTE) + + file(GLOB_RECURSE omz_doc_files + LIST_DIRECTORIES true RELATIVE ${OMZ_DOCS_DIR} + "${OMZ_DOCS_DIR}/*.md" + "${OMZ_DOCS_DIR}/*.png" + "${OMZ_DOCS_DIR}/*.gif" + "${OMZ_DOCS_DIR}/*.jpg") + + foreach(source_file ${omz_doc_files}) + list(APPEND commands COMMAND ${CMAKE_COMMAND} -E copy + "${OMZ_DOCS_DIR}/${source_file}" "${DOCS_BUILD_DIR}/omz/${source_file}") + endforeach() + configure_file("${OMZ_DOCS_DIR}/omz_docs.xml" "${DOCS_BUILD_DIR}/omz_docs.xml" @ONLY) + endif() + + # workbench doc files + if(EXISTS "${WORKBENCH_DOCS_DIR}") + get_filename_component(WORKBENCH_DOCS_DIR "${WORKBENCH_DOCS_DIR}" ABSOLUTE) + + file(GLOB_RECURSE workbench_doc_files + LIST_DIRECTORIES true RELATIVE ${WORKBENCH_DOCS_DIR} + "${WORKBENCH_DOCS_DIR}/*.md" + "${WORKBENCH_DOCS_DIR}/*.png" + "${WORKBENCH_DOCS_DIR}/*.gif" + "${WORKBENCH_DOCS_DIR}/*.jpg") + + foreach(source_file ${workbench_doc_files}) + list(APPEND commands COMMAND ${CMAKE_COMMAND} -E copy + "${WORKBENCH_DOCS_DIR}/${source_file}" "${DOCS_BUILD_DIR}/workbench/${source_file}") + endforeach() + configure_file("${WORKBENCH_DOCS_DIR}/docs/Workbench_DG/workbench_docs.xml" "${DOCS_BUILD_DIR}/workbench_docs.xml" @ONLY) + endif() + + # pot doc files + if(EXISTS "${POT_DOCS_DIR}") + get_filename_component(POT_DOCS_DIR "${POT_DOCS_DIR}" ABSOLUTE) + + file(GLOB_RECURSE pot_doc_files + LIST_DIRECTORIES true RELATIVE ${POT_DOCS_DIR} + "${POT_DOCS_DIR}/*.md" + "${POT_DOCS_DIR}/*.png" + "${POT_DOCS_DIR}/*.gif" + "${POT_DOCS_DIR}/*.jpg") + + foreach(source_file ${pot_doc_files}) + list(APPEND commands COMMAND ${CMAKE_COMMAND} -E copy + "${POT_DOCS_DIR}/${source_file}" "${DOCS_BUILD_DIR}/pot/${source_file}") + endforeach() + configure_file("${POT_DOCS_DIR}/docs/pot_docs.xml" "${DOCS_BUILD_DIR}/pot_docs.xml" @ONLY) + endif() + + # gst doc files + if(EXISTS "${GST_DOCS_DIR}") + get_filename_component(GST_DOCS_DIR "${GST_DOCS_DIR}" ABSOLUTE) + + file(GLOB_RECURSE gst_doc_files + LIST_DIRECTORIES true RELATIVE ${GST_DOCS_DIR} + "${GST_DOCS_DIR}/*.md" + "${GST_DOCS_DIR}/*.png" + "${GST_DOCS_DIR}/*.gif" + "${GST_DOCS_DIR}/*.jpg") + + foreach(source_file ${gst_doc_files}) + list(APPEND commands COMMAND ${CMAKE_COMMAND} -E copy + "${GST_DOCS_DIR}/${source_file}" "${DOCS_BUILD_DIR}/gst/${source_file}") + endforeach() + endif() + add_custom_command(TARGET preprocess_docs PRE_BUILD ${commands} + COMMAND ${Python3_EXECUTABLE} ${DOXY_LAYOUT_SCRIPT} --openvino ${OPENVINO_LAYOUT_BUILD} COMMAND ${Python3_EXECUTABLE} ${DOXY_MD_FILTER} ${DOCS_BUILD_DIR} COMMENT "Pre-process markdown and image links") @@ -196,8 +288,11 @@ function(build_docs) add_custom_command(TARGET ie_docs POST_BUILD - COMMAND ${Python3_EXECUTABLE} ${DOXY_LOG_SCRIPT} --log ${DOCS_BUILD_DIR}/ie_docs.log - --exclude-links ".*?(omz_|pot_|gst_|workbench_).*?" + COMMAND ${Python3_EXECUTABLE} ${DOXY_LOG_SCRIPT} --log "${DOCS_BUILD_DIR}/ie_docs.log" + --include_omz $ + --include_wb $ + --include_pot $ + --include_gst $ COMMENT "Parse doxygen log to find errors." VERBATIM ) diff --git a/docs/doxygen/build_main_layout.py b/docs/doxygen/build_main_layout.py new file mode 100644 index 00000000000000..210d5be074b611 --- /dev/null +++ b/docs/doxygen/build_main_layout.py @@ -0,0 +1,23 @@ +import argparse +import os +from lxml import etree + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument('--openvino', type=str, required=True, default=None, help='openvino_docs.xml') + args = parser.parse_args() + result = build_layout(args.openvino) + with open(args.openvino, 'wb') as f: + f.write(result) + + +def build_layout(openvino): + ns = {"xi": "http://www.w3.org/2001/XInclude"} + root = etree.parse(openvino) + root.xinclude() + return etree.tostring(root, pretty_print=True) + + +if __name__ == '__main__': + main() diff --git a/docs/doxygen/ie_docs.config b/docs/doxygen/ie_docs.config index b3872e48970cf2..46c2489bd3da07 100644 --- a/docs/doxygen/ie_docs.config +++ b/docs/doxygen/ie_docs.config @@ -735,7 +735,7 @@ FILE_VERSION_FILTER = # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE # tag is left empty. -LAYOUT_FILE = "@IE_LAYOUT_BUILD@" +LAYOUT_FILE = "@OPENVINO_LAYOUT_BUILD@" # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib diff --git a/docs/doxygen/log.py b/docs/doxygen/log.py index bfd10f02480c38..c82d6642af5ac2 100644 --- a/docs/doxygen/log.py +++ b/docs/doxygen/log.py @@ -10,7 +10,14 @@ def parse_arguments(): help='Path to doxygen ignore list') parser.add_argument('--strip', type=str, required=False, default=os.path.abspath('../../'), help='Strip from warning paths') - parser.add_argument('--exclude-links', nargs='+', type=str, required=False, default=[], help='Markdown links to be excluded') + parser.add_argument('--include_omz', type=bool, required=False, default=False, + help='Include link check for omz docs') + parser.add_argument('--include_wb', type=bool, required=False, default=False, + help='Include link check for workbench docs') + parser.add_argument('--include_pot', type=bool, required=False, default=False, + help='Include link check for pot docs') + parser.add_argument('--include_gst', type=bool, required=False, default=False, + help='Include link check for gst docs') return parser.parse_args() @@ -37,8 +44,21 @@ def is_excluded_link(warning, exclude_links): return False -def parse(log, ignore_list, strip, exclude_links): +def parse(log, ignore_list, strip, include_omz=False, include_wb=False, include_pot=False, include_gst=False): found_errors = [] + exclude_links = {'omz': r'.*?omz_.*?', 'wb': r'.*?workbench_.*?', + 'pot': r'.*?pot_.*?', 'gst': r'.*?gst_.*?'} + if include_omz: + del exclude_links['omz'] + if include_wb: + del exclude_links['wb'] + if include_pot: + del exclude_links['pot'] + if include_gst: + del exclude_links['gst'] + + exclude_links = exclude_links.values() + with open(ignore_list, 'r') as f: ignore_list = f.read().splitlines() with open(log, 'r') as f: @@ -61,7 +81,13 @@ def parse(log, ignore_list, strip, exclude_links): def main(): args = parse_arguments() - parse(args.log, args.ignore_list, args.strip, args.exclude_links) + parse(args.log, + args.ignore_list, + args.strip, + include_omz=args.include_omz, + include_wb=args.include_wb, + include_pot=args.include_pot, + include_gst=args.include_gst) if __name__ == '__main__': diff --git a/docs/doxygen/openvino_docs.xml b/docs/doxygen/openvino_docs.xml index 9cae58660f8364..3cf8656c8ea34c 100644 --- a/docs/doxygen/openvino_docs.xml +++ b/docs/doxygen/openvino_docs.xml @@ -65,11 +65,19 @@ - - - + + + + + + + + + - + + + @@ -80,10 +88,14 @@ - + + + - + + + @@ -108,8 +120,12 @@ - - + + + + + + From 8213505e24f2409a209c6c55fb56f1e5d8598996 Mon Sep 17 00:00:00 2001 From: "Gladilov, Gleb" Date: Thu, 10 Dec 2020 13:23:36 +0300 Subject: [PATCH 045/244] [IE][VPU]: Enables native gather support (#3502) * [IE]: Allows plugins to disable Gather -> GatherIE conversion Gather layer takes axis as 3rd input, not attribute and may take indices as 0D scalar input Signed-off-by: Gladilov, Gleb * [IE][VPU]: Disables Gather -> GatherIE conversion Gather -> GatherIE conversion may introduce Gather operation decomposition into Unsqueeze + Gather + Squeeze in case if indices input is 0D scalar input. In case of dynamic Gather such decomposition will break dynamic path. Myriad plugin has to support Gather operation natively without legacy conversion. Signed-off-by: Gladilov, Gleb * [IE][VPU]: Enables native Gather support Gather layer in contrast with GatherIE takes axis as 3rd input, not attribute and may take indices input as 0D scalar input. 0D -> 1D conversion happens automatically at the beginning of frontend. Axis as 3rd input is supported for single value integral scalar only. Signed-off-by: Gladilov, Gleb * [IE][VPU][Tests]: Enable new infra single layer Gather tests * Removes corresponding tests from old infrastructure * Enables test cases with 0D indices input * Extracts base test fixture from shared tests fixture. Unfortunately, Google Tests supports Combine generator for tuples of size up to 10 only. Originally, shared tests fixture already has 10 elements in tuple for tests parameters. At the same time myriad plugin needs to specify configuration option. Since configuration option could not be test parameter we are forced to use separate class, in order to get rid of code duplication base class is used. Signed-off-by: Gladilov, Gleb * [IE][VPU]: Updates firmware Enables native Gather support on device side --- inference-engine/cmake/vpu_dependencies.cmake | 6 +- .../src/convert_function_to_cnn_network.cpp | 4 +- .../legacy_api/src/ie_layer_validators.cpp | 9 +- .../src/frontend/frontend.cpp | 2 + .../graph_transformer/src/stages/gather.cpp | 21 +- .../convert_ngraph_to_cnn_network_tests.cpp | 3 +- .../myriad/single_layer_tests/gather.cpp | 120 +++++++ .../include/single_layer_tests/gather.hpp | 11 +- .../shared/src/single_layer_tests/gather.cpp | 39 ++- .../common_test_utils/common_utils.hpp | 5 + .../common_test_utils/data_utils.hpp | 23 +- .../layers/myriad_layers_gather_test.cpp | 34 -- .../layers/myriad_layers_gather_test.hpp | 310 ------------------ 13 files changed, 194 insertions(+), 393 deletions(-) create mode 100644 inference-engine/tests/functional/plugin/myriad/single_layer_tests/gather.cpp delete mode 100644 inference-engine/tests_deprecated/functional/vpu/common/layers/myriad_layers_gather_test.cpp delete mode 100644 inference-engine/tests_deprecated/functional/vpu/common/layers/myriad_layers_gather_test.hpp diff --git a/inference-engine/cmake/vpu_dependencies.cmake b/inference-engine/cmake/vpu_dependencies.cmake index aa2c220de710ae..a477915ec8b9df 100644 --- a/inference-engine/cmake/vpu_dependencies.cmake +++ b/inference-engine/cmake/vpu_dependencies.cmake @@ -15,14 +15,14 @@ include(dependency_solver) set(VPU_SUPPORTED_FIRMWARES usb-ma2x8x pcie-ma2x8x) set(VPU_SUPPORTED_FIRMWARES_HASH - "e687ed209ff72b215d3d648b980747faa8287215935bef4a87faa79d1d141df7" - "32a3f529385d9ceec6f6a842dd1927b69c83f9e04f40819c168f8149316402e6") + "abf12ace5e20f77b29743322c7e9f812446936bdcefa0ea640aa914169024e3d" + "8630649b26fc9a38f889225e552b41f1eb5ba1a9a56419c5fd8ed176f0cc2ccf") # # Default packages # -set(FIRMWARE_PACKAGE_VERSION 1534) +set(FIRMWARE_PACKAGE_VERSION 1536) set(VPU_CLC_MA2X8X_VERSION "movi-cltools-20.09.2") # diff --git a/inference-engine/src/legacy_api/src/convert_function_to_cnn_network.cpp b/inference-engine/src/legacy_api/src/convert_function_to_cnn_network.cpp index 40f8b03bf6e049..01de48ba6715ae 100644 --- a/inference-engine/src/legacy_api/src/convert_function_to_cnn_network.cpp +++ b/inference-engine/src/legacy_api/src/convert_function_to_cnn_network.cpp @@ -485,7 +485,7 @@ InferenceEngine::details::CNNLayerCreator::CNNLayerCreator(const std::shared_ptr details::convertPrecision(node->get_output_element_type(0))}; auto res = std::make_shared(attrs); res->params["type"] = "not"; - return res; + return res; }); addSpecificCreator({"LSTMCellIE"}, @@ -973,7 +973,7 @@ InferenceEngine::details::CNNLayerCreator::CNNLayerCreator(const std::shared_ptr REQUIRED_IE_CONVERSION_CREATOR("GroupConvolution", "ConvolutionIE"); REQUIRED_IE_CONVERSION_CREATOR("GroupConvolutionBackpropData", "DeconvolutionIE"); - addSpecificCreator({ "Convolution", "Gather", "GatherTree", "GRUCell", "GRUSequence", "HardSigmoid", + addSpecificCreator({ "Convolution", "GatherTree", "GRUCell", "GRUSequence", "HardSigmoid", "LRN", "LSTMCell", "LSTMSequence", "NonMaxSuppression", "RNNCell", "RNNSequence", "OneHot", "Pad", "PriorBoxClustered", "PriorBox", "Proposal", "Selu", "Swish", "Tile"}, [](const std::shared_ptr<::ngraph::Node>& node, const std::map& params) diff --git a/inference-engine/src/legacy_api/src/ie_layer_validators.cpp b/inference-engine/src/legacy_api/src/ie_layer_validators.cpp index 240fa0ca68e09e..5b45c48a1d2d72 100644 --- a/inference-engine/src/legacy_api/src/ie_layer_validators.cpp +++ b/inference-engine/src/legacy_api/src/ie_layer_validators.cpp @@ -635,12 +635,11 @@ void PadValidator::parseParams(CNNLayer* layer) { GatherValidator::GatherValidator(const std::string& _type): LayerValidator(_type) {} void GatherValidator::parseParams(CNNLayer* layer) { - auto casted = dynamic_cast(layer); - if (!casted) { - THROW_IE_EXCEPTION << layer->name << " Layer is not instance of GatherLayer class"; + if (auto casted = dynamic_cast(layer)) { + casted->axis = casted->GetParamAsInt("axis", 0); + } else if (layer->insData.size() != 3) { + THROW_IE_EXCEPTION << layer->name << " Gather layer is expected to have 3 inputs"; } - - casted->axis = casted->GetParamAsInt("axis", 0); } // diff --git a/inference-engine/src/vpu/graph_transformer/src/frontend/frontend.cpp b/inference-engine/src/vpu/graph_transformer/src/frontend/frontend.cpp index 58ac221cfa5ab3..f48edf20e6bc33 100644 --- a/inference-engine/src/vpu/graph_transformer/src/frontend/frontend.cpp +++ b/inference-engine/src/vpu/graph_transformer/src/frontend/frontend.cpp @@ -38,6 +38,7 @@ #include "vpu/ngraph/transformations/eliminate_shapeof_after_dsr.hpp" #include #include +#include namespace vpu { @@ -187,6 +188,7 @@ ie::ICNNNetwork::Ptr FrontEnd::convertNetwork(ie::ICNNNetwork& network) { manager.register_pass(); manager.register_pass(); manager.register_pass(); + manager.get_pass_config()->disable(); manager.set_callback(transformationsPredicate); manager.run_passes(nGraphFunc); diff --git a/inference-engine/src/vpu/graph_transformer/src/stages/gather.cpp b/inference-engine/src/vpu/graph_transformer/src/stages/gather.cpp index ed33cc0a9c3cdd..41e627580d2057 100644 --- a/inference-engine/src/vpu/graph_transformer/src/stages/gather.cpp +++ b/inference-engine/src/vpu/graph_transformer/src/stages/gather.cpp @@ -13,18 +13,23 @@ namespace vpu { -void FrontEnd::parseGather(const Model& model, const ie::CNNLayerPtr& _layer, const DataVector& inputs, const DataVector& outputs) const { - IE_ASSERT(inputs.size() == 2); - IE_ASSERT(outputs.size() == 1); - auto layer = std::dynamic_pointer_cast(_layer); - IE_ASSERT(layer != nullptr); +void FrontEnd::parseGather(const Model& model, const ie::CNNLayerPtr& layer, const DataVector& inputs, const DataVector& outputs) const { + VPU_THROW_UNLESS(layer != nullptr, "Encountered nullptr CNN layer"); + VPU_THROW_UNLESS(inputs.size() == 3, "Expected {} inputs (data, indices, axis), got {}", 3, inputs.size()); + VPU_THROW_UNLESS(outputs.size() == 1, "Expected {} outputs, got {}", 1, outputs.size()); - auto input = inputs[0]; + VPU_THROW_UNLESS(inputs[2]->usage() == DataUsage::Const, "Only constant axis is supported, but got {} data object", inputs[2]->usage()); + VPU_THROW_UNLESS(inputs[2]->desc().type() == DataType::S32, "Only {} is supported as axis data type, got {}", DataType::S32, inputs[2]->desc().type()); + VPU_THROW_UNLESS(inputs[2]->desc().numDims() == 1, "Only single value axis is supported, got {}D data object", inputs[2]->desc().numDims()); + VPU_THROW_UNLESS(inputs[2]->desc().totalDimSize() == 1, "Only single value axis is supported, got {} elements", inputs[2]->desc().totalDimSize()); - IE_ASSERT(layer->axis < input->desc().numDims()); + auto input = inputs[0]; + const auto axis = inputs[2]->content()->get()[0]; + const auto ieNormalizedAxis = axis < 0 ? input->desc().numDims() + axis : axis; + VPU_THROW_UNLESS(ieNormalizedAxis >= 0 && ieNormalizedAxis < input->desc().numDims(), + "Axis value must fit into input tensor, got axis = {}, input rank = {}", axis, input->desc().numDims()); const auto perm = DimsOrder::fromNumDims(input->desc().numDims()).toPermutation(); - const auto ieNormalizedAxis = layer->axis < 0 ? input->desc().numDims() + layer->axis : layer->axis; const auto axisDim = perm[input->desc().numDims() - 1 - ieNormalizedAxis]; _stageBuilder->addGatherStage(model, layer->name, layer, inputs[0], inputs[1], outputs[0], axisDim); diff --git a/inference-engine/tests/functional/inference_engine/cnn_network/convert_ngraph_to_cnn_network_tests.cpp b/inference-engine/tests/functional/inference_engine/cnn_network/convert_ngraph_to_cnn_network_tests.cpp index 372c169dd7aa55..bfe8ec2179f6f1 100644 --- a/inference-engine/tests/functional/inference_engine/cnn_network/convert_ngraph_to_cnn_network_tests.cpp +++ b/inference-engine/tests/functional/inference_engine/cnn_network/convert_ngraph_to_cnn_network_tests.cpp @@ -82,7 +82,6 @@ TEST(ConvertFunctionToCNNNetworkTests, OpsShouldBeConvertedToIERepresentation) { ngraph::NodeVector should_converted_to_ie = { std::make_shared(), std::make_shared(), - std::make_shared(), std::make_shared(), std::make_shared(), std::make_shared(), @@ -391,4 +390,4 @@ TEST(ConvertFunctionToCNNNetworkTests, NonUniqueNamesParametersNegative) { } catch(InferenceEngine::details::InferenceEngineException & e) { EXPECT_THAT(e.what(), testing::HasSubstr(std::string("Detected two output operations with the same name:"))); } -} \ No newline at end of file +} diff --git a/inference-engine/tests/functional/plugin/myriad/single_layer_tests/gather.cpp b/inference-engine/tests/functional/plugin/myriad/single_layer_tests/gather.cpp new file mode 100644 index 00000000000000..6360db74f0b585 --- /dev/null +++ b/inference-engine/tests/functional/plugin/myriad/single_layer_tests/gather.cpp @@ -0,0 +1,120 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "single_layer_tests/gather.hpp" +#include + +using namespace LayerTestsDefinitions; + +namespace { + +using GatherParams = std::tuple< + std::vector, // Indices shape + std::pair, int>, // Input shapes and axis + InferenceEngine::Precision // Network precision +>; + +const std::vector> indicesShapes = { + {}, + {5}, + {10, 5}, + {1, 128, 1}, + {15, 4, 20, 5}, +}; + +const std::vector, int>> inputShapes = { + {{6, 12, 10, 24}, -4}, + {{6, 12, 10, 24}, -3}, + + {{3052, 768}, -2}, + {{6, 12, 10, 24}, -2}, + + {{10}, -1}, + {{3052, 768}, -1}, + {{6, 12, 10, 24}, -1}, + + {{10}, 0}, + {{3052, 768}, 0}, + {{6, 12, 10, 24}, 0}, + + {{3052, 768}, 1}, + {{6, 12, 10, 24}, 1}, + + {{6, 12, 10, 24}, 2}, + {{6, 12, 10, 24}, 3}, +}; + +const std::vector networkPrecisions = { + InferenceEngine::Precision::I32, + InferenceEngine::Precision::FP32, +}; + +class MyriadGatherLayerTest : public testing::WithParamInterface, public GatherLayerTestBase { +public: + static std::string getTestCaseName(const testing::TestParamInfo& obj) { + std::vector indicesShape; + std::pair, int> inputShapeAndAxis; + InferenceEngine::Precision netPrecision; + std::tie(indicesShape, inputShapeAndAxis, netPrecision) = obj.param; + std::ostringstream result; + result << "IS=" << CommonTestUtils::vec2str(inputShapeAndAxis.first) << "_"; + result << "axis=" << inputShapeAndAxis.second << "_"; + result << "indicesShape=" << CommonTestUtils::vec2str(indicesShape) << "_"; + result << "IP=" << netPrecision; + return result.str(); + } + +protected: + void SetUp() override { + configuration[InferenceEngine::MYRIAD_DETECT_NETWORK_BATCH] = CONFIG_VALUE(NO); + GatherLayerTestBase::SetUp(generateParams(GetParam())); + } + +private: + static gatherParamsTuple generateParams(const GatherParams& params) { + const auto& indicesShape = std::get<0>(params); + const auto& inputShape = std::get<1>(params).first; + const auto& axis = std::get<1>(params).second; + const auto& networkPrecision = std::get<2>(params); + const auto& inputPrecision = InferenceEngine::Precision::UNSPECIFIED; + const auto& outputPrecision = InferenceEngine::Precision::UNSPECIFIED; + const auto& inputLayout = InferenceEngine::Layout::ANY; + const auto& outputLayout = InferenceEngine::Layout::ANY; + + return std::make_tuple( + generateIndices(indicesShape, inputShape, axis), + indicesShape, + axis, + inputShape, + networkPrecision, + inputPrecision, + outputPrecision, + inputLayout, + outputLayout, + CommonTestUtils::DEVICE_MYRIAD); + } + + static std::vector generateIndices(const std::vector& indicesShape, const std::vector& inputShape, int axis) { + axis = axis < 0 ? axis + static_cast(inputShape.size()) : axis; + + std::vector indices(indicesShape.empty() ? 1 : CommonTestUtils::getTotal(indicesShape)); + CommonTestUtils::fill_data_random(indices.data(), indices.size(), inputShape[axis]); + return indices; + } +}; + +TEST_P(MyriadGatherLayerTest, accuracy) { + Run(); +} + +INSTANTIATE_TEST_CASE_P( + smoke_Gather, + MyriadGatherLayerTest, + testing::Combine( + testing::ValuesIn(indicesShapes), + testing::ValuesIn(inputShapes), + testing::ValuesIn(networkPrecisions)), + MyriadGatherLayerTest::getTestCaseName); + +} // namespace diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/gather.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/gather.hpp index 83b2d23e3bc477..c4be4ca64c5760 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/gather.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/gather.hpp @@ -27,8 +27,13 @@ typedef std::tuple< InferenceEngine::Layout, // Output layout std::string // Device name > gatherParamsTuple; -class GatherLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { + +class GatherLayerTestBase : virtual public LayerTestsUtils::LayerTestsCommon { +protected: + void SetUp(const gatherParamsTuple& params); +}; + +class GatherLayerTest : public testing::WithParamInterface, public GatherLayerTestBase { public: static std::string getTestCaseName(const testing::TestParamInfo &obj); @@ -36,4 +41,4 @@ class GatherLayerTest : public testing::WithParamInterface, void SetUp() override; }; -} // namespace LayerTestsDefinitions \ No newline at end of file +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/gather.cpp b/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/gather.cpp index a8719347178acf..438e4755a7d1cb 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/gather.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/gather.cpp @@ -20,6 +20,24 @@ namespace LayerTestsDefinitions { +void GatherLayerTestBase::SetUp(const gatherParamsTuple& params) { + int axis; + std::vector indices; + std::vector indicesShape; + std::vector inputShape; + InferenceEngine::Precision netPrecision; + std::tie(indices, indicesShape, axis, inputShape, netPrecision, inPrc, outPrc, inLayout, outLayout, targetDevice) = params; + ASSERT_EQ(ngraph::shape_size(indicesShape), indices.size()) << "Indices vector size and provided indices shape doesn't fit each other"; + auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecision); + auto functionParams = ngraph::builder::makeParams(ngPrc, {inputShape}); + auto paramOuts = ngraph::helpers::convert2OutputVector(ngraph::helpers::castOps2Nodes(functionParams)); + auto indicesNode = ngraph::opset3::Constant::create(ngraph::element::i64, ngraph::Shape(indicesShape), indices); + auto axisNode = ngraph::opset3::Constant::create(ngraph::element::i64, ngraph::Shape({}), {axis}); + auto gather = std::make_shared(paramOuts[0], indicesNode, axisNode); + ngraph::ResultVector results{std::make_shared(gather)}; + function = std::make_shared(results, functionParams, "gather"); +} + std::string GatherLayerTest::getTestCaseName(const testing::TestParamInfo &obj) { int axis; std::vector indices; @@ -44,27 +62,12 @@ std::string GatherLayerTest::getTestCaseName(const testing::TestParamInfo indices; - std::vector indicesShape; - std::vector inputShape; - InferenceEngine::Precision netPrecision; - std::tie(indices, indicesShape, axis, inputShape, netPrecision, inPrc, outPrc, inLayout, outLayout, targetDevice) = this->GetParam(); - ASSERT_EQ(ngraph::shape_size(indicesShape), indices.size()) - << "Indices vector size and provided indices shape doesn't fit each other"; - auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecision); - auto params = ngraph::builder::makeParams(ngPrc, {inputShape}); - auto paramOuts = ngraph::helpers::convert2OutputVector( - ngraph::helpers::castOps2Nodes(params)); - auto indicesNode = ngraph::opset3::Constant::create(ngraph::element::i64, ngraph::Shape(indicesShape), indices); - auto axisNode = ngraph::opset3::Constant::create(ngraph::element::i64, ngraph::Shape({}), {axis}); - auto gather = std::make_shared(paramOuts[0], indicesNode, axisNode); - ngraph::ResultVector results{std::make_shared(gather)}; - function = std::make_shared(results, params, "gather"); + GatherLayerTestBase::SetUp(GetParam()); } TEST_P(GatherLayerTest, CompareWithRefs) { Run(); }; -} // namespace LayerTestsDefinitions \ No newline at end of file + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/ie_test_utils/common_test_utils/common_utils.hpp b/inference-engine/tests/ie_test_utils/common_test_utils/common_utils.hpp index 8ab868159f6b5b..9bd67c59d7ac3f 100644 --- a/inference-engine/tests/ie_test_utils/common_test_utils/common_utils.hpp +++ b/inference-engine/tests/ie_test_utils/common_test_utils/common_utils.hpp @@ -120,4 +120,9 @@ inline auto tuple2Vector(Tuple&& tuple) -> decltype(tuple2Vector(std::declval(tuple), makeIndices()); } +template +inline T getTotal(const std::vector& shape) { + return shape.empty() ? 0 : std::accumulate(shape.cbegin(), shape.cend(), static_cast(1), std::multiplies()); +} + } // namespace CommonTestUtils diff --git a/inference-engine/tests/ie_test_utils/common_test_utils/data_utils.hpp b/inference-engine/tests/ie_test_utils/common_test_utils/data_utils.hpp index 379d6c57449d62..f5007119425825 100644 --- a/inference-engine/tests/ie_test_utils/common_test_utils/data_utils.hpp +++ b/inference-engine/tests/ie_test_utils/common_test_utils/data_utils.hpp @@ -152,6 +152,20 @@ static void fill_data_roi(float *data, size_t size, const uint32_t range, const } } +template +void inline fill_data_random(T* pointer, std::size_t size, const uint32_t range = 10, int32_t start_from = 0, const int32_t k = 1, const int seed = 1) { + testing::internal::Random random(seed); + random.Generate(range); + + if (start_from < 0 && !std::is_signed::value) { + start_from = 0; + } + + for (std::size_t i = 0; i < size; i++) { + pointer[i] = static_cast(start_from + static_cast(random.Generate(range))); + } +} + /** @brief Fill blob with random data. * * @param blob Target blob @@ -165,15 +179,8 @@ static void fill_data_roi(float *data, size_t size, const uint32_t range, const template void inline fill_data_random(InferenceEngine::Blob::Ptr &blob, const uint32_t range = 10, int32_t start_from = 0, const int32_t k = 1, const int seed = 1) { using dataType = typename InferenceEngine::PrecisionTrait::value_type; - testing::internal::Random random(1); - random.Generate(range); auto *rawBlobDataPtr = blob->buffer().as(); - if (start_from < 0 && !std::is_signed::value) { - start_from = 0; - } - for (size_t i = 0; i < blob->size(); i++) { - rawBlobDataPtr[i] = static_cast(start_from + static_cast(random.Generate(range))); - } + fill_data_random(rawBlobDataPtr, blob->size(), range, start_from, k, seed); } template diff --git a/inference-engine/tests_deprecated/functional/vpu/common/layers/myriad_layers_gather_test.cpp b/inference-engine/tests_deprecated/functional/vpu/common/layers/myriad_layers_gather_test.cpp deleted file mode 100644 index 59fe2a762aca05..00000000000000 --- a/inference-engine/tests_deprecated/functional/vpu/common/layers/myriad_layers_gather_test.cpp +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "myriad_layers_gather_test.hpp" - -using namespace testing; - -INSTANTIATE_TEST_CASE_P(accuracy, myriadLayerGather_smoke, - // Synthetic tests - // input shape, indices shape, axis, precision - Values(GatherTestParams { {36549, 1024}, {16}, 0, "FP16" }, - GatherTestParams { {10}, {10}, 0, "FP16" }, - GatherTestParams { {36549, 1024}, {10}, 0, "FP16" }, - GatherTestParams { {365490}, {10}, 0, "FP16" }, - GatherTestParams { {10, 1024}, {10}, 0, "FP16" }, - GatherTestParams { {30522, 768}, {1, 128, 1}, 0, "FP16" }, - GatherTestParams { {30522, 768}, {1, 128, 1}, 1, "FP16" }, - GatherTestParams { {6, 12, 10, 24}, {15, 4, 20, 5}, 0, "FP16" }, - GatherTestParams { {6, 12, 10, 24}, {15, 4, 20, 5}, 1, "FP16" }, - GatherTestParams { {6, 12, 10, 24}, {15, 4, 20, 5}, 2, "FP16" }, - GatherTestParams { {6, 12, 10, 24}, {15, 4, 20, 5}, 3, "FP16" }, - GatherTestParams { {10}, {10}, 0, "I32" }, - GatherTestParams { {365490}, {10}, 0, "I32" }, - GatherTestParams { {36549, 768}, {10}, 0, "I32" }, - GatherTestParams { {30522, 768}, {1, 128, 1}, 0, "I32" }, - GatherTestParams { {30522, 768}, {1, 128, 1}, 1, "I32" }, - GatherTestParams { {6, 12, 10, 24}, {15, 4, 20, 5}, 0, "I32" }, - GatherTestParams { {6, 12, 10, 24}, {15, 4, 20, 5}, 3, "I32" }, - // Customer use-cases - // From: Mask R-CNN - // input shape, indices shape, axis, precision - GatherTestParams { {1000, 3}, {1}, 1, "FP16" }, - GatherTestParams { {1000, 3}, {1}, 1, "I32" })); diff --git a/inference-engine/tests_deprecated/functional/vpu/common/layers/myriad_layers_gather_test.hpp b/inference-engine/tests_deprecated/functional/vpu/common/layers/myriad_layers_gather_test.hpp deleted file mode 100644 index 149c29616f8eaf..00000000000000 --- a/inference-engine/tests_deprecated/functional/vpu/common/layers/myriad_layers_gather_test.hpp +++ /dev/null @@ -1,310 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "myriad_layers_tests.hpp" -#include "myriad_layers_reference_functions.hpp" -#include "vpu_tests_config.hpp" -#include "vpu_case_common.hpp" - -#include -#include -#include -#include - -using namespace InferenceEngine; - -using InputShape = std::vector; -using IndicesShape = std::vector; -using Axis = int; -using Type = std::string; // "FP16", "I32" - -using GatherTestParams = std::tuple; - -class myriadLayerGather_smoke : - public myriadLayerTestBaseWithParam { -protected: - - void testGather() { - SKIP_IF_CURRENT_TEST_IS_DISABLED(); - - _config[InferenceEngine::MYRIAD_DETECT_NETWORK_BATCH] = CONFIG_VALUE(NO); - - // - // Parse and check test parameters - // - - const GatherTestParams& gatherTestParams = GetParam(); - const std::vector& inputShape = std::get<0>(gatherTestParams); - const std::vector& indicesShape = std::get<1>(gatherTestParams); - const int axisParam = std::get<2>(gatherTestParams); - const std::string & type = std::get<3>(gatherTestParams); - - IE_ASSERT(type == "I32" || - type == "FP16"); - - const int indicesNDims = indicesShape.size(); - const int inputNDims = inputShape.size(); - const int outputNDims = indicesNDims + inputNDims - 1; - IE_ASSERT(outputNDims > 0); - - // NB: axis param must be in [-len(in.shape), len(in.shape)-1] - const int axis = axisParam + (axisParam < 0 ? inputNDims : 0); - IE_ASSERT(0 <= axis && axis < inputNDims); - - // Deduce shape of `output` tensor - // - // E.g.: - // {N, C, H, W} could be shape of `input` - // {I, J} could be shape of `indices` - // {I, J, C, H, W} could be shape of `output` - std::vector outputShape; - for (int i = 0; i < axis; i++) { - outputShape.push_back(inputShape[i]); - } - for (int i = 0; i < indicesNDims; i++) { - outputShape.push_back(indicesShape[i]); - } - for (int i = axis + 1; i < inputNDims; i++) { - outputShape.push_back(inputShape[i]); - } - IE_ASSERT(outputShape.size() == outputNDims); - - // - // Skip test if data is too large for device - // - - const int inputTotal = getTotal(inputShape); - const int outputTotal = getTotal(outputShape); - const int indicesTotal = getTotal(indicesShape); - - const Precision precision = type == "I32" ? - Precision::I32 : - Precision::FP16; - - const int bpp = precision == Precision::I32 ? - sizeof(int32_t) : - sizeof(ie_fp16); - - const int threshold = 50 * (1 << 20); // empirical - - const bool tooLarge = inputTotal * bpp > threshold || - outputTotal * bpp > threshold; - - DISABLE_IF(tooLarge && !CheckMA2085()); - - // - // Initialize 1-layer network - // - - std::string model = createModel(inputShape, - outputShape, - indicesShape, - axis, - type); - - ASSERT_NO_THROW(readNetwork(model)); - - const auto& network = _cnnNetwork; - - _inputsInfo = network.getInputsInfo(); - _inputsInfo["input"]->setPrecision(precision); - _inputsInfo["indices"]->setPrecision(Precision::I32); - - _outputsInfo = network.getOutputsInfo(); - _outputsInfo["gather"]->setPrecision(precision); - - // - // Create infer request and get its blobs pointers - // - - StatusCode st = OK; - - ASSERT_NO_THROW(st = _vpuPluginPtr->LoadNetwork(_exeNetwork, network, _config, &_resp)); - ASSERT_EQ(StatusCode::OK, st) << _resp.msg; - ASSERT_NE(_exeNetwork, nullptr) << _resp.msg; - - ASSERT_NO_THROW(st = _exeNetwork->CreateInferRequest(_inferRequest, &_resp)); - ASSERT_EQ(StatusCode::OK, st) << _resp.msg; - - Blob::Ptr inputBlob; - ASSERT_NO_THROW(st = _inferRequest->GetBlob("input", inputBlob, &_resp)); - ASSERT_EQ(StatusCode::OK, st) << _resp.msg; - - Blob::Ptr indicesBlob; - ASSERT_NO_THROW(st = _inferRequest->GetBlob("indices", indicesBlob, &_resp)); - ASSERT_EQ(StatusCode::OK, st) << _resp.msg; - - Blob::Ptr outputBlob; - ASSERT_NO_THROW(st = _inferRequest->GetBlob("gather", outputBlob, &_resp)); - ASSERT_EQ(StatusCode::OK, st) << _resp.msg; - - Blob::Ptr referenceBlob; - if (type == "I32") { - referenceBlob = make_shared_blob(outputBlob->getTensorDesc()); - } else { - referenceBlob = make_shared_blob(outputBlob->getTensorDesc()); - } - referenceBlob->allocate(); - - // - // Initialize `input` and `indices` blobs - // - - void* inputBlobData = inputBlob->buffer(); - ASSERT_NE(inputBlobData, nullptr); - - void* indicesBlobData = indicesBlob->buffer(); - ASSERT_NE(indicesBlobData, nullptr); - - const int indicesLimit = inputShape[axis] - 1; - - std::mt19937 gen; - fillUniformly(inputBlobData, inputTotal, precision, 0, 255, gen); - fillUniformly(indicesBlobData, indicesTotal, Precision::I32, 0, indicesLimit, gen); - - // - // Infer - // - - const auto inputLayout = inputBlob->getTensorDesc().getLayout(); - const auto outputLayout = outputBlob->getTensorDesc().getLayout(); - const auto indicesLayout = indicesBlob->getTensorDesc().getLayout(); - const auto layoutPreference = vpu::LayoutPreference::ChannelMajor; - - inputBlob->getTensorDesc().setLayout(vpu::deviceLayout(inputLayout, layoutPreference)); - indicesBlob->getTensorDesc().setLayout(vpu::deviceLayout(indicesLayout, layoutPreference)); - outputBlob->getTensorDesc().setLayout(vpu::deviceLayout(outputLayout, layoutPreference)); - referenceBlob->getTensorDesc().setLayout(vpu::deviceLayout(outputLayout, layoutPreference)); - - ASSERT_NO_THROW(st = _inferRequest->Infer(&_resp)); - ASSERT_EQ(StatusCode::OK, st) << _resp.msg; - - // - // Check result - // - - ref_gather(indicesBlob, inputBlob, referenceBlob, axis); - - CompareCommonExact(outputBlob, referenceBlob); - } - -private: - - // Count total number of elements in ND tensor - static - int getTotal(const std::vector& shape) { - return std::accumulate(shape.begin(), shape.end(), 1, std::multiplies()); - } - - // Fill data[] array with random numbers - // distributed uniformly in the interval [a,b] - static - void fillUniformly(void* data, - const int num, - const Precision& precision, - const double a, - const double b, - std::mt19937& gen) { - if (Precision::FP16 == precision) { - std::uniform_real_distribution uniform(a, b); - for (int i = 0; i < num; i++) { - const float v = uniform(gen); - reinterpret_cast(data)[i] = PrecisionUtils::f32tof16(v); - } - } else if (Precision::I32 == precision) { - const int ia = static_cast(std::round(a)); - const int ib = static_cast(std::round(b)); - std::uniform_int_distribution uniform(ia, ib); - for (int i = 0; i < num; i++) { - const int v = uniform(gen); - reinterpret_cast(data)[i] = v; - } - } else { - IE_ASSERT(precision == Precision::I32 || - precision == Precision::FP16); - } - } - - // Note that: - // - IR version is v7 (should be v10): as readNetwork() method - // cannot parse / denies IR v10 if there's no weights tensor - static - std::string createModel(const std::vector& inputShape, - const std::vector& outputShape, - const std::vector& indicesShape, - const int axis, - const std::string & type) { - std::string model = R"V0G0N( - - - - - - - __INPUT_DIMS__ - - - - - - - __INDICES_DIMS__ - - - - - - - - __INPUT_DIMS__ - - - __INDICES_DIMS__ - - - - - __OUTPUT_DIMS__ - - - - - - - - - - )V0G0N"; - - const std::string inputDimsStr = shapeToDimsString(inputShape); - const std::string outputDimsStr = shapeToDimsString(outputShape); - const std::string indicesDimsStr = shapeToDimsString(indicesShape); - const std::string axisStr = std::to_string(axis); - REPLACE_WITH_STR(model, "__INPUT_DIMS__", inputDimsStr); - REPLACE_WITH_STR(model, "__OUTPUT_DIMS__", outputDimsStr); - REPLACE_WITH_STR(model, "__INDICES_DIMS__", indicesDimsStr); - REPLACE_WITH_STR(model, "__AXIS__", axisStr); - REPLACE_WITH_STR(model, "__TYPE__", type); - - return model; - } - - static - std::string shapeToDimsString(const std::vector& shape) - { - std::string str; - for (int i = 0; i < shape.size(); i++) { - str += (i? " ": ""); - str += "" + std::to_string(shape[i]) + ""; - } - return str; - } -}; - -TEST_P(myriadLayerGather_smoke, Gather) { - testGather(); -} From 4d81bd9e0ecb6d1d3ce95f7b669b9dbae6af7250 Mon Sep 17 00:00:00 2001 From: Gleb Kazantaev Date: Thu, 10 Dec 2020 14:07:20 +0300 Subject: [PATCH 046/244] Parametrize NMS5ToLegacy conversion to avoid Convert operatoins insertion that breaks outputs naming (#3480) --- .../cnn_network_ngraph_impl.cpp | 2 +- .../convert_nms_5_to_legacy.hpp | 2 +- .../convert_nms_5_to_legacy.cpp | 9 ++++---- .../cnn_network/cnn_ngraph_impl_tests.cpp | 23 +++++++++++++++++++ 4 files changed, 30 insertions(+), 6 deletions(-) diff --git a/inference-engine/src/inference_engine/cnn_network_ngraph_impl.cpp b/inference-engine/src/inference_engine/cnn_network_ngraph_impl.cpp index 8a4bc188a0d69a..dd3160cd53ddf1 100644 --- a/inference-engine/src/inference_engine/cnn_network_ngraph_impl.cpp +++ b/inference-engine/src/inference_engine/cnn_network_ngraph_impl.cpp @@ -340,7 +340,7 @@ CNNNetworkNGraphImpl::reshape(const std::map>& OV_ITT_SCOPED_TASK(itt::domains::IE, "CNNNetworkNGraphImpl::ConvertToLegacy"); ::ngraph::pass::Manager manager; // resolves dynamism by replacing dynamic operation with static version - manager.register_pass<::ngraph::pass::ConvertNMS5ToLegacyMatcher>(); + manager.register_pass<::ngraph::pass::ConvertNMS5ToLegacyMatcher>(false); manager.register_pass<::ngraph::pass::ConstantFolding>(); // OneHotToLegacy changes output precision manager.register_pass<::ngraph::pass::ConvertOneHotToOneHotIEMatcher>()->detect_output_type( diff --git a/inference-engine/src/legacy_api/include/legacy/transformations/convert_opset1_to_legacy/convert_nms_5_to_legacy.hpp b/inference-engine/src/legacy_api/include/legacy/transformations/convert_opset1_to_legacy/convert_nms_5_to_legacy.hpp index 375ec6cdc71ada..a352caa8b07b0c 100644 --- a/inference-engine/src/legacy_api/include/legacy/transformations/convert_opset1_to_legacy/convert_nms_5_to_legacy.hpp +++ b/inference-engine/src/legacy_api/include/legacy/transformations/convert_opset1_to_legacy/convert_nms_5_to_legacy.hpp @@ -28,6 +28,6 @@ class INFERENCE_ENGINE_API_CLASS(ConvertNMS5ToLegacyMatcher); class ngraph::pass::ConvertNMS5ToLegacyMatcher: public ngraph::pass::MatcherPass { public: NGRAPH_RTTI_DECLARATION; - ConvertNMS5ToLegacyMatcher(); + ConvertNMS5ToLegacyMatcher(bool force_i32_output_type = true); }; diff --git a/inference-engine/src/legacy_api/src/transformations/convert_opset1_to_legacy/convert_nms_5_to_legacy.cpp b/inference-engine/src/legacy_api/src/transformations/convert_opset1_to_legacy/convert_nms_5_to_legacy.cpp index d9dad3b51f0af2..510832ebf023dc 100644 --- a/inference-engine/src/legacy_api/src/transformations/convert_opset1_to_legacy/convert_nms_5_to_legacy.cpp +++ b/inference-engine/src/legacy_api/src/transformations/convert_opset1_to_legacy/convert_nms_5_to_legacy.cpp @@ -17,10 +17,10 @@ NGRAPH_RTTI_DEFINITION(ngraph::pass::ConvertNMS5ToLegacyMatcher, "ConvertNMS5ToLegacyMatcher", 0); -ngraph::pass::ConvertNMS5ToLegacyMatcher::ConvertNMS5ToLegacyMatcher() { +ngraph::pass::ConvertNMS5ToLegacyMatcher::ConvertNMS5ToLegacyMatcher(bool force_i32_output_type) { auto nms = ngraph::pattern::wrap_type(); - ngraph::matcher_pass_callback callback = [](pattern::Matcher &m) { + ngraph::matcher_pass_callback callback = [force_i32_output_type](pattern::Matcher &m) { auto nms_5 = std::dynamic_pointer_cast(m.get_match_root()); if (!nms_5) { return false; @@ -72,6 +72,7 @@ ngraph::pass::ConvertNMS5ToLegacyMatcher::ConvertNMS5ToLegacyMatcher() { std::shared_ptr nms_legacy{nullptr}; + auto output_type = force_i32_output_type ? element::i32 : nms_5->get_output_type(); if (num_of_inputs > 5 && nms_5->soft_nms_sigma_from_input() != 0.0f) { new_soft_nms_sigma = std::make_shared(new_args.at(5), new_shape_for_soft_nms_sigma, true); new_ops.emplace_back(new_soft_nms_sigma.get_node_shared_ptr()); @@ -84,7 +85,7 @@ ngraph::pass::ConvertNMS5ToLegacyMatcher::ConvertNMS5ToLegacyMatcher() { new_soft_nms_sigma, center_point_box, nms_5->get_sort_result_descending(), - element::i32); + output_type); new_ops.push_back(nms_legacy); } else { nms_legacy = std::make_shared( @@ -95,7 +96,7 @@ ngraph::pass::ConvertNMS5ToLegacyMatcher::ConvertNMS5ToLegacyMatcher() { new_score_threshold, center_point_box, nms_5->get_sort_result_descending(), - element::i32); + output_type); new_ops.push_back(nms_legacy); } diff --git a/inference-engine/tests/functional/inference_engine/cnn_network/cnn_ngraph_impl_tests.cpp b/inference-engine/tests/functional/inference_engine/cnn_network/cnn_ngraph_impl_tests.cpp index a5789bee038e4c..fdbdd8dbc13221 100644 --- a/inference-engine/tests/functional/inference_engine/cnn_network/cnn_ngraph_impl_tests.cpp +++ b/inference-engine/tests/functional/inference_engine/cnn_network/cnn_ngraph_impl_tests.cpp @@ -23,6 +23,7 @@ #include #include +#include #include #include #include @@ -44,6 +45,28 @@ using namespace InferenceEngine; IE_SUPPRESS_DEPRECATED_START +TEST(CNNNGraphImplTests, TestNMS5OutputNames) { + std::shared_ptr f; + { + auto boxes = std::make_shared(ngraph::element::f32, ngraph::Shape{1, 1000, 4}); + auto scores = std::make_shared(ngraph::element::f32, ngraph::Shape{1, 1, 1000}); + auto max_output_boxes_per_class = ngraph::opset5::Constant::create(ngraph::element::i64, ngraph::Shape{}, {10}); + auto iou_threshold = ngraph::opset5::Constant::create(ngraph::element::f32, ngraph::Shape{}, {0.75}); + auto score_threshold = ngraph::opset5::Constant::create(ngraph::element::f32, ngraph::Shape{}, {0.7}); + auto nms = std::make_shared(boxes, scores, max_output_boxes_per_class, iou_threshold, score_threshold, + ngraph::opset5::NonMaxSuppression::BoxEncodingType::CORNER, true); + nms->set_friendly_name("nms"); + f = std::make_shared(ngraph::OutputVector{nms->output(0), nms->output(1), nms->output(2)}, ngraph::ParameterVector{boxes, scores}); + } + + InferenceEngine::CNNNetwork cnnNet(f); + auto outputs_info = cnnNet.getOutputsInfo(); + ASSERT_EQ(outputs_info.size(), 3); + ASSERT_EQ(outputs_info.count("nms.0"), 1); + ASSERT_EQ(outputs_info.count("nms.1"), 1); + ASSERT_EQ(outputs_info.count("nms.2"), 1); +} + TEST(CNNNGraphImplTests, TestConvertWithRemoveLastLayerNetwork) { std::shared_ptr ngraph; { From 5bea1acb13cda67ee0ef07c707e46acced784cdf Mon Sep 17 00:00:00 2001 From: Maxim Vafin Date: Thu, 10 Dec 2020 14:23:11 +0300 Subject: [PATCH 047/244] Specify MVN-6 operation (#3314) * Specify MVN-6 operation * Apply review feedback * Fix typo * Apply review feedback * Apply review feedback * Apply review feedback * Small fix * Fix review feedback * Apply review feedback * Fix MVN formula --- docs/doxygen/ie_docs.xml | 1 + docs/ops/normalization/MVN_6.md | 98 +++++++++++++++++++++++++++++++++ 2 files changed, 99 insertions(+) create mode 100644 docs/ops/normalization/MVN_6.md diff --git a/docs/doxygen/ie_docs.xml b/docs/doxygen/ie_docs.xml index 3acfa3a1d8fedb..203fee60cc6121 100644 --- a/docs/doxygen/ie_docs.xml +++ b/docs/doxygen/ie_docs.xml @@ -146,6 +146,7 @@ + diff --git a/docs/ops/normalization/MVN_6.md b/docs/ops/normalization/MVN_6.md new file mode 100644 index 00000000000000..da82e352a9bd4d --- /dev/null +++ b/docs/ops/normalization/MVN_6.md @@ -0,0 +1,98 @@ +## MVN {#openvino_docs_ops_normalization_MVN_6} + +**Versioned name**: *MVN-6* + +**Category**: *Normalization* + +**Short description**: Calculates mean-variance normalization of the input tensor. + +**Detailed description** + +*MVN* subtracts mean value from the input blob: +\f[ +o_{i} = i_{i} - ReduceMean(i_{k}, axes) +\f] + +If *normalize_variance* is set to `true`, the output blob is divided by variance. When normalizing the value, the number `eps` is added to the variance to avoid division by zero. According to the `eps_mode` flag's value, `eps` is added inside or outside the sqrt: + +* If `eps_mode` is `inside_sqrt`: +\f[ +o_{i}=\frac{o_{i}}{\sqrt {\sum {o_{k}^2}+\epsilon}} +\f] +* If `eps_mode` is `outside_sqrt`: +\f[ +o_{i}=\frac{o_{i}}{\sqrt {\sum {o_{k}^2}}+\epsilon} +\f] + +**Attributes** + +* *normalize_variance* + + * **Description**: *normalize_variance* is a flag that specifies whether to perform variance normalization. + * **Range of values**: + * `false` -- Do not normalize variance + * `true` -- Normalize variance + * **Type**: `boolean` + * **Default value**: None + * **Required**: *yes* + +* *eps* + + * **Description**: *eps* is the number to be added to the variance to avoid division by zero when normalizing the value. + * **Range of values**: a positive floating-point number + * **Type**: `float` + * **Default value**: None + * **Required**: *yes* + +* *eps_mode* + + * **Description**: Choose where to add epsilon. + * **Range of values**: + * `inside_sqrt` -- Add epsilon inside sqrt + * `outside_sqrt` -- Add epsilon outside of sqrt + * **Type**: `string` + * **Default value**: None + * **Required**: *yes* + +**Inputs** + +* **1**: `data` - Input tensor to be normalized. Type *T*. Required. + +* **2**: `axes` - 1D tensor which specifies indices of dimensions in `data` that define normalization slices. Type *T_IND*. Required. + +**Outputs** + +* **1**: Output tensor of the same shape and type as the `data` input tensor. + +**Types** + +* *T*: any floating point type. + +* *T_IND*: `int64` or `int32`. + +**Example** + +```xml + + + + + 6 + 12 + 10 + 24 + + + 3 + + + + + 6 + 12 + 10 + 24 + + + +``` \ No newline at end of file From 5b45299874798128bffc5ae9bb5df7da67ce3c90 Mon Sep 17 00:00:00 2001 From: Pavel Esir Date: Thu, 10 Dec 2020 14:26:25 +0300 Subject: [PATCH 048/244] Spec for GatherElements-6 (#3304) * added GatherElement_6.md spec * corrected typos; updated examples * moved sentence from spec to description * ie_docs.xml updated * made `axis` required * removed redundant sentences * added outputs shape info * added 'the' articles * removed error info about negative indices; some corrections * rank correction in examples --- docs/doxygen/ie_docs.xml | 1 + docs/ops/movement/GatherElements_6.md | 122 ++++++++++++++++++++++++++ 2 files changed, 123 insertions(+) create mode 100644 docs/ops/movement/GatherElements_6.md diff --git a/docs/doxygen/ie_docs.xml b/docs/doxygen/ie_docs.xml index 203fee60cc6121..9028504e31d2e4 100644 --- a/docs/doxygen/ie_docs.xml +++ b/docs/doxygen/ie_docs.xml @@ -122,6 +122,7 @@ + diff --git a/docs/ops/movement/GatherElements_6.md b/docs/ops/movement/GatherElements_6.md new file mode 100644 index 00000000000000..129f20f7b234b2 --- /dev/null +++ b/docs/ops/movement/GatherElements_6.md @@ -0,0 +1,122 @@ +## GatherElements {#openvino_docs_ops_movement_GatherElements_6} + +**Versioned name**: *GatherElements-6* + +**Category**: Data movement operations + +**Short description**: *GatherElements* takes elements from the input `data` tensor at positions specified in the `indices` tensor. + +**Detailed description** *GatherElements* takes elements from the `data` tensor at positions specified in the `indices` tensor. +The `data` and `indices` tensors have the same rank `r >= 1`. Optional attribute `axis` determines +along which axis elements with indices specified in `indices` are taken. The `indices` tensor has the same shape as +the `data` tensor except for the `axis` dimension. Output consists of values (gathered from the `data` tensor) for each +element in the `indices` tensor and has the same shape as `indices`. + +For instance, in the 3D case (`r = 3`), the output is determined by the following equations: +``` + out[i][j][k] = data[indices[i][j][k]][j][k] if axis = 0 + out[i][j][k] = data[i][indices[i][j][k]][k] if axis = 1 + out[i][j][k] = data[i][j][indices[i][j][k]] if axis = 2 +``` +Example 1 with concrete values: +``` + data = [ + [1, 2], + [3, 4], + ] + indices = [ + [0, 1], + [0, 0], + ] + axis = 0 + output = [ + [1, 4], + [1, 2], + ] +``` +Example 2 with `axis` = 1 and `indices` having greater (than `data`) shape: +``` +data = [ + [1, 7], + [4, 3], + ] + indices = [ + [1, 1, 0], + [1, 0, 1], + ] + axis = 1 + output = [ + [7, 7, 1], + [3, 4, 3], + ] +``` + +Example 3 `indices` has lesser (than `data`) shape: +``` +data = [ + [1, 2, 3], + [4, 5, 6], + [7, 8, 9], + ] + indices = [ + [1, 0, 1], + [1, 2, 0], + ] + axis = 0 + output = [ + [4, 2, 6], + [4, 8, 3], + ] +``` + +**Attributes**: +* *axis* + * **Description**: Which axis to gather on. Negative value means counting dimensions from the back. + * **Range of values**: `[-r, r-1]` where `r = rank(data)`. + * **Type**: int + * **Required**: *yes* + + +**Inputs**: + +* **1**: Tensor of type *T*. This is a tensor of a `rank >= 1`. **Required**. + +* **2**: Tensor of type *T_IND* with the same rank as the input. All index values are expected to be within + bounds `[0, s-1]`, where `s` is size along `axis` dimension of the `data` tensor. **Required**. + +**Outputs**: + +* **1**: Tensor with gathered values of type *T*. Tensor has the same shape as `indices`. + +**Types** + +* *T*: any supported type. + +* *T_IND*: `int32` or `int64`. + +**Example** + +```xml +<... type="GatherElements" ...> + + + + 3 + 7 + 5 + + + 3 + 10 + 5 + + + + + 3 + 10 + 5 + + + +``` From 312db9a713dd48a08a97f62bafd971aaecd2adc4 Mon Sep 17 00:00:00 2001 From: Bartosz Lesniewski Date: Thu, 10 Dec 2020 12:30:43 +0100 Subject: [PATCH 049/244] Remove ops from Layer Creator/ Node Converter - part 4 (#3485) * remove gather op from layer creator * remove floormod op from layer creator * remove minimum op from layer creator * remove spacetodepth op from layer creator * remove redundant virtual function specifier --- .../include/legacy/ngraph_ops/gather_ie.hpp | 2 +- .../src/convert_function_to_cnn_network.cpp | 20 ++++++-- .../src/ie_cnn_layer_builder_ngraph.cpp | 9 ---- .../legacy_api/src/ngraph_ops/gather_ie.cpp | 5 ++ .../src/readers/ir_reader/ie_ir_parser.cpp | 46 ------------------- ngraph/core/include/ngraph/op/floor_mod.hpp | 2 +- ngraph/core/include/ngraph/op/not_equal.hpp | 2 +- ngraph/core/src/op/floor_mod.cpp | 5 ++ 8 files changed, 30 insertions(+), 61 deletions(-) diff --git a/inference-engine/src/legacy_api/include/legacy/ngraph_ops/gather_ie.hpp b/inference-engine/src/legacy_api/include/legacy/ngraph_ops/gather_ie.hpp index aea563695df42b..e82a64713e65d2 100644 --- a/inference-engine/src/legacy_api/include/legacy/ngraph_ops/gather_ie.hpp +++ b/inference-engine/src/legacy_api/include/legacy/ngraph_ops/gather_ie.hpp @@ -23,7 +23,7 @@ class INFERENCE_ENGINE_API_CLASS(GatherIE) : public Op { GatherIE(const Output& params, const Output& indices, int64_t axis); void validate_and_infer_types() override; - + bool visit_attributes(AttributeVisitor& visitor) override; int64_t get_axis() const { return m_axis; } void set_axis(int64_t axis) { m_axis = axis; } std::shared_ptr clone_with_new_inputs(const OutputVector& new_args) const override; diff --git a/inference-engine/src/legacy_api/src/convert_function_to_cnn_network.cpp b/inference-engine/src/legacy_api/src/convert_function_to_cnn_network.cpp index 01de48ba6715ae..9b9e2517fcc770 100644 --- a/inference-engine/src/legacy_api/src/convert_function_to_cnn_network.cpp +++ b/inference-engine/src/legacy_api/src/convert_function_to_cnn_network.cpp @@ -186,7 +186,7 @@ InferenceEngine::details::CNNLayerCreator::CNNLayerCreator(const std::shared_ptr return res; }); // TODO - Remove "GreaterEq" once ngraph transitions to GreaterEqual - addSpecificCreator({"Eltwise", "Subtract", "Power", "Maximum", "Divide", "Greater", "GreaterEqual", "FloorMod", "LogicalOr", "LogicalAnd", "LogicalXor", + addSpecificCreator({"Eltwise", "Subtract", "Power", "Maximum", "Minimum", "Divide", "Greater", "GreaterEqual", "FloorMod", "LogicalOr", "LogicalAnd", "LogicalXor", "GreaterEq", "Less", "LessEqual", "Equal", "NotEqual", "Multiply", "Add"}, [](const std::shared_ptr<::ngraph::Node>& node, const std::map& params) -> CNNLayerPtr { LayerParams attrs = {node->get_friendly_name(), "Eltwise", @@ -195,6 +195,8 @@ InferenceEngine::details::CNNLayerCreator::CNNLayerCreator(const std::shared_ptr res->params = params; if (node->description() == "Maximum") { res->params["operation"] = "max"; + } else if (node->description() == "Minimum") { + res->params["operation"] = "min"; } else if (node->description() == "Power") { res->params["operation"] = "pow"; } else if (node->description() == "Subtract") { @@ -1148,6 +1150,20 @@ InferenceEngine::details::CNNLayerCreator::CNNLayerCreator(const std::shared_ptr return res; }); + addSpecificCreator({"GatherIE"}, [](const std::shared_ptr<::ngraph::Node>& node, + const std::map& params) ->CNNLayerPtr { + + LayerParams attrs = {node->get_friendly_name(), "Gather", details::convertPrecision(node->get_output_element_type(0))}; + auto res = std::make_shared(attrs); + + auto castedLayer = std::dynamic_pointer_cast(node); + if (castedLayer == nullptr) THROW_IE_EXCEPTION << "Cannot get " << attrs.type << " layer " << attrs.name; + + res->params["axis"] = Builder::asString(castedLayer->get_axis()); + + return res; + }); + addSpecificCreator({"GatherTreeIE"}, [](const std::shared_ptr<::ngraph::Node>& node, const std::map& params) -> CNNLayerPtr { LayerParams attrs = {node->get_friendly_name(), "GatherTree", details::convertPrecision(node->get_output_element_type(0))}; @@ -1309,11 +1325,9 @@ void convertFunctionToICNNNetwork(const std::shared_ptr>(), std::make_shared>(), std::make_shared>(), - std::make_shared>(), std::make_shared>(), std::make_shared>(), std::make_shared>(), - std::make_shared>(), std::make_shared>(), std::make_shared>(), std::make_shared>(), diff --git a/inference-engine/src/legacy_api/src/ie_cnn_layer_builder_ngraph.cpp b/inference-engine/src/legacy_api/src/ie_cnn_layer_builder_ngraph.cpp index 6b3317daf26a83..f27a22067c4627 100644 --- a/inference-engine/src/legacy_api/src/ie_cnn_layer_builder_ngraph.cpp +++ b/inference-engine/src/legacy_api/src/ie_cnn_layer_builder_ngraph.cpp @@ -439,15 +439,6 @@ CNNLayer::Ptr NodeConverter::createLayer(const std::sha return res; } -template <> -CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ptr& layer) const { - LayerParams params = {layer->get_friendly_name(), "Eltwise", - details::convertPrecision(layer->get_output_element_type(0))}; - auto res = std::make_shared(params); - res->params["operation"] = "min"; - return res; -} - template <> CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ptr& layer) const { LayerParams params = {layer->get_friendly_name(), "Eltwise", diff --git a/inference-engine/src/legacy_api/src/ngraph_ops/gather_ie.cpp b/inference-engine/src/legacy_api/src/ngraph_ops/gather_ie.cpp index 35e095765f047b..1e40623b9b93cb 100644 --- a/inference-engine/src/legacy_api/src/ngraph_ops/gather_ie.cpp +++ b/inference-engine/src/legacy_api/src/ngraph_ops/gather_ie.cpp @@ -34,3 +34,8 @@ void op::GatherIE::validate_and_infer_types() { auto gather = std::make_shared(input_value(0), input_value(1), opset1::Constant::create(element::i64, Shape{1}, {m_axis})); set_output_type(0, gather->output(0).get_element_type(), gather->output(0).get_partial_shape()); } + +bool op::GatherIE::visit_attributes(AttributeVisitor& visitor) { + visitor.on_attribute("axis", m_axis); + return true; +} diff --git a/inference-engine/src/readers/ir_reader/ie_ir_parser.cpp b/inference-engine/src/readers/ir_reader/ie_ir_parser.cpp index 1dadcbb46f24bf..ccaffc3504aa73 100644 --- a/inference-engine/src/readers/ir_reader/ie_ir_parser.cpp +++ b/inference-engine/src/readers/ir_reader/ie_ir_parser.cpp @@ -399,10 +399,8 @@ std::shared_ptr V10Parser::createNode(const std::vector>("CTCGreedyDecoder"), std::make_shared>("DeformableConvolution"), std::make_shared>("DeformablePSROIPooling"), - std::make_shared>("SpaceToDepth"), std::make_shared>("Broadcast"), std::make_shared>("StridedSlice"), - std::make_shared>("Gather"), std::make_shared>("GreaterEqual"), std::make_shared>("GroupConvolution"), std::make_shared>("ConvolutionBackpropData"), @@ -411,10 +409,8 @@ std::shared_ptr V10Parser::createNode(const std::vector>("SquaredDifference"), std::make_shared>("LessEqual"), std::make_shared>("Equal"), - std::make_shared>("FloorMod"), std::make_shared>("LSTMCell"), std::make_shared>("MaxPool"), - std::make_shared>("Minimum"), std::make_shared>("NonMaxSuppression"), std::make_shared>("ReorgYolo"), std::make_shared>("RegionYolo"), @@ -827,15 +823,6 @@ std::shared_ptr V10Parser::LayerCreator::cr return std::make_shared(inputs[0], inputs[1]); } -// FloorMod layer -template <> -std::shared_ptr V10Parser::LayerCreator::createLayer( - const ngraph::OutputVector& inputs, const pugi::xml_node& node, const Blob::CPtr& weights, - const GenericLayerParams& layerParsePrms) { - checkParameters(inputs, layerParsePrms, 2); - return std::make_shared(inputs[0], inputs[1]); -} - // VariadicSplit layer template <> std::shared_ptr V10Parser::LayerCreator::createLayer( @@ -845,20 +832,6 @@ std::shared_ptr V10Parser::LayerCreator return std::make_shared(inputs[0], inputs[1], inputs[2]); } -// SpaceToDepth layer -template <> -std::shared_ptr V10Parser::LayerCreator::createLayer( - const ngraph::OutputVector& inputs, const pugi::xml_node& node, const Blob::CPtr& weights, - const GenericLayerParams& layerParsePrms) { - checkParameters(inputs, layerParsePrms, 1); - pugi::xml_node dn = node.child("data"); - - if (dn.empty()) - THROW_IE_EXCEPTION << "Cannot read parameter for " << getType() << " layer with name: " << layerParsePrms.name; - - return std::make_shared(inputs[0], GetStrAttr(dn, "mode"), GetIntAttr(dn, "block_size", 1)); -} - // DepthToSpace layer template <> std::shared_ptr V10Parser::LayerCreator::createLayer( @@ -907,16 +880,6 @@ std::shared_ptr V10Parser::LayerCreator -std::shared_ptr V10Parser::LayerCreator::createLayer( - const ngraph::OutputVector& inputs, const pugi::xml_node& node, const Blob::CPtr& weights, - const GenericLayerParams& layerParsePrms) { - checkParameters(inputs, layerParsePrms, 2); - return std::make_shared(inputs[0], inputs[1]); -} - - // Broadcast layer template <> std::shared_ptr V10Parser::LayerCreator::createLayer( @@ -1284,15 +1247,6 @@ std::shared_ptr V10Parser::LayerCreator -std::shared_ptr V10Parser::LayerCreator::createLayer( - const ngraph::OutputVector& inputs, const pugi::xml_node& node, const Blob::CPtr& weights, - const GenericLayerParams& layerParsePrms) { - checkParameters(inputs, layerParsePrms, 3); - return std::make_shared(inputs[0], inputs[1], inputs[2]); -} - // LogicalAnd layer template <> std::shared_ptr V10Parser::LayerCreator::createLayer( diff --git a/ngraph/core/include/ngraph/op/floor_mod.hpp b/ngraph/core/include/ngraph/op/floor_mod.hpp index 7bd0918d870f78..5a0ed9b81a4d11 100644 --- a/ngraph/core/include/ngraph/op/floor_mod.hpp +++ b/ngraph/core/include/ngraph/op/floor_mod.hpp @@ -53,7 +53,7 @@ namespace ngraph std::shared_ptr clone_with_new_inputs(const OutputVector& new_args) const override; - + bool visit_attributes(AttributeVisitor& visitor) override; bool evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const override; }; diff --git a/ngraph/core/include/ngraph/op/not_equal.hpp b/ngraph/core/include/ngraph/op/not_equal.hpp index ca511dc2fe15cd..ef2cf88a9bde42 100644 --- a/ngraph/core/include/ngraph/op/not_equal.hpp +++ b/ngraph/core/include/ngraph/op/not_equal.hpp @@ -49,7 +49,7 @@ namespace ngraph bool evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const override; - virtual bool visit_attributes(AttributeVisitor& visitor) override; + bool visit_attributes(AttributeVisitor& visitor) override; }; } // namespace v1 } diff --git a/ngraph/core/src/op/floor_mod.cpp b/ngraph/core/src/op/floor_mod.cpp index 8585cc4026340f..450b880feeea29 100644 --- a/ngraph/core/src/op/floor_mod.cpp +++ b/ngraph/core/src/op/floor_mod.cpp @@ -94,3 +94,8 @@ bool op::v1::FloorMod::evaluate(const HostTensorVector& outputs, OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::FloorMod::evaluate"); return floor_mod::evaluate_floor_mod(inputs[0], inputs[1], outputs[0], get_autob()); } + +bool op::v1::FloorMod::visit_attributes(AttributeVisitor& visitor) +{ + return true; +} From 3db6b548150945b93b5fa4df12cab797514242f0 Mon Sep 17 00:00:00 2001 From: Mateusz Tabaka Date: Thu, 10 Dec 2020 12:59:47 +0100 Subject: [PATCH 050/244] [ONNX] Use kernel shape in MaxPool to create default strides/dilations/paddings (#3522) --- .../onnx_import/utils/pooling_factory.hpp | 19 ++-------- .../onnx_import/src/op/average_pool.cpp | 2 +- .../frontend/onnx_import/src/op/max_pool.cpp | 2 +- .../onnx_import/src/utils/pooling_factory.cpp | 14 +++----- ...ol_dyn_rank_without_default_attrs.prototxt | 35 +++++++++++++++++++ .../test/onnx/onnx_import_dyn_shapes.in.cpp | 15 ++++++++ ngraph/test/runtime/ie/unit_test.manifest | 1 + 7 files changed, 59 insertions(+), 29 deletions(-) create mode 100644 ngraph/test/models/onnx/dynamic_shapes/max_pool_dyn_rank_without_default_attrs.prototxt diff --git a/ngraph/frontend/onnx_import/include/onnx_import/utils/pooling_factory.hpp b/ngraph/frontend/onnx_import/include/onnx_import/utils/pooling_factory.hpp index 230de87c1a83aa..63096d700c00a4 100644 --- a/ngraph/frontend/onnx_import/include/onnx_import/utils/pooling_factory.hpp +++ b/ngraph/frontend/onnx_import/include/onnx_import/utils/pooling_factory.hpp @@ -41,13 +41,12 @@ namespace ngraph /// - AveragePool /// - MaxPool /// - /// This base class holds all common attributes like srides, dilations, + /// This class holds all common attributes like srides, dilations, /// paddings, kernel shape and auto_pad type. - /// - /// \see GlobalPoolingFactory class PoolingFactory { public: + explicit PoolingFactory(const Node& node); virtual ~PoolingFactory() = default; /// @@ -63,8 +62,6 @@ namespace ngraph OutputVector make_max_pool() const; protected: - explicit PoolingFactory(const Node& node); - Node m_onnx_node; const OutputVector m_inputs; Shape m_kernel_shape; @@ -75,18 +72,6 @@ namespace ngraph ngraph::op::PadType m_auto_pad; ngraph::op::RoundingType m_rounding_type; }; - - /// - /// \brief Factory class which generates sub-graphs for ONNX 'local' pooling - /// operators. - /// \note For a 'local' pooling operation, the kernel shape attribute is required - class LocalPoolingFactory : public PoolingFactory - { - public: - explicit LocalPoolingFactory(const Node& node); - virtual ~LocalPoolingFactory() = default; - }; - } // namespace pooling } // namespace onnx_import } // namespace ngraph diff --git a/ngraph/frontend/onnx_import/src/op/average_pool.cpp b/ngraph/frontend/onnx_import/src/op/average_pool.cpp index d098ea7997e227..acf3cf01a21f28 100644 --- a/ngraph/frontend/onnx_import/src/op/average_pool.cpp +++ b/ngraph/frontend/onnx_import/src/op/average_pool.cpp @@ -28,7 +28,7 @@ namespace ngraph { OutputVector average_pool(const Node& node) { - return pooling::LocalPoolingFactory(node).make_avg_pool(); + return pooling::PoolingFactory(node).make_avg_pool(); } } // namespace set_1 diff --git a/ngraph/frontend/onnx_import/src/op/max_pool.cpp b/ngraph/frontend/onnx_import/src/op/max_pool.cpp index 8b8f727a6113fd..f89aba3c87e664 100644 --- a/ngraph/frontend/onnx_import/src/op/max_pool.cpp +++ b/ngraph/frontend/onnx_import/src/op/max_pool.cpp @@ -31,7 +31,7 @@ namespace ngraph { OutputVector max_pool(const Node& node) { - auto max_pool = pooling::LocalPoolingFactory(node).make_max_pool(); + auto max_pool = pooling::PoolingFactory(node).make_max_pool(); max_pool.emplace_back(std::make_shared()); // Indices (optional) return max_pool; } diff --git a/ngraph/frontend/onnx_import/src/utils/pooling_factory.cpp b/ngraph/frontend/onnx_import/src/utils/pooling_factory.cpp index 17a7a2887e5e17..da32eb46d52e64 100644 --- a/ngraph/frontend/onnx_import/src/utils/pooling_factory.cpp +++ b/ngraph/frontend/onnx_import/src/utils/pooling_factory.cpp @@ -31,12 +31,13 @@ namespace ngraph PoolingFactory::PoolingFactory(const Node& node) : m_onnx_node{node} , m_inputs{node.get_ng_inputs()} - , m_strides{convpool::get_strides(node)} - , m_dilations{convpool::get_dilations(node)} + , m_kernel_shape(node.get_attribute_value>("kernel_shape")) + , m_strides{convpool::get_strides(node, m_kernel_shape.size())} + , m_dilations{convpool::get_dilations(node, m_kernel_shape.size())} , m_auto_pad{convpool::get_auto_pad(node)} , m_rounding_type{convpool::get_rounding_type(node)} { - const auto paddings = convpool::get_pads(node); + const auto paddings = convpool::get_pads(node, m_kernel_shape.size()); const CoordinateDiff& padding_above{paddings.second}; const CoordinateDiff& padding_below{paddings.first}; m_padding_below = Shape{std::begin(padding_below), std::end(padding_below)}; @@ -67,13 +68,6 @@ namespace ngraph m_rounding_type, m_auto_pad)}; } - - LocalPoolingFactory::LocalPoolingFactory(const Node& node) - : PoolingFactory(node) - { - // Kernel shape is required - m_kernel_shape = node.get_attribute_value>("kernel_shape"); - } } // namespace pooling } // namespace onnx_import } // namespace ngraph diff --git a/ngraph/test/models/onnx/dynamic_shapes/max_pool_dyn_rank_without_default_attrs.prototxt b/ngraph/test/models/onnx/dynamic_shapes/max_pool_dyn_rank_without_default_attrs.prototxt new file mode 100644 index 00000000000000..02977c439f6fb1 --- /dev/null +++ b/ngraph/test/models/onnx/dynamic_shapes/max_pool_dyn_rank_without_default_attrs.prototxt @@ -0,0 +1,35 @@ +ir_version: 3 +producer_name: "nGraph ONNX Importer" +graph { + node { + input: "x" + output: "y" + op_type: "MaxPool" + attribute { + name: "kernel_shape" + ints: 2 + ints: 2 + type: INTS + } + } + name: "compute_graph" + input { + name: "x" + type { + tensor_type { + elem_type: 1 + } + } + } + output { + name: "y" + type { + tensor_type { + elem_type: 1 + } + } + } +} +opset_import { + version: 7 +} diff --git a/ngraph/test/onnx/onnx_import_dyn_shapes.in.cpp b/ngraph/test/onnx/onnx_import_dyn_shapes.in.cpp index 8dd95ac4d0c987..86bce63d6fbbf4 100644 --- a/ngraph/test/onnx/onnx_import_dyn_shapes.in.cpp +++ b/ngraph/test/onnx/onnx_import_dyn_shapes.in.cpp @@ -1285,3 +1285,18 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_reduce_max_dynamic_input_rank_negat test_case.add_expected_output(Shape{2, 1}, {4, 8}); test_case.run(); } + +NGRAPH_TEST(${BACKEND_NAME}, onnx_model_max_pool_dyn_rank_without_default_attrs) +{ + auto function = onnx_import::import_onnx_model(file_util::path_join( + SERIALIZED_ZOO, "onnx/dynamic_shapes/max_pool_dyn_rank_without_default_attrs.prototxt")); + + auto test_case = test::TestCase(function); + + Shape input_shape{1, 1, 4, 4}; + std::vector input(shape_size(input_shape)); + std::iota(input.begin(), input.end(), 0); + test_case.add_input(input_shape, input); + test_case.add_expected_output(Shape{1, 1, 3, 3}, {5, 6, 7, 9, 10, 11, 13, 14, 15}); + test_case.run(); +} diff --git a/ngraph/test/runtime/ie/unit_test.manifest b/ngraph/test/runtime/ie/unit_test.manifest index f61598ddada39e..3f211fabdecdbf 100644 --- a/ngraph/test/runtime/ie/unit_test.manifest +++ b/ngraph/test/runtime/ie/unit_test.manifest @@ -205,6 +205,7 @@ onnx_dyn_shapes_flatten_neg_axis onnx_model_range_positive_step onnx_model_range_negative_step onnx_dyn_shapes_slice_1_3d_input_21_axes_ends_max +onnx_model_max_pool_dyn_rank_without_default_attrs # LSTMSequence Layer is not instance of RNNLayer class # (Constant W, B, R inputs are required) From 2cfc8ade62c1283a8712daffa42113e0489a70c0 Mon Sep 17 00:00:00 2001 From: Alexander Chaiko Date: Thu, 10 Dec 2020 14:23:29 +0100 Subject: [PATCH 051/244] [IE CLDNN] Suppress fsv16 layout if topology has many crop layers (#3445) --- inference-engine/thirdparty/clDNN/src/program.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/inference-engine/thirdparty/clDNN/src/program.cpp b/inference-engine/thirdparty/clDNN/src/program.cpp index f809583cfa2587..2ee74903070b42 100644 --- a/inference-engine/thirdparty/clDNN/src/program.cpp +++ b/inference-engine/thirdparty/clDNN/src/program.cpp @@ -1140,6 +1140,7 @@ void program_impl::set_layout_optimizer_attributes(layout_optimizer& lo) { size_t total_1x1_fm_conv_layers = 0; size_t total_grouped_conv_layers = 0; size_t opt_deconv_layers_b_fs_zyx_fsv16 = 0; + size_t total_crop_layers = 0; for (auto& node : get_processing_order()) { auto &prim = *node; @@ -1226,6 +1227,7 @@ void program_impl::set_layout_optimizer_attributes(layout_optimizer& lo) { if (prim.get_dependencies()[0]->is_type() || prim.get_dependencies()[0]->is_type()) { can_use_fsv16 = false; } + total_crop_layers++; } if (prim.is_in_data_flow() && @@ -1250,12 +1252,16 @@ void program_impl::set_layout_optimizer_attributes(layout_optimizer& lo) { // Due to fact that single winograd convolution is faster than b_fs_yx_fsv16 and // using them together leads do redundant reorders, whole topology switch // will be performed if at least half of layers can use b_fs_yx_fsv16. + // Crop layers are poorly optimized in fsv16 layout so whole topology stays in bfyx + // if there are many crops (2x more then b_fs_yx_fsv16 convolutions) const float cond_denom = total_conv_layers > 0 ? 1.0f / static_cast(total_conv_layers) : 1.0f; + size_t num_of_conv_b_fs_yx_fsv16 = lo.get_optimized_conv_count({format::b_fs_yx_fsv16, false}); bool should_use_b_fs_yx_fsv16_conv = is_quantized_int8_model || (can_use_fsv16 && total_conv_layers > 11 && - lo.get_optimized_conv_count({format::b_fs_yx_fsv16, false}) * cond_denom > 0.5f); + num_of_conv_b_fs_yx_fsv16 * cond_denom > 0.5f && + num_of_conv_b_fs_yx_fsv16 * 2 > total_crop_layers); bool should_use_fs_b_yx_fsv32_conv = total_conv_layers > 11 && total_grouped_conv_layers == 0 && From 3bcac1641d359041c33c1112f01b4a74945c1d21 Mon Sep 17 00:00:00 2001 From: Alexey Varyzgin Date: Thu, 10 Dec 2020 16:25:01 +0300 Subject: [PATCH 052/244] [BF16] BF16 simulator for AVX512 was done (#3424) --- inference-engine/src/mkldnn_plugin/config.cpp | 7 +- .../src/mkldnn_plugin/mkldnn_exec_network.cpp | 2 +- .../src/mkldnn_plugin/nodes/common/emitter.h | 4 +- .../mkldnn_plugin/nodes/common/softmax.cpp | 39 +++-- .../nodes/jit_eltwise_emitters.cpp | 50 +++--- .../nodes/jit_eltwise_emitters.hpp | 46 +++--- .../nodes/jit_mkldnn_emitters.cpp | 4 +- .../nodes/jit_mkldnn_emitters.hpp | 2 +- .../nodes/mkldnn_eltwise_node.cpp | 23 ++- .../nodes/mkldnn_interpolate_node.cpp | 25 +-- .../mkldnn_plugin/nodes/mkldnn_mvn_node.cpp | 17 +- .../nodes/mkldnn_normalize_node.cpp | 16 +- .../nodes/mkldnn_reduce_node.cpp | 32 +++- .../src/mkldnn_plugin/nodes/region_yolo.cpp | 40 +++-- .../src/mkldnn_plugin/utils/bfloat16.hpp | 68 +++++++- .../cpu/bfloat16/bf16_network_restoring.cpp | 6 +- .../plugin/cpu/bfloat16/bfloat16_helpers.hpp | 6 +- .../plugin/cpu/bfloat16/concat_in_place.cpp | 2 - .../plugin/cpu/bfloat16/conv_add.cpp | 4 +- .../plugin/cpu/bfloat16/conv_conv.cpp | 2 +- .../plugin/cpu/bfloat16/conv_dwconv_relu.cpp | 1 - .../cpu/bfloat16/conv_eltwise_depthwise.cpp | 2 +- .../plugin/cpu/bfloat16/elt_max.cpp | 1 - .../functional/plugin/cpu/bfloat16/elt_x3.cpp | 2 - .../gather_x2_add_mul_relu_concat_matmul.cpp | 4 +- .../plugin/cpu/bfloat16/interpolation.cpp | 146 ------------------ .../bfloat16/mobilenet_ssd_with_branching.cpp | 3 - .../plugin/cpu/bfloat16/resample.cpp | 146 ------------------ .../scaleshift_conv_eltwise_scaleshift.cpp | 1 - .../cpu/bfloat16/scaleshift_conv_relu.cpp | 2 +- .../scaleshift_conv_x2_concat_relu.cpp | 2 - .../scaleshift_x2_conv_x2_eltwise.cpp | 3 +- .../scaleshift_x3_conv_eltwise_relu.cpp | 1 - .../cpu/bfloat16/tail_fp32_optimization.cpp | 1 - .../skip_tests_config.cpp | 2 +- .../cpu/single_layer_tests/normalize.cpp | 2 - 36 files changed, 279 insertions(+), 435 deletions(-) delete mode 100644 inference-engine/tests/functional/plugin/cpu/bfloat16/interpolation.cpp delete mode 100644 inference-engine/tests/functional/plugin/cpu/bfloat16/resample.cpp diff --git a/inference-engine/src/mkldnn_plugin/config.cpp b/inference-engine/src/mkldnn_plugin/config.cpp index c095b9391d11fd..26a698a8cbd18a 100644 --- a/inference-engine/src/mkldnn_plugin/config.cpp +++ b/inference-engine/src/mkldnn_plugin/config.cpp @@ -33,6 +33,9 @@ Config::Config() { streamExecutorConfig._threadBindingType = InferenceEngine::IStreamsExecutor::CORES; #endif + if (!with_cpu_x86_bfloat16()) + enforceBF16 = false; + updateProperties(); } @@ -93,7 +96,7 @@ void Config::readProperties(const std::map &prop) { dumpQuantizedGraphToIr = val; } else if (key == PluginConfigParams::KEY_ENFORCE_BF16) { if (val == PluginConfigParams::YES) { - if (with_cpu_x86_bfloat16()) + if (with_cpu_x86_avx512_core()) enforceBF16 = true; else THROW_IE_EXCEPTION << "Platform doesn't support BF16 format"; @@ -143,8 +146,6 @@ void Config::updateProperties() { _config.insert({ PluginConfigParams::KEY_CPU_THROUGHPUT_STREAMS, std::to_string(streamExecutorConfig._streams) }); _config.insert({ PluginConfigParams::KEY_CPU_THREADS_NUM, std::to_string(streamExecutorConfig._threads) }); _config.insert({ PluginConfigParams::KEY_DUMP_EXEC_GRAPH_AS_DOT, dumpToDot }); - if (!with_cpu_x86_bfloat16()) - enforceBF16 = false; if (enforceBF16) _config.insert({ PluginConfigParams::KEY_ENFORCE_BF16, PluginConfigParams::YES }); else diff --git a/inference-engine/src/mkldnn_plugin/mkldnn_exec_network.cpp b/inference-engine/src/mkldnn_plugin/mkldnn_exec_network.cpp index 39cb372c7e0ae5..4ce00d14501e6c 100644 --- a/inference-engine/src/mkldnn_plugin/mkldnn_exec_network.cpp +++ b/inference-engine/src/mkldnn_plugin/mkldnn_exec_network.cpp @@ -63,7 +63,7 @@ MKLDNNExecNetwork::MKLDNNExecNetwork(const InferenceEngine::ICNNNetwork &network i++; } - if (with_cpu_x86_bfloat16() && isFloatModel) { + if (with_cpu_x86_avx512_core() && isFloatModel) { BF16Transformer bf16Transformer; CNNNetwork cnnetwork(_clonedNetwork); // If enforceBF16 flag was set, BF16 transformation applies for all layers supported by CPU plugin. diff --git a/inference-engine/src/mkldnn_plugin/nodes/common/emitter.h b/inference-engine/src/mkldnn_plugin/nodes/common/emitter.h index 53a1aef9a6694f..f6978d30da3d78 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/common/emitter.h +++ b/inference-engine/src/mkldnn_plugin/nodes/common/emitter.h @@ -13,7 +13,7 @@ namespace MKLDNNPlugin { class jit_emitter { public: - jit_emitter(mkldnn::impl::cpu::jit_generator* host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode& node, + jit_emitter(mkldnn::impl::cpu::jit_generator* host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode* node, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32) : h(host), host_isa_(host_isa), n(node), exec_prc_(exec_prc) { k_mask = Xbyak::Opmask(1); // FIXME: in general case we need preserve k_mask state as well @@ -32,7 +32,7 @@ class jit_emitter { size_t get_max_vecs_count() const; size_t get_vec_length() const; - const MKLDNNNode& n; + const MKLDNNNode* n; mkldnn::impl::cpu::jit_generator* h; mkldnn::impl::cpu::cpu_isa_t host_isa_; InferenceEngine::Precision exec_prc_; diff --git a/inference-engine/src/mkldnn_plugin/nodes/common/softmax.cpp b/inference-engine/src/mkldnn_plugin/nodes/common/softmax.cpp index bd625795203490..1c95cebb253217 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/common/softmax.cpp +++ b/inference-engine/src/mkldnn_plugin/nodes/common/softmax.cpp @@ -48,8 +48,12 @@ struct jit_uni_softmax_kernel_f32 : public jit_uni_softmax_kernel, public jit_ge jit_uni_softmax_kernel_f32(jit_softmax_config_params jcp) : jit_uni_softmax_kernel(), jit_generator() { exp_injector.reset(new jit_uni_eltwise_injector_f32(this, alg_kind::eltwise_exp, 0.f, 0.f)); + if (!mayiuse(avx512_core_bf16) && mayiuse(avx512_core)) + emu_vcvtneps2bf16.reset(new jit_emu_vcvtneps2bf16(this, isa, nullptr)); + this->preamble(); + mov(reg_src, ptr[reg_params + GET_OFF(src)]); mov(reg_dst, ptr[reg_params + GET_OFF(dst)]); mov(reg_src_stride, ptr[reg_params + GET_OFF(src_stride)]); @@ -72,16 +76,16 @@ struct jit_uni_softmax_kernel_f32 : public jit_uni_softmax_kernel, public jit_ge load_vector(vmm_val, ptr[aux_reg_src], jcp.src_dt); - if (isa == sse42) { + if (isa == cpu::sse42) { uni_vmovups(vmm_mask, vmm_val); uni_vcmpgtps(vmm_mask, vmm_mask, vmm_max); - } else if (isa == avx2) { + } else if (isa == cpu::avx2) { uni_vcmpgtps(vmm_mask, vmm_val, vmm_max); } else { vcmpps(k_mask, vmm_val, vmm_max, _cmp_nle_us); } - if (isa == avx512_common) { + if (isa == cpu::avx512_common) { vptestmd(k_mask, vmm_mask, vmm_mask); vblendmps(vmm_max | k_mask, vmm_max, vmm_val); } else { @@ -143,13 +147,17 @@ struct jit_uni_softmax_kernel_f32 : public jit_uni_softmax_kernel, public jit_ge this->postamble(); + if (!mayiuse(avx512_core_bf16) && mayiuse(avx512_core)) + emu_vcvtneps2bf16->emit_table(); + exp_injector->prepare_table(); ker_ = (decltype(ker_))this->getCode(); } private: - using Vmm = typename conditional3::type; + using Vmm = typename conditional3::type; size_t vlen = cpu_isa_traits::vlen; Xbyak::Reg64 reg_src = r8; @@ -169,6 +177,8 @@ struct jit_uni_softmax_kernel_f32 : public jit_uni_softmax_kernel, public jit_ge const Xbyak::Opmask k_mask = Xbyak::Opmask(1); + std::unique_ptr emu_vcvtneps2bf16; + std::shared_ptr> exp_injector; inline void load_vector(Vmm vmm_src, const Xbyak::Address &op, Precision src_dt) { @@ -192,8 +202,11 @@ struct jit_uni_softmax_kernel_f32 : public jit_uni_softmax_kernel, public jit_ge uni_vmovups(op, vmm_dst); break; case Precision::BF16: - vcvtneps2bf16(ymm_dst, vmm_dst); - uni_vmovups(op, ymm_dst); + if (mayiuse(avx512_core_bf16)) + vcvtneps2bf16(ymm_dst, vmm_dst); + else + emu_vcvtneps2bf16->emit({static_cast(vmm_dst.getIdx())}, {static_cast(ymm_dst.getIdx())}); + vmovdqu16(op, ymm_dst); break; default: assert(!"unknown dst_dt"); @@ -204,7 +217,7 @@ struct jit_uni_softmax_kernel_f32 : public jit_uni_softmax_kernel, public jit_ge SoftmaxGeneric::SoftmaxGeneric(Precision inpPrc, Precision outPrc) : input_prec(inpPrc), output_prec(outPrc) { if (Precision::BF16 == output_prec) { - if (!mayiuse(avx512_core_bf16)) { + if (!mayiuse(avx512_core)) { THROW_IE_EXCEPTION << "SoftmaxGeneric doesn't support BF16 precision on this target."; } } @@ -214,14 +227,14 @@ SoftmaxGeneric::SoftmaxGeneric(Precision inpPrc, Precision outPrc) jcp.src_dt = inpPrc; jcp.dst_dt = outPrc; - if (mayiuse(avx512_common)) { - softmax_kernel.reset(new jit_uni_softmax_kernel_f32(jcp)); + if (mayiuse(cpu::avx512_common)) { + softmax_kernel.reset(new jit_uni_softmax_kernel_f32(jcp)); block_size = 16; - } else if (mayiuse(avx2)) { - softmax_kernel.reset(new jit_uni_softmax_kernel_f32(jcp)); + } else if (mayiuse(cpu::avx2)) { + softmax_kernel.reset(new jit_uni_softmax_kernel_f32(jcp)); block_size = 8; - } else if (mayiuse(sse42)) { - softmax_kernel.reset(new jit_uni_softmax_kernel_f32(jcp)); + } else if (mayiuse(cpu::sse42)) { + softmax_kernel.reset(new jit_uni_softmax_kernel_f32(jcp)); block_size = 4; } } diff --git a/inference-engine/src/mkldnn_plugin/nodes/jit_eltwise_emitters.cpp b/inference-engine/src/mkldnn_plugin/nodes/jit_eltwise_emitters.cpp index aa5449b49795fa..cca2e6e53e94cf 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/jit_eltwise_emitters.cpp +++ b/inference-engine/src/mkldnn_plugin/nodes/jit_eltwise_emitters.cpp @@ -16,7 +16,7 @@ using namespace Xbyak; namespace MKLDNNPlugin { /// ADD /// -jit_add_emitter::jit_add_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode& node, Precision exec_prc) +jit_add_emitter::jit_add_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode* node, Precision exec_prc) : jit_emitter(host, host_isa, node, exec_prc) {} size_t jit_add_emitter::get_inputs_num() { return 2; } @@ -50,7 +50,7 @@ void jit_add_emitter::emit_isa(const std::vector &in_vec_idxs, const std } /// MUL_ADD /// -jit_mul_add_emitter::jit_mul_add_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode& node, Precision exec_prc) +jit_mul_add_emitter::jit_mul_add_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode* node, Precision exec_prc) : jit_emitter(host, host_isa, node, exec_prc) {} size_t jit_mul_add_emitter::get_inputs_num() { return 3; } @@ -109,7 +109,7 @@ size_t jit_mul_add_emitter::aux_vecs_count() const { } /// SUB /// -jit_subtract_emitter::jit_subtract_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode& node, Precision exec_prc) +jit_subtract_emitter::jit_subtract_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode* node, Precision exec_prc) : jit_emitter(host, host_isa, node, exec_prc) {} size_t jit_subtract_emitter::get_inputs_num() { return 2; } @@ -144,7 +144,7 @@ void jit_subtract_emitter::emit_isa(const std::vector &in_vec_idxs, cons /// MULTIPLY /// -jit_multiply_emitter::jit_multiply_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode& node, Precision exec_prc) +jit_multiply_emitter::jit_multiply_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode* node, Precision exec_prc) : jit_emitter(host, host_isa, node, exec_prc) {} size_t jit_multiply_emitter::get_inputs_num() { return 2; } @@ -179,7 +179,7 @@ void jit_multiply_emitter::emit_isa(const std::vector &in_vec_idxs, cons /// DIVIDE /// -jit_divide_emitter::jit_divide_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode& node, Precision exec_prc) +jit_divide_emitter::jit_divide_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode* node, Precision exec_prc) : jit_emitter(host, host_isa, node, exec_prc) {} size_t jit_divide_emitter::get_inputs_num() { return 2; } @@ -214,7 +214,7 @@ void jit_divide_emitter::emit_isa(const std::vector &in_vec_idxs, const /// FLOOR_MOD /// -jit_floor_mod_emitter::jit_floor_mod_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode& node, Precision exec_prc) +jit_floor_mod_emitter::jit_floor_mod_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode* node, Precision exec_prc) : jit_emitter(host, host_isa, node, exec_prc) {} size_t jit_floor_mod_emitter::get_inputs_num() { return 2; } @@ -263,7 +263,7 @@ size_t jit_floor_mod_emitter::aux_vecs_count() const { } /// MOD /// -jit_mod_emitter::jit_mod_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode& node, Precision exec_prc) +jit_mod_emitter::jit_mod_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode* node, Precision exec_prc) : jit_emitter(host, host_isa, node, exec_prc) {} size_t jit_mod_emitter::get_inputs_num() { return 2; } @@ -312,7 +312,7 @@ size_t jit_mod_emitter::aux_vecs_count() const { } /// MAXIMUM /// -jit_maximum_emitter::jit_maximum_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode& node, Precision exec_prc) +jit_maximum_emitter::jit_maximum_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode* node, Precision exec_prc) : jit_emitter(host, host_isa, node, exec_prc) {} size_t jit_maximum_emitter::get_inputs_num() { return 2; } @@ -359,7 +359,7 @@ std::set jit_maximum_emitter::get_supported_precisio } /// MINIMUM /// -jit_minimum_emitter::jit_minimum_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode& node, Precision exec_prc) +jit_minimum_emitter::jit_minimum_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode* node, Precision exec_prc) : jit_emitter(host, host_isa, node, exec_prc) {} size_t jit_minimum_emitter::get_inputs_num() { return 2; } @@ -406,7 +406,7 @@ std::set jit_minimum_emitter::get_supported_precisio } /// SQUARED_DIFFERENCE /// -jit_squared_difference_emitter::jit_squared_difference_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode& node, Precision exec_prc) +jit_squared_difference_emitter::jit_squared_difference_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode* node, Precision exec_prc) : jit_emitter(host, host_isa, node, exec_prc) {} size_t jit_squared_difference_emitter::get_inputs_num() { return 2; } @@ -444,7 +444,7 @@ void jit_squared_difference_emitter::emit_isa(const std::vector &in_vec_ /// POWER_DYNAMIC /// -jit_power_dynamic_emitter::jit_power_dynamic_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode& node, Precision exec_prc) +jit_power_dynamic_emitter::jit_power_dynamic_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode* node, Precision exec_prc) : jit_emitter(host, host_isa, node, exec_prc) {} size_t jit_power_dynamic_emitter::get_inputs_num() { return 2; } @@ -550,7 +550,7 @@ void jit_power_dynamic_emitter::emit_isa(const std::vector &in_vec_idxs, /// EQUAL /// -jit_equal_emitter::jit_equal_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode& node, Precision exec_prc) +jit_equal_emitter::jit_equal_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode* node, Precision exec_prc) : jit_emitter(host, host_isa, node, exec_prc) { prepare_table(); } @@ -606,7 +606,7 @@ size_t jit_equal_emitter::aux_vecs_count() const { } /// NOT_EQUAL /// -jit_not_equal_emitter::jit_not_equal_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode& node, Precision exec_prc) +jit_not_equal_emitter::jit_not_equal_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode* node, Precision exec_prc) : jit_emitter(host, host_isa, node, exec_prc) { prepare_table(); } @@ -662,7 +662,7 @@ size_t jit_not_equal_emitter::aux_vecs_count() const { } /// GREATER /// -jit_greater_emitter::jit_greater_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode& node, Precision exec_prc) +jit_greater_emitter::jit_greater_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode* node, Precision exec_prc) : jit_emitter(host, host_isa, node, exec_prc) { prepare_table(); } @@ -718,7 +718,7 @@ size_t jit_greater_emitter::aux_vecs_count() const { } /// GREATER_EQUAL /// -jit_greater_equal_emitter::jit_greater_equal_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode& node, Precision exec_prc) +jit_greater_equal_emitter::jit_greater_equal_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode* node, Precision exec_prc) : jit_emitter(host, host_isa, node, exec_prc) { prepare_table(); } @@ -774,7 +774,7 @@ size_t jit_greater_equal_emitter::aux_vecs_count() const { } /// LESS /// -jit_less_emitter::jit_less_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode& node, Precision exec_prc) +jit_less_emitter::jit_less_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode* node, Precision exec_prc) : jit_emitter(host, host_isa, node, exec_prc) { prepare_table(); } @@ -830,7 +830,7 @@ size_t jit_less_emitter::aux_vecs_count() const { } /// LESS_EQUAL /// -jit_less_equal_emitter::jit_less_equal_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode& node, Precision exec_prc) +jit_less_equal_emitter::jit_less_equal_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode* node, Precision exec_prc) : jit_emitter(host, host_isa, node, exec_prc) { prepare_table(); } @@ -887,7 +887,7 @@ size_t jit_less_equal_emitter::aux_vecs_count() const { } /// LOGICAL_AND /// -jit_logical_and_emitter::jit_logical_and_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode& node, Precision exec_prc) +jit_logical_and_emitter::jit_logical_and_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode* node, Precision exec_prc) : jit_emitter(host, host_isa, node, exec_prc) { prepare_table(); } @@ -964,7 +964,7 @@ size_t jit_logical_and_emitter::aux_vecs_count() const { /// LOGICAL_OR /// -jit_logical_or_emitter::jit_logical_or_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode& node, Precision exec_prc) +jit_logical_or_emitter::jit_logical_or_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode* node, Precision exec_prc) : jit_emitter(host, host_isa, node, exec_prc) { prepare_table(); } @@ -1040,7 +1040,7 @@ size_t jit_logical_or_emitter::aux_vecs_count() const { } /// LOGICAL_XOR /// -jit_logical_xor_emitter::jit_logical_xor_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode& node, Precision exec_prc) +jit_logical_xor_emitter::jit_logical_xor_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode* node, Precision exec_prc) : jit_emitter(host, host_isa, node, exec_prc) { prepare_table(); } @@ -1116,7 +1116,7 @@ size_t jit_logical_xor_emitter::aux_vecs_count() const { } /// LOGICAL_NOT /// -jit_logical_not_emitter::jit_logical_not_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode& node, Precision exec_prc) +jit_logical_not_emitter::jit_logical_not_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode* node, Precision exec_prc) : jit_emitter(host, host_isa, node, exec_prc) { prepare_table(); } @@ -1171,7 +1171,7 @@ size_t jit_logical_not_emitter::aux_vecs_count() const { } /// POWER_STATIC /// -jit_power_static_emitter::jit_power_static_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode& node, Precision exec_prc) +jit_power_static_emitter::jit_power_static_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode* node, Precision exec_prc) : jit_emitter(host, host_isa, node, exec_prc) { prepare_table(); } @@ -1198,7 +1198,7 @@ void jit_power_static_emitter::emit_isa(const std::vector &in_vec_idxs, Vmm vmm_dst = Vmm(out_vec_idxs[0]); Vmm vmm_aux0 = Vmm(aux_vec_idxs[0]); - auto *powerLayer = dynamic_cast(n.getCnnLayer().get()); + auto *powerLayer = dynamic_cast(n->getCnnLayer().get()); if (powerLayer == nullptr) THROW_IE_EXCEPTION << "Cannot convert power layer."; @@ -1340,7 +1340,7 @@ void jit_power_static_emitter::emit_isa(const std::vector &in_vec_idxs, } void jit_power_static_emitter::register_table_entries() { - auto *powerLayer = dynamic_cast(n.getCnnLayer().get()); + auto *powerLayer = dynamic_cast(n->getCnnLayer().get()); if (powerLayer == nullptr) THROW_IE_EXCEPTION << "Cannot convert power layer."; @@ -1359,7 +1359,7 @@ size_t jit_power_static_emitter::aux_vecs_count() const { } /// PRELU /// -jit_prelu_emitter::jit_prelu_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode& node, Precision exec_prc) +jit_prelu_emitter::jit_prelu_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode* node, Precision exec_prc) : jit_emitter(host, host_isa, node, exec_prc) { prepare_table(); } diff --git a/inference-engine/src/mkldnn_plugin/nodes/jit_eltwise_emitters.hpp b/inference-engine/src/mkldnn_plugin/nodes/jit_eltwise_emitters.hpp index baa3fd80e812e4..4bf427e6f497dc 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/jit_eltwise_emitters.hpp +++ b/inference-engine/src/mkldnn_plugin/nodes/jit_eltwise_emitters.hpp @@ -12,7 +12,7 @@ namespace MKLDNNPlugin { class jit_add_emitter : public jit_emitter { public: - jit_add_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode& node, + jit_add_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode* node, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() override; @@ -27,7 +27,7 @@ class jit_add_emitter : public jit_emitter { class jit_mul_add_emitter : public jit_emitter { public: - jit_mul_add_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode& node, + jit_mul_add_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode* node, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() override; @@ -45,7 +45,7 @@ class jit_mul_add_emitter : public jit_emitter { class jit_subtract_emitter : public jit_emitter { public: - jit_subtract_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode& node, + jit_subtract_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode* node, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() override; @@ -61,7 +61,7 @@ class jit_subtract_emitter : public jit_emitter { class jit_multiply_emitter : public jit_emitter { public: - jit_multiply_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode& node, + jit_multiply_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode* node, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() override; @@ -77,7 +77,7 @@ class jit_multiply_emitter : public jit_emitter { class jit_divide_emitter : public jit_emitter { public: - jit_divide_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode& node, + jit_divide_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode* node, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() override; @@ -93,7 +93,7 @@ class jit_divide_emitter : public jit_emitter { class jit_floor_mod_emitter : public jit_emitter { public: - jit_floor_mod_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode& node, + jit_floor_mod_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode* node, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() override; @@ -110,7 +110,7 @@ class jit_floor_mod_emitter : public jit_emitter { class jit_mod_emitter : public jit_emitter { public: - jit_mod_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode& node, + jit_mod_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode* node, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() override; @@ -127,7 +127,7 @@ class jit_mod_emitter : public jit_emitter { class jit_maximum_emitter : public jit_emitter { public: - jit_maximum_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode& node, + jit_maximum_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode* node, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() override; @@ -144,7 +144,7 @@ class jit_maximum_emitter : public jit_emitter { class jit_minimum_emitter : public jit_emitter { public: - jit_minimum_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode& node, + jit_minimum_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode* node, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() override; @@ -161,7 +161,7 @@ class jit_minimum_emitter : public jit_emitter { class jit_squared_difference_emitter : public jit_emitter { public: - jit_squared_difference_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode& node, + jit_squared_difference_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode* node, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() override; @@ -177,7 +177,7 @@ class jit_squared_difference_emitter : public jit_emitter { class jit_power_dynamic_emitter : public jit_emitter { public: - jit_power_dynamic_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode& node, + jit_power_dynamic_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode* node, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() override; @@ -193,7 +193,7 @@ class jit_power_dynamic_emitter : public jit_emitter { class jit_equal_emitter : public jit_emitter { public: - jit_equal_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode& node, + jit_equal_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode* node, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() override; @@ -212,7 +212,7 @@ class jit_equal_emitter : public jit_emitter { class jit_not_equal_emitter : public jit_emitter { public: - jit_not_equal_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode& node, + jit_not_equal_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode* node, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() override; @@ -231,7 +231,7 @@ class jit_not_equal_emitter : public jit_emitter { class jit_greater_emitter : public jit_emitter { public: - jit_greater_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode& node, + jit_greater_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode* node, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() override; @@ -250,7 +250,7 @@ class jit_greater_emitter : public jit_emitter { class jit_greater_equal_emitter : public jit_emitter { public: - jit_greater_equal_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode& node, + jit_greater_equal_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode* node, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() override; @@ -269,7 +269,7 @@ class jit_greater_equal_emitter : public jit_emitter { class jit_less_emitter : public jit_emitter { public: - jit_less_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode& node, + jit_less_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode* node, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() override; @@ -288,7 +288,7 @@ class jit_less_emitter : public jit_emitter { class jit_less_equal_emitter : public jit_emitter { public: - jit_less_equal_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode& node, + jit_less_equal_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode* node, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() override; @@ -307,7 +307,7 @@ class jit_less_equal_emitter : public jit_emitter { class jit_logical_and_emitter : public jit_emitter { public: - jit_logical_and_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode& node, + jit_logical_and_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode* node, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() override; @@ -326,7 +326,7 @@ class jit_logical_and_emitter : public jit_emitter { class jit_logical_or_emitter : public jit_emitter { public: - jit_logical_or_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode& node, + jit_logical_or_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode* node, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() override; @@ -345,7 +345,7 @@ class jit_logical_or_emitter : public jit_emitter { class jit_logical_xor_emitter : public jit_emitter { public: - jit_logical_xor_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode& node, + jit_logical_xor_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode* node, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() override; @@ -363,7 +363,7 @@ class jit_logical_xor_emitter : public jit_emitter { class jit_logical_not_emitter : public jit_emitter { public: - jit_logical_not_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode& node, + jit_logical_not_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode* node, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() override; @@ -381,7 +381,7 @@ class jit_logical_not_emitter : public jit_emitter { class jit_power_static_emitter : public jit_emitter { public: - jit_power_static_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode& node, + jit_power_static_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode* node, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() override; @@ -399,7 +399,7 @@ class jit_power_static_emitter : public jit_emitter { class jit_prelu_emitter : public jit_emitter { public: - jit_prelu_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode& node, + jit_prelu_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode* node, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() override; diff --git a/inference-engine/src/mkldnn_plugin/nodes/jit_mkldnn_emitters.cpp b/inference-engine/src/mkldnn_plugin/nodes/jit_mkldnn_emitters.cpp index 9be8fd95f00f4d..cc1eadb5987e87 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/jit_mkldnn_emitters.cpp +++ b/inference-engine/src/mkldnn_plugin/nodes/jit_mkldnn_emitters.cpp @@ -13,9 +13,9 @@ using namespace Xbyak; namespace MKLDNNPlugin { -jit_mkldnn_emitter::jit_mkldnn_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode& node, InferenceEngine::Precision exec_prc) +jit_mkldnn_emitter::jit_mkldnn_emitter(jit_generator *host, cpu_isa_t host_isa, const MKLDNNNode* node, InferenceEngine::Precision exec_prc) : jit_emitter(host, host_isa, node, exec_prc) { - auto& eltwiseNode = dynamic_cast(n); + auto& eltwiseNode = dynamic_cast(*n); auto alg = static_cast(eltwiseNode.getAlgorithm()); diff --git a/inference-engine/src/mkldnn_plugin/nodes/jit_mkldnn_emitters.hpp b/inference-engine/src/mkldnn_plugin/nodes/jit_mkldnn_emitters.hpp index cfd403971448c4..8820532ee7f205 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/jit_mkldnn_emitters.hpp +++ b/inference-engine/src/mkldnn_plugin/nodes/jit_mkldnn_emitters.hpp @@ -13,7 +13,7 @@ namespace MKLDNNPlugin { class jit_mkldnn_emitter : public jit_emitter { public: - jit_mkldnn_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode& node, + jit_mkldnn_emitter(mkldnn::impl::cpu::jit_generator *host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode* node, InferenceEngine::Precision exec_prc = InferenceEngine::Precision::FP32); size_t get_inputs_num() override; diff --git a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_eltwise_node.cpp b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_eltwise_node.cpp index 0320dfb3cff381..958219794fa8f7 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_eltwise_node.cpp +++ b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_eltwise_node.cpp @@ -11,6 +11,7 @@ #include #include #include +#include "utils/bfloat16.hpp" #include "ie_parallel.hpp" #include "mkldnn_quantize_node.h" #include @@ -45,7 +46,7 @@ struct EltwiseEmitterContext { std::shared_ptr emitter; mkldnn::impl::cpu::jit_generator *host; mkldnn::impl::cpu::cpu_isa_t host_isa; - const MKLDNNNode & node; + const MKLDNNNode * node; InferenceEngine::Precision exec_prc; }; @@ -108,6 +109,9 @@ struct jit_uni_eltwise_generic : public jit_uni_eltwise_kernel, public jit_gener } } + if (!mayiuse(avx512_core_bf16) && mayiuse(avx512_core)) + emu_vcvtneps2bf16.reset(new jit_emu_vcvtneps2bf16(this, isa, nullptr)); + this->preamble(); for (int i = 0; i < jep.inputs_number; i++) @@ -273,6 +277,9 @@ struct jit_uni_eltwise_generic : public jit_uni_eltwise_kernel, public jit_gener this->postamble(); + if (!mayiuse(avx512_core_bf16) && mayiuse(avx512_core)) + emu_vcvtneps2bf16->emit_table(); + eltwise_emitter->emit_table(); for (int i = 0; i < post_op_emitters.size(); i++) { post_op_emitters[i]->emit_table(); @@ -320,6 +327,8 @@ struct jit_uni_eltwise_generic : public jit_uni_eltwise_kernel, public jit_gener Vmm vmm_d_bias = Vmm(13); Vmm vmm_zero = Vmm(15); + std::unique_ptr emu_vcvtneps2bf16; + std::shared_ptr eltwise_emitter = nullptr; std::vector> post_op_emitters = {}; @@ -392,12 +401,13 @@ struct jit_uni_eltwise_generic : public jit_uni_eltwise_kernel, public jit_gener std::shared_ptr create_eltwise_emitter(MKLDNNNode& node, Precision exec_prec) { auto& eltwiseNode = dynamic_cast(node); + const MKLDNNNode * eltwiseNodePtr = dynamic_cast(&node); EltwiseEmitterContext ctx = { nullptr, this, isa, - eltwiseNode, + eltwiseNodePtr, exec_prec }; @@ -615,8 +625,11 @@ struct jit_uni_eltwise_generic : public jit_uni_eltwise_kernel, public jit_gener uni_vmovups(op, vmm_dst); break; case Precision::BF16: - vcvtneps2bf16(ymm_dst, vmm_dst); - uni_vmovups(op, ymm_dst); + if (mayiuse(avx512_core_bf16)) + vcvtneps2bf16(ymm_dst, vmm_dst); + else + emu_vcvtneps2bf16->emit({static_cast(vmm_dst.getIdx())}, {static_cast(ymm_dst.getIdx())}); + vmovdqu16(op, ymm_dst); break; case Precision::I16: if (isa == avx512_common) { @@ -1024,7 +1037,7 @@ void MKLDNNEltwiseNode::initSupportedPrimitiveDescriptors() { } } - if (!mayiuse(avx512_core_bf16)) { + if (!mayiuse(avx512_core)) { bool hasBF16 = false; for (auto &inPrc : inputPrecisions) if (inPrc == Precision::BF16) diff --git a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_interpolate_node.cpp b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_interpolate_node.cpp index a2813b0331b434..f6f0acee7cbd80 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_interpolate_node.cpp +++ b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_interpolate_node.cpp @@ -21,7 +21,7 @@ #include "jit_uni_depthwise.hpp" #include "jit_uni_quantization.hpp" #include "common/cpu_memcpy.h" -#include "ngraph/type/bfloat16.hpp" +#include "utils/bfloat16.hpp" using namespace mkldnn; using namespace MKLDNNPlugin; @@ -59,6 +59,9 @@ struct jit_uni_interpolate_kernel_f32 : public jit_uni_interpolate_kernel, publi } } + if (!mayiuse(avx512_core_bf16) && mayiuse(avx512_core)) + emu_vcvtneps2bf16.reset(new jit_emu_vcvtneps2bf16(this, isa, nullptr)); + this->preamble(); if (attr_.post_ops_.len_ != 0) @@ -134,6 +137,9 @@ struct jit_uni_interpolate_kernel_f32 : public jit_uni_interpolate_kernel, publi this->postamble(); + if (!mayiuse(avx512_core_bf16) && mayiuse(avx512_core)) + emu_vcvtneps2bf16->emit_table(); + for (auto& inj : eltwise_injectors) inj->prepare_table(); if ((jcp_.mode == InterpolateMode::cubic) && (jcp_.layout == InterpolateLayoutType::planar)) { @@ -224,6 +230,8 @@ struct jit_uni_interpolate_kernel_f32 : public jit_uni_interpolate_kernel, publi Xbyak::Label l_table_constant; Opmask k_mask = Xbyak::Opmask(1); + std::unique_ptr emu_vcvtneps2bf16; + std::vector>> eltwise_injectors; std::vector>> depthwise_injectors; std::vector>> quantization_injectors; @@ -1278,12 +1286,11 @@ struct jit_uni_interpolate_kernel_f32 : public jit_uni_interpolate_kernel, publi movd(op, xmm_dst); } } else if (dst_dt == memory::bf16) { - if (mayiuse(avx512_core_bf16)) { + if (mayiuse(avx512_core_bf16)) vcvtneps2bf16(ymm_dst, vmm_dst); - uni_vmovups(op, ymm_dst); - } else { - assert(!"data type of bf16 is only supported for ISA:avx512_core_bf16"); - } + else + emu_vcvtneps2bf16->emit({static_cast(vmm_dst.getIdx())}, {static_cast(ymm_dst.getIdx())}); + vmovdqu16(op, ymm_dst); } } @@ -1584,7 +1591,7 @@ void MKLDNNInterpolateNode::initSupportedPrimitiveDescriptors() { if ((inputPrecision != Precision::I8) && (inputPrecision != Precision::U8) && (inputPrecision != Precision::BF16)) { inputPrecision = Precision::FP32; } - if ((inputPrecision == Precision::BF16) && !mayiuse(avx512_core_bf16)) { + if ((inputPrecision == Precision::BF16) && !mayiuse(avx512_core)) { inputPrecision = Precision::FP32; } Precision outputPrecision = inputPrecision; @@ -2714,7 +2721,7 @@ float MKLDNNInterpolateNode::getValue(const uint8_t *base, size_t offset, Infere } case Precision::BF16: { const uint16_t *valuePtr = reinterpret_cast(baseOffset); - return ngraph::bfloat16::from_bits(*valuePtr); + return bfloat16_t::from_bits(*valuePtr); break; } case Precision::FP32: { @@ -2743,7 +2750,7 @@ void MKLDNNInterpolateNode::setValue(uint8_t *base, size_t offset, float value, break; } case Precision::BF16: { - uint16_t data = ngraph::bfloat16(value).to_bits(); + uint16_t data = bfloat16_t(value).to_bits(); std::memcpy(baseOffset, &data, 2); break; } diff --git a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_mvn_node.cpp b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_mvn_node.cpp index 2181c3f47167f6..3418ed8c1feaf4 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_mvn_node.cpp +++ b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_mvn_node.cpp @@ -240,6 +240,9 @@ struct jit_uni_mvn_kernel_f32 : public jit_uni_mvn_kernel, public jit_generator } } + if (!mayiuse(avx512_core_bf16) && mayiuse(avx512_core)) + emu_vcvtneps2bf16.reset(new jit_emu_vcvtneps2bf16(this, isa, nullptr)); + this->preamble(); mov(reg_src, ptr[reg_params + GET_OFF(src)]); @@ -311,6 +314,9 @@ struct jit_uni_mvn_kernel_f32 : public jit_uni_mvn_kernel, public jit_generator this->postamble(); + if (!mayiuse(avx512_core_bf16) && mayiuse(avx512_core)) + emu_vcvtneps2bf16->emit_table(); + for (auto& inj : eltwise_injectors) inj->prepare_table(); @@ -344,6 +350,8 @@ struct jit_uni_mvn_kernel_f32 : public jit_uni_mvn_kernel, public jit_generator Vmm vmm_d_weights = Vmm(5); Vmm vmm_d_bias = Vmm(6); + std::unique_ptr emu_vcvtneps2bf16; + Xbyak::Label l_table; std::vector>> eltwise_injectors; @@ -381,8 +389,11 @@ struct jit_uni_mvn_kernel_f32 : public jit_uni_mvn_kernel, public jit_generator if (dst_dt == memory::f32) { uni_vmovups(op, vmm_dst); } else if (dst_dt == memory::bf16) { - vcvtneps2bf16(ymm_dst, vmm_dst); - uni_vmovups(op, ymm_dst); + if (mayiuse(avx512_core_bf16)) + vcvtneps2bf16(ymm_dst, vmm_dst); + else + emu_vcvtneps2bf16->emit({static_cast(vmm_dst.getIdx())}, {static_cast(ymm_dst.getIdx())}); + vmovdqu16(op, ymm_dst); } else if (dst_dt == memory::u8) { uni_vcvtps2dq(vmm_dst, vmm_dst); if (isa == cpu::avx512_common) { @@ -504,7 +515,7 @@ void MKLDNNMVNNode::initSupportedPrimitiveDescriptors() { } } - if (!mayiuse(avx512_core_bf16)) { + if (!mayiuse(avx512_core)) { if (outputPrecision == Precision::BF16) outputPrecision = Precision::FP32; } diff --git a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_normalize_node.cpp b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_normalize_node.cpp index e56ffd49a4b165..64aab3faed779e 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_normalize_node.cpp +++ b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_normalize_node.cpp @@ -165,6 +165,9 @@ struct jit_uni_normalize_kernel_f32 : public jit_uni_normalize_kernel, public ji } } + if (!mayiuse(avx512_core_bf16) && mayiuse(avx512_core)) + emu_vcvtneps2bf16.reset(new jit_emu_vcvtneps2bf16(this, isa, nullptr)); + this->preamble(); mov(reg_src, ptr[reg_params + GET_OFF(src)]); @@ -188,6 +191,8 @@ struct jit_uni_normalize_kernel_f32 : public jit_uni_normalize_kernel, public ji this->postamble(); + if (!mayiuse(avx512_core_bf16) && mayiuse(avx512_core)) + emu_vcvtneps2bf16->emit_table(); for (auto& inj : eltwise_injectors) inj->prepare_table(); @@ -230,6 +235,8 @@ struct jit_uni_normalize_kernel_f32 : public jit_uni_normalize_kernel, public ji Vmm vmm_d_bias = Vmm(6); Vmm vmm_zero = Vmm(7); + std::unique_ptr emu_vcvtneps2bf16; + std::vector>> eltwise_injectors; std::vector>> depthwise_injectors; std::vector>> quantization_injectors; @@ -580,7 +587,10 @@ struct jit_uni_normalize_kernel_f32 : public jit_uni_normalize_kernel, public ji if (dst_dt == memory::f32) { uni_vmovups(op, vmm_dst); } else if (dst_dt == memory::bf16) { - vcvtneps2bf16(ymm_dst, vmm_dst); + if (mayiuse(avx512_core_bf16)) + vcvtneps2bf16(ymm_dst, vmm_dst); + else + emu_vcvtneps2bf16->emit({static_cast(vmm_dst.getIdx())}, {static_cast(ymm_dst.getIdx())}); vmovdqu16(op, ymm_dst); } else if (dst_dt == memory::u8) { uni_vcvtps2dq(vmm_dst, vmm_dst); @@ -752,7 +762,7 @@ void MKLDNNNormalizeNode::getSupportedDescriptors() { weights_blob->allocate(); float* src = layer->blobs.at("weights")->buffer(); float* dst = weights_blob->wmap(); - memcpy(dst, src, layer->blobs.at("weights")->byteSize()); + cpu_memcpy(dst, src, layer->blobs.at("weights")->byteSize()); } else if (weights_prec == Precision::BF16) { MKLDNNPlugin::BF16Transformer transformer; weights_blob = transformer.convertBF16ToFloat(tweights); @@ -780,7 +790,7 @@ void MKLDNNNormalizeNode::initSupportedPrimitiveDescriptors() { } if (inputPrecision == Precision::BF16 || outputPrecision == Precision::BF16) { - if (!mayiuse(avx512_core_bf16)) + if (!mayiuse(avx512_core)) inputPrecision = outputPrecision = Precision::FP32; else inputPrecision = outputPrecision = Precision::BF16; diff --git a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_reduce_node.cpp b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_reduce_node.cpp index 81c11c330b955e..8c1dcda12983a2 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_reduce_node.cpp +++ b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_reduce_node.cpp @@ -78,6 +78,9 @@ struct jit_uni_reduce_kernel_f32 : public jit_uni_reduce_kernel, public jit_gene : jit_uni_reduce_kernel(jcp), jit_generator() { exp_injector.reset(new jit_uni_eltwise_injector_f32(this, alg_kind::eltwise_exp, 0.f, 0.f)); + if (!mayiuse(avx512_core_bf16) && mayiuse(avx512_core)) + emu_vcvtneps2bf16.reset(new jit_emu_vcvtneps2bf16(this, isa, nullptr)); + this->preamble(); mov(reg_src, ptr[reg_params + GET_OFF(src)]); @@ -103,6 +106,9 @@ struct jit_uni_reduce_kernel_f32 : public jit_uni_reduce_kernel, public jit_gene this->postamble(); + if (!mayiuse(avx512_core_bf16) && mayiuse(avx512_core)) + emu_vcvtneps2bf16->emit_table(); + if (jcp_.reduce_mode == Reduce::And || jcp_.reduce_mode == Reduce::L1 || jcp_.reduce_mode == Reduce::Max || jcp_.reduce_mode == Reduce::Min || jcp_.reduce_mode == Reduce::Prod || jcp_.reduce_mode == Reduce::Or) { prepare_aux_table(); @@ -146,6 +152,8 @@ struct jit_uni_reduce_kernel_f32 : public jit_uni_reduce_kernel, public jit_gene const Xbyak::Opmask k_mask = Xbyak::Opmask(1); + std::unique_ptr emu_vcvtneps2bf16; + Xbyak::Label l_table; std::shared_ptr> exp_injector; @@ -605,8 +613,11 @@ struct jit_uni_reduce_kernel_f32 : public jit_uni_reduce_kernel, public jit_gene uni_vmovups(op, vmm_dst); break; case memory::bf16: - vcvtneps2bf16(ymm_dst, vmm_dst); - uni_vmovups(op, ymm_dst); + if (mayiuse(avx512_core_bf16)) + vcvtneps2bf16(ymm_dst, vmm_dst); + else + emu_vcvtneps2bf16->emit({static_cast(vmm_dst.getIdx())}, {static_cast(ymm_dst.getIdx())}); + vmovdqu16(op, ymm_dst); break; case memory::s8: if (isa == avx512_common) { @@ -806,6 +817,9 @@ struct jit_uni_reduce_post_kernel_f32 : public jit_uni_reduce_post_kernel, publi : jit_uni_reduce_post_kernel(jcp), jit_generator() { log_injector.reset(new jit_uni_eltwise_injector_f32(this, alg_kind::eltwise_log, 0.f, 0.f)); + if (!mayiuse(avx512_core_bf16) && mayiuse(avx512_core)) + emu_vcvtneps2bf16.reset(new jit_emu_vcvtneps2bf16(this, isa, nullptr)); + this->preamble(); mov(reg_dst, ptr[reg_params + GET_OFF(dst)]); @@ -823,6 +837,9 @@ struct jit_uni_reduce_post_kernel_f32 : public jit_uni_reduce_post_kernel, publi this->postamble(); + if (!mayiuse(avx512_core_bf16) && mayiuse(avx512_core)) + emu_vcvtneps2bf16->emit_table(); + if (jcp_.reduce_mode == Reduce::LogSum || jcp_.reduce_mode == Reduce::LogSumExp) { log_injector->prepare_table(); } @@ -855,6 +872,8 @@ struct jit_uni_reduce_post_kernel_f32 : public jit_uni_reduce_post_kernel, publi Xbyak::Xmm xmm_aux2 = Xbyak::Xmm(5); Xbyak::Xmm xmm_aux3 = Xbyak::Xmm(6); + std::unique_ptr emu_vcvtneps2bf16; + std::shared_ptr> log_injector; inline void reduce_post_main() { @@ -1063,8 +1082,11 @@ struct jit_uni_reduce_post_kernel_f32 : public jit_uni_reduce_post_kernel, publi uni_vmovups(op, vmm_dst); break; case memory::bf16: - vcvtneps2bf16(ymm_dst, vmm_dst); - uni_vmovups(op, ymm_dst); + if (mayiuse(avx512_core_bf16)) + vcvtneps2bf16(ymm_dst, vmm_dst); + else + emu_vcvtneps2bf16->emit({static_cast(vmm_dst.getIdx())}, {static_cast(ymm_dst.getIdx())}); + vmovdqu16(op, ymm_dst); break; case memory::s8: if (isa == avx512_common) { @@ -1355,7 +1377,7 @@ void MKLDNNReduceNode::initSupportedPrimitiveDescriptors() { // Since in jit mode we use the output memory as an intermediate accumulator for certain reduce modes, we can't use BF16 output precision due to // the possible accuracy loss. Therefore, for such mods, we will change the output precision to FP32. if (Precision::BF16 == outputPrecision) { - if (!mayiuse(avx512_core_bf16)) { + if (!mayiuse(avx512_core)) { outputPrecision = Precision::FP32; } else if (reduceMode != Reduce::And && reduceMode != Reduce::Or && reduceMode != Reduce::Max && reduceMode != Reduce::Min) { diff --git a/inference-engine/src/mkldnn_plugin/nodes/region_yolo.cpp b/inference-engine/src/mkldnn_plugin/nodes/region_yolo.cpp index c81a36c97399fa..136aca8b4c4c3e 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/region_yolo.cpp +++ b/inference-engine/src/mkldnn_plugin/nodes/region_yolo.cpp @@ -16,8 +16,9 @@ #include "jit_generator.hpp" #include "jit_uni_eltwise.hpp" -using namespace MKLDNNPlugin; using namespace mkldnn; +using namespace MKLDNNPlugin; +using namespace InferenceEngine; using namespace mkldnn::impl::cpu; using namespace mkldnn::impl::utils; @@ -56,6 +57,9 @@ struct jit_uni_logistic_kernel_f32 : public jit_uni_logistic_kernel, public jit_ jit_uni_logistic_kernel_f32(jit_logistic_config_params jcp) : jit_uni_logistic_kernel(), jit_generator() { exp_injector.reset(new jit_uni_eltwise_injector_f32(this, alg_kind::eltwise_exp, 0.f, 0.f)); + if (!mayiuse(avx512_core_bf16) && mayiuse(avx512_core)) + emu_vcvtneps2bf16.reset(new jit_emu_vcvtneps2bf16(this, isa, nullptr)); + this->preamble(); mov(reg_src, ptr[reg_params + GET_OFF(src)]); @@ -103,6 +107,9 @@ struct jit_uni_logistic_kernel_f32 : public jit_uni_logistic_kernel, public jit_ this->postamble(); + if (!mayiuse(avx512_core_bf16) && mayiuse(avx512_core)) + emu_vcvtneps2bf16->emit_table(); + exp_injector->prepare_table(); prepare_table(); @@ -111,7 +118,7 @@ struct jit_uni_logistic_kernel_f32 : public jit_uni_logistic_kernel, public jit_ } private: - using Vmm = typename conditional3::type; + using Vmm = typename conditional3::type; size_t vlen = cpu_isa_traits::vlen; Xbyak::Address table_val(int index) { return ptr[reg_table + index * vlen]; } @@ -130,6 +137,8 @@ struct jit_uni_logistic_kernel_f32 : public jit_uni_logistic_kernel, public jit_ const Xbyak::Opmask k_mask = Xbyak::Opmask(1); + std::unique_ptr emu_vcvtneps2bf16; + Xbyak::Label l_table; std::shared_ptr> exp_injector; @@ -148,10 +157,10 @@ struct jit_uni_logistic_kernel_f32 : public jit_uni_logistic_kernel, public jit_ uni_vmovups(vmm_aux2, table_val(1)); uni_vsubps(vmm_aux2, vmm_aux2, vmm_src); - if (isa == sse42) { + if (isa == cpu::sse42) { uni_vblendvps(vmm_aux2, vmm_aux2, vmm_src, vmm_aux0); uni_vmovups(vmm_src, vmm_aux2); - } else if (isa == avx2) { + } else if (isa == cpu::avx2) { uni_vblendvps(vmm_src, vmm_aux2, vmm_src, vmm_aux0); } else { vptestmd(k_mask, vmm_aux0, vmm_aux0); @@ -199,8 +208,11 @@ struct jit_uni_logistic_kernel_f32 : public jit_uni_logistic_kernel, public jit_ uni_vmovups(op, vmm_dst); break; case InferenceEngine::Precision::BF16: - vcvtneps2bf16(ymm_dst, vmm_dst); - uni_vmovups(op, ymm_dst); + if (mayiuse(avx512_core_bf16)) + vcvtneps2bf16(ymm_dst, vmm_dst); + else + emu_vcvtneps2bf16->emit({static_cast(vmm_dst.getIdx())}, {static_cast(ymm_dst.getIdx())}); + vmovdqu16(op, ymm_dst); break; default: assert(!"unknown dst_dt"); @@ -253,7 +265,7 @@ class RegionYoloImpl: public ExtLayerBase { } if (Precision::BF16 == output_prec) { - if (!mayiuse(avx512_core_bf16)) { + if (!mayiuse(avx512_core)) { output_prec = Precision::FP32; } } @@ -269,14 +281,14 @@ class RegionYoloImpl: public ExtLayerBase { jcp.src_data_size = jcp.dst_data_size = output_prec.size(); block_size = 1; - if (mayiuse(avx512_common)) { - logistic_kernel.reset(new jit_uni_logistic_kernel_f32(jcp)); + if (mayiuse(cpu::avx512_common)) { + logistic_kernel.reset(new jit_uni_logistic_kernel_f32(jcp)); block_size = 16; - } else if (mayiuse(avx2)) { - logistic_kernel.reset(new jit_uni_logistic_kernel_f32(jcp)); + } else if (mayiuse(cpu::avx2)) { + logistic_kernel.reset(new jit_uni_logistic_kernel_f32(jcp)); block_size = 8; - } else if (mayiuse(sse42)) { - logistic_kernel.reset(new jit_uni_logistic_kernel_f32(jcp)); + } else if (mayiuse(cpu::sse42)) { + logistic_kernel.reset(new jit_uni_logistic_kernel_f32(jcp)); block_size = 4; } @@ -383,7 +395,7 @@ class RegionYoloImpl: public ExtLayerBase { inline void calculate_logistic(size_t start_index, int count, uint8_t * dst_data) { auto dst_data_size = output_prec.size(); if (logistic_kernel) { - int blocks_num = div_up(count, block_size); + int blocks_num = MKLDNNPlugin::div_up(count, block_size); parallel_for(blocks_num, [&](int ib) { int idx = ib * block_size; int work_amount = std::min(count - idx, block_size); diff --git a/inference-engine/src/mkldnn_plugin/utils/bfloat16.hpp b/inference-engine/src/mkldnn_plugin/utils/bfloat16.hpp index 35fac1fa682462..eca59ca34f043c 100644 --- a/inference-engine/src/mkldnn_plugin/utils/bfloat16.hpp +++ b/inference-engine/src/mkldnn_plugin/utils/bfloat16.hpp @@ -6,13 +6,15 @@ #include #include +#include "utils.hpp" +#include "nodes/common/emitter.h" /** * The bfloat16_t class can be used as an arithmetic type. All arithmetic operations goes through conversion to the float data type. */ -#define BFLOAT16_ROUND_MODE_TRUNCATE +#define BFLOAT16_ROUND_MODE_TO_NEAREST_EVEN namespace MKLDNNPlugin { class bfloat16_t { @@ -71,6 +73,69 @@ class bfloat16_t { }; uint16_t m_value; }; + + +class jit_emu_vcvtneps2bf16 : public jit_emitter { +public: + jit_emu_vcvtneps2bf16(mkldnn::impl::cpu::jit_generator* host, mkldnn::impl::cpu::cpu_isa_t host_isa, const MKLDNNNode* node, + InferenceEngine::Precision exec_prc = InferenceEngine::Precision::BF16) : jit_emitter(host, host_isa, node, exec_prc) { + prepare_table(); + }; + + size_t get_inputs_num() { return 1; }; + +private: + void emit_impl(const std::vector& in_vec_idxs, const std::vector& out_vec_idxs, + const std::vector& pool_vec_idxs, const std::vector& pool_gpr_idxs) { + if (host_isa_ == mkldnn::impl::cpu::cpu_isa_t::avx512_common) { + Xbyak::Zmm in = Xbyak::Zmm(in_vec_idxs[0]); + Xbyak::Ymm out = Xbyak::Ymm(out_vec_idxs[0]); + Xbyak::Zmm aux = Xbyak::Zmm(aux_vec_idxs[0]); + Xbyak::Zmm aux1 = Xbyak::Zmm(aux_vec_idxs[1]); + + h->uni_vpsrld(aux, in, 16); + h->vpandd(aux, aux, table_val("one")); + h->uni_vmovups(aux1, table_val("even")); + h->uni_vpaddd(aux, aux1, aux); + h->uni_vpaddd(aux, in, aux); + h->vfixupimmps(aux, in, table_val("selector"), 0); + h->vpsrad(aux, aux, 16); + h->vpmovdw(out, aux); + } else { + assert(!"unsupported isa"); + } + }; + + + inline int encode_fixup_selector(int input, int output) { + return ((output) << (4 * (input))); + } + + void register_table_entries() { + enum { + fixup_input_code_qnan_ = 0, + fixup_input_code_snan_ = 1, + fixup_input_code_ninf_ = 4, + fixup_input_code_pinf_ = 5, + fixup_output_code_copy_input_ = 1, + fixup_output_code_qnan_input_ = 2, + }; + const int selector_int32 = + /* qnan input to qnan output (presenrving input bits 0..21) */ + encode_fixup_selector(fixup_input_code_snan_, fixup_output_code_qnan_input_) | + /* snan input to qnan output (presenrving input bits 0..21) */ + encode_fixup_selector(fixup_input_code_qnan_, fixup_output_code_qnan_input_) | + /* neg inf input copied to output */ + encode_fixup_selector(fixup_input_code_ninf_, fixup_output_code_copy_input_) | + /* pos inf input copied to output */ + encode_fixup_selector(fixup_input_code_pinf_, fixup_output_code_copy_input_); + push_arg_entry_of("one", 0x00000001, true); + push_arg_entry_of("even", 0x00007fff, true); + push_arg_entry_of("selector", selector_int32, true); + } + + size_t aux_vecs_count() const { return 2; } +}; } // namespace MKLDNNPlugin /** @@ -139,3 +204,4 @@ class numeric_limits { static constexpr float_round_style round_style = round_to_nearest; }; } // namespace std + diff --git a/inference-engine/tests/functional/plugin/cpu/bfloat16/bf16_network_restoring.cpp b/inference-engine/tests/functional/plugin/cpu/bfloat16/bf16_network_restoring.cpp index 8cc114c4594676..6bd745399e13c5 100644 --- a/inference-engine/tests/functional/plugin/cpu/bfloat16/bf16_network_restoring.cpp +++ b/inference-engine/tests/functional/plugin/cpu/bfloat16/bf16_network_restoring.cpp @@ -185,12 +185,12 @@ class BF16NetworkRestore1 : public BasicBF16Test { expectedPrecisions["ReLU1"] = "ndef"; expectedPrecisions["Convolution2"] = "BF16"; expectedPrecisions["Convolution3"] = "BF16"; - expectedPrecisions["ReLU2"] = "FP32"; - expectedPrecisions["Norm1"] = "FP32"; + expectedPrecisions["ReLU2"] = "BF16"; + expectedPrecisions["Norm1"] = "BF16"; expectedPrecisions["Eltwise1"] = "ndef"; expectedPrecisions["ReLU3"] = "ndef"; expectedPrecisions["maxPooling1"] = "BF16"; - expectedPrecisions["Eltwise2"] = "FP32"; + expectedPrecisions["Eltwise2"] = "BF16"; } }; diff --git a/inference-engine/tests/functional/plugin/cpu/bfloat16/bfloat16_helpers.hpp b/inference-engine/tests/functional/plugin/cpu/bfloat16/bfloat16_helpers.hpp index e793acf9ce9d15..fa9500f95292a9 100644 --- a/inference-engine/tests/functional/plugin/cpu/bfloat16/bfloat16_helpers.hpp +++ b/inference-engine/tests/functional/plugin/cpu/bfloat16/bfloat16_helpers.hpp @@ -179,9 +179,9 @@ class BasicBF16Test : public testing::WithParamInterface, } void test() { - if (!InferenceEngine::with_cpu_x86_bfloat16()) { - // on platforms which do not support bfloat16, we are disabling bf16 tests since there are no bf16 primitives, - // tests are useless on such platforms + if (!InferenceEngine::with_cpu_x86_avx512_core()) { + // We are enabling bf16 tests on platforms with native support bfloat16, and on platforms with AVX512 ISA + // On platforms with AVX512 ISA but w/o native bfloat16 support computations are done via simulation mode GTEST_SKIP(); } std::tie(inputPrecision, netPrecision, inputShapes, newInputShapes, targetDevice) = this->GetParam(); diff --git a/inference-engine/tests/functional/plugin/cpu/bfloat16/concat_in_place.cpp b/inference-engine/tests/functional/plugin/cpu/bfloat16/concat_in_place.cpp index cc74eb684edb3b..c9084011a674da 100644 --- a/inference-engine/tests/functional/plugin/cpu/bfloat16/concat_in_place.cpp +++ b/inference-engine/tests/functional/plugin/cpu/bfloat16/concat_in_place.cpp @@ -131,8 +131,6 @@ class Concat_in_place : public BasicBF16Test { expectedPrecisions["ADD_1"] = "FP32"; expectedPrecisions["CONV_1"] = "BF16"; expectedPrecisions["CONV_2"] = "BF16"; - expectedPrecisions["CONC_1_TEST"] = "BF16"; - expectedPrecisions["RELU_1"] = "FP32"; } }; diff --git a/inference-engine/tests/functional/plugin/cpu/bfloat16/conv_add.cpp b/inference-engine/tests/functional/plugin/cpu/bfloat16/conv_add.cpp index 116d502afb5db0..85d0092574b8af 100644 --- a/inference-engine/tests/functional/plugin/cpu/bfloat16/conv_add.cpp +++ b/inference-engine/tests/functional/plugin/cpu/bfloat16/conv_add.cpp @@ -111,9 +111,7 @@ class ConvAdd : public BasicBF16Test { // STAGE3: // filling of expected precision of layer execution defined by precisoin of input tensor to the primitive and reflected in // performance counters - expectedPrecisions["Convolution_0"] = "BF16"; - expectedPrecisions["Convolution_1"] = "BF16"; - expectedPrecisions["Elt_sum"] = "FP32"; + expectedPrecisions["Elt_sum"] = "BF16"; } }; diff --git a/inference-engine/tests/functional/plugin/cpu/bfloat16/conv_conv.cpp b/inference-engine/tests/functional/plugin/cpu/bfloat16/conv_conv.cpp index 577b856c6eb754..42fb03bc61beea 100644 --- a/inference-engine/tests/functional/plugin/cpu/bfloat16/conv_conv.cpp +++ b/inference-engine/tests/functional/plugin/cpu/bfloat16/conv_conv.cpp @@ -100,7 +100,7 @@ class ConvConv : public BasicBF16Test { // performance counters expectedPrecisions["ADD_1"] = "FP32"; expectedPrecisions["CONV_1"] = "BF16"; - expectedPrecisions["CONV_2"] = "BF16"; + expectedPrecisions["CONV_2"] = "FP32"; } }; diff --git a/inference-engine/tests/functional/plugin/cpu/bfloat16/conv_dwconv_relu.cpp b/inference-engine/tests/functional/plugin/cpu/bfloat16/conv_dwconv_relu.cpp index bf508e86bdda03..24b32eea93b310 100644 --- a/inference-engine/tests/functional/plugin/cpu/bfloat16/conv_dwconv_relu.cpp +++ b/inference-engine/tests/functional/plugin/cpu/bfloat16/conv_dwconv_relu.cpp @@ -118,7 +118,6 @@ class ConvDWConvReLU : public BasicBF16Test { // performance counters expectedPrecisions["ADD_1"] = "FP32"; expectedPrecisions["CONV_1"] = "BF16"; - expectedPrecisions["CONV_2"] = "BF16"; expectedPrecisions["RELU"] = "ndef"; } }; diff --git a/inference-engine/tests/functional/plugin/cpu/bfloat16/conv_eltwise_depthwise.cpp b/inference-engine/tests/functional/plugin/cpu/bfloat16/conv_eltwise_depthwise.cpp index 2168ff3d2db999..acad0fdc6ee66f 100644 --- a/inference-engine/tests/functional/plugin/cpu/bfloat16/conv_eltwise_depthwise.cpp +++ b/inference-engine/tests/functional/plugin/cpu/bfloat16/conv_eltwise_depthwise.cpp @@ -32,7 +32,7 @@ class ConvEltwiseDepthwise : std::shared_ptr fnPtr; SizeVector inputShapes; std::map expectedPrecisions; - float threshold = 3e-2; + float threshold = 7e-2; Precision netPrecision; size_t kernel; CoordinateDiff pads; diff --git a/inference-engine/tests/functional/plugin/cpu/bfloat16/elt_max.cpp b/inference-engine/tests/functional/plugin/cpu/bfloat16/elt_max.cpp index dafb43929eb34a..44f78574513976 100644 --- a/inference-engine/tests/functional/plugin/cpu/bfloat16/elt_max.cpp +++ b/inference-engine/tests/functional/plugin/cpu/bfloat16/elt_max.cpp @@ -122,7 +122,6 @@ class Elt_max : public BasicBF16Test { // performance counters expectedPrecisions["Convolution_0"] = "BF16"; expectedPrecisions["Convolution_1"] = "BF16"; - expectedPrecisions["Elt_max"] = "FP32"; } }; diff --git a/inference-engine/tests/functional/plugin/cpu/bfloat16/elt_x3.cpp b/inference-engine/tests/functional/plugin/cpu/bfloat16/elt_x3.cpp index 7a85423f692781..bb1b2ef3914560 100644 --- a/inference-engine/tests/functional/plugin/cpu/bfloat16/elt_x3.cpp +++ b/inference-engine/tests/functional/plugin/cpu/bfloat16/elt_x3.cpp @@ -179,8 +179,6 @@ class Elt_x3 : public BasicBF16Test { expectedPrecisions["Convolution_1"] = "BF16"; expectedPrecisions["Convolution_2"] = "BF16"; expectedPrecisions["Convolution_3"] = "BF16"; - expectedPrecisions["Elt_max"] = "FP32"; - expectedPrecisions["Elt_mul"] = "FP32"; expectedPrecisions["Elt_sum"] = "ndef"; } }; diff --git a/inference-engine/tests/functional/plugin/cpu/bfloat16/gather_x2_add_mul_relu_concat_matmul.cpp b/inference-engine/tests/functional/plugin/cpu/bfloat16/gather_x2_add_mul_relu_concat_matmul.cpp index 2f29cb0a6c1ea3..44699e6f718f3a 100644 --- a/inference-engine/tests/functional/plugin/cpu/bfloat16/gather_x2_add_mul_relu_concat_matmul.cpp +++ b/inference-engine/tests/functional/plugin/cpu/bfloat16/gather_x2_add_mul_relu_concat_matmul.cpp @@ -122,9 +122,9 @@ class Gather_x2_add_mul_relu_concat_matmul : public BasicBF16Test { // filling of expected precision of layer execution defined by precisoin of input tensor to the primitive and reflected in // performance counters expectedPrecisions["Matmul_0"] = "BF16"; - expectedPrecisions["Mul_1"] = "FP32"; + expectedPrecisions["Mul_1"] = "BF16"; expectedPrecisions["Add_1"] = "FP32"; - expectedPrecisions["Relu_1"] = "FP32"; + expectedPrecisions["Relu_1"] = "ndef"; expectedPrecisions["Conc_1"] = "BF16"; expectedPrecisions["Matmul_1"] = "BF16"; } diff --git a/inference-engine/tests/functional/plugin/cpu/bfloat16/interpolation.cpp b/inference-engine/tests/functional/plugin/cpu/bfloat16/interpolation.cpp deleted file mode 100644 index 6acea5ec8451e2..00000000000000 --- a/inference-engine/tests/functional/plugin/cpu/bfloat16/interpolation.cpp +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (C) 2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "bfloat16_helpers.hpp" - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "common_test_utils/common_utils.hpp" - -#include "ngraph/opsets/opset1.hpp" - -using namespace std; -using namespace ngraph; -using namespace InferenceEngine; - -namespace LayerTestsDefinitions { - -class Interpolation : public BasicBF16Test { -protected: - std::shared_ptr createGraph(InferenceEngine::Precision netPrecision) override { - // Convolution (BF16) - // | - // Interpolation (In the case of mode = "linear") (FP32) - // | - // Convolution (BF16) - - // STAGE1: construction of the GRAPH - ngraph::element::Type ntype = (netPrecision == Precision::FP32) ? ngraph::element::f32 : ngraph::element::bf16; - auto channelsCount = inputShapes[1]; - - // add - auto input1 = std::make_shared(ntype, ngraph::Shape{inputShapes}); - input1->set_friendly_name("Input_1"); - std::shared_ptr addConst = nullptr; - if (netPrecision == Precision::FP32) { - addConst = opset1::Constant::create(ntype, Shape{1}, { 2.0f }); - } else { - addConst = opset1::Constant::create(ntype, Shape{1}, { bfloat16::from_bits(FuncTestUtils::Bf16TestUtils::reducePrecisionBitwiseS(2.0f)) }); - } - auto addNode = std::make_shared(input1, addConst); - addNode->set_friendly_name("Add_1"); - - // convolution - std::shared_ptr weightsNode1 = nullptr, weightsNode2 = nullptr; - ngraph::Shape convFilterShape = { channelsCount, channelsCount, 3, 3 }; // out channel, /input channels, kernel h, kernel w - if (netPrecision == Precision::FP32) { - std::vector weightValuesFP32; - weightValuesFP32.resize(channelsCount * channelsCount * 3 * 3); - FuncTestUtils::fillInputsBySinValues(weightValuesFP32.data(), weightValuesFP32.size()); - weightsNode1 = std::make_shared(ntype, convFilterShape, weightValuesFP32); - weightsNode2 = std::make_shared(ntype, convFilterShape, weightValuesFP32); - } else { - std::vector weightValuesBF16; - weightValuesBF16.resize(channelsCount * channelsCount * 3 * 3); - FuncTestUtils::fillInputsBySinValues(weightValuesBF16.data(), weightValuesBF16.size()); - weightsNode1 = std::make_shared(ntype, convFilterShape, weightValuesBF16.data()); - weightsNode2 = std::make_shared(ntype, convFilterShape, weightValuesBF16.data()); - } - - std::shared_ptr convNode1 = std::make_shared( - addNode, weightsNode1, - ngraph::Strides({ 1, 1 }), // strides - ngraph::CoordinateDiff({ 1, 1 }), // pad begin - ngraph::CoordinateDiff({ 1, 1 }), // pad end - ngraph::Strides({ 1, 1 }), // dilation - ngraph::op::PadType::EXPLICIT); // pad type - convNode1->set_friendly_name("Convolution_1"); - - // interpolation - auto heightSize = static_cast(inputShapes[2]); - auto weigthSize = static_cast(inputShapes[3]); - std::vector outShape = {2 * heightSize, 2 * weigthSize}; - - auto interpolShape = std::make_shared(ngraph::element::i64, ngraph::Shape{2}, outShape); - ngraph::op::v0::InterpolateAttrs attrs; - attrs.pads_begin.push_back(0); - attrs.pads_end.push_back(0); - attrs.axes = ngraph::AxisSet{2, 3}; - attrs.align_corners = false; - attrs.mode = "linear"; - attrs.antialias = false; - auto interpolNode = std::make_shared( - convNode1, - interpolShape, attrs); - interpolNode->set_friendly_name("Interp"); - - std::shared_ptr convNode2 = std::make_shared( - interpolNode, weightsNode2, - ngraph::Strides({ 1, 1 }), // strides - ngraph::CoordinateDiff({ 1, 1 }), // pad begin - ngraph::CoordinateDiff({ 1, 1 }), // pad end - ngraph::Strides({ 1, 1 }), // dilation - ngraph::op::PadType::EXPLICIT); // pad type - convNode2->set_friendly_name("Convolution_2"); - return std::make_shared(convNode2, ngraph::ParameterVector{input1}); - } - void SetUp() override { - std::tie(inputPrecision, netPrecision, inputShapes, newInputShapes, targetDevice) = this->GetParam(); - fnPtr = createGraph(netPrecision); - - // STAGE2: set up safe threshold <= 5% from maximum value of output tensor - threshold = 0.02f; // Max in fp32 network by output: 2.531 - - // STAGE3: - // filling of expected precision of layer execution defined by precisoin of input tensor to the primitive and reflected in - // performance counters - expectedPrecisions["Convolution_1"] = "BF16"; - expectedPrecisions["Interp"] = "FP32"; - expectedPrecisions["Convolution_2"] = "BF16"; - } -}; - -TEST_P(Interpolation, CompareWithRefImpl) { - test(); -}; - - -INSTANTIATE_TEST_CASE_P(smoke_FP32_bfloat16_NoReshape, Interpolation, - ::testing::Combine( - ::testing::Values(Precision::FP32), - ::testing::Values(Precision::FP32), - ::testing::Values(SizeVector({ 1, 1, 2, 2 })), - ::testing::Values(SizeVector()), - ::testing::Values(CommonTestUtils::DEVICE_CPU)), - Interpolation::getTestCaseName); - -INSTANTIATE_TEST_CASE_P(smoke_BF16_bfloat16_NoReshape, Interpolation, - ::testing::Combine( - ::testing::Values(Precision::FP32), - ::testing::Values(Precision::BF16), - ::testing::Values(SizeVector({ 1, 1, 2, 2 })), - ::testing::Values(SizeVector()), - ::testing::Values(CommonTestUtils::DEVICE_CPU)), - Interpolation::getTestCaseName); - -} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/cpu/bfloat16/mobilenet_ssd_with_branching.cpp b/inference-engine/tests/functional/plugin/cpu/bfloat16/mobilenet_ssd_with_branching.cpp index aca7bd6eec27c4..7b678cecc4fea4 100644 --- a/inference-engine/tests/functional/plugin/cpu/bfloat16/mobilenet_ssd_with_branching.cpp +++ b/inference-engine/tests/functional/plugin/cpu/bfloat16/mobilenet_ssd_with_branching.cpp @@ -151,12 +151,9 @@ class MobileNet_ssd_with_branching : public BasicBF16Test { // performance counters expectedPrecisions["ADD_1"] = "FP32"; expectedPrecisions["CONV_1"] = "BF16"; - expectedPrecisions["CONV_2"] = "BF16"; expectedPrecisions["RELU_2"] = "ndef"; expectedPrecisions["DW_CONV"] = "BF16"; expectedPrecisions["RELU_DW"] = "ndef"; - expectedPrecisions["NORM_1"] = "FP32"; - expectedPrecisions["CONC_1"] = "BF16"; } }; diff --git a/inference-engine/tests/functional/plugin/cpu/bfloat16/resample.cpp b/inference-engine/tests/functional/plugin/cpu/bfloat16/resample.cpp deleted file mode 100644 index 1421665a9d3823..00000000000000 --- a/inference-engine/tests/functional/plugin/cpu/bfloat16/resample.cpp +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (C) 2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "bfloat16_helpers.hpp" - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "common_test_utils/common_utils.hpp" - -#include "ngraph/opsets/opset1.hpp" - -using namespace std; -using namespace ngraph; -using namespace InferenceEngine; - -namespace LayerTestsDefinitions { - -class Resample : public BasicBF16Test { -protected: - std::shared_ptr createGraph(InferenceEngine::Precision netPrecision) override { - // Convolution (BF16) - // | - // Interpolation (Resample in the case of mode = "nearest") (FP32) - // | - // Convolution (BF16) - - // STAGE1: construction of the GRAPH - - ngraph::element::Type ntype = (netPrecision == Precision::FP32) ? ngraph::element::f32 : ngraph::element::bf16; - // add - auto input1 = std::make_shared(ntype, ngraph::Shape{inputShapes}); - auto channelsCount = inputShapes[1]; - input1->set_friendly_name("Input_1"); - std::shared_ptr addConst = nullptr; - if (netPrecision == Precision::FP32) { - addConst = opset1::Constant::create(ntype, Shape{1}, { 2.0f }); - } else { - addConst = opset1::Constant::create(ntype, Shape{1}, { bfloat16::from_bits(FuncTestUtils::Bf16TestUtils::reducePrecisionBitwiseS(2.0f)) }); - } - auto addNode = std::make_shared(input1, addConst); - addNode->set_friendly_name("Add_1"); - - // convolution - std::shared_ptr weightsNode1 = nullptr, weightsNode2 = nullptr; - ngraph::Shape convFilterShape = { channelsCount, channelsCount, 3, 3 }; // out channel, /input channels, kernel h, kernel w - if (netPrecision == Precision::FP32) { - std::vector weightValuesFP32; - weightValuesFP32.resize(channelsCount * channelsCount * 3 * 3); - FuncTestUtils::fillInputsBySinValues(weightValuesFP32.data(), weightValuesFP32.size()); - weightsNode1 = std::make_shared(ntype, convFilterShape, weightValuesFP32); - weightsNode2 = std::make_shared(ntype, convFilterShape, weightValuesFP32); - } else { - std::vector weightValuesBF16; - weightValuesBF16.resize(channelsCount * channelsCount * 3 * 3); - FuncTestUtils::fillInputsBySinValues(weightValuesBF16.data(), weightValuesBF16.size()); - weightsNode1 = std::make_shared(ntype, convFilterShape, weightValuesBF16.data()); - weightsNode2 = std::make_shared(ntype, convFilterShape, weightValuesBF16.data()); - } - - std::shared_ptr convNode1 = std::make_shared( - addNode, weightsNode1, - ngraph::Strides({ 1, 1 }), // strides - ngraph::CoordinateDiff({ 1, 1 }), // pad begin - ngraph::CoordinateDiff({ 1, 1 }), // pad end - ngraph::Strides({ 1, 1 }), // dilation - ngraph::op::PadType::EXPLICIT); // pad type - convNode1->set_friendly_name("Convolution_1"); - - // interpolation - auto heightSize = static_cast(inputShapes[2]); - auto weigthSize = static_cast(inputShapes[3]); - std::vector outShape = {2 * heightSize, 2 * weigthSize}; - - auto interpolShape = std::make_shared(ngraph::element::i64, ngraph::Shape{2}, outShape); - ngraph::op::v0::InterpolateAttrs attrs; - attrs.pads_begin.push_back(0); - attrs.pads_end.push_back(0); - attrs.axes = ngraph::AxisSet{2, 3}; - attrs.align_corners = false; - attrs.mode = "nearest"; - attrs.antialias = false; - auto interpolNode = std::make_shared( - convNode1, - interpolShape, attrs); - interpolNode->set_friendly_name("Interp"); - - std::shared_ptr convNode2 = std::make_shared( - interpolNode, weightsNode2, - ngraph::Strides({ 1, 1 }), // strides - ngraph::CoordinateDiff({ 1, 1 }), // pad begin - ngraph::CoordinateDiff({ 1, 1 }), // pad end - ngraph::Strides({ 1, 1 }), // dilation - ngraph::op::PadType::EXPLICIT); // pad type - convNode2->set_friendly_name("Convolution_2"); - return std::make_shared(convNode2, ngraph::ParameterVector{input1}); - } - void SetUp() override { - std::tie(inputPrecision, netPrecision, inputShapes, newInputShapes, targetDevice) = this->GetParam(); - fnPtr = createGraph(netPrecision); - - // STAGE2: set up safe threshold <= 5% from maximum value of output tensor - threshold = 0.02f; // Max in fp32 network by output: 2.35926 - - // STAGE3: - // filling of expected precision of layer execution defined by precisoin of input tensor to the primitive and reflected in - // performance counters - expectedPrecisions["Convolution_1"] = "BF16"; - expectedPrecisions["Interp"] = "FP32"; - expectedPrecisions["Convolution_2"] = "BF16"; - } -}; - -TEST_P(Resample, CompareWithRefImpl) { - test(); -}; - - -INSTANTIATE_TEST_CASE_P(smoke_FP32_bfloat16_NoReshape, Resample, - ::testing::Combine( - ::testing::Values(Precision::FP32), - ::testing::Values(Precision::FP32), - ::testing::Values(SizeVector({ 1, 1, 2, 2 })), - ::testing::Values(SizeVector()), - ::testing::Values(CommonTestUtils::DEVICE_CPU)), - Resample::getTestCaseName); - -INSTANTIATE_TEST_CASE_P(smoke_BF16_bfloat16_NoReshape, Resample, - ::testing::Combine( - ::testing::Values(Precision::FP32), - ::testing::Values(Precision::BF16), - ::testing::Values(SizeVector({ 1, 1, 2, 2 })), - ::testing::Values(SizeVector()), - ::testing::Values(CommonTestUtils::DEVICE_CPU)), - Resample::getTestCaseName); - -} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/cpu/bfloat16/scaleshift_conv_eltwise_scaleshift.cpp b/inference-engine/tests/functional/plugin/cpu/bfloat16/scaleshift_conv_eltwise_scaleshift.cpp index 52af7005b72cbe..0116a5f10584ab 100644 --- a/inference-engine/tests/functional/plugin/cpu/bfloat16/scaleshift_conv_eltwise_scaleshift.cpp +++ b/inference-engine/tests/functional/plugin/cpu/bfloat16/scaleshift_conv_eltwise_scaleshift.cpp @@ -123,7 +123,6 @@ class ScaleshiftConvEltwiseScaleshift : public BasicBF16Test { // performance counters expectedPrecisions["ADD_1"] = "FP32"; expectedPrecisions["CONV_1"] = "BF16"; - expectedPrecisions["ADD_2"] = "FP32"; expectedPrecisions["ELT_1"] = "ndef"; } }; diff --git a/inference-engine/tests/functional/plugin/cpu/bfloat16/scaleshift_conv_relu.cpp b/inference-engine/tests/functional/plugin/cpu/bfloat16/scaleshift_conv_relu.cpp index d1bfeb0de6f999..3b116fcfdc55e5 100644 --- a/inference-engine/tests/functional/plugin/cpu/bfloat16/scaleshift_conv_relu.cpp +++ b/inference-engine/tests/functional/plugin/cpu/bfloat16/scaleshift_conv_relu.cpp @@ -93,7 +93,7 @@ class ScaleshiftConvRelu : public BasicBF16Test { fnPtr = createGraph(netPrecision); // STAGE1: - threshold = 7e-2; + threshold = 9e-2; // STAGE2: // filling of expected precision of layer execution defined by precisoin of input tensor to the primitive and reflected in // performance counters diff --git a/inference-engine/tests/functional/plugin/cpu/bfloat16/scaleshift_conv_x2_concat_relu.cpp b/inference-engine/tests/functional/plugin/cpu/bfloat16/scaleshift_conv_x2_concat_relu.cpp index b94f24111d2abc..39ddb921eb1a05 100644 --- a/inference-engine/tests/functional/plugin/cpu/bfloat16/scaleshift_conv_x2_concat_relu.cpp +++ b/inference-engine/tests/functional/plugin/cpu/bfloat16/scaleshift_conv_x2_concat_relu.cpp @@ -117,8 +117,6 @@ class ScaleshiftConv_x2_ConcatRelu : public BasicBF16Test { expectedPrecisions["ADD_1"] = "FP32"; expectedPrecisions["CONV_1"] = "BF16"; expectedPrecisions["CONV_2"] = "BF16"; - expectedPrecisions["CONC_1"] = "BF16"; - expectedPrecisions["RELU_1"] = "FP32"; } }; diff --git a/inference-engine/tests/functional/plugin/cpu/bfloat16/scaleshift_x2_conv_x2_eltwise.cpp b/inference-engine/tests/functional/plugin/cpu/bfloat16/scaleshift_x2_conv_x2_eltwise.cpp index a002f022df1b08..373dd1585b5a69 100644 --- a/inference-engine/tests/functional/plugin/cpu/bfloat16/scaleshift_x2_conv_x2_eltwise.cpp +++ b/inference-engine/tests/functional/plugin/cpu/bfloat16/scaleshift_x2_conv_x2_eltwise.cpp @@ -131,8 +131,7 @@ class Scaleshift_x2_Conv_x2_Eltwise : public BasicBF16Test { expectedPrecisions["Add_1"] = "FP32"; expectedPrecisions["Add_2"] = "FP32"; expectedPrecisions["Convolution_1"] = "BF16"; - expectedPrecisions["Convolution_2"] = "BF16"; - expectedPrecisions["ELT_1"] = "FP32"; + expectedPrecisions["ELT_1"] = "ndef"; } }; diff --git a/inference-engine/tests/functional/plugin/cpu/bfloat16/scaleshift_x3_conv_eltwise_relu.cpp b/inference-engine/tests/functional/plugin/cpu/bfloat16/scaleshift_x3_conv_eltwise_relu.cpp index a3a45a3e09c6d6..aa3bc613f25678 100644 --- a/inference-engine/tests/functional/plugin/cpu/bfloat16/scaleshift_x3_conv_eltwise_relu.cpp +++ b/inference-engine/tests/functional/plugin/cpu/bfloat16/scaleshift_x3_conv_eltwise_relu.cpp @@ -152,7 +152,6 @@ class Scaleshift_x3_ConvEltwiseRelu : public BasicBF16Test { expectedPrecisions["Add_2"] = "FP32"; expectedPrecisions["ELT_1"] = "ndef"; expectedPrecisions["RELU_1"] = "ndef"; - expectedPrecisions["Add_3"] = "FP32"; } }; diff --git a/inference-engine/tests/functional/plugin/cpu/bfloat16/tail_fp32_optimization.cpp b/inference-engine/tests/functional/plugin/cpu/bfloat16/tail_fp32_optimization.cpp index fb45883da1bdb6..b08cbc7216450f 100644 --- a/inference-engine/tests/functional/plugin/cpu/bfloat16/tail_fp32_optimization.cpp +++ b/inference-engine/tests/functional/plugin/cpu/bfloat16/tail_fp32_optimization.cpp @@ -114,7 +114,6 @@ class PoolingAfterConv : public BasicBF16Test { // performance counters expectedPrecisions["Add_4"] = "FP32"; expectedPrecisions["Convolution_6"] = "BF16"; - expectedPrecisions["AvgPool_8"] = "FP32"; } }; diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/skip_tests_config.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/skip_tests_config.cpp index 07b53781d6d5b7..08753af93815fe 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/skip_tests_config.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/skip_tests_config.cpp @@ -61,7 +61,7 @@ std::vector disabledTestPatterns() { R"(.*decomposition1_batch=5_hidden_size=10_input_size=30_.*tanh.relu.*_clip=0_linear_before_reset=1.*_targetDevice=CPU_.*)", }; - if (!InferenceEngine::with_cpu_x86_bfloat16()) { + if (!InferenceEngine::with_cpu_x86_avx512_core()) { // on platforms which do not support bfloat16, we are disabling bf16 tests since there are no bf16 primitives, // tests are useless on such platforms retVector.emplace_back(R"(.*BF16.*)"); diff --git a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/normalize.cpp b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/normalize.cpp index 9b182a1b1e90f1..75faae5cc92f2f 100755 --- a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/normalize.cpp +++ b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/normalize.cpp @@ -89,8 +89,6 @@ const std::vector epsMode = { ngraph::op::EpsMode::MAX, }; -std::vector inpOutPrc = {Precision::BF16}; - std::vector cpuParams_4D = { CPUSpecificParams({nChw16c}, {nChw16c}, {}, {}), CPUSpecificParams({nhwc}, {nhwc}, {}, {}), From ca08c5b45cda6ab4c2ed45c945a10fd559d988c1 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Thu, 10 Dec 2020 16:49:30 +0300 Subject: [PATCH 053/244] Fixed Plugin API compilation with /WX (#3551) * Fixed Plugin API compilation with /WX * Removed generic_ie.hpp from white list Co-authored-by: lab_ddpqa --- inference-engine/include/ie_locked_memory.hpp | 2 +- .../cpp_interfaces/impl/ie_plugin_internal.hpp | 3 +++ inference-engine/src/plugin_api/debug.h | 3 ++- inference-engine/src/plugin_api/exec_graph_info.hpp | 2 +- inference-engine/src/plugin_api/generic_ie.hpp | 4 ++-- inference-engine/src/plugin_api/xml_parse_utils.h | 2 +- .../tests/functional/inference_engine/CMakeLists.txt | 9 +++------ ngraph/core/include/ngraph/attribute_adapter.hpp | 1 + ngraph/core/include/ngraph/descriptor/output.hpp | 3 +++ ngraph/core/include/ngraph/enum_names.hpp | 4 +++- 10 files changed, 20 insertions(+), 13 deletions(-) diff --git a/inference-engine/include/ie_locked_memory.hpp b/inference-engine/include/ie_locked_memory.hpp index 111169ac3217f8..5a8c0d529fdfa5 100644 --- a/inference-engine/include/ie_locked_memory.hpp +++ b/inference-engine/include/ie_locked_memory.hpp @@ -51,7 +51,7 @@ class LockedMemoryBase { * * @param that An rvalue reference for the other LockedMemoryBase instance */ - LockedMemoryBase(LockedMemoryBase&& that) + LockedMemoryBase(LockedMemoryBase&& that) noexcept : _allocator(that._allocator), _handle(that._handle), _lockFlag(that._lockFlag), _offset(that._offset) { that._locked = nullptr; } diff --git a/inference-engine/src/plugin_api/cpp_interfaces/impl/ie_plugin_internal.hpp b/inference-engine/src/plugin_api/cpp_interfaces/impl/ie_plugin_internal.hpp index 2f56b4827b46a7..54409e4e51bb58 100644 --- a/inference-engine/src/plugin_api/cpp_interfaces/impl/ie_plugin_internal.hpp +++ b/inference-engine/src/plugin_api/cpp_interfaces/impl/ie_plugin_internal.hpp @@ -208,6 +208,9 @@ class InferencePluginInternal : public IInferencePlugin { virtual ExecutableNetwork ImportNetworkImpl(std::istream& networkModel, const RemoteContext::Ptr& context, const std::map& config) { + (void)networkModel; + (void)context; + (void)config; THROW_IE_EXCEPTION << NOT_IMPLEMENTED_str; } diff --git a/inference-engine/src/plugin_api/debug.h b/inference-engine/src/plugin_api/debug.h index 744ffb95e80914..ab7510ce19cc70 100644 --- a/inference-engine/src/plugin_api/debug.h +++ b/inference-engine/src/plugin_api/debug.h @@ -204,7 +204,8 @@ inline bool endsWith(const std::string& src, const char* with) { inline std::string tolower(const std::string& s) { std::string ret; ret.resize(s.length()); - std::transform(s.begin(), s.end(), ret.begin(), ::tolower); + std::transform(s.begin(), s.end(), ret.begin(), + [](char c) { return static_cast(::tolower(static_cast(c))); }); return ret; } } // namespace details diff --git a/inference-engine/src/plugin_api/exec_graph_info.hpp b/inference-engine/src/plugin_api/exec_graph_info.hpp index c29e73faf7029e..d05254dbdd3e67 100644 --- a/inference-engine/src/plugin_api/exec_graph_info.hpp +++ b/inference-engine/src/plugin_api/exec_graph_info.hpp @@ -136,7 +136,7 @@ class INFERENCE_ENGINE_API_CLASS(ExecutionNode) : public ngraph::Node { * * @return Returns `true` if an operation has completed successfully */ - bool visit_attributes(ngraph::AttributeVisitor& visitor) override { + bool visit_attributes(ngraph::AttributeVisitor& /*visitor*/) override { return true; } }; diff --git a/inference-engine/src/plugin_api/generic_ie.hpp b/inference-engine/src/plugin_api/generic_ie.hpp index a7e352a233c0cb..2cb48c9995667b 100644 --- a/inference-engine/src/plugin_api/generic_ie.hpp +++ b/inference-engine/src/plugin_api/generic_ie.hpp @@ -68,11 +68,11 @@ class INFERENCE_ENGINE_API_CLASS(GenericIE) : public Op { } if (auto ti_node = std::dynamic_pointer_cast(op)) { auto results = ti_node->get_body()->get_results(); - auto params = ti_node->get_body()->get_parameters(); + auto ti_params = ti_node->get_body()->get_parameters(); ngraph::NodeVector nResults, nParams; for (const auto& res : results) nResults.emplace_back(res); - for (const auto& param : params) + for (const auto& param : ti_params) nParams.emplace_back(param); ngraph::traverse_nodes(nResults, [&](std::shared_ptr node) { if (auto genNode = std::dynamic_pointer_cast(node)) { diff --git a/inference-engine/src/plugin_api/xml_parse_utils.h b/inference-engine/src/plugin_api/xml_parse_utils.h index b732909526e444..e582bd74b6fffc 100644 --- a/inference-engine/src/plugin_api/xml_parse_utils.h +++ b/inference-engine/src/plugin_api/xml_parse_utils.h @@ -253,7 +253,7 @@ struct parse_result { * * @return The parse_result. */ -static parse_result ParseXml(const char* file_path) { +inline parse_result ParseXml(const char* file_path) { #ifdef ENABLE_UNICODE_PATH_SUPPORT std::wstring wFilePath = FileUtils::multiByteCharToWString(file_path); const wchar_t* resolvedFilepath = wFilePath.c_str(); diff --git a/inference-engine/tests/functional/inference_engine/CMakeLists.txt b/inference-engine/tests/functional/inference_engine/CMakeLists.txt index 6d61c3948db9a1..e0ca1f9f80c964 100644 --- a/inference-engine/tests/functional/inference_engine/CMakeLists.txt +++ b/inference-engine/tests/functional/inference_engine/CMakeLists.txt @@ -220,15 +220,12 @@ if(UNIX) PLUGIN_API) else() ie_headers_compilation_with_custom_flags(TEST_SUFFIX PluginApiPedantic FLAGS "-Wpedantic" - HEADERS_TO_SKIP "generic_ie.hpp" PLUGIN_API) endif() else() - # TODO: enable - # ie_headers_compilation_with_custom_flags(TEST_SUFFIX PluginApiWindowsAreErrors - # HEADERS_TO_SKIP "generic_ie.hpp" - # FLAGS "/we4996 /W4 /WX" - # PLUGIN_API) + ie_headers_compilation_with_custom_flags(TEST_SUFFIX PluginApiWindowsAreErrors + FLAGS "/we4996 /W4 /WX" + PLUGIN_API) endif() # ir serialization functional tests variables diff --git a/ngraph/core/include/ngraph/attribute_adapter.hpp b/ngraph/core/include/ngraph/attribute_adapter.hpp index e49eed83e80174..3e83e7f49a9401 100644 --- a/ngraph/core/include/ngraph/attribute_adapter.hpp +++ b/ngraph/core/include/ngraph/attribute_adapter.hpp @@ -94,6 +94,7 @@ namespace ngraph public: IndirectScalarValueAccessor(AT& ref) : m_ref(ref) + , m_buffer() { } diff --git a/ngraph/core/include/ngraph/descriptor/output.hpp b/ngraph/core/include/ngraph/descriptor/output.hpp index c0695faaaa80e9..0d47d0b5821145 100644 --- a/ngraph/core/include/ngraph/descriptor/output.hpp +++ b/ngraph/core/include/ngraph/descriptor/output.hpp @@ -40,6 +40,9 @@ namespace ngraph public: Output() : m_node(nullptr) + , m_index(0) + , m_tensor(nullptr) + , m_inputs() { } diff --git a/ngraph/core/include/ngraph/enum_names.hpp b/ngraph/core/include/ngraph/enum_names.hpp index 5d84e1ab40efc7..b3321212269ee9 100644 --- a/ngraph/core/include/ngraph/enum_names.hpp +++ b/ngraph/core/include/ngraph/enum_names.hpp @@ -35,7 +35,9 @@ namespace ngraph { auto to_lower = [](const std::string& s) { std::string rc = s; - std::transform(rc.begin(), rc.end(), rc.begin(), ::tolower); + std::transform(rc.begin(), rc.end(), rc.begin(), [](char c) { + return static_cast(::tolower(static_cast(c))); + }); return rc; }; for (auto p : get().m_string_enums) From 12d2121976429a2c055f1aeb999721187edb828d Mon Sep 17 00:00:00 2001 From: Maxim Shevtsov Date: Thu, 10 Dec 2020 17:10:00 +0300 Subject: [PATCH 054/244] fixed compilation of MYRIAD/GPU only (no MKL_DNN) (#3552) --- .../gpu/shared_tests_instances/multi/gpu_remote_blob_tests.cpp | 2 +- .../myriad/shared_tests_instances/myriad_remote_blobs_tests.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/multi/gpu_remote_blob_tests.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/multi/gpu_remote_blob_tests.cpp index 7a576dad03d0aa..2da36a27438d04 100644 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/multi/gpu_remote_blob_tests.cpp +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/multi/gpu_remote_blob_tests.cpp @@ -9,7 +9,7 @@ const std::vector device_names_and_support_for_remote_blobs { {{GPU}, true}, // GPU via MULTI, -#if ENABLE_MKL_DNN +#ifdef ENABLE_MKL_DNN {{GPU, CPU}, true}, // GPU+CPU {{CPU, GPU}, true}, // CPU+GPU #endif diff --git a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/myriad_remote_blobs_tests.cpp b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/myriad_remote_blobs_tests.cpp index 49e442cf117788..adff12ab7fc6e0 100644 --- a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/myriad_remote_blobs_tests.cpp +++ b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/myriad_remote_blobs_tests.cpp @@ -9,7 +9,7 @@ const std::vector device_names_and_support_for_remote_blobs { {{MYRIAD}, false}, // MYX via MULTI -#if ENABLE_MKL_DNN +#ifdef ENABLE_MKL_DNN {{CPU, MYRIAD}, false}, // CPU+MYX #endif }; From 6c0201108f0f08f3ae2a02daee56e3462c008e87 Mon Sep 17 00:00:00 2001 From: Liubov Batanina Date: Thu, 10 Dec 2020 18:35:27 +0300 Subject: [PATCH 055/244] Added missing headers to MVN ref (#3533) --- ngraph/core/reference/include/ngraph/runtime/reference/mvn.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ngraph/core/reference/include/ngraph/runtime/reference/mvn.hpp b/ngraph/core/reference/include/ngraph/runtime/reference/mvn.hpp index 66f07b460ba271..0d64fdb60be1d7 100644 --- a/ngraph/core/reference/include/ngraph/runtime/reference/mvn.hpp +++ b/ngraph/core/reference/include/ngraph/runtime/reference/mvn.hpp @@ -17,6 +17,8 @@ #pragma once #include +#include +#include #include #include #include From d8f00acd3956e3d56dc71a962bdc00d2f6b3741b Mon Sep 17 00:00:00 2001 From: Patryk Elszkowski Date: Thu, 10 Dec 2020 16:36:12 +0100 Subject: [PATCH 056/244] StridedSlice : slice and reverse new ref implementations (#3188) * Create new iterators which allow to iterate over coordinates. Use new iterators to speedup StridedSlice reference implementation. * Call memcpy if reverse ref impl has nothing to reverse. * Add unit tests for coordinate range. * Change coordinates::RangeIterator to template. * Yet another slice and reverse implementation. Remove all stuff connected with ranges. * Apply review suggestions. * Back to ranges which base on CoordinateTransform. * try to fix x84_32 build * try to fix x84_32 build * Ranges which return start, no, stride, direction. * add input validation to coordinate_index enable coordinate_range validation tests * add some doxygens * fix range increament * add empyt range * move SliceRange::get_value to cpp file Co-authored-by: Patryk Elszkowski Co-authored-by: ggalieroc --- .../include/ngraph/coordinate_index.hpp | 29 ++ .../include/ngraph/coordinate_range.hpp | 221 ++++++++ .../include/ngraph/coordinate_transform.hpp | 13 +- .../core/reference/src/coordinate_index.cpp | 45 ++ .../core/reference/src/coordinate_range.cpp | 234 +++++++++ .../reference/src/coordinate_transform.cpp | 21 +- .../src/runtime/reference/reverse.cpp | 73 ++- .../reference/src/runtime/reference/slice.cpp | 40 +- ngraph/test/CMakeLists.txt | 1 + ngraph/test/backend/reverse.in.cpp | 24 + ngraph/test/coordinate_range.cpp | 470 ++++++++++++++++++ ngraph/test/runtime/ie/unit_test.manifest | 3 + 12 files changed, 1111 insertions(+), 63 deletions(-) create mode 100644 ngraph/core/reference/include/ngraph/coordinate_index.hpp create mode 100644 ngraph/core/reference/include/ngraph/coordinate_range.hpp create mode 100644 ngraph/core/reference/src/coordinate_index.cpp create mode 100644 ngraph/core/reference/src/coordinate_range.cpp create mode 100644 ngraph/test/coordinate_range.cpp diff --git a/ngraph/core/reference/include/ngraph/coordinate_index.hpp b/ngraph/core/reference/include/ngraph/coordinate_index.hpp new file mode 100644 index 00000000000000..79e0c9bdf71a5b --- /dev/null +++ b/ngraph/core/reference/include/ngraph/coordinate_index.hpp @@ -0,0 +1,29 @@ +//***************************************************************************** +// Copyright 2020 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//***************************************************************************** +#pragma once + +#include + +namespace ngraph +{ + class Coordinate; + class Shape; +} // namespace ngraph + +namespace ngraph +{ + std::size_t coordinate_index(const Coordinate& c, const Shape& s); +} diff --git a/ngraph/core/reference/include/ngraph/coordinate_range.hpp b/ngraph/core/reference/include/ngraph/coordinate_range.hpp new file mode 100644 index 00000000000000..799ddf61b6111c --- /dev/null +++ b/ngraph/core/reference/include/ngraph/coordinate_range.hpp @@ -0,0 +1,221 @@ +//***************************************************************************** +// Copyright 2020 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//***************************************************************************** + +#pragma once + +#include +#include + +#include "ngraph/coordinate.hpp" +#include "ngraph/shape.hpp" +#include "ngraph/strides.hpp" + +namespace ngraph +{ + namespace coordinates + { + namespace impl + { + namespace + { + template + bool has_zeros(const C& c) + { + const auto is_zero = [](size_t x) { return x == 0; }; + return std::any_of(c.begin(), c.end(), is_zero); + } + + } // namespace + + /// \brief Class which allow to iterate over a different ranges part by part + /// + template + class RangeIterator + { + public: + using value_type = typename Range::value_type; + using reference = typename Range::value_type; + using iterator_category = std::input_iterator_tag; + using difference_type = void; + + RangeIterator(Range* r) + : m_r{r} + { + if (m_r && !m_r->is_valid()) + { + m_r = nullptr; + } + } + + value_type operator*() const { return m_r->get_value(); } + RangeIterator& operator++() + { + if (m_r && !m_r->increment()) + { + m_r = nullptr; + } + return *this; + } + + RangeIterator operator++(int) = delete; + + friend bool operator==(const RangeIterator& lhs, const RangeIterator& rhs) + { + return lhs.m_r == rhs.m_r; + } + friend bool operator!=(const RangeIterator& lhs, const RangeIterator& rhs) + { + return !(lhs == rhs); + } + + private: + Range* m_r; + }; + + /// \brief Describe slice range + /// + struct CoordinateBounds + { + CoordinateBounds(const Coordinate& lower, const Coordinate& upper) + : m_lower{lower} + , m_upper{upper} + { + if (m_lower.size() != m_upper.size()) + { + throw std::domain_error{"different Coordinates bonds sizes"}; + } + } + Coordinate m_lower; + Coordinate m_upper; + + size_t last_dim_size() const noexcept { return m_upper.back() - m_lower.back(); } + }; + + /// \brief helper for iterator creation which allow to stay DRY + /// + template + struct RangeBase + { + using Iterator = RangeIterator; + + Iterator begin() { return Iterator(static_cast(this)); } + Iterator end() { return Iterator(nullptr); } + friend Iterator begin(Range& r) { return r.begin(); } + friend Iterator end(Range& r) { return r.end(); } + }; + + /// \brief Information how index in _Range_ should be change + /// + enum class Direction + { + forward, + reverse, + }; + + /// \brief Range contain information which part of memory should be copied + /// + struct Range + { + const size_t begin_index; + const size_t element_number; + const size_t step; + const Direction direction; + + static constexpr Range make_empyt() { return Range{0, 0, 1, Direction::forward}; } + }; + + /// \brief Class allows to iterate over sliced Tensor part by part. + /// + /// To create SliceRange use _slice_ function. + class SliceRange : public RangeBase + { + public: + using value_type = Range; + SliceRange(const Shape& source_shape, + const Coordinate& source_start_corner, + const Coordinate& source_end_corner, + const Strides& strides); + + value_type get_value() const; + + bool increment(); + + bool is_valid() const noexcept { return !has_zeros(m_source_shape); } + private: + const Shape m_source_shape; + const CoordinateBounds m_bounds; + const Strides m_source_strides; + const std::vector m_memory_strides; + Coordinate m_coordinate; + size_t m_index{0}; + }; + + /// \brief Create SliceRange which might be used in range-base for loop + /// + inline SliceRange slice(const Shape& source_shape, + const Coordinate& source_start_corner, + const Coordinate& source_end_corner, + const Strides& strides) + { + return SliceRange{source_shape, source_start_corner, source_end_corner, strides}; + } + + /// \brief Create SliceRange which might be used in range-base for loop + /// + inline SliceRange slice(const Shape& source_shape, + const Coordinate& source_start_corner, + const Coordinate& source_end_corner) + { + return slice(source_shape, + source_start_corner, + source_end_corner, + Strides(source_shape.size(), 1)); + } + + /// \brief Class allows to iterate over Tensor with reverted axies part by part. + /// + /// To create ReverseRange use _reverse_ function. + /// + class ReverseRange : public RangeBase + { + public: + using value_type = Range; + ReverseRange(const Shape& source_shape, const AxisSet& reversed_axis); + + value_type get_value() const; + + bool increment(); + + bool is_valid() const noexcept { return !has_zeros(m_source_shape); } + private: + const Shape m_source_shape; + const std::vector m_memory_strides; + const std::vector m_axis_directions; + Coordinate m_coordinate; + size_t m_index{0}; + }; + + inline ReverseRange reverse(const Shape& source_shape, const AxisSet& reversed_axis) + { + return ReverseRange(source_shape, reversed_axis); + } + + } // namespace impl + using impl::Direction; + using impl::reverse; + using impl::slice; + } // namespace coordinates +} // namespace ngraph diff --git a/ngraph/core/reference/include/ngraph/coordinate_transform.hpp b/ngraph/core/reference/include/ngraph/coordinate_transform.hpp index f6f311905d04f5..c7e61e17e84482 100644 --- a/ngraph/core/reference/include/ngraph/coordinate_transform.hpp +++ b/ngraph/core/reference/include/ngraph/coordinate_transform.hpp @@ -31,11 +31,18 @@ namespace ngraph /// {1,0}, {1,1}, {2,2} class CoordinateIterator { - public: /// \brief Coordinates iterator constructor /// \param target_shape The target shape for coordinates iteration /// \param is_end The flag indicates that the coordinate iterator is the last. - CoordinateIterator(const Shape& target_shape, bool is_end = false); + CoordinateIterator(const Shape& target_shape, bool is_end); + + public: + /// \brief Coordinates iterator constructor + /// \param target_shape The target shape for coordinates iteration + CoordinateIterator(const Shape& target_shape) + : CoordinateIterator(target_shape, false) + { + } /// \brief The postfix operation increment the iterator by one. void operator++(); @@ -176,4 +183,4 @@ namespace ngraph Shape m_target_shape; size_t m_n_axes; }; -} +} // namespace ngraph diff --git a/ngraph/core/reference/src/coordinate_index.cpp b/ngraph/core/reference/src/coordinate_index.cpp new file mode 100644 index 00000000000000..cc018a4c1bb749 --- /dev/null +++ b/ngraph/core/reference/src/coordinate_index.cpp @@ -0,0 +1,45 @@ +//***************************************************************************** +// Copyright 2020 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//***************************************************************************** + +#include "ngraph/coordinate_index.hpp" + +#include "ngraph/coordinate.hpp" +#include "ngraph/shape.hpp" + +namespace ngraph +{ + std::size_t coordinate_index(const Coordinate& c, const Shape& s) + { + if (c.size() < s.size()) + { + throw std::domain_error("Coordinate rank is less than shape rank."); + } + std::size_t index = 0; + std::size_t stride = 1; + std::size_t const padding = c.size() - s.size(); + + for (std::size_t axis = s.size(); axis-- > 0;) + { + if (s[axis] > 1) + { + index += c[axis + padding] * stride; + stride *= s[axis]; + } + } + + return index; + } +} // namespace ngraph diff --git a/ngraph/core/reference/src/coordinate_range.cpp b/ngraph/core/reference/src/coordinate_range.cpp new file mode 100644 index 00000000000000..35b512dd12a9c3 --- /dev/null +++ b/ngraph/core/reference/src/coordinate_range.cpp @@ -0,0 +1,234 @@ +//***************************************************************************** +// Copyright 2020 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//***************************************************************************** + +#include "ngraph/coordinate_range.hpp" + +#include +#include +#include + +#include "ngraph/coordinate_index.hpp" + +namespace ngraph +{ + namespace coordinates + { + namespace impl + { + namespace + { + std::vector memory_strides(const Shape& shape) + { + std::vector mem_strides(shape.size(), 1); + + if (shape.size() > 1) + { + for (auto i = shape.size() - 1; i-- > 0;) + { + mem_strides[i] = mem_strides[i + 1] * shape[i + 1]; + } + } + + return mem_strides; + } + + } // namespace + + SliceRange::SliceRange(const Shape& source_shape, + const Coordinate& source_start_corner, + const Coordinate& source_end_corner, + const Strides& source_strides) + : m_source_shape{source_shape} + , m_bounds{source_start_corner, source_end_corner} + , m_source_strides{source_strides} + , m_memory_strides(memory_strides(source_shape)) + , m_coordinate{source_start_corner} + , m_index(coordinate_index(source_start_corner, source_shape)) + { + const auto axis = m_source_shape.size(); + + if (axis != m_bounds.m_lower.size()) + { + throw std::domain_error( + "Source start corner does not have the same number of axis as the " + "source " + "space " + "shape"); + } + if (axis != m_bounds.m_upper.size()) + { + throw std::domain_error( + "Source end corner does not have the same number of axis as the source " + "space " + "shape"); + } + if (axis != m_source_strides.size()) + { + throw std::domain_error( + "Source strides do not have the same number of axis as the source " + "space " + "shape"); + } + if (axis != m_memory_strides.size()) + { + throw std::runtime_error("Something goes wrong"); + } + } + + SliceRange::value_type SliceRange::get_value() const + { + if (m_source_shape.empty()) + { + return Range::make_empyt(); + } + const size_t element_no = (m_bounds.last_dim_size() + m_source_strides.back() - 1) / + m_source_strides.back(); + + return Range{m_index, element_no, m_source_strides.back(), Direction::forward}; + } + + bool SliceRange::increment() + { + // during increment rage omit last dim so at least two dims are required to proceed + if (m_coordinate.size() < 2) + { + return false; + } + // omit last dim - it will be return in slice_range + for (auto axis = m_coordinate.size() - 1; axis-- > 0;) + { + const auto index_step = m_source_strides[axis] * m_memory_strides[axis]; + m_coordinate[axis] += m_source_strides[axis]; + m_index += index_step; + if (m_coordinate[axis] < m_bounds.m_upper[axis]) + { + assert(m_index < shape_size(m_source_shape)); + return true; + } + const auto difference = m_coordinate[axis] - m_bounds.m_lower[axis]; + m_coordinate[axis] = m_bounds.m_lower[axis]; + + // back on beginning of axis memory + m_index -= difference * m_memory_strides[axis]; + } + + return false; + } + + namespace + { + std::vector axis_direcions(size_t size, const AxisSet& reversed_axis) + { + const auto max_reversed_axis = [&] { + return *std::max_element(reversed_axis.begin(), reversed_axis.end()); + }; + if (!reversed_axis.empty() && !(max_reversed_axis() < size)) + { + throw std::domain_error( + "Reversed axis have axes above the source space shape"); + } + + std::vector directions(size, Direction::forward); + for (auto i : reversed_axis) + { + directions[i] = Direction::reverse; + } + return directions; + } + + Coordinate start_coordinate(const Shape& s, const std::vector& direction) + { + Coordinate coordiante(s.size(), 0); + for (size_t i = 0; i < s.size(); ++i) + { + if (direction[i] == Direction::reverse) + { + coordiante[i] = s[i] - 1; + } + } + return coordiante; + } + + } // namespace + + ReverseRange::ReverseRange(const Shape& source_shape, const AxisSet& reversed_axis) + : m_source_shape{source_shape} + , m_memory_strides(memory_strides(source_shape)) + , m_axis_directions(axis_direcions(source_shape.size(), reversed_axis)) + , m_coordinate(source_shape.size(), 0) + , m_index(coordinate_index(start_coordinate(source_shape, m_axis_directions), + source_shape)) + { + } + + ReverseRange::value_type ReverseRange::get_value() const + { + if (m_source_shape.empty()) + { + return Range::make_empyt(); + } + + assert(m_memory_strides.back() == 1); + return Range{m_index, + m_source_shape.back(), + m_memory_strides.back(), + m_axis_directions.back()}; + } + + bool ReverseRange::increment() + { + // during increment rage omit last dim so at least two dims are required to proceed + if (m_coordinate.size() < 2) + { + return false; + } + // omit last dim - it will be return in reverse_range + for (auto axis = m_coordinate.size() - 1; axis-- > 0;) + { + const auto index_step = m_memory_strides[axis]; + ++m_coordinate[axis]; + if (m_axis_directions[axis] == Direction::forward) + { + m_index += index_step; + } + else + { + m_index -= index_step; + } + if (m_coordinate[axis] < m_source_shape[axis]) + { + assert(0 <= m_index && m_index < shape_size(m_source_shape)); + return true; + } + m_coordinate[axis] = 0; + + // back on beginning of axis memory + if (m_axis_directions[axis] == Direction::forward) + { + m_index -= m_source_shape[axis] * m_memory_strides[axis]; + } + else + { + m_index += m_source_shape[axis] * m_memory_strides[axis]; + } + } + return false; + } + + } // namespace impl + + } // namespace coordinates +} // namespace ngraph diff --git a/ngraph/core/reference/src/coordinate_transform.cpp b/ngraph/core/reference/src/coordinate_transform.cpp index da72e5574800cd..96a358b9b3ba12 100644 --- a/ngraph/core/reference/src/coordinate_transform.cpp +++ b/ngraph/core/reference/src/coordinate_transform.cpp @@ -14,6 +14,8 @@ // limitations under the License. //***************************************************************************** +#include "ngraph/coordinate_transform.hpp" + #include #include #include @@ -23,7 +25,7 @@ #include "ngraph/axis_vector.hpp" #include "ngraph/coordinate_diff.hpp" -#include "ngraph/coordinate_transform.hpp" +#include "ngraph/coordinate_index.hpp" #include "ngraph/except.hpp" #include "ngraph/shape.hpp" #include "ngraph/strides.hpp" @@ -44,7 +46,7 @@ namespace Coordinate default_source_start_corner(size_t n_axes) { return Coordinate(n_axes, 0); } Coordinate default_source_end_corner(const Shape& source_shape) { return source_shape; } -} +} // namespace CoordinateTransformBasic::CoordinateTransformBasic(const Shape& source_shape) : m_source_shape(source_shape) @@ -54,20 +56,7 @@ CoordinateTransformBasic::CoordinateTransformBasic(const Shape& source_shape) // Compute the index of a source-space coordinate in the buffer. size_t CoordinateTransformBasic::index(const Coordinate& c) const noexcept { - size_t index = 0; - size_t stride = 1; - size_t const padding = c.size() - m_source_shape.size(); - - for (size_t axis = m_source_shape.size(); axis-- > 0;) - { - if (m_source_shape[axis] > 1) - { - index += c[axis + padding] * stride; - stride *= m_source_shape[axis]; - } - } - - return index; + return coordinate_index(c, m_source_shape); } CoordinateIterator CoordinateTransformBasic::begin() const noexcept diff --git a/ngraph/core/reference/src/runtime/reference/reverse.cpp b/ngraph/core/reference/src/runtime/reference/reverse.cpp index b53f5c43684599..73cacd6d077df5 100644 --- a/ngraph/core/reference/src/runtime/reference/reverse.cpp +++ b/ngraph/core/reference/src/runtime/reference/reverse.cpp @@ -15,39 +15,62 @@ //***************************************************************************** #include -#include +#include +#include #include "ngraph/check.hpp" +#include "ngraph/coordinate_range.hpp" #include "ngraph/runtime/reference/reverse.hpp" using namespace ngraph; -void runtime::reference::reverse(const char* arg, - char* out, - const Shape& arg_shape, - const Shape& out_shape, - const AxisSet& reversed_axes, - size_t elem_size) +namespace ngraph { - // In fact arg_shape == out_shape, but we'll use both for stylistic consistency with - // other kernels. - CoordinateTransform arg_transform(arg_shape); - CoordinateTransform output_transform(out_shape); - - for (Coordinate out_coord : output_transform) + namespace runtime { - Coordinate arg_coord = out_coord; - - for (size_t i = 0; i < arg_coord.size(); i++) + namespace reference { - if (reversed_axes.count(i) != 0) + void reverse(const char* arg, + char* out, + const Shape& arg_shape, + const Shape& out_shape, + const AxisSet& reversed_axes, + size_t elem_size) { - arg_coord[i] = arg_shape[i] - arg_coord[i] - 1; - } - } + NGRAPH_CHECK(shape_size(arg_shape) == shape_size(out_shape)); - memcpy(out + output_transform.index(out_coord) * elem_size, - arg + arg_transform.index(arg_coord) * elem_size, - elem_size); - } -} + const bool nothing_to_revers = reversed_axes.empty(); + if (nothing_to_revers) + { + std::memcpy(out, arg, shape_size(arg_shape) * elem_size); + return; + } + + auto dst_mem = out; + for (auto range : coordinates::reverse(arg_shape, reversed_axes)) + { + auto src_index = range.begin_index; + + if (range.direction == coordinates::Direction::forward) + { + for (size_t i = 0; i < range.element_number; src_index += range.step, ++i) + { + const auto src_mem = arg + src_index * elem_size; + std::memcpy(dst_mem, src_mem, elem_size); + std::advance(dst_mem, elem_size); + } + } + else + { + for (size_t i = 0; i < range.element_number; src_index -= range.step, ++i) + { + const auto src_mem = arg + src_index * elem_size; + std::memcpy(dst_mem, src_mem, elem_size); + std::advance(dst_mem, elem_size); + } + } + } + } + } // namespace reference + } // namespace runtime +} // namespace ngraph diff --git a/ngraph/core/reference/src/runtime/reference/slice.cpp b/ngraph/core/reference/src/runtime/reference/slice.cpp index 532b596979e308..bce5be0fafedc0 100644 --- a/ngraph/core/reference/src/runtime/reference/slice.cpp +++ b/ngraph/core/reference/src/runtime/reference/slice.cpp @@ -14,11 +14,12 @@ // limitations under the License. //***************************************************************************** -#include -#include +#include "ngraph/runtime/reference/slice.hpp" + +#include #include "ngraph/check.hpp" -#include "ngraph/runtime/reference/slice.hpp" +#include "ngraph/coordinate_range.hpp" namespace ngraph { @@ -35,27 +36,28 @@ namespace ngraph const Shape& out_shape, size_t elem_size) { - CoordinateTransform input_transform(arg_shape, lower_bounds, upper_bounds, strides); - CoordinateTransform output_transform(out_shape); + const CoordinateTransform input_transform( + arg_shape, lower_bounds, upper_bounds, strides); - CoordinateTransform::Iterator output_it = output_transform.begin(); + const CoordinateTransform output_transform(out_shape); NGRAPH_CHECK(shape_size(input_transform.get_target_shape()) == shape_size(output_transform.get_target_shape())); - for (const Coordinate& in_coord : input_transform) - { - if (output_it == output_transform.end()) - break; - const Coordinate& out_coord = *output_it; - - memcpy(out + output_transform.index(out_coord) * elem_size, - arg + input_transform.index(in_coord) * elem_size, - elem_size); + auto dst_mem = out; - ++output_it; + for (auto range : + coordinates::slice(arg_shape, lower_bounds, upper_bounds, strides)) + { + auto src_index = range.begin_index; + for (size_t i = 0; i < range.element_number; src_index += range.step, ++i) + { + const auto src_mem = arg + src_index * elem_size; + std::memcpy(dst_mem, src_mem, elem_size); + std::advance(dst_mem, elem_size); + } } } - } - } -} + } // namespace reference + } // namespace runtime +} // namespace ngraph diff --git a/ngraph/test/CMakeLists.txt b/ngraph/test/CMakeLists.txt index ddbbcd5f2bd940..651957fa1e6834 100644 --- a/ngraph/test/CMakeLists.txt +++ b/ngraph/test/CMakeLists.txt @@ -54,6 +54,7 @@ set(SRC control_dependencies.cpp convert_u1_to_string.cpp coordinate.cpp + coordinate_range.cpp copy.cpp element_type.cpp eval.cpp diff --git a/ngraph/test/backend/reverse.in.cpp b/ngraph/test/backend/reverse.in.cpp index 90caa46a9b9d6b..ff7ee91d3b3fe9 100644 --- a/ngraph/test/backend/reverse.in.cpp +++ b/ngraph/test/backend/reverse.in.cpp @@ -29,6 +29,30 @@ using namespace ngraph; static string s_manifest = "${MANIFEST}"; +NGRAPH_TEST(${BACKEND_NAME}, nothing_to_reverse) +{ + Shape shape{8}; + auto A = make_shared(element::f32, shape); + auto f = make_shared( + make_shared(A, + op::Constant::create(element::i64, {0}, std::vector{}), + op::v1::Reverse::Mode::INDEX), + ParameterVector{A}); + + auto backend = runtime::Backend::create("${BACKEND_NAME}"); + + // Create some tensors for input/output + auto a = backend->create_tensor(element::f32, shape); + copy_data(a, vector{0, 1, 2, 3, 4, 5, 6, 7}); + auto result = backend->create_tensor(element::f32, shape); + + auto handle = backend->compile(f); + handle->call_with_validate({result}, {a}); + EXPECT_TRUE(test::all_close_f((vector{0, 1, 2, 3, 4, 5, 6, 7}), + read_vector(result), + MIN_FLOAT_TOLERANCE_BITS)); +} + NGRAPH_TEST(${BACKEND_NAME}, reverse_1d) { Shape shape{8}; diff --git a/ngraph/test/coordinate_range.cpp b/ngraph/test/coordinate_range.cpp new file mode 100644 index 00000000000000..9b7b0022ee1ab8 --- /dev/null +++ b/ngraph/test/coordinate_range.cpp @@ -0,0 +1,470 @@ +//***************************************************************************** +// Copyright 2020 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//***************************************************************************** + +#include +#include +#include + +#include "gtest/gtest.h" + +#include + +using namespace ngraph; +using namespace ngraph::coordinates; +using Index = size_t; +using ExpectedOutput = std::vector>; + +/// +/// +/// SliceRange +/// +/// + +TEST(coordinate_range, slice_range_shape0d) +{ + const Shape s; + const Coordinate start_corner(s.size()); + + auto slice_range = slice(s, start_corner, s); + auto it = slice_range.begin(); + EXPECT_EQ(it, begin(slice_range)); + EXPECT_FALSE(it == slice_range.end()); + auto v = *it; // if it is not end it has to be dereferencable; + (void)v; + EXPECT_TRUE(++it == slice_range.end()); +} + +TEST(coordinate_range, slice_range_shape1d) +{ + const Shape s{3}; + const Coordinate start_corner(s.size()); + + const ExpectedOutput expected{{0, {0}}, {1, {1}}, {2, {2}}}; + ASSERT_EQ(expected.size(), shape_size(s)) << "check epxected data"; + + auto expected_val = begin(expected); + for (auto slice_range : slice(s, start_corner, s)) + { + auto index = slice_range.begin_index; + for (size_t i = 0; i < slice_range.element_number; index += slice_range.step, ++i) + { + EXPECT_EQ(index, expected_val->first); + ++expected_val; + } + } + EXPECT_TRUE(expected_val == end(expected)) << "not all expected values return, (" + << std::distance(expected_val, end(expected)) + << " is missing)"; +} + +TEST(coordinate_range, slice_range_shape2d) +{ + const Shape s{2, 3}; + const Coordinate start_corner(s.size()); + + // clang-format off + const ExpectedOutput expected{ + {0, {0, 0}}, {1, {0, 1}}, {2, {0, 2}}, + {3, {1, 0}}, {4, {1, 1}}, {5, {1, 2}}}; + // clang-format on + ASSERT_EQ(expected.size(), shape_size(s)) << "check epxected data"; + + auto expected_val = begin(expected); + for (auto slice_range : slice(s, start_corner, s)) + { + auto index = slice_range.begin_index; + for (size_t i = 0; i < slice_range.element_number; index += slice_range.step, ++i) + { + EXPECT_EQ(index, expected_val->first); + ++expected_val; + } + } + EXPECT_TRUE(expected_val == end(expected)) << "not all expected values return, (" + << std::distance(expected_val, end(expected)) + << " is missing)"; +} + +TEST(coordinate_range, slice_range_shape3d) +{ + const Shape s{2, 3, 4}; + const Coordinate start_corner(s.size()); + + // clang-format off + const ExpectedOutput expected{ + {0, {0, 0, 0}}, {1, {0, 0, 1}}, {2, {0, 0, 2}}, {3, {0, 0, 3}}, + {4, {0, 1, 0}}, {5, {0, 1, 1}}, {6, {0, 1, 2}}, {7, {0, 1, 3}}, + {8, {0, 2, 0}}, {9, {0, 2, 1}}, {10, {0, 2, 2}}, {11, {0, 2, 3}}, + {12, {1, 0, 0}}, {13, {1, 0, 1}}, {14, {1, 0, 2}}, {15, {1, 0, 3}}, + {16, {1, 1, 0}}, {17, {1, 1, 1}}, {18, {1, 1, 2}}, {19, {1, 1, 3}}, + {20, {1, 2, 0}}, {21, {1, 2, 1}}, {22, {1, 2, 2}}, {23, {1, 2, 3}}}; + // clang-format on + ASSERT_EQ(expected.size(), shape_size(s)) << "check epxected data"; + + auto expected_val = begin(expected); + for (auto slice_range : slice(s, start_corner, s)) + { + auto index = slice_range.begin_index; + for (size_t i = 0; i < slice_range.element_number; index += slice_range.step, ++i) + { + EXPECT_EQ(index, expected_val->first); + ++expected_val; + } + } + EXPECT_TRUE(expected_val == end(expected)); +} + +TEST(coordinate_range, slice_range_zero_sized_axis) +{ + const Shape s{2, 0, 4}; + const Coordinate start_corner(s.size()); + + auto slice_range = slice(s, start_corner, s); + auto it = slice_range.begin(); + EXPECT_TRUE(it == slice_range.end()) << "Expect empyt range"; +} + +/// +/// slice specyfic test +/// +TEST(coordinate_range, slice_range_input_validataion) +{ + const Shape s{10, 10, 10}; + EXPECT_THROW(slice(s, {1}, {1}), std::domain_error); + EXPECT_THROW(slice(s, s, {1}), std::domain_error); + EXPECT_THROW(slice(s, {1}, s), std::domain_error); + EXPECT_THROW(slice(s, s, s, {}), std::domain_error); +} + +namespace +{ + Shape sliced_shape(const std::vector& start_corner, + const std::vector& end_corner) + { + Shape s; + std::transform(end_corner.begin(), + end_corner.end(), + start_corner.begin(), + std::back_inserter(s), + [](size_t e, size_t b) { return e - b; }); + + return s; + } + Shape sliced_shape(const std::vector& start_corner, + const std::vector& end_corner, + const std::vector& strides) + { + Shape s = sliced_shape(start_corner, end_corner); + + std::transform(s.begin(), s.end(), strides.begin(), s.begin(), [](size_t e, size_t s) { + return (e + s - 1) / s; + }); + + return s; + } +} // namespace + +TEST(coordinate_range, slice_range_corner) +{ + const Shape s{10, 10}; + const Coordinate source_start_corner{3, 3}; + const Coordinate source_end_corner{6, 6}; + const ExpectedOutput expected{{33, {3, 3}}, + {34, {3, 4}}, + {35, {3, 5}}, + {43, {4, 3}}, + {44, {4, 4}}, + {45, {4, 5}}, + {53, {5, 3}}, + {54, {5, 4}}, + {55, {5, 5}}}; + ASSERT_EQ(expected.size(), shape_size(sliced_shape(source_start_corner, source_end_corner))) + << "check epxected data"; + + auto expected_val = begin(expected); + for (auto slice_range : slice(s, source_start_corner, source_end_corner)) + { + auto index = slice_range.begin_index; + for (size_t i = 0; i < slice_range.element_number; index += slice_range.step, ++i) + { + EXPECT_EQ(index, expected_val->first); + ++expected_val; + } + } + EXPECT_TRUE(expected_val == end(expected)) << "not all expected values return, (" + << std::distance(expected_val, end(expected)) + << " is missing)"; +} + +TEST(coordinate_range, slice_range_strides) +{ + const Shape s{10, 10}; + const Coordinate source_start_corner{0, 0}; + const Coordinate source_end_corner{s}; + const Strides source_strides = Strides({2, 3}); + + // clang-format off + const ExpectedOutput expected{ + {0, {0, 0}}, {3, {0, 3}}, {6, {0, 6}}, {9, {0, 9}}, + {20, {2, 0}}, {23, {2, 3}}, {26, {2, 6}}, {29, {2, 9}}, + {40, {4, 0}}, {43, {4, 3}}, {46, {4, 6}}, {49, {4, 9}}, + {60, {6, 0}}, {63, {6, 3}}, {66, {6, 6}}, {69, {6, 9}}, + {80, {8, 0}}, {83, {8, 3}}, {86, {8, 6}}, {89, {8, 9}}}; + // clang-format on + + ASSERT_EQ(expected.size(), + shape_size(sliced_shape(source_start_corner, source_end_corner, source_strides))) + << "check epxected data"; + + auto expected_val = begin(expected); + for (auto slice_range : slice(s, source_start_corner, source_end_corner, source_strides)) + { + auto index = slice_range.begin_index; + for (size_t i = 0; i < slice_range.element_number; index += slice_range.step, ++i) + { + EXPECT_EQ(index, expected_val->first); + ++expected_val; + } + } + EXPECT_TRUE(expected_val == end(expected)) << "not all expected values return, (" + << std::distance(expected_val, end(expected)) + << " is missing)"; +} + +/// +/// +/// ReverseRange +/// +/// + +TEST(coordinate_range, reverse_range_shape0d) +{ + const Shape s; + const AxisSet reverset_axis{}; + + auto reverse_range = reverse(s, reverset_axis); + auto it = reverse_range.begin(); + EXPECT_EQ(it, begin(reverse_range)); + auto v = *it; // if it is not end it has to be dereferencable; + (void)v; + EXPECT_TRUE(++it == reverse_range.end()); +} + +TEST(coordinate_range, reverse_range_shape1d) +{ + const Shape s{3}; + const AxisSet reverset_axis{}; + + const ExpectedOutput expected{{0, {0}}, {1, {1}}, {2, {2}}}; + EXPECT_EQ(expected.size(), shape_size(s)) << "check epxected data"; + + auto expected_val = begin(expected); + for (auto reverse_range : reverse(s, reverset_axis)) + { + auto index = reverse_range.begin_index; + ASSERT_EQ(reverse_range.direction, Direction::forward); + for (size_t i = 0; i < reverse_range.element_number; index += reverse_range.step, ++i) + { + EXPECT_EQ(index, expected_val->first); + ++expected_val; + } + } + + EXPECT_TRUE(expected_val == end(expected)) << "not all expected values return, (" + << std::distance(expected_val, end(expected)) + << " is missing)"; +} + +TEST(coordinate_range, reverse_range_shape2d) +{ + const Shape s{2, 3}; + const AxisSet reverset_axis{}; + + // clang-format off + const ExpectedOutput expected{ + {0, {0, 0}}, {1, {0, 1}}, {2, {0, 2}}, + {3, {1, 0}}, {4, {1, 1}}, {5, {1, 2}}}; + // clang-format on + EXPECT_EQ(expected.size(), shape_size(s)) << "check epxected data"; + + auto expected_val = begin(expected); + for (auto reverse_range : reverse(s, reverset_axis)) + { + auto index = reverse_range.begin_index; + ASSERT_EQ(reverse_range.direction, Direction::forward); + for (size_t i = 0; i < reverse_range.element_number; index += reverse_range.step, ++i) + { + EXPECT_EQ(index, expected_val->first); + ++expected_val; + } + } + + EXPECT_TRUE(expected_val == end(expected)) << "not all expected values return, (" + << std::distance(expected_val, end(expected)) + << " is missing)"; +} + +TEST(coordinate_range, reverse_range_shape3d) +{ + const Shape s{2, 3, 4}; + const AxisSet reverset_axis{}; + + // clang-format off + const ExpectedOutput expected{ + {0, {0, 0, 0}}, {1, {0, 0, 1}}, {2, {0, 0, 2}}, {3, {0, 0, 3}}, + {4, {0, 1, 0}}, {5, {0, 1, 1}}, {6, {0, 1, 2}}, {7, {0, 1, 3}}, + {8, {0, 2, 0}}, {9, {0, 2, 1}}, {10, {0, 2, 2}}, {11, {0, 2, 3}}, + {12, {1, 0, 0}}, {13, {1, 0, 1}}, {14, {1, 0, 2}}, {15, {1, 0, 3}}, + {16, {1, 1, 0}}, {17, {1, 1, 1}}, {18, {1, 1, 2}}, {19, {1, 1, 3}}, + {20, {1, 2, 0}}, {21, {1, 2, 1}}, {22, {1, 2, 2}}, {23, {1, 2, 3}}}; + // clang-format on + EXPECT_EQ(expected.size(), shape_size(s)) << "check epxected data"; + + auto expected_val = begin(expected); + for (auto reverse_range : reverse(s, reverset_axis)) + { + auto index = reverse_range.begin_index; + ASSERT_EQ(reverse_range.direction, Direction::forward); + for (size_t i = 0; i < reverse_range.element_number; index += reverse_range.step, ++i) + { + EXPECT_EQ(index, expected_val->first); + ++expected_val; + } + } + + EXPECT_TRUE(expected_val == end(expected)) << "not all expected values return, (" + << std::distance(expected_val, end(expected)) + << " is missing)"; +} + +TEST(coordinate_range, reverse_range_zero_sized_axis) +{ + const Shape s{2, 0, 4}; + + auto reverse_range = reverse(s, {}); + auto it = reverse_range.begin(); + EXPECT_TRUE(it == reverse_range.end()) << "Expect empyt range"; +} + +/// +/// reverse specyfic test +/// +TEST(coordinate_range, reverse_range_input_validataion) +{ + const Shape s{10, 10, 10}; + EXPECT_THROW(reverse(s, {10}), std::domain_error); +} + +TEST(coordinate_range, reverse_range_2d) +{ + const Shape s{3, 10}; + const AxisSet reverset_axis{1}; + + // clang-format off + const ExpectedOutput expected{ + {9, {0, 9}}, {8, {0, 8}}, {7, {0, 7}}, {6, {0, 6}}, {5, {0, 5}}, {4, {0, 4}}, {3, {0, 3}}, {2, {0, 2}}, {1, {0, 1}}, {0, {0, 0}}, + {19, {1, 9}}, {18, {1, 8}}, {17, {1, 7}}, {16, {1, 6}}, {15, {1, 5}}, {14, {1, 4}}, {13, {1, 3}}, {12, {1, 2}}, {11, {1, 1}}, {10, {1, 0}}, + {29, {2, 9}}, {28, {2, 8}}, {27, {2, 7}}, {26, {2, 6}}, {25, {2, 5}}, {24, {2, 4}}, {23, {2, 3}}, {22, {2, 2}}, {21, {2, 1}}, {20, {2, 0}}}; + // clang-format on + auto expected_val = begin(expected); + for (auto reverse_range : reverse(s, reverset_axis)) + { + auto index = reverse_range.begin_index; + ASSERT_EQ(reverse_range.direction, Direction::reverse); + for (size_t i = 0; i < reverse_range.element_number; index -= reverse_range.step, ++i) + { + EXPECT_EQ(index, expected_val->first); + ++expected_val; + } + } + + EXPECT_TRUE(expected_val == end(expected)) << "not all expected values return, (" + << std::distance(expected_val, end(expected)) + << " is missing)"; +} + +TEST(coordinate_range, reverse_1_range_3d) +{ + const Shape s{3, 3, 3}; + const AxisSet reverset_axis{1}; + + // clang-format off + const ExpectedOutput expected{ + {6, {0, 2, 0}}, {7, {0, 2, 1}}, {8, {0, 2, 2}}, + {3, {0, 1, 0}}, {4, {0, 1, 1}}, {5, {0, 1, 2}}, + {0, {0, 0, 0}}, {1, {0, 0, 1}}, {2, {0, 0, 2}}, + + {15, {1, 2, 0}}, {16, {1, 2, 1}}, {17, {1, 2, 2}}, + {12, {1, 1, 0}}, {13, {1, 1, 1}}, {14, {1, 1, 2}}, + {9, {1, 0, 0}}, {10, {1, 0, 1}}, {11, {1, 0, 2}}, + + {24, {2, 2, 0}}, {25, {2, 2, 1}}, {26, {2, 2, 2}}, + {21, {2, 1, 0}}, {22, {2, 1, 1}}, {23, {2, 1, 2}}, + {18, {2, 0, 0}}, {19, {2, 0, 1}}, {20, {2, 0, 2}}}; + // clang-format on + + auto expected_val = begin(expected); + for (auto reverse_range : reverse(s, reverset_axis)) + { + auto index = reverse_range.begin_index; + ASSERT_EQ(reverse_range.direction, Direction::forward); + for (size_t i = 0; i < reverse_range.element_number; index += reverse_range.step, ++i) + { + EXPECT_EQ(index, expected_val->first); + ++expected_val; + } + } + + EXPECT_TRUE(expected_val == end(expected)) << "not all expected values return, (" + << std::distance(expected_val, end(expected)) + << " is missing)"; +} + +TEST(coordinate_range, reverse_2_range_3d) +{ + const Shape s{3, 3, 3}; + const AxisSet reverset_axis{1, 2}; + + // clang-format off + const ExpectedOutput expected{ + {8, {0, 2, 2}}, {7, {0, 2, 1}}, {6, {0, 2, 0}}, + {5, {0, 1, 2}}, {4, {0, 1, 1}}, {3, {0, 1, 0}}, + {2, {0, 0, 2}}, {1, {0, 0, 1}}, {0, {0, 0, 0}}, + + {17, {1, 2, 2}}, {16, {1, 2, 1}}, {15, {1, 2, 0}}, + {14, {1, 1, 2}}, {13, {1, 1, 1}}, {12, {1, 1, 0}}, + {11, {1, 0, 2}}, {10, {1, 0, 1}}, {9, {1, 0, 0}}, + + {26, {2, 2, 2}}, {25, {2, 2, 1}}, {24, {2, 2, 0}}, + {23, {2, 1, 2}}, {22, {2, 1, 1}}, {21, {2, 1, 0}}, + {20, {2, 0, 2}}, {19, {2, 0, 1}}, {18, {2, 0, 0}}}; + // clang-format on + + auto expected_val = begin(expected); + for (auto reverse_range : reverse(s, reverset_axis)) + { + auto index = reverse_range.begin_index; + ASSERT_EQ(reverse_range.direction, Direction::reverse); + for (size_t i = 0; i < reverse_range.element_number; index -= reverse_range.step, ++i) + { + EXPECT_EQ(index, expected_val->first); + ++expected_val; + } + } + + EXPECT_TRUE(expected_val == end(expected)) << "not all expected values return, (" + << std::distance(expected_val, end(expected)) + << " is missing)"; +} diff --git a/ngraph/test/runtime/ie/unit_test.manifest b/ngraph/test/runtime/ie/unit_test.manifest index 3f211fabdecdbf..775c670d84f453 100644 --- a/ngraph/test/runtime/ie/unit_test.manifest +++ b/ngraph/test/runtime/ie/unit_test.manifest @@ -245,6 +245,9 @@ IE_GPU.onnx_model_rnn_fwd_mixed_seq_len_const IE_GPU.onnx_model_gru_fwd_mixed_seq_len IE_GPU.onnx_model_gru_fwd_mixed_seq_len_const +## Const layer has incorrect dimensions in the output data +IE_CPU.nothing_to_reverse + #------------------------------------------------------------------------------- # From 7fe21dc6ee6552178c6b356ea79e29a58e963bba Mon Sep 17 00:00:00 2001 From: Andrey Somsikov Date: Fri, 11 Dec 2020 09:25:14 +0300 Subject: [PATCH 057/244] Fix windows build for gflags for time_tests (#3504) GFlags builds multiple targets, require aligning build options on windows builds. FetchModule offloads project configuration to cmake. This also allows to align build configurations and targets across projects: https://crascit.com/2015/07/25/cmake-gtest/ --- tests/time_tests/CMakeLists.txt | 17 ++++---- .../src/timetests_helper/CMakeLists.txt | 42 +++++-------------- 2 files changed, 21 insertions(+), 38 deletions(-) diff --git a/tests/time_tests/CMakeLists.txt b/tests/time_tests/CMakeLists.txt index 4175c7f5503a34..0a208187aafa35 100644 --- a/tests/time_tests/CMakeLists.txt +++ b/tests/time_tests/CMakeLists.txt @@ -4,14 +4,17 @@ cmake_minimum_required(VERSION 3.13 FATAL_ERROR) -if (CMAKE_BUILD_TYPE STREQUAL "") - message(STATUS "CMAKE_BUILD_TYPE not defined, 'Release' will be used") - set(CMAKE_BUILD_TYPE "Release") -endif() +set (CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the build type") + +project(time_tests) + -find_package(InferenceEngineDeveloperPackage QUIET) -if (NOT InferenceEngineDeveloperPackage_FOUND) - find_package(InferenceEngine REQUIRED) +find_package(InferenceEngine) +if (NOT InferenceEngine_FOUND) + set (HAVE_SYS_STAT_H 1) + set (HAVE_INTTYPES_H 1) + set (INTTYPES_FORMAT C99) + find_package(InferenceEngineDeveloperPackage REQUIRED) endif() add_subdirectory(src) diff --git a/tests/time_tests/src/timetests_helper/CMakeLists.txt b/tests/time_tests/src/timetests_helper/CMakeLists.txt index 072805bd42a0b3..0e75039751e0b3 100644 --- a/tests/time_tests/src/timetests_helper/CMakeLists.txt +++ b/tests/time_tests/src/timetests_helper/CMakeLists.txt @@ -8,36 +8,16 @@ file (GLOB SRC *.cpp) add_library(${TARGET_NAME} STATIC ${SRC}) target_include_directories(${TARGET_NAME} PUBLIC "${CMAKE_SOURCE_DIR}/include") -find_package(gflags QUIET) -if (gflags_FOUND) - set(GFLAGS_LIBRARIES gflags) # use gflags from developer package -else() - include(ExternalProject) - find_package(Threads) - set(gflags_PREFIX ${CMAKE_BINARY_DIR}/external/gflags-prefix) - set(gflags_INSTALL ${CMAKE_BINARY_DIR}/external/gflags-install) - set(gflags_LIB ${gflags_INSTALL}/lib/libgflags.a) - - ExternalProject_Add( - gflags - PREFIX ${gflags_PREFIX} - GIT_REPOSITORY "https://github.com/gflags/gflags.git" - GIT_TAG "v2.2.2" - UPDATE_COMMAND "" - INSTALL_DIR ${gflags_INSTALL} - CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} - CMAKE_GENERATOR ${CMAKE_GENERATOR} - CMAKE_GENERATOR_PLATFORM ${CMAKE_GENERATOR_PLATFORM} - CMAKE_GENERATOR_TOOLSET ${CMAKE_GENERATOR_TOOLSET} - CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${gflags_INSTALL} - EXCLUDE_FROM_ALL TRUE - BUILD_BYPRODUCTS ${gflags_LIB} - LOG_DOWNLOAD 1 - LOG_INSTALL 1 - ) - set(GFLAGS_LIBRARIES ${gflags_LIB} ${CMAKE_THREAD_LIBS_INIT}) - add_dependencies(${TARGET_NAME} gflags) - target_include_directories(${TARGET_NAME} PRIVATE "${gflags_INSTALL}/include") +include(FetchContent) +FetchContent_Declare( + gflags + GIT_REPOSITORY "https://github.com/gflags/gflags.git" + GIT_TAG "v2.2.2" +) +FetchContent_GetProperties(gflags) +if(NOT gflags_POPULATED) + FetchContent_Populate(gflags) + add_subdirectory(${gflags_SOURCE_DIR} ${gflags_BINARY_DIR}) endif() -target_link_libraries(${TARGET_NAME} ${GFLAGS_LIBRARIES}) +target_link_libraries(${TARGET_NAME} gflags) From b6f311b463df207a6ad7f9e80a0daeb7a06ebc5e Mon Sep 17 00:00:00 2001 From: Ilya Znamenskiy Date: Fri, 11 Dec 2020 10:15:11 +0300 Subject: [PATCH 058/244] [IE CLDNN] Fully connected MMAD simd16 improvements (#3394) --- .../thirdparty/clDNN/api/layout.hpp | 3 + .../thirdparty/clDNN/api/tensor.hpp | 11 ++ .../kernel_selector/common/tensor_type.cpp | 15 ++ .../kernel_selector/common/tensor_type.h | 2 + .../fully_connected_kernel_mmad.cpp | 137 +++++++++------- .../fully_connected_kernel_mmad.h | 15 +- .../cl_kernels/fully_connected_gpu_MMAD.cl | 150 ++++++++++++------ .../core/cl_kernels/include/fetch.cl | 57 +++++++ .../core/cl_kernels/include/mmad.cl | 1 + .../core/cl_kernels/reorder_weights.cl | 8 + .../core/kernel_selector_common.cpp | 2 + .../clDNN/src/include/to_string_utils.h | 4 + .../clDNN/src/kernel_selector_helper.cpp | 8 + 13 files changed, 302 insertions(+), 111 deletions(-) diff --git a/inference-engine/thirdparty/clDNN/api/layout.hpp b/inference-engine/thirdparty/clDNN/api/layout.hpp index 3fe7e537fb7f0e..afe12825ff94aa 100644 --- a/inference-engine/thirdparty/clDNN/api/layout.hpp +++ b/inference-engine/thirdparty/clDNN/api/layout.hpp @@ -413,6 +413,9 @@ struct layout { if (this->format == cldnn::format::os_is_yx_isa8_osv8_isv4 && !(is_aligned_to(sizes[0], 8)) && !(is_aligned_to(sizes[1], 32))) { sizes[0] = align_to(sizes[0], 8); sizes[1] = align_to(sizes[1], 32); + } else if (this->format == cldnn::format::os_is_yx_isa8_osv16_isv4 && !(is_aligned_to(sizes[0], 16)) && !(is_aligned_to(sizes[1], 32))) { + sizes[0] = align_to(sizes[0], 16); + sizes[1] = align_to(sizes[1], 32); } else if (this->format == cldnn::format::os_is_yx_isa8_osv8_isv4_swizzled_by_4 && !(is_aligned_to(sizes[0], 32)) && !(is_aligned_to(sizes[1], 32))) { sizes[0] = align_to(sizes[0], 32); sizes[1] = align_to(sizes[1], 32); diff --git a/inference-engine/thirdparty/clDNN/api/tensor.hpp b/inference-engine/thirdparty/clDNN/api/tensor.hpp index b9a236bce935c9..5661423d8bed38 100644 --- a/inference-engine/thirdparty/clDNN/api/tensor.hpp +++ b/inference-engine/thirdparty/clDNN/api/tensor.hpp @@ -162,6 +162,8 @@ struct format { ///< convolution, F(6,3) -- filter 3x3 with stride 1 os_is_yx_isa8_osv8_isv4, ///< format for weights for MMAD convolution os_is_zyx_isa8_osv8_isv4, ///< format for weights for MMAD convolution + os_is_yx_isa8_osv16_isv4, ///< format for weights for fully connected MMAD + os_is_zyx_isa8_osv16_isv4, ///< format for weights for fully connected MMAD os_is_yx_isa8_osv8_isv4_swizzled_by_4, ///< format for weights for MMAD convolution os_is_yx_osa4_isa8_osv8_isv4_swizzled_by_4, ///< format for weights for MMAD fsv32 convolution os_is_zyx_osa4_isa8_osv8_isv4_swizzled_by_4, ///< format for weights for MMAD fsv32 convolution @@ -273,8 +275,10 @@ struct format { { image_2d_weights_c1_b_fyx, { 1, 1, 2, 0, 0, "oiyx", "oixy?", {}}}, { lstm_weights_dio, { 1, 1, 2, 0, 0, "oixy", "oixy?", {}}}, { os_is_yx_isa8_osv8_isv4, { 1, 1, 2, 0, 0, "oiyx", "oixy?", {}}}, + { os_is_yx_isa8_osv16_isv4, { 1, 1, 2, 0, 0, "oiyx", "oixy?", {}}}, { os_is_yx_isa8_osv8_isv4_swizzled_by_4, { 1, 1, 2, 0, 0, "oiyx", "oixy?", {}}}, { os_is_zyx_isa8_osv8_isv4, { 1, 1, 3, 0, 0, "oizyx", "oixyz", {{1, 8}, {0, 8}, {1, 4}}}}, + { os_is_zyx_isa8_osv16_isv4, { 1, 1, 3, 0, 0, "oizyx", "oixyz", {{1, 8}, {0, 16}, {1, 4}}}}, { os_is_yx_osa4_isa8_osv8_isv4_swizzled_by_4, { 1, 1, 2, 0, 0, "oiyx", "oixy?", {{0, 32}, {1, 32}}}}, { os_is_zyx_osa4_isa8_osv8_isv4_swizzled_by_4, { 1, 1, 3, 0, 0, "oizyx", "oixyz", {{0, 32}, {1, 32}}}}, { is_o_yx_isv32, { 1, 1, 2, 0, 0, "oyxi", "oixy?", {{1, 32}}}}, @@ -995,6 +999,13 @@ struct tensor { my_sizes[1] = align_to(my_sizes[1], 32); adjusted_coords[0] = align_to(adjusted_coords[0], 8); adjusted_coords[1] = align_to(adjusted_coords[1], 32); + } else if (fmt == cldnn::format::os_is_yx_isa8_osv16_isv4 && + !(is_aligned_to(my_sizes[0], 16)) && + !(is_aligned_to(my_sizes[1], 32))) { + my_sizes[0] = align_to(my_sizes[0], 16); + my_sizes[1] = align_to(my_sizes[1], 32); + adjusted_coords[0] = align_to(adjusted_coords[0], 16); + adjusted_coords[1] = align_to(adjusted_coords[1], 32); } else if (fmt == cldnn::format::os_is_yx_isa8_osv8_isv4_swizzled_by_4 && !(is_aligned_to(my_sizes[0], 32)) && !(is_aligned_to(my_sizes[1], 32))) { my_sizes[0] = align_to(my_sizes[0], 32); my_sizes[1] = align_to(my_sizes[1], 32); diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/common/tensor_type.cpp b/inference-engine/thirdparty/clDNN/kernel_selector/common/tensor_type.cpp index 4797367c27c912..7878ece57137fb 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/common/tensor_type.cpp +++ b/inference-engine/thirdparty/clDNN/kernel_selector/common/tensor_type.cpp @@ -86,8 +86,10 @@ WeightsTensor::WeightsChannelArray WeightsTensor::weightsChannelArray {{ { WeightsLayout::image_2d_weights_winograd_6x3_s1_xfbyb, { 0, 1, -1, 2, 3, -1, -1, -1 } }, { WeightsLayout::dlstm_dir_io, { 1, 0, -1, 2, 3, -1, -1, -1 } }, { WeightsLayout::os_is_yx_isa8_osv8_isv4, { 0, 1, -1, 2, 3, -1, -1, -1 } }, + { WeightsLayout::os_is_yx_isa8_osv16_isv4, { 0, 1, -1, 2, 3, -1, -1, -1 } }, { WeightsLayout::os_is_yx_isa8_osv8_isv4_swizzled_by_4, { 0, 1, -1, 2, 3, -1, -1, -1 } }, { WeightsLayout::os_is_zyx_isa8_osv8_isv4, { 0, 1, 2, 3, 4, -1, -1, -1 } }, + { WeightsLayout::os_is_zyx_isa8_osv16_isv4, { 0, 1, 2, 3, 4, -1, -1, -1 } }, { WeightsLayout::os_is_yx_osa4_isa8_osv8_isv4_swizzled_by_4, { 0, 1, -1, 2, 3, -1, -1, -1 } }, { WeightsLayout::os_is_zyx_osa4_isa8_osv8_isv4_swizzled_by_4, { 0, 1, 2, 3, 4, -1, -1, -1 } }, { WeightsLayout::is_o_yx_isv32, { 1, 2, -1, 0, 3, -1, -1, -1 } }, @@ -457,6 +459,16 @@ NDims WeightsTensor::GetSimpleDims(const std::vector& d, WeightsLayout l newDims[3] = RoundUp(newDims[3], 32); newDims[4] = RoundUp(newDims[4], 8); break; + case os_is_yx_isa8_osv16_isv4: + assert(newDims.size() == 4); + newDims[3] = RoundUp(newDims[3], 16); + newDims[2] = RoundUp(newDims[2], 32); + break; + case os_is_zyx_isa8_osv16_isv4: + assert(newDims.size() == 5); + newDims[3] = RoundUp(newDims[3], 32); + newDims[4] = RoundUp(newDims[4], 16); + break; case os_is_yx_osa4_isa8_osv8_isv4_swizzled_by_4: assert(newDims.size() == 4); newDims[3] = RoundUp(newDims[3], 32); @@ -693,6 +705,9 @@ NDims WeightsTensor::GetSimpleDims(const std::vector& d, WeightsLayout l } else if (l == os_is_yx_isa8_osv8_isv4 || l == os_is_yx_isa8_osv8_isv4_swizzled_by_4) { ret[0].pitch = 256; ret[1].pitch = ret[0].pitch * ret[0].v; + } else if (l == os_is_yx_isa8_osv16_isv4) { + ret[0].pitch = 512; + ret[1].pitch = ret[0].pitch * ret[0].v; } else if (l == os_i_yxs_osv4_yxsv4) { ret[2].pitch = RoundUp(ret[0].v * ret[1].v, 4) * 4; ret[3].pitch = ret[2].v * RoundUp(ret[0].v * ret[1].v, 4); diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/common/tensor_type.h b/inference-engine/thirdparty/clDNN/kernel_selector/common/tensor_type.h index e1b57d72e7caf0..67fa78eda7f0cb 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/common/tensor_type.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/common/tensor_type.h @@ -107,6 +107,8 @@ enum WeightsLayout { dlstm_dir_io, // dlstm weights layout direction, input_size, 4* hiden_size os_is_yx_isa8_osv8_isv4, // for MMAD convolution os_is_zyx_isa8_osv8_isv4, // for MMAD convolution + os_is_yx_isa8_osv16_isv4, // for fully connected MMAD + os_is_zyx_isa8_osv16_isv4, // for fully connected MMAD os_is_yx_osa4_isa8_osv8_isv4_swizzled_by_4, // for MMAD convolution swizzled from ofm 0..7 to 0,4,8,12,16,20,24,28, // 1,5... os_is_zyx_osa4_isa8_osv8_isv4_swizzled_by_4, // for MMAD convolution swizzled from ofm 0..7 to 0,4,8,12,16,20,24,28, diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/fully_connected/fully_connected_kernel_mmad.cpp b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/fully_connected/fully_connected_kernel_mmad.cpp index 8b2e9f7c3ada6f..306d4b60d23d83 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/fully_connected/fully_connected_kernel_mmad.cpp +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/fully_connected/fully_connected_kernel_mmad.cpp @@ -61,27 +61,62 @@ bool FullyConnectedKernelMMAD::Validate(const Params& params, const optional_par return true; } -FullyConnectedKernelMMAD::FullyConnectedTuningData FullyConnectedKernelMMAD::SetTuningParams(const fully_connected_params& params) const { +FullyConnectedKernelMMAD::FullyConnectedTuningData FullyConnectedKernelMMAD::GetTuningParams(const fully_connected_params& params) const { FullyConnectedTuningData tuning_data; const auto& input = params.inputs[0]; + const auto& output = params.output; + + tuning_data.sub_group_size = 8; + if (input.X().v == 1 && input.Y().v == 1 && input.Z().v == 1 && input.Batch().v == 1) { + // Known cases for TGL where simd16 works better than simd8 + bool simd16_exception_1 = input.Feature().v == 25088 && output.Feature().v == 512; + bool simd16_exception_2 = input.Feature().v == 21504 && output.Feature().v == 512; + + if (simd16_exception_1 || simd16_exception_2) + tuning_data.sub_group_size = 16; + } - size_t feature_blocks_count = input.GetLayout() == DataLayout::bfyx && input.Feature().v % 32 != 0 ? - input.Feature().v / 32 : CeilDiv(input.Feature().v, 32); + size_t sub_group_pack_size = tuning_data.sub_group_size * tuning_data.pack_size; - if (feature_blocks_count) - while (feature_blocks_count % (tuning_data.slm_div_factor * 2) == 0 && + tuning_data.feature_blocks_count = input.GetLayout() == DataLayout::bfyx && input.Feature().v % sub_group_pack_size != 0 ? + input.Feature().v / sub_group_pack_size : + input.GetLayout() != DataLayout::bfyx && tuning_data.sub_group_size == 16 ? + CeilDiv(input.Feature().v, 32) % 2 == 0 ? CeilDiv(input.Feature().v, 64) : CeilDiv(input.Feature().v, 64) - 1 : + CeilDiv(input.Feature().v, sub_group_pack_size); + + bool slm_div_factor_exception = input.Batch().v == 300 && input.Feature().v == 2048 && + output.Batch().v == 300 && (output.Feature().v == 324 || output.Feature().v == 81); + + if (tuning_data.feature_blocks_count && tuning_data.sub_group_size == 8 && !slm_div_factor_exception) + while (tuning_data.feature_blocks_count % (tuning_data.slm_div_factor * 2) == 0 && (tuning_data.slm_div_factor * 2 <= params.engineInfo.maxWorkGroupSize / tuning_data.sub_group_size)) tuning_data.slm_div_factor *= 2; tuning_data.work_group_size = tuning_data.slm_div_factor * tuning_data.sub_group_size; + tuning_data.full_unroll_factor = tuning_data.feature_blocks_count / tuning_data.slm_div_factor; + + if (tuning_data.sub_group_size == 16) { + tuning_data.unroll_factor = 1; + } else { + size_t temp_unroll_factor = 3; + + if (tuning_data.full_unroll_factor > 3) { + while (tuning_data.full_unroll_factor % temp_unroll_factor) + temp_unroll_factor--; + tuning_data.unroll_factor = temp_unroll_factor; + } else { + tuning_data.unroll_factor = tuning_data.full_unroll_factor; + } + } + return tuning_data; } FullyConnectedKernelMMAD::DispatchData FullyConnectedKernelMMAD::SetDefault(const fully_connected_params& params, int) const { - FullyConnectedTuningData tuning_data = SetTuningParams(params); + FullyConnectedTuningData tuning_data = GetTuningParams(params); auto dispatchData = Parent::SetDefault(params); const auto& output = params.output; @@ -92,84 +127,65 @@ FullyConnectedKernelMMAD::DispatchData FullyConnectedKernelMMAD::SetDefault(cons } JitConstants FullyConnectedKernelMMAD::GetJitConstants(const fully_connected_params& params, - const DispatchData& dispatchData) const { - FullyConnectedTuningData tuning_data = SetTuningParams(params); + const DispatchData& runInfo) const { + FullyConnectedTuningData tuning_data = GetTuningParams(params); - auto jit = Parent::GetJitConstants(params, dispatchData); + auto jit = Parent::GetJitConstants(params, runInfo); auto& input = params.inputs[0]; auto& weights = params.weights; + size_t sub_group_pack_size = tuning_data.sub_group_size * tuning_data.pack_size; + jit.AddConstant(MakeJitConstant("SUB_GROUP_SIZE", tuning_data.sub_group_size)); - if (input.GetDims().size() == 5) { - jit.AddConstant(MakeJitConstant("FILTER_GET_OFFSET(f)", "GET_FILTER_OS_IS_YX_ISA8_OSV8_ISV4_INDEX(FILTER, f, 0, 0, 0)")); + if (tuning_data.sub_group_size == 8) { + if (input.GetDims().size() == 5) { + jit.AddConstant(MakeJitConstant("FILTER_GET_OFFSET(f)", "GET_FILTER_OS_IS_YX_ISA8_OSV8_ISV4_INDEX(FILTER, f, 0, 0, 0)")); + } else { + jit.AddConstant(MakeJitConstant("FILTER_GET_OFFSET(f)", "GET_FILTER_OS_IS_ZYX_ISA8_OSV8_ISV4_INDEX(FILTER, f, 0, 0, 0, 0)")); + } } else { - jit.AddConstant(MakeJitConstant("FILTER_GET_OFFSET(f)", "GET_FILTER_OS_IS_ZYX_ISA8_OSV8_ISV4_INDEX(FILTER, f, 0, 0, 0, 0)")); - } - - Datatype input_packed_type = Datatype::INT32; - Datatype filter_packed_type = Datatype::INT32; - - if (input.GetDType() == Datatype::UINT8) { - input_packed_type = Datatype::UINT32; - } else if (input.GetDType() == Datatype::INT8) { - input_packed_type = Datatype::INT32; - } - - if (weights.GetDType() == WeightsType::UINT8) { - filter_packed_type = Datatype::UINT32; - } else if (weights.GetDType() == WeightsType::INT8) { - filter_packed_type = Datatype::INT32; + if (input.GetDims().size() == 5) { + jit.AddConstant(MakeJitConstant("FILTER_GET_OFFSET(f)", "GET_FILTER_OS_IS_YX_ISA8_OSV16_ISV4_INDEX(FILTER, f, 0, 0, 0)")); + } else { + jit.AddConstant(MakeJitConstant("FILTER_GET_OFFSET(f)", "GET_FILTER_OS_IS_ZYX_ISA8_OSV16_ISV4_INDEX(FILTER, f, 0, 0, 0, 0)")); + } } - jit.Merge(MakeTypeJitConstants(input_packed_type, "INPUT_PACKED")); - jit.Merge(MakeTypeJitConstants(filter_packed_type, "FILTER_PACKED")); + jit.Merge(MakeTypeJitConstants(input.GetDType() == Datatype::UINT8 ? Datatype::UINT32 : Datatype::INT32, "INPUT_PACKED")); + jit.Merge(MakeTypeJitConstants(weights.GetDType() == WeightsType::UINT8 ? Datatype::UINT32 : Datatype::INT32, "FILTER_PACKED")); auto filter_spatial_size = weights.X().v * weights.Y().v * weights.Z().v; - int filter_spatial_pitch = 4 * 8 * 8; + auto filter_spatial_pitch = 8 * sub_group_pack_size; + auto filter_fblock_pitch = tuning_data.sub_group_size == 8 ? + filter_spatial_size * filter_spatial_pitch : + filter_spatial_size * filter_spatial_pitch * 2; jit.AddConstant(MakeJitConstant("FILTER_SPATIAL_SIZE", filter_spatial_size)); jit.AddConstant(MakeJitConstant("MMAD_FILTER_SPATIAL_PITCH", filter_spatial_pitch)); - jit.AddConstant(MakeJitConstant("MMAD_FILTER_FBLOCK_PITCH", filter_spatial_size * filter_spatial_pitch)); + jit.AddConstant(MakeJitConstant("MMAD_FILTER_FBLOCK_PITCH", filter_fblock_pitch)); size_t input_x_pitch = input.X().pitch; size_t input_y_pitch = input.Y().pitch; size_t input_z_pitch = input.Z().pitch; if (input.GetLayout() == DataLayout::bfyx) { - jit.AddConstant(MakeJitConstant("MMAD_INPUT_FBLOCK_PITCH", 32)); + jit.AddConstant(MakeJitConstant("MMAD_INPUT_FBLOCK_PITCH", sub_group_pack_size)); } else if (input.GetLayout() == DataLayout::b_fs_yx_fsv32 || input.GetLayout() == DataLayout::b_fs_zyx_fsv32) { input_x_pitch = 32; input_y_pitch *= 32; input_z_pitch *= 32; - jit.AddConstant(MakeJitConstant("MMAD_INPUT_FBLOCK_PITCH", input.Feature().pitch * 32)); + jit.AddConstant(MakeJitConstant("MMAD_INPUT_FBLOCK_PITCH", input.Feature().pitch * sub_group_pack_size)); } - jit.AddConstant(MakeJitConstant("SLM_DIV_FACTOR", tuning_data.slm_div_factor)); - - size_t feature_blocks_count; - size_t temp_unroll_factor = 9, unroll_factor, full_unroll_factor; + bool has_feature_leftovers = (input.GetLayout() == DataLayout::bfyx && input.Feature().v % sub_group_pack_size) || + (input.GetLayout() != DataLayout::bfyx && tuning_data.sub_group_size == 16 && CeilDiv(input.Feature().v, 32) % 2); - if (input.GetLayout() == DataLayout::bfyx && input.Feature().v % 32 != 0) { - feature_blocks_count = input.Feature().v / 32; - jit.AddConstant(MakeJitConstant("HAS_FEATURE_LEFTOVERS", true)); - } else { - feature_blocks_count = CeilDiv(input.Feature().v, 32); - } - - full_unroll_factor = feature_blocks_count / tuning_data.slm_div_factor; - - if (full_unroll_factor > 9) { - while (full_unroll_factor % temp_unroll_factor) - temp_unroll_factor--; - unroll_factor = temp_unroll_factor; - } else { - unroll_factor = full_unroll_factor; - } - - jit.AddConstant(MakeJitConstant("FEATURE_BLOCKS_COUNT", feature_blocks_count)); - jit.AddConstant(MakeJitConstant("UNROLL_FACTOR", unroll_factor)); - jit.AddConstant(MakeJitConstant("FULL_UNROLL_FACTOR", full_unroll_factor)); + jit.AddConstant(MakeJitConstant("HAS_FEATURE_LEFTOVERS", has_feature_leftovers)); + jit.AddConstant(MakeJitConstant("FEATURE_BLOCKS_COUNT", tuning_data.feature_blocks_count)); + jit.AddConstant(MakeJitConstant("SLM_DIV_FACTOR", tuning_data.slm_div_factor)); + jit.AddConstant(MakeJitConstant("UNROLL_FACTOR", tuning_data.unroll_factor)); + jit.AddConstant(MakeJitConstant("FULL_UNROLL_FACTOR", tuning_data.full_unroll_factor)); jit.AddConstant(MakeJitConstant("WORK_GROUP_SIZE", tuning_data.work_group_size)); jit.AddConstant(MakeJitConstant("MMAD_INPUT_SPATIAL_PITCH", input_x_pitch)); @@ -197,10 +213,9 @@ KernelsData FullyConnectedKernelMMAD::GetKernelsData(const Params& params, const auto fc_params = static_cast(params); auto& input = fc_params.inputs[0]; - auto w_layout = WeightsLayout::os_is_yx_isa8_osv8_isv4; - if (input.GetDims().size() == 5) { - w_layout = WeightsLayout::os_is_zyx_isa8_osv8_isv4; - } + auto w_layout = GetTuningParams(fc_params).sub_group_size == 16 ? + input.GetDims().size() == 4 ? WeightsLayout::os_is_yx_isa8_osv16_isv4 : WeightsLayout::os_is_zyx_isa8_osv16_isv4 : + input.GetDims().size() == 4 ? WeightsLayout::os_is_yx_isa8_osv8_isv4 : WeightsLayout::os_is_zyx_isa8_osv8_isv4; KernelsData res = {}; for (size_t i = 0; i < autoTuneOptions.size(); i++) { diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/fully_connected/fully_connected_kernel_mmad.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/fully_connected/fully_connected_kernel_mmad.h index af7cb336e9abc9..529f4c5db3b7f6 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/fully_connected/fully_connected_kernel_mmad.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/fully_connected/fully_connected_kernel_mmad.h @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Intel Corporation +// Copyright (c) 2016-2020 Intel Corporation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -30,20 +30,25 @@ class FullyConnectedKernelMMAD : public FullyConnectedKernelBase { ParamsKey GetSupportedKey() const override; struct FullyConnectedTuningData { - const size_t sub_group_size = 8; + const size_t pack_size = 4; + size_t sub_group_size = 8; size_t slm_div_factor = 1; size_t work_group_size = 1; + size_t feature_blocks_count; + size_t unroll_factor; + size_t full_unroll_factor; }; protected: - JitConstants GetJitConstants(const fully_connected_params& params, const DispatchData& dispatchData) const override; + JitConstants GetJitConstants(const fully_connected_params& params, const DispatchData& kd) const override; DispatchData SetDefault(const fully_connected_params& params, int autoTuneIndex = -1) const override; std::vector GetSupportedFusedOps() const override { return { FusedOpType::QUANTIZE, FusedOpType::SCALE, - FusedOpType::ACTIVATION }; + FusedOpType::ACTIVATION, + FusedOpType::ELTWISE }; } bool Validate(const Params& params, const optional_params& options) const override; - FullyConnectedTuningData SetTuningParams(const fully_connected_params& params) const; + FullyConnectedTuningData GetTuningParams(const fully_connected_params& params) const; }; } // namespace kernel_selector diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/fully_connected_gpu_MMAD.cl b/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/fully_connected_gpu_MMAD.cl index 95fc65da6805d8..7b59f7e15d59b2 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/fully_connected_gpu_MMAD.cl +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/fully_connected_gpu_MMAD.cl @@ -19,10 +19,17 @@ #include "include/fetch.cl" #include "include/mmad.cl" -#define INPUT_PACKED_TYPE_8 CAT(INPUT_PACKED_TYPE, 8) -#define FILTER_PACKED_TYPE_8 CAT(FILTER_PACKED_TYPE, 8) +#define INPUT_PACKED_TYPE_8 CAT(INPUT_PACKED_TYPE, 8) +#define FILTER_PACKED_TYPE_8 CAT(FILTER_PACKED_TYPE, 8) +#define INPUT_PACKED_TYPE_VEC CAT(INPUT_PACKED_TYPE, SUB_GROUP_SIZE) +#define FILTER_PACKED_TYPE_VEC CAT(FILTER_PACKED_TYPE, SUB_GROUP_SIZE) -#define AS_TYPE(type, val) CAT(as_, type)(val) +#define BLOCK_READ(ptr) intel_sub_group_block_read((const __global uint*)(ptr)) +#define BLOCK_READ_8(ptr) intel_sub_group_block_read8((const __global uint*)(ptr)) + +#define MMAD CAT(MMAD_, SUB_GROUP_SIZE) + +#define AS_TYPE(type, val) CAT(as_, type)(val) __attribute__((intel_reqd_sub_group_size(SUB_GROUP_SIZE))) KERNEL(fully_connected_gpu_MMAD)( @@ -64,25 +71,27 @@ KERNEL(fully_connected_gpu_MMAD)( uint k = feature_block * FULL_UNROLL_FACTOR; #else for (uint k = feature_block * FULL_UNROLL_FACTOR; k + UNROLL_FACTOR <= (feature_block + 1) * FULL_UNROLL_FACTOR; k += UNROLL_FACTOR) -#endif +#endif // FULL_UNROLL_FACTOR < 2 { -# if !SPLIT_SPATIAL +#if !SPLIT_SPATIAL for (uint spatial = 0; spatial < FILTER_SPATIAL_SIZE; ++spatial) { -# else +#else for (uint zi = 0; zi < FILTER_SIZE_Z; ++zi) for (uint yi = 0; yi < FILTER_SIZE_Y; ++yi) for (uint xi = 0; xi < FILTER_SIZE_X; ++xi) { const uint spatial = xi + yi * FILTER_SIZE_X + zi * FILTER_SIZE_X * FILTER_SIZE_Y; -#endif +#endif // !SPLIT_SPATIAL + #else // SPATIAL_MAJOR -# if !SPLIT_SPATIAL + +#if !SPLIT_SPATIAL for (uint spatial = 0; spatial < FILTER_SPATIAL_SIZE; ++spatial) { -# else +#else for (uint zi = 0; zi < FILTER_SIZE_Z; ++zi) for (uint yi = 0; yi < FILTER_SIZE_Y; ++yi) for (uint xi = 0; xi < FILTER_SIZE_X; ++xi) { const uint spatial = xi + yi * FILTER_SIZE_X + zi * FILTER_SIZE_X * FILTER_SIZE_Y; -# endif +#endif // !SPLIT_SPATIAL #if FULL_UNROLL_FACTOR < 2 for (uint k = feature_block * FULL_UNROLL_FACTOR; k < (feature_block + 1) * FULL_UNROLL_FACTOR; ++k) @@ -90,21 +99,20 @@ KERNEL(fully_connected_gpu_MMAD)( uint k = feature_block * FULL_UNROLL_FACTOR; #else for (uint k = feature_block * FULL_UNROLL_FACTOR; k + UNROLL_FACTOR <= (feature_block + 1) * FULL_UNROLL_FACTOR; k += UNROLL_FACTOR) -#endif +#endif // FULL_UNROLL_FACTOR < 2 { -#endif +#endif // SPATIAL_MAJOR + #if !SPLIT_SPATIAL uint input_idx = input_offset + spatial * MMAD_INPUT_SPATIAL_PITCH + k * MMAD_INPUT_FBLOCK_PITCH; #else uint input_idx = input_offset + k * MMAD_INPUT_FBLOCK_PITCH + zi * MMAD_INPUT_Z_PITCH + yi * MMAD_INPUT_Y_PITCH + xi * MMAD_INPUT_X_PITCH; -#endif +#endif // !SPLIT_SPATIAL uint filter_idx = filter_offset + spatial * MMAD_FILTER_SPATIAL_PITCH + k * MMAD_FILTER_FBLOCK_PITCH; #if UNROLL_FACTOR < 2 - uint input_data_u = intel_sub_group_block_read((const __global uint*)(input + input_idx)); - INPUT_PACKED_TYPE input_data = AS_TYPE(INPUT_PACKED_TYPE, input_data_u); - - INPUT_PACKED_TYPE_8 activations; + INPUT_PACKED_TYPE input_data = AS_TYPE(INPUT_PACKED_TYPE, BLOCK_READ(input + input_idx)); + INPUT_PACKED_TYPE_VEC activations; activations.s0 = sub_group_broadcast(input_data, 0); activations.s1 = sub_group_broadcast(input_data, 1); @@ -114,27 +122,44 @@ KERNEL(fully_connected_gpu_MMAD)( activations.s5 = sub_group_broadcast(input_data, 5); activations.s6 = sub_group_broadcast(input_data, 6); activations.s7 = sub_group_broadcast(input_data, 7); - - uint8 weights_data_u = intel_sub_group_block_read8((const __global uint*)(weights + filter_idx)); - FILTER_PACKED_TYPE_8 weights_data = AS_TYPE(FILTER_PACKED_TYPE_8, weights_data_u); - - dotProd = MMAD_8(activations, weights_data, dotProd); +#if SUB_GROUP_SIZE == 16 + activations.s8 = sub_group_broadcast(input_data, 8); + activations.s9 = sub_group_broadcast(input_data, 9); + activations.sa = sub_group_broadcast(input_data, 0xa); + activations.sb = sub_group_broadcast(input_data, 0xb); + activations.sc = sub_group_broadcast(input_data, 0xc); + activations.sd = sub_group_broadcast(input_data, 0xd); + activations.se = sub_group_broadcast(input_data, 0xe); + activations.sf = sub_group_broadcast(input_data, 0xf); +#endif // SUB_GROUP_SIZE == 16 + + FILTER_PACKED_TYPE_VEC weights_data; +#if SUB_GROUP_SIZE == 8 + weights_data = AS_TYPE(FILTER_PACKED_TYPE_8, BLOCK_READ_8(weights + filter_idx)); #else + weights_data.lo = AS_TYPE(FILTER_PACKED_TYPE_8, BLOCK_READ_8(weights + filter_idx)); + weights_data.hi = AS_TYPE(FILTER_PACKED_TYPE_8, BLOCK_READ_8(weights + filter_idx + SUB_GROUP_SIZE * 8 * 4)); +#endif // SUB_GROUP_SIZE == 8 + + dotProd = MMAD(activations, weights_data, dotProd); +#else // UNROLL_FACTOR < 2 INPUT_PACKED_TYPE input_data[UNROLL_FACTOR]; - FILTER_PACKED_TYPE_8 weights_data[UNROLL_FACTOR]; + FILTER_PACKED_TYPE_VEC weights_data[UNROLL_FACTOR]; __attribute__((opencl_unroll_hint)) for (uint kb = 0; kb < UNROLL_FACTOR; kb++) { - input_data[kb] = AS_TYPE(INPUT_PACKED_TYPE, intel_sub_group_block_read((const __global uint*)(input + - input_idx + kb * MMAD_INPUT_FBLOCK_PITCH))); - - uint8 weights_data_u0 = intel_sub_group_block_read8((const __global uint*)(weights + filter_idx + kb * MMAD_FILTER_FBLOCK_PITCH)); - weights_data[kb] = AS_TYPE(FILTER_PACKED_TYPE_8, weights_data_u0); + input_data[kb] = AS_TYPE(INPUT_PACKED_TYPE, BLOCK_READ(input + input_idx + kb * MMAD_INPUT_FBLOCK_PITCH)); +#if SUB_GROUP_SIZE == 8 + weights_data[kb] = AS_TYPE(FILTER_PACKED_TYPE_8, BLOCK_READ_8(weights + filter_idx + kb * MMAD_FILTER_FBLOCK_PITCH)); +#else + weights_data[kb].lo = AS_TYPE(FILTER_PACKED_TYPE_8, BLOCK_READ_8(weights + filter_idx + kb * MMAD_FILTER_FBLOCK_PITCH)); + weights_data[kb].hi = AS_TYPE(FILTER_PACKED_TYPE_8, BLOCK_READ_8(weights + filter_idx + SUB_GROUP_SIZE * 32 + kb * MMAD_FILTER_FBLOCK_PITCH)); +#endif // SUB_GROUP_SIZE } __attribute__((opencl_unroll_hint)) for (uint kb = 0; kb < UNROLL_FACTOR; kb++) { - INPUT_PACKED_TYPE_8 in; + INPUT_PACKED_TYPE_VEC in; in.s0 = sub_group_broadcast(input_data[kb], 0); in.s1 = sub_group_broadcast(input_data[kb], 1); @@ -144,8 +169,17 @@ KERNEL(fully_connected_gpu_MMAD)( in.s5 = sub_group_broadcast(input_data[kb], 5); in.s6 = sub_group_broadcast(input_data[kb], 6); in.s7 = sub_group_broadcast(input_data[kb], 7); - - dotProd = MMAD_8(in, weights_data[kb], dotProd); +#if SUB_GROUP_SIZE == 16 + in.s8 = sub_group_broadcast(input_data[kb], 8); + in.s9 = sub_group_broadcast(input_data[kb], 9); + in.sa = sub_group_broadcast(input_data[kb], 0xa); + in.sb = sub_group_broadcast(input_data[kb], 0xb); + in.sc = sub_group_broadcast(input_data[kb], 0xc); + in.sd = sub_group_broadcast(input_data[kb], 0xd); + in.se = sub_group_broadcast(input_data[kb], 0xe); + in.sf = sub_group_broadcast(input_data[kb], 0xf); +#endif // SUB_GROUP_SIZE == 16 + dotProd = MMAD(in, weights_data[kb], dotProd); } #endif // UNROLL_FACTOR < 2 } @@ -174,6 +208,7 @@ KERNEL(fully_connected_gpu_MMAD)( #endif // !SPLIT_SPATIAL #else // SPATIAL_MAJOR + #if !SPLIT_SPATIAL for (uint spatial = 0; spatial < FILTER_SPATIAL_SIZE; ++spatial) { #else // !SPLIT_SPATIAL @@ -182,24 +217,27 @@ KERNEL(fully_connected_gpu_MMAD)( for (uint xi = 0; xi < FILTER_SIZE_X; ++xi) { const uint spatial = xi + yi * FILTER_SIZE_X + zi * FILTER_SIZE_X * FILTER_SIZE_Y; #endif // !SPLIT_SPATIAL + #endif // SPATIAL_MAJOR #if !SPLIT_SPATIAL uint input_idx = input_offset + spatial * MMAD_INPUT_SPATIAL_PITCH + FEATURE_BLOCKS_COUNT * INPUT0_FEATURE_PITCH; -#else // !SPLIT_SPATIAL - uint input_idx = input_offset + FEATURE_BLOCKS_COUNT * INPUT0_FEATURE_PITCH + zi * MMAD_INPUT_Z_PITCH + yi * MMAD_INPUT_Y_PITCH + xi * MMAD_INPUT_X_PITCH; -#endif // !SPLIT_SPATIAL +#else + uint input_idx = input_offset + FEATURE_BLOCKS_COUNT * INPUT0_FEATURE_PITCH + + zi * MMAD_INPUT_Z_PITCH + yi * MMAD_INPUT_Y_PITCH + xi * MMAD_INPUT_X_PITCH; +#endif // !SPLIT_SPATIAL uint filter_idx = filter_offset + spatial * MMAD_FILTER_SPATIAL_PITCH + FEATURE_BLOCKS_COUNT * MMAD_FILTER_FBLOCK_PITCH; MAKE_VECTOR_TYPE(INPUT0_TYPE, 4) input_data_u = (0, 0, 0, 0); for (uint i = 0; i < 4; i++) { - if (FEATURE_BLOCKS_COUNT * 32 + sglid * 4 + i < INPUT0_FEATURE_NUM) { + if (FEATURE_BLOCKS_COUNT * SUB_GROUP_SIZE * 4 + sglid * 4 + i < INPUT0_FEATURE_NUM) { input_data_u[i] = input[input_idx + (sglid * 4 + i) * INPUT0_FEATURE_PITCH]; } } INPUT_PACKED_TYPE input_data = AS_TYPE(INPUT_PACKED_TYPE, input_data_u); - INPUT_PACKED_TYPE_8 activations; //activations of all lanes + INPUT_PACKED_TYPE_VEC activations; + activations.s0 = sub_group_broadcast(input_data, 0); activations.s1 = sub_group_broadcast(input_data, 1); activations.s2 = sub_group_broadcast(input_data, 2); @@ -208,11 +246,26 @@ KERNEL(fully_connected_gpu_MMAD)( activations.s5 = sub_group_broadcast(input_data, 5); activations.s6 = sub_group_broadcast(input_data, 6); activations.s7 = sub_group_broadcast(input_data, 7); +#if SUB_GROUP_SIZE == 16 + activations.s8 = sub_group_broadcast(input_data, 8); + activations.s9 = sub_group_broadcast(input_data, 9); + activations.sa = sub_group_broadcast(input_data, 0xa); + activations.sb = sub_group_broadcast(input_data, 0xb); + activations.sc = sub_group_broadcast(input_data, 0xc); + activations.sd = sub_group_broadcast(input_data, 0xd); + activations.se = sub_group_broadcast(input_data, 0xe); + activations.sf = sub_group_broadcast(input_data, 0xf); +#endif // SUB_GROUP_SIZE == 16 + + FILTER_PACKED_TYPE_VEC weights_data; +#if SUB_GROUP_SIZE == 8 + weights_data = AS_TYPE(FILTER_PACKED_TYPE_8, BLOCK_READ_8(weights + filter_idx)); +#else + weights_data.lo = AS_TYPE(FILTER_PACKED_TYPE_8, BLOCK_READ_8(weights + filter_idx)); + weights_data.hi = AS_TYPE(FILTER_PACKED_TYPE_8, BLOCK_READ_8(weights + filter_idx + SUB_GROUP_SIZE * 32)); +#endif // SUB_GROUP_SIZE == 8 - uint8 weights_data_u = intel_sub_group_block_read8((const __global uint*)(weights + filter_idx)); - FILTER_PACKED_TYPE_8 weights_data = AS_TYPE(FILTER_PACKED_TYPE_8, weights_data_u); - - dotProd = MMAD_8(activations, weights_data, dotProd); + dotProd = MMAD(activations, weights_data, dotProd); } #endif // HAS_FEATURE_LEFTOVERS @@ -220,16 +273,16 @@ KERNEL(fully_connected_gpu_MMAD)( return; #if BIAS_TERM -#if BIAS_PER_OUTPUT +#if BIAS_PER_OUTPUT const uint bias_index = GET_DATA_INDEX(BIAS, batch, feature, 0, 0); #elif BIAS_PER_OFM const uint bias_index = feature; -#endif +#endif // BIAS_PER_OUTPUT float dequantized = (float)dotProd + biases[bias_index]; -#else // BIAS_TERM +#else float dequantized = (float)dotProd; -#endif +#endif // BIAS_TERM const uint out_idx = OUTPUT_GET_INDEX(batch, feature, 0, 0); @@ -240,7 +293,7 @@ KERNEL(fully_connected_gpu_MMAD)( output[out_idx] = res; #else output[out_idx] = TO_OUTPUT_TYPE(dequantized); -#endif +#endif // HAS_FUSED_OPS #if SLM_DIV_FACTOR > 1 } @@ -249,4 +302,11 @@ KERNEL(fully_connected_gpu_MMAD)( #undef INPUT_PACKED_TYPE_8 #undef FILTER_PACKED_TYPE_8 +#undef INPUT_PACKED_TYPE_VEC +#undef FILTER_PACKED_TYPE_VEC + +#undef BLOCK_READ +#undef BLOCK_READ_8 + +#undef MMAD #undef AS_TYPE diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/include/fetch.cl b/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/include/fetch.cl index 92bae09b2b2782..8b685eb66b7070 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/include/fetch.cl +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/include/fetch.cl @@ -715,6 +715,63 @@ inline uint FUNC(get_os_is_zyx_isa8_osv8_isv4_index)(uint o, uint i, uint z, uin CAT(prefix, _OFM_NUM), \ CAT(prefix, _OFFSET)) +inline uint FUNC(get_os_is_yx_isa8_osv16_isv4_index)(uint o, uint i, uint y, uint x, uint size_x, uint size_y, uint size_ifm, uint size_ofm, uint offset) +{ + const uint f_32_aligned = ((size_ifm + 31)/32) * 32; + const uint isv2_idx = i % 4; + const uint osv_idx = o % 16; + const uint isv1_idx = (i / 4) % 8; + const uint is_idx = i / 32; + const uint os_idx = o / 16; + + size_t idx = offset + isv2_idx + 4 * (osv_idx + 16 * isv1_idx); + idx += x * 4 * 8 * 16; + idx += y * size_x * 4 * 8 * 16; + idx += is_idx * size_y * size_x * 4 * 8 * 16; + idx += os_idx * (f_32_aligned/32) * size_y * size_x * 4 * 8 * 16; + + return idx; +} + +#define GET_FILTER_OS_IS_YX_ISA8_OSV16_ISV4_INDEX(prefix, o, i, y, x) \ + FUNC_CALL(get_os_is_yx_isa8_osv16_isv4_index)( \ + o, i, y, x, CAT(prefix, _SIZE_X ), \ + CAT(prefix, _SIZE_Y), \ + CAT(prefix, _IFM_NUM), \ + CAT(prefix, _OFM_NUM), \ + CAT(prefix, _OFFSET)) + +inline uint FUNC(get_os_is_zyx_isa8_osv16_isv4_index)(uint o, uint i, uint z, uint y, uint x, + uint size_x, uint size_y, uint size_z, + uint size_ifm, uint size_ofm, uint offset) +{ + const uint ifm_slices = (size_ifm + 31)/32; + const uint isv2_idx = i % 4; + const uint osv_idx = o % 16; + const uint isv1_idx = (i / 4) % 8; + const uint is_idx = i / 32; + const uint os_idx = o / 16; + + size_t idx = offset + isv2_idx + 4 * (osv_idx + 16 * isv1_idx); + idx += x * 4 * 8 * 16; + idx += y * size_x * 4 * 8 * 16; + idx += z * size_y * size_x * 4 * 8 * 16; + idx += is_idx * size_z * size_y * size_x * 4 * 8 * 16; + idx += os_idx * ifm_slices * size_z * size_y * size_x * 4 * 8 * 16; + + return idx; +} + +#define GET_FILTER_OS_IS_ZYX_ISA8_OSV16_ISV4_INDEX(prefix, o, i, z, y, x) \ + FUNC_CALL(get_os_is_zyx_isa8_osv16_isv4_index)( \ + o, i, z, y, x, \ + CAT(prefix, _SIZE_X ), \ + CAT(prefix, _SIZE_Y), \ + CAT(prefix, _SIZE_Z), \ + CAT(prefix, _IFM_NUM), \ + CAT(prefix, _OFM_NUM), \ + CAT(prefix, _OFFSET)) + inline uint FUNC(get_os_is_yx_isa8_osv8_isv4_swizzled_by_4_index)(uint o, uint i, uint y, uint x, uint size_x, uint size_y, uint size_ifm, uint size_ofm, uint offset) { const uint o_swizzled = (o % 4) * 8 + ((o % 32) / 4) + (o / 32) * 32; diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/include/mmad.cl b/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/include/mmad.cl index d323b9ccf90303..40bd275ca63f74 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/include/mmad.cl +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/include/mmad.cl @@ -783,6 +783,7 @@ inline uchar FUNC(sub_group_block_read_uchar)(const __local uchar* ptr) __attrib } #define MMAD_8(A, B, C) FUNC_CALL(mmad8)(A, B, C) +#define MMAD_16(A, B, C) FUNC_CALL(mmad16)(A, B, C) #define MMAD_4x8(A, B, C) FUNC_CALL(mmad4x8)(A, B, C) #define MMAD_8x8(A, B, C) FUNC_CALL(mmad8x8)(A, B, C) #define MMAD_16x16(A, B, C) FUNC_CALL(mmad16x16)(A, B, C) diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/reorder_weights.cl b/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/reorder_weights.cl index f1230a80b0340e..d42d438f7452fd 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/reorder_weights.cl +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/reorder_weights.cl @@ -48,6 +48,10 @@ inline uint FUNC(get_input_index)(uint g, uint o, uint i, uint z, uint y, uint x return GET_FILTER_OS_IS_YX_ISA8_OSV8_ISV4_INDEX(INPUT0, o, i, y, x); #elif defined INPUT0_LAYOUT_OS_IS_ZYX_ISA8_OSV8_ISV4 return GET_FILTER_OS_IS_ZYX_ISA8_OSV8_ISV4_INDEX(INPUT0, o, i, z, y, x); +#elif defined INPUT0_LAYOUT_OS_IS_YX_ISA8_OSV16_ISV4 + return GET_FILTER_OS_IS_YX_ISA8_OSV16_ISV4_INDEX(INPUT0, o, i, y, x); +#elif defined INPUT0_LAYOUT_OS_IS_ZYX_ISA8_OSV16_ISV4 + return GET_FILTER_OS_IS_ZYX_ISA8_OSV16_ISV4_INDEX(INPUT0, o, i, z, y, x); #elif defined INPUT0_LAYOUT_IS_O_YX_ISV32 return GET_FILTER_IS_O_YX_ISV32(INPUT0, o, i, y, x); #elif defined INPUT0_LAYOUT_IS_O32_YX_ISV32_SWIZZLED_BY_4 @@ -156,6 +160,10 @@ inline uint FUNC(get_output_index)(uint g, uint o, uint i, uint z, uint y, uint return GET_FILTER_OS_IS_YX_ISA8_OSV8_ISV4_INDEX(OUTPUT, o, i, y, x); #elif defined OUTPUT_LAYOUT_OS_IS_ZYX_ISA8_OSV8_ISV4 return GET_FILTER_OS_IS_ZYX_ISA8_OSV8_ISV4_INDEX(OUTPUT, o, i, z, y, x); +#elif defined OUTPUT_LAYOUT_OS_IS_YX_ISA8_OSV16_ISV4 + return GET_FILTER_OS_IS_YX_ISA8_OSV16_ISV4_INDEX(OUTPUT, o, i, y, x); +#elif defined OUTPUT_LAYOUT_OS_IS_ZYX_ISA8_OSV16_ISV4 + return GET_FILTER_OS_IS_ZYX_ISA8_OSV16_ISV4_INDEX(OUTPUT, o, i, z, y, x); #elif defined OUTPUT_LAYOUT_IS_O_YX_ISV32 return GET_FILTER_IS_O_YX_ISV32(OUTPUT, o, i, y, x); #elif defined OUTPUT_LAYOUT_IS_O32_YX_ISV32_SWIZZLED_BY_4 diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/kernel_selector_common.cpp b/inference-engine/thirdparty/clDNN/kernel_selector/core/kernel_selector_common.cpp index dab028ecbdc272..259a40bae623a2 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/kernel_selector_common.cpp +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/kernel_selector_common.cpp @@ -330,8 +330,10 @@ std::string toString(WeightsLayout layout) { case WeightsLayout::image_2d_weights_winograd_6x3_s1_xfbyb: return "IMAGE_2D_WEIGHTS_WINOGRAD_6x3_S1_XFBYB"; case WeightsLayout::dlstm_dir_io: return "DLSTM_DIR_IO"; case WeightsLayout::os_is_yx_isa8_osv8_isv4: return "OS_IS_YX_ISA8_OSV8_ISV4"; + case WeightsLayout::os_is_yx_isa8_osv16_isv4: return "OS_IS_YX_ISA8_OSV16_ISV4"; case WeightsLayout::os_is_yx_isa8_osv8_isv4_swizzled_by_4: return "OS_IS_YX_ISA8_OSV8_ISV4_SWIZZLED_BY_4"; case WeightsLayout::os_is_zyx_isa8_osv8_isv4: return "OS_IS_ZYX_ISA8_OSV8_ISV4"; + case WeightsLayout::os_is_zyx_isa8_osv16_isv4: return "OS_IS_ZYX_ISA8_OSV16_ISV4"; case WeightsLayout::os_is_yx_osa4_isa8_osv8_isv4_swizzled_by_4: return "OS_IS_YX_OSA4_ISA8_OSV8_ISV4_SWIZZLED_BY_4"; case WeightsLayout::os_is_zyx_osa4_isa8_osv8_isv4_swizzled_by_4: return "OS_IS_ZYX_OSA4_ISA8_OSV8_ISV4_SWIZZLED_BY_4"; case WeightsLayout::is_o_yx_isv32: return "IS_O_YX_ISV32"; diff --git a/inference-engine/thirdparty/clDNN/src/include/to_string_utils.h b/inference-engine/thirdparty/clDNN/src/include/to_string_utils.h index 0ffdc56208ee20..53f4317f11e774 100644 --- a/inference-engine/thirdparty/clDNN/src/include/to_string_utils.h +++ b/inference-engine/thirdparty/clDNN/src/include/to_string_utils.h @@ -144,8 +144,12 @@ inline std::string fmt_to_str(format fmt) { return "os_is_yx_isv16_osv16"; case format::os_is_yx_isa8_osv8_isv4: return "os_is_yx_isa8_osv8_isv4"; + case format::os_is_yx_isa8_osv16_isv4: + return "os_is_yx_isa8_osv16_isv4"; case format::os_is_zyx_isa8_osv8_isv4: return "os_is_zyx_isa8_osv8_isv4"; + case format::os_is_zyx_isa8_osv16_isv4: + return "os_is_zyx_isa8_osv16_isv4"; case format::os_is_yx_osa4_isa8_osv8_isv4_swizzled_by_4: return "os_is_yx_osa4_isa8_osv8_isv4_swizzled_by_4"; case format::os_is_zyx_osa4_isa8_osv8_isv4_swizzled_by_4: diff --git a/inference-engine/thirdparty/clDNN/src/kernel_selector_helper.cpp b/inference-engine/thirdparty/clDNN/src/kernel_selector_helper.cpp index 542f842aff060d..593ac0b03751ce 100644 --- a/inference-engine/thirdparty/clDNN/src/kernel_selector_helper.cpp +++ b/inference-engine/thirdparty/clDNN/src/kernel_selector_helper.cpp @@ -238,8 +238,12 @@ kernel_selector::weights_layout to_weights_layout(format f) { return kernel_selector::weights_layout::image_2d_weights_winograd_6x3_s1_xfbyb; case format::os_is_yx_isa8_osv8_isv4: return kernel_selector::weights_layout::os_is_yx_isa8_osv8_isv4; + case format::os_is_yx_isa8_osv16_isv4: + return kernel_selector::weights_layout::os_is_yx_isa8_osv16_isv4; case format::os_is_zyx_isa8_osv8_isv4: return kernel_selector::weights_layout::os_is_zyx_isa8_osv8_isv4; + case format::os_is_zyx_isa8_osv16_isv4: + return kernel_selector::weights_layout::os_is_zyx_isa8_osv16_isv4; case format::os_is_yx_osa4_isa8_osv8_isv4_swizzled_by_4: return kernel_selector::weights_layout::os_is_yx_osa4_isa8_osv8_isv4_swizzled_by_4; case format::os_is_zyx_osa4_isa8_osv8_isv4_swizzled_by_4: @@ -390,6 +394,10 @@ cldnn::format::type from_weights_layout(kernel_selector::weights_layout l) { return cldnn::format::os_is_yx_isa8_osv8_isv4; case kernel_selector::weights_layout::os_is_zyx_isa8_osv8_isv4: return cldnn::format::os_is_zyx_isa8_osv8_isv4; + case kernel_selector::weights_layout::os_is_yx_isa8_osv16_isv4: + return cldnn::format::os_is_yx_isa8_osv16_isv4; + case kernel_selector::weights_layout::os_is_zyx_isa8_osv16_isv4: + return cldnn::format::os_is_zyx_isa8_osv16_isv4; case kernel_selector::weights_layout::os_is_yx_osa4_isa8_osv8_isv4_swizzled_by_4: return cldnn::format::os_is_yx_osa4_isa8_osv8_isv4_swizzled_by_4; case kernel_selector::weights_layout::os_is_zyx_osa4_isa8_osv8_isv4_swizzled_by_4: From 578ea2fc3c766f54324623486083bd0441f25c2b Mon Sep 17 00:00:00 2001 From: Andrew Bakalin Date: Fri, 11 Dec 2020 12:29:16 +0300 Subject: [PATCH 059/244] [IE][VPU]: Support dynamic data in Broadcast DTS (#3548) Ticket - #-44546 Changes: * Support dynamic data as broadcast input in Broadcast DTS * Update DTS tests to support both dynamic and static inputs * Update inference tests: a) Refactor tests to have only one testing class - NonZero_Broadcast b) Make DSR_TestsCommon base class to reuse createInputSubgraphWithDSR and inputs generating utils. c) Add possibility to add additional results in DSR_TestsCommon, because NonZero doesn't support cases when both its outputs are unused, so we need to add at least one of them to function results. --- .../dynamic_to_static_shape_broadcast.cpp | 32 ++-- .../dynamic_to_static_shape_broadcast.cpp | 161 +++++++++++++----- .../subgraph_tests/dsr_tests_common.hpp | 2 + .../subgraph_tests/nonzero_broadcast.cpp | 146 ++++++---------- 4 files changed, 190 insertions(+), 151 deletions(-) diff --git a/inference-engine/src/vpu/common/src/ngraph/transformations/dynamic_to_static_shape_broadcast.cpp b/inference-engine/src/vpu/common/src/ngraph/transformations/dynamic_to_static_shape_broadcast.cpp index 15a0b0c2c05b33..890929b8b665a6 100644 --- a/inference-engine/src/vpu/common/src/ngraph/transformations/dynamic_to_static_shape_broadcast.cpp +++ b/inference-engine/src/vpu/common/src/ngraph/transformations/dynamic_to_static_shape_broadcast.cpp @@ -45,23 +45,19 @@ void dynamicToStaticShapeBroadcast(std::shared_ptr target) { std::shared_ptr dsr; if (broadcast->get_broadcast_spec() == ngraph::op::BroadcastType::BIDIRECTIONAL) { - const auto inputShape = broadcast->get_input_shape(0); + const auto dataDSR = ngraph::as_type_ptr(broadcast->input_value(0).get_node_shared_ptr()); + const auto shapeElementType = dataDSR ? dataDSR->get_input_element_type(1) : broadcast->get_input_element_type(1); + const auto dataShape = dataDSR ? dataDSR->input_value(1) : shapeToConstant(shapeElementType, broadcast->get_input_shape(0)); const auto targetShape = broadcast->input_value(1).get_node_shared_ptr(); - const auto shapeType = targetShape->get_element_type(); - const auto inputShapeDimsCount = inputShape.size(); + const auto dataShapeDimsCount = ngraph::shape_size(dataShape.get_shape()); const auto targetShapeDimsCount = ngraph::shape_size(broadcast->get_input_partial_shape(1).get_shape()); - const auto inputShapeConst = std::make_shared( - shapeType, - ngraph::Shape{static_cast(inputShapeDimsCount)}, - inputShape); - - const auto minRank = std::min(inputShapeDimsCount, targetShapeDimsCount); - const auto maxRank = std::max(inputShapeDimsCount, targetShapeDimsCount); - const auto minRankNode = minRank == inputShapeDimsCount ? inputShapeConst : targetShape; - const auto maxRankNode = minRank == inputShapeDimsCount ? targetShape : inputShapeConst; + const auto minRank = std::min(dataShapeDimsCount, targetShapeDimsCount); + const auto maxRank = std::max(dataShapeDimsCount, targetShapeDimsCount); + const auto minRankNode = minRank == dataShapeDimsCount ? dataShape : targetShape; + const auto maxRankNode = minRank == dataShapeDimsCount ? targetShape : dataShape; ngraph::NodeVector dims; @@ -69,19 +65,19 @@ void dynamicToStaticShapeBroadcast(std::shared_ptr target) { dims.push_back( std::make_shared( maxRankNode, - ngraph::opset5::Constant::create(shapeType, ngraph::Shape{1}, {i}), - ngraph::opset5::Constant::create(shapeType, ngraph::Shape{1}, {0}))); + ngraph::opset5::Constant::create(shapeElementType, ngraph::Shape{1}, {i}), + ngraph::opset5::Constant::create(shapeElementType, ngraph::Shape{1}, {0}))); } for (int i = 0; i < minRank; i++) { const auto minRankDim = std::make_shared( minRankNode, - ngraph::opset5::Constant::create(shapeType, ngraph::Shape{1}, {i}), - ngraph::opset5::Constant::create(shapeType, ngraph::Shape{1}, {0})); + ngraph::opset5::Constant::create(shapeElementType, ngraph::Shape{1}, {i}), + ngraph::opset5::Constant::create(shapeElementType, ngraph::Shape{1}, {0})); const auto maxRankDim = std::make_shared( maxRankNode, - ngraph::opset5::Constant::create(shapeType, ngraph::Shape{1}, {maxRank - minRank + i}), - ngraph::opset5::Constant::create(shapeType, ngraph::Shape{1}, {0})); + ngraph::opset5::Constant::create(shapeElementType, ngraph::Shape{1}, {maxRank - minRank + i}), + ngraph::opset5::Constant::create(shapeElementType, ngraph::Shape{1}, {0})); dims.push_back(std::make_shared(minRankDim, maxRankDim)); } diff --git a/inference-engine/tests/functional/plugin/myriad/ngraph/transformations/dynamic_to_static_shape_broadcast.cpp b/inference-engine/tests/functional/plugin/myriad/ngraph/transformations/dynamic_to_static_shape_broadcast.cpp index c8755b7e23885a..7c7996da502401 100644 --- a/inference-engine/tests/functional/plugin/myriad/ngraph/transformations/dynamic_to_static_shape_broadcast.cpp +++ b/inference-engine/tests/functional/plugin/myriad/ngraph/transformations/dynamic_to_static_shape_broadcast.cpp @@ -6,6 +6,7 @@ #include "vpu/ngraph/transformations/dynamic_to_static_shape.hpp" #include "vpu/ngraph/operations/static_shape_broadcast.hpp" #include "vpu/ngraph/operations/dynamic_shape_resolver.hpp" +#include "vpu/ngraph/utilities.hpp" #include #include @@ -26,12 +27,22 @@ using TensorType = ngraph::element::Type; using TensorShape = ngraph::PartialShape; using AxesMapping = std::vector; +enum class BroadcastInputType { + DYNAMIC, + STATIC +}; + struct BroadcastShapes { TensorShape srcShape; TensorShape targetShape; AxesMapping axesMapping; }; -using BroadcastTestParams = std::tuple; + +using BroadcastTestParams = std::tuple< + TensorType, + TensorType, + BroadcastShapes, + BroadcastInputType>; class DynamicToStaticShapeBroadcastExplicitTests : public CommonTestUtils::TestsCommon, @@ -39,38 +50,53 @@ class DynamicToStaticShapeBroadcastExplicitTests public: void SetUp() override { const auto& parameters = GetParam(); - const auto& tensorType = std::get<0>(parameters); - const auto& tensorShape = std::get<1>(parameters).srcShape; - const auto& targetShape = std::get<1>(parameters).targetShape; - const auto& axesMapping = std::get<1>(parameters).axesMapping; + const auto& tensorType = std::get<0>(parameters); + const auto& shapeType = std::get<1>(parameters); + const auto& tensorShape = std::get<2>(parameters).srcShape; + const auto& targetShape = std::get<2>(parameters).targetShape; + const auto& axesMapping = std::get<2>(parameters).axesMapping; + const auto& broadcastInputType = std::get<3>(parameters); ngraph::helpers::CompareFunctions( - *transform(tensorType, tensorShape, targetShape, axesMapping), - *reference(tensorType, tensorShape, targetShape, axesMapping)); + *transform(tensorType, shapeType, tensorShape, targetShape, axesMapping, broadcastInputType), + *reference(tensorType, shapeType, tensorShape, targetShape, axesMapping, broadcastInputType)); } protected: std::shared_ptr transform( const TensorType& tensorType, + const TensorType& shapeType, const TensorShape& tensorShape, const TensorShape& targetShape, - const AxesMapping& axesMapping) const { + const AxesMapping& axesMapping, + BroadcastInputType broadcastInputType) const { const auto tensorParam = std::make_shared(tensorType, tensorShape); const auto tensorWithTargetShapeParam = std::make_shared(tensorType, targetShape); - const auto shapeOfNode = std::make_shared(tensorWithTargetShapeParam); + const auto shapeOfNode = std::make_shared(tensorWithTargetShapeParam, shapeType); shapeOfNode->set_is_foldable(false); + ngraph::ParameterVector params{tensorParam, tensorWithTargetShapeParam}; + + std::shared_ptr broadcastInput = tensorParam; + if (broadcastInputType == BroadcastInputType::DYNAMIC) { + const auto shapeParam = std::make_shared( + shapeType, + ngraph::Shape{static_cast(tensorShape.rank().get_length())}); + params.push_back(shapeParam); + broadcastInput = std::make_shared(tensorParam, shapeParam); + } + const auto axesMappingConstant = std::make_shared( ngraph::element::u64, ngraph::Shape{axesMapping.size()}, axesMapping); - const auto broadcast = std::make_shared(tensorParam, shapeOfNode, axesMappingConstant); + const auto broadcast = std::make_shared(broadcastInput, shapeOfNode, axesMappingConstant); auto function = std::make_shared( ngraph::NodeVector{broadcast}, - ngraph::ParameterVector{tensorParam, tensorWithTargetShapeParam}, + params, "Actual"); // We need to set broadcast output shape to make its rank static. @@ -87,24 +113,37 @@ class DynamicToStaticShapeBroadcastExplicitTests std::shared_ptr reference( const TensorType& tensorType, + const TensorType& shapeType, const TensorShape& tensorShape, const TensorShape& targetShape, - const AxesMapping& axesMapping) const { + const AxesMapping& axesMapping, + BroadcastInputType broadcastInputType) const { const auto tensorParam = std::make_shared(tensorType, tensorShape); const auto tensorWithTargetShapeParam = std::make_shared(tensorType, targetShape); - const auto shapeOf = std::make_shared(tensorWithTargetShapeParam); + const auto shapeOf = std::make_shared(tensorWithTargetShapeParam, shapeType); + + ngraph::ParameterVector params{tensorParam, tensorWithTargetShapeParam}; + + std::shared_ptr broadcastInput = tensorParam; + if (broadcastInputType == BroadcastInputType::DYNAMIC) { + const auto shapeParam = std::make_shared( + shapeType, + ngraph::Shape{static_cast(tensorShape.rank().get_length())}); + params.push_back(shapeParam); + broadcastInput = std::make_shared(tensorParam, shapeParam); + } const auto axesMappingConstant = std::make_shared( - ngraph::element::u64, + ngraph::element::i64, ngraph::Shape{axesMapping.size()}, axesMapping); - const auto staticShapeBroadcast = std::make_shared(tensorParam, shapeOf, axesMappingConstant); + const auto staticShapeBroadcast = std::make_shared(broadcastInput, shapeOf, axesMappingConstant); const auto dsrOut = std::make_shared(staticShapeBroadcast, shapeOf); return std::make_shared( ngraph::NodeVector{dsrOut}, - ngraph::ParameterVector{tensorParam, tensorWithTargetShapeParam}, + params, "Expected"); } }; @@ -119,9 +158,15 @@ INSTANTIATE_TEST_CASE_P(smoke_NGraph, DynamicToStaticShapeBroadcastExplicitTests ngraph::element::i32, ngraph::element::i64, ngraph::element::u8), + testing::Values( + ngraph::element::i32, + ngraph::element::i64), testing::Values( BroadcastShapes{TensorShape{16}, TensorShape{1, 16, 50, 50}, AxesMapping{1}}, - BroadcastShapes{TensorShape{50, 50}, TensorShape{1, 50, 50, 16}, AxesMapping{1, 2}}) + BroadcastShapes{TensorShape{50, 50}, TensorShape{1, 50, 50, 16}, AxesMapping{1, 2}}), + testing::Values( + BroadcastInputType::DYNAMIC, + BroadcastInputType::STATIC) )); @@ -130,31 +175,46 @@ class DynamicToStaticShapeBroadcastBidirectionalTests : public CommonTestUtils:: public: void SetUp() override { const auto& parameters = GetParam(); - const auto& tensorType = std::get<0>(parameters); - const auto& tensorShape = std::get<1>(parameters).srcShape; - const auto& targetShape = std::get<1>(parameters).targetShape; + const auto& tensorType = std::get<0>(parameters); + const auto& shapeType = std::get<1>(parameters); + const auto& tensorShape = std::get<2>(parameters).srcShape; + const auto& targetShape = std::get<2>(parameters).targetShape; + const auto& broadcastInputType = std::get<3>(parameters); ngraph::helpers::CompareFunctions( - *transform(tensorType, tensorShape, targetShape), - *reference(tensorType, tensorShape, targetShape)); + *transform(tensorType, shapeType, tensorShape, targetShape, broadcastInputType), + *reference(tensorType, shapeType, tensorShape, targetShape, broadcastInputType)); } protected: std::shared_ptr transform( const TensorType& tensorType, + const TensorType& shapeType, const TensorShape& tensorShape, - const TensorShape& targetShape) const { + const TensorShape& targetShape, + BroadcastInputType broadcastInputType) const { const auto tensorParam = std::make_shared(tensorType, tensorShape); - const auto tensorWithTargetShapeParam = std::make_shared(tensorType, targetShape); + const auto tensorWithTargetShapeParam = std::make_shared(shapeType, targetShape); - const auto shapeOfNode = std::make_shared(tensorWithTargetShapeParam); + const auto shapeOfNode = std::make_shared(tensorWithTargetShapeParam, shapeType); shapeOfNode->set_is_foldable(false); - const auto broadcast = std::make_shared(tensorParam, shapeOfNode, ngraph::op::BroadcastType::BIDIRECTIONAL); + ngraph::ParameterVector params{tensorParam, tensorWithTargetShapeParam}; + + std::shared_ptr broadcastInput = tensorParam; + if (broadcastInputType == BroadcastInputType::DYNAMIC) { + const auto shapeParam = std::make_shared( + shapeType, + ngraph::Shape{static_cast(tensorShape.rank().get_length())}); + params.push_back(shapeParam); + broadcastInput = std::make_shared(tensorParam, shapeParam); + } + + const auto broadcast = std::make_shared(broadcastInput, shapeOfNode, ngraph::op::BroadcastType::BIDIRECTIONAL); auto function = std::make_shared( ngraph::NodeVector{broadcast}, - ngraph::ParameterVector{tensorParam, tensorWithTargetShapeParam}, + params, "Actual"); const auto transformations = vpu::Transformations{{ngraph::opset5::Broadcast::type_info, vpu::dynamicToStaticShapeBroadcast}}; @@ -164,29 +224,41 @@ class DynamicToStaticShapeBroadcastBidirectionalTests : public CommonTestUtils:: std::shared_ptr reference( const TensorType& tensorType, + const TensorType& shapeType, const TensorShape& tensorShape, - const TensorShape& targetShape) const { + const TensorShape& targetShape, + BroadcastInputType broadcastInputType) const { const auto tensorParam = std::make_shared(tensorType, tensorShape); - const auto tensorWithTargetShapeParam = std::make_shared(tensorType, targetShape); - std::shared_ptr shapeOf = std::make_shared(tensorWithTargetShapeParam); + const auto tensorWithTargetShapeParam = std::make_shared(shapeType, targetShape); + std::shared_ptr shapeOf = std::make_shared(tensorWithTargetShapeParam, shapeType); + + ngraph::ParameterVector params{tensorParam, tensorWithTargetShapeParam}; + + std::shared_ptr broadcastInput = tensorParam; + if (broadcastInputType == BroadcastInputType::DYNAMIC) { + const auto shapeParam = std::make_shared( + shapeType, + ngraph::Shape{static_cast(tensorShape.rank().get_length())}); + params.push_back(shapeParam); + broadcastInput = std::make_shared(tensorParam, shapeParam); + } const auto staticShapeBroadcast = std::make_shared( - tensorParam, + broadcastInput, shapeOf, ngraph::op::BroadcastType::BIDIRECTIONAL); const auto tensorShapeDimsCount = tensorShape.rank().get_length(); const auto targetShapeDimsCount = targetShape.rank().get_length(); - std::shared_ptr tensorShapeConst = std::make_shared( - ngraph::element::i64, - ngraph::Shape{static_cast(tensorShapeDimsCount)}, - tensorShape.get_shape()); + const auto tensorShapeNode = broadcastInputType == BroadcastInputType::DYNAMIC ? + staticShapeBroadcast->input_value(0).get_node_shared_ptr()->input_value(1) : + vpu::shapeToConstant(shapeType, tensorShape.get_shape()); - const auto maxRankNode = tensorShapeDimsCount > targetShapeDimsCount ? tensorShapeConst : shapeOf; - const auto minRankNode = maxRankNode == tensorShapeConst ? shapeOf : tensorShapeConst; - const auto maxRank = maxRankNode == tensorShapeConst ? tensorShapeDimsCount : targetShapeDimsCount; - const auto minRank = minRankNode == tensorShapeConst ? tensorShapeDimsCount : targetShapeDimsCount; + const auto maxRankNode = tensorShapeDimsCount > targetShapeDimsCount ? tensorShapeNode : shapeOf; + const auto minRankNode = maxRankNode == tensorShapeNode ? shapeOf : tensorShapeNode; + const auto maxRank = maxRankNode == tensorShapeNode ? tensorShapeDimsCount : targetShapeDimsCount; + const auto minRank = minRankNode == tensorShapeNode ? tensorShapeDimsCount : targetShapeDimsCount; ngraph::NodeVector dims; @@ -216,7 +288,7 @@ class DynamicToStaticShapeBroadcastBidirectionalTests : public CommonTestUtils:: staticShapeBroadcast->output(0), outShape); return std::make_shared( ngraph::NodeVector{dsrOut}, - ngraph::ParameterVector{tensorParam, tensorWithTargetShapeParam}, + params, "Expected"); } }; @@ -231,14 +303,19 @@ INSTANTIATE_TEST_CASE_P(smoke_NGraph, DynamicToStaticShapeBroadcastBidirectional ngraph::element::i32, ngraph::element::i64, ngraph::element::u8), + testing::Values( + ngraph::element::i32, + ngraph::element::i64), testing::Values( BroadcastShapes{TensorShape{1, 1, 4}, TensorShape{300, 2, 4}, {}}, BroadcastShapes{TensorShape{15, 1}, TensorShape{2, 16, 15, 14}, {}}, BroadcastShapes{TensorShape{2, 16, 15, 14}, TensorShape{15, 14}, {}}, BroadcastShapes{TensorShape{2, 16, 15, 14}, TensorShape{16, 1, 1}, {}}, BroadcastShapes{TensorShape{2, 16, 15, 14}, TensorShape{16, 1, 14}, {}}, - BroadcastShapes{TensorShape{16, 15, 1}, TensorShape{2, 1, 15, 14}, {}}) - + BroadcastShapes{TensorShape{16, 15, 1}, TensorShape{2, 1, 15, 14}, {}}), + testing::Values( + BroadcastInputType::DYNAMIC, + BroadcastInputType::STATIC) )); } // namespace diff --git a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_tests_common.hpp b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_tests_common.hpp index dc0d6ab8993f24..6a68373c3db489 100644 --- a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_tests_common.hpp +++ b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_tests_common.hpp @@ -29,6 +29,7 @@ class DSR_TestsCommon : virtual public LayerTestsUtils::LayerTestsCommon { protected: std::unordered_map m_shapes; ngraph::ParameterVector m_parameterVector; + ngraph::ResultVector m_additionalResults; std::shared_ptr createParameter( const ngraph::element::Type& element_type, @@ -69,6 +70,7 @@ class DSR_TestsCommon : virtual public LayerTestsUtils::LayerTestsCommon { for (const auto& output : testedOp->outputs()) { results.emplace_back(std::make_shared(output)); } + results.insert(results.end(), m_additionalResults.begin(), m_additionalResults.end()); function = std::make_shared( results, diff --git a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/nonzero_broadcast.cpp b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/nonzero_broadcast.cpp index 5b62d681dd69de..be8c4b4c1cd511 100644 --- a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/nonzero_broadcast.cpp +++ b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/nonzero_broadcast.cpp @@ -15,7 +15,7 @@ using TensorType = ngraph::element::Type; using TensorShape = ngraph::Shape; struct BroadcastInputParams { - TensorShape inputShape; + DataShapeWithUpperBound inputShape; DataShapeWithUpperBound targetShape; InferenceEngine::SizeVector axesMapping; }; @@ -24,8 +24,8 @@ using BroadcastTestParams = std::tuple< BroadcastInputParams, TensorType, LayerTestsUtils::TargetDevice>; -class NonZero_BroadcastBidirectional : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { +class NonZero_Broadcast : public testing::WithParamInterface, + public DSR_TestsCommon { protected: size_t getDynamicAxis(const DataShape& shapeA, const DataShape& shapeB) const { size_t res = 0; @@ -35,9 +35,7 @@ class NonZero_BroadcastBidirectional : public testing::WithParamInterface createTestedOp() override { const auto& parameters = GetParam(); const auto& broadcastParams = std::get<0>(parameters); const auto& tensorType = std::get<1>(parameters); @@ -48,133 +46,99 @@ class NonZero_BroadcastBidirectional : public testing::WithParamInterface(tensorType, TensorShape{upperBoundShape[dynamicAxis]}); - m_nonZero = std::make_shared(m_param); - const auto shapeOfNonZero = std::make_shared(m_nonZero); + const auto& nonZeroParam = createParameter(tensorType, TensorShape{upperBoundShape[dynamicAxis]}); + const auto& nonZero = std::make_shared(nonZeroParam, ngraph::element::i32); + m_additionalResults.push_back(std::make_shared(nonZero->output(0))); + const auto shapeOfNonZero = std::make_shared(nonZero, ngraph::element::i32); const auto numNonZeros = std::make_shared( shapeOfNonZero, ngraph::opset5::Constant::create(ngraph::element::i64, ngraph::Shape{1}, {1}), ngraph::opset5::Constant::create(ngraph::element::i64, ngraph::Shape{1}, {0})); - m_broadcastTargetShape = numNonZeros; + std::shared_ptr broadcastTargetShape = numNonZeros; if (dynamicAxis > 0) { - m_broadcastTargetShape = std::make_shared( + broadcastTargetShape = std::make_shared( ngraph::NodeVector{ ngraph::opset5::Constant::create( - ngraph::element::i64, + ngraph::element::i32, ngraph::Shape{dynamicAxis}, std::vector{upperBoundShape.begin(), upperBoundShape.begin() + dynamicAxis}), - m_broadcastTargetShape}, + broadcastTargetShape}, 0); } if (dynamicAxis < upperBoundShape.size() - 1) { - m_broadcastTargetShape = std::make_shared( + broadcastTargetShape = std::make_shared( ngraph::NodeVector{ - m_broadcastTargetShape, + broadcastTargetShape, ngraph::opset5::Constant::create( - ngraph::element::i64, + ngraph::element::i32, ngraph::Shape{upperBoundShape.size() - dynamicAxis - 1}, std::vector{upperBoundShape.begin() + dynamicAxis + 1, upperBoundShape.end()})}, 0); } - m_broadcastInput = ngraph::builder::makeConstant(tensorType, ngraph::Shape{broadcastParams.inputShape}, std::vector{}, true); - } + const auto& broadcastInput = broadcastParams.inputShape.upperBoundShape.size() ? + createInputSubgraphWithDSR(tensorType, broadcastParams.inputShape) : + ngraph::builder::makeConstant(tensorType, ngraph::Shape{broadcastParams.inputShape.shape}, std::vector{}, true); - void SetUp() override { - prepareBroadcastInputs(); + if (broadcastParams.axesMapping.size() != 0) { + const auto& axesMapping = std::get<0>(GetParam()).axesMapping; + const auto axesMappingConst = ngraph::opset5::Constant::create(ngraph::element::i64, ngraph::Shape{axesMapping.size()}, axesMapping); - const auto broadcast = std::make_shared(m_broadcastInput, m_broadcastTargetShape, ngraph::op::BroadcastType::BIDIRECTIONAL); + return std::make_shared(broadcastInput, broadcastTargetShape, axesMappingConst); + } - function = std::make_shared( - ngraph::NodeVector{broadcast, m_nonZero}, - ngraph::ParameterVector{m_param}, - "NonZero-Broadcast"); + return std::make_shared(broadcastInput, broadcastTargetShape, ngraph::op::BroadcastType::BIDIRECTIONAL); } InferenceEngine::Blob::Ptr GenerateInput(const InferenceEngine::InputInfo& info) const override { - // We emulate dynamic shape through the number of non-zeros in NonZero input tensor - const auto& broadcastParams = std::get<0>(GetParam()); - const auto numNonZeros = broadcastParams.targetShape.shape[getDynamicAxis( - broadcastParams.targetShape.upperBoundShape, - broadcastParams.targetShape.shape)]; - - auto tensorDesc = info.getTensorDesc(); - auto blob = make_blob_with_precision(tensorDesc); - blob->allocate(); - CommonTestUtils::fill_data_const(blob, 0); - - InferenceEngine::SizeVector newDims = {numNonZeros}; - blob->getTensorDesc().setDims(newDims); - CommonTestUtils::fill_data_const(blob, 1); - - blob->getTensorDesc().setDims(tensorDesc.getDims()); + if (info.name() == m_parameterVector.front()->get_friendly_name()) { + // We emulate dynamic target shape through the number of non-zeros in NonZero input tensor + const auto &broadcastParams = std::get<0>(GetParam()); + const auto numNonZeros = broadcastParams.targetShape.shape[getDynamicAxis( + broadcastParams.targetShape.upperBoundShape, + broadcastParams.targetShape.shape)]; - return blob; - } + auto tensorDesc = info.getTensorDesc(); + auto blob = make_blob_with_precision(tensorDesc); + blob->allocate(); + CommonTestUtils::fill_data_const(blob, 0); -protected: - std::shared_ptr m_broadcastInput; - std::shared_ptr m_broadcastTargetShape; - std::shared_ptr m_nonZero; - std::shared_ptr m_param; -}; + InferenceEngine::SizeVector newDims = {numNonZeros}; + blob->getTensorDesc().setDims(newDims); + CommonTestUtils::fill_data_const(blob, 1); -TEST_P(NonZero_BroadcastBidirectional, CompareWithReference) { - Run(); -} + blob->getTensorDesc().setDims(tensorDesc.getDims()); -std::vector broadcastBidirectionalTestParams = { - { {1, 1, 4}, DataShapeWithUpperBound{ {200, 2, 4}, {300, 2, 4} }, {} }, - { {15, 14}, DataShapeWithUpperBound{ {2, 16, 1, 14}, {2, 16, 15, 14} }, {} }, - { {15, 1}, DataShapeWithUpperBound{ {1, 16, 15, 14}, {2, 16, 15, 14} }, {} }, - { {2, 16, 15, 14}, DataShapeWithUpperBound{ {1, 15, 14}, {16, 15, 14} }, {} }, - { {2, 16, 15, 14}, DataShapeWithUpperBound{ {16, 1, 1}, {16, 1, 14}}, {} }, - { {16, 15, 1}, DataShapeWithUpperBound{ {2, 1, 15, 14}, {2, 16, 15, 14} }, {} }, -}; - -INSTANTIATE_TEST_CASE_P(smoke_DynamicBroadcast, NonZero_BroadcastBidirectional, - ::testing::Combine( - ::testing::ValuesIn(broadcastBidirectionalTestParams), - ::testing::Values(ngraph::element::f16, ngraph::element::f32, ngraph::element::i32), - ::testing::Values(CommonTestUtils::DEVICE_MYRIAD))); - -using BroadcastExplicitTestParams = std::tuple< - BroadcastTestParams, TensorShape, TensorType, LayerTestsUtils::TargetDevice>; - -class NonZero_BroadcastExplicit : public NonZero_BroadcastBidirectional { -protected: - void SetUp() override { - prepareBroadcastInputs(); - - const auto& axesMapping = std::get<0>(GetParam()).axesMapping; - const auto axesMappingConst = ngraph::opset5::Constant::create(ngraph::element::i64, ngraph::Shape{axesMapping.size()}, axesMapping); - - const auto broadcast = std::make_shared(m_broadcastInput, m_broadcastTargetShape, axesMappingConst); + return blob; + } - function = std::make_shared( - ngraph::NodeVector{broadcast, m_nonZero}, - ngraph::ParameterVector{m_param}, - "NonZero-Broadcast"); + return DSR_TestsCommon::GenerateInput(info); } }; -TEST_P(NonZero_BroadcastExplicit, CompareWithReference) { +TEST_P(NonZero_Broadcast, CompareWithReference) { Run(); } -std::vector broadcastExplicitTestParams = { - { {1}, DataShapeWithUpperBound{ {1, 800}, {1, 1000} }, {0} }, - { {4}, DataShapeWithUpperBound{ {100, 4}, {1000, 4} }, {1} }, - { {128, 256}, DataShapeWithUpperBound{ {1, 128, 256}, {3, 128, 256} }, {1, 2} }, +std::vector broadcastTestParams = { + { DataShapeWithUpperBound{ {1, 1, 4}, {} }, DataShapeWithUpperBound{ {200, 2, 4}, {300, 2, 4} }, {} }, + { DataShapeWithUpperBound{ {15, 14}, {} }, DataShapeWithUpperBound{ {2, 16, 1, 14}, {2, 16, 15, 14} }, {} }, + { DataShapeWithUpperBound{ {15, 1}, {} }, DataShapeWithUpperBound{ {1, 16, 15, 14}, {2, 16, 15, 14} }, {} }, + { DataShapeWithUpperBound{ {2, 16, 15, 14}, {} }, DataShapeWithUpperBound{ {1, 15, 14}, {16, 15, 14} }, {} }, + { DataShapeWithUpperBound{ {2, 16, 15, 14}, {} }, DataShapeWithUpperBound{ {16, 1, 1}, {16, 1, 14}}, {} }, + { DataShapeWithUpperBound{ {16, 15, 1}, {} }, DataShapeWithUpperBound{ {2, 1, 15, 14}, {2, 16, 15, 14} }, {} }, + { DataShapeWithUpperBound{ {142, 1, 1, 64}, {300, 1, 1, 64} }, DataShapeWithUpperBound { {142, 3, 64, 64}, {300, 3, 64, 64} }, {} }, + { DataShapeWithUpperBound{ {1}, {} }, DataShapeWithUpperBound{ {1, 800}, {1, 1000} }, {0} }, + { DataShapeWithUpperBound{ {4}, {} }, DataShapeWithUpperBound{ {100, 4}, {1000, 4} }, {1} }, + { DataShapeWithUpperBound{ {128, 256}, {} }, DataShapeWithUpperBound{ {1, 128, 256}, {3, 128, 256} }, {1, 2} }, }; -INSTANTIATE_TEST_CASE_P(smoke_DynamicBroadcast, NonZero_BroadcastExplicit, +INSTANTIATE_TEST_CASE_P(smoke_DynamicBroadcast, NonZero_Broadcast, ::testing::Combine( - ::testing::ValuesIn(broadcastExplicitTestParams), + ::testing::ValuesIn(broadcastTestParams), ::testing::Values(ngraph::element::f16, ngraph::element::f32, ngraph::element::i32), ::testing::Values(CommonTestUtils::DEVICE_MYRIAD))); - } // namespace From a0952798bab2dfecab1ed602fd20f0539170bfdf Mon Sep 17 00:00:00 2001 From: Andrew Bakalin Date: Fri, 11 Dec 2020 12:30:15 +0300 Subject: [PATCH 060/244] [IE][VPU]: Extend StaticShapeBroadcast target shape evaluator (#3561) Ticket - #-42237 Add Unsqueeze, Equal and Select operations to the StaticShapeBroadcast target shape evaluator, because they are presented in the target shape subgraph evaluator in one of the network, we are currently enabling. --- .../src/vpu/common/src/ngraph/utilities.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/inference-engine/src/vpu/common/src/ngraph/utilities.cpp b/inference-engine/src/vpu/common/src/ngraph/utilities.cpp index 9bf6c21fb7d987..1ef247aa2ee7a6 100644 --- a/inference-engine/src/vpu/common/src/ngraph/utilities.cpp +++ b/inference-engine/src/vpu/common/src/ngraph/utilities.cpp @@ -49,13 +49,16 @@ ngraph::HostTensorVector evaluateOp(ngraph::Node* node, const ngraph::HostTensor std::vector evaluateTargetShape(const ngraph::Output& value) { static ngraph::Evaluator::op_handler_map handlers = { - {ngraph::opset3::ShapeOf::type_info, evaluateShapeOf}, - {ngraph::opset3::Constant::type_info, evaluateConstant}, - {ngraph::opset3::Gather::type_info, evaluateOp}, - {ngraph::opset3::Concat::type_info, evaluateOp}, - {ngraph::opset3::Reshape::type_info, evaluateOp}, - {ngraph::opset3::Multiply::type_info, evaluateOp}, - {ngraph::opset3::Squeeze::type_info, evaluateOp}, + {ngraph::opset3::ShapeOf::type_info, evaluateShapeOf}, + {ngraph::opset3::Constant::type_info, evaluateConstant}, + {ngraph::opset3::Gather::type_info, evaluateOp}, + {ngraph::opset3::Concat::type_info, evaluateOp}, + {ngraph::opset3::Reshape::type_info, evaluateOp}, + {ngraph::opset3::Multiply::type_info, evaluateOp}, + {ngraph::opset3::Squeeze::type_info, evaluateOp}, + {ngraph::opset5::Unsqueeze::type_info, evaluateOp}, + {ngraph::opset5::Equal::type_info, evaluateOp}, + {ngraph::opset5::Select::type_info, evaluateOp}, }; ngraph::Evaluator::value_map value_map; ngraph::Evaluator evaluator(handlers, value_map); From d90c05aab45d5bb9316dfe08c39fd4ceb7d34eef Mon Sep 17 00:00:00 2001 From: Andrew Bakalin Date: Fri, 11 Dec 2020 12:46:26 +0300 Subject: [PATCH 061/244] [IE][VPU][Tests]: Support DTS for ScatterElementsUpdate (#3559) * Enable DTS for ScatterElementsUpdate * Update DTS tests * Update inference tests --- .../dynamic_to_static_shape.cpp | 75 ++++++----- .../dynamic_to_static_shape_scatter.cpp | 126 ++++++++++++------ .../myriad/subgraph_tests/dsr_scatter.cpp | 6 + 3 files changed, 131 insertions(+), 76 deletions(-) diff --git a/inference-engine/src/vpu/common/src/ngraph/transformations/dynamic_to_static_shape.cpp b/inference-engine/src/vpu/common/src/ngraph/transformations/dynamic_to_static_shape.cpp index eef8903e35ee37..f0004f09616bce 100644 --- a/inference-engine/src/vpu/common/src/ngraph/transformations/dynamic_to_static_shape.cpp +++ b/inference-engine/src/vpu/common/src/ngraph/transformations/dynamic_to_static_shape.cpp @@ -89,43 +89,44 @@ void validateDynamicFunction(const ngraph::Function& function) { const Transformations& getDefaultTransformations() { static const Transformations transformations = { - {ngraph::opset3::Add::type_info, dynamicToStaticShapeBinaryEltwise}, - {ngraph::opset3::Multiply::type_info, dynamicToStaticShapeBinaryEltwise}, - {ngraph::opset3::Subtract::type_info, dynamicToStaticShapeBinaryEltwise}, - {ngraph::opset3::VariadicSplit::type_info, dynamicToStaticShapeVariadicSplit}, - {ngraph::opset3::Divide::type_info, dynamicToStaticShapeBinaryEltwise}, - {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::opset5::NonMaxSuppression::type_info, dynamicToStaticNonMaxSuppression}, - {ngraph::opset3::NonZero::type_info, dynamicToStaticShapeNonZero}, - {ngraph::opset3::TopK::type_info, dynamicToStaticShapeTopK}, - {ngraph::opset3::Transpose::type_info, dynamicToStaticShapeTranspose}, - {ngraph::opset3::Concat::type_info, dynamicToStaticShapeConcat}, - {ngraph::opset3::Convert::type_info, dynamicToStaticUnaryElementwise}, - {ngraph::opset3::Clamp::type_info, dynamicToStaticUnaryElementwise}, - {ngraph::opset3::Floor::type_info, dynamicToStaticUnaryElementwise}, - {ngraph::opset3::Log::type_info, dynamicToStaticUnaryElementwise}, - {ngraph::opset3::Relu::type_info, dynamicToStaticUnaryElementwise}, - {ngraph::opset3::ScatterUpdate::type_info, dynamicToStaticUnaryElementwise}, - {ngraph::opset3::Sigmoid::type_info, dynamicToStaticUnaryElementwise}, - {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}, - {ngraph::opset3::Unsqueeze::type_info, dynamicToStaticShapeUnsqueeze}, - {ngraph::opset3::ROIAlign::type_info, dynamicToStaticShapeROIAlign}, - {ngraph::opset3::Reshape::type_info, dynamicToStaticShapeReshape}, - {ngraph::opset3::Broadcast::type_info, dynamicToStaticShapeBroadcast}, - {ngraph::opset3::MatMul::type_info, dynamicToStaticShapeMatMul}, - {ngraph::opset5::Split::type_info, dynamicToStaticShapeSplit}, - {ngraph::opset5::GatherND::type_info, dynamicToStaticShapeGatherND}, + {ngraph::opset3::Add::type_info, dynamicToStaticShapeBinaryEltwise}, + {ngraph::opset3::Multiply::type_info, dynamicToStaticShapeBinaryEltwise}, + {ngraph::opset3::Subtract::type_info, dynamicToStaticShapeBinaryEltwise}, + {ngraph::opset3::VariadicSplit::type_info, dynamicToStaticShapeVariadicSplit}, + {ngraph::opset3::Divide::type_info, dynamicToStaticShapeBinaryEltwise}, + {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::opset5::NonMaxSuppression::type_info, dynamicToStaticNonMaxSuppression}, + {ngraph::opset3::NonZero::type_info, dynamicToStaticShapeNonZero}, + {ngraph::opset3::TopK::type_info, dynamicToStaticShapeTopK}, + {ngraph::opset3::Transpose::type_info, dynamicToStaticShapeTranspose}, + {ngraph::opset3::Concat::type_info, dynamicToStaticShapeConcat}, + {ngraph::opset3::Convert::type_info, dynamicToStaticUnaryElementwise}, + {ngraph::opset3::Clamp::type_info, dynamicToStaticUnaryElementwise}, + {ngraph::opset3::Floor::type_info, dynamicToStaticUnaryElementwise}, + {ngraph::opset3::Log::type_info, dynamicToStaticUnaryElementwise}, + {ngraph::opset3::Relu::type_info, dynamicToStaticUnaryElementwise}, + {ngraph::opset3::ScatterUpdate::type_info, dynamicToStaticUnaryElementwise}, + {ngraph::opset3::Sigmoid::type_info, dynamicToStaticUnaryElementwise}, + {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::opset5::ScatterElementsUpdate::type_info, dynamicToStaticUnaryElementwise}, + {ngraph::opset3::StridedSlice::type_info, dynamicToStaticShapeStridedSlice}, + {ngraph::opset3::Squeeze::type_info, dynamicToStaticShapeSqueeze}, + {ngraph::opset3::Gather::type_info, dynamicToStaticShapeGather}, + {ngraph::opset3::Unsqueeze::type_info, dynamicToStaticShapeUnsqueeze}, + {ngraph::opset3::ROIAlign::type_info, dynamicToStaticShapeROIAlign}, + {ngraph::opset3::Reshape::type_info, dynamicToStaticShapeReshape}, + {ngraph::opset3::Broadcast::type_info, dynamicToStaticShapeBroadcast}, + {ngraph::opset3::MatMul::type_info, dynamicToStaticShapeMatMul}, + {ngraph::opset5::Split::type_info, dynamicToStaticShapeSplit}, + {ngraph::opset5::GatherND::type_info, dynamicToStaticShapeGatherND}, // reduction {ngraph::opset3::ReduceLogicalAnd::type_info, dynamicToStaticShapeReduce}, diff --git a/inference-engine/tests/functional/plugin/myriad/ngraph/transformations/dynamic_to_static_shape_scatter.cpp b/inference-engine/tests/functional/plugin/myriad/ngraph/transformations/dynamic_to_static_shape_scatter.cpp index c83dec9418d299..721309630caba4 100644 --- a/inference-engine/tests/functional/plugin/myriad/ngraph/transformations/dynamic_to_static_shape_scatter.cpp +++ b/inference-engine/tests/functional/plugin/myriad/ngraph/transformations/dynamic_to_static_shape_scatter.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -19,71 +20,113 @@ using DataType = ngraph::element::Type_t; struct ScatterTestCase { - ngraph::NodeTypeInfo scatter_type_info; - ngraph::Shape data_shape, indices_shape, updates_shape; + ngraph::NodeTypeInfo scatterTypeInfo; + ngraph::Shape dataShape, indicesShape, updatesShape; int64_t axis; }; +enum class ShapeType { + DYNAMIC, + STATIC +}; + +using ScatterParameters = std::tuple< + DataType, + DataType, + ScatterTestCase, + ShapeType>; + class DynamicToStaticShapeScatter : public CommonTestUtils::TestsCommon, - public testing::WithParamInterface> { + public testing::WithParamInterface { public: void SetUp() override { const auto& parameters = GetParam(); - const auto& numeric_type = std::get<0>(parameters); - const auto& integer_type = std::get<1>(parameters); - const auto& scatter_setup = std::get<2>(parameters); - - ngraph::helpers::CompareFunctions(*transform(numeric_type, integer_type, scatter_setup), - *reference(numeric_type, integer_type, scatter_setup)); + const auto& numericType = std::get<0>(parameters); + const auto& integerType = std::get<1>(parameters); + const auto& scatterSetup = std::get<2>(parameters); + const auto& indicesUpdatesShapeType = std::get<3>(parameters); + + ngraph::helpers::CompareFunctions( + *transform(numericType, integerType, scatterSetup, indicesUpdatesShapeType), + *reference(numericType, integerType, scatterSetup, indicesUpdatesShapeType)); } protected: std::shared_ptr transform( - const ngraph::element::Type_t& numeric_type, - const ngraph::element::Type_t& integer_type, - const ScatterTestCase& scatter_setup) const { - const auto data = std::make_shared(numeric_type, scatter_setup.data_shape); - const auto indices = std::make_shared(integer_type, scatter_setup.indices_shape); - const auto updates = std::make_shared(numeric_type, scatter_setup.updates_shape); - const auto axis = std::make_shared(integer_type, ngraph::Shape{1}, std::vector{scatter_setup.axis}); - - - const auto dims = std::make_shared(ngraph::element::i64, ngraph::Shape{scatter_setup.data_shape.size()}); - const auto dsr = std::make_shared(data, dims); - - const auto node = ngraph::helpers::getNodeSharedPtr(scatter_setup.scatter_type_info, {dsr, indices, updates, axis}); + const ngraph::element::Type_t& numericType, + const ngraph::element::Type_t& integerType, + const ScatterTestCase& scatterSetup, + ShapeType indicesUpdatesShapeType) const { + const auto data = std::make_shared(numericType, scatterSetup.dataShape); + const auto indices = std::make_shared(integerType, scatterSetup.indicesShape); + const auto updates = std::make_shared(numericType, scatterSetup.updatesShape); + const auto axis = std::make_shared(integerType, ngraph::Shape{1}, std::vector{scatterSetup.axis}); + + const auto dataDims = std::make_shared(ngraph::element::i64, ngraph::Shape{scatterSetup.dataShape.size()}); + const auto dataDSR = std::make_shared(data, dataDims); + + ngraph::ParameterVector params{data, indices, updates, dataDims}; + + std::shared_ptr scatterIndices = indices; + std::shared_ptr scatterUpdates = updates; + if (indicesUpdatesShapeType == ShapeType::DYNAMIC) { + const auto indicesDims = std::make_shared(ngraph::element::i64, ngraph::Shape{scatterSetup.indicesShape.size()}); + scatterIndices = std::make_shared(indices, indicesDims); + params.push_back(indicesDims); + const auto updatesDims = std::make_shared(ngraph::element::i64, ngraph::Shape{scatterSetup.updatesShape.size()}); + scatterUpdates = std::make_shared(updates, updatesDims); + params.push_back(updatesDims); + } + + const auto node = ngraph::helpers::getNodeSharedPtr(scatterSetup.scatterTypeInfo, {dataDSR, scatterIndices, scatterUpdates, axis}); auto outputShape = node->get_output_partial_shape(0); const auto function = std::make_shared( ngraph::NodeVector{node}, - ngraph::ParameterVector{data, indices, updates, dims}, + params, "Actual"); - node->set_output_type(0, dsr->get_input_element_type(0), ngraph::PartialShape::dynamic(outputShape.rank())); + node->set_output_type(0, dataDSR->get_input_element_type(0), ngraph::PartialShape::dynamic(outputShape.rank())); - const auto transformations = vpu::Transformations{{scatter_setup.scatter_type_info, vpu::dynamicToStaticUnaryElementwise}}; + const auto transformations = vpu::Transformations{{scatterSetup.scatterTypeInfo, vpu::dynamicToStaticUnaryElementwise}}; vpu::DynamicToStaticShape(transformations).run_on_function(function); return function; } std::shared_ptr reference( - const ngraph::element::Type_t& numeric_type, - const ngraph::element::Type_t& integer_type, - const ScatterTestCase& scatter_setup) const { - const auto data = std::make_shared(numeric_type, scatter_setup.data_shape); - const auto indices = std::make_shared(integer_type, scatter_setup.indices_shape); - const auto updates = std::make_shared(numeric_type, scatter_setup.updates_shape); - const auto axis = std::make_shared(integer_type, ngraph::Shape{1}, std::vector{scatter_setup.axis}); + const ngraph::element::Type_t& numericType, + const ngraph::element::Type_t& integerType, + const ScatterTestCase& scatterSetup, + ShapeType indicesUpdatesShapeType) const { + const auto data = std::make_shared(numericType, scatterSetup.dataShape); + const auto indices = std::make_shared(integerType, scatterSetup.indicesShape); + const auto updates = std::make_shared(numericType, scatterSetup.updatesShape); + const auto axis = std::make_shared(integerType, ngraph::Shape{1}, std::vector{scatterSetup.axis}); + + const auto dataDims = std::make_shared(ngraph::element::i64, ngraph::Shape{scatterSetup.dataShape.size()}); + const auto dataDSR = std::make_shared(data, dataDims); + + ngraph::ParameterVector params{data, indices, updates, dataDims}; + std::shared_ptr scatterIndices = indices; + std::shared_ptr scatterUpdates = updates; + if (indicesUpdatesShapeType == ShapeType::DYNAMIC) { + const auto indicesDims = std::make_shared(ngraph::element::i64, ngraph::Shape{scatterSetup.indicesShape.size()}); + scatterIndices = std::make_shared(indices, indicesDims); + params.push_back(indicesDims); + const auto updatesDims = std::make_shared(ngraph::element::i64, ngraph::Shape{scatterSetup.updatesShape.size()}); + scatterUpdates = std::make_shared(updates, updatesDims); + params.push_back(updatesDims); + } - const auto dims = std::make_shared(ngraph::element::i64, ngraph::Shape{scatter_setup.data_shape.size()}); - const auto dsr = std::make_shared(data, dims); - const auto node = ngraph::helpers::getNodeSharedPtr(scatter_setup.scatter_type_info, {dsr, indices, updates, axis}); + const auto node = ngraph::helpers::getNodeSharedPtr(scatterSetup.scatterTypeInfo, {dataDSR, scatterIndices, scatterUpdates, axis}); + + std::shared_ptr outNode = node; + const auto outDSR = std::make_shared(node, dataDims); - const auto dsr1 = std::make_shared(node, dims); return std::make_shared( - ngraph::NodeVector{dsr1}, - ngraph::ParameterVector{data, indices, updates, dims}, + ngraph::NodeVector{outDSR}, + params, "Expected"); } }; @@ -103,6 +146,11 @@ INSTANTIATE_TEST_CASE_P(smoke_NGraph, DynamicToStaticShapeScatter, testing::Comb ngraph::element::i64, ngraph::element::u8), testing::Values( - ScatterTestCase{ngraph::opset3::ScatterUpdate::type_info, {1000, 256, 10, 15}, {125, 20}, {1000, 125, 20, 10, 15}, 1}))); + ScatterTestCase{ngraph::opset3::ScatterUpdate::type_info, {1000, 256, 10, 15}, {125, 20}, {1000, 125, 20, 10, 15}, 1}, + ScatterTestCase{ngraph::opset5::ScatterElementsUpdate::type_info, {300}, {300}, {300}, 0}), + testing::Values( + ShapeType::DYNAMIC, + ShapeType::STATIC) +)); } // namespace diff --git a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_scatter.cpp b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_scatter.cpp index 1b4f76956f9709..729926659ba0a3 100644 --- a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_scatter.cpp +++ b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_scatter.cpp @@ -56,6 +56,12 @@ INSTANTIATE_TEST_CASE_P(smoke_DynamicScatter, DSR_Scatter, {{84, 256, 7, 7}, {100, 256, 7, 7}}, {{84}, {100}}, {{84, 256, 7, 7}, {100, 256, 7, 7}}, + 0}, + ScatterTestCase{ + ngraph::opset5::ScatterElementsUpdate::type_info, + {{142}, {300}}, + {{80}, {300}}, + {{80}, {300}}, 0}), ::testing::Values(CommonTestUtils::DEVICE_MYRIAD))); From 8aabcde925235c1af44cbc26ac77ce54160e2ff4 Mon Sep 17 00:00:00 2001 From: Anton Potapov Date: Fri, 11 Dec 2020 12:49:38 +0300 Subject: [PATCH 062/244] [PP] Altered preprocessing tests to use existin posprocessing as well (#3554) changed PreprocessingPrecisionConvertTest: - to force output precision to be same as input (and not FP32 always) changed TEMPLATE plugin to allow U8 outputs --- docs/template_plugin/src/template_plugin.cpp | 3 ++- .../plugin/shared/include/behavior/preprocessing.hpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/template_plugin/src/template_plugin.cpp b/docs/template_plugin/src/template_plugin.cpp index 64da1235e6ad21..11073ca9115b3c 100644 --- a/docs/template_plugin/src/template_plugin.cpp +++ b/docs/template_plugin/src/template_plugin.cpp @@ -92,7 +92,8 @@ InferenceEngine::ExecutableNetworkInternal::Ptr Plugin::LoadExeNetworkImpl(const auto output_precision = networkOutput.second->getPrecision(); if (output_precision != InferenceEngine::Precision::FP32 && - output_precision != InferenceEngine::Precision::FP16) { + output_precision != InferenceEngine::Precision::FP16 && + output_precision != InferenceEngine::Precision::U8) { THROW_IE_EXCEPTION << "Template device supports only FP16 and FP32 output precision."; } } diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/preprocessing.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/preprocessing.hpp index bb27da54654b18..d5b322c1cbe0e4 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/preprocessing.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/preprocessing.hpp @@ -93,6 +93,7 @@ struct PreprocessingPrecisionConvertTest : SetRefMode(LayerTestsUtils::RefMode::INTERPRETER); std::tie(inPrc, channels, use_set_input, targetDevice, configuration) = this->GetParam(); + outPrc = inPrc; bool specialZero = true; From dbf855b3205995a7b2348a2cad83270de927e8f2 Mon Sep 17 00:00:00 2001 From: Tomasz Socha Date: Fri, 11 Dec 2020 11:57:50 +0100 Subject: [PATCH 063/244] [ONNX][Python][Tests] Update ONNX to onnx 1.8 (#3557) --- .../include/onnx_import/op/split.hpp | 6 + .../include/onnx_import/op/squeeze.hpp | 6 + .../include/onnx_import/op/unsqueeze.hpp | 7 +- ngraph/frontend/onnx_import/src/op/split.cpp | 25 +- .../frontend/onnx_import/src/op/squeeze.cpp | 22 ++ .../frontend/onnx_import/src/op/unsqueeze.cpp | 11 +- .../frontend/onnx_import/src/ops_bridge.cpp | 3 + ngraph/python/requirements_test.txt | 2 +- ngraph/python/tests/__init__.py | 18 +- .../tests/test_ngraph/test_data_movement.py | 2 - .../tests/test_ngraph/test_ops_fused.py | 6 +- .../tests/test_ngraph/test_ops_unary.py | 3 +- .../test_ngraph/test_sequence_processing.py | 5 +- ngraph/python/tests/test_onnx/test_backend.py | 245 +++++++++++++++--- .../python/tests/test_onnx/test_ops_binary.py | 10 +- .../tests/test_onnx/test_ops_reduction.py | 26 +- .../tests/test_onnx/test_ops_reshape.py | 68 +++-- .../python/tests/test_onnx/test_ops_unary.py | 11 +- 18 files changed, 384 insertions(+), 92 deletions(-) diff --git a/ngraph/frontend/onnx_import/include/onnx_import/op/split.hpp b/ngraph/frontend/onnx_import/include/onnx_import/op/split.hpp index c2cdeba117efcc..bdba88f37a6224 100644 --- a/ngraph/frontend/onnx_import/include/onnx_import/op/split.hpp +++ b/ngraph/frontend/onnx_import/include/onnx_import/op/split.hpp @@ -31,6 +31,12 @@ namespace ngraph } // namespace set_1 + namespace set_13 + { + OutputVector split(const Node& node); + + } // namespace set_13 + } // namespace op } // namespace onnx_import diff --git a/ngraph/frontend/onnx_import/include/onnx_import/op/squeeze.hpp b/ngraph/frontend/onnx_import/include/onnx_import/op/squeeze.hpp index ad303d85b2a476..0a4d59e1d48033 100644 --- a/ngraph/frontend/onnx_import/include/onnx_import/op/squeeze.hpp +++ b/ngraph/frontend/onnx_import/include/onnx_import/op/squeeze.hpp @@ -31,6 +31,12 @@ namespace ngraph } // namespace set_1 + namespace set_13 + { + OutputVector squeeze(const Node& node); + + } // namespace set_13 + } // namespace op } // namespace onnx_import diff --git a/ngraph/frontend/onnx_import/include/onnx_import/op/unsqueeze.hpp b/ngraph/frontend/onnx_import/include/onnx_import/op/unsqueeze.hpp index 4f4fe1cdd74082..06ecbba923ad29 100644 --- a/ngraph/frontend/onnx_import/include/onnx_import/op/unsqueeze.hpp +++ b/ngraph/frontend/onnx_import/include/onnx_import/op/unsqueeze.hpp @@ -31,7 +31,12 @@ namespace ngraph } // namespace set_1 - } // namespace op + namespace set_13 + { + OutputVector unsqueeze(const Node& node); + + } // namespace set_13 + } // namespace op } // namespace onnx_import diff --git a/ngraph/frontend/onnx_import/src/op/split.cpp b/ngraph/frontend/onnx_import/src/op/split.cpp index 8dce83789c6628..aac6148de9a1d3 100644 --- a/ngraph/frontend/onnx_import/src/op/split.cpp +++ b/ngraph/frontend/onnx_import/src/op/split.cpp @@ -49,7 +49,30 @@ namespace ngraph } // namespace set_1 - } // namespace op + namespace set_13 + { + OutputVector split(const Node& node) + { + const auto inputs = node.get_ng_inputs(); + const auto axis = node.get_attribute_value("axis", 0); + + if (inputs.size() < 2) + { + const auto outputs_number = node.get_output_names().size(); + return ngraph::builder::opset1::split(inputs.at(0), outputs_number, axis); + } + else + { + const auto axis_node = + default_opset::Constant::create(element::Type_t::i64, Shape{}, {axis}); + return {std::make_shared( + inputs.at(0), axis_node, inputs.at(1)) + ->outputs()}; + } + } + + } // namespace set_13 + } // namespace op } // namespace onnx_import diff --git a/ngraph/frontend/onnx_import/src/op/squeeze.cpp b/ngraph/frontend/onnx_import/src/op/squeeze.cpp index 035f5902957d70..58d49d573ee3e3 100644 --- a/ngraph/frontend/onnx_import/src/op/squeeze.cpp +++ b/ngraph/frontend/onnx_import/src/op/squeeze.cpp @@ -45,6 +45,28 @@ namespace ngraph } } // namespace set_1 + + namespace set_13 + { + OutputVector squeeze(const Node& node) + { + auto inputs = node.get_ng_inputs(); + if (inputs.size() < 2) + { + std::vector axes{}; + auto axes_node = std::make_shared( + element::Type_t::u64, Shape{}, axes); + + return {std::make_shared(inputs.at(0), axes_node)}; + } + else + { + return { + std::make_shared(inputs.at(0), inputs.at(1))}; + } + } + + } // namespace set_13 } // namespace op } // namespace onnx_import } // namespace ngraph diff --git a/ngraph/frontend/onnx_import/src/op/unsqueeze.cpp b/ngraph/frontend/onnx_import/src/op/unsqueeze.cpp index ba2a64778e8648..87d50867cc1b73 100644 --- a/ngraph/frontend/onnx_import/src/op/unsqueeze.cpp +++ b/ngraph/frontend/onnx_import/src/op/unsqueeze.cpp @@ -41,7 +41,16 @@ namespace ngraph } // namespace set_1 - } // namespace op + namespace set_13 + { + OutputVector unsqueeze(const Node& node) + { + auto inputs = node.get_ng_inputs(); + return {std::make_shared(inputs.at(0), inputs.at(1))}; + } + + } // namespace set_13 + } // namespace op } // namespace onnx_import diff --git a/ngraph/frontend/onnx_import/src/ops_bridge.cpp b/ngraph/frontend/onnx_import/src/ops_bridge.cpp index 7c113f0a0c9c0f..6d1571240f738c 100644 --- a/ngraph/frontend/onnx_import/src/ops_bridge.cpp +++ b/ngraph/frontend/onnx_import/src/ops_bridge.cpp @@ -431,8 +431,10 @@ namespace ngraph REGISTER_OPERATOR("Softsign", 1, softsign); REGISTER_OPERATOR("SpaceToDepth", 1, space_to_depth); REGISTER_OPERATOR("Split", 1, split); + REGISTER_OPERATOR("Split", 13, split); REGISTER_OPERATOR("Sqrt", 1, sqrt); REGISTER_OPERATOR("Squeeze", 1, squeeze); + REGISTER_OPERATOR("Squeeze", 13, squeeze); REGISTER_OPERATOR("Sub", 1, sub); REGISTER_OPERATOR("Sub", 7, sub); REGISTER_OPERATOR("Sum", 1, sum); @@ -446,6 +448,7 @@ namespace ngraph REGISTER_OPERATOR("TopK", 11, topk); REGISTER_OPERATOR("Transpose", 1, transpose); REGISTER_OPERATOR("Unsqueeze", 1, unsqueeze); + REGISTER_OPERATOR("Unsqueeze", 13, unsqueeze); REGISTER_OPERATOR("Upsample", 1, upsample); REGISTER_OPERATOR("Upsample", 9, upsample); REGISTER_OPERATOR("Where", 1, where); diff --git a/ngraph/python/requirements_test.txt b/ngraph/python/requirements_test.txt index c6bb0dd98fcc1f..7ebee9a940479e 100644 --- a/ngraph/python/requirements_test.txt +++ b/ngraph/python/requirements_test.txt @@ -2,7 +2,7 @@ flake8==3.8.4 flake8-comprehensions==3.3.0 flake8-docstrings==1.5.0 flake8-quotes==3.2.0 -onnx==1.7.0 +onnx==1.8.0 pydocstyle==5.1.1 pytest==6.1.2 retrying==1.3.3 diff --git a/ngraph/python/tests/__init__.py b/ngraph/python/tests/__init__.py index ba015a4152310e..378bbcf1885618 100644 --- a/ngraph/python/tests/__init__.py +++ b/ngraph/python/tests/__init__.py @@ -110,7 +110,6 @@ def xfail_test(reason="Mark the test as expected to fail", strict=True): "with index 0 contains dynamic shapes: {}. Try to use " "CNNNetwork::reshape() method in order to specialize shapes " "before the conversion.") -xfail_issue_38085 = xfail_test(reason="RuntimeError: Interpolate operation should be converted to Interp") xfail_issue_38086 = xfail_test(reason="RuntimeError: Quantize layer input '' doesn't have blobs") xfail_issue_38087 = xfail_test(reason="RuntimeError: Cannot cast to tensor desc. Format is unsupported!") xfail_issue_38091 = xfail_test(reason="AssertionError: Mismatched elements") @@ -170,6 +169,23 @@ def xfail_test(reason="Mark the test as expected to fail", strict=True): "ai.onnx.preview.training.Adagrad") xfail_issue_38736 = xfail_test(reason="RuntimeError: nGraph does not support the following ONNX operations:" "NegativeLogLikelihoodLoss") +xfail_issue_43523 = xfail_test(reason="onnx.onnx_cpp2py_export.checker.ValidationError:" + " Unrecognized attribute: axes for operator ReduceSum") +xfail_issue_44839 = xfail_test(reason="Huge computation missmatch") +xfail_issue_44848 = xfail_test(reason="E Unsupported dynamic op: Range") +xfail_issue_44851 = xfail_test(reason="E Unsupported dynamic op: Broadcast") +xfail_issue_44854 = xfail_test(reason="E Unsupported dynamic op: VariadicSplit") +xfail_issue_44858 = xfail_test(reason="E Unsupported dynamic op: Unsqueeze") +xfail_issue_44956 = xfail_test(reason="E Unsupported dynamic op: Loop") +xfail_issue_44957 = xfail_test(reason="E Unsupported dynamic op: NonZero") +xfail_issue_44958 = xfail_test(reason="E Unsupported dynamic op: Interpolate") +xfail_issue_44965 = xfail_test(reason="E RuntimeError: value info has no element") +xfail_issue_44967 = xfail_test(reason="E RuntimeError: unsupported element type: BFLOAT16") +xfail_issue_44968 = xfail_test(reason="E Unsupported dynamic op: Squeeze") +xfail_issue_44970 = xfail_test(reason="Assertion error") +xfail_issue_44976 = xfail_test(reason="E RuntimeError: Quantize layer with name:" + "FakeQuantize_xxx has non const input on 1 port") + # Model ONNX Zoo issues: xfail_issue_39684 = xfail_test(reason="ngraph.exceptions.UserInputError:" diff --git a/ngraph/python/tests/test_ngraph/test_data_movement.py b/ngraph/python/tests/test_ngraph/test_data_movement.py index 7cad0e272dc148..f2e85bcd179529 100644 --- a/ngraph/python/tests/test_ngraph/test_data_movement.py +++ b/ngraph/python/tests/test_ngraph/test_data_movement.py @@ -14,7 +14,6 @@ # limitations under the License. # ****************************************************************************** import numpy as np -import pytest import ngraph as ng from ngraph.impl import Type @@ -167,7 +166,6 @@ def test_pad_edge(): assert np.allclose(result, expected) -@pytest.mark.xfail(reason="AssertionError") def test_pad_constant(): input_data = np.arange(1, 13).reshape([3, 4]) pads_begin = np.array([0, 1], dtype=np.int32) diff --git a/ngraph/python/tests/test_ngraph/test_ops_fused.py b/ngraph/python/tests/test_ngraph/test_ops_fused.py index 49412d3a54d2c1..f7e37805a1fa9d 100644 --- a/ngraph/python/tests/test_ngraph/test_ops_fused.py +++ b/ngraph/python/tests/test_ngraph/test_ops_fused.py @@ -19,11 +19,11 @@ import ngraph as ng from tests.runtime import get_runtime from tests import (xfail_issue_40957, - skip_segfault, xfail_issue_34327, xfail_issue_36485, xfail_issue_36486, - xfail_issue_36487) + xfail_issue_36487, + xfail_issue_44976) @xfail_issue_40957 @@ -58,7 +58,7 @@ def test_elu_operator_with_scalar(): assert np.allclose(result, expected) -@skip_segfault +@xfail_issue_44976 def test_fake_quantize(): runtime = get_runtime() diff --git a/ngraph/python/tests/test_ngraph/test_ops_unary.py b/ngraph/python/tests/test_ngraph/test_ops_unary.py index f0327de1be3c6f..61cce9ba8d66ad 100644 --- a/ngraph/python/tests/test_ngraph/test_ops_unary.py +++ b/ngraph/python/tests/test_ngraph/test_ops_unary.py @@ -19,6 +19,7 @@ import ngraph as ng from ngraph.impl import Shape, Type from tests.test_ngraph.util import run_op_node +from tests import xfail_issue_44970 @pytest.mark.parametrize( @@ -110,7 +111,7 @@ def sigmoid(x): assert np.allclose(result, expected) -@pytest.mark.skip(reason="Wrong results are broadcasted along given axis") +@xfail_issue_44970 def test_softmax(): axis = 0 input_tensor = np.array([[1, 2, 3], [4, 5, 6]], dtype=np.float32) diff --git a/ngraph/python/tests/test_ngraph/test_sequence_processing.py b/ngraph/python/tests/test_ngraph/test_sequence_processing.py index 2c9c5d25b632e2..e9b922b10668af 100644 --- a/ngraph/python/tests/test_ngraph/test_sequence_processing.py +++ b/ngraph/python/tests/test_ngraph/test_sequence_processing.py @@ -18,7 +18,8 @@ import ngraph as ng from tests.runtime import get_runtime from tests.test_ngraph.util import run_op_node -from tests import xfail_issue_36478, skip_issue_38084 +from tests import (xfail_issue_36478, + xfail_issue_44848) def test_onehot(): @@ -46,7 +47,7 @@ def test_one_hot(): assert np.allclose(result, excepted) -@skip_issue_38084 +@xfail_issue_44848 def test_range(): start = 5 stop = 35 diff --git a/ngraph/python/tests/test_onnx/test_backend.py b/ngraph/python/tests/test_onnx/test_backend.py index 68ebd44ca3ae5d..8a67427952ad90 100644 --- a/ngraph/python/tests/test_onnx/test_backend.py +++ b/ngraph/python/tests/test_onnx/test_backend.py @@ -25,7 +25,6 @@ from tests.test_onnx.utils.onnx_backend import OpenVinoTestBackend from tests import (BACKEND_NAME, - skip_issue_38084, xfail_issue_36535, xfail_issue_39656, xfail_issue_39658, @@ -77,7 +76,21 @@ xfail_issue_38735, xfail_issue_40319, xfail_issue_40485, - xfail_issue_41894) + xfail_issue_41894, + xfail_issue_43523, + xfail_issue_43742, + xfail_issue_44839, + xfail_issue_44848, + xfail_issue_44851, + xfail_issue_44854, + xfail_issue_44858, + xfail_issue_44956, + xfail_issue_44957, + xfail_issue_44958, + xfail_issue_44965, + xfail_issue_44967, + xfail_issue_44968, + xfail_issue_44976) def expect_fail(test_case_path, xfail): # type: (str) -> None @@ -124,21 +137,6 @@ def expect_fail(test_case_path, xfail): # type: (str) -> None globals().update(backend_test.enable_report().test_cases) tests_expected_to_fail = [ - (skip_issue_38084, - "OnnxBackendNodeModelTest.test_expand_dim_changed_cpu", - "OnnxBackendNodeModelTest.test_expand_dim_unchanged_cpu", - "OnnxBackendSimpleModelTest.test_expand_shape_model1_cpu", - "OnnxBackendSimpleModelTest.test_expand_shape_model2_cpu", - "OnnxBackendSimpleModelTest.test_expand_shape_model3_cpu", - "OnnxBackendSimpleModelTest.test_expand_shape_model4_cpu", - "OnnxBackendNodeModelTest.test_slice_default_axes_cpu", - "OnnxBackendNodeModelTest.test_top_k_cpu", - "OnnxBackendNodeModelTest.test_top_k_negative_axis_cpu", - "OnnxBackendNodeModelTest.test_top_k_smallest_cpu", - "OnnxBackendNodeModelTest.test_nonzero_example_cpu", - "OnnxBackendNodeModelTest.test_range_int32_type_negative_delta_cpu", - "OnnxBackendNodeModelTest.test_range_float_type_positive_delta_cpu", - "OnnxBackendNodeModelTest.test_upsample_nearest_cpu"), (xfail_issue_34314, "OnnxBackendNodeModelTest.test_rnn_seq_length_cpu", "OnnxBackendNodeModelTest.test_simple_rnn_defaults_cpu", @@ -432,22 +430,126 @@ def expect_fail(test_case_path, xfail): # type: (str) -> None "OnnxBackendNodeModelTest.test_negative_log_likelihood_loss_input_shape_is_NCd1d2_expanded_cpu", "OnnxBackendNodeModelTest.test_negative_log_likelihood_loss_input_shape_is_NCd1_weight_expanded_cpu", "OnnxBackendNodeModelTest.test_negative_log_likelihood_loss_input_shape_is_NCd1d2d3_none_no_weight_negative_ignore_index_expanded_cpu", # noqa - "OnnxBackendNodeModelTest.test_negative_log_likelihood_loss_input_shape_is_NCd1_mean_weight_negative_ignore_index_expanded_cpu", # noqa - "OnnxBackendNodeModelTest.test_negative_log_likelihood_loss_input_shape_is_NCd1d2d3d4d5_none_no_weight_expanded_cpu", # noqa - "OnnxBackendNodeModelTest.test_negative_log_likelihood_loss_input_shape_is_NCd1d2_with_weight_reduction_sum_ignore_index_expanded_cpu", # noqa - "OnnxBackendNodeModelTest.test_negative_log_likelihood_loss_input_shape_is_NCd1_expanded_cpu", - "OnnxBackendNodeModelTest.test_negative_log_likelihood_loss_input_shape_is_NCd1d2d3d4d5_mean_weight_expanded_cpu", # noqa - "OnnxBackendNodeModelTest.test_negative_log_likelihood_loss_input_shape_is_NCd1d2_with_weight_reduction_sum_expanded_cpu", # noqa - "OnnxBackendNodeModelTest.test_negative_log_likelihood_loss_input_shape_is_NC_expanded_cpu", - "OnnxBackendNodeModelTest.test_negative_log_likelihood_loss_input_shape_is_NCd1d2d3_sum_weight_high_ignore_index_expanded_cpu", # noqa - "OnnxBackendNodeModelTest.test_negative_log_likelihood_loss_iinput_shape_is_NCd1_weight_ignore_index_expanded_cpu", # noqa - "OnnxBackendNodeModelTest.test_negative_log_likelihood_loss_input_shape_is_NCd1d2_with_weight_reduction_mean_expanded_cpu", # noqa - "OnnxBackendNodeModelTest.test_negative_log_likelihood_loss_input_shape_is_NCd1d2_with_weight_expanded_cpu", # noqa - "OnnxBackendNodeModelTest.test_negative_log_likelihood_loss_input_shape_is_NCd1d2_reduction_sum_expanded_cpu", # noqa - "OnnxBackendNodeModelTest.test_negative_log_likelihood_loss_input_shape_is_NCd1d2_reduction_mean_expanded_cpu", # noqa - "OnnxBackendNodeModelTest.test_gather_elements_0_cpu", - "OnnxBackendNodeModelTest.test_gather_elements_negative_indices_cpu", - "OnnxBackendNodeModelTest.test_gather_elements_1_cpu"), + "OnnxBackendNodeModelTest.test_negative_log_likelihood_loss_input_shape_is_NCd1_mean_weight_negative_ignore_index_expanded_cpu", # noqa + "OnnxBackendNodeModelTest.test_negative_log_likelihood_loss_input_shape_is_NCd1d2d3d4d5_none_no_weight_expanded_cpu", # noqa + "OnnxBackendNodeModelTest.test_negative_log_likelihood_loss_input_shape_is_NCd1d2_with_weight_reduction_sum_ignore_index_expanded_cpu", # noqa + "OnnxBackendNodeModelTest.test_negative_log_likelihood_loss_input_shape_is_NCd1_expanded_cpu", + "OnnxBackendNodeModelTest.test_negative_log_likelihood_loss_input_shape_is_NCd1d2d3d4d5_mean_weight_expanded_cpu", # noqa + "OnnxBackendNodeModelTest.test_negative_log_likelihood_loss_input_shape_is_NCd1d2_with_weight_reduction_sum_expanded_cpu", # noqa + "OnnxBackendNodeModelTest.test_negative_log_likelihood_loss_input_shape_is_NC_expanded_cpu", + "OnnxBackendNodeModelTest.test_negative_log_likelihood_loss_input_shape_is_NCd1d2d3_sum_weight_high_ignore_index_expanded_cpu", # noqa + "OnnxBackendNodeModelTest.test_negative_log_likelihood_loss_iinput_shape_is_NCd1_weight_ignore_index_expanded_cpu", # noqa + "OnnxBackendNodeModelTest.test_negative_log_likelihood_loss_input_shape_is_NCd1d2_with_weight_reduction_mean_expanded_cpu", # noqa + "OnnxBackendNodeModelTest.test_negative_log_likelihood_loss_input_shape_is_NCd1d2_with_weight_expanded_cpu", # noqa + "OnnxBackendNodeModelTest.test_negative_log_likelihood_loss_input_shape_is_NCd1d2_reduction_sum_expanded_cpu", # noqa + "OnnxBackendNodeModelTest.test_negative_log_likelihood_loss_input_shape_is_NCd1d2_reduction_mean_expanded_cpu", # noqa + "OnnxBackendNodeModelTest.test_gather_elements_0_cpu", + "OnnxBackendNodeModelTest.test_gather_elements_negative_indices_cpu", + "OnnxBackendNodeModelTest.test_gather_elements_1_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NC_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NC_expanded_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NCd1_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NCd1_expanded_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NCd1_ii_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NCd1_ii_expanded_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NCd1_mean_weight_negative_ii_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NCd1_mean_weight_negative_ii_expanded_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NCd1_weight_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NCd1_weight_expanded_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NCd1_weight_ii_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NCd1_weight_ii_expanded_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NCd1d2_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NCd1d2_expanded_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NCd1d2_no_weight_reduction_mean_ii_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NCd1d2_no_weight_reduction_mean_ii_expanded_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NCd1d2_reduction_mean_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NCd1d2_reduction_mean_expanded_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NCd1d2_reduction_sum_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NCd1d2_reduction_sum_expanded_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NCd1d2_with_weight_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NCd1d2_with_weight_expanded_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NCd1d2_with_weight_reduction_mean_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NCd1d2_with_weight_reduction_mean_expanded_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NCd1d2_with_weight_reduction_sum_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NCd1d2_with_weight_reduction_sum_expanded_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NCd1d2_with_weight_reduction_sum_ii_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NCd1d2_with_weight_reduction_sum_ii_expanded_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NCd1d2d3_none_no_weight_negative_ii_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NCd1d2d3_none_no_weight_negative_ii_expanded_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NCd1d2d3_sum_weight_high_ii_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NCd1d2d3_sum_weight_high_ii_expanded_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NCd1d2d3d4d5_mean_weight_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NCd1d2d3d4d5_mean_weight_expanded_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NCd1d2d3d4d5_none_no_weight_cpu", + "OnnxBackendNodeModelTest.test_nllloss_NCd1d2d3d4d5_none_no_weight_expanded_cpu", + "OnnxBackendNodeModelTest.test_sce_NCd1_mean_weight_negative_ii_cpu", + "OnnxBackendNodeModelTest.test_sce_NCd1_mean_weight_negative_ii_expanded_cpu", + "OnnxBackendNodeModelTest.test_sce_NCd1_mean_weight_negative_ii_log_prob_cpu", + "OnnxBackendNodeModelTest.test_sce_NCd1_mean_weight_negative_ii_log_prob_expanded_cpu", + "OnnxBackendNodeModelTest.test_sce_NCd1d2d3_none_no_weight_negative_ii_cpu", + "OnnxBackendNodeModelTest.test_sce_NCd1d2d3_none_no_weight_negative_ii_expanded_cpu", + "OnnxBackendNodeModelTest.test_sce_NCd1d2d3_none_no_weight_negative_ii_log_prob_cpu", + "OnnxBackendNodeModelTest.test_sce_NCd1d2d3_none_no_weight_negative_ii_log_prob_expanded_cpu", + "OnnxBackendNodeModelTest.test_sce_NCd1d2d3_sum_weight_high_ii_cpu", + "OnnxBackendNodeModelTest.test_sce_NCd1d2d3_sum_weight_high_ii_expanded_cpu", + "OnnxBackendNodeModelTest.test_sce_NCd1d2d3_sum_weight_high_ii_log_prob_cpu", + "OnnxBackendNodeModelTest.test_sce_NCd1d2d3_sum_weight_high_ii_log_prob_expanded_cpu", + "OnnxBackendNodeModelTest.test_sce_NCd1d2d3d4d5_mean_weight_cpu", + "OnnxBackendNodeModelTest.test_sce_NCd1d2d3d4d5_mean_weight_expanded_cpu", + "OnnxBackendNodeModelTest.test_sce_NCd1d2d3d4d5_mean_weight_log_prob_cpu", + "OnnxBackendNodeModelTest.test_sce_NCd1d2d3d4d5_mean_weight_log_prob_expanded_cpu", + "OnnxBackendNodeModelTest.test_sce_NCd1d2d3d4d5_none_no_weight_cpu", + "OnnxBackendNodeModelTest.test_sce_NCd1d2d3d4d5_none_no_weight_expanded_cpu", + "OnnxBackendNodeModelTest.test_sce_NCd1d2d3d4d5_none_no_weight_log_prob_cpu", + "OnnxBackendNodeModelTest.test_sce_NCd1d2d3d4d5_none_no_weight_log_prob_expanded_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_3d_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_3d_expanded_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_3d_log_prob_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_3d_log_prob_expanded_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_expanded_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_log_prob_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_log_prob_expanded_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_no_weight_ii_3d_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_no_weight_ii_3d_expanded_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_no_weight_ii_3d_log_prob_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_no_weight_ii_3d_log_prob_expanded_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_no_weight_ii_4d_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_no_weight_ii_4d_expanded_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_no_weight_ii_4d_log_prob_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_no_weight_ii_4d_log_prob_expanded_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_no_weight_ii_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_no_weight_ii_expanded_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_no_weight_ii_log_prob_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_no_weight_ii_log_prob_expanded_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_weight_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_weight_expanded_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_weight_ii_3d_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_weight_ii_3d_expanded_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_weight_ii_3d_log_prob_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_weight_ii_3d_log_prob_expanded_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_weight_ii_4d_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_weight_ii_4d_expanded_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_weight_ii_4d_log_prob_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_weight_ii_4d_log_prob_expanded_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_weight_ii_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_weight_ii_expanded_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_weight_ii_log_prob_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_weight_ii_log_prob_expanded_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_weight_log_prob_cpu", + "OnnxBackendNodeModelTest.test_sce_mean_weight_log_prob_expanded_cpu", + "OnnxBackendNodeModelTest.test_sce_none_cpu", + "OnnxBackendNodeModelTest.test_sce_none_expanded_cpu", + "OnnxBackendNodeModelTest.test_sce_none_log_prob_cpu", + "OnnxBackendNodeModelTest.test_sce_none_log_prob_expanded_cpu", + "OnnxBackendNodeModelTest.test_sce_none_weights_cpu", + "OnnxBackendNodeModelTest.test_sce_none_weights_expanded_cpu", + "OnnxBackendNodeModelTest.test_sce_none_weights_log_prob_cpu", + "OnnxBackendNodeModelTest.test_sce_none_weights_log_prob_expanded_cpu", + "OnnxBackendNodeModelTest.test_sce_sum_cpu", + "OnnxBackendNodeModelTest.test_sce_sum_expanded_cpu", + "OnnxBackendNodeModelTest.test_sce_sum_log_prob_cpu", + "OnnxBackendNodeModelTest.test_sce_sum_log_prob_expanded_cpu"), (xfail_issue_38712, "OnnxBackendNodeModelTest.test_mod_mixed_sign_int16_cpu", "OnnxBackendNodeModelTest.test_mod_uint8_cpu", @@ -534,7 +636,82 @@ def expect_fail(test_case_path, xfail): # type: (str) -> None "OnnxBackendNodeModelTest.test_adagrad_cpu"), (xfail_issue_41894, "OnnxBackendNodeModelTest.test_max_uint16_cpu", - "OnnxBackendNodeModelTest.test_mod_int64_fmod_cpu") + "OnnxBackendNodeModelTest.test_mod_int64_fmod_cpu"), + (xfail_issue_43523, + "OnnxBackendNodeModelTest.test_reduce_sum_do_not_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_sum_do_not_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_sum_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_sum_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_sum_negative_axes_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_sum_default_axes_keepdims_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_sum_default_axes_keepdims_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_sum_empty_axes_input_noop_example_cpu", + "OnnxBackendNodeModelTest.test_reduce_sum_empty_axes_input_noop_random_cpu", + "OnnxBackendNodeModelTest.test_reduce_sum_negative_axes_keepdims_random_cpu"), + (xfail_issue_43742, + "OnnxBackendNodeModelTest.test_if_cpu", + "OnnxBackendNodeModelTest.test_if_seq_cpu"), + (xfail_issue_44839, + "OnnxBackendNodeModelTest.test_logsoftmax_axis_0_cpu", + "OnnxBackendNodeModelTest.test_logsoftmax_axis_0_expanded_cpu", + "OnnxBackendNodeModelTest.test_logsoftmax_axis_1_cpu", + "OnnxBackendNodeModelTest.test_logsoftmax_axis_1_expanded_cpu", + "OnnxBackendNodeModelTest.test_logsoftmax_axis_2_expanded_cpu", + "OnnxBackendNodeModelTest.test_logsoftmax_default_axis_expanded_cpu", + "OnnxBackendNodeModelTest.test_logsoftmax_large_number_expanded_cpu", + "OnnxBackendNodeModelTest.test_logsoftmax_negative_axis_expanded_cpu", + "OnnxBackendNodeModelTest.test_softmax_axis_0_cpu", + "OnnxBackendNodeModelTest.test_softmax_axis_0_expanded_cpu", + "OnnxBackendNodeModelTest.test_softmax_axis_1_cpu", + "OnnxBackendNodeModelTest.test_softmax_axis_1_expanded_cpu", + "OnnxBackendNodeModelTest.test_softmax_axis_2_expanded_cpu", + "OnnxBackendNodeModelTest.test_softmax_default_axis_cpu", + "OnnxBackendNodeModelTest.test_softmax_default_axis_expanded_cpu", + "OnnxBackendNodeModelTest.test_softmax_large_number_expanded_cpu", + "OnnxBackendNodeModelTest.test_softmax_negative_axis_expanded_cpu", + "OnnxBackendNodeModelTest.test_hardmax_axis_0_cpu", + "OnnxBackendNodeModelTest.test_hardmax_axis_1_cpu", + "OnnxBackendNodeModelTest.test_hardmax_default_axis_cpu",), + (xfail_issue_44848, + "OnnxBackendNodeModelTest.test_range_float_type_positive_delta_cpu", + "OnnxBackendNodeModelTest.test_range_int32_type_negative_delta_cpu",), + (xfail_issue_44851, + "OnnxBackendNodeModelTest.test_expand_dim_changed_cpu", + "OnnxBackendNodeModelTest.test_expand_dim_unchanged_cpu", + "OnnxBackendSimpleModelTest.test_expand_shape_model1_cpu", + "OnnxBackendSimpleModelTest.test_expand_shape_model2_cpu", + "OnnxBackendSimpleModelTest.test_expand_shape_model3_cpu", + "OnnxBackendSimpleModelTest.test_expand_shape_model4_cpu",), + (xfail_issue_44854, + "OnnxBackendNodeModelTest.test_split_variable_parts_1d_cpu", + "OnnxBackendNodeModelTest.test_split_variable_parts_2d_cpu", + "OnnxBackendNodeModelTest.test_split_variable_parts_default_axis_cpu",), + (xfail_issue_44858, + "OnnxBackendNodeModelTest.test_unsqueeze_axis_0_cpu", + "OnnxBackendNodeModelTest.test_unsqueeze_axis_1_cpu", + "OnnxBackendNodeModelTest.test_unsqueeze_axis_2_cpu", + "OnnxBackendNodeModelTest.test_unsqueeze_negative_axes_cpu", + "OnnxBackendNodeModelTest.test_unsqueeze_three_axes_cpu", + "OnnxBackendNodeModelTest.test_unsqueeze_two_axes_cpu", + "OnnxBackendNodeModelTest.test_unsqueeze_unsorted_axes_cpu",), + (xfail_issue_44956, + "OnnxBackendNodeModelTest.test_loop11_cpu"), + (xfail_issue_44957, + "OnnxBackendNodeModelTest.test_nonzero_example_cpu"), + (xfail_issue_44958, + "OnnxBackendNodeModelTest.test_upsample_nearest_cpu"), + (xfail_issue_44965, + "OnnxBackendNodeModelTest.test_loop13_seq_cpu", + "OnnxBackendNodeModelTest.test_sequence_insert_at_back_cpu", + "OnnxBackendNodeModelTest.test_sequence_insert_at_front_cpu",), + (xfail_issue_44967, + "OnnxBackendNodeModelTest.test_cast_BFLOAT16_to_FLOAT_cpu", + "OnnxBackendNodeModelTest.test_cast_FLOAT_to_BFLOAT16_cpu",), + (xfail_issue_44968, + "OnnxBackendNodeModelTest.test_squeeze_cpu", + "OnnxBackendNodeModelTest.test_squeeze_negative_axes_cpu",), + (xfail_issue_44976, + "OnnxBackendNodeModelTest.test_quantizelinear_axis_cpu",) ] for test_group in tests_expected_to_fail: diff --git a/ngraph/python/tests/test_onnx/test_ops_binary.py b/ngraph/python/tests/test_onnx/test_ops_binary.py index e9b23832feef85..2a19208aa881db 100644 --- a/ngraph/python/tests/test_onnx/test_ops_binary.py +++ b/ngraph/python/tests/test_onnx/test_ops_binary.py @@ -19,7 +19,7 @@ from onnx.helper import make_graph, make_model, make_tensor_value_info from tests.test_onnx.utils import run_model -from tests import skip_segfault +from tests import xfail_issue_44970 def import_and_compute(op_type, input_data_left, input_data_right, opset=7, **node_attributes): @@ -38,7 +38,7 @@ def import_and_compute(op_type, input_data_left, input_data_right, opset=7, **no return run_model(model, inputs)[0] -@skip_segfault +@xfail_issue_44970 def test_add_opset4(): assert np.array_equal(import_and_compute("Add", 1, 2, opset=4), np.array(3, dtype=np.float32)) @@ -111,7 +111,7 @@ def test_add_opset7(left_shape, right_shape): assert np.array_equal(import_and_compute("Add", left_input, right_input), left_input + right_input) -@skip_segfault +@xfail_issue_44970 def test_sub(): assert np.array_equal(import_and_compute("Sub", 20, 1), np.array(19, dtype=np.float32)) @@ -125,7 +125,7 @@ def test_sub(): ) -@skip_segfault +@xfail_issue_44970 def test_mul(): assert np.array_equal(import_and_compute("Mul", 2, 3), np.array(6, dtype=np.float32)) @@ -139,7 +139,7 @@ def test_mul(): ) -@skip_segfault +@xfail_issue_44970 def test_div(): assert np.array_equal(import_and_compute("Div", 6, 3), np.array(2, dtype=np.float32)) diff --git a/ngraph/python/tests/test_onnx/test_ops_reduction.py b/ngraph/python/tests/test_onnx/test_ops_reduction.py index a2c9e824c446f0..76e96dd170cd8b 100644 --- a/ngraph/python/tests/test_onnx/test_ops_reduction.py +++ b/ngraph/python/tests/test_onnx/test_ops_reduction.py @@ -18,11 +18,11 @@ import pytest from tests.test_onnx.utils import run_node -from tests import xfail_issue_35925 +from tests import (xfail_issue_35925, + xfail_issue_43523) reduce_data = np.array([[[5, 1], [20, 2]], [[30, 1], [40, 2]], [[55, 1], [60, 2]]], dtype=np.float32) reduce_axis_parameters = [ - None, (0,), (1,), (2,), @@ -36,7 +36,7 @@ ("ReduceMax", np.max), ("ReduceMin", np.min), ("ReduceMean", np.mean), - ("ReduceSum", np.sum), + pytest.param("ReduceSum", np.sum, marks=xfail_issue_43523), ("ReduceProd", np.prod) ] @@ -47,15 +47,23 @@ def import_and_compute(op_type, input_data, **node_attrs): return run_node(node, data_inputs).pop() +@pytest.mark.parametrize("operation, ref_operation", [ + ("ReduceMax", np.max), + ("ReduceMin", np.min), + ("ReduceMean", np.mean), + ("ReduceSum", np.sum), + ("ReduceProd", np.prod) +]) +def test_reduce_operation_keepdims_none_axes(operation, ref_operation): + assert np.array_equal(import_and_compute(operation, reduce_data, keepdims=True), + ref_operation(reduce_data, keepdims=True)) + + @pytest.mark.parametrize("operation, ref_operation", reduce_operation_parameters) @pytest.mark.parametrize("axes", reduce_axis_parameters) def test_reduce_operation_keepdims(operation, ref_operation, axes): - if axes: - assert np.array_equal(import_and_compute(operation, reduce_data, axes=axes, keepdims=True), - ref_operation(reduce_data, keepdims=True, axis=axes)) - else: - assert np.array_equal(import_and_compute(operation, reduce_data, keepdims=True), - ref_operation(reduce_data, keepdims=True)) + assert np.array_equal(import_and_compute(operation, reduce_data, axes=axes, keepdims=True), + ref_operation(reduce_data, keepdims=True, axis=axes)) @pytest.mark.parametrize("axes", [ diff --git a/ngraph/python/tests/test_onnx/test_ops_reshape.py b/ngraph/python/tests/test_onnx/test_ops_reshape.py index b428c541dff22b..2bfceb3407f1f3 100644 --- a/ngraph/python/tests/test_onnx/test_ops_reshape.py +++ b/ngraph/python/tests/test_onnx/test_ops_reshape.py @@ -26,7 +26,10 @@ run_model, run_node, ) -from tests import xfail_issue_35927 +from tests import (xfail_issue_35927, + xfail_issue_44854, + xfail_issue_44858, + xfail_issue_44968) def test_reshape(): @@ -228,36 +231,43 @@ def test_concat(): assert np.array_equal(ng_results, [expected_output]) +@xfail_issue_44968 def test_squeeze(): data = np.arange(6, dtype=np.int32).reshape([1, 2, 3, 1]) expected_output = data.reshape([2, 3]) - node = onnx.helper.make_node("Squeeze", inputs=["x"], outputs=["y"], axes=[0, 3]) - ng_results = run_node(node, [data]) + axes = np.array([0, 3]).astype(np.int64) + node = onnx.helper.make_node("Squeeze", inputs=["x", "axes"], outputs=["y"]) + ng_results = run_node(node, [data, axes]) assert np.array_equal(ng_results, [expected_output]) data = np.random.randn(1, 3, 4, 5).astype(np.float32) expected_output = np.squeeze(data, axis=0) - node = onnx.helper.make_node("Squeeze", inputs=["x"], outputs=["y"], axes=[0]) - ng_results = run_node(node, [data]) + axes = np.array([0]).astype(np.int64) + node = onnx.helper.make_node("Squeeze", inputs=["x", "axes"], outputs=["y"]) + ng_results = run_node(node, [data, axes]) assert np.array_equal(ng_results, [expected_output]) +@xfail_issue_44858 def test_unsqueeze(): data = np.random.randn(3, 4, 5).astype(np.float32) expected_output = np.expand_dims(data, axis=0) - node = onnx.helper.make_node("Unsqueeze", inputs=["x"], outputs=["y"], axes=[0]) - ng_results = run_node(node, [data]) + axes = np.array([0]).astype(np.int64) + node = onnx.helper.make_node("Unsqueeze", inputs=["x", "axes"], outputs=["y"]) + ng_results = run_node(node, [data, axes]) assert np.array_equal(ng_results, [expected_output]) expected_output = np.reshape(data, [1, 3, 4, 5, 1]) - node = onnx.helper.make_node("Unsqueeze", inputs=["x"], outputs=["y"], axes=[0, 4]) - ng_results = run_node(node, [data]) + axes = np.array([0, 4]).astype(np.int64) + node = onnx.helper.make_node("Unsqueeze", inputs=["x", "axes"], outputs=["y"]) + ng_results = run_node(node, [data, axes]) assert np.array_equal(ng_results, [expected_output]) expected_output = np.reshape(data, [1, 3, 1, 4, 5]) - node = onnx.helper.make_node("Unsqueeze", inputs=["x"], outputs=["y"], axes=[0, 2]) - ng_results = run_node(node, [data]) + axes = np.array([0, 2]).astype(np.int64) + node = onnx.helper.make_node("Unsqueeze", inputs=["x", "axes"], outputs=["y"]) + ng_results = run_node(node, [data, axes]) assert np.array_equal(ng_results, [expected_output]) @@ -300,16 +310,6 @@ def test_unsqueeze(): np.array([[3], [7]], dtype=np.int32), ], ), - # Split into 2 unequal parts along axis=1 - ( - onnx.helper.make_node( - "Split", inputs=["x"], outputs=["a", "b"], axis=1, split=(3, 1) - ), - [ - np.array([[0, 1, 2], [4, 5, 6]], dtype=np.int32), - np.array([[3], [7]], dtype=np.int32), - ], - ), ], ) def test_split_2d(node, expected_output): @@ -318,6 +318,22 @@ def test_split_2d(node, expected_output): assert all_arrays_equal(ng_results, expected_output) +@xfail_issue_44854 +def test_split_2d_splits_input(): + data = np.arange(8, dtype=np.int32).reshape(2, 4) + splits = np.array([3, 1]).astype(np.int64) + node = onnx.helper.make_node( + "Split", inputs=["x", "splits"], outputs=["a", "b"], axis=1 + ) + expected_outputs = [ + np.array([[0, 1, 2], [4, 5, 6]], dtype=np.int32), + np.array([[3], [7]], dtype=np.int32), + ] + ng_results = run_node(node, [data, splits]) + assert all_arrays_equal(ng_results, expected_outputs) + + +@xfail_issue_44854 def test_split_1d(): # 1D data = np.array([1.0, 2.0, 3.0, 4.0, 5.0, 6.0]).astype(np.float32) @@ -330,15 +346,16 @@ def test_split_1d(): ng_results = run_node(node, [data]) assert all_arrays_equal(ng_results, expected_outputs) + splits = np.array([2, 3, 1]).astype(np.int64) node = onnx.helper.make_node( - "Split", inputs=["input"], outputs=["y", "z", "w"], axis=0, split=[2, 3, 1] + "Split", inputs=["input", "splits"], outputs=["y", "z", "w"], axis=0 ) expected_outputs = [ np.array([1.0, 2.0]).astype(np.float32), np.array([3.0, 4.0, 5.0]).astype(np.float32), np.array([6.0]).astype(np.float32), ] - ng_results = run_node(node, [data]) + ng_results = run_node(node, [data, splits]) assert all_arrays_equal(ng_results, expected_outputs) # Default values @@ -353,14 +370,15 @@ def test_split_1d(): ng_results = run_node(node, [data]) assert all_arrays_equal(ng_results, expected_outputs) + splits = np.array([2, 4]).astype(np.int64) node = onnx.helper.make_node( - "Split", inputs=["input"], outputs=["y", "z"], split=[2, 4] + "Split", inputs=["input", "splits"], outputs=["y", "z"], split=[2, 4] ) expected_outputs = [ np.array([1.0, 2.0]).astype(np.float32), np.array([3.0, 4.0, 5.0, 6.0]).astype(np.float32), ] - ng_results = run_node(node, [data]) + ng_results = run_node(node, [data, splits]) assert all_arrays_equal(ng_results, expected_outputs) diff --git a/ngraph/python/tests/test_onnx/test_ops_unary.py b/ngraph/python/tests/test_onnx/test_ops_unary.py index 5b28c636d4389e..d5ba32bd5808b7 100644 --- a/ngraph/python/tests/test_onnx/test_ops_unary.py +++ b/ngraph/python/tests/test_onnx/test_ops_unary.py @@ -302,13 +302,13 @@ def logsoftmax_2d(x): ng_results = run_node(node, [data]) assert np.allclose(ng_results, [expected]) - # default axis is 1 - node = onnx.helper.make_node("LogSoftmax", inputs=["x"], outputs=["y"]) + node = onnx.helper.make_node("LogSoftmax", inputs=["x"], outputs=["y"], axis=2) + expected = logsoftmax_2d(data.reshape(12, 5)).reshape(3, 4, 5) ng_results = run_node(node, [data]) assert np.allclose(ng_results, [expected]) - node = onnx.helper.make_node("LogSoftmax", inputs=["x"], outputs=["y"], axis=2) - expected = logsoftmax_2d(data.reshape(12, 5)).reshape(3, 4, 5) + # default axis is -1 + node = onnx.helper.make_node("LogSoftmax", inputs=["x"], outputs=["y"]) ng_results = run_node(node, [data]) assert np.allclose(ng_results, [expected]) @@ -388,8 +388,7 @@ def test_cast_to_bool(val_type, input_data): "val_type, range_start, range_end, in_dtype", [ (np.dtype(np.float32), -8, 8, np.dtype(np.int32)), - pytest.param(np.dtype(np.float64), -16383, 16383, np.dtype(np.int64), - marks=pytest.mark.xfail(reason="RuntimeError: Unsupported type")), + (np.dtype(np.float64), -16383, 16383, np.dtype(np.int64)), ], ) def test_cast_to_float(val_type, range_start, range_end, in_dtype): From 544a3e148db29c4275c7c450522dd1ac789bfe35 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Fri, 11 Dec 2020 15:58:25 +0300 Subject: [PATCH 064/244] Update PIP package name (#3577) --- docs/install_guides/installing-openvino-pip.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/install_guides/installing-openvino-pip.md b/docs/install_guides/installing-openvino-pip.md index 1c7fd0cda264e4..92d7077f5347f0 100644 --- a/docs/install_guides/installing-openvino-pip.md +++ b/docs/install_guides/installing-openvino-pip.md @@ -24,7 +24,7 @@ python3 -m pip install --upgrade pip Run the command below: ```sh - pip install openvino-python + pip install openvino ``` ### Step 3. Add PATH to environment variables @@ -78,5 +78,5 @@ Now you are ready to develop and run your application. - [Model Optimizer Developer Guide](../MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md). - [Inference Engine Developer Guide](../IE_DG/Deep_Learning_Inference_Engine_DevGuide.md). - For more information on Sample Applications, see the [Inference Engine Samples Overview](../IE_DG/Samples_Overview.md). -- [Intel® Distribution of OpenVINO™ toolkit PIP home page](https://pypi.org/project/openvino-python/) +- [Intel® Distribution of OpenVINO™ toolkit PIP home page](https://pypi.org/project/openvino/) From 2495eaf56fa0a5f431e5845a36ed6c419de37bd2 Mon Sep 17 00:00:00 2001 From: Anton Potapov Date: Fri, 11 Dec 2020 20:22:25 +0300 Subject: [PATCH 065/244] [PP] Addded ability to preprocess inputs into plugin (#857) desired format changed InferRequestInternal: - added _deviceInputs member to store plugin desired perprocessing targets - added default argument to preProcessingRequired to describe plugin specific desired preprocessing target - SetBlob and GetBlob to deal with plugin desired preprocessing targets (_deviceInputs) - added addInputPreProcessingFor helper method to avoid code duplication changed TEMPLATE plugin to use new functionality: - removed explicit presicion conversion (to use built-in one of InferRequestInternal) - _networkInputBlobs to use InferRequestInternal::_deviceInputs --- .../src/template_infer_request.cpp | 17 ++-- .../src/template_infer_request.hpp | 1 - .../behavior/preprocessing.cpp | 4 +- .../impl/ie_infer_request_internal.hpp | 88 ++++++++++++------- .../src/preprocessing/ie_preprocess_data.cpp | 57 ++++++------ .../src/preprocessing/ie_preprocess_data.hpp | 5 +- .../src/preprocessing/ie_preprocess_gapi.cpp | 15 +++- .../fluid_preproc/common/fluid_tests.cpp | 2 +- .../fluid_preproc/cpu/fluid_tests_cpu.cpp | 4 +- 9 files changed, 112 insertions(+), 81 deletions(-) diff --git a/docs/template_plugin/src/template_infer_request.cpp b/docs/template_plugin/src/template_infer_request.cpp index 0a24fda9c4264f..d327e71df5fd24 100644 --- a/docs/template_plugin/src/template_infer_request.cpp +++ b/docs/template_plugin/src/template_infer_request.cpp @@ -112,7 +112,7 @@ static void AllocateImpl(const BlobDataMap& blobDataMap, void TemplateInferRequest::allocateBlobs() { auto&& parameters = _executableNetwork->_function->get_parameters(); - AllocateImpl(_networkInputs, _inputs, _networkInputBlobs, [&] (const std::string& blobName) { + AllocateImpl(_networkInputs, _inputs, _deviceInputs, [&] (const std::string& blobName) { return parameters.at(_executableNetwork->_inputIndex.at(blobName))->get_element_type(); }); auto&& results = _executableNetwork->_function->get_results(); @@ -176,21 +176,14 @@ void TemplateInferRequest::inferPreprocess() { auto start = Time::now(); // NOTE: After InferRequestInternal::execDataPreprocessing call // input can points to other memory region than it was allocated in constructor. - InferRequestInternal::execDataPreprocessing(_inputs); - for (auto&& input : _inputs) { - auto inputBlob = input.second; - auto networkInput = _networkInputBlobs[input.first]; - if (inputBlob->getTensorDesc().getPrecision() == networkInput->getTensorDesc().getPrecision()) { - networkInput = inputBlob; - } else { - blobCopy(inputBlob, networkInput); - } - auto index = _executableNetwork->_inputIndex[input.first]; + InferRequestInternal::execDataPreprocessing(_deviceInputs); + for (auto&& networkInput : _deviceInputs) { + auto index = _executableNetwork->_inputIndex[networkInput.first]; const auto& parameter = _parameters[index]; const auto& parameterShape = parameter->get_shape(); const auto& parameterType = parameter->get_element_type(); _inputTensors[index] = _executableNetwork->_plugin->_backend->create_tensor(parameterType, parameterShape, - InferenceEngine::as(networkInput)->rmap().as()); + InferenceEngine::as(networkInput.second)->rmap().as()); } for (auto&& output : _outputs) { auto outputBlob = output.second; diff --git a/docs/template_plugin/src/template_infer_request.hpp b/docs/template_plugin/src/template_infer_request.hpp index a8303c37f1c017..666f44b4ded76f 100644 --- a/docs/template_plugin/src/template_infer_request.hpp +++ b/docs/template_plugin/src/template_infer_request.hpp @@ -63,7 +63,6 @@ class TemplateInferRequest : public InferenceEngine::InferRequestInternal { // for performance counters std::array, numOfStages> _durations; - InferenceEngine::BlobMap _networkInputBlobs; InferenceEngine::BlobMap _networkOutputBlobs; ngraph::ParameterVector _parameters; ngraph::ResultVector _results; diff --git a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/preprocessing.cpp b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/preprocessing.cpp index 49901287457bab..1897979f5b5d4b 100644 --- a/docs/template_plugin/tests/functional/shared_tests_instances/behavior/preprocessing.cpp +++ b/docs/template_plugin/tests/functional/shared_tests_instances/behavior/preprocessing.cpp @@ -22,7 +22,7 @@ const std::vector> configs = { INSTANTIATE_TEST_CASE_P(PreprocessingPrecisionConvertTestsViaSetInput, PreprocessingPrecisionConvertTest, ::testing::Combine( ::testing::ValuesIn(inputPrecisions), - ::testing::Values(1, 2, 3, 4, 5), // Number of input tensor channels + ::testing::Values(4), // Number of input tensor channels ::testing::Values(true), // Use SetInput ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE), ::testing::ValuesIn(configs)), @@ -31,7 +31,7 @@ INSTANTIATE_TEST_CASE_P(PreprocessingPrecisionConvertTestsViaSetInput, Preproces INSTANTIATE_TEST_CASE_P(PreprocessingPrecisionConvertTestsViaGetBlob, PreprocessingPrecisionConvertTest, ::testing::Combine( ::testing::ValuesIn(inputPrecisions), - ::testing::Values(4, 5), // Number of input tensor channels (blob_copy only supports 4d and 5d tensors) + ::testing::Values(4), // Number of input tensor channels (blob_copy only supports 4d and 5d tensors) ::testing::Values(false), // use GetBlob ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE), ::testing::ValuesIn(configs)), diff --git a/inference-engine/src/plugin_api/cpp_interfaces/impl/ie_infer_request_internal.hpp b/inference-engine/src/plugin_api/cpp_interfaces/impl/ie_infer_request_internal.hpp index 7add8e862a75e2..5676802b869df8 100644 --- a/inference-engine/src/plugin_api/cpp_interfaces/impl/ie_infer_request_internal.hpp +++ b/inference-engine/src/plugin_api/cpp_interfaces/impl/ie_infer_request_internal.hpp @@ -69,50 +69,46 @@ class InferRequestInternal : virtual public IInferRequestInternal { * @param data - a reference to input or output blob. The type of Blob must correspond to the network input * precision and size. */ - void SetBlob(const char* name, const Blob::Ptr& data) override { + void SetBlob(const char* name, const Blob::Ptr& userBlob) override { OV_ITT_SCOPED_TASK(itt::domains::Plugin, "SetBlob"); if (name == nullptr) { THROW_IE_EXCEPTION << NOT_FOUND_str + "Failed to set blob with empty name"; } - if (!data) THROW_IE_EXCEPTION << NOT_ALLOCATED_str << "Failed to set empty blob with name: \'" << name << "\'"; - const bool compoundBlobPassed = data->is(); - const bool remoteBlobPassed = data->is(); - if (!compoundBlobPassed && !remoteBlobPassed && data->buffer() == nullptr) + if (!userBlob) THROW_IE_EXCEPTION << NOT_ALLOCATED_str << "Failed to set empty blob with name: \'" << name << "\'"; + const bool compoundBlobPassed = userBlob->is(); + const bool remoteBlobPassed = userBlob->is(); + if (!compoundBlobPassed && !remoteBlobPassed && userBlob->buffer() == nullptr) THROW_IE_EXCEPTION << "Input data was not allocated. Input name: \'" << name << "\'"; - if (data->size() == 0) { + if (userBlob->size() == 0) { THROW_IE_EXCEPTION << "Input data is empty. Input name: \'" << name << "\'"; } InputInfo::Ptr foundInput; DataPtr foundOutput; - size_t dataSize = data->size(); + size_t dataSize = userBlob->size(); if (findInputAndOutputBlobByName(name, foundInput, foundOutput)) { - if (foundInput->getPrecision() != data->getTensorDesc().getPrecision()) { + if (foundInput->getPrecision() != userBlob->getTensorDesc().getPrecision()) { THROW_IE_EXCEPTION << PARAMETER_MISMATCH_str << "Failed to set Blob with precision not corresponding to user input precision"; } - const bool preProcRequired = preProcessingRequired(foundInput, data); + auto& devBlob = _deviceInputs[name]; + const bool preProcRequired = preProcessingRequired(foundInput, userBlob, devBlob); if (compoundBlobPassed && !preProcRequired) { THROW_IE_EXCEPTION << NOT_IMPLEMENTED_str << "cannot set compound blob: supported only for input pre-processing"; } if (preProcRequired) { - if (_preProcData.find(name) == _preProcData.end()) { - _preProcData.emplace(name, CreatePreprocDataHelper()); - } - _preProcData[name]->isApplicable(data, _inputs[name]); - // Stores the given blob as ROI blob. It will be used to fill in network input - // during pre-processing - _preProcData[name]->setRoiBlob(data); + addInputPreProcessingFor(name, userBlob, devBlob ? devBlob : _inputs[name]); } else { size_t inputSize = details::product(foundInput->getTensorDesc().getDims()); if (dataSize != inputSize) { THROW_IE_EXCEPTION << "Input blob size is not equal network input size (" << dataSize << "!=" << inputSize << ")."; } - _inputs[name] = data; + _inputs[name] = userBlob; + devBlob = userBlob; } } else { if (compoundBlobPassed) { @@ -124,11 +120,11 @@ class InferRequestInternal : virtual public IInferRequestInternal { THROW_IE_EXCEPTION << "Output blob size is not equal network output size (" << dataSize << "!=" << outputSize << ")."; } - if (foundOutput->getPrecision() != data->getTensorDesc().getPrecision()) { + if (foundOutput->getPrecision() != userBlob->getTensorDesc().getPrecision()) { THROW_IE_EXCEPTION << PARAMETER_MISMATCH_str << "Failed to set Blob with precision not corresponding to user output precision"; } - _outputs[name] = data; + _outputs[name] = userBlob; } } @@ -155,6 +151,12 @@ class InferRequestInternal : virtual public IInferRequestInternal { foundInput->getTensorDesc().getLayout() != SCALAR ? foundInput->getTensorDesc().getDims() : oneVector); + + if (auto devBlob = _deviceInputs[name]) { + if (preProcessingRequired(foundInput, data, devBlob)) { + addInputPreProcessingFor(name, data, devBlob); + } + } } } else { data = _outputs[name]; @@ -233,9 +235,10 @@ class InferRequestInternal : virtual public IInferRequestInternal { protected: InferenceEngine::InputsDataMap _networkInputs; //!< Holds information about network inputs info InferenceEngine::OutputsDataMap _networkOutputs; //!< Holds information about network outputs data - InferenceEngine::BlobMap _inputs; //!< A map of network input blobs - InferenceEngine::BlobMap _outputs; //!< A map of network output blobs - std::map _preProcData; //!< A map of pre-process data per input + InferenceEngine::BlobMap _inputs; //!< A map of user passed blobs for network inputs + InferenceEngine::BlobMap _deviceInputs; //!< A map of actual network inputs, in plugin specific format + InferenceEngine::BlobMap _outputs; //!< A map of user passed blobs for network outputs + std::map _preProcData; //!< A map of pre-process data per input int m_curBatch; //!< Current batch value used in dynamic batching /** @@ -243,14 +246,13 @@ class InferRequestInternal : virtual public IInferRequestInternal { * @note Needed to correctly handle ownership between objects. */ std::shared_ptr _exeNetwork; - /** * @brief Checks and executes input data pre-processing if needed. * @param inputs Inputs blobs to perform preprocessing on * @param serial Whether to use multiple threads to execute the step */ - void execDataPreprocessing(InferenceEngine::BlobMap& inputs, bool serial = false) { - for (auto& input : inputs) { + void execDataPreprocessing(InferenceEngine::BlobMap& preprocessedBlobs, bool serial = false) { + for (auto& input : preprocessedBlobs) { // If there is a pre-process entry for an input then it must be pre-processed // using preconfigured resize algorithm. auto it = _preProcData.find(input.first); @@ -260,7 +262,6 @@ class InferRequestInternal : virtual public IInferRequestInternal { } } } - /** * @brief Helper function to find input or output blob by name * @param name A name of input or output blob. @@ -356,25 +357,52 @@ class InferRequestInternal : virtual public IInferRequestInternal { /** * @brief Checks whether pre-processing step is required for a given input * @param info InputInfo corresponding to input blob - * @param blob Input Blob object corresponding to input info + * @param userBlob Input Blob object corresponding to input info + * @param deviceBlob Blob object in plugin's desired format * @return `True` if pre-processing is required, `false` otherwise */ - bool preProcessingRequired(const InputInfo::Ptr& info, const Blob::Ptr& blob) { + bool preProcessingRequired(const InputInfo::Ptr& info, const Blob::Ptr& userBlob, const Blob::Ptr& deviceBlob = nullptr) { // pre-processing is required if: // 1. resize algorithm is specified (resize required) // 2. color format specified: // 2.a. color format is not equal to network's expected (color conversion required) // 2.b. network's layout != blob's layout (reorder required) + // 3. precision conversion is required + const auto& preProcessInfo = info->getPreProcess(); const auto inputColorFormat = preProcessInfo.getColorFormat(); // FIXME: support other network's input formats once the API is ready. Assuming input is in // the BGR format by default const auto networkColorFormat = ColorFormat::BGR; - const bool colorFormatSpecified = inputColorFormat != ColorFormat::RAW; + + auto blob_layout = [](const Blob::Ptr& b) { return b->getTensorDesc().getLayout(); }; + auto blob_prec = [](const Blob::Ptr& b) { return b->getTensorDesc().getPrecision();}; + + auto dst_layout = deviceBlob ? blob_layout(deviceBlob) : info->getLayout(); + auto dst_prec = deviceBlob ? blob_prec(deviceBlob) : info->getPrecision(); + + //FIXME: remove the first part to allow any needed conversion? + const bool need_layout_conv = (colorFormatSpecified || deviceBlob) && + (blob_layout(userBlob) != dst_layout); + return preProcessInfo.getResizeAlgorithm() != ResizeAlgorithm::NO_RESIZE || (colorFormatSpecified && inputColorFormat != networkColorFormat) || - (colorFormatSpecified && info->getLayout() != blob->getTensorDesc().getLayout()); + need_layout_conv || + (blob_prec(userBlob) != dst_prec); + } + + void addInputPreProcessingFor(const std::string& name, Blob::Ptr const& from, const Blob::Ptr& to) { + auto ppDataIt = _preProcData.find(name); + if (ppDataIt == _preProcData.end()) { + ppDataIt = (_preProcData.emplace(name, CreatePreprocDataHelper())).first; + } + + auto& preproc_ptr = ppDataIt->second; + preproc_ptr->isApplicable(from, to); + // Stores the given blob as ROI blob. It will be used to fill in network input + // during pre-processing + preproc_ptr->setRoiBlob(from); } }; diff --git a/inference-engine/src/preprocessing/ie_preprocess_data.cpp b/inference-engine/src/preprocessing/ie_preprocess_data.cpp index 20c743ac4415b3..660dc350bd8d45 100644 --- a/inference-engine/src/preprocessing/ie_preprocess_data.cpp +++ b/inference-engine/src/preprocessing/ie_preprocess_data.cpp @@ -758,7 +758,7 @@ class PreProcessData : public IPreProcessData { /** * @brief ROI blob. */ - Blob::Ptr _roiBlob = nullptr; + Blob::Ptr _userBlob = nullptr; Blob::Ptr _tmp1 = nullptr; Blob::Ptr _tmp2 = nullptr; @@ -773,7 +773,7 @@ class PreProcessData : public IPreProcessData { Blob::Ptr getRoiBlob() const override; - void execute(Blob::Ptr &outBlob, const PreProcessInfo& info, bool serial, int batchSize = -1) override; + void execute(Blob::Ptr &preprocessedBlob, const PreProcessInfo &info, bool serial, int batchSize = -1) override; void Release() noexcept override; @@ -790,38 +790,39 @@ void PreProcessData::Release() noexcept { } void PreProcessData::setRoiBlob(const Blob::Ptr &blob) { - _roiBlob = blob; + _userBlob = blob; } Blob::Ptr PreProcessData::getRoiBlob() const { - return _roiBlob; + return _userBlob; } -void PreProcessData::execute(Blob::Ptr &outBlob, const PreProcessInfo& info, bool serial, +void PreProcessData::execute(Blob::Ptr &preprocessedBlob, const PreProcessInfo &info, bool serial, int batchSize) { OV_ITT_SCOPED_TASK(itt::domains::IEPreproc, "Preprocessing"); auto algorithm = info.getResizeAlgorithm(); auto fmt = info.getColorFormat(); - if (algorithm == NO_RESIZE && fmt == ColorFormat::RAW) { - THROW_IE_EXCEPTION << "Input pre-processing is called without the pre-processing info set: " - "there's nothing to be done"; + if (_userBlob == nullptr || preprocessedBlob == nullptr) { + THROW_IE_EXCEPTION << "Input pre-processing is called with null " << (_userBlob == nullptr ? "_userBlob" : "preprocessedBlob"); } - if (_roiBlob == nullptr) { - THROW_IE_EXCEPTION << "Input pre-processing is called without ROI blob set"; - } - - batchSize = PreprocEngine::getCorrectBatchSize(batchSize, _roiBlob); + batchSize = PreprocEngine::getCorrectBatchSize(batchSize, _userBlob); if (!_preproc) { _preproc.reset(new PreprocEngine); } - if (_preproc->preprocessWithGAPI(_roiBlob, outBlob, algorithm, fmt, serial, batchSize)) { + + if (_preproc->preprocessWithGAPI(_userBlob, preprocessedBlob, algorithm, fmt, serial, batchSize)) { return; } + if (algorithm == NO_RESIZE) { + THROW_IE_EXCEPTION << "Input pre-processing is called without the pre-processing info set: " + "there's nothing to be done"; + } + if (batchSize > 1) { THROW_IE_EXCEPTION << "Batch pre-processing is unsupported in this mode. " "Use default pre-processing instead to process batches."; @@ -834,37 +835,37 @@ void PreProcessData::execute(Blob::Ptr &outBlob, const PreProcessInfo& info, boo } Blob::Ptr res_in, res_out; - if (_roiBlob->getTensorDesc().getLayout() == NHWC) { - if (!_tmp1 || _tmp1->size() != _roiBlob->size()) { - if (_roiBlob->getTensorDesc().getPrecision() == Precision::FP32) { - _tmp1 = make_shared_blob({Precision::FP32, _roiBlob->getTensorDesc().getDims(), Layout::NCHW}); + if (_userBlob->getTensorDesc().getLayout() == NHWC) { + if (!_tmp1 || _tmp1->size() != _userBlob->size()) { + if (_userBlob->getTensorDesc().getPrecision() == Precision::FP32) { + _tmp1 = make_shared_blob({Precision::FP32, _userBlob->getTensorDesc().getDims(), Layout::NCHW}); } else { - _tmp1 = make_shared_blob({Precision::U8, _roiBlob->getTensorDesc().getDims(), Layout::NCHW}); + _tmp1 = make_shared_blob({Precision::U8, _userBlob->getTensorDesc().getDims(), Layout::NCHW}); } _tmp1->allocate(); } { OV_ITT_SCOPED_TASK(itt::domains::IEPreproc, "Reorder before"); - blob_copy(_roiBlob, _tmp1); + blob_copy(_userBlob, _tmp1); } res_in = _tmp1; } else { - res_in = _roiBlob; + res_in = _userBlob; } - if (outBlob->getTensorDesc().getLayout() == NHWC) { - if (!_tmp2 || _tmp2->size() != outBlob->size()) { - if (outBlob->getTensorDesc().getPrecision() == Precision::FP32) { - _tmp2 = make_shared_blob({Precision::FP32, outBlob->getTensorDesc().getDims(), Layout::NCHW}); + if (preprocessedBlob->getTensorDesc().getLayout() == NHWC) { + if (!_tmp2 || _tmp2->size() != preprocessedBlob->size()) { + if (preprocessedBlob->getTensorDesc().getPrecision() == Precision::FP32) { + _tmp2 = make_shared_blob({Precision::FP32, preprocessedBlob->getTensorDesc().getDims(), Layout::NCHW}); } else { - _tmp2 = make_shared_blob({Precision::U8, outBlob->getTensorDesc().getDims(), Layout::NCHW}); + _tmp2 = make_shared_blob({Precision::U8, preprocessedBlob->getTensorDesc().getDims(), Layout::NCHW}); } _tmp2->allocate(); } res_out = _tmp2; } else { - res_out = outBlob; + res_out = preprocessedBlob; } { @@ -874,7 +875,7 @@ void PreProcessData::execute(Blob::Ptr &outBlob, const PreProcessInfo& info, boo if (res_out == _tmp2) { OV_ITT_SCOPED_TASK(itt::domains::IEPreproc, "Reorder after"); - blob_copy(_tmp2, outBlob); + blob_copy(_tmp2, preprocessedBlob); } } diff --git a/inference-engine/src/preprocessing/ie_preprocess_data.hpp b/inference-engine/src/preprocessing/ie_preprocess_data.hpp index 07f574461a5e3e..35f418d5aa2b82 100644 --- a/inference-engine/src/preprocessing/ie_preprocess_data.hpp +++ b/inference-engine/src/preprocessing/ie_preprocess_data.hpp @@ -38,12 +38,14 @@ class IPreProcessData : public details::IRelease { * @brief Sets ROI blob to be resized and placed to the default input blob during pre-processing. * @param blob ROI blob. */ + //FIXME: rename to setUserBlob virtual void setRoiBlob(const Blob::Ptr &blob) = 0; /** * @brief Gets pointer to the ROI blob used for a given input. * @return Blob pointer. */ + //FIXME: rename to getUserBlob virtual Blob::Ptr getRoiBlob() const = 0; /** @@ -53,8 +55,9 @@ class IPreProcessData : public details::IRelease { * @param serial disable OpenMP threading if the value set to true. * @param batchSize batch size for pre-processing. */ - virtual void execute(Blob::Ptr &outBlob, const PreProcessInfo& info, bool serial, int batchSize = -1) = 0; + virtual void execute(Blob::Ptr &preprocessedBlob, const PreProcessInfo& info, bool serial, int batchSize = -1) = 0; + //FIXME: rename to verifyAplicable virtual void isApplicable(const Blob::Ptr &src, const Blob::Ptr &dst) = 0; }; diff --git a/inference-engine/src/preprocessing/ie_preprocess_gapi.cpp b/inference-engine/src/preprocessing/ie_preprocess_gapi.cpp index f05e6564eb3441..5f62483fff6fd2 100644 --- a/inference-engine/src/preprocessing/ie_preprocess_gapi.cpp +++ b/inference-engine/src/preprocessing/ie_preprocess_gapi.cpp @@ -276,8 +276,8 @@ void validateColorFormats(const G::Desc &in_desc, }; // verify inputs/outputs and throw on error - - if (output_color_format == ColorFormat::RAW) { + const bool color_conv_required = !((output_color_format == input_color_format) || (input_color_format == ColorFormat::RAW)); + if (color_conv_required && (output_color_format == ColorFormat::RAW)) { THROW_IE_EXCEPTION << "Network's expected color format is unspecified"; } @@ -288,7 +288,7 @@ void validateColorFormats(const G::Desc &in_desc, verify_layout(in_layout, "Input blob"); verify_layout(out_layout, "Network's blob"); - if (input_color_format == ColorFormat::RAW) { + if (!color_conv_required) { // verify input and output have the same number of channels if (in_desc.d.C != out_desc.d.C) { THROW_IE_EXCEPTION << "Input and network expected blobs have different number of " @@ -949,6 +949,13 @@ bool PreprocEngine::preprocessBlob(const BlobTypePtr &inBlob, MemoryBlob::Ptr &o out_desc_ie.getDims(), out_fmt }, algorithm }; + + if (algorithm == NO_RESIZE && std::get<0>(thisCall) == std::get<1>(thisCall)) { + //if requested output parameters match input blob no need to do anything + THROW_IE_EXCEPTION << "No job to do in the PreProcessing ?"; + return true; + } + const Update update = needUpdate(thisCall); Opt _lastComputation; @@ -986,7 +993,7 @@ bool PreprocEngine::preprocessWithGAPI(const Blob::Ptr &inBlob, Blob::Ptr &outBl return false; } - const auto out_fmt = ColorFormat::BGR; // FIXME: get expected color format from network + const auto out_fmt = (in_fmt == ColorFormat::RAW) ? ColorFormat::RAW : ColorFormat::BGR; // FIXME: get expected color format from network // output is always a memory blob auto outMemoryBlob = as(outBlob); diff --git a/inference-engine/tests_deprecated/fluid_preproc/common/fluid_tests.cpp b/inference-engine/tests_deprecated/fluid_preproc/common/fluid_tests.cpp index 2f5ebd38ab80ff..f0c60539bbb60e 100644 --- a/inference-engine/tests_deprecated/fluid_preproc/common/fluid_tests.cpp +++ b/inference-engine/tests_deprecated/fluid_preproc/common/fluid_tests.cpp @@ -1177,7 +1177,7 @@ TEST_P(PreprocTest, Performance) { case Precision::U8: Blob2Img (out_blob, out_mat, out_layout); break; case Precision::FP32: Blob2Img(out_blob, out_mat, out_layout); break; - case Precision::U16: Blob2Img(out_blob, out_mat, out_layout); break; + case Precision::U16: Blob2Img(out_blob, out_mat, out_layout); break; default: FAIL() << "Unsupported configuration"; } diff --git a/inference-engine/tests_deprecated/fluid_preproc/cpu/fluid_tests_cpu.cpp b/inference-engine/tests_deprecated/fluid_preproc/cpu/fluid_tests_cpu.cpp index 6164bb314a51d5..ec03ade000ec02 100644 --- a/inference-engine/tests_deprecated/fluid_preproc/cpu/fluid_tests_cpu.cpp +++ b/inference-engine/tests_deprecated/fluid_preproc/cpu/fluid_tests_cpu.cpp @@ -394,7 +394,7 @@ INSTANTIATE_TEST_CASE_P(ColorFormat_NV12, PreprocTest, Values(TEST_SIZES_PREPROC))); -INSTANTIATE_TEST_CASE_P(DISABLED_PlainPrecisionConversions, PreprocTest, +INSTANTIATE_TEST_CASE_P(PlainPrecisionConversions, PreprocTest, Combine(Values(std::make_pair(IE::Precision::U16,IE::Precision::FP32), std::make_pair(IE::Precision::FP32,IE::Precision::U16) ), @@ -415,5 +415,5 @@ INSTANTIATE_TEST_CASE_P(PrecisionConversionsPipelines, PreprocTest, Values(IE::ColorFormat::RAW), Values(IE::Layout::NHWC, IE::Layout::NCHW), Values(IE::Layout::NHWC, IE::Layout::NCHW), - Values(std::make_pair(1, 1)/*, std::make_pair(3, 3)*/), //U16 Split and Merge are not there + Values(std::make_pair(1, 1), std::make_pair(3, 3)), Values(TEST_SIZES_PREPROC))); From 77ecd7e17c6edce3f99e611459809a5f2353d0f1 Mon Sep 17 00:00:00 2001 From: Dmitrii Ryzhkov Date: Sun, 13 Dec 2020 22:38:29 -0800 Subject: [PATCH 066/244] Feature/drizshko/cancellable request (#2635) Added Cancelability to an Infer Request class (actually implemented for the CPU only, with a stub for other devices) --- .../src/template_infer_request.cpp | 7 + .../src/template_infer_request.hpp | 2 + .../include/cpp/ie_infer_request.hpp | 9 +- inference-engine/include/ie_common.h | 3 +- .../include/ie_iinfer_request.hpp | 6 + .../src/gna_plugin/gna_infer_request.hpp | 4 + .../src/mkldnn_plugin/mkldnn_graph.cpp | 5 + .../src/mkldnn_plugin/mkldnn_graph.h | 17 ++- .../mkldnn_plugin/mkldnn_infer_request.cpp | 5 + .../src/mkldnn_plugin/mkldnn_infer_request.h | 2 + .../base/ie_infer_async_request_base.hpp | 5 + ...nfer_async_request_thread_safe_default.hpp | 8 + .../impl/ie_infer_request_internal.hpp | 7 + .../interface/ie_iinfer_request_internal.hpp | 5 + .../behavior/infer_request_cancellation.cpp | 24 +++ .../behavior/infer_request_cancellation.hpp | 144 ++++++++++++++++++ .../mock_async_infer_request_internal.hpp | 2 + ...ync_infer_request_thread_safe_internal.hpp | 2 + .../impl/mock_infer_request_internal.hpp | 1 + .../mock_iasync_infer_request_internal.hpp | 1 + .../mocks/mock_iinfer_request.hpp | 1 + .../ngraph_functions/subgraph_builders.hpp | 7 +- 22 files changed, 262 insertions(+), 5 deletions(-) create mode 100644 inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/infer_request_cancellation.cpp create mode 100644 inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_cancellation.hpp diff --git a/docs/template_plugin/src/template_infer_request.cpp b/docs/template_plugin/src/template_infer_request.cpp index d327e71df5fd24..30c9a4c0f9fa95 100644 --- a/docs/template_plugin/src/template_infer_request.cpp +++ b/docs/template_plugin/src/template_infer_request.cpp @@ -131,6 +131,13 @@ void TemplateInferRequest::InferImpl() { } // ! [infer_request:infer_impl] +// ! [infer_request:cancel] +InferenceEngine::StatusCode TemplateInferRequest::Cancel() { + // TODO: add code to handle cancellation request + return InferenceEngine::OK; +} +// ! [infer_request:cancel] + template static void blobCopy(const Blob::Ptr& src, const Blob::Ptr& dst) { std::copy_n(InferenceEngine::as(src)->rmap().as(), diff --git a/docs/template_plugin/src/template_infer_request.hpp b/docs/template_plugin/src/template_infer_request.hpp index 666f44b4ded76f..39ee5671841657 100644 --- a/docs/template_plugin/src/template_infer_request.hpp +++ b/docs/template_plugin/src/template_infer_request.hpp @@ -40,6 +40,8 @@ class TemplateInferRequest : public InferenceEngine::InferRequestInternal { void InferImpl() override; void GetPerformanceCounts(std::map& perfMap) const override; + InferenceEngine::StatusCode Cancel() override; + // pipeline methods-stages which are used in async infer request implementation and assigned to particular executor void inferPreprocess(); void startPipeline(); diff --git a/inference-engine/include/cpp/ie_infer_request.hpp b/inference-engine/include/cpp/ie_infer_request.hpp index 55085e2c1067c1..26e5f915f8d361 100644 --- a/inference-engine/include/cpp/ie_infer_request.hpp +++ b/inference-engine/include/cpp/ie_infer_request.hpp @@ -162,6 +162,12 @@ class InferRequest { CALL_STATUS_FNC_NO_ARGS(Infer); } + StatusCode Cancel() { + ResponseDesc resp; + if (actual == nullptr) THROW_IE_EXCEPTION << "InferRequest was not initialized."; + return actual->Cancel(&resp); + } + /** * @copybrief IInferRequest::GetPerformanceCounts * @@ -233,7 +239,8 @@ class InferRequest { ResponseDesc resp; if (actual == nullptr) THROW_IE_EXCEPTION << "InferRequest was not initialized."; auto res = actual->Wait(millis_timeout, &resp); - if (res != OK && res != RESULT_NOT_READY && res != INFER_NOT_STARTED) { + if (res != OK && res != RESULT_NOT_READY && + res != INFER_NOT_STARTED && res != INFER_CANCELLED) { InferenceEngine::details::extract_exception(res, resp.msg); } return res; diff --git a/inference-engine/include/ie_common.h b/inference-engine/include/ie_common.h index cdd757103a415a..e9d228d6653c06 100644 --- a/inference-engine/include/ie_common.h +++ b/inference-engine/include/ie_common.h @@ -235,7 +235,8 @@ enum StatusCode : int { RESULT_NOT_READY = -9, NOT_ALLOCATED = -10, INFER_NOT_STARTED = -11, - NETWORK_NOT_READ = -12 + NETWORK_NOT_READ = -12, + INFER_CANCELLED = -13 }; /** diff --git a/inference-engine/include/ie_iinfer_request.hpp b/inference-engine/include/ie_iinfer_request.hpp index e5674fe7929c11..e0deaa051268b9 100644 --- a/inference-engine/include/ie_iinfer_request.hpp +++ b/inference-engine/include/ie_iinfer_request.hpp @@ -96,6 +96,12 @@ class IInferRequest : public details::IRelease { * @return Status code of the operation: InferenceEngine::OK (0) for success */ virtual StatusCode Infer(ResponseDesc* resp) noexcept = 0; + /** + * @brief Cancels current async inference request + * @param resp Optional: pointer to an already allocated object to contain information in case of failure + * @return Status code of the operation: InferenceEngine::OK (0) for success + */ + virtual StatusCode Cancel(ResponseDesc* resp) noexcept = 0; /** * @brief Queries performance measures per layer to get feedback of what is the most time consuming layer diff --git a/inference-engine/src/gna_plugin/gna_infer_request.hpp b/inference-engine/src/gna_plugin/gna_infer_request.hpp index c2a2d0c8873c22..52b9c0fdd24e49 100644 --- a/inference-engine/src/gna_plugin/gna_infer_request.hpp +++ b/inference-engine/src/gna_plugin/gna_infer_request.hpp @@ -121,5 +121,9 @@ class GNAInferRequest : public InferenceEngine::AsyncInferRequestInternal { return plg->QueryState(); } IE_SUPPRESS_DEPRECATED_END + + InferenceEngine::StatusCode Cancel() override { + return InferenceEngine::NOT_IMPLEMENTED; + } }; } // namespace GNAPluginNS diff --git a/inference-engine/src/mkldnn_plugin/mkldnn_graph.cpp b/inference-engine/src/mkldnn_plugin/mkldnn_graph.cpp index 2969029b359600..e4dba45a978596 100644 --- a/inference-engine/src/mkldnn_plugin/mkldnn_graph.cpp +++ b/inference-engine/src/mkldnn_plugin/mkldnn_graph.cpp @@ -767,6 +767,11 @@ void MKLDNNGraph::Infer(int batch) { mkldnn::stream stream = mkldnn::stream(stream::kind::eager); for (int i = 0; i < graphNodes.size(); i++) { + if (IsCancellationRequested()) { + ResetCancellationRequest(); + THROW_IE_EXCEPTION << InferenceEngine::details::as_status << InferenceEngine::INFER_CANCELLED; + } + PERF(graphNodes[i]); if (batch > 0) diff --git a/inference-engine/src/mkldnn_plugin/mkldnn_graph.h b/inference-engine/src/mkldnn_plugin/mkldnn_graph.h index 27d2480dfd1ef5..5d73376687dddd 100644 --- a/inference-engine/src/mkldnn_plugin/mkldnn_graph.h +++ b/inference-engine/src/mkldnn_plugin/mkldnn_graph.h @@ -16,6 +16,7 @@ #include #include #include +#include namespace MKLDNNPlugin { @@ -29,7 +30,7 @@ class MKLDNNGraph { Ready = 1, }; - MKLDNNGraph(): status(NotReady), eng(mkldnn::engine(mkldnn::engine::kind::cpu, 0)) {} + MKLDNNGraph(): status(NotReady), eng(mkldnn::engine(mkldnn::engine::kind::cpu, 0)), cancelation_requested(false) {} Status GetStatus() { return status; @@ -39,6 +40,10 @@ class MKLDNNGraph { return (GetStatus() == Ready); } + void Cancel() { + cancelation_requested.store(true); + } + void setConfig(const Config &cfg); void setProperty(const std::map &properties); Config getProperty(); @@ -124,6 +129,14 @@ class MKLDNNGraph { void SortTopologically(); protected: + bool IsCancellationRequested() const { + return cancelation_requested.load(); + } + + void ResetCancellationRequest() { + cancelation_requested.store(false); + } + void VisitNode(MKLDNNNodePtr node, std::vector& sortedNodes); void ForgetGraphData() { @@ -185,6 +198,8 @@ class MKLDNNGraph { InferenceEngine::CNNLayerPtr cnnLayer; size_t outIdx; }; + + std::atomic cancelation_requested; }; } // namespace MKLDNNPlugin diff --git a/inference-engine/src/mkldnn_plugin/mkldnn_infer_request.cpp b/inference-engine/src/mkldnn_plugin/mkldnn_infer_request.cpp index 54856e5a4cff8d..d415d1194e41c8 100644 --- a/inference-engine/src/mkldnn_plugin/mkldnn_infer_request.cpp +++ b/inference-engine/src/mkldnn_plugin/mkldnn_infer_request.cpp @@ -149,6 +149,11 @@ void MKLDNNPlugin::MKLDNNInferRequest::InferImpl() { graph->PullOutputData(_outputs); } +InferenceEngine::StatusCode MKLDNNPlugin::MKLDNNInferRequest::Cancel() { + graph->Cancel(); + return InferenceEngine::OK; +} + void MKLDNNPlugin::MKLDNNInferRequest::GetPerformanceCounts( std::map &perfMap) const { if (!graph || !graph->IsReady()) diff --git a/inference-engine/src/mkldnn_plugin/mkldnn_infer_request.h b/inference-engine/src/mkldnn_plugin/mkldnn_infer_request.h index e9863be75f0a69..58450d2a095c6b 100644 --- a/inference-engine/src/mkldnn_plugin/mkldnn_infer_request.h +++ b/inference-engine/src/mkldnn_plugin/mkldnn_infer_request.h @@ -25,6 +25,8 @@ class MKLDNNInferRequest : public InferenceEngine::InferRequestInternal { void InferImpl() override; + InferenceEngine::StatusCode Cancel() override; + void GetPerformanceCounts(std::map &perfMap) const override; /** diff --git a/inference-engine/src/plugin_api/cpp_interfaces/base/ie_infer_async_request_base.hpp b/inference-engine/src/plugin_api/cpp_interfaces/base/ie_infer_async_request_base.hpp index 18ddb2a2e26548..ba4e76474482e4 100644 --- a/inference-engine/src/plugin_api/cpp_interfaces/base/ie_infer_async_request_base.hpp +++ b/inference-engine/src/plugin_api/cpp_interfaces/base/ie_infer_async_request_base.hpp @@ -38,6 +38,11 @@ class InferRequestBase : public IInferRequest { TO_STATUS(_impl->Infer()); } + StatusCode Cancel(ResponseDesc* resp) noexcept override { + OV_ITT_SCOPED_TASK(itt::domains::Plugin, "Cancel"); + NO_EXCEPT_CALL_RETURN_STATUS(_impl->Cancel()); + } + StatusCode GetPerformanceCounts(std::map& perfMap, ResponseDesc* resp) const noexcept override { TO_STATUS(_impl->GetPerformanceCounts(perfMap)); diff --git a/inference-engine/src/plugin_api/cpp_interfaces/impl/ie_infer_async_request_thread_safe_default.hpp b/inference-engine/src/plugin_api/cpp_interfaces/impl/ie_infer_async_request_thread_safe_default.hpp index 71d2f5a75f86ab..e310a1a149341c 100644 --- a/inference-engine/src/plugin_api/cpp_interfaces/impl/ie_infer_async_request_thread_safe_default.hpp +++ b/inference-engine/src/plugin_api/cpp_interfaces/impl/ie_infer_async_request_thread_safe_default.hpp @@ -156,6 +156,14 @@ class AsyncInferRequestThreadSafeDefault : public AsyncInferRequestThreadSafeInt return _syncRequest->QueryState(); } + StatusCode Cancel() override { + StatusCode status = Wait(IInferRequest::WaitMode::STATUS_ONLY); + if (status == INFER_NOT_STARTED) { + return status; + } + return _syncRequest->Cancel(); + } + protected: /** * @brief Each pipeline stage is a @ref Task that is executed by specified ITaskExecutor implementation diff --git a/inference-engine/src/plugin_api/cpp_interfaces/impl/ie_infer_request_internal.hpp b/inference-engine/src/plugin_api/cpp_interfaces/impl/ie_infer_request_internal.hpp index 5676802b869df8..ab206d6ffae145 100644 --- a/inference-engine/src/plugin_api/cpp_interfaces/impl/ie_infer_request_internal.hpp +++ b/inference-engine/src/plugin_api/cpp_interfaces/impl/ie_infer_request_internal.hpp @@ -63,6 +63,13 @@ class InferRequestInternal : virtual public IInferRequestInternal { InferImpl(); } + /** + * @brief Default common implementation for all plugins + */ + StatusCode Cancel() override { + return InferenceEngine::NOT_IMPLEMENTED; + } + /** * @brief Given optional implementation of setting blob to avoid need for it to be implemented by plugin * @param name - a name of input or output blob. diff --git a/inference-engine/src/plugin_api/cpp_interfaces/interface/ie_iinfer_request_internal.hpp b/inference-engine/src/plugin_api/cpp_interfaces/interface/ie_iinfer_request_internal.hpp index d749c4b75b2e07..a15165fb283dd6 100644 --- a/inference-engine/src/plugin_api/cpp_interfaces/interface/ie_iinfer_request_internal.hpp +++ b/inference-engine/src/plugin_api/cpp_interfaces/interface/ie_iinfer_request_internal.hpp @@ -39,6 +39,11 @@ class IInferRequestInternal { */ virtual void Infer() = 0; + /** + * @brief Cancel current inference request execution + */ + virtual StatusCode Cancel() = 0; + /** * @brief Queries performance measures per layer to get feedback of what is the most time consuming layer. * Note: not all plugins may provide meaningful data diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/infer_request_cancellation.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/infer_request_cancellation.cpp new file mode 100644 index 00000000000000..2598acad66f14a --- /dev/null +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/infer_request_cancellation.cpp @@ -0,0 +1,24 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "behavior/infer_request_cancellation.hpp" + +using namespace BehaviorTestsDefinitions; +namespace { +const std::vector netPrecisions = { + InferenceEngine::Precision::FP32, + InferenceEngine::Precision::FP16 +}; + +const std::vector> configs = { + {}, +}; + +INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, CancellationTests, + ::testing::Combine( + ::testing::ValuesIn(netPrecisions), + ::testing::Values(CommonTestUtils::DEVICE_CPU), + ::testing::ValuesIn(configs)), + CancellationTests::getTestCaseName); +} // namespace diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_cancellation.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_cancellation.hpp new file mode 100644 index 00000000000000..6b6e2f222848b9 --- /dev/null +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_cancellation.hpp @@ -0,0 +1,144 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include +#include +#include "ie_extension.h" +#include +#include "functional_test_utils/layer_test_utils.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "ngraph_functions/builders.hpp" +#include +#include +#include "common_test_utils/common_utils.hpp" +#include "functional_test_utils/plugin_cache.hpp" +#include "functional_test_utils/blob_utils.hpp" +#include "ngraph_functions/pass/convert_prc.hpp" +#include "ngraph_functions/subgraph_builders.hpp" +#include "behavior/infer_request_cancellation.hpp" + +namespace BehaviorTestsDefinitions { +using CancellationTests = BehaviorTestsUtils::BehaviorTestsBasic; + +TEST_P(CancellationTests, canCancelAsyncRequest) { + // Skip test according to plugin specific disabledTestPatterns() (if any) + SKIP_IF_CURRENT_TEST_IS_DISABLED() + std::shared_ptr largeNetwork = ngraph::builder::subgraph::makeConvPoolRelu({1, 3, 640, 640}); + // Create CNNNetwork from ngrpah::Function + InferenceEngine::CNNNetwork cnnNet(largeNetwork); + // Load CNNNetwork to target plugins + auto execNet = ie->LoadNetwork(cnnNet, targetDevice, configuration); + // Create InferRequest + InferenceEngine::InferRequest req = execNet.CreateInferRequest(); + bool cancelled = false; + req.SetCompletionCallback>( + [&](InferenceEngine::InferRequest request, InferenceEngine::StatusCode status) { + if (targetDevice == CommonTestUtils::DEVICE_CPU) { + cancelled = (status == InferenceEngine::StatusCode::INFER_CANCELLED); + } + }); + + req.StartAsync(); + InferenceEngine::StatusCode cancelStatus = req.Cancel(); + InferenceEngine::StatusCode waitStatus = req.Wait(InferenceEngine::IInferRequest::WaitMode::RESULT_READY); + + if (targetDevice == CommonTestUtils::DEVICE_CPU) { + ASSERT_EQ(true, cancelStatus == InferenceEngine::StatusCode::OK || + cancelStatus == InferenceEngine::StatusCode::INFER_NOT_STARTED); + if (cancelStatus == InferenceEngine::StatusCode::OK) { + ASSERT_EQ(true, cancelled); + ASSERT_EQ(static_cast(InferenceEngine::StatusCode::INFER_CANCELLED), waitStatus); + } else { + ASSERT_EQ(false, cancelled); + ASSERT_EQ(static_cast(InferenceEngine::StatusCode::OK), waitStatus); + } + } else { + ASSERT_EQ(static_cast(InferenceEngine::StatusCode::NOT_IMPLEMENTED), cancelStatus); + ASSERT_EQ(static_cast(InferenceEngine::StatusCode::OK), waitStatus); + } +} + +TEST_P(CancellationTests, canResetAfterCancelAsyncRequest) { + // Skip test according to plugin specific disabledTestPatterns() (if any) + SKIP_IF_CURRENT_TEST_IS_DISABLED() + // Create CNNNetwork from ngrpah::Function + InferenceEngine::CNNNetwork cnnNet(function); + // Load CNNNetwork to target plugins + auto execNet = ie->LoadNetwork(cnnNet, targetDevice, configuration); + // Create InferRequest + InferenceEngine::InferRequest req = execNet.CreateInferRequest(); + + req.StartAsync(); + req.Cancel(); + req.Wait(InferenceEngine::IInferRequest::WaitMode::RESULT_READY); + + req.StartAsync(); + InferenceEngine::StatusCode waitStatus = req.Wait(InferenceEngine::IInferRequest::WaitMode::RESULT_READY); + + ASSERT_EQ(static_cast(InferenceEngine::StatusCode::OK), waitStatus); +} + +TEST_P(CancellationTests, canCancelBeforeAsyncRequest) { + // Skip test according to plugin specific disabledTestPatterns() (if any) + SKIP_IF_CURRENT_TEST_IS_DISABLED() + // Create CNNNetwork from ngrpah::Function + InferenceEngine::CNNNetwork cnnNet(function); + // Load CNNNetwork to target plugins + auto execNet = ie->LoadNetwork(cnnNet, targetDevice, configuration); + // Create InferRequest + InferenceEngine::InferRequest req = execNet.CreateInferRequest(); + + InferenceEngine::StatusCode cancelStatus = req.Cancel(); + + if (targetDevice == CommonTestUtils::DEVICE_CPU) { + ASSERT_EQ(static_cast(InferenceEngine::StatusCode::INFER_NOT_STARTED), cancelStatus); + } else { + ASSERT_EQ(static_cast(InferenceEngine::StatusCode::NOT_IMPLEMENTED), cancelStatus); + } +} + +TEST_P(CancellationTests, canCancelInferRequest) { + // Skip test according to plugin specific disabledTestPatterns() (if any) + SKIP_IF_CURRENT_TEST_IS_DISABLED() + // Create function with large input, to have a time to Cancel request + std::shared_ptr largeNetwork = ngraph::builder::subgraph::makeConvPoolRelu({1, 3, 640, 640}); + // Create CNNNetwork from ngrpah::Function + InferenceEngine::CNNNetwork cnnNet(largeNetwork); + // Load CNNNetwork to target plugins + auto execNet = ie->LoadNetwork(cnnNet, targetDevice, configuration); + // Create InferRequest + InferenceEngine::InferRequest req = execNet.CreateInferRequest(); + + auto infer = std::async(std::launch::async, [&req]{ req.Infer(); }); + + const auto statusOnly = InferenceEngine::IInferRequest::WaitMode::STATUS_ONLY; + while (req.Wait(statusOnly) == InferenceEngine::StatusCode::INFER_NOT_STARTED) { + } + + InferenceEngine::StatusCode cancelStatus = req.Cancel(); + InferenceEngine::StatusCode inferStatus = InferenceEngine::StatusCode::OK; + + try { + infer.get(); + } catch (InferenceEngine::details::InferenceEngineException& ex) { + inferStatus = ex.getStatus(); + } + + if (targetDevice == CommonTestUtils::DEVICE_CPU) { + if (cancelStatus == InferenceEngine::StatusCode::OK) { + ASSERT_EQ(static_cast(InferenceEngine::StatusCode::INFER_CANCELLED), inferStatus); + } else { + ASSERT_EQ(static_cast(InferenceEngine::StatusCode::OK), inferStatus); + } + } else { + ASSERT_EQ(static_cast(InferenceEngine::StatusCode::NOT_IMPLEMENTED), cancelStatus); + ASSERT_EQ(static_cast(InferenceEngine::StatusCode::OK), inferStatus); + } +} +} // namespace BehaviorTestsDefinitions diff --git a/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/cpp_interfaces/impl/mock_async_infer_request_internal.hpp b/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/cpp_interfaces/impl/mock_async_infer_request_internal.hpp index c4d01477b082bc..e0a339c1cd3c80 100644 --- a/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/cpp_interfaces/impl/mock_async_infer_request_internal.hpp +++ b/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/cpp_interfaces/impl/mock_async_infer_request_internal.hpp @@ -32,4 +32,6 @@ class MockAsyncInferRequestInternal : public AsyncInferRequestInternal { MOCK_METHOD1(setNetworkOutputs, void(OutputsDataMap)); MOCK_METHOD2(GetBlob, void(const char *name, Blob::Ptr &)); MOCK_METHOD1(SetCompletionCallback, void(IInferRequest::CompletionCallback)); + MOCK_METHOD0(Cancel, InferenceEngine::StatusCode()); + MOCK_METHOD0(Cancel_ThreadUnsafe, InferenceEngine::StatusCode()); }; diff --git a/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/cpp_interfaces/impl/mock_async_infer_request_thread_safe_internal.hpp b/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/cpp_interfaces/impl/mock_async_infer_request_thread_safe_internal.hpp index d487b9d22ed9d4..9432958c4dc72d 100644 --- a/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/cpp_interfaces/impl/mock_async_infer_request_thread_safe_internal.hpp +++ b/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/cpp_interfaces/impl/mock_async_infer_request_thread_safe_internal.hpp @@ -62,4 +62,6 @@ class MockAsyncInferRequestThreadSafeInternal : public AsyncInferRequestThreadSa MOCK_METHOD1(SetBatch, void(int)); MOCK_METHOD1(SetBatch_ThreadUnsafe, void(int)); MOCK_METHOD0(QueryState, std::vector>(void)); + + MOCK_METHOD0(Cancel, InferenceEngine::StatusCode()); }; diff --git a/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/cpp_interfaces/impl/mock_infer_request_internal.hpp b/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/cpp_interfaces/impl/mock_infer_request_internal.hpp index 67d3f66cbc98af..8c68e5630c3193 100644 --- a/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/cpp_interfaces/impl/mock_infer_request_internal.hpp +++ b/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/cpp_interfaces/impl/mock_infer_request_internal.hpp @@ -22,4 +22,5 @@ class MockInferRequestInternal : public InferRequestInternal { using InferRequestInternal::GetBlob; MOCK_METHOD0(InferImpl, void()); MOCK_CONST_METHOD1(GetPerformanceCounts, void(std::map &)); + MOCK_METHOD0(Cancel, InferenceEngine::StatusCode()); }; diff --git a/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/cpp_interfaces/interface/mock_iasync_infer_request_internal.hpp b/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/cpp_interfaces/interface/mock_iasync_infer_request_internal.hpp index 942eae7e65aa28..56d1bcd4611fef 100644 --- a/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/cpp_interfaces/interface/mock_iasync_infer_request_internal.hpp +++ b/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/cpp_interfaces/interface/mock_iasync_infer_request_internal.hpp @@ -28,4 +28,5 @@ class MockIAsyncInferRequestInternal : public InferenceEngine::IAsyncInferReques MOCK_METHOD1(SetCompletionCallback, void(InferenceEngine::IInferRequest::CompletionCallback)); MOCK_METHOD1(SetBatch, void(int)); MOCK_METHOD0(QueryState, std::vector()); + MOCK_METHOD0(Cancel, InferenceEngine::StatusCode()); }; diff --git a/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/mock_iinfer_request.hpp b/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/mock_iinfer_request.hpp index 613898a64927d6..235c1cee296a8d 100644 --- a/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/mock_iinfer_request.hpp +++ b/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/mock_iinfer_request.hpp @@ -35,4 +35,5 @@ class MockIInferRequest : public IInferRequest { MOCK_QUALIFIED_METHOD4(SetBlob, noexcept, StatusCode(const char*, const Blob::Ptr&, const PreProcessInfo&, ResponseDesc*)); MOCK_QUALIFIED_METHOD2(SetBatch, noexcept, StatusCode(int batch, ResponseDesc*)); MOCK_QUALIFIED_METHOD3(QueryState, noexcept, StatusCode(IVariableState::Ptr &, size_t, ResponseDesc *)); + MOCK_QUALIFIED_METHOD1(Cancel, noexcept, InferenceEngine::StatusCode(ResponseDesc*)); }; diff --git a/inference-engine/tests/ngraph_helpers/ngraph_functions/include/ngraph_functions/subgraph_builders.hpp b/inference-engine/tests/ngraph_helpers/ngraph_functions/include/ngraph_functions/subgraph_builders.hpp index 9aef1dfacbf110..84a3dc31a22383 100644 --- a/inference-engine/tests/ngraph_helpers/ngraph_functions/include/ngraph_functions/subgraph_builders.hpp +++ b/inference-engine/tests/ngraph_helpers/ngraph_functions/include/ngraph_functions/subgraph_builders.hpp @@ -13,7 +13,8 @@ static std::shared_ptr makeConvPoolRelu(std::vector in ngraph::element::Type_t ngPrc = ngraph::element::Type_t::f32) { auto params = ngraph::builder::makeParams(ngPrc, {inputShape}); params.front()->set_friendly_name("Param_1"); - auto const1 = ngraph::opset1::Constant::create(ngraph::element::i64, ngraph::Shape{4}, ngraph::Shape{1, 32, 1, 32}); + std::vector constShape = {inputShape[0], inputShape[2], inputShape[1], inputShape[3]}; + auto const1 = ngraph::opset1::Constant::create(ngraph::element::i64, ngraph::Shape{4}, constShape); const1->set_friendly_name("Const_1"); auto reshape1 = std::make_shared(params.front(), const1, false); reshape1->set_friendly_name("Reshape_1"); @@ -27,7 +28,9 @@ static std::shared_ptr makeConvPoolRelu(std::vector in pool1->set_friendly_name("Pool_1"); auto relu1 = std::make_shared(pool1); relu1->set_friendly_name("Relu_1"); - auto const2 = ngraph::opset1::Constant::create(ngraph::element::i64, ngraph::Shape{2}, ngraph::Shape{1, 116}); + ngraph::Shape reluShape = relu1->outputs()[0].get_tensor().get_shape(); + std::vector constShape2 = {1, ngraph::shape_size(reluShape)}; + auto const2 = ngraph::opset1::Constant::create(ngraph::element::i64, ngraph::Shape{2}, constShape2); const2->set_friendly_name("Const_2"); auto reshape2 = std::make_shared(relu1, const2, false); reshape2->set_friendly_name("Reshape_2"); From ee8e9a9e8aad3e32cae29c3fd845170039229171 Mon Sep 17 00:00:00 2001 From: Maxim Shevtsov Date: Mon, 14 Dec 2020 10:27:29 +0300 Subject: [PATCH 067/244] Attempt to put some order to the single general (that differs only by messages) and typed exception, on the example of NOT_IMPLEMENTED (#3537) NOT_IMPLEMENTED status code correctly translates to the NonImplemented exception (and handled as the correspondingly typed exception) --- .../include/details/ie_exception.hpp | 2 +- .../hetero_executable_network.cpp | 96 +++++++++---------- .../multi_device_exec_network.cpp | 10 +- .../cpp_interfaces/exception2status.hpp | 19 ++++ .../impl/ie_executable_network_internal.hpp | 12 +-- .../include/behavior/core_integration.hpp | 12 +-- 6 files changed, 75 insertions(+), 76 deletions(-) diff --git a/inference-engine/include/details/ie_exception.hpp b/inference-engine/include/details/ie_exception.hpp index e85d5a6075ac0a..73babcf367723a 100644 --- a/inference-engine/include/details/ie_exception.hpp +++ b/inference-engine/include/details/ie_exception.hpp @@ -20,7 +20,7 @@ /** * @def THROW_IE_EXCEPTION - * @brief A macro used to throw the exception with a notable description + * @brief A macro used to throw general exception with a description */ #define THROW_IE_EXCEPTION throw InferenceEngine::details::InferenceEngineException(__FILE__, __LINE__) diff --git a/inference-engine/src/hetero_plugin/hetero_executable_network.cpp b/inference-engine/src/hetero_plugin/hetero_executable_network.cpp index 6ea6efd5cc4a69..a3b80cfc055d83 100644 --- a/inference-engine/src/hetero_plugin/hetero_executable_network.cpp +++ b/inference-engine/src/hetero_plugin/hetero_executable_network.cpp @@ -480,46 +480,42 @@ HeteroExecutableNetwork::HeteroExecutableNetwork(std::istream& bool loaded = false; try { executableNetwork = _heteroPlugin->GetCore()->ImportNetwork(heteroModel, deviceName, loadConfig); - } catch(InferenceEngine::details::InferenceEngineException& ie_ex) { - if (std::string::npos != std::string{ie_ex.what()}.find(NOT_IMPLEMENTED_str)) { - // read XML content - std::string xmlString; - std::getline(heteroModel, xmlString); - std::uint64_t dataSize = 0; - heteroModel.read(reinterpret_cast(&dataSize), sizeof(dataSize)); - - // read blob content - InferenceEngine::Blob::Ptr dataBlob; - if (0 != dataSize) { - dataBlob = InferenceEngine::make_shared_blob( - InferenceEngine::TensorDesc(InferenceEngine::Precision::U8, - {static_cast(dataSize)}, - InferenceEngine::Layout::C)); - dataBlob->allocate(); - heteroModel.read(dataBlob->buffer(), dataSize); - } + } catch(const InferenceEngine::NotImplemented&) { + // read XML content + std::string xmlString; + std::getline(heteroModel, xmlString); + std::uint64_t dataSize = 0; + heteroModel.read(reinterpret_cast(&dataSize), sizeof(dataSize)); + + // read blob content + InferenceEngine::Blob::Ptr dataBlob; + if (0 != dataSize) { + dataBlob = InferenceEngine::make_shared_blob( + InferenceEngine::TensorDesc(InferenceEngine::Precision::U8, + {static_cast(dataSize)}, + InferenceEngine::Layout::C)); + dataBlob->allocate(); + heteroModel.read(dataBlob->buffer(), dataSize); + } - cnnnetwork = _heteroPlugin->GetCore()->ReadNetwork(xmlString, std::move(dataBlob)); - auto inputs = cnnnetwork.getInputsInfo(); - auto inputsNode = subnetworkNode.child("inputs"); - for (auto inputNode = inputsNode.child("input"); !inputNode.empty(); inputNode = inputNode.next_sibling("input")) { - auto inputName = GetStrAttr(inputNode, "name"); - inputs[inputName]->setPrecision(Precision::FromStr(GetStrAttr(inputNode, "precision"))); - } + cnnnetwork = _heteroPlugin->GetCore()->ReadNetwork(xmlString, std::move(dataBlob)); + auto inputs = cnnnetwork.getInputsInfo(); + auto inputsNode = subnetworkNode.child("inputs"); + for (auto inputNode = inputsNode.child("input"); !inputNode.empty(); inputNode = inputNode.next_sibling("input")) { + auto inputName = GetStrAttr(inputNode, "name"); + inputs[inputName]->setPrecision(Precision::FromStr(GetStrAttr(inputNode, "precision"))); + } - auto outputsNode = subnetworkNode.child("outputs"); - for (auto outputNode = outputsNode.child("output"); !outputNode.empty(); outputNode = outputNode.next_sibling("output")) { - cnnnetwork.addOutput(GetStrAttr(outputNode, "creatorName"), GetUInt64Attr(outputNode, "index")); - } - auto outputs = cnnnetwork.getOutputsInfo(); - for (auto outputNode = outputsNode.child("output"); !outputNode.empty(); outputNode = outputNode.next_sibling("output")) { - outputs[GetStrAttr(outputNode, "name")]->setPrecision(Precision::FromStr(GetStrAttr(outputNode, "precision"))); - } - executableNetwork = _heteroPlugin->GetCore()->LoadNetwork(cnnnetwork, deviceName, loadConfig); - loaded = true; - } else { - throw; + auto outputsNode = subnetworkNode.child("outputs"); + for (auto outputNode = outputsNode.child("output"); !outputNode.empty(); outputNode = outputNode.next_sibling("output")) { + cnnnetwork.addOutput(GetStrAttr(outputNode, "creatorName"), GetUInt64Attr(outputNode, "index")); + } + auto outputs = cnnnetwork.getOutputsInfo(); + for (auto outputNode = outputsNode.child("output"); !outputNode.empty(); outputNode = outputNode.next_sibling("output")) { + outputs[GetStrAttr(outputNode, "name")]->setPrecision(Precision::FromStr(GetStrAttr(outputNode, "precision"))); } + executableNetwork = _heteroPlugin->GetCore()->LoadNetwork(cnnnetwork, deviceName, loadConfig); + loaded = true; } for (auto&& input : executableNetwork.GetInputsInfo()) { @@ -597,24 +593,20 @@ void HeteroExecutableNetwork::ExportImpl(std::ostream& heteroModel) { for (auto&& subnetwork : networks) { try { subnetwork._network.Export(heteroModel); - } catch (InferenceEngine::details::InferenceEngineException& ie_ex) { - if (std::string::npos != std::string{ie_ex.what()}.find(NOT_IMPLEMENTED_str)) { - // TODO: enable once serialization to IR v10 is implemented + } catch (const InferenceEngine::NotImplemented&) { + // TODO: enable once serialization to IR v10 is implemented #if 1 - THROW_IE_EXCEPTION << NOT_IMPLEMENTED_str - << "Device " << subnetwork._device << " does not implement Export method"; + THROW_IE_EXCEPTION_WITH_STATUS(NOT_IMPLEMENTED) + << "Device " << subnetwork._device << " does not implement Export method"; #else - pugi::xml_document doc; - auto subnet = subnetwork._clonedNetwork; - auto dataSize = static_cast(InferenceEngine::Serialization::FillXmlDoc(subnet, doc)); - doc.save(heteroModel, nullptr, pugi::format_raw); - heteroModel << std::endl; - heteroModel.write(reinterpret_cast(&dataSize), sizeof(dataSize)); - InferenceEngine::Serialization::SerializeBlobs(heteroModel, subnet); + pugi::xml_document doc; + auto subnet = subnetwork._clonedNetwork; + auto dataSize = static_cast(InferenceEngine::Serialization::FillXmlDoc(subnet, doc)); + doc.save(heteroModel, nullptr, pugi::format_raw); + heteroModel << std::endl; + heteroModel.write(reinterpret_cast(&dataSize), sizeof(dataSize)); + InferenceEngine::Serialization::SerializeBlobs(heteroModel, subnet); #endif - } else { - throw; - } } } } diff --git a/inference-engine/src/multi_device/multi_device_exec_network.cpp b/inference-engine/src/multi_device/multi_device_exec_network.cpp index b8795376b51009..2a5c50182bea15 100644 --- a/inference-engine/src/multi_device/multi_device_exec_network.cpp +++ b/inference-engine/src/multi_device/multi_device_exec_network.cpp @@ -171,9 +171,8 @@ RemoteContext::Ptr MultiDeviceExecutableNetwork::GetContext() const { } catch (const NotImplemented& ex) { } } - THROW_IE_EXCEPTION << InferenceEngine::details::as_status << StatusCode::NOT_IMPLEMENTED - << NOT_IMPLEMENTED_str << "None of the devices in the MULTI has an associated remote context." - << "Current list of devices allowed via the DEVICE_PRIORITIES config: " << devices_names; + THROW_IE_EXCEPTION_WITH_STATUS(NOT_IMPLEMENTED) << "None of the devices in the MULTI has an associated remote context." + << " Current list of devices allowed via the DEVICE_PRIORITIES config: " << devices_names; } InferenceEngine::InferRequestInternal::Ptr MultiDeviceExecutableNetwork::CreateInferRequestImpl(InferenceEngine::InputsDataMap networkInputs, @@ -210,8 +209,7 @@ IInferRequest::Ptr MultiDeviceExecutableNetwork::CreateInferRequest() { void MultiDeviceExecutableNetwork::SetConfig(const std::map &config) { auto priorities = config.find(MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES); if (priorities == config.end() || config.size() > 1) { - THROW_IE_EXCEPTION << NOT_IMPLEMENTED_str << - "The only config supported for the Network's SetConfig is MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES"; + THROW_IE_EXCEPTION << "The only config supported for the Network's SetConfig is MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES"; } else { auto multiPlugin = std::dynamic_pointer_cast(this->_plugin); assert(multiPlugin != nullptr); @@ -220,7 +218,7 @@ void MultiDeviceExecutableNetwork::SetConfig(const std::map QueryState() override { - THROW_IE_EXCEPTION << InferenceEngine::details::as_status << StatusCode::NOT_IMPLEMENTED << NOT_IMPLEMENTED_str; + THROW_IE_EXCEPTION_WITH_STATUS(NOT_IMPLEMENTED); } void SetConfig(const std::map& config) override { @@ -107,11 +107,11 @@ class ExecutableNetworkInternal : public IExecutableNetworkInternal { Parameter GetMetric(const std::string& name) const override { (void)name; - THROW_IE_EXCEPTION << InferenceEngine::details::as_status << StatusCode::NOT_IMPLEMENTED << NOT_IMPLEMENTED_str; + THROW_IE_EXCEPTION_WITH_STATUS(NOT_IMPLEMENTED); } RemoteContext::Ptr GetContext() const override { - THROW_IE_EXCEPTION << InferenceEngine::details::as_status << StatusCode::NOT_IMPLEMENTED << NOT_IMPLEMENTED_str; + THROW_IE_EXCEPTION_WITH_STATUS(NOT_IMPLEMENTED); } protected: @@ -123,7 +123,7 @@ class ExecutableNetworkInternal : public IExecutableNetworkInternal { */ virtual void ExportImpl(std::ostream& networkModel) { (void)networkModel; - THROW_IE_EXCEPTION << InferenceEngine::details::as_status << StatusCode::NOT_IMPLEMENTED << NOT_IMPLEMENTED_str; + THROW_IE_EXCEPTION_WITH_STATUS(NOT_IMPLEMENTED); } InferenceEngine::InputsDataMap _networkInputs; //!< Holds infromation about network inputs info diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/core_integration.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/core_integration.hpp index 769a684359020e..1028aae982c8a7 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/core_integration.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/core_integration.hpp @@ -61,17 +61,7 @@ namespace BehaviorTestsDefinitions { { \ try { \ __VA_ARGS__; \ - } catch(InferenceEngine::details::InferenceEngineException& ieException) { \ - auto notImplementedExceptionIsThrown = \ - std::string::npos != std::string {ieException.what()} \ - .find(NOT_IMPLEMENTED_str); \ - if (notImplementedExceptionIsThrown) { \ - GTEST_SKIP(); \ - } else { \ - FAIL() << "thrown from expression: " # __VA_ARGS__ << std::endl \ - << "what: " << ieException.what(); \ - } \ - } catch (const InferenceEngine::NotImplemented& ex) { \ + } catch (const InferenceEngine::NotImplemented&) { \ GTEST_SKIP(); \ } \ } From f1d99b5887c77257c290d47a9b27d2868291da64 Mon Sep 17 00:00:00 2001 From: Andrey Sokolov Date: Mon, 14 Dec 2020 15:49:53 +0300 Subject: [PATCH 068/244] [IE][VPU]: Add GatherElements operation to Myriad plugin(#3483) --- inference-engine/cmake/vpu_dependencies.cmake | 6 +- .../include/vpu/frontend/frontend.hpp | 1 + .../include/vpu/model/stage.hpp | 1 + .../include/vpu/stage_builder.hpp | 6 + .../src/frontend/frontend.cpp | 1 + .../src/stages/gather_elements.cpp | 130 ++++++++++++++++++ 6 files changed, 142 insertions(+), 3 deletions(-) create mode 100644 inference-engine/src/vpu/graph_transformer/src/stages/gather_elements.cpp diff --git a/inference-engine/cmake/vpu_dependencies.cmake b/inference-engine/cmake/vpu_dependencies.cmake index a477915ec8b9df..39f0b630bf608c 100644 --- a/inference-engine/cmake/vpu_dependencies.cmake +++ b/inference-engine/cmake/vpu_dependencies.cmake @@ -15,14 +15,14 @@ include(dependency_solver) set(VPU_SUPPORTED_FIRMWARES usb-ma2x8x pcie-ma2x8x) set(VPU_SUPPORTED_FIRMWARES_HASH - "abf12ace5e20f77b29743322c7e9f812446936bdcefa0ea640aa914169024e3d" - "8630649b26fc9a38f889225e552b41f1eb5ba1a9a56419c5fd8ed176f0cc2ccf") + "0a7c8d9ea263f36ba79a0d4e757afb7c021f98879de12893a68b8bdc5dade989" + "59348f716806c255c59be1c296ff98a76842f490b9b8e8c7eebaf5e66e5eebf4") # # Default packages # -set(FIRMWARE_PACKAGE_VERSION 1536) +set(FIRMWARE_PACKAGE_VERSION 1540) set(VPU_CLC_MA2X8X_VERSION "movi-cltools-20.09.2") # diff --git a/inference-engine/src/vpu/graph_transformer/include/vpu/frontend/frontend.hpp b/inference-engine/src/vpu/graph_transformer/include/vpu/frontend/frontend.hpp index c8253294f3c253..fcec361cc3a10c 100644 --- a/inference-engine/src/vpu/graph_transformer/include/vpu/frontend/frontend.hpp +++ b/inference-engine/src/vpu/graph_transformer/include/vpu/frontend/frontend.hpp @@ -172,6 +172,7 @@ class FrontEnd final { void parseSplit(const Model& model, const ie::CNNLayerPtr& layer, const DataVector& inputs, const DataVector& outputs) const; void parseStridedSlice(const Model& model, const ie::CNNLayerPtr& layer, const DataVector& inputs, const DataVector& outputs) const; void parseDSR(const Model& model, const ie::CNNLayerPtr& layer, const DataVector& inputs, const DataVector& outputs); + void parseGatherElements(const Model &model, const ie::CNNLayerPtr &layer, const DataVector &inputs, const DataVector &outputs) const; // // Parser with data sharing diff --git a/inference-engine/src/vpu/graph_transformer/include/vpu/model/stage.hpp b/inference-engine/src/vpu/graph_transformer/include/vpu/model/stage.hpp index e24097ac6df78b..4ef1baa21b8b2a 100644 --- a/inference-engine/src/vpu/graph_transformer/include/vpu/model/stage.hpp +++ b/inference-engine/src/vpu/graph_transformer/include/vpu/model/stage.hpp @@ -174,6 +174,7 @@ VPU_DECLARE_ENUM(StageType, GatherND = 136, HSwish = 137, Ceiling = 138, + GatherElements = 139, ) // diff --git a/inference-engine/src/vpu/graph_transformer/include/vpu/stage_builder.hpp b/inference-engine/src/vpu/graph_transformer/include/vpu/stage_builder.hpp index 5143c87bcbc112..7a24cdac47a826 100644 --- a/inference-engine/src/vpu/graph_transformer/include/vpu/stage_builder.hpp +++ b/inference-engine/src/vpu/graph_transformer/include/vpu/stage_builder.hpp @@ -340,6 +340,12 @@ class StageBuilder final { float factor, const Data& input, const Data& output); + + Stage addGatherElementsStage(const Model &model, + const std::string &name, + const ie::CNNLayerPtr &layer, + const Data &input, const Data &indices, + const Data &output, int32_t axis); }; } // namespace vpu diff --git a/inference-engine/src/vpu/graph_transformer/src/frontend/frontend.cpp b/inference-engine/src/vpu/graph_transformer/src/frontend/frontend.cpp index f48edf20e6bc33..91c2ffb65fadbf 100644 --- a/inference-engine/src/vpu/graph_transformer/src/frontend/frontend.cpp +++ b/inference-engine/src/vpu/graph_transformer/src/frontend/frontend.cpp @@ -136,6 +136,7 @@ FrontEnd::FrontEnd(StageBuilder::Ptr stageBuilder, const ie::ICore* core) {"GatherND", LAYER_PARSER(parseGatherND)}, {"HSwish", LAYER_PARSER(parseHSwish)}, {"Ceiling", LAYER_PARSER(parseCeiling)}, + {"GatherElements", LAYER_PARSER(parseGatherElements)}, }} { VPU_THROW_UNLESS(_core != nullptr, "Argument core is null"); } diff --git a/inference-engine/src/vpu/graph_transformer/src/stages/gather_elements.cpp b/inference-engine/src/vpu/graph_transformer/src/stages/gather_elements.cpp new file mode 100644 index 00000000000000..62548a2bd4c2b4 --- /dev/null +++ b/inference-engine/src/vpu/graph_transformer/src/stages/gather_elements.cpp @@ -0,0 +1,130 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include + +#include +#include + +namespace vpu { + +namespace { + +class GatherElementsStage final : public StageNode { +public: + using StageNode::StageNode; + +protected: + StagePtr cloneImpl() const override { + return std::make_shared(*this); + } + + void propagateDataOrderImpl(StageDataInfo &orderInfo) override { + const auto input1 = inputEdge(0)->input(); + const auto input2 = inputEdge(1)->input(); + const auto output = outputEdge(0)->output(); + + orderInfo.setInput(inputEdge(0), + DimsOrder::fromNumDims(input1->desc().numDims())); + orderInfo.setInput(inputEdge(1), + DimsOrder::fromNumDims(input2->desc().numDims())); + orderInfo.setOutput(outputEdge(0), + DimsOrder::fromNumDims(output->desc().numDims())); + } + + void getDataStridesRequirementsImpl( + StageDataInfo &stridesInfo) override { + for (const auto &inEdge : inputEdges()) { + stridesInfo.setInput(inEdge, StridesRequirement::compact()); + } + stridesInfo.setOutput(outputEdge(0), StridesRequirement::compact()); + } + + void finalizeDataLayoutImpl() override {} + + void + getBatchSupportInfoImpl(StageDataInfo &batchInfo) override {} + + StageSHAVEsRequirements getSHAVEsRequirementsImpl() const override { + return StageSHAVEsRequirements::NotNeeded; + } + + void initialCheckImpl() const override { + VPU_THROW_UNLESS(numInputs() == 2, + "{} stage with name {} must have only 1 output, actually " + "provided {} inputs", + type(), name(), numInputs()); + VPU_THROW_UNLESS(numOutputs() == 1, + "{} stage with name {} must have only 1 output, actually " + "provided {} outputs", + type(), name(), numInputs()); + VPU_THROW_UNLESS(inputs()[0]->desc().type() == outputs()[0]->desc().type(), + "First input and output must have the same DataType, " + "actual input type is {} and output type is {}", + inputs()[0]->desc().type(), outputs()[0]->desc().type()); + assertInputsOutputsTypes( + this, {{DataType::U8, DataType::FP16, DataType::S32}, {DataType::S32}}, + {{DataType::U8, DataType::FP16, DataType::S32}}); + } + + void serializeParamsImpl(BlobSerializer &serializer) const override { + const auto axis = attrs().get("axis"); + serializer.append(axis); + } + + void serializeDataImpl(BlobSerializer &serializer) const override { + auto input0 = inputEdge(0)->input(); + auto input1 = inputEdge(1)->input(); + auto output = outputEdge(0)->output(); + + input0->serializeBuffer(serializer); + output->serializeBuffer(serializer); + input1->serializeBuffer(serializer); + } +}; + +}// namespace + +Stage StageBuilder::addGatherElementsStage(const Model &model, + const std::string &name, + const ie::CNNLayerPtr &layer, + const Data &input, const Data &indices, + const Data &output, int32_t axis) { + auto stage = model->addNewStage( + layer->name, StageType::GatherElements, layer, {input, indices}, {output}); + + stage->attrs().set("axis", axis); + + return stage; +} + +void FrontEnd::parseGatherElements(const Model &model, const ie::CNNLayerPtr &layer, + const DataVector &inputs, + const DataVector &outputs) const { + VPU_THROW_UNLESS(layer, "CNNLayer pointer is null."); + VPU_THROW_UNLESS(inputs.size() == 2, + "{} layer with name {} must have 2 inputs, actually " + "provided {} inputs", + layer->type, layer->name, inputs.size()); + VPU_THROW_UNLESS(outputs.size() == 1, + "{} layer with name {} must have only 1 output, actually " + "provided {} outputs", + layer->type, layer->name, outputs.size()); + + const auto axis = layer->GetParamAsInt("axis"); + const auto rank = inputs[0]->desc().numDims(); + + VPU_THROW_UNLESS(rank >= 1, "rank has to be more than or equal to 1, actually {}", rank); + VPU_THROW_UNLESS(inputs[1]->desc().numDims() == rank, "rank of the second input must be equal to {}, actually {}", + rank, inputs[1]->desc().numDims()); + VPU_THROW_UNLESS(outputs[0]->desc().numDims() == rank, "rank of output must be equal to {}, actually {}", + rank, outputs[0]->desc().numDims()); + VPU_THROW_UNLESS(axis >= 0 && axis < rank, "axis must be in the range of [0, {}) , actually {}", + rank, axis); + + _stageBuilder->addGatherElementsStage(model, layer->name, layer, inputs[0], + inputs[1], outputs[0], axis); +} + +}// namespace vpu From 98fffe7f228ad0f802ca844a03d5091e487852c2 Mon Sep 17 00:00:00 2001 From: Yegor Kruglov Date: Mon, 14 Dec 2020 21:30:26 +0300 Subject: [PATCH 069/244] Possible fix for GroupConvolution unit test (#2584) * initial commit * initial commit * move fix to tf conv_extractor * added 3d case * fix e2e with 3d conv * remove 3d case Co-authored-by: yegor.kruglov --- model-optimizer/extensions/front/tf/conv_ext.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/model-optimizer/extensions/front/tf/conv_ext.py b/model-optimizer/extensions/front/tf/conv_ext.py index 82ae051cbb8b9e..5b89dfb7f57029 100644 --- a/model-optimizer/extensions/front/tf/conv_ext.py +++ b/model-optimizer/extensions/front/tf/conv_ext.py @@ -31,7 +31,8 @@ class Conv2DFrontExtractor(FrontExtractorOp): def extract(cls, node): attrs = tf_create_attrs(node, 2, 3) attrs.update({'op': __class__.op, - 'get_group': lambda node: 1, + 'get_group': lambda node: node.group if 'group' in node and node.group is not None else + node.in_node(0).shape[node.channel_dims] // node.kernel_shape[node.input_feature_channel], 'get_output_feature_dim': lambda node: node.kernel_shape[node.output_feature_channel], 'get_weights_permute': PermuteAttrs.Permutation(perm=int64_array([3, 2, 0, 1]), inv=int64_array([2, 3, 1, 0])) From 19154fad2b17562531ee4c8b528355a998a0d82d Mon Sep 17 00:00:00 2001 From: Gabriele Galiero Casay Date: Mon, 14 Dec 2020 19:46:39 +0100 Subject: [PATCH 070/244] Rename AvgPool to attribute exclude-pad to align with MO and layer creator (#3549) * AvgPool: Bug fix in attribute exclude-pad to align with MO and layer creator * AvgPool: Change attribute to exclude-pad in python api --- docs/ops/pooling/AvgPool_1.md | 6 +++--- ngraph/core/src/op/avg_pool.cpp | 2 +- ngraph/python/src/ngraph/opset1/ops.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/ops/pooling/AvgPool_1.md b/docs/ops/pooling/AvgPool_1.md index 7ea9be03fd7be6..450d6188f3a8cf 100644 --- a/docs/ops/pooling/AvgPool_1.md +++ b/docs/ops/pooling/AvgPool_1.md @@ -44,9 +44,9 @@ * **Default value**: None * **Required**: *yes* -* *exclude_pad* +* *exclude-pad* - * **Description**: *exclude_pad* is a type of pooling strategy for values in the padding area. For example, if *exclude_pad* is "true", zero-values in the padding are not used. + * **Description**: *exclude-pad* is a type of pooling strategy for values in the padding area. For example, if *exclude-pad* is "true", zero-values in the padding are not used. * **Range of values**: true or false * **Type**: boolean * **Default value**: None @@ -86,7 +86,7 @@ output_{j} = \frac{\sum_{i = 0}^{n}x_{i}}{n} ```xml - + ... ... diff --git a/ngraph/core/src/op/avg_pool.cpp b/ngraph/core/src/op/avg_pool.cpp index dfb411977dbdf3..64bc11acd7019c 100644 --- a/ngraph/core/src/op/avg_pool.cpp +++ b/ngraph/core/src/op/avg_pool.cpp @@ -69,7 +69,7 @@ bool op::v1::AvgPool::visit_attributes(AttributeVisitor& visitor) visitor.on_attribute("strides", m_strides); visitor.on_attribute("pads_begin", m_pads_begin); visitor.on_attribute("pads_end", m_pads_end); - visitor.on_attribute("exclude_pad", m_exclude_pad); + visitor.on_attribute("exclude-pad", m_exclude_pad); visitor.on_attribute("auto_pad", m_auto_pad); visitor.on_attribute("rounding_type", m_rounding_type); return true; diff --git a/ngraph/python/src/ngraph/opset1/ops.py b/ngraph/python/src/ngraph/opset1/ops.py index 5af81cfac4b973..95a42cd40d846f 100644 --- a/ngraph/python/src/ngraph/opset1/ops.py +++ b/ngraph/python/src/ngraph/opset1/ops.py @@ -153,7 +153,7 @@ def avg_pool( "pads_begin": pads_begin, "pads_end": pads_end, "kernel": kernel_shape, - "exclude_pad": exclude_pad, + "exclude-pad": exclude_pad, "rounding_type": rounding_type.upper(), "auto_pad": auto_pad.upper(), }, From 524b22690641f9c8999515ad9ad1548cc8a7f41c Mon Sep 17 00:00:00 2001 From: Irina Efode Date: Mon, 14 Dec 2020 22:57:24 +0300 Subject: [PATCH 071/244] [IE TESTS] Disable sporadic issue 45163 (#3611) --- .../plugin/cpu/shared_tests_instances/skip_tests_config.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/skip_tests_config.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/skip_tests_config.cpp index 08753af93815fe..eec9226f080f46 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/skip_tests_config.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/skip_tests_config.cpp @@ -59,6 +59,8 @@ std::vector disabledTestPatterns() { R"(.*Broadcast.*mode=BIDIRECTIONAL.*inNPrec=BOOL.*)", // TODO: Issue 43417 sporadic issue, looks like an issue in test, reproducible only on Windows platform R"(.*decomposition1_batch=5_hidden_size=10_input_size=30_.*tanh.relu.*_clip=0_linear_before_reset=1.*_targetDevice=CPU_.*)", + // TODO: Sporadic Issue: 45163 + R"(.*Behavior.*CancellationTests.*canResetAfterCancelAsyncRequest.*netPRC=FP16.*)", }; if (!InferenceEngine::with_cpu_x86_avx512_core()) { From 61752b806f3dc5d544ad7257ffc1c4886570eedc Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Tue, 15 Dec 2020 07:20:56 +0300 Subject: [PATCH 072/244] [IE][CMAKE] Fix for in-tree generated InferenceEngineConfig.cmake (#3593) Add `IE::` prefixed aliases for provided targets. --- inference-engine/cmake/config.cmake.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/inference-engine/cmake/config.cmake.in b/inference-engine/cmake/config.cmake.in index 31485b329a19d9..fd015955e34e56 100644 --- a/inference-engine/cmake/config.cmake.in +++ b/inference-engine/cmake/config.cmake.in @@ -4,6 +4,12 @@ if(DEFINED IE_MAIN_SOURCE_DIR AND TARGET inference_engine) set(InferenceEngine_LIBRARIES inference_engine inference_engine_c_api) + if(NOT TARGET IE::inference_engine) + add_library(IE::inference_engine ALIAS inference_engine) + endif() + if(TARGET inference_engine_c_api AND NOT TARGET IE::inference_engine_c_api) + add_library(IE::inference_engine_c_api ALIAS inference_engine_c_api) + endif() else() include("${CMAKE_CURRENT_LIST_DIR}/targets.cmake") if(NOT MSVC) From 3fb5f6357394b03d2daf4a2778c1a02651367be2 Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Tue, 15 Dec 2020 11:49:36 +0300 Subject: [PATCH 073/244] Restored gtk-3 installation (#3587) --- scripts/install_dependencies/install_openvino_dependencies.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install_dependencies/install_openvino_dependencies.sh b/scripts/install_dependencies/install_openvino_dependencies.sh index 17960f81b7f5f6..eb0bfb8fd19fbf 100755 --- a/scripts/install_dependencies/install_openvino_dependencies.sh +++ b/scripts/install_dependencies/install_openvino_dependencies.sh @@ -106,8 +106,8 @@ if [ -f /etc/lsb-release ]; then libtag-extras1 libusb-1.0-0-dev libfaac0 - python3-gi - + python3-gi + libgtk-3-0 ) fi apt update From 5da7e8dab89b2bc8eb60fbb1a8cfeeca3541a92e Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Tue, 15 Dec 2020 11:51:17 +0300 Subject: [PATCH 074/244] Fixed tests compilation for Android ARM (#3572) * Fixed tests compilation for Android ARM * Added check for size_t --- .../convert_scatter_elements_to_scatter_test.cpp | 9 +++++++-- .../plugin/shared/include/subgraph_tests/basic_lstm.hpp | 4 ++-- .../plugin/shared/src/subgraph_tests/basic_lstm.cpp | 4 ++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/inference-engine/tests/functional/inference_engine/transformations/convert_scatter_elements_to_scatter_test.cpp b/inference-engine/tests/functional/inference_engine/transformations/convert_scatter_elements_to_scatter_test.cpp index edcabe5f22675e..f9b52230e7d1d2 100644 --- a/inference-engine/tests/functional/inference_engine/transformations/convert_scatter_elements_to_scatter_test.cpp +++ b/inference-engine/tests/functional/inference_engine/transformations/convert_scatter_elements_to_scatter_test.cpp @@ -33,8 +33,13 @@ std::shared_ptr get_initial_function(const ngraph::PartialShap auto updates = std::make_shared(ngraph::element::f32, updates_shape); auto axis_const = ngraph::opset3::Constant::create(ngraph::element::i64, {1}, {axis}); - uint64_t broadcast_len = broadcast_shape.rank().get_length(); - auto broadcast_shape_param = std::make_shared(ngraph::element::i64, ngraph::Shape{broadcast_len}); + auto broadcast_len = broadcast_shape.rank().get_length(); + if (std::numeric_limits::max() < broadcast_len) { + throw ngraph::ngraph_error("broadcast_len cannot be represented in size_t"); + } + + auto broadcast_shape_param = std::make_shared(ngraph::element::i64, + ngraph::Shape{static_cast(broadcast_len)}); auto broadcast = std::make_shared(indexes, broadcast_shape_param); auto scatter = std::make_shared(data, broadcast, updates, axis_const); diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/basic_lstm.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/basic_lstm.hpp index 959ad4814213c2..e0b69c3107b3f1 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/basic_lstm.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/basic_lstm.hpp @@ -27,8 +27,8 @@ class Basic_LSTM_S : public testing::WithParamInterface, static std::string getTestCaseName(testing::TestParamInfo obj); void Run() override; - static std::shared_ptr GetNetwork(uint64_t thirdDimOut, - uint64_t hiddenSize, + static std::shared_ptr GetNetwork(size_t thirdDimOut, + size_t hiddenSize, const InferenceEngine::Precision& netPrecission = InferenceEngine::Precision::FP32, std::vector* hidden_memory_init_out = nullptr, std::vector* cell_memory_init_out = nullptr); diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/basic_lstm.cpp b/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/basic_lstm.cpp index 350ecfc2cdc89a..077a5e4db856b3 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/basic_lstm.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/basic_lstm.cpp @@ -53,8 +53,8 @@ void Basic_LSTM_S::SetUp() { function = GetNetwork(49, hidden_size, netPrecision, &hidden_memory_init, &cell_memory_init); } -std::shared_ptr Basic_LSTM_S::GetNetwork(uint64_t thirdDimOut, - uint64_t hiddenSize, +std::shared_ptr Basic_LSTM_S::GetNetwork(size_t thirdDimOut, + size_t hiddenSize, const InferenceEngine::Precision& netPrecission, std::vector* hidden_memory_init_out, std::vector* cell_memory_init_out) { From fedd7369130aee1be9797704bd2efb1098198676 Mon Sep 17 00:00:00 2001 From: Andrey Sokolov Date: Tue, 15 Dec 2020 12:32:17 +0300 Subject: [PATCH 075/244] [IE][VPU]: support DTS for Ceiling (#3562) --- .../src/ngraph/transformations/dynamic_to_static_shape.cpp | 1 + .../dynamic_to_static_shape_unary_elementwise.cpp | 2 ++ .../plugin/myriad/subgraph_tests/dsr_unary_elementwise.cpp | 1 + 3 files changed, 4 insertions(+) diff --git a/inference-engine/src/vpu/common/src/ngraph/transformations/dynamic_to_static_shape.cpp b/inference-engine/src/vpu/common/src/ngraph/transformations/dynamic_to_static_shape.cpp index f0004f09616bce..4dbaac8dce64b1 100644 --- a/inference-engine/src/vpu/common/src/ngraph/transformations/dynamic_to_static_shape.cpp +++ b/inference-engine/src/vpu/common/src/ngraph/transformations/dynamic_to_static_shape.cpp @@ -108,6 +108,7 @@ const Transformations& getDefaultTransformations() { {ngraph::opset3::Convert::type_info, dynamicToStaticUnaryElementwise}, {ngraph::opset3::Clamp::type_info, dynamicToStaticUnaryElementwise}, {ngraph::opset3::Floor::type_info, dynamicToStaticUnaryElementwise}, + {ngraph::opset5::Ceiling::type_info, dynamicToStaticUnaryElementwise}, {ngraph::opset3::Log::type_info, dynamicToStaticUnaryElementwise}, {ngraph::opset3::Relu::type_info, dynamicToStaticUnaryElementwise}, {ngraph::opset3::ScatterUpdate::type_info, dynamicToStaticUnaryElementwise}, diff --git a/inference-engine/tests/functional/plugin/myriad/ngraph/transformations/dynamic_to_static_shape_unary_elementwise.cpp b/inference-engine/tests/functional/plugin/myriad/ngraph/transformations/dynamic_to_static_shape_unary_elementwise.cpp index ef2b83d5a7f1a8..e1864eb091c7d4 100644 --- a/inference-engine/tests/functional/plugin/myriad/ngraph/transformations/dynamic_to_static_shape_unary_elementwise.cpp +++ b/inference-engine/tests/functional/plugin/myriad/ngraph/transformations/dynamic_to_static_shape_unary_elementwise.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -90,6 +91,7 @@ INSTANTIATE_TEST_CASE_P(smoke_NGraph, DynamicToStaticShapeUnaryElementwise, test testing::Values( ngraph::opset3::Exp::type_info, ngraph::opset3::Floor::type_info, + ngraph::opset5::Ceiling::type_info, ngraph::opset3::Log::type_info, ngraph::opset3::Relu::type_info, ngraph::opset3::Sigmoid::type_info, diff --git a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_unary_elementwise.cpp b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_unary_elementwise.cpp index 1b603553f6858f..4d3e8033200b2d 100644 --- a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_unary_elementwise.cpp +++ b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_unary_elementwise.cpp @@ -46,6 +46,7 @@ INSTANTIATE_TEST_CASE_P(smoke_DynamicUnaryElementwise, DSR_UnaryElementwise, ::testing::Values(DataShapeWithUpperBound{ngraph::Shape{8, 800}, ngraph::Shape{10, 1000}}), ::testing::Values(ngraph::opset3::Exp::type_info, ngraph::opset3::Floor::type_info, + ngraph::opset5::Ceiling::type_info, ngraph::opset3::Log::type_info, ngraph::opset3::Relu::type_info, ngraph::opset3::Sigmoid::type_info, From a569a0b529881d4fe25cbba0012d03e234efbcab Mon Sep 17 00:00:00 2001 From: Alexey Suhov Date: Tue, 15 Dec 2020 19:56:42 +0300 Subject: [PATCH 076/244] [cmake] retry after hash mismatch error (#3612) * [cmake] retry after hash mismatch error --- cmake/download/download_and_check.cmake | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/cmake/download/download_and_check.cmake b/cmake/download/download_and_check.cmake index 6847435cd60b7d..19f4c16da0345c 100644 --- a/cmake/download/download_and_check.cmake +++ b/cmake/download/download_and_check.cmake @@ -22,14 +22,19 @@ function (DownloadAndCheck from to fatal result sha256) Download(${from} ${to} ${fatal} ${result} output ${sha256}) list(GET output 0 status_code) else() - message(STATUS "${WGET_EXECUTABLE} --no-cache --no-check-certificate - --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 --tries=5 ${from}") - execute_process(COMMAND ${WGET_EXECUTABLE} "--no-cache" "--no-check-certificate" - "--retry-connrefused" "--waitretry=1" "--read-timeout=20" "--timeout=15" "--tries=5" - "${from}" "-O" "${to}" - TIMEOUT 2000 - RESULT_VARIABLE status_code) - file(SHA256 ${to} CHECKSUM) + foreach(index RANGE 5) + message(STATUS "${WGET_EXECUTABLE} --no-cache --no-check-certificate + --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 --tries=5 ${from}") + execute_process(COMMAND ${WGET_EXECUTABLE} "--no-cache" "--no-check-certificate" + "--retry-connrefused" "--waitretry=1" "--read-timeout=20" "--timeout=15" "--tries=5" + "${from}" "-O" "${to}" + TIMEOUT 2000 + RESULT_VARIABLE status_code) + file(SHA256 ${to} CHECKSUM) + if (${CHECKSUM} STREQUAL ${sha256}) + break() + endif() + endforeach() if (NOT ${CHECKSUM} STREQUAL ${sha256}) message(FATAL_ERROR "Hash mismatch:\n" "expected: ${sha256}\n" From ab974e4f2ec1d2f2c67812f760ff85e11706af55 Mon Sep 17 00:00:00 2001 From: Maxim Vafin Date: Tue, 15 Dec 2020 21:36:44 +0300 Subject: [PATCH 077/244] Add MVN-6 support to ngraph (#3464) * Add MVN-6 to ngraph * Apply review feedback * Fix max opset number * Fix code style * Fix shape test * Disable reader test * Apply review feedback and remove reader test * Fix code style * Fix build * Apply review feedback * Fix build problem * Fix code style * Fix build --- .../src/readers/ir_reader/ie_ir_parser.cpp | 4 +- ngraph/core/include/ngraph/op/mvn.hpp | 78 +++++++- ngraph/core/include/ngraph/opsets/opset.hpp | 1 + ngraph/core/include/ngraph/opsets/opset6.hpp | 29 +++ .../core/include/ngraph/opsets/opset6_tbl.hpp | 176 ++++++++++++++++++ ngraph/core/src/op/mvn.cpp | 79 ++++++++ ngraph/core/src/op/util/attr_types.cpp | 1 + ngraph/core/src/opsets/opset.cpp | 21 ++- ngraph/test/type_prop/mvn.cpp | 34 ++++ 9 files changed, 416 insertions(+), 7 deletions(-) create mode 100644 ngraph/core/include/ngraph/opsets/opset6.hpp create mode 100644 ngraph/core/include/ngraph/opsets/opset6_tbl.hpp diff --git a/inference-engine/src/readers/ir_reader/ie_ir_parser.cpp b/inference-engine/src/readers/ir_reader/ie_ir_parser.cpp index ccaffc3504aa73..b2db09a4676594 100644 --- a/inference-engine/src/readers/ir_reader/ie_ir_parser.cpp +++ b/inference-engine/src/readers/ir_reader/ie_ir_parser.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -70,6 +71,7 @@ V10Parser::V10Parser(const std::vector& exts) : _exts(exts) { opsets["opset3"] = ngraph::get_opset3(); opsets["opset4"] = ngraph::get_opset4(); opsets["opset5"] = ngraph::get_opset5(); + opsets["opset6"] = ngraph::get_opset6(); // Load custom opsets for (const auto& ext : exts) { @@ -427,7 +429,7 @@ std::shared_ptr V10Parser::createNode(const std::vector bool { - for (size_t i = 1; i <= 5; i++) { + for (size_t i = 1; i <= 6; i++) { std::string opset_name = "opset" + std::to_string(i); if (version == opset_name) return true; diff --git a/ngraph/core/include/ngraph/op/mvn.hpp b/ngraph/core/include/ngraph/op/mvn.hpp index 527a7d8544fd88..bf6dd0e9248c5c 100644 --- a/ngraph/core/include/ngraph/op/mvn.hpp +++ b/ngraph/core/include/ngraph/op/mvn.hpp @@ -20,12 +20,12 @@ #include "ngraph/op/op.hpp" #include "ngraph/op/util/fused_op.hpp" -NGRAPH_SUPPRESS_DEPRECATED_START - namespace ngraph { namespace op { + NGRAPH_SUPPRESS_DEPRECATED_START + namespace v0 { /// \brief Operator performing Mean Variance Normalization @@ -87,7 +87,75 @@ namespace ngraph }; } using v0::MVN; - } // namespace op -} // namespace ngraph -NGRAPH_SUPPRESS_DEPRECATED_END + NGRAPH_SUPPRESS_DEPRECATED_END + + /// \brief Specifies how eps is applied in MVN + enum class MVNEpsMode + { + // Apply eps inside sqrt + INSIDE_SQRT, + // Apply eps outside sqrt + OUTSIDE_SQRT + }; + + NGRAPH_API + std::ostream& operator<<(std::ostream& s, const MVNEpsMode& type); + + namespace v6 + { + /// \brief Operator performing Mean Variance Normalization + /// + class NGRAPH_API MVN : public ngraph::op::Op + { + public: + NGRAPH_RTTI_DECLARATION; + + MVN() = default; + /// \brief Constructs an MVN operation. + /// + /// \param data Input tensor with data + /// \param reduction_axes A list of axes, along which to reduce. + /// \param normalize_variance flag that denotes whether to perform variance + /// normalization. + /// \param eps the number to be added to the variance to avoid division by zero when + /// normalizing the value + /// \param eps_mode the mode of applying epsilon + /// + MVN(const Output& data, + const Output& reduction_axes, + bool normalize_variance, + float eps, + MVNEpsMode eps_mode); + + bool visit_attributes(AttributeVisitor& visitor) override; + void validate_and_infer_types() override; + + std::shared_ptr + clone_with_new_inputs(const OutputVector& new_args) const override; + + float get_eps() const { return m_eps; } + bool get_normalize_variance() const { return m_normalize_variance; } + MVNEpsMode get_eps_mode() const { return m_eps_mode; } + private: + bool m_normalize_variance = true; + float m_eps = (float)1e-6; + MVNEpsMode m_eps_mode = MVNEpsMode::INSIDE_SQRT; + }; + } // namespace v6 + } // namespace op + + template <> + class NGRAPH_API AttributeAdapter + : public EnumAttributeAdapterBase + { + public: + AttributeAdapter(op::MVNEpsMode& value) + : EnumAttributeAdapterBase(value) + { + } + + static constexpr DiscreteTypeInfo type_info{"AttributeAdapter", 0}; + const DiscreteTypeInfo& get_type_info() const override { return type_info; } + }; +} // namespace ngraph diff --git a/ngraph/core/include/ngraph/opsets/opset.hpp b/ngraph/core/include/ngraph/opsets/opset.hpp index 510500a48a1ea9..abcf508d52b38a 100644 --- a/ngraph/core/include/ngraph/opsets/opset.hpp +++ b/ngraph/core/include/ngraph/opsets/opset.hpp @@ -133,4 +133,5 @@ namespace ngraph const NGRAPH_API OpSet& get_opset3(); const NGRAPH_API OpSet& get_opset4(); const NGRAPH_API OpSet& get_opset5(); + const NGRAPH_API OpSet& get_opset6(); } diff --git a/ngraph/core/include/ngraph/opsets/opset6.hpp b/ngraph/core/include/ngraph/opsets/opset6.hpp new file mode 100644 index 00000000000000..8ff1e85dd8e59e --- /dev/null +++ b/ngraph/core/include/ngraph/opsets/opset6.hpp @@ -0,0 +1,29 @@ +//***************************************************************************** +// Copyright 2017-2020 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//***************************************************************************** + +#pragma once + +#include "ngraph/ops.hpp" + +namespace ngraph +{ + namespace opset6 + { +#define NGRAPH_OP(a, b) using b::a; +#include "ngraph/opsets/opset6_tbl.hpp" +#undef NGRAPH_OP + } // namespace opset6 +} // namespace ngraph diff --git a/ngraph/core/include/ngraph/opsets/opset6_tbl.hpp b/ngraph/core/include/ngraph/opsets/opset6_tbl.hpp new file mode 100644 index 00000000000000..44363624de3c55 --- /dev/null +++ b/ngraph/core/include/ngraph/opsets/opset6_tbl.hpp @@ -0,0 +1,176 @@ +//***************************************************************************** +// Copyright 2017-2020 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//***************************************************************************** + +#ifndef NGRAPH_OP +#warning "NGRAPH_OP not defined" +#define NGRAPH_OP(x, y) +#endif + +NGRAPH_OP(Abs, ngraph::op::v0) +NGRAPH_OP(Acos, ngraph::op::v0) +NGRAPH_OP(Add, ngraph::op::v1) +NGRAPH_OP(Asin, ngraph::op::v0) +NGRAPH_OP(Atan, ngraph::op::v0) +NGRAPH_OP(AvgPool, ngraph::op::v1) +NGRAPH_OP(BatchNormInference, ngraph::op::v5) +NGRAPH_OP(BinaryConvolution, ngraph::op::v1) +NGRAPH_OP(Broadcast, ngraph::op::v3) +NGRAPH_OP(Bucketize, ngraph::op::v3) +NGRAPH_OP(CTCGreedyDecoder, ngraph::op::v0) +NGRAPH_OP(Ceiling, ngraph::op::v0) +NGRAPH_OP(Clamp, ngraph::op::v0) +NGRAPH_OP(Concat, ngraph::op::v0) +NGRAPH_OP(Constant, ngraph::op) +NGRAPH_OP(Convert, ngraph::op::v0) +NGRAPH_OP(ConvertLike, ngraph::op::v1) +NGRAPH_OP(Convolution, ngraph::op::v1) +NGRAPH_OP(ConvolutionBackpropData, ngraph::op::v1) +NGRAPH_OP(Cos, ngraph::op::v0) +NGRAPH_OP(Cosh, ngraph::op::v0) +NGRAPH_OP(CumSum, ngraph::op::v0) +NGRAPH_OP(DeformableConvolution, ngraph::op::v1) +NGRAPH_OP(DeformablePSROIPooling, ngraph::op::v1) +NGRAPH_OP(DepthToSpace, ngraph::op::v0) +NGRAPH_OP(DetectionOutput, ngraph::op::v0) +NGRAPH_OP(Divide, ngraph::op::v1) +NGRAPH_OP(Elu, ngraph::op::v0) +NGRAPH_OP(Erf, ngraph::op::v0) +NGRAPH_OP(Equal, ngraph::op::v1) +NGRAPH_OP(Exp, ngraph::op::v0) +NGRAPH_OP(ExtractImagePatches, ngraph::op::v3) +NGRAPH_OP(FakeQuantize, ngraph::op::v0) +NGRAPH_OP(Floor, ngraph::op::v0) +NGRAPH_OP(FloorMod, ngraph::op::v1) +NGRAPH_OP(Gather, ngraph::op::v1) +NGRAPH_OP(GatherTree, ngraph::op::v1) +NGRAPH_OP(Greater, ngraph::op::v1) +NGRAPH_OP(GreaterEqual, ngraph::op::v1) +NGRAPH_OP(GroupConvolution, ngraph::op::v1) +NGRAPH_OP(GroupConvolutionBackpropData, ngraph::op::v1) +NGRAPH_OP(GRN, ngraph::op::v0) +NGRAPH_OP(HardSigmoid, ngraph::op::v0) +NGRAPH_OP(Less, ngraph::op::v1) +NGRAPH_OP(LessEqual, ngraph::op::v1) +NGRAPH_OP(Log, ngraph::op::v0) +NGRAPH_OP(LogicalAnd, ngraph::op::v1) +NGRAPH_OP(LogicalNot, ngraph::op::v1) +NGRAPH_OP(LogicalOr, ngraph::op::v1) +NGRAPH_OP(LogicalXor, ngraph::op::v1) +NGRAPH_OP(LRN, ngraph::op::v0) +NGRAPH_OP(LSTMCell, ngraph::op::v4) +NGRAPH_OP(MatMul, ngraph::op::v0) +NGRAPH_OP(MaxPool, ngraph::op::v1) +NGRAPH_OP(Maximum, ngraph::op::v1) +NGRAPH_OP(Minimum, ngraph::op::v1) +NGRAPH_OP(Mod, ngraph::op::v1) +NGRAPH_OP(Multiply, ngraph::op::v1) +NGRAPH_OP(Negative, ngraph::op::v0) +NGRAPH_OP(NormalizeL2, ngraph::op::v0) +NGRAPH_OP(NotEqual, ngraph::op::v1) +NGRAPH_OP(OneHot, ngraph::op::v1) +NGRAPH_OP(PRelu, ngraph::op::v0) +NGRAPH_OP(PSROIPooling, ngraph::op::v0) +NGRAPH_OP(Pad, ngraph::op::v1) +NGRAPH_OP(Parameter, ngraph::op::v0) +NGRAPH_OP(Power, ngraph::op::v1) +NGRAPH_OP(PriorBox, ngraph::op::v0) +NGRAPH_OP(PriorBoxClustered, ngraph::op::v0) +NGRAPH_OP(Proposal, ngraph::op::v4) +NGRAPH_OP(Range, ngraph::op::v4) +NGRAPH_OP(Relu, ngraph::op::v0) +NGRAPH_OP(ReduceMax, ngraph::op::v1) +NGRAPH_OP(ReduceLogicalAnd, ngraph::op::v1) +NGRAPH_OP(ReduceLogicalOr, ngraph::op::v1) +NGRAPH_OP(ReduceMean, ngraph::op::v1) +NGRAPH_OP(ReduceMin, ngraph::op::v1) +NGRAPH_OP(ReduceProd, ngraph::op::v1) +NGRAPH_OP(ReduceSum, ngraph::op::v1) +NGRAPH_OP(RegionYolo, ngraph::op::v0) +NGRAPH_OP(ReorgYolo, ngraph::op::v0) +NGRAPH_OP(Reshape, ngraph::op::v1) +NGRAPH_OP(Result, ngraph::op::v0) +NGRAPH_OP(ReverseSequence, ngraph::op::v0) +NGRAPH_OP(ROIPooling, ngraph::op::v0) +NGRAPH_OP(ScatterNDUpdate, ngraph::op::v3) +NGRAPH_OP(Select, ngraph::op::v1) +NGRAPH_OP(Selu, ngraph::op::v0) +NGRAPH_OP(Sign, ngraph::op::v0) +NGRAPH_OP(Sigmoid, ngraph::op::v0) +NGRAPH_OP(Sin, ngraph::op::v0) +NGRAPH_OP(Sinh, ngraph::op::v0) +NGRAPH_OP(Softmax, ngraph::op::v1) +NGRAPH_OP(Sqrt, ngraph::op::v0) +NGRAPH_OP(SpaceToDepth, ngraph::op::v0) +NGRAPH_OP(Split, ngraph::op::v1) +NGRAPH_OP(SquaredDifference, ngraph::op::v0) +NGRAPH_OP(Squeeze, ngraph::op::v0) +NGRAPH_OP(StridedSlice, ngraph::op::v1) +NGRAPH_OP(Subtract, ngraph::op::v1) +NGRAPH_OP(Tan, ngraph::op::v0) +NGRAPH_OP(Tanh, ngraph::op::v0) +NGRAPH_OP(TensorIterator, ngraph::op::v0) +NGRAPH_OP(Tile, ngraph::op::v0) +NGRAPH_OP(Transpose, ngraph::op::v1) +NGRAPH_OP(Unsqueeze, ngraph::op::v0) +NGRAPH_OP(VariadicSplit, ngraph::op::v1) + +// New operations added in opset2 +NGRAPH_OP(Gelu, ngraph::op::v0) +NGRAPH_OP(BatchToSpace, ngraph::op::v1) +NGRAPH_OP(SpaceToBatch, ngraph::op::v1) + +// New operations added in opset3 +NGRAPH_OP(EmbeddingBagPackedSum, ngraph::op::v3) +NGRAPH_OP(EmbeddingSegmentsSum, ngraph::op::v3) +NGRAPH_OP(EmbeddingBagOffsetsSum, ngraph::op::v3) +NGRAPH_OP(GRUCell, ngraph::op::v3) +NGRAPH_OP(NonZero, ngraph::op::v3) +NGRAPH_OP(RNNCell, ngraph::op::v0) +NGRAPH_OP(ROIAlign, ngraph::op::v3) +NGRAPH_OP(ScatterElementsUpdate, ngraph::op::v3) +NGRAPH_OP(ScatterUpdate, ngraph::op::v3) +NGRAPH_OP(ShuffleChannels, ngraph::op::v0) +NGRAPH_OP(ShapeOf, ngraph::op::v3) +NGRAPH_OP(Assign, ngraph::op::v3) +NGRAPH_OP(ReadValue, ngraph::op::v3) +NGRAPH_OP(TopK, ngraph::op::v3) + +// New operations added in opset4 +NGRAPH_OP(Acosh, ngraph::op::v3) +NGRAPH_OP(Asinh, ngraph::op::v3) +NGRAPH_OP(Atanh, ngraph::op::v3) +NGRAPH_OP(CTCLoss, ngraph::op::v4) +NGRAPH_OP(HSwish, ngraph::op::v4) +NGRAPH_OP(Interpolate, ngraph::op::v4) +NGRAPH_OP(Mish, ngraph::op::v4) +NGRAPH_OP(ReduceL1, ngraph::op::v4) +NGRAPH_OP(ReduceL2, ngraph::op::v4) +NGRAPH_OP(SoftPlus, ngraph::op::v4) +NGRAPH_OP(Swish, ngraph::op::v4) + +// New operations added in opset5 +NGRAPH_OP(GatherND, ngraph::op::v5) +NGRAPH_OP(GRUSequence, ngraph::op::v5) +NGRAPH_OP(HSigmoid, ngraph::op::v5) +NGRAPH_OP(LogSoftmax, ngraph::op::v5) +NGRAPH_OP(Loop, ngraph::op::v5) +NGRAPH_OP(LSTMSequence, ngraph::op::v5) +NGRAPH_OP(NonMaxSuppression, ngraph::op::v5) +NGRAPH_OP(RNNSequence, ngraph::op::v5) +NGRAPH_OP(Round, ngraph::op::v5) + +// New operations added in opset6 +NGRAPH_OP(MVN, ngraph::op::v6) diff --git a/ngraph/core/src/op/mvn.cpp b/ngraph/core/src/op/mvn.cpp index 4247482fb4d31d..d76d5ada662dbc 100644 --- a/ngraph/core/src/op/mvn.cpp +++ b/ngraph/core/src/op/mvn.cpp @@ -28,6 +28,8 @@ using namespace std; using namespace ngraph; +// ------------------------------ V0 ------------------------------ + NGRAPH_SUPPRESS_DEPRECATED_START NGRAPH_RTTI_DEFINITION(op::v0::MVN, "MVN", 0); @@ -119,3 +121,80 @@ bool op::MVN::visit_attributes(AttributeVisitor& visitor) visitor.on_attribute("reduction_axes", m_reduction_axes); return true; } + +// ------------------------------ V6 ------------------------------ + +namespace ngraph +{ + template <> + NGRAPH_API EnumNames& EnumNames::get() + { + static auto enum_names = + EnumNames("op::MVNEpsMode", + {{"OUTSIDE_SQRT", op::MVNEpsMode::OUTSIDE_SQRT}, + {"INSIDE_SQRT", op::MVNEpsMode::INSIDE_SQRT}}); + return enum_names; + } + + constexpr DiscreteTypeInfo AttributeAdapter::type_info; + + std::ostream& op::operator<<(std::ostream& s, const op::MVNEpsMode& type) + { + return s << as_string(type); + } +} // namespace ngraph + +NGRAPH_RTTI_DEFINITION(op::v6::MVN, "MVN", 6); + +op::v6::MVN::MVN(const Output& data, + const Output& reduction_axes, + bool normalize_variance, + float eps, + MVNEpsMode eps_mode) + : Op({data, reduction_axes}) + , m_eps{eps} + , m_normalize_variance{normalize_variance} + , m_eps_mode{eps_mode} +{ + constructor_validate_and_infer_types(); +} + +void op::v6::MVN::validate_and_infer_types() +{ + const auto data = get_input_partial_shape(0); + const auto axes = get_input_partial_shape(1); + + if (axes.is_static()) + { + NODE_VALIDATION_CHECK(this, + is_vector(axes.to_shape()), + "Expected 1D tensor for the 'axes' input. Got: ", + axes); + + NODE_VALIDATION_CHECK( + this, + data.rank().is_dynamic() || data.rank().get_length() >= axes.get_shape()[0], + "Expected rank for the 'data' input to be higher than axes shape. Got: ", + data); + } + + set_output_type(0, get_input_element_type(0), get_input_partial_shape(0)); +} + +shared_ptr op::v6::MVN::clone_with_new_inputs(const OutputVector& new_args) const +{ + NODE_VALIDATION_CHECK(this, + new_args.size() == 2, + "Expected 2 element in new_args for the MVN op but got ", + new_args.size()); + return make_shared( + new_args.at(0), new_args.at(1), m_normalize_variance, m_eps, m_eps_mode); +} + +bool op::v6::MVN::visit_attributes(AttributeVisitor& visitor) +{ + visitor.on_attribute("eps", m_eps); + visitor.on_attribute("normalize_variance", m_normalize_variance); + visitor.on_attribute("eps_mode", m_eps_mode); + return true; +} diff --git a/ngraph/core/src/op/util/attr_types.cpp b/ngraph/core/src/op/util/attr_types.cpp index ee102f4bfff600..c120e09a7a5a99 100644 --- a/ngraph/core/src/op/util/attr_types.cpp +++ b/ngraph/core/src/op/util/attr_types.cpp @@ -128,6 +128,7 @@ namespace ngraph { return s << as_string(type); } + template <> NGRAPH_API EnumNames& EnumNames::get() { diff --git a/ngraph/core/src/opsets/opset.cpp b/ngraph/core/src/opsets/opset.cpp index 886ddca7607ec1..e737f0263662f2 100644 --- a/ngraph/core/src/opsets/opset.cpp +++ b/ngraph/core/src/opsets/opset.cpp @@ -137,4 +137,23 @@ const ngraph::OpSet& ngraph::get_opset5() } } return opset; -} \ No newline at end of file +} + +const ngraph::OpSet& ngraph::get_opset6() +{ + static std::mutex init_mutex; + static bool opset_is_initialized = false; + static OpSet opset; + if (!opset_is_initialized) + { + std::lock_guard guard(init_mutex); + if (!opset_is_initialized) + { +#define NGRAPH_OP(NAME, NAMESPACE) opset.insert(); +#include "ngraph/opsets/opset6_tbl.hpp" +#undef NGRAPH_OP + opset_is_initialized = true; + } + } + return opset; +} diff --git a/ngraph/test/type_prop/mvn.cpp b/ngraph/test/type_prop/mvn.cpp index 7b37b95a2682d6..3cf48e3daa2921 100644 --- a/ngraph/test/type_prop/mvn.cpp +++ b/ngraph/test/type_prop/mvn.cpp @@ -21,6 +21,8 @@ using namespace std; using namespace ngraph; +// ------------------------------ V0 ------------------------------ + TEST(type_prop, mvn) { auto data = make_shared(element::f32, Shape{1, 3, 6}); @@ -47,3 +49,35 @@ TEST(type_prop, mvn_partial) EXPECT_EQ(mvn_partial->get_reduction_axes(), AxisSet{}); ASSERT_TRUE(mvn_partial->get_output_partial_shape(0).same_scheme(PartialShape::dynamic())); } + +// ------------------------------ V6 ------------------------------ + +TEST(type_prop, mvn_6) +{ + auto data = make_shared(element::f32, Shape{1, 2, 3, 4}); + auto axes = make_shared(element::i64, Shape{3}); + + auto mvn_func = make_shared(data, axes, true, 1e-6, op::MVNEpsMode::INSIDE_SQRT); + EXPECT_EQ(mvn_func->get_element_type(), element::f32); + EXPECT_EQ(mvn_func->get_shape(), (Shape{1, 2, 3, 4})); +} + +TEST(type_prop, mvn_6_partial) +{ + auto data = + make_shared(element::f32, PartialShape{1, Dimension::dynamic(), 5, 6}); + auto axes = make_shared(element::i64, Shape{3}); + auto mvn_func = make_shared(data, axes, true, 1e-6, op::MVNEpsMode::INSIDE_SQRT); + EXPECT_EQ(mvn_func->get_element_type(), element::f32); + ASSERT_TRUE(mvn_func->get_output_partial_shape(0).same_scheme( + (PartialShape{1, Dimension::dynamic(), 5, 6}))); + + // rank unknown + auto mvn_partial = + make_shared(make_shared(element::f32, PartialShape::dynamic()), + axes, + true, + 1e-6, + op::MVNEpsMode::INSIDE_SQRT); + ASSERT_TRUE(mvn_partial->get_output_partial_shape(0).same_scheme(PartialShape::dynamic())); +} From ab996da9124901897f4ee111016dc03ee27b4151 Mon Sep 17 00:00:00 2001 From: Anton Chetverikov Date: Tue, 15 Dec 2020 21:39:56 +0300 Subject: [PATCH 078/244] Update port renumbering logic for constants (#3578) * Update port renumbering logic for constants * Resolve comments --- model-optimizer/mo/back/ie_ir_ver_2/emitter.py | 18 ++++++++++-------- .../mo/utils/ir_reader/layer_to_class.py | 6 ++++-- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/model-optimizer/mo/back/ie_ir_ver_2/emitter.py b/model-optimizer/mo/back/ie_ir_ver_2/emitter.py index d37f3d8164d389..9449026243f745 100644 --- a/model-optimizer/mo/back/ie_ir_ver_2/emitter.py +++ b/model-optimizer/mo/back/ie_ir_ver_2/emitter.py @@ -161,7 +161,9 @@ def xml_ports(node: Node, element: Element, edges: Element): outputs = SubElement(element, 'output') port = SubElement(outputs, 'port') port.set('id', str(d['out'])) - port_id = d['out'] - len(node.in_nodes()) + # we need to check operation type, if it is const op, we don't renumber out ports + # because they are already counted from zero + port_id = d['out'] - len(node.in_nodes()) if node.type != 'Const' else d['out'] data_type = node.out_port(port_id).get_data_type() assert data_type is not None, 'The precision is not defined for the output port {} of node {}' \ ''.format(port_id, node.soft_get('name')) @@ -436,13 +438,13 @@ def generate_ie_ir(graph: Graph, file_name: str, input_names: tuple = (), mean_o def port_renumber(graph: Graph): - for node in list(graph.nodes()): - node = Node(graph, node) - if node.kind == 'op': - base = 0 + for node in graph.get_op_nodes(): + base = 0 + # we need to check operation type, if it is const op, we don't renumber out ports to count them from zero + if node.type != 'Const': for u, d in node.get_sorted_inputs(): d['in'] = base base += 1 - for v, d in node.get_sorted_outputs(): - d['out'] = base - base += 1 + for v, d in node.get_sorted_outputs(): + d['out'] = base + base += 1 diff --git a/model-optimizer/mo/utils/ir_reader/layer_to_class.py b/model-optimizer/mo/utils/ir_reader/layer_to_class.py index 6e0db2302d0438..eb80074260442a 100644 --- a/model-optimizer/mo/utils/ir_reader/layer_to_class.py +++ b/model-optimizer/mo/utils/ir_reader/layer_to_class.py @@ -123,8 +123,10 @@ def restore_correct_ports(graph: Graph): in_port_id = d['in'] if not is_control_flow else 'control_flow_' + str(d['in']) to_node_attrs['_in_ports'].update({in_port_id: {'control_flow': is_control_flow}}) if 'out' in d: - num_of_in_nodes = len(Node(graph, u).in_nodes()) - decremented_number = d['out'] - num_of_in_nodes + node = Node(graph, u) + num_of_in_nodes = len(node.in_nodes()) + # we need to check operation type, if it is const op, we don't renumber out ports + decremented_number = d['out'] - num_of_in_nodes if node.type != 'Const' else d['out'] out_port_id = decremented_number if not is_control_flow else 'control_flow_' + str(decremented_number) from_node_attrs['_out_ports'].update({out_port_id: {'control_flow': is_control_flow}}) d['out'] = decremented_number From 602f8f2e08181fff07c8ce5a217854f0f9beab92 Mon Sep 17 00:00:00 2001 From: Irina Efode Date: Tue, 15 Dec 2020 22:32:00 +0300 Subject: [PATCH 079/244] [IE TESTS] Move SLT classes to `SharedTestClasses` lib & add serialization functionality to the common class (#3431) * [IE TESTS] Changing functional test utils structure * Example * Remove extra * Apply comments * fixes * [IE TESTS] Change the structure * Continue * step 3 * [IE TESTS] Complete transition single layer test classes * [IE TESTS] Transition Subgraph * Fix subgraph namespaces * fix * Apply comments * latm fix --- .../tests/functional/core_config.cpp | 8 + .../tests/functional/plugin_config.cpp | 8 - .../tests/functional/CMakeLists.txt | 1 + .../inference_engine/CMakeLists.txt | 2 + .../keep_constant_inputs_tests.cpp | 2 +- .../serialization/core_config.cpp | 8 + .../single_layer/variadic_split.cpp | 39 ++ .../plugin/cpu/bfloat16/bfloat16_helpers.hpp | 2 +- .../cpu/bfloat16/conv_eltwise_depthwise.cpp | 2 +- .../plugin/cpu/bfloat16/memory_conv.cpp | 2 +- .../behavior/set_preprocess.cpp | 2 +- .../{plugin_config.cpp => core_config.cpp} | 4 +- .../layer_transformation.cpp | 8 +- .../subgraph_tests/constant_result.cpp | 2 +- .../subgraph_tests/conv_eltwise_fusion.cpp | 2 +- .../convert_pad_to_group_conv.cpp | 2 +- .../subgraph_tests/matmul_squeeze_add.cpp | 2 +- .../subgraph_tests/multiply_add.cpp | 2 +- .../quantized_convolution_backprop_data.cpp | 2 +- .../quantized_group_convolution.cpp | 2 +- ...ntized_group_convolution_backprop_data.cpp | 2 +- .../subgraph_tests/quantized_mat_mul.cpp | 2 +- .../subgraph_tests/range_add.cpp | 2 +- .../subgraph_tests/relu_shape_of.cpp | 2 +- .../reshape_squeeze_reshape_relu.cpp | 2 +- .../subgraph_tests/split_concat_memory.cpp | 2 +- .../subgraph_tests/split_conv_concat.cpp | 2 +- .../cpu/single_layer_tests/activation.cpp | 2 +- .../plugin/cpu/single_layer_tests/convert.cpp | 2 +- .../plugin/cpu/single_layer_tests/crop.cpp | 2 +- .../plugin/cpu/single_layer_tests/eltwise.cpp | 2 +- .../single_layer_tests/group_convolution.cpp | 5 +- .../cpu/single_layer_tests/interpolate.cpp | 2 +- .../plugin/cpu/single_layer_tests/logical.cpp | 2 +- .../plugin/cpu/single_layer_tests/mvn.cpp | 2 +- .../cpu/single_layer_tests/normalize.cpp | 2 +- .../plugin/cpu/single_layer_tests/permute.cpp | 2 +- .../cpu/single_layer_tests/reduce_ops.cpp | 2 +- .../cpu/single_layer_tests/region_yolo.cpp | 2 +- .../subgraph_tests/include/conv_concat.hpp | 6 +- .../include/fuse_permute_reorder.hpp | 6 +- .../cpu/subgraph_tests/src/conv_concat.cpp | 4 +- .../cpu/subgraph_tests/src/eltwise_chain.cpp | 6 +- .../src/fuse_permute_reorder.cpp | 4 +- ...shape_permute_conv_permute_reshape_act.cpp | 4 +- .../plugin/cpu/test_utils/cpu_test_utils.hpp | 2 +- .../plugin/gna/pass_tests/4d_eltwise.cpp | 2 +- .../eltwise_split_over_channels_pass.cpp | 2 +- .../remove_permutations_NHWC_to_NCHW_pass.cpp | 2 +- .../{plugin_config.cpp => core_config.cpp} | 4 +- .../activation_concats_eltwise.cpp | 2 +- .../subgraph_tests/basic_lstm.cpp | 2 +- .../subgraph_tests/broadcast_power.cpp | 2 +- .../subgraph_tests/cascade_concat.cpp | 2 +- .../subgraph_tests/concat_multi_input.cpp | 2 +- .../subgraph_tests/concat_quantization.cpp | 2 +- .../subgraph_tests/constant_result.cpp | 2 +- .../subgraph_tests/delayed_copy_layer.cpp | 2 +- .../first_connect_input_concat.cpp | 2 +- .../handling_orientation_conv.cpp | 2 +- .../subgraph_tests/input_conv.cpp | 2 +- .../subgraph_tests/matmul_squeeze_add.cpp | 2 +- .../multioutput_eltwise_squeeze_eltwise.cpp | 2 +- .../negative_memory_layer_offset.cpp | 2 +- ...shape_permute_conv_permute_reshape_act.cpp | 4 +- .../reshape_squeeze_reshape_relu.cpp | 2 +- .../reshapre_permute_reshape.cpp | 2 +- .../subgraph_tests/scale_shift.cpp | 2 +- .../subgraph_tests/softsign.cpp | 2 +- .../subgraph_tests/split_conv_concat.cpp | 2 +- .../subgraph_tests/split_relu.cpp | 2 +- .../split_trivial_permute_concat.cpp | 2 +- .../subgraph_tests/trivial_concat.cpp | 2 +- .../two_fake_quantize_to_fullyconnected.cpp | 2 +- .../behavior/set_preprocess.cpp | 2 +- .../shared_tests_instances/core_config.cpp | 8 + .../layer_transformation.cpp | 10 +- .../shared_tests_instances/plugin_config.cpp | 8 - .../subgraph_tests/constant_result.cpp | 2 +- .../subgraph_tests/matmul_squeeze_add.cpp | 2 +- .../subgraph_tests/multiply_add.cpp | 2 +- ...shape_permute_conv_permute_reshape_act.cpp | 4 +- .../reshape_squeeze_reshape_relu.cpp | 2 +- .../subgraph_tests/scale_shift.cpp | 2 +- .../subgraph_tests/split_conv_concat.cpp | 2 +- .../operations/dynamic_shape_resolver.cpp | 2 +- .../behavior/set_preprocess.cpp | 2 +- .../shared_tests_instances/core_config.cpp | 8 + .../shared_tests_instances/plugin_config.cpp | 8 - .../subgraph_tests/constant_result.cpp | 2 +- .../reshape_squeeze_reshape_relu.cpp | 2 +- .../subgraph_tests/split_conv_concat.cpp | 2 +- .../out_shape_of_reshape.cpp | 2 +- .../static_shape_broadcast.cpp | 2 +- .../single_layer_tests/static_shape_nms.cpp | 2 +- .../static_shape_nonzero.cpp | 2 +- .../subgraph_tests/concat_split_transpose.cpp | 2 +- .../subgraph_tests/dsr_binary_elementwise.cpp | 2 +- .../myriad/subgraph_tests/dsr_clamp.cpp | 2 +- .../myriad/subgraph_tests/dsr_concat.cpp | 2 +- .../myriad/subgraph_tests/dsr_convert.cpp | 2 +- .../myriad/subgraph_tests/dsr_gather.cpp | 2 +- .../myriad/subgraph_tests/dsr_gather_nd.cpp | 2 +- .../myriad/subgraph_tests/dsr_matmul.cpp | 2 +- .../myriad/subgraph_tests/dsr_roialign.cpp | 2 +- .../myriad/subgraph_tests/dsr_squeeze.cpp | 2 +- .../subgraph_tests/dsr_strided_slice.cpp | 2 +- .../subgraph_tests/dsr_tests_common.hpp | 2 +- .../subgraph_tests/dsr_unary_elementwise.cpp | 2 +- .../myriad/subgraph_tests/nms_nonzero.cpp | 2 +- .../subgraph_tests/nonzero_transpose.cpp | 2 +- .../functional/plugin/shared/CMakeLists.txt | 1 + .../include/base}/behavior_test_utils.hpp | 0 .../import_export_base/import_export_base.hpp | 2 +- .../plugin/shared/include/behavior/config.hpp | 4 +- .../include/behavior/exec_graph_info.hpp | 4 +- .../shared/include/behavior/infer_request.hpp | 8 +- .../behavior/infer_request_callback.hpp | 4 +- .../behavior/infer_request_cancellation.hpp | 17 +- .../include/behavior/infer_request_config.hpp | 4 +- .../include/behavior/infer_request_input.hpp | 4 +- .../include/behavior/infer_request_output.hpp | 4 +- .../behavior/invalid_cases/proposal.hpp | 2 +- .../shared/include/behavior/perf_counters.hpp | 4 +- .../shared/include/behavior/preprocessing.hpp | 4 +- .../shared/include/behavior/set_blob.hpp | 2 +- .../include/behavior/set_blob_of_kind.hpp | 2 +- .../include/behavior/set_preprocess.hpp | 4 +- .../shared/include/behavior/stress_tests.hpp | 2 +- .../shared/include/behavior/test_plugin.hpp | 4 +- .../shared/include/behavior/version.hpp | 4 +- .../num_inputs_fusing_bin_conv.hpp | 2 +- .../unique_node_names.hpp | 2 +- .../shared/include/hetero/query_network.hpp | 2 +- .../shared/include/hetero/synthetic.hpp | 2 +- .../import_export_tests/import_nonzero.hpp | 2 +- .../import_reshape_permute_conv.hpp | 2 +- .../add_transformation.hpp | 2 +- .../clamp_transformation.hpp | 2 +- .../concat_transformation.hpp | 2 +- ...cat_with_different_precision_on_childs.hpp | 2 +- ...oncat_with_intermediate_transformation.hpp | 2 +- ...at_with_neighbors_graph_transformation.hpp | 2 +- .../concat_with_split_transformation.hpp | 2 +- .../convolution_transformation.hpp | 2 +- .../convolution_with_incorrect_weights.hpp | 2 +- .../depth_to_space_transformation.hpp | 2 +- ...e_quantize_and_avg_pool_transformation.hpp | 2 +- ...e_quantize_and_max_pool_transformation.hpp | 2 +- ...d_two_output_branches_with_convolution.hpp | 2 +- ...ize_precision_selection_transformation.hpp | 2 +- .../fake_quantize_transformation.hpp | 2 +- .../fully_connected_transformation.hpp | 2 +- .../fuse_convert_transformation.hpp | 2 +- ...uantize_and_scale_shift_transformation.hpp | 2 +- .../fuse_fake_quantize_transformation.hpp | 2 +- ...ltiply_to_fake_quantize_transformation.hpp | 2 +- ...btract_to_fake_quantize_transformation.hpp | 2 +- .../gemm_transformation.hpp | 2 +- .../group_convolution_transformation.hpp | 2 +- .../interpolate_transformation.hpp | 2 +- .../mat_mul_transformation.hpp | 2 +- .../mat_mul_with_constant_transformation.hpp | 2 +- ..._constant_fake_quantize_transformation.hpp | 2 +- ...ly_to_group_convolution_transformation.hpp | 2 +- .../multiply_transformation.hpp | 2 +- ...ultiply_with_one_parent_transformation.hpp | 2 +- .../mvn_transformation.hpp | 2 +- .../normalize_transformation.hpp | 2 +- ...put_layers_handling_in_transformations.hpp | 2 +- ...handling_in_transformations_for_concat.hpp | 2 +- ...ansformations_for_concat_multi_channel.hpp | 2 +- .../prelu_transformation.hpp | 2 +- .../relu_transformation.hpp | 2 +- .../reshape_transformation.hpp | 2 +- .../split_transformation.hpp | 2 +- .../squeeze_transformation.hpp | 2 +- ...ultiply_to_multiply_add_transformation.hpp | 2 +- .../subtract_transformation.hpp | 2 +- .../transpose_after_matmul_transformation.hpp | 2 +- .../transpose_transformation.hpp | 2 +- .../unsqueeze_transformation.hpp | 2 +- .../variadic_split_transformation.hpp | 2 +- .../conv_bias_fusion.hpp | 2 +- .../plugin_specific_ngraph_conversion.hpp | 2 +- .../include/single_layer_tests/activation.hpp | 111 +----- .../include/single_layer_tests/batch_norm.hpp | 26 +- .../single_layer_tests/batch_to_space.hpp | 25 +- .../include/single_layer_tests/broadcast.hpp | 31 +- .../include/single_layer_tests/comparison.hpp | 35 +- .../include/single_layer_tests/concat.hpp | 30 +- .../include/single_layer_tests/convert.hpp | 26 +- .../single_layer_tests/convert_like.hpp | 27 +- .../single_layer_tests/convolution.hpp | 42 +-- .../convolution_backprop_data.hpp | 42 +-- .../single_layer_tests/ctc_greedy_decoder.hpp | 47 +-- .../include/single_layer_tests/ctc_loss.hpp | 36 +- .../include/single_layer_tests/cum_sum.hpp | 22 +- .../single_layer_tests/depth_to_space.hpp | 25 +- .../single_layer_tests/detection_output.hpp | 62 +-- .../include/single_layer_tests/eltwise.hpp | 39 +- .../embedding_bag_offsets_sum.hpp | 32 +- .../embedding_bag_packed_sum.hpp | 30 +- .../embedding_segments_sum.hpp | 33 +- .../extract_image_patches.hpp | 28 +- .../single_layer_tests/fake_quantize.hpp | 59 +-- .../include/single_layer_tests/gather.hpp | 35 +- .../include/single_layer_tests/gather_nd.hpp | 33 +- .../single_layer_tests/gather_tree.hpp | 29 +- .../shared/include/single_layer_tests/grn.hpp | 48 +-- .../single_layer_tests/group_convolution.hpp | 41 +- .../group_convolution_backprop_data.hpp | 39 +- .../include/single_layer_tests/gru_cell.hpp | 29 +- .../single_layer_tests/gru_sequence.hpp | 37 +- .../single_layer_tests/interpolate.hpp | 46 +-- .../single_layer_tests/log_softmax.hpp | 33 +- .../include/single_layer_tests/logical.hpp | 48 +-- .../include/single_layer_tests/loop.hpp | 353 +++++++++++------- .../shared/include/single_layer_tests/lrn.hpp | 35 +- .../include/single_layer_tests/lstm_cell.hpp | 28 +- .../single_layer_tests/lstm_sequence.hpp | 34 +- .../include/single_layer_tests/mat_mul.hpp | 34 +- .../single_layer_tests/minimum_maximum.hpp | 30 +- .../shared/include/single_layer_tests/mvn.hpp | 22 +- .../non_max_suppression.hpp | 38 +- .../include/single_layer_tests/nonzero.hpp | 29 +- .../single_layer_tests/normalize_l2.hpp | 28 +- .../shared/include/single_layer_tests/pad.hpp | 32 +- .../include/single_layer_tests/pooling.hpp | 67 +--- .../include/single_layer_tests/power.hpp | 28 +- .../prior_box_clustered.hpp | 64 +--- .../include/single_layer_tests/proposal.hpp | 60 +-- .../single_layer_tests/psroi_pooling.hpp | 40 +- .../include/single_layer_tests/range.hpp | 43 +-- .../include/single_layer_tests/reduce_ops.hpp | 41 +- .../single_layer_tests/region_yolo.hpp | 29 +- .../include/single_layer_tests/reorg_yolo.hpp | 23 +- .../include/single_layer_tests/reshape.hpp | 32 +- .../single_layer_tests/reverse_sequence.hpp | 27 +- .../include/single_layer_tests/rnn_cell.hpp | 28 +- .../single_layer_tests/rnn_sequence.hpp | 35 +- .../single_layer_tests/roi_pooling.hpp | 35 +- .../single_layer_tests/scatter_ND_update.hpp | 30 +- .../scatter_elements_update.hpp | 30 +- .../single_layer_tests/scatter_update.hpp | 31 +- .../include/single_layer_tests/select.hpp | 22 +- .../include/single_layer_tests/shape_of.hpp | 25 +- .../single_layer_tests/shuffle_channels.hpp | 34 +- .../include/single_layer_tests/softmax.hpp | 33 +- .../single_layer_tests/space_to_batch.hpp | 29 +- .../single_layer_tests/space_to_depth.hpp | 23 +- .../include/single_layer_tests/split.hpp | 30 +- .../single_layer_tests/squeeze_unsqueeze.hpp | 30 +- .../single_layer_tests/strided_slice.hpp | 42 +-- .../single_layer_tests/tensor_iterator.hpp | 33 +- .../include/single_layer_tests/tile.hpp | 33 +- .../include/single_layer_tests/topk.hpp | 29 +- .../include/single_layer_tests/transpose.hpp | 28 +- .../single_layer_tests/variadic_split.hpp | 33 +- .../activation_concats_eltwise.hpp | 28 +- .../include/subgraph_tests/basic_lstm.hpp | 91 +++-- .../subgraph_tests/broadcast_power.hpp | 30 +- .../include/subgraph_tests/cascade_concat.hpp | 30 +- .../subgraph_tests/concat_multi_input.hpp | 40 +- .../subgraph_tests/concat_quantization.hpp | 44 +-- .../subgraph_tests/constant_result.hpp | 25 +- .../subgraph_tests/conv_eltwise_fusion.hpp | 37 +- .../convert_pad_to_group_conv.hpp | 33 +- .../subgraph_tests/delayed_copy_layer.hpp | 32 +- .../first_connect_input_concat.hpp | 28 +- .../get_output_before_activation.hpp | 29 +- .../handling_orientation_conv.hpp | 28 +- .../include/subgraph_tests/input_conv.hpp | 38 +- .../subgraph_tests/matmul_squeeze_add.hpp | 30 +- .../subgraph_tests/memory_LSTMCell.hpp | 43 +-- .../memory_eltwise_reshape_concat.hpp | 32 +- .../multioutput_eltwise_squeeze_eltwise.hpp | 29 +- .../subgraph_tests/multiple_LSTMCell.hpp | 44 +-- .../subgraph_tests/multiple_concat.hpp | 20 +- .../include/subgraph_tests/multiply_add.hpp | 28 +- .../negative_memory_layer_offset.hpp | 35 +- .../subgraph_tests/perm_conv_perm_concat.hpp | 29 +- .../quantized_convolution_backprop_data.hpp | 40 +- .../quantized_group_convolution.hpp | 41 +- ...ntized_group_convolution_backprop_data.hpp | 41 +- .../subgraph_tests/quantized_mat_mul.hpp | 31 +- .../include/subgraph_tests/range_add.hpp | 38 +- .../include/subgraph_tests/relu_shape_of.hpp | 23 +- ...shape_permute_conv_permute_reshape_act.hpp | 34 +- .../reshape_permute_reshape.hpp | 28 +- .../reshape_squeeze_reshape_relu.hpp | 30 +- .../include/subgraph_tests/scaleshift.hpp | 27 +- .../include/subgraph_tests/softsign.hpp | 34 +- .../subgraph_tests/split_concat_memory.hpp | 68 +++- .../subgraph_tests/split_conv_concat.hpp | 22 +- .../include/subgraph_tests/split_relu.hpp | 31 +- .../split_trivial_permute_concat.hpp | 32 +- .../include/subgraph_tests/trivial_concat.hpp | 27 +- .../two_fake_quantize_to_fullyconnected.hpp | 49 +-- .../import_export_base/import_export_base.cpp | 2 +- .../plugin/shared/src/behavior/set_blob.cpp | 2 +- .../shared/src/behavior/set_blob_of_kind.cpp | 3 +- .../num_inputs_fusing_bin_conv.cpp | 2 +- .../unique_node_names.cpp | 2 +- .../convolution_transformation.cpp | 2 +- .../convolution_with_incorrect_weights.cpp | 2 +- .../depth_to_space_transformation.cpp | 2 +- ...d_two_output_branches_with_convolution.cpp | 2 +- .../fully_connected_transformation.cpp | 2 +- .../fuse_convert_transformation.cpp | 2 +- .../gemm_transformation.cpp | 2 +- .../group_convolution_transformation.cpp | 2 +- ..._constant_fake_quantize_transformation.cpp | 2 +- ...ly_to_group_convolution_transformation.cpp | 2 +- .../mvn_transformation.cpp | 2 +- .../normalize_transformation.cpp | 2 +- ...put_layers_handling_in_transformations.cpp | 2 +- ...handling_in_transformations_for_concat.cpp | 2 +- ...ansformations_for_concat_multi_channel.cpp | 2 +- .../transpose_after_matmul_transformation.cpp | 2 +- .../functional/plugin/shared/src/main.cpp | 2 +- .../shared_test_classes/CMakeLists.txt | 33 ++ .../base}/layer_test_utils.hpp | 5 + .../layer_transformation.hpp | 2 +- .../single_layer/activation.hpp | 114 ++++++ .../single_layer/batch_norm.hpp | 33 ++ .../single_layer/batch_to_space.hpp | 37 ++ .../single_layer/broadcast.hpp | 35 ++ .../single_layer/comparison.hpp | 41 ++ .../single_layer/concat.hpp | 39 ++ .../single_layer/convert.hpp | 35 ++ .../single_layer/convert_like.hpp | 36 ++ .../single_layer/convolution.hpp | 49 +++ .../convolution_backprop_data.hpp | 48 +++ .../single_layer/ctc_greedy_decoder.hpp | 56 +++ .../single_layer/ctc_loss.hpp | 42 +++ .../single_layer/cum_sum.hpp | 31 ++ .../single_layer/depth_to_space.hpp | 32 ++ .../single_layer/detection_output.hpp | 71 ++++ .../single_layer/eltwise.hpp | 42 +++ .../embedding_bag_offsets_sum.hpp | 39 ++ .../single_layer/embedding_bag_packed_sum.hpp | 37 ++ .../single_layer/embedding_segments_sum.hpp | 40 ++ .../single_layer/extract_image_patches.hpp | 37 ++ .../single_layer/fake_quantize.hpp | 64 ++++ .../single_layer/gather.hpp | 44 +++ .../single_layer/gather_nd.hpp | 39 ++ .../single_layer/gather_tree.hpp | 38 ++ .../shared_test_classes/single_layer/grn.hpp | 55 +++ .../single_layer/group_convolution.hpp | 45 +++ .../group_convolution_backprop_data.hpp | 46 +++ .../single_layer/gru_cell.hpp | 38 ++ .../single_layer/gru_sequence.hpp | 46 +++ .../single_layer/interpolate.hpp | 53 +++ .../single_layer/log_softmax.hpp | 41 ++ .../single_layer/logical.hpp | 53 +++ .../shared_test_classes/single_layer/loop.hpp | 148 ++++++++ .../shared_test_classes/single_layer/lrn.hpp | 43 +++ .../single_layer/lstm_cell.hpp | 37 ++ .../single_layer/lstm_sequence.hpp | 43 +++ .../single_layer/mat_mul.hpp | 42 +++ .../single_layer/minimum_maximum.hpp | 36 ++ .../shared_test_classes/single_layer/mvn.hpp | 31 ++ .../single_layer/non_max_suppression.hpp | 47 +++ .../single_layer/nonzero.hpp | 37 ++ .../single_layer/normalize_l2.hpp | 35 ++ .../shared_test_classes/single_layer/pad.hpp | 38 ++ .../single_layer/pooling.hpp | 70 ++++ .../single_layer/power.hpp | 34 ++ .../single_layer/prior_box_clustered.hpp | 74 ++++ .../single_layer/proposal.hpp | 67 ++++ .../single_layer/psroi_pooling.hpp | 48 +++ .../single_layer/range.hpp | 50 +++ .../single_layer/reduce_ops.hpp | 45 +++ .../single_layer/region_yolo.hpp | 38 ++ .../single_layer/reorg_yolo.hpp | 32 ++ .../single_layer/reshape.hpp | 39 ++ .../single_layer/reverse_sequence.hpp | 36 ++ .../single_layer/rnn_cell.hpp | 37 ++ .../single_layer/rnn_sequence.hpp | 44 +++ .../single_layer/roi_pooling.hpp | 43 +++ .../single_layer/scatter_ND_update.hpp | 37 ++ .../single_layer/scatter_elements_update.hpp | 37 ++ .../single_layer/scatter_update.hpp | 38 ++ .../single_layer/select.hpp | 29 ++ .../single_layer/shape_of.hpp | 32 ++ .../single_layer/shuffle_channels.hpp | 41 ++ .../single_layer/softmax.hpp | 41 ++ .../single_layer/space_to_batch.hpp | 36 ++ .../single_layer/space_to_depth.hpp | 32 ++ .../single_layer/split.hpp | 39 ++ .../single_layer/squeeze_unsqueeze.hpp | 37 ++ .../single_layer/strided_slice.hpp | 47 +++ .../single_layer/tensor_iterator.hpp | 41 ++ .../shared_test_classes/single_layer/tile.hpp | 38 ++ .../shared_test_classes/single_layer/topk.hpp | 36 ++ .../single_layer/transpose.hpp | 37 ++ .../single_layer/variadic_split.hpp | 38 ++ .../subgraph/activation_concats_eltwise.hpp | 31 ++ .../subgraph/basic_lstm.hpp | 43 +++ .../subgraph/broadcast_power.hpp | 33 ++ .../subgraph/cascade_concat.hpp | 31 ++ .../subgraph/concat_multi_input.hpp | 41 ++ .../subgraph/concat_quantization.hpp | 33 ++ .../subgraph/constant_result.hpp | 29 ++ .../subgraph/conv_eltwise_fusion.hpp | 37 ++ .../subgraph/convert_pad_to_group_conv.hpp | 33 ++ .../subgraph/delayed_copy_layer.hpp | 33 ++ .../subgraph/first_connect_input_concat.hpp | 34 ++ .../subgraph/get_output_before_activation.hpp | 34 ++ .../subgraph/handling_orientation_conv.hpp | 31 ++ .../subgraph/input_conv.hpp | 43 +++ .../subgraph/matmul_squeeze_add.hpp | 35 ++ .../subgraph/memory_LSTMCell.hpp | 39 ++ .../memory_eltwise_reshape_concat.hpp | 37 ++ .../multioutput_eltwise_squeeze_eltwise.hpp | 30 ++ .../subgraph/multiple_LSTMCell.hpp | 41 ++ .../subgraph/multiple_concat.hpp | 25 ++ .../subgraph/multiply_add.hpp | 32 ++ .../subgraph/negative_memory_layer_offset.hpp | 36 ++ .../subgraph/perm_conv_perm_concat.hpp | 36 ++ .../quantized_convolution_backprop_data.hpp | 43 +++ .../subgraph/quantized_group_convolution.hpp | 44 +++ ...ntized_group_convolution_backprop_data.hpp | 44 +++ .../subgraph/quantized_mat_mul.hpp | 36 ++ .../subgraph/range_add.hpp | 39 ++ .../subgraph/relu_shape_of.hpp | 26 ++ ...shape_permute_conv_permute_reshape_act.hpp | 37 ++ .../subgraph/reshape_permute_reshape.hpp | 30 ++ .../subgraph/reshape_squeeze_reshape_relu.hpp | 31 ++ .../subgraph/scaleshift.hpp | 30 ++ .../shared_test_classes/subgraph/softsign.hpp | 39 ++ .../subgraph/split_concat_memory.hpp | 32 ++ .../subgraph/split_conv_concat.hpp | 27 ++ .../subgraph/split_relu.hpp | 33 ++ .../subgraph/split_trivial_permute_concat.hpp | 33 ++ .../subgraph/trivial_concat.hpp | 32 ++ .../two_fake_quantize_to_fullyconnected.hpp | 53 +++ .../src/base}/layer_test_utils.cpp | 48 ++- .../layer_transformation.cpp | 11 +- .../shared_test_classes/src/precomp.hpp | 36 ++ .../src/single_layer}/activation.cpp | 27 +- .../src/single_layer}/batch_norm.cpp | 7 +- .../src/single_layer}/batch_to_space.cpp | 21 +- .../src/single_layer}/broadcast.cpp | 9 +- .../src/single_layer}/comparison.cpp | 16 +- .../src/single_layer}/concat.cpp | 23 +- .../src/single_layer}/convert.cpp | 15 +- .../src/single_layer}/convert_like.cpp | 15 +- .../src/single_layer}/convolution.cpp | 20 +- .../convolution_backprop_data.cpp | 20 +- .../src/single_layer}/ctc_greedy_decoder.cpp | 22 +- .../src/single_layer}/ctc_loss.cpp | 11 +- .../src/single_layer}/cum_sum.cpp | 20 +- .../src/single_layer}/depth_to_space.cpp | 24 +- .../src/single_layer}/detection_output.cpp | 12 +- .../src/single_layer}/eltwise.cpp | 13 +- .../embedding_bag_offsets_sum.cpp | 14 +- .../embedding_bag_packed_sum.cpp | 15 +- .../single_layer}/embedding_segments_sum.cpp | 14 +- .../single_layer}/extract_image_patches.cpp | 16 +- .../src/single_layer}/fake_quantize.cpp | 44 +-- .../src/single_layer}/gather.cpp | 21 +- .../src/single_layer}/gather_nd.cpp | 11 +- .../src/single_layer}/gather_tree.cpp | 16 +- .../src/single_layer}/grn.cpp | 22 +- .../src/single_layer}/group_convolution.cpp | 20 +- .../group_convolution_backprop_data.cpp | 20 +- .../src/single_layer}/gru_cell.cpp | 21 +- .../src/single_layer}/gru_sequence.cpp | 24 +- .../src/single_layer}/interpolate.cpp | 15 +- .../src/single_layer}/log_softmax.cpp | 18 +- .../src/single_layer}/logical.cpp | 14 +- .../src/single_layer}/loop.cpp | 233 +----------- .../src/single_layer}/lrn.cpp | 11 +- .../src/single_layer}/lstm_cell.cpp | 23 +- .../src/single_layer}/lstm_sequence.cpp | 26 +- .../src/single_layer}/mat_mul.cpp | 12 +- .../src/single_layer}/minimum_maximum.cpp | 15 +- .../src/single_layer}/mvn.cpp | 22 +- .../src/single_layer}/non_max_suppression.cpp | 6 +- .../src/single_layer}/nonzero.cpp | 17 +- .../src/single_layer}/normalize_l2.cpp | 7 +- .../src/single_layer}/pad.cpp | 14 +- .../src/single_layer}/pooling.cpp | 29 +- .../src/single_layer}/power.cpp | 9 +- .../src/single_layer}/prior_box_clustered.cpp | 22 +- .../src/single_layer}/proposal.cpp | 20 +- .../src/single_layer}/psroi_pooling.cpp | 20 +- .../src/single_layer}/range.cpp | 17 +- .../src/single_layer}/reduce_ops.cpp | 23 +- .../src/single_layer}/region_yolo.cpp | 14 +- .../src/single_layer}/reorg_yolo.cpp | 14 +- .../src/single_layer}/reshape.cpp | 17 +- .../src/single_layer}/reverse_sequence.cpp | 15 +- .../src/single_layer}/rnn_cell.cpp | 23 +- .../src/single_layer}/rnn_sequence.cpp | 24 +- .../src/single_layer}/roi_pooling.cpp | 20 +- .../src/single_layer}/scatter_ND_update.cpp | 24 +- .../single_layer}/scatter_elements_update.cpp | 24 +- .../src/single_layer}/scatter_update.cpp | 25 +- .../src/single_layer}/select.cpp | 21 +- .../src/single_layer}/shape_of.cpp | 21 +- .../src/single_layer}/shuffle_channels.cpp | 12 +- .../src/single_layer}/softmax.cpp | 20 +- .../src/single_layer}/space_to_batch.cpp | 22 +- .../src/single_layer}/space_to_depth.cpp | 24 +- .../src/single_layer}/split.cpp | 22 +- .../src/single_layer}/squeeze_unsqueeze.cpp | 18 +- .../src/single_layer}/strided_slice.cpp | 20 +- .../src/single_layer}/tensor_iterator.cpp | 20 +- .../src/single_layer}/tile.cpp | 13 +- .../src/single_layer}/topk.cpp | 6 +- .../src/single_layer}/transpose.cpp | 19 +- .../src/single_layer}/variadic_split.cpp | 23 +- .../subgraph}/activation_concats_eltwise.cpp | 22 +- .../src/subgraph}/basic_lstm.cpp | 85 +---- .../src/subgraph}/broadcast_power.cpp | 14 +- .../src/subgraph}/cascade_concat.cpp | 15 +- .../src/subgraph}/concat_multi_input.cpp | 32 +- .../src/subgraph}/concat_qunatization.cpp | 33 +- .../src/subgraph}/constant_result.cpp | 10 +- .../src/subgraph}/conv_eltwise_fusion.cpp | 23 +- .../subgraph}/convert_pad_to_group_conv.cpp | 15 +- .../src/subgraph}/delayed_copy_layer.cpp | 19 +- .../subgraph}/first_connect_input_concat.cpp | 24 +- .../get_output_before_activation.cpp | 19 +- .../subgraph}/handling_orientation_conv.cpp | 18 +- .../src/subgraph}/input_conv.cpp | 25 +- .../src/subgraph}/matmul_squeeze_add.cpp | 25 +- .../src/subgraph}/memory_LSTMCell.cpp | 39 +- .../memory_eltwise_reshape_concat.cpp | 23 +- .../multioutput_eltwise_squeeze_eltwise.cpp | 18 +- .../src/subgraph}/multiple_LSTMCell.cpp | 38 +- .../src/subgraph}/multiple_concat.cpp | 20 +- .../src/subgraph}/multiply_add.cpp | 24 +- .../negative_memory_layer_offset.cpp | 19 +- .../src/subgraph}/perm_conv_perm_concat.cpp | 15 +- .../quantized_convolution_backprop_data.cpp | 25 +- .../subgraph}/quantized_group_convolution.cpp | 24 +- ...ntized_group_convolution_backprop_data.cpp | 25 +- .../src/subgraph}/quantized_mat_mul.cpp | 19 +- .../src/subgraph}/range_add.cpp | 19 +- .../src/subgraph}/relu_shape_of.cpp | 12 +- ...shape_permute_conv_permute_reshape_act.cpp | 21 +- .../src/subgraph}/reshape_permute_reshape.cpp | 17 +- .../reshape_squeeze_reshape_relu.cpp | 18 +- .../src/subgraph}/scale_shift.cpp | 13 +- .../src/subgraph}/softsign.cpp | 24 +- .../src/subgraph}/split_concat_memory.cpp | 60 +-- .../src/subgraph}/split_conv_concat.cpp | 25 +- .../src/subgraph}/split_relu.cpp | 19 +- .../split_trivial_permute_concat.cpp | 20 +- .../src/subgraph}/trivial_concat.cpp | 26 +- .../two_fake_quantize_to_fullyconnected.cpp | 25 +- .../functional_test_utils/CMakeLists.txt | 10 +- .../functional_test_utils}/blob_utils.hpp | 0 .../functional_test_utils/core_config.hpp | 9 + .../functional_test_utils}/network_utils.hpp | 0 .../functional_test_utils}/plugin_cache.hpp | 0 .../precision_utils.hpp | 0 .../skip_tests_config.hpp | 0 .../test_model/test_model.hpp | 0 .../functional_test_utils/plugin_config.hpp | 9 - .../{ => src}/network_utils.cpp | 4 +- .../{ => src}/plugin_cache.cpp | 2 +- .../{ => src}/precomp.hpp | 0 .../{ => src}/skip_tests_config.cpp | 0 .../{ => src}/test_model/test_model.cpp | 2 +- 569 files changed, 6259 insertions(+), 6069 deletions(-) create mode 100644 docs/template_plugin/tests/functional/core_config.cpp delete mode 100644 docs/template_plugin/tests/functional/plugin_config.cpp create mode 100644 inference-engine/tests/functional/inference_engine/serialization/core_config.cpp create mode 100644 inference-engine/tests/functional/inference_engine/serialization/single_layer/variadic_split.cpp rename inference-engine/tests/functional/plugin/cpu/shared_tests_instances/{plugin_config.cpp => core_config.cpp} (78%) rename inference-engine/tests/functional/plugin/gna/shared_tests_instances/{plugin_config.cpp => core_config.cpp} (94%) create mode 100644 inference-engine/tests/functional/plugin/gpu/shared_tests_instances/core_config.cpp delete mode 100644 inference-engine/tests/functional/plugin/gpu/shared_tests_instances/plugin_config.cpp create mode 100644 inference-engine/tests/functional/plugin/myriad/shared_tests_instances/core_config.cpp delete mode 100644 inference-engine/tests/functional/plugin/myriad/shared_tests_instances/plugin_config.cpp rename inference-engine/tests/{ie_test_utils/functional_test_utils => functional/plugin/shared/include/base}/behavior_test_utils.hpp (100%) rename inference-engine/tests/{ie_test_utils/functional_test_utils => functional/plugin/shared/include/base}/import_export_base/import_export_base.hpp (94%) rename inference-engine/tests/{ie_test_utils/functional_test_utils => functional/plugin/shared/src/base}/import_export_base/import_export_base.cpp (97%) create mode 100644 inference-engine/tests/functional/shared_test_classes/CMakeLists.txt rename inference-engine/tests/{ie_test_utils/functional_test_utils => functional/shared_test_classes/include/shared_test_classes/base}/layer_test_utils.hpp (97%) rename inference-engine/tests/{ie_test_utils/functional_test_utils => functional/shared_test_classes/include/shared_test_classes/base}/low_precision_transformations/layer_transformation.hpp (97%) create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/activation.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/batch_norm.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/batch_to_space.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/broadcast.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/comparison.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/concat.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/convert.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/convert_like.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/convolution.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/convolution_backprop_data.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/ctc_greedy_decoder.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/ctc_loss.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/cum_sum.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/depth_to_space.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/detection_output.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/eltwise.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/embedding_bag_offsets_sum.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/embedding_bag_packed_sum.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/embedding_segments_sum.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/extract_image_patches.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/fake_quantize.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/gather.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/gather_nd.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/gather_tree.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/grn.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/group_convolution.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/group_convolution_backprop_data.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/gru_cell.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/gru_sequence.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/interpolate.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/log_softmax.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/logical.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/loop.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/lrn.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/lstm_cell.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/lstm_sequence.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/mat_mul.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/minimum_maximum.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/mvn.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/non_max_suppression.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/nonzero.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/normalize_l2.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/pad.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/pooling.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/power.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/prior_box_clustered.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/proposal.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/psroi_pooling.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/range.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/reduce_ops.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/region_yolo.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/reorg_yolo.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/reshape.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/reverse_sequence.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/rnn_cell.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/rnn_sequence.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/roi_pooling.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/scatter_ND_update.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/scatter_elements_update.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/scatter_update.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/select.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/shape_of.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/shuffle_channels.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/softmax.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/space_to_batch.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/space_to_depth.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/split.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/squeeze_unsqueeze.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/strided_slice.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/tensor_iterator.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/tile.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/topk.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/transpose.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/variadic_split.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/activation_concats_eltwise.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/basic_lstm.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/broadcast_power.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/cascade_concat.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/concat_multi_input.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/concat_quantization.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/constant_result.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/conv_eltwise_fusion.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/convert_pad_to_group_conv.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/delayed_copy_layer.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/first_connect_input_concat.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/get_output_before_activation.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/handling_orientation_conv.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/input_conv.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/matmul_squeeze_add.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/memory_LSTMCell.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/memory_eltwise_reshape_concat.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/multioutput_eltwise_squeeze_eltwise.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/multiple_LSTMCell.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/multiple_concat.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/multiply_add.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/negative_memory_layer_offset.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/perm_conv_perm_concat.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/quantized_convolution_backprop_data.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/quantized_group_convolution.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/quantized_group_convolution_backprop_data.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/quantized_mat_mul.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/range_add.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/relu_shape_of.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/reshape_permute_conv_permute_reshape_act.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/reshape_permute_reshape.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/reshape_squeeze_reshape_relu.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/scaleshift.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/softsign.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/split_concat_memory.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/split_conv_concat.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/split_relu.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/split_trivial_permute_concat.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/trivial_concat.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/two_fake_quantize_to_fullyconnected.hpp rename inference-engine/tests/{ie_test_utils/functional_test_utils => functional/shared_test_classes/src/base}/layer_test_utils.cpp (92%) rename inference-engine/tests/{ie_test_utils/functional_test_utils => functional/shared_test_classes/src/base}/low_precision_transformations/layer_transformation.cpp (91%) create mode 100644 inference-engine/tests/functional/shared_test_classes/src/precomp.hpp rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/activation.cpp (95%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/batch_norm.cpp (95%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/batch_to_space.cpp (82%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/broadcast.cpp (93%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/comparison.cpp (91%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/concat.cpp (77%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/convert.cpp (83%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/convert_like.cpp (84%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/convolution.cpp (86%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/convolution_backprop_data.cpp (86%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/ctc_greedy_decoder.cpp (79%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/ctc_loss.cpp (94%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/cum_sum.cpp (80%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/depth_to_space.cpp (83%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/detection_output.cpp (96%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/eltwise.cpp (96%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/embedding_bag_offsets_sum.cpp (90%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/embedding_bag_packed_sum.cpp (89%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/embedding_segments_sum.cpp (91%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/extract_image_patches.cpp (88%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/fake_quantize.cpp (80%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/gather.cpp (84%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/gather_nd.cpp (93%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/gather_tree.cpp (90%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/grn.cpp (78%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/group_convolution.cpp (86%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/group_convolution_backprop_data.cpp (86%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/gru_cell.cpp (87%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/gru_sequence.cpp (90%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/interpolate.cpp (93%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/log_softmax.cpp (84%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/logical.cpp (93%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/loop.cpp (63%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/lrn.cpp (92%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/lstm_cell.cpp (85%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/lstm_sequence.cpp (89%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/mat_mul.cpp (95%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/minimum_maximum.cpp (86%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/mvn.cpp (77%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/non_max_suppression.cpp (98%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/nonzero.cpp (82%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/normalize_l2.cpp (93%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/pad.cpp (92%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/pooling.cpp (92%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/power.cpp (89%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/prior_box_clustered.cpp (92%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/proposal.cpp (92%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/psroi_pooling.cpp (92%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/range.cpp (94%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/reduce_ops.cpp (87%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/region_yolo.cpp (84%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/reorg_yolo.cpp (77%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/reshape.cpp (84%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/reverse_sequence.cpp (87%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/rnn_cell.cpp (83%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/rnn_sequence.cpp (89%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/roi_pooling.cpp (89%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/scatter_ND_update.cpp (88%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/scatter_elements_update.cpp (85%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/scatter_update.cpp (89%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/select.cpp (82%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/shape_of.cpp (73%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/shuffle_channels.cpp (91%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/softmax.cpp (83%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/space_to_batch.cpp (82%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/space_to_depth.cpp (83%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/split.cpp (82%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/squeeze_unsqueeze.cpp (84%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/strided_slice.cpp (86%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/tensor_iterator.cpp (96%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/tile.cpp (90%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/topk.cpp (95%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/transpose.cpp (84%) rename inference-engine/tests/functional/{plugin/shared/src/single_layer_tests => shared_test_classes/src/single_layer}/variadic_split.cpp (80%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/activation_concats_eltwise.cpp (81%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/basic_lstm.cpp (66%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/broadcast_power.cpp (85%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/cascade_concat.cpp (90%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/concat_multi_input.cpp (86%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/concat_qunatization.cpp (77%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/constant_result.cpp (84%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/conv_eltwise_fusion.cpp (87%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/convert_pad_to_group_conv.cpp (83%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/delayed_copy_layer.cpp (88%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/first_connect_input_concat.cpp (74%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/get_output_before_activation.cpp (84%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/handling_orientation_conv.cpp (89%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/input_conv.cpp (88%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/matmul_squeeze_add.cpp (82%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/memory_LSTMCell.cpp (94%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/memory_eltwise_reshape_concat.cpp (91%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/multioutput_eltwise_squeeze_eltwise.cpp (84%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/multiple_LSTMCell.cpp (96%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/multiple_concat.cpp (80%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/multiply_add.cpp (75%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/negative_memory_layer_offset.cpp (90%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/perm_conv_perm_concat.cpp (92%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/quantized_convolution_backprop_data.cpp (87%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/quantized_group_convolution.cpp (88%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/quantized_group_convolution_backprop_data.cpp (88%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/quantized_mat_mul.cpp (92%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/range_add.cpp (92%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/relu_shape_of.cpp (85%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/reshape_permute_conv_permute_reshape_act.cpp (90%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/reshape_permute_reshape.cpp (85%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/reshape_squeeze_reshape_relu.cpp (85%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/scale_shift.cpp (86%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/softsign.cpp (84%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/split_concat_memory.cpp (62%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/split_conv_concat.cpp (77%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/split_relu.cpp (81%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/split_trivial_permute_concat.cpp (82%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/trivial_concat.cpp (82%) rename inference-engine/tests/functional/{plugin/shared/src/subgraph_tests => shared_test_classes/src/subgraph}/two_fake_quantize_to_fullyconnected.cpp (92%) rename inference-engine/tests/ie_test_utils/functional_test_utils/{ => include/functional_test_utils}/blob_utils.hpp (100%) create mode 100644 inference-engine/tests/ie_test_utils/functional_test_utils/include/functional_test_utils/core_config.hpp rename inference-engine/tests/ie_test_utils/functional_test_utils/{ => include/functional_test_utils}/network_utils.hpp (100%) rename inference-engine/tests/ie_test_utils/functional_test_utils/{ => include/functional_test_utils}/plugin_cache.hpp (100%) rename inference-engine/tests/ie_test_utils/functional_test_utils/{ => include/functional_test_utils}/precision_utils.hpp (100%) rename inference-engine/tests/ie_test_utils/functional_test_utils/{ => include/functional_test_utils}/skip_tests_config.hpp (100%) rename inference-engine/tests/ie_test_utils/functional_test_utils/{ => include/functional_test_utils}/test_model/test_model.hpp (100%) delete mode 100644 inference-engine/tests/ie_test_utils/functional_test_utils/plugin_config.hpp rename inference-engine/tests/ie_test_utils/functional_test_utils/{ => src}/network_utils.cpp (99%) rename inference-engine/tests/ie_test_utils/functional_test_utils/{ => src}/plugin_cache.cpp (98%) rename inference-engine/tests/ie_test_utils/functional_test_utils/{ => src}/precomp.hpp (100%) rename inference-engine/tests/ie_test_utils/functional_test_utils/{ => src}/skip_tests_config.cpp (100%) rename inference-engine/tests/ie_test_utils/functional_test_utils/{ => src}/test_model/test_model.cpp (99%) diff --git a/docs/template_plugin/tests/functional/core_config.cpp b/docs/template_plugin/tests/functional/core_config.cpp new file mode 100644 index 00000000000000..25bc749cc4fc8d --- /dev/null +++ b/docs/template_plugin/tests/functional/core_config.cpp @@ -0,0 +1,8 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "functional_test_utils/core_config.hpp" + +void CoreConfiguration(LayerTestsUtils::LayerTestsCommon* test) { +} diff --git a/docs/template_plugin/tests/functional/plugin_config.cpp b/docs/template_plugin/tests/functional/plugin_config.cpp deleted file mode 100644 index 53e2dd7baa34de..00000000000000 --- a/docs/template_plugin/tests/functional/plugin_config.cpp +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (C) 2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "functional_test_utils/plugin_config.hpp" - -void PreparePluginConfiguration(LayerTestsUtils::LayerTestsCommon* test) { -} diff --git a/inference-engine/tests/functional/CMakeLists.txt b/inference-engine/tests/functional/CMakeLists.txt index fb196cf893c93a..dc9106b772f744 100644 --- a/inference-engine/tests/functional/CMakeLists.txt +++ b/inference-engine/tests/functional/CMakeLists.txt @@ -2,5 +2,6 @@ # SPDX-License-Identifier: Apache-2.0 # +add_subdirectory(shared_test_classes) add_subdirectory(inference_engine) add_subdirectory(plugin) diff --git a/inference-engine/tests/functional/inference_engine/CMakeLists.txt b/inference-engine/tests/functional/inference_engine/CMakeLists.txt index e0ca1f9f80c964..854c2d74814460 100644 --- a/inference-engine/tests/functional/inference_engine/CMakeLists.txt +++ b/inference-engine/tests/functional/inference_engine/CMakeLists.txt @@ -14,6 +14,7 @@ set(LINK_LIBRARIES inference_engine_transformations openvino::itt openvino::conditional_compilation + sharedTestClasses ) set(DEPENDENCIES mock_engine @@ -21,6 +22,7 @@ set(DEPENDENCIES inference_engine_ir_v7_reader template_extension lptNgraphFunctions + sharedTestClasses ) if (NGRAPH_ONNX_IMPORT_ENABLE) diff --git a/inference-engine/tests/functional/inference_engine/keep_constant_inputs_tests.cpp b/inference-engine/tests/functional/inference_engine/keep_constant_inputs_tests.cpp index 703b4fcdddf7f2..b7c9cf840fc5ad 100644 --- a/inference-engine/tests/functional/inference_engine/keep_constant_inputs_tests.cpp +++ b/inference-engine/tests/functional/inference_engine/keep_constant_inputs_tests.cpp @@ -21,7 +21,7 @@ #include #include #include "generic_ie.hpp" -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" using namespace testing; using namespace InferenceEngine; diff --git a/inference-engine/tests/functional/inference_engine/serialization/core_config.cpp b/inference-engine/tests/functional/inference_engine/serialization/core_config.cpp new file mode 100644 index 00000000000000..25bc749cc4fc8d --- /dev/null +++ b/inference-engine/tests/functional/inference_engine/serialization/core_config.cpp @@ -0,0 +1,8 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "functional_test_utils/core_config.hpp" + +void CoreConfiguration(LayerTestsUtils::LayerTestsCommon* test) { +} diff --git a/inference-engine/tests/functional/inference_engine/serialization/single_layer/variadic_split.cpp b/inference-engine/tests/functional/inference_engine/serialization/single_layer/variadic_split.cpp new file mode 100644 index 00000000000000..d0ce2f9748efd9 --- /dev/null +++ b/inference-engine/tests/functional/inference_engine/serialization/single_layer/variadic_split.cpp @@ -0,0 +1,39 @@ +// Copyright (C) 2019 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include + +#include "shared_test_classes/single_layer/variadic_split.hpp" +#include "common_test_utils/test_constants.hpp" + +using namespace LayerTestsDefinitions; + +namespace { + TEST_P(VariadicSplitLayerTest, Serialize) { + Serialize(); + } + + const std::vector netPrecisions = { + InferenceEngine::Precision::FP32, + InferenceEngine::Precision::FP16 + }; + + // Sum of elements numSplits = inputShapes[Axis] + const std::vector> numSplits = { + {1, 16, 5, 8}, + }; + + INSTANTIATE_TEST_CASE_P(smoke_NumSplitsCheck, VariadicSplitLayerTest, + ::testing::Combine( + ::testing::ValuesIn(numSplits), + ::testing::Values(0, 1, 2, 3), + ::testing::ValuesIn(netPrecisions), + ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), + ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), + ::testing::Values(InferenceEngine::Layout::ANY), + ::testing::Values(InferenceEngine::Layout::ANY), + ::testing::Values(std::vector({30, 30, 30, 30})), + ::testing::Values(CommonTestUtils::DEVICE_CPU)), + VariadicSplitLayerTest::getTestCaseName); +} // namespace diff --git a/inference-engine/tests/functional/plugin/cpu/bfloat16/bfloat16_helpers.hpp b/inference-engine/tests/functional/plugin/cpu/bfloat16/bfloat16_helpers.hpp index fa9500f95292a9..8a73c3f1143b18 100644 --- a/inference-engine/tests/functional/plugin/cpu/bfloat16/bfloat16_helpers.hpp +++ b/inference-engine/tests/functional/plugin/cpu/bfloat16/bfloat16_helpers.hpp @@ -16,7 +16,7 @@ #include #include "ngraph/opsets/opset1.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "common_test_utils/common_utils.hpp" #include "functional_test_utils/blob_utils.hpp" #include diff --git a/inference-engine/tests/functional/plugin/cpu/bfloat16/conv_eltwise_depthwise.cpp b/inference-engine/tests/functional/plugin/cpu/bfloat16/conv_eltwise_depthwise.cpp index acad0fdc6ee66f..8636624b8ead75 100644 --- a/inference-engine/tests/functional/plugin/cpu/bfloat16/conv_eltwise_depthwise.cpp +++ b/inference-engine/tests/functional/plugin/cpu/bfloat16/conv_eltwise_depthwise.cpp @@ -16,7 +16,7 @@ #include "functional_test_utils/blob_utils.hpp" #include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "ngraph/opsets/opset1.hpp" using namespace std; diff --git a/inference-engine/tests/functional/plugin/cpu/bfloat16/memory_conv.cpp b/inference-engine/tests/functional/plugin/cpu/bfloat16/memory_conv.cpp index 839022a082d6c2..ca5ca33c134d23 100644 --- a/inference-engine/tests/functional/plugin/cpu/bfloat16/memory_conv.cpp +++ b/inference-engine/tests/functional/plugin/cpu/bfloat16/memory_conv.cpp @@ -5,7 +5,7 @@ #include #include -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "ie_system_conf.h" #include diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/set_preprocess.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/set_preprocess.cpp index 14b59c4ef721f0..a11831dd560f1e 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/set_preprocess.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/set_preprocess.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include +#include #include "multi-device/multi_device_config.hpp" #include "behavior/set_preprocess.hpp" diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/plugin_config.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/core_config.cpp similarity index 78% rename from inference-engine/tests/functional/plugin/cpu/shared_tests_instances/plugin_config.cpp rename to inference-engine/tests/functional/plugin/cpu/shared_tests_instances/core_config.cpp index 4ad085c318fa70..fa4330ed1d5f7f 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/plugin_config.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/core_config.cpp @@ -2,9 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "functional_test_utils/plugin_config.hpp" +#include "functional_test_utils/core_config.hpp" -void PreparePluginConfiguration(LayerTestsUtils::LayerTestsCommon* test) { +void CoreConfiguration(LayerTestsUtils::LayerTestsCommon* test) { // Within the test scope we don't need any implicit bf16 optimisations, so let's run the network as is. auto& configuration = test->GetConfiguration(); if (!configuration.count(InferenceEngine::PluginConfigParams::KEY_ENFORCE_BF16)) { diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/low_precision_transformations/layer_transformation.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/low_precision_transformations/layer_transformation.cpp index e1ac9b24b0548f..36554c84cca2b3 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/low_precision_transformations/layer_transformation.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/low_precision_transformations/layer_transformation.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" #include #include @@ -34,10 +34,10 @@ #include #include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" #include #include diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/constant_result.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/constant_result.cpp index 82150153f21cb7..7fe22027d0bb21 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/constant_result.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/constant_result.cpp @@ -7,7 +7,7 @@ #include "subgraph_tests/constant_result.hpp" #include "common_test_utils/test_constants.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { INSTANTIATE_TEST_CASE_P(smoke_Check, ConstantResultSubgraphTest, diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/conv_eltwise_fusion.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/conv_eltwise_fusion.cpp index 490f8861951cb6..2590c5d1df1e79 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/conv_eltwise_fusion.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/conv_eltwise_fusion.cpp @@ -7,7 +7,7 @@ #include "subgraph_tests/conv_eltwise_fusion.hpp" #include "common_test_utils/test_constants.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { const std::vector types{ngraph::element::f32, ngraph::element::f16}; diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/convert_pad_to_group_conv.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/convert_pad_to_group_conv.cpp index 8d71b16371cb2f..609361bd2158bd 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/convert_pad_to_group_conv.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/convert_pad_to_group_conv.cpp @@ -7,7 +7,7 @@ #include "subgraph_tests/convert_pad_to_group_conv.hpp" #include "common_test_utils/test_constants.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { const std::vector> pads_1d{ diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/matmul_squeeze_add.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/matmul_squeeze_add.cpp index 5472a14ef8a209..80ddeed8cdcf58 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/matmul_squeeze_add.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/matmul_squeeze_add.cpp @@ -7,7 +7,7 @@ #include "common_test_utils/test_constants.hpp" #include "subgraph_tests/matmul_squeeze_add.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { const std::vector netPrecisions = { diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/multiply_add.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/multiply_add.cpp index 9b78f8d6a06940..d7660a3bd5e0ad 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/multiply_add.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/multiply_add.cpp @@ -6,7 +6,7 @@ #include "subgraph_tests/multiply_add.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/quantized_convolution_backprop_data.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/quantized_convolution_backprop_data.cpp index 7f7ca14814f417..197dd0255f2e79 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/quantized_convolution_backprop_data.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/quantized_convolution_backprop_data.cpp @@ -7,7 +7,7 @@ #include "subgraph_tests/quantized_convolution_backprop_data.hpp" #include "common_test_utils/test_constants.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; using namespace ngraph::helpers; namespace { diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/quantized_group_convolution.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/quantized_group_convolution.cpp index deb6bb2876535f..a0471488b7893b 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/quantized_group_convolution.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/quantized_group_convolution.cpp @@ -7,7 +7,7 @@ #include "subgraph_tests/quantized_group_convolution.hpp" #include "common_test_utils/test_constants.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; using namespace ngraph::helpers; namespace { diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/quantized_group_convolution_backprop_data.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/quantized_group_convolution_backprop_data.cpp index af6910522349cc..dce213590b0a51 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/quantized_group_convolution_backprop_data.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/quantized_group_convolution_backprop_data.cpp @@ -7,7 +7,7 @@ #include "subgraph_tests/quantized_group_convolution_backprop_data.hpp" #include "common_test_utils/test_constants.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; using namespace ngraph::helpers; namespace { diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/quantized_mat_mul.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/quantized_mat_mul.cpp index b55be38b61ab30..da7209db211b89 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/quantized_mat_mul.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/quantized_mat_mul.cpp @@ -6,7 +6,7 @@ #include "subgraph_tests/quantized_mat_mul.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; using namespace ngraph::helpers; namespace { diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/range_add.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/range_add.cpp index 0f16373c665d7c..32bd836b6aed21 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/range_add.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/range_add.cpp @@ -7,7 +7,7 @@ #include "subgraph_tests/range_add.hpp" #include "common_test_utils/test_constants.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/relu_shape_of.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/relu_shape_of.cpp index bc65c54004900c..4ad89667ca88e2 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/relu_shape_of.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/relu_shape_of.cpp @@ -7,7 +7,7 @@ #include "subgraph_tests/relu_shape_of.hpp" #include "common_test_utils/test_constants.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { const std::vector netPrecisions = { diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/reshape_squeeze_reshape_relu.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/reshape_squeeze_reshape_relu.cpp index 87274d0a8926b9..cd23adb208ce85 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/reshape_squeeze_reshape_relu.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/reshape_squeeze_reshape_relu.cpp @@ -4,7 +4,7 @@ #include "subgraph_tests/reshape_squeeze_reshape_relu.hpp" #include "common_test_utils/test_constants.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { std::vector inputs{ diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/split_concat_memory.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/split_concat_memory.cpp index 3e5685b99c6c3a..78e1af80759032 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/split_concat_memory.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/split_concat_memory.cpp @@ -6,7 +6,7 @@ #include "subgraph_tests/split_concat_memory.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/split_conv_concat.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/split_conv_concat.cpp index 0d5159a08e5390..5a698376e31f5e 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/split_conv_concat.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/subgraph_tests/split_conv_concat.cpp @@ -7,7 +7,7 @@ #include "subgraph_tests/split_conv_concat.hpp" #include "common_test_utils/test_constants.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { diff --git a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/activation.cpp b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/activation.cpp index 975f790a4fa2db..3305a75a453ec6 100644 --- a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/activation.cpp +++ b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/activation.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include +#include #include "test_utils/cpu_test_utils.hpp" using namespace InferenceEngine; diff --git a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/convert.cpp b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/convert.cpp index 89159652129173..6cb49c0265c6d0 100644 --- a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/convert.cpp +++ b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/convert.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include +#include using namespace LayerTestsDefinitions; using namespace InferenceEngine; diff --git a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/crop.cpp b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/crop.cpp index 920ca6fba150c8..643cf7dfe3aea3 100644 --- a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/crop.cpp +++ b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/crop.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include +#include #include "ngraph_functions/builders.hpp" #include "test_utils/cpu_test_utils.hpp" diff --git a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/eltwise.cpp b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/eltwise.cpp index b968545b7dfb25..069ee624f67bee 100644 --- a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/eltwise.cpp +++ b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/eltwise.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include +#include #include #include "test_utils/cpu_test_utils.hpp" diff --git a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/group_convolution.cpp b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/group_convolution.cpp index 784ced4c22649b..a4d8f75fdf337f 100644 --- a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/group_convolution.cpp +++ b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/group_convolution.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include +#include #include "test_utils/cpu_test_utils.hpp" using namespace InferenceEngine; @@ -10,6 +10,9 @@ using namespace CPUTestUtils; namespace CPULayerTestsDefinitions { +using groupConvLayerTestParamsSet = LayerTestsDefinitions::groupConvLayerTestParamsSet; +using groupConvSpecificParams = LayerTestsDefinitions::groupConvSpecificParams; + typedef std::tuple< groupConvLayerTestParamsSet, CPUSpecificParams> groupConvLayerCPUTestParamsSet; diff --git a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/interpolate.cpp b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/interpolate.cpp index a1cebccf2a67e6..b15ec88e7bb7cb 100644 --- a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/interpolate.cpp +++ b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/interpolate.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include +#include #include "test_utils/cpu_test_utils.hpp" using namespace InferenceEngine; diff --git a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/logical.cpp b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/logical.cpp index a968df20a184ef..52b65d4d1c327f 100644 --- a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/logical.cpp +++ b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/logical.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include +#include #include "ngraph_functions/builders.hpp" #include "test_utils/cpu_test_utils.hpp" diff --git a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/mvn.cpp b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/mvn.cpp index ad120a1b94051a..09fcaaf24c92d3 100644 --- a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/mvn.cpp +++ b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/mvn.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include +#include #include "ngraph_functions/builders.hpp" #include "test_utils/cpu_test_utils.hpp" diff --git a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/normalize.cpp b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/normalize.cpp index 75faae5cc92f2f..8731275825e372 100755 --- a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/normalize.cpp +++ b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/normalize.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include +#include #include "ngraph_functions/builders.hpp" #include "test_utils/cpu_test_utils.hpp" diff --git a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/permute.cpp b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/permute.cpp index a0bf55781539b6..82bb9a720928a4 100644 --- a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/permute.cpp +++ b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/permute.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include +#include #include "ngraph_functions/builders.hpp" #include "test_utils/cpu_test_utils.hpp" diff --git a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/reduce_ops.cpp b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/reduce_ops.cpp index becf723a81fc9d..b2985ec61479ca 100644 --- a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/reduce_ops.cpp +++ b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/reduce_ops.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include +#include #include "ngraph_functions/builders.hpp" #include "test_utils/cpu_test_utils.hpp" diff --git a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/region_yolo.cpp b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/region_yolo.cpp index 2fedfd2b2804f4..2a67767e993201 100644 --- a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/region_yolo.cpp +++ b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/region_yolo.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include +#include #include "ngraph_functions/builders.hpp" #include "test_utils/cpu_test_utils.hpp" diff --git a/inference-engine/tests/functional/plugin/cpu/subgraph_tests/include/conv_concat.hpp b/inference-engine/tests/functional/plugin/cpu/subgraph_tests/include/conv_concat.hpp index 311f97dd057f3a..949f3b90b89731 100644 --- a/inference-engine/tests/functional/plugin/cpu/subgraph_tests/include/conv_concat.hpp +++ b/inference-engine/tests/functional/plugin/cpu/subgraph_tests/include/conv_concat.hpp @@ -9,13 +9,13 @@ #include #include "test_utils/cpu_test_utils.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "ngraph_functions/utils/ngraph_helpers.hpp" #include "ngraph_functions/builders.hpp" using namespace CPUTestUtils; -namespace LayerTestsDefinitions { +namespace SubgraphTestsDefinitions { enum class nodeType { convolution, @@ -70,4 +70,4 @@ class ConvConcatSubgraphTest : public testing::WithParamInterface #include "test_utils/cpu_test_utils.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "ngraph_functions/utils/ngraph_helpers.hpp" #include "ngraph_functions/builders.hpp" using namespace CPUTestUtils; -namespace LayerTestsDefinitions { +namespace SubgraphTestsDefinitions { using FusePermuteAndReorderParams = std::tuple< InferenceEngine::SizeVector, // Input shape @@ -46,4 +46,4 @@ class FusePermuteAndReorderTest2 : public FusePermuteAndReorderTest { void CreateGraph() override; }; -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/cpu/subgraph_tests/src/conv_concat.cpp b/inference-engine/tests/functional/plugin/cpu/subgraph_tests/src/conv_concat.cpp index 0df806f7f86da0..74a4193acfa9b8 100644 --- a/inference-engine/tests/functional/plugin/cpu/subgraph_tests/src/conv_concat.cpp +++ b/inference-engine/tests/functional/plugin/cpu/subgraph_tests/src/conv_concat.cpp @@ -7,7 +7,7 @@ using namespace InferenceEngine; using namespace CPUTestUtils; -namespace LayerTestsDefinitions { +namespace SubgraphTestsDefinitions { std::string ConvConcatSubgraphTest::getTestCaseName(testing::TestParamInfo obj) { std::ostringstream result; @@ -422,4 +422,4 @@ INSTANTIATE_TEST_CASE_P(smoke_GroupConvolutionBackpropData3D, ConvConcatSubgraph } // namespace GroupConvolutionBackpropDataConcat -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/cpu/subgraph_tests/src/eltwise_chain.cpp b/inference-engine/tests/functional/plugin/cpu/subgraph_tests/src/eltwise_chain.cpp index fad90688b704fc..5c44c892be5f40 100644 --- a/inference-engine/tests/functional/plugin/cpu/subgraph_tests/src/eltwise_chain.cpp +++ b/inference-engine/tests/functional/plugin/cpu/subgraph_tests/src/eltwise_chain.cpp @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include #include #include "common_test_utils/common_utils.hpp" @@ -20,7 +20,7 @@ using InferenceEngine::Precision; using ngraph::helpers::EltwiseTypes; using FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc; -namespace CPULayerTestsDefinitions { +namespace CPUSubgraphTestsDefinitions { typedef std::tuple< std::vector>, // Input shapes @@ -181,4 +181,4 @@ INSTANTIATE_TEST_CASE_P(smoke_EltwiseChainWithFQ, EltwiseChainTest, EltwiseChainTest::getTestCaseName); } // namespace -} // namespace CPULayerTestsDefinitions +} // namespace CPUSubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/cpu/subgraph_tests/src/fuse_permute_reorder.cpp b/inference-engine/tests/functional/plugin/cpu/subgraph_tests/src/fuse_permute_reorder.cpp index 44c2d81847344e..1697000c86081b 100644 --- a/inference-engine/tests/functional/plugin/cpu/subgraph_tests/src/fuse_permute_reorder.cpp +++ b/inference-engine/tests/functional/plugin/cpu/subgraph_tests/src/fuse_permute_reorder.cpp @@ -7,7 +7,7 @@ using namespace InferenceEngine; using namespace CPUTestUtils; -namespace LayerTestsDefinitions { +namespace SubgraphTestsDefinitions { std::string FusePermuteAndReorderTest::getTestCaseName(testing::TestParamInfo obj) { std::ostringstream result; @@ -236,4 +236,4 @@ TEST_P(FusePermuteAndReorderTest2, CompareWithRefs) { INSTANTIATE_TEST_CASE_P(smoke_Basic, FusePermuteAndReorderTest2, fusePermuteAndReorderCommonParams, FusePermuteAndReorderTest::getTestCaseName); -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/cpu/subgraph_tests/src/reshape_permute_conv_permute_reshape_act.cpp b/inference-engine/tests/functional/plugin/cpu/subgraph_tests/src/reshape_permute_conv_permute_reshape_act.cpp index 6b7e90b8d04cc3..96f954e7a466a1 100644 --- a/inference-engine/tests/functional/plugin/cpu/subgraph_tests/src/reshape_permute_conv_permute_reshape_act.cpp +++ b/inference-engine/tests/functional/plugin/cpu/subgraph_tests/src/reshape_permute_conv_permute_reshape_act.cpp @@ -29,7 +29,7 @@ std::vector netPrecisions = { std::map additional_config = { }; -namespace LayerTestsDefinitions { +namespace SubgraphTestsDefinitions { INSTANTIATE_TEST_CASE_P(smoke_basic, ConvReshapeAct, ::testing::Combine( ::testing::ValuesIn(netPrecisions), @@ -39,6 +39,6 @@ namespace LayerTestsDefinitions { ::testing::ValuesIn(output_channels), ::testing::Values(additional_config)), ConvReshapeAct::getTestCaseName); -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/cpu/test_utils/cpu_test_utils.hpp b/inference-engine/tests/functional/plugin/cpu/test_utils/cpu_test_utils.hpp index 70e3d1c91839f5..8b980da6062ff8 100644 --- a/inference-engine/tests/functional/plugin/cpu/test_utils/cpu_test_utils.hpp +++ b/inference-engine/tests/functional/plugin/cpu/test_utils/cpu_test_utils.hpp @@ -7,7 +7,7 @@ #include #include #include "ie_system_conf.h" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include #include diff --git a/inference-engine/tests/functional/plugin/gna/pass_tests/4d_eltwise.cpp b/inference-engine/tests/functional/plugin/gna/pass_tests/4d_eltwise.cpp index 47cc39b296f14d..eee419401ec0fd 100644 --- a/inference-engine/tests/functional/plugin/gna/pass_tests/4d_eltwise.cpp +++ b/inference-engine/tests/functional/plugin/gna/pass_tests/4d_eltwise.cpp @@ -12,7 +12,7 @@ #include "common_test_utils/common_utils.hpp" #include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "functional_test_utils/blob_utils.hpp" #include "ngraph_functions/utils/ngraph_helpers.hpp" #include "ngraph_functions/builders.hpp" diff --git a/inference-engine/tests/functional/plugin/gna/pass_tests/eltwise_split_over_channels_pass.cpp b/inference-engine/tests/functional/plugin/gna/pass_tests/eltwise_split_over_channels_pass.cpp index bfea02441d2626..a0c987a66fe6c3 100644 --- a/inference-engine/tests/functional/plugin/gna/pass_tests/eltwise_split_over_channels_pass.cpp +++ b/inference-engine/tests/functional/plugin/gna/pass_tests/eltwise_split_over_channels_pass.cpp @@ -9,7 +9,7 @@ #include -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "functional_test_utils/blob_utils.hpp" #include "ngraph_functions/utils/ngraph_helpers.hpp" #include "ngraph_functions/builders.hpp" diff --git a/inference-engine/tests/functional/plugin/gna/pass_tests/remove_permutations_NHWC_to_NCHW_pass.cpp b/inference-engine/tests/functional/plugin/gna/pass_tests/remove_permutations_NHWC_to_NCHW_pass.cpp index f8e4cb5bacd543..267b830d7adb76 100644 --- a/inference-engine/tests/functional/plugin/gna/pass_tests/remove_permutations_NHWC_to_NCHW_pass.cpp +++ b/inference-engine/tests/functional/plugin/gna/pass_tests/remove_permutations_NHWC_to_NCHW_pass.cpp @@ -12,7 +12,7 @@ #include "common_test_utils/common_utils.hpp" #include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "functional_test_utils/blob_utils.hpp" #include "ngraph_functions/utils/ngraph_helpers.hpp" #include "ngraph_functions/builders.hpp" diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/plugin_config.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/core_config.cpp similarity index 94% rename from inference-engine/tests/functional/plugin/gna/shared_tests_instances/plugin_config.cpp rename to inference-engine/tests/functional/plugin/gna/shared_tests_instances/core_config.cpp index 18db70a7fea15d..2604d37d06123c 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/plugin_config.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/core_config.cpp @@ -4,11 +4,11 @@ #include -#include "functional_test_utils/plugin_config.hpp" +#include "functional_test_utils/core_config.hpp" #include "functional_test_utils/blob_utils.hpp" #include -void PreparePluginConfiguration(LayerTestsUtils::LayerTestsCommon* test) { +void CoreConfiguration(LayerTestsUtils::LayerTestsCommon* test) { const float MAX_VAL_2B_FEAT = 16384.0f; auto inputParameters = test->GetFunction()->get_parameters(); auto& configuration = test->GetConfiguration(); diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/activation_concats_eltwise.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/activation_concats_eltwise.cpp index 2e40aa8dd638f3..c86fb626390782 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/activation_concats_eltwise.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/activation_concats_eltwise.cpp @@ -7,7 +7,7 @@ #include "subgraph_tests/activation_concats_eltwise.hpp" #include "common_test_utils/test_constants.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { std::vector input_sizes = { 7, diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/basic_lstm.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/basic_lstm.cpp index ff9a43e4b2be48..bf32ee22ad0876 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/basic_lstm.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/basic_lstm.cpp @@ -7,7 +7,7 @@ #include "common_test_utils/test_constants.hpp" #include "subgraph_tests/basic_lstm.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { const std::vector netPrecisions = { diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/broadcast_power.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/broadcast_power.cpp index ebd357ff5a8f37..2a890505f01c5c 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/broadcast_power.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/broadcast_power.cpp @@ -6,7 +6,7 @@ #include #include -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { const std::vector netPrecisions = { diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/cascade_concat.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/cascade_concat.cpp index b944401726ad26..2e9e3a9659e2ef 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/cascade_concat.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/cascade_concat.cpp @@ -5,7 +5,7 @@ #include #include "common_test_utils/test_constants.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { std::vector>> shape1{ diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/concat_multi_input.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/concat_multi_input.cpp index 1fae328d4d44aa..0e45793eeb9b2a 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/concat_multi_input.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/concat_multi_input.cpp @@ -7,7 +7,7 @@ #include "subgraph_tests/concat_multi_input.hpp" #include "common_test_utils/test_constants.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/concat_quantization.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/concat_quantization.cpp index fc880b1527c9b6..a55c0950df411a 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/concat_quantization.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/concat_quantization.cpp @@ -7,7 +7,7 @@ #include "subgraph_tests/concat_quantization.hpp" #include "common_test_utils/test_constants.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; const std::vector netPrecisions = { InferenceEngine::Precision::FP32, InferenceEngine::Precision::FP16, diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/constant_result.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/constant_result.cpp index 370e662b60f692..8ba56773cf8090 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/constant_result.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/constant_result.cpp @@ -7,7 +7,7 @@ #include "subgraph_tests/constant_result.hpp" #include "common_test_utils/test_constants.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { INSTANTIATE_TEST_CASE_P(smoke_Check, ConstantResultSubgraphTest, diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/delayed_copy_layer.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/delayed_copy_layer.cpp index 59dfb27b79e0b1..5c660b4a248a04 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/delayed_copy_layer.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/delayed_copy_layer.cpp @@ -5,7 +5,7 @@ #include "common_test_utils/test_constants.hpp" #include "gna/gna_config.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { std::vector netPrecisions = {InferenceEngine::Precision::FP32, diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/first_connect_input_concat.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/first_connect_input_concat.cpp index d9fa0ebeb7a542..703e212de16f5b 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/first_connect_input_concat.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/first_connect_input_concat.cpp @@ -7,7 +7,7 @@ #include "subgraph_tests/first_connect_input_concat.hpp" #include "common_test_utils/test_constants.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/handling_orientation_conv.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/handling_orientation_conv.cpp index da23d774826654..c71852a4fee8b7 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/handling_orientation_conv.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/handling_orientation_conv.cpp @@ -7,7 +7,7 @@ #include "subgraph_tests/handling_orientation_conv.hpp" #include "common_test_utils/test_constants.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; const std::vector netPrecisions = { InferenceEngine::Precision::FP32, InferenceEngine::Precision::FP16, diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/input_conv.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/input_conv.cpp index aee0b7711d1b6e..8bb654c4afb7ae 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/input_conv.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/input_conv.cpp @@ -7,7 +7,7 @@ #include "common_test_utils/test_constants.hpp" #include "subgraph_tests/input_conv.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { const std::vector netPrecisions = { diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/matmul_squeeze_add.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/matmul_squeeze_add.cpp index 17d94480e72d59..b6874daac9f825 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/matmul_squeeze_add.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/matmul_squeeze_add.cpp @@ -7,7 +7,7 @@ #include "common_test_utils/test_constants.hpp" #include "subgraph_tests/matmul_squeeze_add.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { const std::vector netPrecisions = { diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/multioutput_eltwise_squeeze_eltwise.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/multioutput_eltwise_squeeze_eltwise.cpp index cd49f8adc227fc..eff09008cf94df 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/multioutput_eltwise_squeeze_eltwise.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/multioutput_eltwise_squeeze_eltwise.cpp @@ -4,7 +4,7 @@ #include "subgraph_tests/multioutput_eltwise_squeeze_eltwise.hpp" #include "common_test_utils/test_constants.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { std::vector>> inputs{ diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/negative_memory_layer_offset.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/negative_memory_layer_offset.cpp index 5659c22eab5aff..e88f0587681aed 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/negative_memory_layer_offset.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/negative_memory_layer_offset.cpp @@ -5,7 +5,7 @@ #include "common_test_utils/test_constants.hpp" #include "gna/gna_config.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { std::vector netPrecisions = { InferenceEngine::Precision::FP32, diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/reshape_permute_conv_permute_reshape_act.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/reshape_permute_conv_permute_reshape_act.cpp index 22e79a900716e2..1c7ba8b2960137 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/reshape_permute_conv_permute_reshape_act.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/reshape_permute_conv_permute_reshape_act.cpp @@ -32,7 +32,7 @@ std::map additional_config = { {"GNA_SCALE_FACTOR_0", "2340"} }; -namespace LayerTestsDefinitions { +namespace SubgraphTestsDefinitions { INSTANTIATE_TEST_CASE_P(smoke_basic, ConvReshapeAct, ::testing::Combine( ::testing::ValuesIn(netPrecisions), @@ -42,6 +42,6 @@ namespace LayerTestsDefinitions { ::testing::ValuesIn(output_channels), ::testing::Values(additional_config)), ConvReshapeAct::getTestCaseName); -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/reshape_squeeze_reshape_relu.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/reshape_squeeze_reshape_relu.cpp index f002f5fc17ba0d..456ab0aa130ce0 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/reshape_squeeze_reshape_relu.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/reshape_squeeze_reshape_relu.cpp @@ -4,7 +4,7 @@ #include "subgraph_tests/reshape_squeeze_reshape_relu.hpp" #include "common_test_utils/test_constants.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { std::vector inputs{ diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/reshapre_permute_reshape.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/reshapre_permute_reshape.cpp index 7b39da8d9f6609..ab5c5f0bb3595b 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/reshapre_permute_reshape.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/reshapre_permute_reshape.cpp @@ -4,7 +4,7 @@ #include "subgraph_tests/reshape_permute_reshape.hpp" #include "common_test_utils/test_constants.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { std::vector>> inputs{ diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/scale_shift.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/scale_shift.cpp index 8fc45c203050e8..9b4c56ae14889f 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/scale_shift.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/scale_shift.cpp @@ -6,7 +6,7 @@ #include "subgraph_tests/scaleshift.hpp" #include "common_test_utils/test_constants.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/softsign.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/softsign.cpp index 8bc43c55fe3fd9..d92aa166175378 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/softsign.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/softsign.cpp @@ -7,7 +7,7 @@ #include "common_test_utils/test_constants.hpp" #include "subgraph_tests/softsign.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { const std::vector netPrecisions = { diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/split_conv_concat.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/split_conv_concat.cpp index 5e25cb1e8a24d8..c95f6855f96620 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/split_conv_concat.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/split_conv_concat.cpp @@ -7,7 +7,7 @@ #include "subgraph_tests/split_conv_concat.hpp" #include "common_test_utils/test_constants.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; const std::vector netPrecisions = { InferenceEngine::Precision::FP32, InferenceEngine::Precision::FP16 diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/split_relu.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/split_relu.cpp index a24a2ff26f9ff0..a2bf744e85f7c1 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/split_relu.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/split_relu.cpp @@ -5,7 +5,7 @@ #include "common_test_utils/test_constants.hpp" #include "gna/gna_config.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { std::vector>> inputs{ diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/split_trivial_permute_concat.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/split_trivial_permute_concat.cpp index 686c72c5b545fd..aca05e343fef4b 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/split_trivial_permute_concat.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/split_trivial_permute_concat.cpp @@ -5,7 +5,7 @@ #include "common_test_utils/test_constants.hpp" #include "gna/gna_config.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { std::vector netPrecisions = { InferenceEngine::Precision::FP32, diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/trivial_concat.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/trivial_concat.cpp index 0438d852b229b4..46395c3fce5ee1 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/trivial_concat.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/trivial_concat.cpp @@ -7,7 +7,7 @@ #include "subgraph_tests/trivial_concat.hpp" #include "common_test_utils/test_constants.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { std::vector> inShapes = { diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/two_fake_quantize_to_fullyconnected.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/two_fake_quantize_to_fullyconnected.cpp index 35c82543f91abe..84e913e99f58bb 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/two_fake_quantize_to_fullyconnected.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/subgraph_tests/two_fake_quantize_to_fullyconnected.cpp @@ -8,7 +8,7 @@ #include "subgraph_tests/two_fake_quantize_to_fullyconnected.hpp" #include "common_test_utils/test_constants.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/set_preprocess.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/set_preprocess.cpp index 97d69dbb6594ee..6b61105c648076 100644 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/set_preprocess.cpp +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/set_preprocess.cpp @@ -3,7 +3,7 @@ // #include "multi-device/multi_device_config.hpp" -#include +#include #include "behavior/set_preprocess.hpp" using namespace BehaviorTestsDefinitions; diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/core_config.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/core_config.cpp new file mode 100644 index 00000000000000..25bc749cc4fc8d --- /dev/null +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/core_config.cpp @@ -0,0 +1,8 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "functional_test_utils/core_config.hpp" + +void CoreConfiguration(LayerTestsUtils::LayerTestsCommon* test) { +} diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/low_precision_transformations/layer_transformation.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/low_precision_transformations/layer_transformation.cpp index b0f0d13bc1bf87..661688835bfcc7 100644 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/low_precision_transformations/layer_transformation.cpp +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/low_precision_transformations/layer_transformation.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" #include #include @@ -34,15 +34,15 @@ #include #include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" using namespace InferenceEngine::details; #include "common_test_utils/common_utils.hpp" #include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "functional_test_utils/blob_utils.hpp" namespace LayerTestsUtils { diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/plugin_config.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/plugin_config.cpp deleted file mode 100644 index 53e2dd7baa34de..00000000000000 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/plugin_config.cpp +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (C) 2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "functional_test_utils/plugin_config.hpp" - -void PreparePluginConfiguration(LayerTestsUtils::LayerTestsCommon* test) { -} diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/subgraph_tests/constant_result.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/subgraph_tests/constant_result.cpp index 611e8fc38a0976..56a4b0b601b53d 100644 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/subgraph_tests/constant_result.cpp +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/subgraph_tests/constant_result.cpp @@ -7,7 +7,7 @@ #include "subgraph_tests/constant_result.hpp" #include "common_test_utils/test_constants.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { INSTANTIATE_TEST_CASE_P(smoke_Check, ConstantResultSubgraphTest, diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/subgraph_tests/matmul_squeeze_add.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/subgraph_tests/matmul_squeeze_add.cpp index 5494c69993d061..a4245531320dfd 100644 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/subgraph_tests/matmul_squeeze_add.cpp +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/subgraph_tests/matmul_squeeze_add.cpp @@ -7,7 +7,7 @@ #include "common_test_utils/test_constants.hpp" #include "subgraph_tests/matmul_squeeze_add.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { const std::vector netPrecisions = { diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/subgraph_tests/multiply_add.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/subgraph_tests/multiply_add.cpp index 81eece127183b0..d8edd91ac8855f 100644 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/subgraph_tests/multiply_add.cpp +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/subgraph_tests/multiply_add.cpp @@ -6,7 +6,7 @@ #include "subgraph_tests/multiply_add.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/subgraph_tests/reshape_permute_conv_permute_reshape_act.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/subgraph_tests/reshape_permute_conv_permute_reshape_act.cpp index 892a395a472b4d..8210dccc0c976c 100644 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/subgraph_tests/reshape_permute_conv_permute_reshape_act.cpp +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/subgraph_tests/reshape_permute_conv_permute_reshape_act.cpp @@ -29,7 +29,7 @@ std::vector netPrecisions = { std::map additional_config = {}; -namespace LayerTestsDefinitions { +namespace SubgraphTestsDefinitions { INSTANTIATE_TEST_CASE_P(smoke_basic, ConvReshapeAct, ::testing::Combine( ::testing::ValuesIn(netPrecisions), @@ -39,6 +39,6 @@ namespace LayerTestsDefinitions { ::testing::ValuesIn(output_channels), ::testing::Values(additional_config)), ConvReshapeAct::getTestCaseName); -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/subgraph_tests/reshape_squeeze_reshape_relu.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/subgraph_tests/reshape_squeeze_reshape_relu.cpp index c8f4cd1b803bf5..ba5ac2df9a2117 100644 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/subgraph_tests/reshape_squeeze_reshape_relu.cpp +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/subgraph_tests/reshape_squeeze_reshape_relu.cpp @@ -4,7 +4,7 @@ #include "subgraph_tests/reshape_squeeze_reshape_relu.hpp" #include "common_test_utils/test_constants.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { std::vector inputs_squeeze { diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/subgraph_tests/scale_shift.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/subgraph_tests/scale_shift.cpp index 06587796e8446f..f28fdc26c0ac12 100644 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/subgraph_tests/scale_shift.cpp +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/subgraph_tests/scale_shift.cpp @@ -6,7 +6,7 @@ #include "subgraph_tests/scaleshift.hpp" #include "common_test_utils/test_constants.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/subgraph_tests/split_conv_concat.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/subgraph_tests/split_conv_concat.cpp index 6b051edd0f7c47..6d360c801f103f 100644 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/subgraph_tests/split_conv_concat.cpp +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/subgraph_tests/split_conv_concat.cpp @@ -7,7 +7,7 @@ #include "subgraph_tests/split_conv_concat.hpp" #include "common_test_utils/test_constants.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { const std::vector netPrecisions = { diff --git a/inference-engine/tests/functional/plugin/myriad/ngraph/operations/dynamic_shape_resolver.cpp b/inference-engine/tests/functional/plugin/myriad/ngraph/operations/dynamic_shape_resolver.cpp index 3f0f8e7d086853..ef2838dd3994e4 100644 --- a/inference-engine/tests/functional/plugin/myriad/ngraph/operations/dynamic_shape_resolver.cpp +++ b/inference-engine/tests/functional/plugin/myriad/ngraph/operations/dynamic_shape_resolver.cpp @@ -15,7 +15,7 @@ #include "vpu/ngraph/operations/dynamic_shape_resolver.hpp" #include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" namespace { diff --git a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/set_preprocess.cpp b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/set_preprocess.cpp index 0193450bdea24b..bb8085472565a8 100644 --- a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/set_preprocess.cpp +++ b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/set_preprocess.cpp @@ -3,7 +3,7 @@ // #include "multi-device/multi_device_config.hpp" -#include +#include #include "behavior/set_preprocess.hpp" using namespace BehaviorTestsDefinitions; diff --git a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/core_config.cpp b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/core_config.cpp new file mode 100644 index 00000000000000..25bc749cc4fc8d --- /dev/null +++ b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/core_config.cpp @@ -0,0 +1,8 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "functional_test_utils/core_config.hpp" + +void CoreConfiguration(LayerTestsUtils::LayerTestsCommon* test) { +} diff --git a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/plugin_config.cpp b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/plugin_config.cpp deleted file mode 100644 index 53e2dd7baa34de..00000000000000 --- a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/plugin_config.cpp +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (C) 2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "functional_test_utils/plugin_config.hpp" - -void PreparePluginConfiguration(LayerTestsUtils::LayerTestsCommon* test) { -} diff --git a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/subgraph_tests/constant_result.cpp b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/subgraph_tests/constant_result.cpp index ebc2f5fe6d0188..07ad29d2e79403 100644 --- a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/subgraph_tests/constant_result.cpp +++ b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/subgraph_tests/constant_result.cpp @@ -7,7 +7,7 @@ #include "subgraph_tests/constant_result.hpp" #include "common_test_utils/test_constants.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { INSTANTIATE_TEST_CASE_P(smoke_Check, ConstantResultSubgraphTest, diff --git a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/subgraph_tests/reshape_squeeze_reshape_relu.cpp b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/subgraph_tests/reshape_squeeze_reshape_relu.cpp index 0182282d244488..0dd02849e293e8 100644 --- a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/subgraph_tests/reshape_squeeze_reshape_relu.cpp +++ b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/subgraph_tests/reshape_squeeze_reshape_relu.cpp @@ -4,7 +4,7 @@ #include "subgraph_tests/reshape_squeeze_reshape_relu.hpp" #include "common_test_utils/test_constants.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { std::vector inputs = { diff --git a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/subgraph_tests/split_conv_concat.cpp b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/subgraph_tests/split_conv_concat.cpp index e5c987d8c8d6f3..043c27d9ccd664 100644 --- a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/subgraph_tests/split_conv_concat.cpp +++ b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/subgraph_tests/split_conv_concat.cpp @@ -7,7 +7,7 @@ #include "subgraph_tests/split_conv_concat.hpp" #include "common_test_utils/test_constants.hpp" -using namespace LayerTestsDefinitions; +using namespace SubgraphTestsDefinitions; namespace { diff --git a/inference-engine/tests/functional/plugin/myriad/single_layer_tests/out_shape_of_reshape.cpp b/inference-engine/tests/functional/plugin/myriad/single_layer_tests/out_shape_of_reshape.cpp index 00a0cea319e90b..3fd4d1511750d8 100644 --- a/inference-engine/tests/functional/plugin/myriad/single_layer_tests/out_shape_of_reshape.cpp +++ b/inference-engine/tests/functional/plugin/myriad/single_layer_tests/out_shape_of_reshape.cpp @@ -6,7 +6,7 @@ #include "vpu/private_plugin_config.hpp" -#include +#include #include #include #include diff --git a/inference-engine/tests/functional/plugin/myriad/single_layer_tests/static_shape_broadcast.cpp b/inference-engine/tests/functional/plugin/myriad/single_layer_tests/static_shape_broadcast.cpp index 570393e5c58c7b..22caeaa00597bd 100644 --- a/inference-engine/tests/functional/plugin/myriad/single_layer_tests/static_shape_broadcast.cpp +++ b/inference-engine/tests/functional/plugin/myriad/single_layer_tests/static_shape_broadcast.cpp @@ -6,7 +6,7 @@ #include "vpu/private_plugin_config.hpp" -#include +#include #include #include diff --git a/inference-engine/tests/functional/plugin/myriad/single_layer_tests/static_shape_nms.cpp b/inference-engine/tests/functional/plugin/myriad/single_layer_tests/static_shape_nms.cpp index f3ba04d546092c..2d471918c8da6e 100644 --- a/inference-engine/tests/functional/plugin/myriad/single_layer_tests/static_shape_nms.cpp +++ b/inference-engine/tests/functional/plugin/myriad/single_layer_tests/static_shape_nms.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include +#include #include #include diff --git a/inference-engine/tests/functional/plugin/myriad/single_layer_tests/static_shape_nonzero.cpp b/inference-engine/tests/functional/plugin/myriad/single_layer_tests/static_shape_nonzero.cpp index 021fa03bd34f41..098fa4f2a63e23 100644 --- a/inference-engine/tests/functional/plugin/myriad/single_layer_tests/static_shape_nonzero.cpp +++ b/inference-engine/tests/functional/plugin/myriad/single_layer_tests/static_shape_nonzero.cpp @@ -6,7 +6,7 @@ #include "vpu/private_plugin_config.hpp" -#include +#include #include #include #include diff --git a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/concat_split_transpose.cpp b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/concat_split_transpose.cpp index 58ac64b80ba07e..6a9c27f86ab758 100644 --- a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/concat_split_transpose.cpp +++ b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/concat_split_transpose.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include +#include #include "vpu/private_plugin_config.hpp" #include diff --git a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_binary_elementwise.cpp b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_binary_elementwise.cpp index ae4f600d33f011..ee159c6db3e661 100644 --- a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_binary_elementwise.cpp +++ b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_binary_elementwise.cpp @@ -4,7 +4,7 @@ #include "dsr_tests_common.hpp" -#include +#include #include #include diff --git a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_clamp.cpp b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_clamp.cpp index 196fd1167ac7e4..6c68311ca55210 100644 --- a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_clamp.cpp +++ b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_clamp.cpp @@ -4,7 +4,7 @@ #include "dsr_tests_common.hpp" -#include +#include #include #include diff --git a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_concat.cpp b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_concat.cpp index 2926e30783c39d..1ec0a3b15d50ba 100644 --- a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_concat.cpp +++ b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_concat.cpp @@ -4,7 +4,7 @@ #include "dsr_tests_common.hpp" -#include +#include #include #include diff --git a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_convert.cpp b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_convert.cpp index 372e79d0dc2063..846c135a2da9a9 100644 --- a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_convert.cpp +++ b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_convert.cpp @@ -4,7 +4,7 @@ #include "dsr_tests_common.hpp" -#include +#include #include #include diff --git a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_gather.cpp b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_gather.cpp index 199f8010de07a3..b6938c767ed3a3 100644 --- a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_gather.cpp +++ b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_gather.cpp @@ -4,7 +4,7 @@ #include "dsr_tests_common.hpp" -#include +#include #include #include diff --git a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_gather_nd.cpp b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_gather_nd.cpp index 48216541396e2f..7e9d001650700f 100644 --- a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_gather_nd.cpp +++ b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_gather_nd.cpp @@ -4,7 +4,7 @@ #include "dsr_tests_common.hpp" -#include +#include #include namespace { diff --git a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_matmul.cpp b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_matmul.cpp index 67873fd9e9d30c..a54d05826f4baa 100644 --- a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_matmul.cpp +++ b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_matmul.cpp @@ -4,7 +4,7 @@ #include "dsr_tests_common.hpp" -#include +#include #include #include diff --git a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_roialign.cpp b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_roialign.cpp index 1a627e488e549f..1c70d4bdfd3834 100644 --- a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_roialign.cpp +++ b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_roialign.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include +#include #include #include diff --git a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_squeeze.cpp b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_squeeze.cpp index 053bb48b7a7cf2..f7931c8805f459 100644 --- a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_squeeze.cpp +++ b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_squeeze.cpp @@ -4,7 +4,7 @@ #include "dsr_tests_common.hpp" -#include +#include #include #include diff --git a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_strided_slice.cpp b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_strided_slice.cpp index fe9b619cc0bc6c..3d0190639b9b3a 100644 --- a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_strided_slice.cpp +++ b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_strided_slice.cpp @@ -4,7 +4,7 @@ #include "dsr_tests_common.hpp" -#include +#include #include #include diff --git a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_tests_common.hpp b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_tests_common.hpp index 6a68373c3db489..cc8ef1caa42ef7 100644 --- a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_tests_common.hpp +++ b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_tests_common.hpp @@ -11,7 +11,7 @@ #include "vpu/private_plugin_config.hpp" -#include +#include #include namespace LayerTestsUtils { diff --git a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_unary_elementwise.cpp b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_unary_elementwise.cpp index 4d3e8033200b2d..25800e0fa70d02 100644 --- a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_unary_elementwise.cpp +++ b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_unary_elementwise.cpp @@ -4,7 +4,7 @@ #include "dsr_tests_common.hpp" -#include +#include #include #include diff --git a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/nms_nonzero.cpp b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/nms_nonzero.cpp index bcec6448e422b8..92323d1e10c040 100644 --- a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/nms_nonzero.cpp +++ b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/nms_nonzero.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include +#include #include namespace { diff --git a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/nonzero_transpose.cpp b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/nonzero_transpose.cpp index 29a4fc11b2ee36..75aba41989057d 100644 --- a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/nonzero_transpose.cpp +++ b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/nonzero_transpose.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include +#include #include #include #include diff --git a/inference-engine/tests/functional/plugin/shared/CMakeLists.txt b/inference-engine/tests/functional/plugin/shared/CMakeLists.txt index 2b50e312a7d1f8..d80bb2ba6e7eee 100644 --- a/inference-engine/tests/functional/plugin/shared/CMakeLists.txt +++ b/inference-engine/tests/functional/plugin/shared/CMakeLists.txt @@ -9,6 +9,7 @@ list(APPEND EXPORT_DEPENDENCIES funcTestUtils ngraphFunctions lptNgraphFunctions + sharedTestClasses ) set(PUBLIC_HEADERS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include") diff --git a/inference-engine/tests/ie_test_utils/functional_test_utils/behavior_test_utils.hpp b/inference-engine/tests/functional/plugin/shared/include/base/behavior_test_utils.hpp similarity index 100% rename from inference-engine/tests/ie_test_utils/functional_test_utils/behavior_test_utils.hpp rename to inference-engine/tests/functional/plugin/shared/include/base/behavior_test_utils.hpp diff --git a/inference-engine/tests/ie_test_utils/functional_test_utils/import_export_base/import_export_base.hpp b/inference-engine/tests/functional/plugin/shared/include/base/import_export_base/import_export_base.hpp similarity index 94% rename from inference-engine/tests/ie_test_utils/functional_test_utils/import_export_base/import_export_base.hpp rename to inference-engine/tests/functional/plugin/shared/include/base/import_export_base/import_export_base.hpp index 4bb5da58bae20a..8c954e01f46371 100644 --- a/inference-engine/tests/ie_test_utils/functional_test_utils/import_export_base/import_export_base.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/base/import_export_base/import_export_base.hpp @@ -4,7 +4,7 @@ #pragma once -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/config.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/config.hpp index 31f6bdf2c0dc7e..b6110ae7651bf7 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/config.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/config.hpp @@ -10,7 +10,7 @@ #include #include "ie_extension.h" #include -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "ngraph_functions/utils/ngraph_helpers.hpp" #include "ngraph_functions/builders.hpp" #include @@ -23,7 +23,7 @@ #include "functional_test_utils/plugin_cache.hpp" #include "functional_test_utils/blob_utils.hpp" #include -#include +#include #include "ngraph_functions/pass/convert_prc.hpp" #include "ngraph_functions/subgraph_builders.hpp" diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/exec_graph_info.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/exec_graph_info.hpp index e8d85ef8c5eb9b..d1065d2e027ac8 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/exec_graph_info.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/exec_graph_info.hpp @@ -6,7 +6,7 @@ #include #include "ie_extension.h" #include -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "ngraph_functions/utils/ngraph_helpers.hpp" #include "ngraph_functions/builders.hpp" #include @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include "common_test_utils/common_utils.hpp" #include "functional_test_utils/plugin_cache.hpp" diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request.hpp index 5e2c62b2abdf66..c371abf39df7b4 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request.hpp @@ -12,7 +12,7 @@ #include #include "ie_extension.h" #include -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "ngraph_functions/utils/ngraph_helpers.hpp" #include "ngraph_functions/builders.hpp" #include "multi-device/multi_device_config.hpp" @@ -20,12 +20,12 @@ #include #include #include -#include +#include #include "common_test_utils/common_utils.hpp" #include "functional_test_utils/plugin_cache.hpp" #include "functional_test_utils/blob_utils.hpp" #include "ngraph_functions/subgraph_builders.hpp" -#include "subgraph_tests/basic_lstm.hpp" +#include "shared_test_classes/subgraph/basic_lstm.hpp" namespace BehaviorTestsDefinitions { using InferRequestTests = BehaviorTestsUtils::BehaviorTestsBasic; @@ -637,7 +637,7 @@ TEST_P(InferRequestTestsResultNotReady, ReturnResultNotReadyFromWaitInAsyncModeF // return ngrpah::Function // GetNetwork(3000, 380) make inference around 20ms on GNA SW // so increases chances for getting RESULT_NOT_READY - function = LayerTestsDefinitions::Basic_LSTM_S::GetNetwork(300, 38); + function = SubgraphTestsDefinitions::Basic_LSTM_S::GetNetwork(300, 38); InferenceEngine::CNNNetwork cnnNet(function); // Load CNNNetwork to target plugins auto execNet = ie->LoadNetwork(cnnNet, targetDevice, configuration); diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_callback.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_callback.hpp index 873fa1b3878409..ad1b27d6bca205 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_callback.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_callback.hpp @@ -11,11 +11,11 @@ #include #include "ie_extension.h" #include -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "ngraph_functions/utils/ngraph_helpers.hpp" #include "ngraph_functions/builders.hpp" #include -#include +#include #include "common_test_utils/common_utils.hpp" #include "functional_test_utils/plugin_cache.hpp" #include "functional_test_utils/blob_utils.hpp" diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_cancellation.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_cancellation.hpp index 6b6e2f222848b9..da4429c9fe10a1 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_cancellation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_cancellation.hpp @@ -8,19 +8,24 @@ #include #include #include -#include -#include "ie_extension.h" #include -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" -#include "ngraph_functions/builders.hpp" +#include + #include -#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" + #include "common_test_utils/common_utils.hpp" #include "functional_test_utils/plugin_cache.hpp" #include "functional_test_utils/blob_utils.hpp" + #include "ngraph_functions/pass/convert_prc.hpp" #include "ngraph_functions/subgraph_builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "ngraph_functions/builders.hpp" + +#include "base/behavior_test_utils.hpp" #include "behavior/infer_request_cancellation.hpp" namespace BehaviorTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_config.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_config.hpp index 984b19463f126e..b2f2008cd25907 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_config.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_config.hpp @@ -10,7 +10,7 @@ #include #include "ie_extension.h" #include -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "ngraph_functions/utils/ngraph_helpers.hpp" #include "ngraph_functions/builders.hpp" #include @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include "common_test_utils/common_utils.hpp" #include "functional_test_utils/plugin_cache.hpp" #include "functional_test_utils/blob_utils.hpp" diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_input.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_input.hpp index d91c022cdd8d05..d066f8ef80e38a 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_input.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_input.hpp @@ -10,13 +10,13 @@ #include #include "ie_extension.h" #include -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "ngraph_functions/utils/ngraph_helpers.hpp" #include "ngraph_functions/builders.hpp" #include "multi-device/multi_device_config.hpp" #include #include -#include +#include #include "common_test_utils/common_utils.hpp" #include "functional_test_utils/plugin_cache.hpp" #include "functional_test_utils/blob_utils.hpp" diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_output.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_output.hpp index 5f06c664b1369b..a68deeba4a0765 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_output.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/infer_request_output.hpp @@ -10,13 +10,13 @@ #include #include "ie_extension.h" #include -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "ngraph_functions/utils/ngraph_helpers.hpp" #include "ngraph_functions/builders.hpp" #include "multi-device/multi_device_config.hpp" #include #include -#include +#include #include "common_test_utils/common_utils.hpp" #include "functional_test_utils/plugin_cache.hpp" #include "functional_test_utils/blob_utils.hpp" diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/invalid_cases/proposal.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/invalid_cases/proposal.hpp index 3f07be3acbdc26..880f9d1fda665e 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/invalid_cases/proposal.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/invalid_cases/proposal.hpp @@ -4,7 +4,7 @@ #pragma once -#include "single_layer_tests/proposal.hpp" +#include "shared_test_classes/single_layer/proposal.hpp" namespace BehaviorTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/perf_counters.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/perf_counters.hpp index 15859049ec29f9..9f77230eff4c2d 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/perf_counters.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/perf_counters.hpp @@ -8,10 +8,10 @@ #include "common_test_utils/test_assertions.hpp" #include "common_test_utils/common_utils.hpp" #include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "functional_test_utils/blob_utils.hpp" #include "ie_preprocess.hpp" -#include "functional_test_utils/behavior_test_utils.hpp" +#include "base/behavior_test_utils.hpp" namespace BehaviorTestsDefinitions { using PerfCountersTest = BehaviorTestsUtils::BehaviorTestsBasic; diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/preprocessing.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/preprocessing.hpp index d5b322c1cbe0e4..ae825d49c5afcd 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/preprocessing.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/preprocessing.hpp @@ -8,10 +8,10 @@ #include "common_test_utils/test_assertions.hpp" #include "common_test_utils/common_utils.hpp" #include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "functional_test_utils/blob_utils.hpp" #include "ie_preprocess.hpp" -#include "functional_test_utils/behavior_test_utils.hpp" +#include "base/behavior_test_utils.hpp" namespace { void setInputNetworkPrecision(InferenceEngine::CNNNetwork &network, InferenceEngine::InputsDataMap &inputs_info, diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/set_blob.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/set_blob.hpp index 151078ac11557c..6ed62ff59479be 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/set_blob.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/set_blob.hpp @@ -4,7 +4,7 @@ #pragma once -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "common_test_utils/data_utils.hpp" #include "common_test_utils/common_utils.hpp" diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/set_blob_of_kind.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/set_blob_of_kind.hpp index 4f305a74b99408..8271cbcf88e5bd 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/set_blob_of_kind.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/set_blob_of_kind.hpp @@ -4,7 +4,7 @@ #pragma once -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "common_test_utils/common_utils.hpp" namespace BehaviorTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/set_preprocess.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/set_preprocess.hpp index d7e44523b1b16a..3ca9ab37c2cd08 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/set_preprocess.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/set_preprocess.hpp @@ -9,10 +9,10 @@ #include "common_test_utils/test_assertions.hpp" #include "common_test_utils/common_utils.hpp" #include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "functional_test_utils/blob_utils.hpp" #include "ie_preprocess.hpp" -#include "functional_test_utils/behavior_test_utils.hpp" +#include "base/behavior_test_utils.hpp" namespace BehaviorTestsDefinitions { using PreprocessTest = BehaviorTestsUtils::BehaviorTestsBasic; diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/stress_tests.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/stress_tests.hpp index 54aa04b9c7ba09..52a39037f85632 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/stress_tests.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/stress_tests.hpp @@ -9,7 +9,7 @@ #include #include -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/test_plugin.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/test_plugin.hpp index 9e299eebc963ef..36468505a853c9 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/test_plugin.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/test_plugin.hpp @@ -15,9 +15,9 @@ #include #include #include -#include +#include #include -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "ngraph_functions/utils/ngraph_helpers.hpp" #include "ngraph_functions/builders.hpp" diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/version.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/version.hpp index 095147b690fa5b..d663262822bc85 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/version.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/version.hpp @@ -8,10 +8,10 @@ #include "common_test_utils/test_assertions.hpp" #include "common_test_utils/common_utils.hpp" #include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "functional_test_utils/blob_utils.hpp" #include "ie_preprocess.hpp" -#include "functional_test_utils/behavior_test_utils.hpp" +#include "base/behavior_test_utils.hpp" namespace BehaviorTestsDefinitions { using VersionTest = BehaviorTestsUtils::BehaviorTestsBasic; diff --git a/inference-engine/tests/functional/plugin/shared/include/execution_graph_tests/num_inputs_fusing_bin_conv.hpp b/inference-engine/tests/functional/plugin/shared/include/execution_graph_tests/num_inputs_fusing_bin_conv.hpp index 9f47b4ecc5f08a..e198ef69903c6e 100644 --- a/inference-engine/tests/functional/plugin/shared/include/execution_graph_tests/num_inputs_fusing_bin_conv.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/execution_graph_tests/num_inputs_fusing_bin_conv.hpp @@ -7,7 +7,7 @@ #include #include "ngraph_functions/builders.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" namespace ExecutionGraphTests { diff --git a/inference-engine/tests/functional/plugin/shared/include/execution_graph_tests/unique_node_names.hpp b/inference-engine/tests/functional/plugin/shared/include/execution_graph_tests/unique_node_names.hpp index 2c51f91281cc90..353e09f87d18c7 100644 --- a/inference-engine/tests/functional/plugin/shared/include/execution_graph_tests/unique_node_names.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/execution_graph_tests/unique_node_names.hpp @@ -9,7 +9,7 @@ #include #include -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "ngraph_functions/builders.hpp" namespace ExecutionGraphTests { diff --git a/inference-engine/tests/functional/plugin/shared/include/hetero/query_network.hpp b/inference-engine/tests/functional/plugin/shared/include/hetero/query_network.hpp index 1e9b9fd9786558..a8feb88a67d7ee 100644 --- a/inference-engine/tests/functional/plugin/shared/include/hetero/query_network.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/hetero/query_network.hpp @@ -7,7 +7,7 @@ #include #include #include -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "ngraph_functions/utils/ngraph_helpers.hpp" namespace HeteroTests { diff --git a/inference-engine/tests/functional/plugin/shared/include/hetero/synthetic.hpp b/inference-engine/tests/functional/plugin/shared/include/hetero/synthetic.hpp index a944ad44cf24f0..59da21acfb4736 100644 --- a/inference-engine/tests/functional/plugin/shared/include/hetero/synthetic.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/hetero/synthetic.hpp @@ -8,7 +8,7 @@ #include #include #include -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "ngraph_functions/utils/ngraph_helpers.hpp" namespace HeteroTests { diff --git a/inference-engine/tests/functional/plugin/shared/include/import_export_tests/import_nonzero.hpp b/inference-engine/tests/functional/plugin/shared/include/import_export_tests/import_nonzero.hpp index 58d863f3b88dc4..2172697cc55361 100644 --- a/inference-engine/tests/functional/plugin/shared/include/import_export_tests/import_nonzero.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/import_export_tests/import_nonzero.hpp @@ -4,7 +4,7 @@ #pragma once -#include "functional_test_utils/import_export_base/import_export_base.hpp" +#include "base/import_export_base/import_export_base.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/import_export_tests/import_reshape_permute_conv.hpp b/inference-engine/tests/functional/plugin/shared/include/import_export_tests/import_reshape_permute_conv.hpp index e08d4e5dcc570a..1b12cc6589d8f1 100644 --- a/inference-engine/tests/functional/plugin/shared/include/import_export_tests/import_reshape_permute_conv.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/import_export_tests/import_reshape_permute_conv.hpp @@ -4,7 +4,7 @@ #pragma once -#include "functional_test_utils/import_export_base/import_export_base.hpp" +#include "base/import_export_base/import_export_base.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/add_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/add_transformation.hpp index 3df460c1c293ab..866d6d2da3aca8 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/add_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/add_transformation.hpp @@ -6,7 +6,7 @@ #include #include -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/clamp_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/clamp_transformation.hpp index aed62adabeb51a..97ff925b9eafcf 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/clamp_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/clamp_transformation.hpp @@ -4,7 +4,7 @@ #pragma once -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" #include "lpt_ngraph_functions/common/dequantization_operations.hpp" diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/concat_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/concat_transformation.hpp index edb659d66af684..46f66663d2857a 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/concat_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/concat_transformation.hpp @@ -7,7 +7,7 @@ #include #include -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_different_precision_on_childs.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_different_precision_on_childs.hpp index 2993c9224f7331..9ef385d1447f05 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_different_precision_on_childs.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_different_precision_on_childs.hpp @@ -7,7 +7,7 @@ #include #include -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_intermediate_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_intermediate_transformation.hpp index b85d9eb8b00b98..29633c8738fa65 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_intermediate_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_intermediate_transformation.hpp @@ -7,7 +7,7 @@ #include #include -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_neighbors_graph_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_neighbors_graph_transformation.hpp index bde200ce9c9997..c83f9339a14342 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_neighbors_graph_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_neighbors_graph_transformation.hpp @@ -7,7 +7,7 @@ #include #include -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_split_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_split_transformation.hpp index 3a3810daf07e50..97f7028faa7e2b 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_split_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/concat_with_split_transformation.hpp @@ -7,7 +7,7 @@ #include #include -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/convolution_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/convolution_transformation.hpp index fa008401cdf102..90cfd756675749 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/convolution_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/convolution_transformation.hpp @@ -7,7 +7,7 @@ #include #include -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_weights.hpp" diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/convolution_with_incorrect_weights.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/convolution_with_incorrect_weights.hpp index 0e0c297b4180b8..c501166e0de467 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/convolution_with_incorrect_weights.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/convolution_with_incorrect_weights.hpp @@ -7,7 +7,7 @@ #include #include -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_weights.hpp" diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/depth_to_space_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/depth_to_space_transformation.hpp index f47565e6eea2b9..6874278c25cbcd 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/depth_to_space_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/depth_to_space_transformation.hpp @@ -7,7 +7,7 @@ #include #include -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_and_avg_pool_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_and_avg_pool_transformation.hpp index dff852f74317a1..d3ca0b12eab644 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_and_avg_pool_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_and_avg_pool_transformation.hpp @@ -8,7 +8,7 @@ #include #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_and_max_pool_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_and_max_pool_transformation.hpp index ecd09bd3fe1826..4aef7c28182872 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_and_max_pool_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_and_max_pool_transformation.hpp @@ -8,7 +8,7 @@ #include #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_and_two_output_branches_with_convolution.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_and_two_output_branches_with_convolution.hpp index 12584f01c5e09a..d065259e2afff9 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_and_two_output_branches_with_convolution.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_and_two_output_branches_with_convolution.hpp @@ -7,7 +7,7 @@ #include #include -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_weights.hpp" #include "lpt_ngraph_functions/fake_quantize_and_two_output_branches_with_convolution_function.hpp" diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_precision_selection_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_precision_selection_transformation.hpp index 6631331577a33b..7a57360d9f8788 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_precision_selection_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_precision_selection_transformation.hpp @@ -7,7 +7,7 @@ #include #include #include "lpt_ngraph_functions/fake_quantize_function.hpp" -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_weights.hpp" diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_transformation.hpp index 3d4a68122ecdd1..8c9cb2cbc23c48 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fake_quantize_transformation.hpp @@ -7,7 +7,7 @@ #include #include #include "lpt_ngraph_functions/fake_quantize_function.hpp" -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fully_connected_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fully_connected_transformation.hpp index bc8efc5cec116a..2004b77be12682 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fully_connected_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fully_connected_transformation.hpp @@ -7,7 +7,7 @@ #include #include #include -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" class MatMulShapes { public: diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fuse_convert_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fuse_convert_transformation.hpp index e6367c6e418684..fe6cebbcc369c9 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fuse_convert_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fuse_convert_transformation.hpp @@ -7,7 +7,7 @@ #include #include -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" #include "lpt_ngraph_functions/common/dequantization_operations.hpp" diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fuse_fake_quantize_and_scale_shift_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fuse_fake_quantize_and_scale_shift_transformation.hpp index 5a7144ddc6a4d4..48bd9ae60535ca 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fuse_fake_quantize_and_scale_shift_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fuse_fake_quantize_and_scale_shift_transformation.hpp @@ -7,7 +7,7 @@ #include #include #include "lpt_ngraph_functions/fuse_fake_quantize_and_scale_shift_function.hpp" -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fuse_fake_quantize_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fuse_fake_quantize_transformation.hpp index 290b6f11a284a4..a1d5b94e74df24 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fuse_fake_quantize_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fuse_fake_quantize_transformation.hpp @@ -10,7 +10,7 @@ #include "lpt_ngraph_functions/common/add.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" #include "lpt_ngraph_functions/common/dequantization_operations.hpp" -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fuse_multiply_to_fake_quantize_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fuse_multiply_to_fake_quantize_transformation.hpp index fbdbebfeb38099..549249a8419726 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fuse_multiply_to_fake_quantize_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fuse_multiply_to_fake_quantize_transformation.hpp @@ -10,7 +10,7 @@ #include "lpt_ngraph_functions/common/add.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" #include "lpt_ngraph_functions/common/dequantization_operations.hpp" -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fuse_subtract_to_fake_quantize_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fuse_subtract_to_fake_quantize_transformation.hpp index 11744d8161001c..c8d6d273a80ce4 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fuse_subtract_to_fake_quantize_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/fuse_subtract_to_fake_quantize_transformation.hpp @@ -10,7 +10,7 @@ #include "lpt_ngraph_functions/common/add.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" #include "lpt_ngraph_functions/common/dequantization_operations.hpp" -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/gemm_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/gemm_transformation.hpp index d66b2ebb17a178..dedd5fd0322b72 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/gemm_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/gemm_transformation.hpp @@ -7,7 +7,7 @@ #include #include -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/group_convolution_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/group_convolution_transformation.hpp index 6f7f1d6af96851..448cfcae64e7fa 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/group_convolution_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/group_convolution_transformation.hpp @@ -7,7 +7,7 @@ #include #include -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_weights.hpp" diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/interpolate_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/interpolate_transformation.hpp index 4045bfb8759357..a94291142a9900 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/interpolate_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/interpolate_transformation.hpp @@ -7,7 +7,7 @@ #include #include -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/mat_mul_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/mat_mul_transformation.hpp index 43ecdec5a7f427..45357d54b887ca 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/mat_mul_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/mat_mul_transformation.hpp @@ -9,7 +9,7 @@ #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" #include "lpt_ngraph_functions/mat_mul_function.hpp" -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/mat_mul_with_constant_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/mat_mul_with_constant_transformation.hpp index b3d7c668db015a..42ae7cca2f8f2c 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/mat_mul_with_constant_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/mat_mul_with_constant_transformation.hpp @@ -10,7 +10,7 @@ #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_weights.hpp" #include "lpt_ngraph_functions/mat_mul_function.hpp" -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/mat_mul_with_optimized_constant_fake_quantize_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/mat_mul_with_optimized_constant_fake_quantize_transformation.hpp index 76e14249b53316..0df49f02c09abc 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/mat_mul_with_optimized_constant_fake_quantize_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/mat_mul_with_optimized_constant_fake_quantize_transformation.hpp @@ -7,7 +7,7 @@ #include #include -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/multiply_to_group_convolution_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/multiply_to_group_convolution_transformation.hpp index 332fbcffc8d7c4..8a7cc2117ba178 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/multiply_to_group_convolution_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/multiply_to_group_convolution_transformation.hpp @@ -7,7 +7,7 @@ #include #include -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" #include "lpt_ngraph_functions/common/dequantization_operations.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/multiply_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/multiply_transformation.hpp index c1b4cb9a9d02bb..3f2f03714c3aa3 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/multiply_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/multiply_transformation.hpp @@ -7,7 +7,7 @@ #include #include -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/multiply_with_one_parent_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/multiply_with_one_parent_transformation.hpp index f9bf9e87c4adfd..2f8ddaa55bbae4 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/multiply_with_one_parent_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/multiply_with_one_parent_transformation.hpp @@ -7,7 +7,7 @@ #include #include -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/mvn_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/mvn_transformation.hpp index 3c25a9c6de2df8..081049829c21cf 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/mvn_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/mvn_transformation.hpp @@ -7,7 +7,7 @@ #include #include -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" using namespace ngraph; diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/normalize_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/normalize_transformation.hpp index 5cc801890d5e69..8512169b336c7e 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/normalize_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/normalize_transformation.hpp @@ -7,7 +7,7 @@ #include #include -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/output_layers_handling_in_transformations.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/output_layers_handling_in_transformations.hpp index 5e1bf632e162cc..9236c19e73cb5e 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/output_layers_handling_in_transformations.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/output_layers_handling_in_transformations.hpp @@ -7,7 +7,7 @@ #include #include -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/output_layers_handling_in_transformations_for_concat.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/output_layers_handling_in_transformations_for_concat.hpp index 962fc4e4de1da5..1afed3052122d4 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/output_layers_handling_in_transformations_for_concat.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/output_layers_handling_in_transformations_for_concat.hpp @@ -7,7 +7,7 @@ #include #include -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/output_layers_handling_in_transformations_for_concat_multi_channel.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/output_layers_handling_in_transformations_for_concat_multi_channel.hpp index efda48775e670c..1c3696e1c565b7 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/output_layers_handling_in_transformations_for_concat_multi_channel.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/output_layers_handling_in_transformations_for_concat_multi_channel.hpp @@ -7,7 +7,7 @@ #include #include -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/prelu_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/prelu_transformation.hpp index b7108d258150df..399256b5ee2c59 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/prelu_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/prelu_transformation.hpp @@ -6,7 +6,7 @@ #include #include -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/relu_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/relu_transformation.hpp index 8e817dff562dfc..6f920a379626a1 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/relu_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/relu_transformation.hpp @@ -6,7 +6,7 @@ #include #include -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/reshape_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/reshape_transformation.hpp index 8b8ea38c52b4f8..b74fffed8b009a 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/reshape_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/reshape_transformation.hpp @@ -7,7 +7,7 @@ #include #include -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/split_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/split_transformation.hpp index 39e2a7f612fe78..ae71cfca2b7941 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/split_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/split_transformation.hpp @@ -4,7 +4,7 @@ #pragma once -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/squeeze_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/squeeze_transformation.hpp index 4b09c063bf1a35..00d7cc51094f58 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/squeeze_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/squeeze_transformation.hpp @@ -7,7 +7,7 @@ #include #include -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/subtract_multiply_to_multiply_add_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/subtract_multiply_to_multiply_add_transformation.hpp index 593602eea6878a..d99db9477ae367 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/subtract_multiply_to_multiply_add_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/subtract_multiply_to_multiply_add_transformation.hpp @@ -7,7 +7,7 @@ #include #include -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" #include "lpt_ngraph_functions/common/dequantization_operations.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/subtract_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/subtract_transformation.hpp index 6388c20a0ddf0c..49fc0367f0ff80 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/subtract_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/subtract_transformation.hpp @@ -7,7 +7,7 @@ #include #include -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/transpose_after_matmul_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/transpose_after_matmul_transformation.hpp index 9159944edbe0ee..5982a3f6ab628b 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/transpose_after_matmul_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/transpose_after_matmul_transformation.hpp @@ -7,7 +7,7 @@ #include #include -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/transpose_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/transpose_transformation.hpp index 00e261ddc5a29f..72abdfa57d13f8 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/transpose_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/transpose_transformation.hpp @@ -7,7 +7,7 @@ #include #include -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" #include "lpt_ngraph_functions/common/dequantization_operations.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/unsqueeze_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/unsqueeze_transformation.hpp index db3ecb9992e5a8..d54ac53c8e340a 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/unsqueeze_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/unsqueeze_transformation.hpp @@ -7,7 +7,7 @@ #include #include -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/variadic_split_transformation.hpp b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/variadic_split_transformation.hpp index e30e8aeae29085..53f264ca37e02c 100644 --- a/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/variadic_split_transformation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/low_precision_transformations/variadic_split_transformation.hpp @@ -4,7 +4,7 @@ #pragma once -#include "functional_test_utils/low_precision_transformations/layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" #include "lpt_ngraph_functions/common/fake_quantize_on_data.hpp" namespace LayerTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/ngraph_conversion_tests/conv_bias_fusion.hpp b/inference-engine/tests/functional/plugin/shared/include/ngraph_conversion_tests/conv_bias_fusion.hpp index f6344ffda0cd45..80e3e8dd3ef239 100644 --- a/inference-engine/tests/functional/plugin/shared/include/ngraph_conversion_tests/conv_bias_fusion.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/ngraph_conversion_tests/conv_bias_fusion.hpp @@ -16,7 +16,7 @@ #include "functional_test_utils/blob_utils.hpp" #include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" namespace NGraphConversionTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/ngraph_conversion_tests/plugin_specific_ngraph_conversion.hpp b/inference-engine/tests/functional/plugin/shared/include/ngraph_conversion_tests/plugin_specific_ngraph_conversion.hpp index 44497ac8a7563f..bfe3eff73a9d7e 100644 --- a/inference-engine/tests/functional/plugin/shared/include/ngraph_conversion_tests/plugin_specific_ngraph_conversion.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/ngraph_conversion_tests/plugin_specific_ngraph_conversion.hpp @@ -16,7 +16,7 @@ #include "functional_test_utils/blob_utils.hpp" #include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" namespace NGraphConversionTestsDefinitions { diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/activation.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/activation.hpp index 97d3c7d346e679..809fd94d53d6ef 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/activation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/activation.hpp @@ -4,113 +4,16 @@ #pragma once -#include -#include -#include -#include -#include -#include -#include -#include - - -#include "ie_core.hpp" -#include "ie_precision.hpp" -#include "details/ie_exception.hpp" - -#include "ngraph/opsets/opset1.hpp" - -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "common_test_utils/common_utils.hpp" - -#include "ngraph_functions/utils/ngraph_helpers.hpp" -#include "ngraph_functions/builders.hpp" - +#include "shared_test_classes/single_layer/activation.hpp" namespace LayerTestsDefinitions { -static std::map activationNames = { - {ngraph::helpers::ActivationTypes::Sigmoid, "Sigmoid"}, - {ngraph::helpers::ActivationTypes::Tanh, "Tanh"}, - {ngraph::helpers::ActivationTypes::Relu, "Relu"}, - {ngraph::helpers::ActivationTypes::LeakyRelu, "LeakyRelu"}, - {ngraph::helpers::ActivationTypes::Exp, "Exp"}, - {ngraph::helpers::ActivationTypes::Log, "Log"}, - {ngraph::helpers::ActivationTypes::Sign, "Sign"}, - {ngraph::helpers::ActivationTypes::Abs, "Abs"}, - {ngraph::helpers::ActivationTypes::Gelu, "Gelu"}, - {ngraph::helpers::ActivationTypes::Clamp, "Clamp"}, - {ngraph::helpers::ActivationTypes::Negative, "Negative"}, - {ngraph::helpers::ActivationTypes::Acos, "Acos"}, - {ngraph::helpers::ActivationTypes::Asin, "Asin"}, - {ngraph::helpers::ActivationTypes::Atan, "Atan"}, - {ngraph::helpers::ActivationTypes::Cos, "Cos"}, - {ngraph::helpers::ActivationTypes::Cosh, "Cosh"}, - {ngraph::helpers::ActivationTypes::Floor, "Floor"}, - {ngraph::helpers::ActivationTypes::Sin, "Sin"}, - {ngraph::helpers::ActivationTypes::Sinh, "Sinh"}, - {ngraph::helpers::ActivationTypes::Sqrt, "Sqrt"}, - {ngraph::helpers::ActivationTypes::Tan, "Tan"}, - {ngraph::helpers::ActivationTypes::Elu, "Elu"}, - {ngraph::helpers::ActivationTypes::Erf, "Erf"}, - {ngraph::helpers::ActivationTypes::HardSigmoid, "HardSigmoid"}, - {ngraph::helpers::ActivationTypes::Selu, "Selu"}, - {ngraph::helpers::ActivationTypes::Sigmoid, "Sigmoid"}, - {ngraph::helpers::ActivationTypes::Tanh, "Tanh"}, - {ngraph::helpers::ActivationTypes::Relu, "Relu"}, - {ngraph::helpers::ActivationTypes::LeakyRelu, "LeakyRelu"}, - {ngraph::helpers::ActivationTypes::Exp, "Exp"}, - {ngraph::helpers::ActivationTypes::Log, "Log"}, - {ngraph::helpers::ActivationTypes::Sign, "Sign"}, - {ngraph::helpers::ActivationTypes::Abs, "Abs"}, - {ngraph::helpers::ActivationTypes::Gelu, "Gelu"}, - {ngraph::helpers::ActivationTypes::Ceiling, "Ceiling"}, - {ngraph::helpers::ActivationTypes::PReLu, "PReLu"}, - {ngraph::helpers::ActivationTypes::Mish, "Mish"}, - {ngraph::helpers::ActivationTypes::HSwish, "HSwish"}, - {ngraph::helpers::ActivationTypes::SoftPlus, "SoftPlus"}, - {ngraph::helpers::ActivationTypes::Swish, "Swish"}, - {ngraph::helpers::ActivationTypes::HSigmoid, "HSigmoid"}, - {ngraph::helpers::ActivationTypes::RoundHalfToEven, "RoundHalfToEven"}, - {ngraph::helpers::ActivationTypes::RoundHalfAwayFromZero, "RoundHalfAwayFromZero"} -}; - -typedef std::tuple< - std::pair>, // Activation type and constant value - InferenceEngine::Precision, - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - InferenceEngine::Layout, // Output layout - std::pair, std::vector>, - std::string> activationParams; - -class ActivationLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - ngraph::helpers::ActivationTypes activationType; - static std::string getTestCaseName(const testing::TestParamInfo &obj); - InferenceEngine::Blob::Ptr GenerateInput(const InferenceEngine::InputInfo &info) const override; - -protected: - void SetUp() override; -}; - -class ActivationParamLayerTest : public ActivationLayerTest { -public: - void Infer() override; - -protected: - void SetUp() override; - -private: - void generateActivationBlob(std::vector constantsValue); - ngraph::ParameterVector createActivationParams( - ngraph::element::Type ngPrc, std::vector inShape = {}); +TEST_P(ActivationLayerTest, CompareWithRefs) { + Run(); +} -private: - std::vector constantsValue; -}; +TEST_P(ActivationParamLayerTest, CompareWithRefs) { + Run(); +} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/batch_norm.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/batch_norm.hpp index c982040320238a..502dc5231699dc 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/batch_norm.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/batch_norm.hpp @@ -4,31 +4,13 @@ #pragma once -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/single_layer/batch_norm.hpp" #include "ngraph_functions/builders.hpp" -typedef std::tuple< - double, // epsilon - InferenceEngine::Precision, // Net precision - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - InferenceEngine::Layout, // Output layout - InferenceEngine::SizeVector, // Input shapes - LayerTestsUtils::TargetDevice // Target device name -> BatchNormLayerTestParams; - namespace LayerTestsDefinitions { -class BatchNormLayerTest : public testing::WithParamInterface, - public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo& obj); - - InferenceEngine::Blob::Ptr GenerateInput(const InferenceEngine::InputInfo &info) const override; - -protected: - void SetUp() override; -}; +TEST_P(BatchNormLayerTest, CompareWithRefs) { + Run(); +} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/batch_to_space.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/batch_to_space.hpp index 04dec5d8c79e6d..248372ffbfda62 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/batch_to_space.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/batch_to_space.hpp @@ -9,29 +9,12 @@ #include #include -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/single_layer/batch_to_space.hpp" namespace LayerTestsDefinitions { -using batchToSpaceParamsTuple = typename std::tuple< - std::vector, // block shape - std::vector, // crops begin - std::vector, // crops end - std::vector, // Input shapes - InferenceEngine::Precision, // Network precision - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - InferenceEngine::Layout, // Output layout - std::string>; // Device name>; - -class BatchToSpaceLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); - -protected: - void SetUp() override; +TEST_P(BatchToSpaceLayerTest, CompareWithRefs) { + Run(); }; -} // namespace LayerTestsDefinitions \ No newline at end of file +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/broadcast.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/broadcast.hpp index 3634fc0d39bd00..30062c0464bd39 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/broadcast.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/broadcast.hpp @@ -4,32 +4,11 @@ #pragma once -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "shared_test_classes/single_layer/broadcast.hpp" namespace LayerTestsDefinitions { -using BroadcastParamsTuple = typename std::tuple< - InferenceEngine::SizeVector, // target shape - ngraph::AxisSet, // axes mapping - ngraph::op::BroadcastType, // broadcast mode - InferenceEngine::SizeVector, // Input shape - InferenceEngine::Precision, // Network precision - std::string>; // Device name - -class BroadcastLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); - -protected: - void SetUp() override; -}; - -} // namespace LayerTestsDefinitions \ No newline at end of file +TEST_P(BroadcastLayerTest, CompareWithRefs) { + Run(); +} +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/comparison.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/comparison.hpp index 817a4226021df8..c40325b0c769f8 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/comparison.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/comparison.hpp @@ -2,38 +2,13 @@ // // SPDX-License-Identifier: Apache-2.0 -#include +#pragma once -#include -#include - -#include "common_test_utils/common_utils.hpp" -#include "common_test_utils/test_common.hpp" -#include "common_test_utils/test_constants.hpp" -#include "ie_core.hpp" +#include namespace LayerTestsDefinitions { -namespace ComparisonParams { -using InputShapesTuple = std::pair, std::vector>; -} // ComparisonParams - -typedef std::tuple< - ComparisonParams::InputShapesTuple, // Input shapes tuple - InferenceEngine::Precision, // NG Inputs precision - ngraph::helpers::ComparisonTypes, // Comparison op type - ngraph::helpers::InputLayerType, // Second input type - InferenceEngine::Precision, // IE in precision - InferenceEngine::Precision, // IE out precision - std::string, // Device name - std::map // Additional network configuration -> ComparisonTestParams; - -class ComparisonLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -protected: - void SetUp() override; -public: - static std::string getTestCaseName(testing::TestParamInfo obj); -}; +TEST_P(ComparisonLayerTest, ComparisonTests) { + Run(); +} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/concat.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/concat.hpp index 85c47a95418f8c..60603dc83185e2 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/concat.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/concat.hpp @@ -4,36 +4,12 @@ #pragma once -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "shared_test_classes/single_layer/concat.hpp" namespace LayerTestsDefinitions { -using concatParamsTuple = typename std::tuple< - //TODO: according to specification axis have to be int, negative values are allowed - size_t, // Concat axis - std::vector>, // Input shapes - InferenceEngine::Precision, // Network precision - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - InferenceEngine::Layout, // Output layout - std::string>; // Device name - -// Multichannel -class ConcatLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); - -protected: - void SetUp() override; +TEST_P(ConcatLayerTest, CompareWithRefs) { + Run(); }; } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/convert.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/convert.hpp index ede69da91025ef..5c82419454f1d8 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/convert.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/convert.hpp @@ -4,32 +4,12 @@ #pragma once -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "shared_test_classes/single_layer/convert.hpp" namespace LayerTestsDefinitions { -using ConvertParamsTuple = typename std::tuple< - std::vector>, // Input shapes - InferenceEngine::Precision, // Source precision - InferenceEngine::Precision, // Target precision - InferenceEngine::Layout, // Input layout - InferenceEngine::Layout, // Output layout - std::string>; // Device name - -class ConvertLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); - -protected: - void SetUp() override; +TEST_P(ConvertLayerTest, CompareWithRefs) { + Run(); }; } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/convert_like.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/convert_like.hpp index 5619810b1e9991..fcefd26cf88e85 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/convert_like.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/convert_like.hpp @@ -4,33 +4,12 @@ #pragma once -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "shared_test_classes/single_layer/convert_like.hpp" namespace LayerTestsDefinitions { -using ConvertLikeParamsTuple = typename std::tuple< - std::vector>, // Input1 shapes - InferenceEngine::Precision, // Input1 precision - std::vector>, // Input2 shapes - InferenceEngine::Precision, // Input2 precision - InferenceEngine::Layout, // Input layout - InferenceEngine::Layout, // Output layout - std::string>; // Device name - -class ConvertLikeLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); - -protected: - void SetUp() override; +TEST_P(ConvertLikeLayerTest, CompareWithRefs) { + Run(); }; } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/convolution.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/convolution.hpp index 3e982e4ee0fb5a..ddde8ac0606aba 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/convolution.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/convolution.hpp @@ -4,46 +4,12 @@ #pragma once -#include -#include -#include -#include +#include "shared_test_classes/single_layer/convolution.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" - -// ! [test_convolution:definition] -typedef std::tuple< - InferenceEngine::SizeVector, // Kernel size - InferenceEngine::SizeVector, // Strides - std::vector, // Pad begin - std::vector, // Pad end - InferenceEngine::SizeVector, // Dilation - size_t, // Num out channels - ngraph::op::PadType // Padding type -> convSpecificParams; -typedef std::tuple< - convSpecificParams, - InferenceEngine::Precision, // Net precision - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - InferenceEngine::Layout, // Output layout - InferenceEngine::SizeVector, // Input shapes - LayerTestsUtils::TargetDevice // Device name -> convLayerTestParamsSet; namespace LayerTestsDefinitions { - -class ConvolutionLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - -protected: - void SetUp() override; -}; -// ! [test_convolution:definition] +TEST_P(ConvolutionLayerTest, CompareWithRefs) { + Run(); +} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/convolution_backprop_data.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/convolution_backprop_data.hpp index 18809f8113e182..4c71061464a581 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/convolution_backprop_data.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/convolution_backprop_data.hpp @@ -4,44 +4,12 @@ #pragma once -#include -#include -#include -#include +#include "shared_test_classes/single_layer/convolution_backprop_data.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" - -typedef std::tuple< - InferenceEngine::SizeVector, // Kernel size - InferenceEngine::SizeVector, // Strides - std::vector, // Pad begin - std::vector, // Pad end - InferenceEngine::SizeVector, // Dilation - size_t, // Num out channels - ngraph::op::PadType // Padding type -> convBackpropDataSpecificParams; -typedef std::tuple< - convBackpropDataSpecificParams, - InferenceEngine::Precision, // Net precision - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - InferenceEngine::Layout, // Output layout - InferenceEngine::SizeVector, // Input shapes - LayerTestsUtils::TargetDevice // Device name -> convBackpropDataLayerTestParamsSet; namespace LayerTestsDefinitions { +TEST_P(ConvolutionBackpropDataLayerTest, CompareWithRefs) { + Run(); +} -class ConvolutionBackpropDataLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - -protected: - void SetUp() override; -}; - -} // namespace LayerTestsDefinitions +} diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/ctc_greedy_decoder.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/ctc_greedy_decoder.hpp index d564f553cc5bde..b24f62be408b4b 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/ctc_greedy_decoder.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/ctc_greedy_decoder.hpp @@ -4,53 +4,12 @@ #pragma once -#include -#include -#include -#include -#include -#include -#include -#include - - -#include "ie_core.hpp" -#include "ie_precision.hpp" -#include "details/ie_exception.hpp" - -#include "ngraph/opsets/opset1.hpp" - -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "common_test_utils/common_utils.hpp" - -#include "ngraph_functions/utils/ngraph_helpers.hpp" -#include "ngraph_functions/builders.hpp" - +#include "shared_test_classes/single_layer/ctc_greedy_decoder.hpp" namespace LayerTestsDefinitions { -typedef std::tuple< - InferenceEngine::Precision, - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - InferenceEngine::Layout, // Output layout - InferenceEngine::SizeVector, - bool, - std::string> ctcGreedyDecoderParams; - -class CTCGreedyDecoderLayerTest - : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo& obj); - -protected: - InferenceEngine::SizeVector inputShapes; - InferenceEngine::SizeVector sequenceLengths; - bool mergeRepeated; - void SetUp() override; +TEST_P(CTCGreedyDecoderLayerTest, CompareWithRefs) { + Run(); }; } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/ctc_loss.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/ctc_loss.hpp index 6b16c9517cc714..be7276ceace510 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/ctc_loss.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/ctc_loss.hpp @@ -4,40 +4,12 @@ #pragma once -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" - - -typedef std::tuple< - std::vector, // Logits shapes - std::vector, // logits lenght - std::vector>, // labels - std::vector, // labels length - int, // blank index - bool, // preprocessCollapseRepeated - bool, // ctcMergeRepeated - bool // Unique -> CTCLossParamsSubset; - -typedef std::tuple< - CTCLossParamsSubset, - InferenceEngine::Precision, // Float point precision - InferenceEngine::Precision, // Integer precision - LayerTestsUtils::TargetDevice // Device name -> CTCLossParams; +#include "shared_test_classes/single_layer/ctc_loss.hpp" namespace LayerTestsDefinitions { -class CTCLossLayerTest : public testing::WithParamInterface, - public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); - -protected: - void SetUp() override; -}; +TEST_P(CTCLossLayerTest, CompareWithRefs) { + Run(); +} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/cum_sum.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/cum_sum.hpp index 2f170cab9d402b..8be3dfee95442d 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/cum_sum.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/cum_sum.hpp @@ -4,28 +4,12 @@ #pragma once -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" +#include "shared_test_classes/single_layer/cum_sum.hpp" namespace LayerTestsDefinitions { -typedef std::tuple< - InferenceEngine::SizeVector, // Input shapes - InferenceEngine::Precision, // Input precision - int64_t, // Axis - bool, // Exclusive - bool, // Reverse - std::string> cumSumParams; // Device name - -class CumSumLayerTest : public testing::WithParamInterface, virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - -protected: - void SetUp() override; +TEST_P(CumSumLayerTest, CompareWithRefs) { + Run(); }; } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/depth_to_space.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/depth_to_space.hpp index adfbb305afc0c3..3f63b3d06cf9b7 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/depth_to_space.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/depth_to_space.hpp @@ -4,29 +4,12 @@ #pragma once -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/single_layer/depth_to_space.hpp" namespace LayerTestsDefinitions { -using depthToSpaceParamsTuple = typename std::tuple< - std::vector, // Input shape - InferenceEngine::Precision, // Input precision - ngraph::opset3::DepthToSpace::DepthToSpaceMode, // Mode - std::size_t, // Block size - std::string>; // Device name> - -class DepthToSpaceLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); - -protected: - void SetUp() override; +TEST_P(DepthToSpaceLayerTest, CompareWithRefs) { + Run(); }; -} // namespace LayerTestsDefinitions \ No newline at end of file +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/detection_output.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/detection_output.hpp index cddc56c45ee71b..1348434c8021dd 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/detection_output.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/detection_output.hpp @@ -4,68 +4,12 @@ #pragma once -#include -#include -#include -#include - -#include "ngraph/op/detection_output.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/single_layer/detection_output.hpp" namespace LayerTestsDefinitions { -enum { - idxLocation, - idxConfidence, - idxPriors, - idxArmConfidence, - idxArmLocation, - numInputs -}; - -using DetectionOutputAttributes = std::tuple< - int, // numClasses - int, // backgroundLabelId - int, // topK - std::vector, // keepTopK - std::string, // codeType - float, // nmsThreshold - float, // confidenceThreshold - bool, // clip_afterNms - bool, // clip_beforeNms - bool // decreaseLabelId ->; - -using ParamsWhichSizeDepends = std::tuple< - bool, // varianceEncodedInTarget - bool, // shareLocation - bool, // normalized - size_t, // inputHeight - size_t, // inputWidth - InferenceEngine::SizeVector, // "Location" input - InferenceEngine::SizeVector, // "Confidence" input - InferenceEngine::SizeVector, // "Priors" input - InferenceEngine::SizeVector, // "ArmConfidence" input - InferenceEngine::SizeVector // "ArmLocation" input ->; - -using DetectionOutputParams = std::tuple< - DetectionOutputAttributes, - ParamsWhichSizeDepends, - size_t, // Number of batch - float, // objectnessScore - std::string // Device name ->; - -class DetectionOutputLayerTest : public testing::WithParamInterface, virtual public LayerTestsUtils::LayerTestsCommon { - public: - static std::string getTestCaseName(testing::TestParamInfo obj); - ngraph::op::DetectionOutputAttrs attrs; - std::vector inShapes; - void Infer() override; - void Compare(const std::vector &expected, const InferenceEngine::Blob::Ptr &actual) override; - protected: - void SetUp() override; +TEST_P(DetectionOutputLayerTest, CompareWithRefs) { + Run(); }; } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/eltwise.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/eltwise.hpp index 83823bd33d14f3..fb4e3bf3a64c20 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/eltwise.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/eltwise.hpp @@ -2,41 +2,12 @@ // // SPDX-License-Identifier: Apache-2.0 // -// NOTE: WILL BE REWORKED (31905) +#pragma once -#include - -#include -#include - -#include "common_test_utils/common_utils.hpp" -#include "common_test_utils/test_common.hpp" -#include "common_test_utils/test_constants.hpp" -#include "common_test_utils/common_layers_params.hpp" -#include "ie_core.hpp" +#include namespace LayerTestsDefinitions { - -typedef std::tuple< - std::vector>, // input shapes - ngraph::helpers::EltwiseTypes, // eltwise op type - ngraph::helpers::InputLayerType, // secondary input type - CommonTestUtils::OpType, // op type - InferenceEngine::Precision, // Net precision - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - std::string, // Device name - std::map // Additional network configuration -> EltwiseTestParams; - -class EltwiseLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -protected: - InferenceEngine::Blob::Ptr GenerateInput(const InferenceEngine::InputInfo &info) const override; - void SetUp() override; - -public: - static std::string getTestCaseName(testing::TestParamInfo obj); -}; +TEST_P(EltwiseLayerTest, EltwiseTests) { + Run(); +} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/embedding_bag_offsets_sum.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/embedding_bag_offsets_sum.hpp index dae948b951f92d..275ca8aa7fe779 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/embedding_bag_offsets_sum.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/embedding_bag_offsets_sum.hpp @@ -4,36 +4,12 @@ #pragma once -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" - -typedef std::tuple< - std::vector, // emb_table_shape - std::vector, // indices - std::vector, // offsets - size_t, // default_index - bool, // with_weights - bool // with_def_index - > embeddingBagOffsetsSumParams; - -typedef std::tuple< - embeddingBagOffsetsSumParams, - InferenceEngine::Precision, // embedding table - InferenceEngine::Precision, // indices - LayerTestsUtils::TargetDevice> embeddingBagOffsetsSumLayerTestParamsSet; +#include "shared_test_classes/single_layer/embedding_bag_offsets_sum.hpp" namespace LayerTestsDefinitions { -class EmbeddingBagOffsetsSumLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - -protected: - void SetUp() override; -}; +TEST_P(EmbeddingBagOffsetsSumLayerTest, CompareWithRefs) { + Run(); +} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/embedding_bag_packed_sum.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/embedding_bag_packed_sum.hpp index e1ab3cc4203c22..3971bcecf3acc9 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/embedding_bag_packed_sum.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/embedding_bag_packed_sum.hpp @@ -4,33 +4,11 @@ #pragma once -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" - -typedef std::tuple< - std::vector, // emb_table_shape - std::vector>, // indices - bool // with_weights - > embeddingBagPackedSumParams; - -typedef std::tuple< - embeddingBagPackedSumParams, - InferenceEngine::Precision, // embedding table - InferenceEngine::Precision, // indices - LayerTestsUtils::TargetDevice> embeddingBagPackedSumLayerTestParamsSet; +#include "shared_test_classes/single_layer/embedding_bag_packed_sum.hpp" namespace LayerTestsDefinitions { -class EmbeddingBagPackedSumLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - -protected: - void SetUp() override; -}; - +TEST_P(EmbeddingBagPackedSumLayerTest, CompareWithRefs) { + Run(); +} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/embedding_segments_sum.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/embedding_segments_sum.hpp index c848f7f1392b89..d78df0511421c8 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/embedding_segments_sum.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/embedding_segments_sum.hpp @@ -4,37 +4,12 @@ #pragma once -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" - -typedef std::tuple< - std::vector, // emb_table_shape - std::vector, // indices - std::vector, // segment_ids - size_t, // num_segments - size_t, // default_index - bool, // with_weights - bool // with_def_index - > embeddingSegmentsSumParams; - -typedef std::tuple< - embeddingSegmentsSumParams, - InferenceEngine::Precision, // embedding table - InferenceEngine::Precision, // indices - LayerTestsUtils::TargetDevice> embeddingSegmentsSumLayerTestParamsSet; +#include "shared_test_classes/single_layer/embedding_segments_sum.hpp" namespace LayerTestsDefinitions { -class EmbeddingSegmentsSumLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - -protected: - void SetUp() override; -}; +TEST_P(EmbeddingSegmentsSumLayerTest, CompareWithRefs) { + Run(); +} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/extract_image_patches.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/extract_image_patches.hpp index b910997e7d83ef..077ea6fcc55624 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/extract_image_patches.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/extract_image_patches.hpp @@ -4,34 +4,12 @@ #pragma once -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/single_layer/extract_image_patches.hpp" namespace LayerTestsDefinitions { -using extractImagePatchesTuple = typename std::tuple< - std::vector, // input shape - std::vector, // kernel size - std::vector, // strides - std::vector, // rates - ngraph::op::PadType, // pad type - InferenceEngine::Precision, // Network precision - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - LayerTestsUtils::TargetDevice>; // Device name - -class ExtractImagePatchesTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); - -protected: - void SetUp() override; +TEST_P(ExtractImagePatchesTest, CompareWithRefs) { + Run(); }; } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/fake_quantize.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/fake_quantize.hpp index 18412b31fa289d..a4fa5e7666bb66 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/fake_quantize.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/fake_quantize.hpp @@ -4,50 +4,25 @@ #pragma once -#include -#include -#include -#include +#include "shared_test_classes/single_layer/fake_quantize.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" - -typedef std::tuple< - size_t, // levels - std::vector, // const inputs shape - std::vector, // fake quantize inputLow, inputHigh, outputLow, outputHigh or empty for random - std::vector // input generator data: low, high, resolution -> fqSpecificParams; -typedef std::tuple< - fqSpecificParams, - InferenceEngine::Precision, // Net precision - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - InferenceEngine::Layout, // Output layout - InferenceEngine::SizeVector, // Input shapes - LayerTestsUtils::TargetDevice, // Device name - - std::pair> // Additional backend configuration and alis name to it -> fqLayerTestParamsSet; namespace LayerTestsDefinitions { - -class FakeQuantizeLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - InferenceEngine::Blob::Ptr GenerateInput(const InferenceEngine::InputInfo &info) const override; -protected: - void SetUp() override; - void UpdateSeed(); - - protected: - float inputDataMin = 0.0; - float inputDataMax = 10.0; - float inputDataResolution = 1.0; - int32_t seed = 1; -}; +TEST_P(FakeQuantizeLayerTest, CompareWithRefs) { + Run(); + SKIP_IF_CURRENT_TEST_IS_DISABLED(); + + if (BASE_SEED != USE_CLOCK_TIME && + BASE_SEED != USE_INCREMENTAL_SEED) { + return; + } + + size_t nIterations = 1; + for (; nIterations != 0; nIterations--) { + UpdateSeed(); + Infer(); + Validate(); + } +} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/gather.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/gather.hpp index c4be4ca64c5760..91d47c046ea04a 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/gather.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/gather.hpp @@ -4,41 +4,12 @@ #pragma once -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "shared_test_classes/single_layer/gather.hpp" namespace LayerTestsDefinitions { -typedef std::tuple< - std::vector, // Indices - std::vector, // Indices shape - int, // Gather axis - std::vector, // Input shapes - InferenceEngine::Precision, // Network precision - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - InferenceEngine::Layout, // Output layout - std::string // Device name -> gatherParamsTuple; - -class GatherLayerTestBase : virtual public LayerTestsUtils::LayerTestsCommon { -protected: - void SetUp(const gatherParamsTuple& params); -}; - -class GatherLayerTest : public testing::WithParamInterface, public GatherLayerTestBase { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); - -protected: - void SetUp() override; +TEST_P(GatherLayerTest, CompareWithRefs) { + Run(); }; } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/gather_nd.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/gather_nd.hpp index 81113616378300..f366a7f82f9fc1 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/gather_nd.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/gather_nd.hpp @@ -4,37 +4,12 @@ #pragma once -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" - -using Config = std::map; - -typedef std::tuple< - std::vector, // Data shapes - std::vector, // Indices shape - int // batch dims -> GatherNDParamsSubset; - -typedef std::tuple< - GatherNDParamsSubset, - InferenceEngine::Precision, // Data precision - InferenceEngine::Precision, // Indices precision - LayerTestsUtils::TargetDevice, // Device name - Config // Plugin config -> GatherNDParams; +#include "shared_test_classes/single_layer/gather_nd.hpp" namespace LayerTestsDefinitions { -class GatherNDLayerTest : public testing::WithParamInterface, - public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); - -protected: - void SetUp() override; -}; +TEST_P(GatherNDLayerTest, CompareWithRefs) { + Run(); +} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/gather_tree.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/gather_tree.hpp index 56ce9d7de32d67..d153f6ed9d1ace 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/gather_tree.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/gather_tree.hpp @@ -4,35 +4,12 @@ #pragma once -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "shared_test_classes/single_layer/gather_tree.hpp" namespace LayerTestsDefinitions { -using GatherTreeParamsTuple = typename std::tuple< - std::vector, // Input tensors shape - ngraph::helpers::InputLayerType, // Secondary input type - InferenceEngine::Precision, // Network precision - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - InferenceEngine::Layout, // Output layout - std::string>; // Device name - -class GatherTreeLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); - InferenceEngine::Blob::Ptr GenerateInput(const InferenceEngine::InputInfo &info) const override; - -protected: - void SetUp() override; +TEST_P(GatherTreeLayerTest, CompareWithRefs) { + Run(); }; } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/grn.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/grn.hpp index 41e4d484f6dfeb..8ef6aef818cd8a 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/grn.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/grn.hpp @@ -4,52 +4,10 @@ #pragma once -#include -#include -#include -#include -#include -#include -#include -#include - - -#include "ie_core.hpp" -#include "ie_precision.hpp" -#include "details/ie_exception.hpp" - -#include "ngraph/opsets/opset1.hpp" - -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "common_test_utils/common_utils.hpp" - -#include "ngraph_functions/utils/ngraph_helpers.hpp" -#include "ngraph_functions/builders.hpp" - +#include "shared_test_classes/single_layer/grn.hpp" namespace LayerTestsDefinitions { -typedef std::tuple< - InferenceEngine::Precision, - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - InferenceEngine::Layout, // Output layout - InferenceEngine::SizeVector, - float, - std::string> grnParams; - -class GrnLayerTest - : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon{ -public: - static std::string getTestCaseName(const testing::TestParamInfo& obj); - -protected: - InferenceEngine::SizeVector inputShapes; - float bias; - - void SetUp() override; +TEST_P(GrnLayerTest, CompareWithRefs) { + Run(); }; - } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/group_convolution.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/group_convolution.hpp index d853838ef598c9..57d3c06790ed81 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/group_convolution.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/group_convolution.hpp @@ -4,43 +4,10 @@ #pragma once -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" - -typedef std::tuple< - InferenceEngine::SizeVector, - InferenceEngine::SizeVector, - std::vector, - std::vector, - InferenceEngine::SizeVector, - size_t, - size_t, - ngraph::op::PadType> groupConvSpecificParams; -typedef std::tuple< - groupConvSpecificParams, - InferenceEngine::Precision, - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - InferenceEngine::Layout, // Output layout - InferenceEngine::SizeVector, - LayerTestsUtils::TargetDevice> groupConvLayerTestParamsSet; +#include "shared_test_classes/single_layer/group_convolution.hpp" namespace LayerTestsDefinitions { - -class GroupConvolutionLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - -protected: - void SetUp() override; -}; - +TEST_P(GroupConvolutionLayerTest, CompareWithRefs) { + Run(); +} } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/group_convolution_backprop_data.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/group_convolution_backprop_data.hpp index 9d06059ce725ae..aa2277ee26bd04 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/group_convolution_backprop_data.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/group_convolution_backprop_data.hpp @@ -4,43 +4,12 @@ #pragma once -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" - -typedef std::tuple< - InferenceEngine::SizeVector, - InferenceEngine::SizeVector, - std::vector, - std::vector, - InferenceEngine::SizeVector, - size_t, - size_t, - ngraph::op::PadType> groupConvBackpropDataSpecificParams; -typedef std::tuple< - groupConvBackpropDataSpecificParams, - InferenceEngine::Precision, - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - InferenceEngine::Layout, // Output layout - InferenceEngine::SizeVector, - LayerTestsUtils::TargetDevice> groupConvBackpropDataLayerTestParamsSet; +#include "shared_test_classes/single_layer/group_convolution_backprop_data.hpp" namespace LayerTestsDefinitions { -class GroupConvBackpropDataLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - -protected: - void SetUp() override; -}; +TEST_P(GroupConvBackpropDataLayerTest, CompareWithRefs) { + Run(); +} } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/gru_cell.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/gru_cell.hpp index af8587a30b3db1..ba4fd51f77f4bf 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/gru_cell.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/gru_cell.hpp @@ -4,35 +4,12 @@ #pragma once -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "shared_test_classes/single_layer/gru_cell.hpp" namespace LayerTestsDefinitions { -using GRUCellParams = typename std::tuple< - bool, // using decompose to sub-ops transformation - size_t, // batch - size_t, // hidden size - size_t, // input size - std::vector, // activations - float, // clip - bool, // linear_before_reset - InferenceEngine::Precision, // Network precision - std::string>; // Device name - -class GRUCellTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); - -protected: - void SetUp() override; +TEST_P(GRUCellTest, CompareWithRefs) { + Run(); }; } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/gru_sequence.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/gru_sequence.hpp index 9953b88ef22569..4ecb0014a1b89a 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/gru_sequence.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/gru_sequence.hpp @@ -4,43 +4,12 @@ #pragma once -#include -#include -#include -#include -#include -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "shared_test_classes/single_layer/gru_sequence.hpp" namespace LayerTestsDefinitions { -using GRUSequenceParams = typename std::tuple< - ngraph::helpers::SequenceTestsMode, // pure Sequence or TensorIterator - size_t, // seq_lengths - size_t, // batch - size_t, // hidden size - // todo: fix. input size hardcoded to 10 due to limitation (10 args) of gtests Combine() func. - //size_t, // input size - std::vector, // activations - float, // clip - bool, // linear_before_reset - ngraph::op::RecurrentSequenceDirection, // direction - InferenceEngine::Precision, // Network precision - std::string>; // Device name - -class GRUSequenceTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); - -protected: - void SetUp() override; - void Infer() override; - -private: - ngraph::helpers::SequenceTestsMode m_mode; - int64_t m_max_seq_len = 0; +TEST_P(GRUSequenceTest, CompareWithRefs) { + Run(); }; } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/interpolate.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/interpolate.hpp index b5484c58ea1338..28a079aebe6c5f 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/interpolate.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/interpolate.hpp @@ -4,50 +4,12 @@ #pragma once -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" - -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "shared_test_classes/single_layer/interpolate.hpp" namespace LayerTestsDefinitions { -typedef std::tuple< - ngraph::op::v4::Interpolate::InterpolateMode, // InterpolateMode - ngraph::op::v4::Interpolate::ShapeCalcMode, // ShapeCalculationMode - ngraph::op::v4::Interpolate::CoordinateTransformMode, // CoordinateTransformMode - ngraph::op::v4::Interpolate::NearestMode, // NearestMode - bool, // AntiAlias - std::vector, // PadBegin - std::vector, // PadEnd - double, // Cube coef - std::vector, // Axes - std::vector // Scales -> InterpolateSpecificParams; - -typedef std::tuple< - InterpolateSpecificParams, - InferenceEngine::Precision, // Net precision - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - InferenceEngine::Layout, // Output layout - InferenceEngine::SizeVector, // Input shapes - InferenceEngine::SizeVector, // Target shapes - LayerTestsUtils::TargetDevice // Device name -> InterpolateLayerTestParams; - -class InterpolateLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - -protected: - void SetUp() override; -}; +TEST_P(InterpolateLayerTest, CompareWithRefs) { + Run(); +} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/log_softmax.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/log_softmax.hpp index 0c2231d098e1b2..5c5459f9a0a063 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/log_softmax.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/log_softmax.hpp @@ -5,37 +5,12 @@ #pragma once -#include -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "shared_test_classes/single_layer/log_softmax.hpp" namespace LayerTestsDefinitions { -using logSoftmaxLayerTestParams = std::tuple< - InferenceEngine::Precision, // netPrecision - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - InferenceEngine::Layout, // Output layout - InferenceEngine::SizeVector, // inputShape - int64_t, // axis - std::string, // targetDevice - std::map // config ->; - -class LogSoftmaxLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - -protected: - void SetUp() override; -}; +TEST_P(LogSoftmaxLayerTest, CompareWithRefs) { + Run(); +} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/logical.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/logical.hpp index a2807b4244c940..e4b70e5d1b10ea 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/logical.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/logical.hpp @@ -2,50 +2,12 @@ // // SPDX-License-Identifier: Apache-2.0 -#include +#pragma once -#include -#include - -#include "common_test_utils/common_utils.hpp" -#include "common_test_utils/test_common.hpp" -#include "common_test_utils/test_constants.hpp" -#include "ie_core.hpp" +#include namespace LayerTestsDefinitions { -namespace LogicalParams { -using InputShapesTuple = std::pair, std::vector>; -} // LogicalParams - -typedef std::tuple< - LogicalParams::InputShapesTuple, // Input shapes tuple - ngraph::helpers::LogicalTypes, // Logical op type - ngraph::helpers::InputLayerType, // Second input type - InferenceEngine::Precision, // Net precision - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - InferenceEngine::Layout, // Output layout - std::string, // Device name - std::map // Additional network configuration -> LogicalTestParams; - -class LogicalLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -protected: - InferenceEngine::Blob::Ptr GenerateInput(const InferenceEngine::InputInfo &info) const override; - void SetupParams(); - void SetUp() override; - -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - static std::vector combineShapes(const std::map, std::vector>>& inputShapes); - -protected: - LogicalParams::InputShapesTuple inputShapes; - ngraph::helpers::LogicalTypes logicalOpType; - ngraph::helpers::InputLayerType secondInputType; - InferenceEngine::Precision netPrecision; - std::map additional_config; -}; +TEST_P(LogicalLayerTest, LogicalTests) { + Run(); +} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/loop.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/loop.hpp index abf7d2486aa3fa..d6514d66de76e7 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/loop.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/loop.hpp @@ -4,145 +4,226 @@ #pragma once -#include -#include -#include -#include -#include -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "shared_test_classes/single_layer/loop.hpp" namespace LayerTestsDefinitions { -enum LOOP_IN_TYPE { - INVARIANT, - MERGED -}; - -using LoopParams = typename std::tuple< - bool, // ExecuteFirstIteration - bool, // BodyCondition is a constant? - bool, // BodyCondition value, if it is a Const - int64_t, // TripCount, -1 means infinity - std::vector, LOOP_IN_TYPE>>, // inputs - InferenceEngine::Precision, // Network precision - std::string>; // Device name - -class LoopTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); - -protected: - void SetUp() override; -}; - - -using StaticShapeLoopParams = typename std::tuple< - bool, - std::tuple< - bool, - int64_t, - int64_t, - int64_t - >, - int64_t, - InferenceEngine::SizeVector, - InferenceEngine::Precision, - std::string - >; - -/** - * Test case with static SHAPE version of loop operation. - * Total iteration count is dynamic. - */ -class StaticShapeLoopTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); - InferenceEngine::Blob::Ptr GenerateInput(const InferenceEngine::InputInfo &info) const override; - std::vector> PredefinedRefs(); - -private: - bool static_iter_num; // trip count provided by constant node - bool static_continue_cond; // initial_cond provided by constant node - int64_t max_iter_num; // -1 means infinity loop (expected dynamic exit condition in body) - int64_t dynamic_exit; // -1 means always true - int64_t axis; // -1 means no auto concatenation - int64_t start_value; - InferenceEngine::SizeVector data_shape; - InferenceEngine::Precision data_prc; - - int64_t actual_n_iter(); - -protected: - void SetUp() override; -}; - - -class TrivialLoopTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -protected: - using RefBlobGenerator = std::function; - std::map inputGens, outputGens; - - void CreateSlicedLoop(size_t batch_size, size_t num_iteration, InferenceEngine::Precision iePrc, - InferenceEngine::SizeVector& ieShape); - void CreateSlicedLoopDynCondition(size_t batch_size, size_t num_iteration, InferenceEngine::Precision iePrc, - InferenceEngine::SizeVector& ieShape, size_t trip_count); - InferenceEngine::Blob::Ptr GenerateInput(const InferenceEngine::InputInfo &info) const override { - auto found = inputGens.find(info.name()); - if (found != inputGens.end()) { - return found->second(info.getTensorDesc()); - } - - found = inputGens.find(""); - if (found != inputGens.end()) { - return found->second(info.getTensorDesc()); - } - - return LayerTestsCommon::GenerateInput(info); - } - std::vector> CalculateRefs() override { - if (outputGens.empty()) - return LayerTestsCommon::CalculateRefs(); - - const auto results = function->get_results(); - const auto outs_info = cnnNetwork.getOutputsInfo(); - const auto num_out_blob = results.size(); - - std::vector> res_collection(num_out_blob); - - for (int i = 0; i < num_out_blob; i++) { - // TODO: name of original NG result doesn't match with outs after conversion. - // Expected : auto name = results[i]->get_friendly_name(); - auto name = results[i]->get_input_node_ptr(0)->get_friendly_name(); - auto data = outs_info.at(name); - IE_ASSERT(data != nullptr); - - RefBlobGenerator generator; - auto found = outputGens.find(name); - if (found != outputGens.end()) { - generator = found->second; - } else { - found = outputGens.find(""); - if (found != outputGens.end()) { - generator = found->second; - } - } - - IE_ASSERT(generator != nullptr) << "Test output generator is not specified"; - auto blob = generator(data->getTensorDesc()); - auto blob_size = blob->byteSize(); - auto blob_ptr = blob->buffer().as(); - - auto &res = res_collection[i]; - res.resize(blob_size); - std::copy(blob_ptr, blob_ptr + blob_size, res.begin()); - } - return res_collection; + +TEST_P(LoopTest, CompareWithRefs) { + Run(); +} + +TEST_P(StaticShapeLoopTest, CompareWithRefs) { + Run(); +} + +TEST_P(StaticShapeLoopTest, CompareWithPredefinedRefs) { + SKIP_IF_CURRENT_TEST_IS_DISABLED() + LoadNetwork(); + Infer(); + auto expectedOutputs = PredefinedRefs(); // use predefined refs instead of CalculateRefs function + const auto& actualOutputs = GetOutputs(); + + if (expectedOutputs.empty()) { + return; } -}; + + IE_ASSERT(actualOutputs.size() == expectedOutputs.size()) + << "nGraph interpreter has " << expectedOutputs.size() << " outputs, while IE " << actualOutputs.size(); + + Compare(expectedOutputs, actualOutputs); +} + +TEST_P(TrivialLoopTest, PassThroughBody) { + SKIP_IF_CURRENT_TEST_IS_DISABLED() + InferenceEngine::Precision iePrc; + InferenceEngine::SizeVector ieShape; + std::tie(iePrc, ieShape, targetDevice) = GetParam(); + + const auto prc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(iePrc); + const auto shape = ngraph::Shape{ieShape}; + const auto scalarShape = ngraph::Shape{}; + + auto start = std::make_shared(prc, shape); + auto count = std::make_shared(ngraph::element::i64, scalarShape, 5); + auto icond = std::make_shared(ngraph::element::boolean, scalarShape, true); + + // Loop body + auto b_data = std::make_shared(prc, shape); + auto b_cond = std::make_shared(ngraph::element::boolean, scalarShape); + + auto body = std::make_shared( + ngraph::OutputVector {b_cond, b_data}, // | passthrough body, no data changes + ngraph::ParameterVector {b_cond, b_data}); // | input -> output + + auto loop = std::make_shared(count, icond); + loop->set_function(body); + loop->set_special_body_ports({-1, 0}); + loop->set_invariant_input(b_cond, icond); + loop->set_invariant_input(b_data, start); + loop->get_iter_value(b_data, -1); + + function = std::make_shared( + ngraph::OutputVector {loop}, + ngraph::ParameterVector {start}); + + // Precalculated ref blobs + auto blob = make_blob_with_precision({iePrc, ieShape, InferenceEngine::TensorDesc::getLayoutByDims(ieShape)}); + blob->allocate(); + CommonTestUtils::fill_data_with_broadcast(blob, 0, {10}); + + inputGens[""] = [&] (InferenceEngine::TensorDesc tdesc) { return blob; }; + outputGens[""] = [&] (InferenceEngine::TensorDesc tdesc) { return blob; }; + + Run(); +} + +TEST_P(TrivialLoopTest, UnusedInputBody) { + SKIP_IF_CURRENT_TEST_IS_DISABLED() + InferenceEngine::Precision iePrc; + InferenceEngine::SizeVector ieShape; + std::tie(iePrc, ieShape, targetDevice) = GetParam(); + + const auto prc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(iePrc); + const auto shape = ngraph::Shape{ieShape}; + const auto scalarShape = ngraph::Shape{}; + + auto start = std::make_shared(prc, shape); + auto count = std::make_shared(ngraph::element::i64, scalarShape, 5); + auto icond = std::make_shared(ngraph::element::boolean, scalarShape, true); + + // Loop body + auto b_data = std::make_shared(prc, shape); + auto b_cond = std::make_shared(ngraph::element::boolean, scalarShape, true); + auto b_iter = std::make_shared(ngraph::element::i64, scalarShape); + + auto body = std::make_shared( + ngraph::OutputVector {b_cond, b_data}, + ngraph::ParameterVector {b_data, b_iter}); + + auto loop = std::make_shared(count, icond); + loop->set_function(body); + loop->set_special_body_ports({1, 0}); + loop->set_invariant_input(b_data, start); + loop->get_iter_value(b_data, -1); + + function = std::make_shared( + ngraph::OutputVector {loop}, + ngraph::ParameterVector {start}); + + // Precalculated ref blobs + auto blob = make_blob_with_precision({iePrc, ieShape, InferenceEngine::TensorDesc::getLayoutByDims(ieShape)}); + blob->allocate(); + CommonTestUtils::fill_data_with_broadcast(blob, 0, {10}); + + inputGens[""] = [&] (InferenceEngine::TensorDesc tdesc) { return blob; }; + outputGens[""] = [&] (InferenceEngine::TensorDesc tdesc) { return blob; }; + + Run(); +} + + + +TEST_P(TrivialLoopTest, AutoSlicingInput_CheckPredefinedValues) { + SKIP_IF_CURRENT_TEST_IS_DISABLED() + InferenceEngine::Precision iePrc; + InferenceEngine::SizeVector ieShape; + std::tie(iePrc, ieShape, targetDevice) = GetParam(); + const size_t batch_size = 5; + const size_t num_iteration = 3; + ieShape[0] = 1; + auto ieShape_to_slice = ieShape; + ieShape_to_slice[0] = batch_size; + CreateSlicedLoop(batch_size, num_iteration, iePrc, ieShape); + Run(); + // Precalculated ref blobs + auto blob = make_blob_with_precision({iePrc, ieShape_to_slice, InferenceEngine::TensorDesc::getLayoutByDims(ieShape_to_slice)}); + blob->allocate(); + std::vector seq_raw_data(batch_size); + std::iota(seq_raw_data.begin(), seq_raw_data.end(), 1); + CommonTestUtils::fill_data_with_broadcast(blob, 0, seq_raw_data); + + auto blob_ref = make_blob_with_precision({iePrc, ieShape, InferenceEngine::TensorDesc::getLayoutByDims(ieShape)}); + blob_ref->allocate(); + CommonTestUtils::fill_data_with_broadcast(blob_ref, 0, { num_iteration * (num_iteration + 1) / 2}); + + inputGens[""] = [&] (InferenceEngine::TensorDesc tdesc) { return blob; }; + outputGens[""] = [&] (InferenceEngine::TensorDesc tdesc) { return blob_ref; }; +} + +TEST_P(TrivialLoopTest, AutoSlicingInputWithDynCondition_CheckPredefinedValues) { + SKIP_IF_CURRENT_TEST_IS_DISABLED() + InferenceEngine::Precision iePrc; + InferenceEngine::SizeVector ieShape; + std::tie(iePrc, ieShape, targetDevice) = GetParam(); + + // auto slicing size : 5 + // trip count limit : 4 + // dyn exit after iter : 3 + // --------------------- + // should exit after 4 iterations + const size_t batch_size = 5; + const size_t trip_count = 5; + const size_t num_iteration = 3; + + ieShape[0] = 1; + auto ieShape_to_slice = ieShape; + ieShape_to_slice[0] = batch_size; + + CreateSlicedLoopDynCondition(batch_size, num_iteration, iePrc, ieShape, trip_count); + // Precalculated ref blobs + auto blob = make_blob_with_precision({iePrc, ieShape_to_slice, InferenceEngine::TensorDesc::getLayoutByDims(ieShape_to_slice)}); + blob->allocate(); + std::vector seq_raw_data(batch_size); + std::iota(seq_raw_data.begin(), seq_raw_data.end(), 1); + CommonTestUtils::fill_data_with_broadcast(blob, 0, seq_raw_data); + + auto blob_ref = make_blob_with_precision({iePrc, ieShape, InferenceEngine::TensorDesc::getLayoutByDims(ieShape)}); + blob_ref->allocate(); + const size_t real_iter = num_iteration + 1; + CommonTestUtils::fill_data_with_broadcast(blob_ref, 0, { real_iter * (real_iter + 1) / 2}); + + inputGens[""] = [&] (InferenceEngine::TensorDesc tdesc) { return blob; }; + outputGens[""] = [&] (InferenceEngine::TensorDesc tdesc) { return blob_ref; }; + + Run(); +} + +TEST_P(TrivialLoopTest, AutoSlicingInput_CheckReference) { + SKIP_IF_CURRENT_TEST_IS_DISABLED() + InferenceEngine::Precision iePrc; + InferenceEngine::SizeVector ieShape; + std::tie(iePrc, ieShape, targetDevice) = GetParam(); + const size_t batch_size = 5; + const size_t num_iteration = 3; + ieShape[0] = 1; + auto ieShape_to_slice = ieShape; + ieShape_to_slice[0] = batch_size; + CreateSlicedLoop(batch_size, num_iteration, iePrc, ieShape); + Run(); +} + +TEST_P(TrivialLoopTest, AutoSlicingInputWithDynCondition_CheckReference) { + SKIP_IF_CURRENT_TEST_IS_DISABLED() + InferenceEngine::Precision iePrc; + InferenceEngine::SizeVector ieShape; + std::tie(iePrc, ieShape, targetDevice) = GetParam(); + + // auto slicing size : 5 + // trip count limit : 4 + // dyn exit after iter : 3 + // --------------------- + // should exit after 4 iterations + const size_t batch_size = 5; + const size_t trip_count = 5; + const size_t num_iteration = 3; + + ieShape[0] = 1; + auto ieShape_to_slice = ieShape; + ieShape_to_slice[0] = batch_size; + + CreateSlicedLoopDynCondition(batch_size, num_iteration, iePrc, ieShape, trip_count); + Run(); +} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/lrn.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/lrn.hpp index 002cd4ea4b9cc9..cacb3fbd4e7bde 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/lrn.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/lrn.hpp @@ -5,39 +5,12 @@ #pragma once -#include -#include -#include -#include - -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" - -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/single_layer/lrn.hpp" namespace LayerTestsDefinitions { -typedef std::tuple< - double, // Alpha - double, // Beta - double, // Bias - size_t, // Size - std::vector, // Reduction axes - InferenceEngine::Precision, // Network precision - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::SizeVector, // Input shapes - std::string // Device name -> lrnLayerTestParamsSet; - -class LrnLayerTest - : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - -protected: - void SetUp() override; -}; +TEST_P(LrnLayerTest, CompareWithRefs) { + Run(); +} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/lstm_cell.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/lstm_cell.hpp index a6b79172ee2aa3..abf9631a2f9ca7 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/lstm_cell.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/lstm_cell.hpp @@ -4,34 +4,12 @@ #pragma once -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "shared_test_classes/single_layer/lstm_cell.hpp" namespace LayerTestsDefinitions { -using LSTMCellParams = typename std::tuple< - bool, // using decompose to sub-ops transformation - size_t, // batch - size_t, // hidden size - size_t, // input size - std::vector, // activations - float, // clip - InferenceEngine::Precision, // Network precision - std::string>; // Device name - -class LSTMCellTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); - -protected: - void SetUp() override; +TEST_P(LSTMCellTest, CompareWithRefs) { + Run(); }; } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/lstm_sequence.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/lstm_sequence.hpp index 6bd10677f2a2de..54edabb71aa8f1 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/lstm_sequence.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/lstm_sequence.hpp @@ -4,40 +4,12 @@ #pragma once -#include -#include -#include -#include -#include -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "shared_test_classes/single_layer/lstm_sequence.hpp" namespace LayerTestsDefinitions { -using LSTMSequenceParams = typename std::tuple< - ngraph::helpers::SequenceTestsMode, // pure Sequence or TensorIterator - size_t, // seq_lengths - size_t, // batch - size_t, // hidden size - size_t, // input size - std::vector, // activations - float, // clip - ngraph::op::RecurrentSequenceDirection, // direction - InferenceEngine::Precision, // Network precision - std::string>; // Device name - -class LSTMSequenceTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); -protected: - void Infer() override; - void SetUp() override; - -private: - ngraph::helpers::SequenceTestsMode m_mode; - int64_t m_max_seq_len = 0; +TEST_P(LSTMSequenceTest, CompareWithRefs) { + Run(); }; } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/mat_mul.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/mat_mul.hpp index 16ffc26dafa420..224738ee67223b 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/mat_mul.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/mat_mul.hpp @@ -4,40 +4,12 @@ #pragma once -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" - -struct ShapeRelatedParams { - std::pair input1, input2; -}; - -typedef std::tuple< - ShapeRelatedParams, - InferenceEngine::Precision, // Network precision - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - ngraph::helpers::InputLayerType, // Secondary input type - LayerTestsUtils::TargetDevice, // Device name - std::map // Additional network configuration -> MatMulLayerTestParamsSet; +#include "shared_test_classes/single_layer/mat_mul.hpp" namespace LayerTestsDefinitions { -class MatMulTest : public testing::WithParamInterface, virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); - static std::vector combineShapes(const std::vector>& firstInputShapes, - const std::vector>& secondInputShapes, - bool transposeA, - bool transposeB); - -protected: - void SetUp() override; +TEST_P(MatMulTest, CompareWithRefs) { + Run(); }; } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/minimum_maximum.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/minimum_maximum.hpp index bcf6333a7ef8df..1b4e0284cfd89d 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/minimum_maximum.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/minimum_maximum.hpp @@ -3,34 +3,12 @@ // #pragma once -#include -#include -#include -#include -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" -#include "common_test_utils/test_constants.hpp" +#include "shared_test_classes/single_layer/minimum_maximum.hpp" namespace LayerTestsDefinitions { -using MaxMinParamsTuple = typename std::tuple< - std::vector>, // Input shapes - ngraph::helpers::MinMaxOpType, // OperationType - InferenceEngine::Precision, // Network precision - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - InferenceEngine::Layout, // Output layout - ngraph::helpers::InputLayerType, // Secondary input type - std::string>; // Device name - -class MaxMinLayerTest: - public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon{ -public: - static std::string getTestCaseName(const testing::TestParamInfo& obj); -protected: - void SetUp() override; +TEST_P(MaxMinLayerTest, CompareWithRefs){ + Run(); }; + } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/mvn.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/mvn.hpp index 39870828a24c1e..24cbc6169185ed 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/mvn.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/mvn.hpp @@ -4,28 +4,12 @@ #pragma once -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" +#include "shared_test_classes/single_layer/mvn.hpp" namespace LayerTestsDefinitions { -typedef std::tuple< - InferenceEngine::SizeVector, // Input shapes - InferenceEngine::Precision, // Input precision - bool, // Across channels - bool, // Normalize variance - double, // Epsilon - std::string> mvnParams; // Device name - -class MvnLayerTest : public testing::WithParamInterface, virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - -protected: - void SetUp() override; +TEST_P(MvnLayerTest, CompareWithRefs) { + Run(); }; } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/non_max_suppression.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/non_max_suppression.hpp index 80b0d0d37d3841..685d47cdff1d20 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/non_max_suppression.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/non_max_suppression.hpp @@ -4,44 +4,12 @@ #pragma once -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" +#include "shared_test_classes/single_layer/non_max_suppression.hpp" namespace LayerTestsDefinitions { -using InputShapeParams = std::tuple; // Number of classes - -using InputPrecisions = std::tuple; // iou_threshold, score_threshold, soft_nms_sigma precisions - -using NmsParams = std::tuple; // Device name - -class NmsLayerTest : public testing::WithParamInterface, virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - void Infer() override; - void Compare(const std::vector> &expectedOutputs, const std::vector &actualOutputs) override; - -protected: - void SetUp() override; - -private: - size_t numOfSelectedBoxes; +TEST_P(NmsLayerTest, CompareWithRefs) { + Run(); }; } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/nonzero.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/nonzero.hpp index 28f4b9d99d2e17..cbf159574d6145 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/nonzero.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/nonzero.hpp @@ -5,33 +5,12 @@ #pragma once -#include "functional_test_utils/layer_test_utils.hpp" - -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" - -#include -#include -#include -#include +#include "shared_test_classes/single_layer/nonzero.hpp" namespace LayerTestsDefinitions { -using ConfigMap = typename std::map; - -using NonZeroLayerTestParamsSet = typename std::tuple< - InferenceEngine::SizeVector, // Input shapes - InferenceEngine::Precision, // Input precision - LayerTestsUtils::TargetDevice, // Device name - ConfigMap>; // Additional network configuration - -class NonZeroLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - -protected: - void SetUp() override; -}; +TEST_P(NonZeroLayerTest, CompareWithReference) { + Run(); +} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/normalize_l2.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/normalize_l2.hpp index 8f867765fc272a..c7165fb0a8faf8 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/normalize_l2.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/normalize_l2.hpp @@ -4,32 +4,12 @@ #pragma once -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" - +#include "shared_test_classes/single_layer/normalize_l2.hpp" namespace LayerTestsDefinitions { -using NormalizeL2LayerTestParams = std::tuple< - std::vector, // axes - float, // eps - ngraph::op::EpsMode, // eps_mode - InferenceEngine::SizeVector, // inputShape - InferenceEngine::Precision, // netPrecision - std::string // targetDevice ->; - -class NormalizeL2LayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - -protected: - void SetUp() override; -}; +TEST_P(NormalizeL2LayerTest, CompareWithRefs) { + Run(); +} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/pad.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/pad.hpp index c055254a389eb7..c0e10a7f72eb55 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/pad.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/pad.hpp @@ -4,36 +4,12 @@ #pragma once -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" - -typedef std::tuple< - std::vector, // padsBegin - std::vector, // padsEnd - float, // argPadValue - ngraph::helpers::PadMode, // padMode - InferenceEngine::Precision, // Net precision - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - InferenceEngine::SizeVector, // Input shapes - LayerTestsUtils::TargetDevice // Target device name -> padLayerTestParamsSet; +#include "shared_test_classes/single_layer/pad.hpp" namespace LayerTestsDefinitions { -class PadLayerTest : public testing::WithParamInterface, - public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - -protected: - void SetUp() override; -}; +TEST_P(PadLayerTest, CompareWithRefs) { + Run(); +} } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/pooling.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/pooling.hpp index 975a771dc13724..5c474445c8e06c 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/pooling.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/pooling.hpp @@ -5,66 +5,19 @@ #pragma once -#include -#include -#include -#include - -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" - -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/single_layer/pooling.hpp" namespace LayerTestsDefinitions { -typedef std::tuple< - ngraph::helpers::PoolingTypes, // Pooling type, max or avg - std::vector, // Kernel size - std::vector, // Stride - std::vector, // Pad begin - std::vector, // Pad end - ngraph::op::RoundingType, // Rounding type - ngraph::op::PadType, // Pad type - bool // Exclude pad -> poolSpecificParams; -typedef std::tuple< - poolSpecificParams, - InferenceEngine::Precision, // Net precision - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - InferenceEngine::Layout, // Output layout - std::vector, // Input shape - std::string // Device name -> poolLayerTestParamsSet; - -typedef std::tuple< - poolSpecificParams, - InferenceEngine::Precision, // Net precision - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - InferenceEngine::Layout, // Output layout - size_t, // Channel number - std::string // Device name -> globalPoolLayerTestParamsSet; - -class PoolingLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - -protected: - void SetUp() override; -}; - -class GlobalPoolingLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); +TEST_P(PoolingLayerTest, CompareWithRefs) { + Run(); +} -protected: - void SetUp() override; -}; +TEST_P(GlobalPoolingLayerTest, CompareWithRefs) { + Run(); + if (targetDevice == std::string{CommonTestUtils::DEVICE_GPU}) { + PluginCache::get().reset(); + } +} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/power.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/power.hpp index dfc07c4827bcfa..8519fdb00b8238 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/power.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/power.hpp @@ -3,32 +3,12 @@ // #pragma once -#include -#include -#include -#include -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "common_test_utils/test_constants.hpp" +#include "shared_test_classes/single_layer/power.hpp" namespace LayerTestsDefinitions { - using PowerParamsTuple = typename std::tuple< - std::vector>, //input shapes - InferenceEngine::Precision, //Network precision - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - InferenceEngine::Layout, // Output layout - std::string, //Device name - std::vector>; //power - -class PowerLayerTest: - public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon{ -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); -protected: - void SetUp() override; +TEST_P(PowerLayerTest, CompareWithRefs){ + Run(); }; + } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/prior_box_clustered.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/prior_box_clustered.hpp index 683711d05900bd..5ecf883133c87b 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/prior_box_clustered.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/prior_box_clustered.hpp @@ -4,70 +4,12 @@ #pragma once -#include -#include -#include -#include -#include -#include -#include -#include - - -#include "ie_core.hpp" -#include "ie_precision.hpp" -#include "details/ie_exception.hpp" - -#include "ngraph/opsets/opset1.hpp" - -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "common_test_utils/common_utils.hpp" - -#include "ngraph_functions/utils/ngraph_helpers.hpp" -#include "ngraph_functions/builders.hpp" - -typedef std::tuple< - std::vector, // widths - std::vector, // heights - bool, // clip - float, // step_width - float, // step_height - float, // offset - std::vector> priorBoxClusteredSpecificParams; - -typedef std::tuple< - priorBoxClusteredSpecificParams, - InferenceEngine::Precision, // net precision - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - InferenceEngine::Layout, // Output layout - InferenceEngine::SizeVector, // input shape - InferenceEngine::SizeVector, // image shape - std::string> priorBoxClusteredLayerParams; +#include "shared_test_classes/single_layer/prior_box_clustered.hpp" namespace LayerTestsDefinitions { -class PriorBoxClusteredLayerTest - : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo& obj); - -protected: - InferenceEngine::SizeVector inputShapes; - InferenceEngine::SizeVector imageShapes; - InferenceEngine::Precision netPrecision; - std::vector widths; - std::vector heights; - std::vector variances; - float step_width; - float step_height; - float offset; - bool clip; - std::vector> CalculateRefs() override; - void SetUp() override; +TEST_P(PriorBoxClusteredLayerTest, CompareWithRefs) { + Run(); }; } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/proposal.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/proposal.hpp index c8b00f6e69dc4e..bcefaa9eb471ba 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/proposal.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/proposal.hpp @@ -4,64 +4,12 @@ #pragma once -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "shared_test_classes/single_layer/proposal.hpp" namespace LayerTestsDefinitions { -namespace proposalTypes { - -typedef size_t base_size_type; -typedef size_t pre_nms_topn_type; -typedef size_t post_nms_topn_type; -typedef float nms_thresh_type; -typedef size_t min_size_type; -typedef std::vector ratio_type; -typedef std::vector scale_type; -typedef bool clip_before_nms_type; -typedef bool clip_after_nms_type; -typedef bool normalize_type; -typedef size_t feat_stride_type; -typedef float box_size_scale_type; -typedef float box_coordinate_scale_type; -typedef std::string framework_type; - -}; // namespace proposalTypes - -using namespace proposalTypes; - -typedef std::tuple< - base_size_type, - pre_nms_topn_type, - post_nms_topn_type, - nms_thresh_type, - min_size_type, - ratio_type, - scale_type, - clip_before_nms_type, - clip_after_nms_type, - framework_type> proposalSpecificParams; -typedef std::tuple< - proposalSpecificParams, - std::string> proposalLayerTestParamsSet; - -class ProposalLayerTest - : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - static std::string SerializeProposalSpecificParams(proposalSpecificParams& params); - InferenceEngine::Blob::Ptr GenerateInput(const InferenceEngine::InputInfo &info) const override; - -protected: - void SetUp() override; - void Validate() override; -}; +TEST_P(ProposalLayerTest, CompareWithRefs) { + Run(); +} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/psroi_pooling.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/psroi_pooling.hpp index 8234502d795432..8c05afcd891939 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/psroi_pooling.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/psroi_pooling.hpp @@ -5,44 +5,12 @@ #pragma once -#include -#include -#include -#include - -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" - -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/single_layer/psroi_pooling.hpp" namespace LayerTestsDefinitions { -using psroiParams = std::tuple, // input shape - std::vector, // coords shape - size_t, // output_dim - size_t, // group_size - float, // Spatial scale - size_t, // spatial_bins_x - size_t, // spatial_bins_y - std::string, // mode - InferenceEngine::Precision, // Net precision - LayerTestsUtils::TargetDevice>; // Device name - -class PSROIPoolingLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { - public: - static std::string getTestCaseName(testing::TestParamInfo obj); - void Infer() override; - - protected: - void SetUp() override; - - private: - size_t groupSize_; - float spatialScale_; - size_t spatialBinsX_; - size_t spatialBinsY_; - std::string mode_; - }; +TEST_P(PSROIPoolingLayerTest, CompareWithRefs) { + Run(); +} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/range.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/range.hpp index 2dbd52a7a10b01..3daaacee96cc80 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/range.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/range.hpp @@ -4,47 +4,12 @@ #pragma once -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" +#include "shared_test_classes/single_layer/range.hpp" namespace LayerTestsDefinitions { -typedef std::tuple< - float, // start - float, // stop - float, // step - InferenceEngine::Precision, // Net precision - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - InferenceEngine::Layout, // Output layout - std::string // Target device name -> RangeParams; - -class RangeLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { - float start, stop, step; -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - void Infer() override; - -protected: - void SetUp() override; -}; -class RangeNumpyLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - void Infer() override; -protected: - void SetUp() override; -private: - float start, stop, step; -}; +TEST_P(RangeNumpyLayerTest, CompareWithRefs) { + Run(); +} } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/reduce_ops.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/reduce_ops.hpp index 855da9fde70a61..07fb2739d8574a 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/reduce_ops.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/reduce_ops.hpp @@ -4,42 +4,15 @@ #pragma once -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "common_test_utils/common_layers_params.hpp" +#include "shared_test_classes/single_layer/reduce_ops.hpp" namespace LayerTestsDefinitions { -typedef std::tuple< - std::vector, // Axis to reduce order - CommonTestUtils::OpType, // Scalar or vector type axis - bool, // Keep dims - ngraph::helpers::ReductionType, // Reduce operation type - InferenceEngine::Precision, // Net precision - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - std::vector, // Input shapes - std::string // Target device name -> reduceMeanParams; - -class ReduceOpsLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - -protected: - void SetUp() override; -}; - -class ReduceOpsLayerWithSpecificInputTest : public ReduceOpsLayerTest { -protected: - InferenceEngine::Blob::Ptr GenerateInput(const InferenceEngine::InputInfo &info) const override; -}; +TEST_P(ReduceOpsLayerTest, CompareWithRefs) { + Run(); +} +TEST_P(ReduceOpsLayerWithSpecificInputTest, CompareWithRefs) { + Run(); +} } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/region_yolo.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/region_yolo.hpp index c8d74f6003f534..7301e9487b5387 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/region_yolo.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/region_yolo.hpp @@ -4,35 +4,12 @@ #pragma once -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "shared_test_classes/single_layer/region_yolo.hpp" namespace LayerTestsDefinitions { -using regionYoloParamsTuple = std::tuple< - ngraph::Shape, // Input Shape - size_t, // classes - size_t, // coordinates - size_t, // num regions - bool, // do softmax - std::vector, // mask - int, // start axis - int, // end axis - InferenceEngine::Precision, // Network precision - std::string>; // Device name - -class RegionYoloLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); - -protected: - void SetUp() override; +TEST_P(RegionYoloLayerTest, CompareWithRefs) { + Run(); }; } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/reorg_yolo.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/reorg_yolo.hpp index 1eab6b806b2465..0d34dc50f6af51 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/reorg_yolo.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/reorg_yolo.hpp @@ -4,29 +4,12 @@ #pragma once -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "shared_test_classes/single_layer/reorg_yolo.hpp" namespace LayerTestsDefinitions { -using ReorgYoloParamsTuple = typename std::tuple< - ngraph::Shape, // Input Shape - size_t, // stride - InferenceEngine::Precision, // Network precision - std::string>; // Device name - -class ReorgYoloLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); - -protected: - void SetUp() override; +TEST_P(ReorgYoloLayerTest, CompareWithRefs) { + Run(); }; } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/reshape.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/reshape.hpp index ecf3e84eace674..a9c52f761af37f 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/reshape.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/reshape.hpp @@ -4,36 +4,12 @@ #pragma once -#include -#include -#include -#include -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" - -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/single_layer/reshape.hpp" namespace LayerTestsDefinitions { -typedef std::tuple< - bool, // SpecialZero - InferenceEngine::Precision, // Network precision - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - InferenceEngine::Layout, // Output layout - std::vector, // Input shapes - std::vector, // OutForm Shapes - std::string, // Device name - std::map // Config -> reshapeParams; - -class ReshapeLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); -protected: - void SetUp() override; -}; +TEST_P(ReshapeLayerTest, CompareWithRefsDynamicBath) { + Run(); +} } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/reverse_sequence.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/reverse_sequence.hpp index e7badc3bdd25fd..fdebaa867465e5 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/reverse_sequence.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/reverse_sequence.hpp @@ -4,33 +4,12 @@ #pragma once -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "shared_test_classes/single_layer/reverse_sequence.hpp" namespace LayerTestsDefinitions { -using ReverseSequenceParamsTuple = typename std::tuple< - int64_t, // Index of the batch dimension - int64_t, // Index of the sequence dimension - std::vector, // Input shapes - std::vector, // Shape of the input vector with sequence lengths to be reversed - ngraph::helpers::InputLayerType, // Secondary input type - InferenceEngine::Precision, // Network precision - std::string>; // Device name - -class ReverseSequenceLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); - -protected: - void SetUp() override; +TEST_P(ReverseSequenceLayerTest, CompareWithRefs) { + Run(); }; } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/rnn_cell.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/rnn_cell.hpp index 477975deafc52e..2eedbd7beb01ac 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/rnn_cell.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/rnn_cell.hpp @@ -4,34 +4,12 @@ #pragma once -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "shared_test_classes/single_layer/rnn_cell.hpp" namespace LayerTestsDefinitions { -using RNNCellParams = typename std::tuple< - bool, // using decompose to sub-ops transformation - size_t, // batch - size_t, // hidden size - size_t, // input size - std::vector, // activations - float, // clip - InferenceEngine::Precision, // Network precision - std::string>; // Device name - -class RNNCellTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); - -protected: - void SetUp() override; +TEST_P(RNNCellTest, CompareWithRefs) { + Run(); }; } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/rnn_sequence.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/rnn_sequence.hpp index bcfdadedb49e57..8f749491967678 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/rnn_sequence.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/rnn_sequence.hpp @@ -4,41 +4,12 @@ #pragma once -#include -#include -#include -#include -#include -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "shared_test_classes/single_layer/rnn_sequence.hpp" namespace LayerTestsDefinitions { -using RNNSequenceParams = typename std::tuple< - ngraph::helpers::SequenceTestsMode, // pure Sequence or TensorIterator - size_t, // seq_lengths - size_t, // batch - size_t, // hidden size - size_t, // input size - std::vector, // activations - float, // clip - ngraph::op::RecurrentSequenceDirection, // direction - InferenceEngine::Precision, // Network precision - std::string>; // Device name - -class RNNSequenceTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); - -protected: - void SetUp() override; - void Infer() override; - -private: - ngraph::helpers::SequenceTestsMode m_mode; - int64_t m_max_seq_len = 0; +TEST_P(RNNSequenceTest, CompareWithRefs) { + Run(); }; } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/roi_pooling.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/roi_pooling.hpp index 7f863b006fb540..9b8b3030a507b7 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/roi_pooling.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/roi_pooling.hpp @@ -5,39 +5,12 @@ #pragma once -#include -#include -#include -#include - -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" - -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/single_layer/roi_pooling.hpp" namespace LayerTestsDefinitions { -using roiPoolingParamsTuple = std::tuple< - InferenceEngine::SizeVector, // Input shape - InferenceEngine::SizeVector, // Coords shape - std::vector, // Pooled shape {pooled_h, pooled_w} - float, // Spatial scale - ngraph::helpers::ROIPoolingTypes, // ROIPooling method - InferenceEngine::Precision, // Net precision - LayerTestsUtils::TargetDevice>; // Device name - -class ROIPoolingLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - void Infer() override; - -protected: - void SetUp() override; - -private: - ngraph::helpers::ROIPoolingTypes pool_method; - float spatial_scale; -}; +TEST_P(ROIPoolingLayerTest, CompareWithRefs) { + Run(); +} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/scatter_ND_update.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/scatter_ND_update.hpp index efc0e76fef2e60..e27f06e93dfeae 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/scatter_ND_update.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/scatter_ND_update.hpp @@ -4,34 +4,12 @@ #pragma once -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/single_layer/scatter_ND_update.hpp" namespace LayerTestsDefinitions { -using sliceSelcetInShape = std::tuple< - std::vector, // input shape - std::vector, // indices shape - std::vector, // indices value - std::vector>; // update shape - -using scatterNDUpdateParamsTuple = typename std::tuple< - sliceSelcetInShape, // Input description - InferenceEngine::Precision, // Network precision - InferenceEngine::Precision, // indices precision - std::string>; // Device name -class ScatterNDUpdateLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); - static std::vector combineShapes( - const std::map, std::map, std::vector>>& inputShapes); - -protected: - void SetUp() override; +TEST_P(ScatterNDUpdateLayerTest, CompareWithRefs) { + Run(); }; + } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/scatter_elements_update.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/scatter_elements_update.hpp index 9fe6ada993ee36..789f62f1633b02 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/scatter_elements_update.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/scatter_elements_update.hpp @@ -4,34 +4,12 @@ #pragma once -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/single_layer/scatter_elements_update.hpp" namespace LayerTestsDefinitions { -using axisShapeInShape = std::tuple< - std::vector, // input shape - std::vector, // update shape - int>; // axis - -using scatterElementsUpdateParamsTuple = typename std::tuple< - axisShapeInShape, // shape description - std::vector, // indices value - InferenceEngine::Precision, // Network precision - InferenceEngine::Precision, // indices precision - std::string>; // Device name -class ScatterElementsUpdateLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); - static std::vector combineShapes( - const std::map, std::map, std::vector>>& inputShapes); - -protected: - void SetUp() override; +TEST_P(ScatterElementsUpdateLayerTest, CompareWithRefs) { + Run(); }; + } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/scatter_update.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/scatter_update.hpp index 5b3e3974a0e6d7..7b6cbe492ca93d 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/scatter_update.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/scatter_update.hpp @@ -4,35 +4,12 @@ #pragma once -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/single_layer/scatter_update.hpp" namespace LayerTestsDefinitions { -using axisUpdateShapeInShape = std::tuple< - std::vector, // input shape - std::vector, // indices shape - std::vector, // update shape - int>; // axis - -using scatterUpdateParamsTuple = typename std::tuple< - axisUpdateShapeInShape, // shape description - std::vector, // indices value - InferenceEngine::Precision, // input precision - InferenceEngine::Precision, // indices precision - std::string>; // Device name -class ScatterUpdateLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); - static std::vector combineShapes( - const std::map, std::map, std::vector>>& inputShapes); - -protected: - void SetUp() override; +TEST_P(ScatterUpdateLayerTest, CompareWithRefs) { + Run(); }; + } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/select.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/select.hpp index a3b5d9d51f21ba..3980e08628cd02 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/select.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/select.hpp @@ -4,26 +4,12 @@ #pragma once -#include -#include -#include - -#include "ngraph_functions/builders.hpp" +#include "shared_test_classes/single_layer/select.hpp" namespace LayerTestsDefinitions { -typedef std::tuple< - std::vector>, // mask, then, else shapes - InferenceEngine::Precision, // then, else precision - ngraph::op::AutoBroadcastSpec, // broadcast - std::string> selectTestParams; // device name - -class SelectLayerTest : public testing::WithParamInterface, virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); - -protected: - void SetUp() override; -}; +TEST_P(SelectLayerTest, CompareWithRefImpl) { + Run(); +} } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/shape_of.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/shape_of.hpp index b1a54626ce97d3..52a0aeeb52d3f4 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/shape_of.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/shape_of.hpp @@ -4,29 +4,12 @@ #pragma once -#include -#include -#include -#include -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" - -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/single_layer/shape_of.hpp" namespace LayerTestsDefinitions { -typedef std::tuple< - InferenceEngine::Precision, // Network precision - std::vector, // Input shapes - std::string // Device name -> shapeOfParams; - -class ShapeOfLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); -protected: - void SetUp() override; -}; +TEST_P(ShapeOfLayerTest, CompareWithRefs) { + Run(); +} } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/shuffle_channels.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/shuffle_channels.hpp index a4335f0cb94c51..88aef0e277b934 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/shuffle_channels.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/shuffle_channels.hpp @@ -4,37 +4,11 @@ #pragma once -#include -#include -#include -#include +#include "shared_test_classes/single_layer/shuffle_channels.hpp" -#include "functional_test_utils/layer_test_utils.hpp" - -typedef std::tuple< - int, // axis - int // group -> shuffleChannelsSpecificParams; -typedef std::tuple< - shuffleChannelsSpecificParams, - InferenceEngine::Precision, // Net precision - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - InferenceEngine::Layout, // Output layout - InferenceEngine::SizeVector, // Input shapes - LayerTestsUtils::TargetDevice // Device name -> shuffleChannelsLayerTestParamsSet; namespace LayerTestsDefinitions { - -class ShuffleChannelsLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - -protected: - void SetUp() override; -}; - +TEST_P(ShuffleChannelsLayerTest, CompareWithRefs) { + Run(); +} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/softmax.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/softmax.hpp index 47dbd0f6375f6b..116da7025c47c8 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/softmax.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/softmax.hpp @@ -5,37 +5,12 @@ #pragma once -#include -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "shared_test_classes/single_layer/softmax.hpp" namespace LayerTestsDefinitions { -using softMaxLayerTestParams = std::tuple< - InferenceEngine::Precision, // netPrecision - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - InferenceEngine::Layout, // Output layout - InferenceEngine::SizeVector, // inputShape - size_t, // axis - std::string, // targetDevice - std::map // config ->; - -class SoftMaxLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - -protected: - void SetUp() override; -}; +TEST_P(SoftMaxLayerTest, CompareWithRefs) { + Run(); +} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/space_to_batch.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/space_to_batch.hpp index 3189e00fe1add3..0bd6e080cb5802 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/space_to_batch.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/space_to_batch.hpp @@ -4,33 +4,12 @@ #pragma once -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/single_layer/space_to_batch.hpp" namespace LayerTestsDefinitions { -using spaceToBatchParamsTuple = typename std::tuple< - std::vector, // block_shape - std::vector, // pads_begin - std::vector, // pads_end - std::vector, // Input shapes - InferenceEngine::Precision, // Network precision - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - InferenceEngine::Layout, // Output layout - std::string>; // Device name>; - -class SpaceToBatchLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); +TEST_P(SpaceToBatchLayerTest, CompareWithRefs) { + Run(); +} -protected: - void SetUp() override; -}; } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/space_to_depth.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/space_to_depth.hpp index cad1bb2e77de4a..f1223659e61dd7 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/space_to_depth.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/space_to_depth.hpp @@ -4,29 +4,12 @@ #pragma once -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/single_layer/space_to_depth.hpp" namespace LayerTestsDefinitions { -using spaceToDepthParamsTuple = typename std::tuple< - std::vector, // Input shape - InferenceEngine::Precision, // Input precision - ngraph::opset3::SpaceToDepth::SpaceToDepthMode, // Mode - std::size_t, // Block size - std::string>; // Device name> - -class SpaceToDepthLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); - -protected: - void SetUp() override; +TEST_P(SpaceToDepthLayerTest, CompareWithRefs) { + Run(); }; } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/split.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/split.hpp index 63216325226c2e..830d136170bc27 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/split.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/split.hpp @@ -4,36 +4,12 @@ #pragma once -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" +#include "shared_test_classes/single_layer/split.hpp" namespace LayerTestsDefinitions { -typedef std::tuple< - size_t, // Num splits - int64_t, // Axis - InferenceEngine::Precision, // Net precision - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - InferenceEngine::Layout, // Output layout - std::vector, // Input shapes - std::vector, // Used outputs indices - std::string // Target device name -> splitParams; - -class SplitLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - -protected: - void SetUp() override; +TEST_P(SplitLayerTest, CompareWithRefs) { + Run(); }; } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/squeeze_unsqueeze.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/squeeze_unsqueeze.hpp index cfd81d628f9915..8b9cab0c9be7aa 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/squeeze_unsqueeze.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/squeeze_unsqueeze.hpp @@ -4,34 +4,12 @@ #pragma once -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" +#include "shared_test_classes/single_layer/squeeze_unsqueeze.hpp" namespace LayerTestsDefinitions { -using ShapeAxesTuple = std::pair, std::vector>; - -typedef std::tuple< - ShapeAxesTuple, // InputShape, Squeeze indexes - ngraph::helpers::SqueezeOpType, // OpType - InferenceEngine::Precision, // Net precision - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - InferenceEngine::Layout, // Output layout - std::string // Target device name -> squeezeParams; -class SqueezeUnsqueezeLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); -protected: - void SetUp() override; -}; +TEST_P(SqueezeUnsqueezeLayerTest, CompareWithRefs) { + Run(); +} } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/strided_slice.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/strided_slice.hpp index cfedd17f2e30a8..ee3b1721dd8263 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/strided_slice.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/strided_slice.hpp @@ -4,44 +4,10 @@ #pragma once -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/single_layer/strided_slice.hpp" namespace LayerTestsDefinitions { - -struct StridedSliceSpecificParams { - InferenceEngine::SizeVector inputShape; - std::vector begin; - std::vector end; - std::vector strides; - std::vector beginMask; - std::vector endMask; - std::vector newAxisMask; - std::vector shrinkAxisMask; - std::vector ellipsisAxisMask; -}; - -using StridedSliceParams = std::tuple< - StridedSliceSpecificParams, - InferenceEngine::Precision, // Net precision - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - InferenceEngine::Layout, // Output layout - std::string, // Device name - std::map // Additional network configuration ->; - -class StridedSliceLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); - -protected: - void SetUp() override; -}; +TEST_P(StridedSliceLayerTest, CompareWithRefs) { + Run(); +} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/tensor_iterator.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/tensor_iterator.hpp index 4184f87d5e9643..d9411d4d40fd2f 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/tensor_iterator.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/tensor_iterator.hpp @@ -4,38 +4,11 @@ #pragma once -#include -#include -#include -#include -#include -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "shared_test_classes/single_layer/tensor_iterator.hpp" namespace LayerTestsDefinitions { -using TensorIteratorParams = typename std::tuple< - bool, // using unroll tensor iterator transformation - size_t, // seq_lengths - size_t, // batch - size_t, // hidden size - // todo: fix. input size hardcoded to 10 due to limitation (10 args) of gtests Combine() func. - //size_t, // input size - size_t, // sequence axis - float, // clip - ngraph::helpers::TensorIteratorBody, // body type - ngraph::op::RecurrentSequenceDirection, // direction - InferenceEngine::Precision, // Network precision - std::string>; // Device name - -class TensorIteratorTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); - -protected: - void SetUp() override; +TEST_P(TensorIteratorTest, CompareWithRefs) { + Run(); }; - } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/tile.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/tile.hpp index 704ae0d2faf254..f208727e7fd4af 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/tile.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/tile.hpp @@ -1,38 +1,17 @@ + // Copyright (C) 2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #pragma once -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" +#include "shared_test_classes/single_layer/tile.hpp" namespace LayerTestsDefinitions { -typedef std::vector TileSpecificParams; -typedef std::tuple< - TileSpecificParams, - InferenceEngine::Precision, // Net precision - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - InferenceEngine::Layout, // Output layout - InferenceEngine::SizeVector, // Input shapes - LayerTestsUtils::TargetDevice // Device name -> TileLayerTestParamsSet; - -class TileLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - -protected: - void SetUp() override; -}; +TEST_P(TileLayerTest, CompareWithRefs) { + Run(); +} } // namespace LayerTestsDefinitions + diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/topk.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/topk.hpp index a20d75f9be0736..99167364a2efd6 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/topk.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/topk.hpp @@ -4,33 +4,12 @@ #pragma once -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" +#include "shared_test_classes/single_layer/topk.hpp" namespace LayerTestsDefinitions { -typedef std::tuple< - int64_t, // keepK - int64_t, // axis - ngraph::opset4::TopK::Mode, // mode - ngraph::opset4::TopK::SortType, // sort - InferenceEngine::Precision, // Net precision - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - InferenceEngine::SizeVector, // inputShape - std::string // Target device name -> TopKParams; - -class TopKLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); -protected: - void SetUp() override; -}; +TEST_P(TopKLayerTest, CompareWithRefsDynamicBath) { + Run(); +} } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/transpose.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/transpose.hpp index f546df29ddecc1..e63f44e43c8632 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/transpose.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/transpose.hpp @@ -4,34 +4,12 @@ #pragma once -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" +#include "shared_test_classes/single_layer/transpose.hpp" namespace LayerTestsDefinitions { -typedef std::tuple< - std::vector, // Input order - InferenceEngine::Precision, // Net precision - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - InferenceEngine::Layout, // Output layout - std::vector, // Input shapes - std::string // Target device name -> transposeParams; - -class TransposeLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - -protected: - void SetUp() override; +TEST_P(TransposeLayerTest, CompareWithRefs) { + Run(); }; } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/variadic_split.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/variadic_split.hpp index bad439b7721d3d..5743fccc8340b1 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/variadic_split.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/variadic_split.hpp @@ -4,35 +4,12 @@ #pragma once -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" +#include "shared_test_classes/single_layer/variadic_split.hpp" namespace LayerTestsDefinitions { - typedef std::tuple< - std::vector, // Num splits - size_t, // Axis - InferenceEngine::Precision, // Net precision - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - InferenceEngine::Layout, // Output layout - std::vector, // Input shapes - std::string // Target device name - > VariadicSplitParams; - -class VariadicSplitLayerTest : public testing::WithParamInterface, - public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - -protected: - void SetUp() override; -}; +TEST_P(VariadicSplitLayerTest, CompareWithRefs) { + Run(); +} -} // namespace LayerTestsDefinitions \ No newline at end of file +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/activation_concats_eltwise.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/activation_concats_eltwise.hpp index a755bba0e04ba1..b4566d0a70de75 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/activation_concats_eltwise.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/activation_concats_eltwise.hpp @@ -4,28 +4,12 @@ #pragma once -#include +#include "shared_test_classes/subgraph/activation_concats_eltwise.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +namespace SubgraphTestsDefinitions { -namespace LayerTestsDefinitions { +TEST_P(ActivationConcatsEltwise, CompareWithRefs) { + Run(); +} -using ActivationConcatsEltwiseParamsTuple = typename std::tuple< - size_t, // input size - size_t, // concat const size - InferenceEngine::Precision, // precision - std::string, // device name - std::map // configuration ->; - - -class ActivationConcatsEltwise : public testing::WithParamInterface, - public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - -protected: - void SetUp() override; -}; - -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/basic_lstm.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/basic_lstm.hpp index e0b69c3107b3f1..438417645cf609 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/basic_lstm.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/basic_lstm.hpp @@ -4,40 +4,61 @@ #pragma once -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" - -typedef std::tuple< - InferenceEngine::Precision, // Network Precision - std::string, // Target Device - std::map // Configuration -> basicLstmParams; - -namespace LayerTestsDefinitions { - -class Basic_LSTM_S : public testing::WithParamInterface, - public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - - void Run() override; - static std::shared_ptr GetNetwork(size_t thirdDimOut, - size_t hiddenSize, - const InferenceEngine::Precision& netPrecission = InferenceEngine::Precision::FP32, - std::vector* hidden_memory_init_out = nullptr, - std::vector* cell_memory_init_out = nullptr); -protected: - size_t hidden_size; - std::vector hidden_memory_init; - std::vector cell_memory_init; - void SetUp() override; - std::vector> CalculateRefs() override; +#include +#include "shared_test_classes/subgraph/basic_lstm.hpp" + +namespace SubgraphTestsDefinitions { +TEST_P(Basic_LSTM_S, CompareWithRefImpl) { + Run(); }; -} // namespace LayerTestsDefinitions +TEST_P(Basic_LSTM_S, CompareWithRefImpl_LowLatencyTransformation) { + InferenceEngine::TensorDesc state_description(InferenceEngine::Precision::FP32, + InferenceEngine::SizeVector({1, hidden_size}), + InferenceEngine::Layout::NC); + // Reshape + auto params = ngraph::builder::makeParams(function->get_parameters().at(0)->get_element_type(), { {1, 49} }); + function->replace_parameter(0, params[0]); + + // todo: it is better to modify the model -> use ShapeOf() and Gather() + std::vector outFormShapes1 = { 1, 1, 49 }; + auto pattern1 = std::make_shared(ngraph::element::Type_t::i64, ngraph::Shape{3}, outFormShapes1); + auto param_target_inputs = function->get_parameters().at(0)->output(0).get_target_inputs(); + + // replace hardcoded shape + for (const auto& target : param_target_inputs.begin()->get_node()->input(1).get_source_output().get_target_inputs()) { + target.replace_source_output(pattern1); + } + function->validate_nodes_and_infer_types(); + + // Calculate References for the network before transformation passes + auto referenceOutputs = CalculateRefs(); + + // Apply LowLatency and UnrollTensorIterator transformations + ngraph::pass::Manager manager; + manager.register_pass(); // LowLatency enables UnrollTI + manager.run_passes(function); + LoadNetwork(); + IE_SUPPRESS_DEPRECATED_START + auto states = executableNetwork.QueryState(); + for (auto& state : states) { + auto name = state.GetName(); + if (name.find("cell_state_1") != std::string::npos) { + auto blob = FuncTestUtils::createAndFillBlobWithFloatArray(state_description, + cell_memory_init.data(), cell_memory_init.size()); + state.SetState(blob); + } else if (name.find("hidden_state_1") != std::string::npos) { + auto blob = FuncTestUtils::createAndFillBlobWithFloatArray(state_description, + hidden_memory_init.data(), hidden_memory_init.size()); + state.SetState(blob); + } else { + GTEST_FAIL() << "unknown memory state"; + } + } + IE_SUPPRESS_DEPRECATED_END + // Run and compare + Infer(); + const auto& actualOutputs = GetOutputs(); + Compare(referenceOutputs, actualOutputs); +}; +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/broadcast_power.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/broadcast_power.hpp index d682d467da8b86..623548d4fbd887 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/broadcast_power.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/broadcast_power.hpp @@ -4,30 +4,12 @@ #pragma once -#include -#include -#include -#include +#include "shared_test_classes/subgraph/broadcast_power.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" -#include "ngraph_functions/builders.hpp" +namespace SubgraphTestsDefinitions { -typedef std::tuple< - std::vector>, // Input shapes - InferenceEngine::Precision, // Network Precision - std::string, // Target Device - std::map //Configuration -> BroadCastPowerTuple; - -namespace LayerTestsDefinitions { - -class BroadcastPowerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - -protected: - void SetUp() override; +TEST_P(BroadcastPowerTest, CompareWithRefImpl) { + Run(); }; -} // namespace LayerTestsDefinitions + +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/cascade_concat.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/cascade_concat.hpp index 03cd47d4b30864..770c34a0a7e7fc 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/cascade_concat.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/cascade_concat.hpp @@ -2,30 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 #pragma once -#include -#include -#include -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" +#include "shared_test_classes/subgraph/cascade_concat.hpp" -namespace LayerTestsDefinitions { +namespace SubgraphTestsDefinitions { -typedef std::tuple< - std::vector>, //input shapes 1 - std::vector>, //input shapes 2 - std::vector>, //input shapes 3 - InferenceEngine::Precision, //Network precision - bool, //Multioutput -> True, Single out ->false - std::string, //Device name - std::map//config - > CascadeConcatTuple; +TEST_P(CascadeConcat, CompareWithRefs) { + Run(); +} -class CascadeConcat - : public testing::WithParamInterface, - public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); -protected: - void SetUp() override; -}; -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/concat_multi_input.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/concat_multi_input.hpp index eb7147bd11798a..ffa0b0f2d23262 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/concat_multi_input.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/concat_multi_input.hpp @@ -4,38 +4,18 @@ #pragma once -#include -#include -#include -#include +#include "shared_test_classes/subgraph/concat_multi_input.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" -#include "ngraph_functions/builders.hpp" +namespace SubgraphTestsDefinitions { -typedef std::tuple< - std::vector>, // Input shapes - InferenceEngine::Precision, // Network Precision - std::string, // Target Device - std::map // Config -> concatMultiParams; - -namespace LayerTestsDefinitions { - -class ConcatMultiInput : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -private: - std::vector paramSize; - ngraph::element::Type ngPrc; - std::vector> inputShapes; - -public: - void GenerateStridedSliceModel(); - void GenerateConstOnlyModel(); - static std::string getTestCaseName(testing::TestParamInfo obj); +TEST_P(ConcatMultiInput, CompareWithRefStridedSlice) { + GenerateStridedSliceModel(); + Run(); +}; -protected: - void SetUp() override; +TEST_P(ConcatMultiInput, CompareWithRefConstOnly) { + GenerateConstOnlyModel(); + Run(); }; -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/concat_quantization.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/concat_quantization.hpp index b919cd4e411642..9ab9f4bd6eff99 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/concat_quantization.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/concat_quantization.hpp @@ -4,30 +4,24 @@ #pragma once -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" -#include "ngraph_functions/builders.hpp" - -typedef std::tuple< - InferenceEngine::Precision, // Network Precision - std::string, // Target Device - std::map //Configuration -> concatQuantizationParams; - -namespace LayerTestsDefinitions { - -class ConcatQuantization : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - -protected: - void SetUp() override; +#include "shared_test_classes/subgraph/concat_quantization.hpp" + +namespace SubgraphTestsDefinitions { + +TEST_P(ConcatQuantization, CompareWithRefImpl) { + InferenceEngine::Core* core = PluginCache::get().ie(targetDevice).get(); + if (!configuration.empty()) { + core->SetConfig(configuration, targetDevice); + } + + try { + InferenceEngine::CNNNetwork cnnNetwork = InferenceEngine::CNNNetwork{ function }; + executableNetwork = core->LoadNetwork(cnnNetwork, targetDevice); + } + catch (InferenceEngine::details::InferenceEngineException ex) { + FAIL() << ex.what(); + } }; -} // namespace LayerTestsDefinitions + +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/constant_result.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/constant_result.hpp index 9f6587741625af..6a1f9cec05f7c5 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/constant_result.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/constant_result.hpp @@ -4,26 +4,13 @@ #pragma once -#include -#include -#include -#include +#include "shared_test_classes/subgraph/constant_result.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" +namespace SubgraphTestsDefinitions { -namespace LayerTestsDefinitions { +TEST_P(ConstantResultSubgraphTest, CompareWithRefs) { + Run(); +} -typedef std::tuple< - std::string // Device name -> constResultParams; - -class ConstantResultSubgraphTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); -protected: - void SetUp() override; -}; -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/conv_eltwise_fusion.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/conv_eltwise_fusion.hpp index d89012e10c2b56..078c5ef12575ac 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/conv_eltwise_fusion.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/conv_eltwise_fusion.hpp @@ -2,36 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 #pragma once -#include -#include -#include -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include -#include +#include "shared_test_classes/subgraph/conv_eltwise_fusion.hpp" -namespace LayerTestsDefinitions { +namespace SubgraphTestsDefinitions { -typedef std::tuple< - ngraph::NodeTypeInfo, // Convolution type - std::tuple< - ngraph::NodeTypeInfo, // Eltwise type - int64_t // Expected number of ops - >, - ngraph::Shape, // Input shape - ngraph::Shape, // Weights shape - ngraph::Shape, // Const shape - ngraph::element::Type, // Network precision - std::string // Device name - > ConvEltwiseFusionParams; - -class ConvEltwiseFusion - : public testing::WithParamInterface, - public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); - -protected: - void SetUp() override; -}; -} // namespace LayerTestsDefinitions +TEST_P(ConvEltwiseFusion, CompareWithRefs) { + Run(); +} +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/convert_pad_to_group_conv.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/convert_pad_to_group_conv.hpp index b7c116da01d660..d54ed0832e7728 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/convert_pad_to_group_conv.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/convert_pad_to_group_conv.hpp @@ -2,32 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 #pragma once -#include -#include -#include -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include -#include +#include "shared_test_classes/subgraph/convert_pad_to_group_conv.hpp" -namespace LayerTestsDefinitions { +namespace SubgraphTestsDefinitions { -typedef std::tuple< - ngraph::Shape, // input shape - std::vector, // pad_begin - std::vector, // pad_end - float, // pad_value - ngraph::op::PadMode, // pad_mode - std::string // Device name - > PadParams; - -class ConvertPadToConvTests - : public testing::WithParamInterface, - public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); - -protected: - void SetUp() override; -}; -} // namespace LayerTestsDefinitions +TEST_P(ConvertPadToConvTests, CompareWithRefs) { + Run(); +} +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/delayed_copy_layer.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/delayed_copy_layer.hpp index c6ac64a36f4679..0292fbdf7eed9c 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/delayed_copy_layer.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/delayed_copy_layer.hpp @@ -2,32 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 #pragma once -#include -#include -#include -#include +#include "shared_test_classes/subgraph/delayed_copy_layer.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" -#include "ngraph_functions/builders.hpp" +namespace SubgraphTestsDefinitions { -namespace LayerTestsDefinitions { - -typedef std::tuple< - InferenceEngine::Precision, //Network precision - std::string, //Device name - std::map //Configuration -> ConcatSplitReluTuple; - -class DelayedCopyTest - : public testing::WithParamInterface, - public LayerTestsUtils::LayerTestsCommon { -private: - void switchToNgraphFriendlyModel(); -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); -protected: - void SetUp() override; - void Run() override; +TEST_P(DelayedCopyTest, CompareWithRefs) { + Run(); }; -} // namespace LayerTestsDefinitions + +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/first_connect_input_concat.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/first_connect_input_concat.hpp index aeb735697fad0d..d10a6817542fc3 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/first_connect_input_concat.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/first_connect_input_concat.hpp @@ -4,30 +4,12 @@ #pragma once -#include -#include -#include -#include +#include -#include -#include +namespace SubgraphTestsDefinitions { -typedef std::tuple< - std::vector>, // Input shapes - InferenceEngine::Precision, // Network Precision - std::string, // Target Device - std::map // Config -> concatFirstInputParams; - -namespace LayerTestsDefinitions { - -class ConcatFirstInputTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - -protected: - void SetUp() override; +TEST_P(ConcatFirstInputTest, CompareWithRefImpl) { + Run(); }; -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/get_output_before_activation.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/get_output_before_activation.hpp index ed5c5d4630dd0e..b3df1b381d118f 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/get_output_before_activation.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/get_output_before_activation.hpp @@ -2,33 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 #pragma once -#include "common_test_utils/test_common.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include +#include "shared_test_classes/subgraph/get_output_before_activation.hpp" namespace SubgraphTestsDefinitions { -enum class midOutputType { - Sum, - Sub, - Mul, -}; - -typedef std::tuple< - std::string, // Target device name - InferenceEngine::Precision, // Network precision - size_t, // Input size - midOutputType, // Type of layer that will be an output - std::map // Configuration -> outputBeforeActivationParams; -std::ostream& operator<< (std::ostream& os, const midOutputType& oType); - -class OutputBeforeActivation : public LayerTestsUtils::LayerTestsCommon, - public testing::WithParamInterface { -protected: - void SetUp() override; -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); - InferenceEngine::Blob::Ptr GenerateInput(const InferenceEngine::InputInfo &info) const override; +TEST_P(OutputBeforeActivation, CompareWithRefs) { + Run(); }; + } // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/handling_orientation_conv.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/handling_orientation_conv.hpp index eeff3bebae8e9a..bb265bf166da43 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/handling_orientation_conv.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/handling_orientation_conv.hpp @@ -4,28 +4,12 @@ #pragma once -#include -#include -#include -#include +#include "shared_test_classes/subgraph/handling_orientation_conv.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" -#include "ngraph_functions/builders.hpp" +namespace SubgraphTestsDefinitions { -namespace LayerTestsDefinitions { -typedef std::tuple< - InferenceEngine::Precision, //Network precision - std::string, //Device name - std::map //Configuration -> HandlingOrientationParams; - -class HandlingOrientationClass : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); - -protected: - void SetUp() override; +TEST_P(HandlingOrientationClass, CompareWithRefs){ + Run(); }; -} // namespace LayerTestsDefinitions + +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/input_conv.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/input_conv.hpp index 7e17817acf2067..d002061722a9af 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/input_conv.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/input_conv.hpp @@ -4,40 +4,12 @@ #pragma once -#include -#include -#include -#include +#include "shared_test_classes/subgraph/input_conv.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" +namespace SubgraphTestsDefinitions { -typedef std::tuple< - std::vector, // Input Shapes - std::vector, // Kernel Shape - size_t // Stride -> convParams; - -typedef std::tuple< - InferenceEngine::Precision, // Network Precision - std::string, // Target Device - std::map, // Configuration - convParams, // Convolution Params - size_t, // Output Channels - bool // If Add Reshape at the end of the model to reshape to 2D -> inputConvParams; - -namespace LayerTestsDefinitions { - -class InputConvTest : public testing::WithParamInterface, - public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - InferenceEngine::Blob::Ptr GenerateInput(const InferenceEngine::InputInfo& info) const override; - -protected: - void SetUp() override; +TEST_P(InputConvTest, CompareWithRefImpl) { + Run(); }; -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/matmul_squeeze_add.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/matmul_squeeze_add.hpp index ca2bbaf4812d60..6d0708e6b5a6cc 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/matmul_squeeze_add.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/matmul_squeeze_add.hpp @@ -4,32 +4,12 @@ #pragma once -#include -#include -#include -#include +#include "shared_test_classes/subgraph/matmul_squeeze_add.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" +namespace SubgraphTestsDefinitions { -typedef std::tuple< - InferenceEngine::Precision, // Network Precision - std::string, // Target Device - std::map, // Configuration - std::vector, // Input Shapes - size_t // Output Size -> matmulSqueezeAddParams; - -namespace LayerTestsDefinitions { - -class MatmulSqueezeAddTest : public testing::WithParamInterface, - public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - -protected: - void SetUp() override; +TEST_P(MatmulSqueezeAddTest, CompareWithRefImpl) { + Run(); }; -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/memory_LSTMCell.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/memory_LSTMCell.hpp index e30f62a81c7db5..522b2cc4e84a88 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/memory_LSTMCell.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/memory_LSTMCell.hpp @@ -1,39 +1,22 @@ // Copyright (C) 2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 + #pragma once -#include "common_test_utils/test_common.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include +#include "shared_test_classes/subgraph/memory_LSTMCell.hpp" namespace SubgraphTestsDefinitions { -typedef std::tuple< - std::string, // Target device name - InferenceEngine::Precision, // Network precision - size_t, // Input size - size_t, // Hidden size - std::map // Configuration -> memoryLSTMCellParams; -class MemoryLSTMCellTest : public LayerTestsUtils::LayerTestsCommon, - public testing::WithParamInterface { -private: - // you have to Unroll TI manually and remove memory untill ngraph supports it - void switchToNgraphFriendlyModel(); - void CreatePureTensorIteratorModel(); - // since we switching models we need to generate and save weights biases and inputs in SetUp - std::vector input_bias; - std::vector input_weights; - std::vector hidden_memory_init; - std::vector cell_memory_init; - std::vector weights_vals; - std::vector reccurrenceWeights_vals; - std::vector bias_vals; -protected: - void SetUp() override; - void Run() override; - void RunLowLatency(bool regular_api = false); -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); +TEST_P(MemoryLSTMCellTest, CompareWithRefs) { + Run(); +}; + +TEST_P(MemoryLSTMCellTest, CompareWithRefs_LowLatencyTransformation) { + RunLowLatency(); }; + +TEST_P(MemoryLSTMCellTest, CompareWithRefs_LowLatencyRegularAPITransformation) { + RunLowLatency(true); +}; + } // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/memory_eltwise_reshape_concat.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/memory_eltwise_reshape_concat.hpp index e49b57f7879a41..b0e576a91e1ae0 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/memory_eltwise_reshape_concat.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/memory_eltwise_reshape_concat.hpp @@ -2,36 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 #pragma once -#include "common_test_utils/test_common.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include +#include "shared_test_classes/subgraph/memory_eltwise_reshape_concat.hpp" namespace SubgraphTestsDefinitions { -typedef std::tuple< - std::string, // Target device name - InferenceEngine::Precision, // Network precision - size_t, // Mutiples of concat size to be used as input size - size_t, // Concat size - std::map // Configuration -> memoryEltwiseReshapeConcatParams; -class MemoryEltwiseReshapeConcatTest : public LayerTestsUtils::LayerTestsCommon, - public testing::WithParamInterface { -private: - void initTestModel(); - // you have to replace memory layers since ngraph does not support them - void initNgraphFriendlyModel(); - - // since we switching models we need to generate and save these values in SetUp - size_t inputSize; - size_t concatSize; - ngraph::element::Type ngPrc; - std::vector memory_init; - std::vector concat_vals; -protected: - void SetUp() override; - void Run() override; -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); +TEST_P(MemoryEltwiseReshapeConcatTest, CompareWithRefs) { + Run(); }; + } // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/multioutput_eltwise_squeeze_eltwise.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/multioutput_eltwise_squeeze_eltwise.hpp index d63f62e7047e21..f96f10f0fa9f50 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/multioutput_eltwise_squeeze_eltwise.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/multioutput_eltwise_squeeze_eltwise.hpp @@ -2,29 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 #pragma once -#include -#include -#include -#include -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "shared_test_classes/subgraph/multioutput_eltwise_squeeze_eltwise.hpp" -namespace LayerTestsDefinitions { +namespace SubgraphTestsDefinitions { -typedef std::tuple< - std::vector>, //input shapes - InferenceEngine::Precision, //Network precision - std::string, //Device name - std::map //Configuration -> MultioutputEltwiseReshapeEltwiseTuple; - -class MultioutputEltwiseReshapeEltwise - : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); -protected: - void SetUp() override; +TEST_P(MultioutputEltwiseReshapeEltwise, CompareWithRefs){ + Run(); }; -} // namespace LayerTestsDefinitions + +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/multiple_LSTMCell.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/multiple_LSTMCell.hpp index 16b6d7a867e291..bbcba76ed958df 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/multiple_LSTMCell.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/multiple_LSTMCell.hpp @@ -2,40 +2,20 @@ // SPDX-License-Identifier: Apache-2.0 #pragma once -#include "common_test_utils/test_common.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include +#include "shared_test_classes/subgraph/multiple_LSTMCell.hpp" namespace SubgraphTestsDefinitions { -typedef std::tuple< - std::string, // Target device name - InferenceEngine::Precision, // Network precision - size_t, // Input size - size_t, // Hidden size - std::map // Configuration -> multipleLSTMCellParams; -class MultipleLSTMCellTest : public LayerTestsUtils::LayerTestsCommon, - public testing::WithParamInterface { -private: - // you have to Unroll TI manually and remove memory untill ngraph supports it - void switchToNgraphFriendlyModel(); - void CreatePureTensorIteratorModel(); - // since we switching models we need to generate and save weights biases and inputs in SetUp - size_t hiddenSize; - std::vector input_bias; - std::vector input_weights; - std::vector hidden_memory_init; - std::vector cell_memory_init; - std::vector weights_vals; - std::vector weights_2_vals; - std::vector reccurrenceWeights_vals; - std::vector bias_vals; -protected: - void SetUp() override; - void Run() override; - void RunLowLatency(bool regular_api = false); -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); +TEST_P(MultipleLSTMCellTest, CompareWithRefs) { + Run(); }; + +TEST_P(MultipleLSTMCellTest, CompareWithRefs_LowLatencyTransformation) { + RunLowLatency(); +}; + +TEST_P(MultipleLSTMCellTest, CompareWithRefs_LowLatencyRegularAPITransformation) { + RunLowLatency(true); +}; + } // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/multiple_concat.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/multiple_concat.hpp index 8740aeda171848..8b3556dcbbe6d1 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/multiple_concat.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/multiple_concat.hpp @@ -2,24 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 #pragma once -#include "common_test_utils/test_common.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include +#include "shared_test_classes/subgraph/multiple_concat.hpp" namespace SubgraphTestsDefinitions { -typedef std::tuple< - std::string, // Target device name - InferenceEngine::Precision, // Network precision - size_t, // Input size - size_t, // Const size - std::map // Configuration -> multipleConcatParams; -class MultipleConcatTest : public LayerTestsUtils::LayerTestsCommon, - public testing::WithParamInterface { -protected: - void SetUp() override; -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); +TEST_P(MultipleConcatTest, CompareWithRefs) { + Run(); }; + } // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/multiply_add.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/multiply_add.hpp index 4b65929c2c94a0..e52822343dc811 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/multiply_add.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/multiply_add.hpp @@ -3,30 +3,12 @@ // #pragma once -#include -#include -#include -#include -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" -#include "common_test_utils/test_constants.hpp" +#include "shared_test_classes/subgraph/multiply_add.hpp" -namespace LayerTestsDefinitions { +namespace SubgraphTestsDefinitions { -using MultiplyAddParamsTuple = typename std::tuple< - std::vector, //input shapes - InferenceEngine::Precision, //Network precision - std::string>; //Device name - -class MultiplyAddLayerTest: - public testing::WithParamInterface, - public LayerTestsUtils::LayerTestsCommon{ -public: - std::shared_ptr fn; - static std::string getTestCaseName(const testing::TestParamInfo &obj); -protected: - void SetUp() override; +TEST_P(MultiplyAddLayerTest, CompareWithRefs) { + Run(); }; -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/negative_memory_layer_offset.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/negative_memory_layer_offset.hpp index 0756a374162df6..5a19b188584a9b 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/negative_memory_layer_offset.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/negative_memory_layer_offset.hpp @@ -2,35 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 #pragma once -#include -#include -#include -#include +#include "shared_test_classes/subgraph/negative_memory_layer_offset.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" -#include "ngraph_functions/builders.hpp" +namespace SubgraphTestsDefinitions { -namespace LayerTestsDefinitions { - -typedef std::tuple< - InferenceEngine::Precision, //Network precision - std::string, //Device name - size_t, //Input size - size_t, //Hidden size - std::map //Configuration -> NegativeMemoryLayerOffsetTuple; - -class NegativeMemoryOffsetTest - : public testing::WithParamInterface, - public LayerTestsUtils::LayerTestsCommon { -private: - void switchToNgraphFriendlyModel(); - std::vector memory_init; -public: - static std::string getTestCaseName(const testing::TestParamInfo& obj); -protected: - void SetUp() override; - void Run() override; +TEST_P(NegativeMemoryOffsetTest, CompareWithRefs) { + Run(); }; -} // namespace LayerTestsDefinitions + +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/perm_conv_perm_concat.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/perm_conv_perm_concat.hpp index 4365c511fec65f..47486921dc8900 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/perm_conv_perm_concat.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/perm_conv_perm_concat.hpp @@ -4,33 +4,12 @@ #pragma once -#include -#include -#include -#include -#include - -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" -#include "ngraph_functions/builders.hpp" +#include "shared_test_classes/subgraph/perm_conv_perm_concat.hpp" namespace SubgraphTestsDefinitions { -typedef std::tuple< - InferenceEngine::Precision, // Network Precision - std::string, // Target Device - std::array, // Input shape - std::array, // Kernel shape - size_t, // Output channels - std::map // Configuration -> PermConvPermConcatParams; -class PermConvPermConcat : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); +TEST_P(PermConvPermConcat, CompareWithRefs) { + Run(); +} -protected: - void SetUp() override; - void Run() override; -}; } // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/quantized_convolution_backprop_data.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/quantized_convolution_backprop_data.hpp index 891b84fd5c7b7a..bf6ff273e8879c 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/quantized_convolution_backprop_data.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/quantized_convolution_backprop_data.hpp @@ -4,40 +4,12 @@ #pragma once -#include -#include -#include -#include +#include "shared_test_classes/subgraph/quantized_convolution_backprop_data.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" +namespace SubgraphTestsDefinitions { -typedef std::tuple< - InferenceEngine::SizeVector, - InferenceEngine::SizeVector, - std::vector, - std::vector, - InferenceEngine::SizeVector, - size_t, - ngraph::op::PadType, - size_t, - ngraph::helpers::QuantizationGranularity> quantConvBackpropDataSpecificParams; -typedef std::tuple< - quantConvBackpropDataSpecificParams, - InferenceEngine::Precision, - InferenceEngine::SizeVector, - LayerTestsUtils::TargetDevice> quantConvBackpropDataLayerTestParamsSet; +TEST_P(QuantConvBackpropDataLayerTest, CompareWithRefs) { + Run(); +} -namespace LayerTestsDefinitions { - -class QuantConvBackpropDataLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - -protected: - void SetUp() override; -}; - -} // namespace LayerTestsDefinitions \ No newline at end of file +} // namespace SubgraphTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/quantized_group_convolution.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/quantized_group_convolution.hpp index d0825907037e24..13d21c4a83c5e2 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/quantized_group_convolution.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/quantized_group_convolution.hpp @@ -4,41 +4,12 @@ #pragma once -#include -#include -#include -#include +#include "shared_test_classes/subgraph/quantized_group_convolution.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" +namespace SubgraphTestsDefinitions { -typedef std::tuple< - InferenceEngine::SizeVector, - InferenceEngine::SizeVector, - std::vector, - std::vector, - InferenceEngine::SizeVector, - size_t, - size_t, - size_t, - ngraph::helpers::QuantizationGranularity, - bool> quantGroupConvSpecificParams; -typedef std::tuple< - quantGroupConvSpecificParams, - InferenceEngine::Precision, - InferenceEngine::SizeVector, - LayerTestsUtils::TargetDevice> quantGroupConvLayerTestParamsSet; +TEST_P(QuantGroupConvLayerTest, CompareWithRefs) { + Run(); +} -namespace LayerTestsDefinitions { - -class QuantGroupConvLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - -protected: - void SetUp() override; -}; - -} // namespace LayerTestsDefinitions \ No newline at end of file +} // namespace SubgraphTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/quantized_group_convolution_backprop_data.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/quantized_group_convolution_backprop_data.hpp index 94c507071640bd..445d51356167e3 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/quantized_group_convolution_backprop_data.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/quantized_group_convolution_backprop_data.hpp @@ -4,41 +4,12 @@ #pragma once -#include -#include -#include -#include +#include "shared_test_classes/subgraph/quantized_group_convolution_backprop_data.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" +namespace SubgraphTestsDefinitions { -typedef std::tuple< - InferenceEngine::SizeVector, - InferenceEngine::SizeVector, - std::vector, - std::vector, - InferenceEngine::SizeVector, - size_t, - size_t, - ngraph::op::PadType, - size_t, - ngraph::helpers::QuantizationGranularity> quantGroupConvBackpropDataSpecificParams; -typedef std::tuple< - quantGroupConvBackpropDataSpecificParams, - InferenceEngine::Precision, - InferenceEngine::SizeVector, - LayerTestsUtils::TargetDevice> quantGroupConvBackpropDataLayerTestParamsSet; +TEST_P(QuantGroupConvBackpropDataLayerTest, CompareWithRefs) { + Run(); +} -namespace LayerTestsDefinitions { - -class QuantGroupConvBackpropDataLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - -protected: - void SetUp() override; -}; - -} // namespace LayerTestsDefinitions \ No newline at end of file +} // namespace SubgraphTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/quantized_mat_mul.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/quantized_mat_mul.hpp index 7f296f413203d9..9454633b5d0093 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/quantized_mat_mul.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/quantized_mat_mul.hpp @@ -4,33 +4,12 @@ #pragma once -#include -#include -#include -#include +#include "shared_test_classes/subgraph/quantized_mat_mul.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +namespace SubgraphTestsDefinitions { -typedef std::tuple< - size_t, - ngraph::helpers::QuantizationGranularity, - InferenceEngine::Precision> QuantParams; - -typedef std::tuple< - QuantParams, - InferenceEngine::Precision, - InferenceEngine::SizeVector, - InferenceEngine::SizeVector, - LayerTestsUtils::TargetDevice> QuantMatMulLayerTestParamsSet; - -namespace LayerTestsDefinitions { - -class QuantMatMulTest : public testing::WithParamInterface, virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); - -protected: - void SetUp() override; +TEST_P(QuantMatMulTest, CompareWithRefs) { + Run(); }; -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/range_add.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/range_add.hpp index 145742e6fe937e..a299768086d09a 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/range_add.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/range_add.hpp @@ -4,36 +4,16 @@ #pragma once -#include -#include -#include -#include +#include "shared_test_classes/subgraph/range_add.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" +namespace SubgraphTestsDefinitions { -#include "single_layer_tests/range.hpp" +TEST_P(RangeAddSubgraphTest, CompareWithRefs) { + Run(); +} -namespace LayerTestsDefinitions { +TEST_P(RangeNumpyAddSubgraphTest, CompareWithRefs) { + Run(); +} -// ------------------------------ V0 ------------------------------ - -class RangeAddSubgraphTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); -protected: - void SetUp() override; -}; - -// ------------------------------ V4 ------------------------------ - -class RangeNumpyAddSubgraphTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); -protected: - void SetUp() override; -}; - -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/relu_shape_of.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/relu_shape_of.hpp index 2ec22af0e1997e..b9c1ef41944bee 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/relu_shape_of.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/relu_shape_of.hpp @@ -4,23 +4,12 @@ #pragma once -#include -#include -#include -#include +#include "shared_test_classes/subgraph/relu_shape_of.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" +namespace SubgraphTestsDefinitions { -#include "single_layer_tests/shape_of.hpp" +TEST_P(ReluShapeOfSubgraphTest, CompareWithRefs) { + Run(); +} -namespace LayerTestsDefinitions { - -class ReluShapeOfSubgraphTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); -protected: - void SetUp() override; -}; -} // namespace LayerTestsDefinitions \ No newline at end of file +} // namespace SubgraphTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/reshape_permute_conv_permute_reshape_act.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/reshape_permute_conv_permute_reshape_act.hpp index 2f4a8da672dd96..6b52414c5c7049 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/reshape_permute_conv_permute_reshape_act.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/reshape_permute_conv_permute_reshape_act.hpp @@ -4,34 +4,12 @@ #pragma once -#include -#include -#include -#include -#include +#include "shared_test_classes/subgraph/reshape_permute_conv_permute_reshape_act.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" -#include "ngraph_functions/builders.hpp" +namespace SubgraphTestsDefinitions { -namespace LayerTestsDefinitions { - typedef std::tuple< - InferenceEngine::Precision, // Network Precision - std::string, // Target Device - std::array, // Input shape - std::array, // Kernel shape - size_t, // Output channels - std::map // Configuration - > ConvReshapeActParams; +TEST_P(ConvReshapeAct, CompareWithRefs) { + Run(); +} -class ConvReshapeAct : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - -protected: - void SetUp() override; - void Run() override; -}; - -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/reshape_permute_reshape.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/reshape_permute_reshape.hpp index bb7173d3ede8ed..2c86bd8d6b1431 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/reshape_permute_reshape.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/reshape_permute_reshape.hpp @@ -3,28 +3,12 @@ #pragma once -#include -#include -#include -#include +#include "shared_test_classes/subgraph/reshape_permute_reshape.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" -#include "ngraph_functions/builders.hpp" +namespace SubgraphTestsDefinitions { -namespace LayerTestsDefinitions { -typedef std::tuple< - std::vector>, //input shapes and permute shapes - InferenceEngine::Precision, //Network precision - std::string //Device name - > ReshapePermuteReshapeTuple; +TEST_P(ReshapePermuteReshape, CompareWithRefs) { + Run(); +} -class ReshapePermuteReshape : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); - -protected: - void SetUp() override; -}; -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/reshape_squeeze_reshape_relu.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/reshape_squeeze_reshape_relu.hpp index e564e3e69f4ba9..8e158fd158d9c6 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/reshape_squeeze_reshape_relu.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/reshape_squeeze_reshape_relu.hpp @@ -2,30 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 #pragma once -#include -#include -#include -#include -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "shared_test_classes/subgraph/reshape_squeeze_reshape_relu.hpp" -namespace LayerTestsDefinitions { -using ShapeAxesTuple = std::pair, std::vector>; +namespace SubgraphTestsDefinitions { -using ReshapeSqueezeReshapeReluTuple = typename std::tuple< - ShapeAxesTuple, // Input shapes & squeeze_indices - InferenceEngine::Precision, // Network precision - std::string, // Device name - ngraph::helpers::SqueezeOpType // SqueezeOpType ->; - -class ReshapeSqueezeReshapeRelu - : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); -protected: - void SetUp() override; +TEST_P(ReshapeSqueezeReshapeRelu, CompareWithRefs){ + Run(); }; -} // namespace LayerTestsDefinitions + +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/scaleshift.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/scaleshift.hpp index e79d8729165942..137668bf9a6266 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/scaleshift.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/scaleshift.hpp @@ -3,28 +3,11 @@ // #pragma once -#include -#include -#include -#include -#include "functional_test_utils/layer_test_utils.hpp" -#include "common_test_utils/test_constants.hpp" +#include "shared_test_classes/subgraph/scaleshift.hpp" -namespace LayerTestsDefinitions { +namespace SubgraphTestsDefinitions { -using ScaleShiftParamsTuple = typename std::tuple< - std::vector>, //input shapes - InferenceEngine::Precision, //Network precision - std::string, //Device name - std::vector, //scale - std::vector>; //shift - -class ScaleShiftLayerTest: - public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon{ -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); -protected: - void SetUp() override; +TEST_P(ScaleShiftLayerTest, CompareWithRefs){ + Run(); }; -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/softsign.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/softsign.hpp index 0911c795b45930..999d28147a9b00 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/softsign.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/softsign.hpp @@ -4,36 +4,12 @@ #pragma once -#include -#include -#include -#include +#include "shared_test_classes/subgraph/softsign.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" +namespace SubgraphTestsDefinitions { -typedef std::tuple< - InferenceEngine::Precision, // Network Precision - std::string, // Target Device - std::map, // Configuration - std::vector // Input Shapes -> softsignParams; - -namespace LayerTestsDefinitions { - -class SoftsignTest : public testing::WithParamInterface, - public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - - void Run() override; - -protected: - void SetUp() override; - -private: - std::shared_ptr GenerateNgraphFriendlySoftSign(); +TEST_P(SoftsignTest, CompareWithRefImpl) { + Run(); }; -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/split_concat_memory.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/split_concat_memory.hpp index 64e010cbde6f70..90809fa4f7c935 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/split_concat_memory.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/split_concat_memory.hpp @@ -4,29 +4,61 @@ #pragma once -#include +#include "shared_test_classes/subgraph/split_concat_memory.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +namespace SubgraphTestsDefinitions { -namespace LayerTestsDefinitions { +TEST_P(SplitConcatMemory, cyclicBufferCorrectness) { + auto ie = PluginCache::get().ie(); + cnnNetwork = InferenceEngine::CNNNetwork{function}; -using SplitConcatMemoryParamsTuple = typename std::tuple< - std::vector, // input shapes - InferenceEngine::Precision, // precision - int, // axis of split - std::string // device name ->; + auto exe_net = ie->LoadNetwork(cnnNetwork, "CPU"); + auto inf_reg = exe_net.CreateInferRequest(); + /* + * cnc1 out | mem | In|q + * |===============| + * iter_1 | 0 | 0 | 0 | 1 | + * iter_2 | 0 | 0 | 1 | 2 | + * iter 3 | 0 | 1 | 2 | 3 | + */ -class SplitConcatMemory : public testing::WithParamInterface, - public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); + auto i_blob = inf_reg.GetBlob("input"); + auto o_blob = inf_reg.GetBlob("plus_one"); -protected: - void SetUp() override; + auto o_blob_ref = make_blob_with_precision(o_blob->getTensorDesc()); + o_blob_ref->allocate(); - int axis; -}; + auto fill_by_quarter = [this] (InferenceEngine::Blob::Ptr& blob, std::vector vals) { + IE_ASSERT(vals.size() == 4); + auto quarter_blocked_shape = blob->getTensorDesc().getDims(); -} // namespace LayerTestsDefinitions \ No newline at end of file + // splis axis dimension into chunk + IE_ASSERT(quarter_blocked_shape[axis] % vals.size() == 0); + quarter_blocked_shape[axis] /= vals.size(); + quarter_blocked_shape.insert(quarter_blocked_shape.begin() + axis, vals.size()); + + auto quarter_blocked_view = CommonTestUtils::make_reshape_view(blob, quarter_blocked_shape); + CommonTestUtils::fill_data_with_broadcast(quarter_blocked_view, axis, vals); + }; + + // iteration 1 + CommonTestUtils::fill_data_const(i_blob, 1); + fill_by_quarter(o_blob_ref, {1, 1, 1, 2}); + inf_reg.Infer(); + Compare(o_blob_ref, o_blob); + + // iteration 2 + CommonTestUtils::fill_data_const(i_blob, 2); + fill_by_quarter(o_blob_ref, {1, 1, 2, 3}); + inf_reg.Infer(); + Compare(o_blob_ref, o_blob); + + // iteration 3 + CommonTestUtils::fill_data_const(i_blob, 3); + fill_by_quarter(o_blob_ref, {1, 2, 3, 4}); + inf_reg.Infer(); + Compare(o_blob_ref, o_blob); +} + +} // namespace SubgraphTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/split_conv_concat.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/split_conv_concat.hpp index d98d76161744f6..b8d79cb78fef7e 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/split_conv_concat.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/split_conv_concat.hpp @@ -4,24 +4,12 @@ #pragma once -#include -#include -#include -#include +#include "shared_test_classes/subgraph/split_conv_concat.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" -#include "ngraph_functions/builders.hpp" +namespace SubgraphTestsDefinitions { -namespace LayerTestsDefinitions { - -class SplitConvConcat : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - -protected: - void SetUp() override; +TEST_P(SplitConvConcat, CompareWithRefImpl) { + Run(); }; -} // namespace LayerTestsDefinitions \ No newline at end of file +} // namespace SubgraphTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/split_relu.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/split_relu.hpp index c9fe931b0ae086..485095913fe5f0 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/split_relu.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/split_relu.hpp @@ -3,31 +3,12 @@ // #pragma once -#include -#include -#include -#include -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "common_test_utils/test_constants.hpp" +#include "shared_test_classes/subgraph/split_relu.hpp" -namespace LayerTestsDefinitions { +namespace SubgraphTestsDefinitions { -typedef std::tuple< - std::vector>, //input shapes - std::vector, //index connected layer - InferenceEngine::Precision, //Network precision - std::string, //Device name - std::map //Configuration -> SplitReluTuple; - - -class SplitRelu: - public testing::WithParamInterface, - public LayerTestsUtils::LayerTestsCommon{ -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); -protected: - void SetUp() override; +TEST_P(SplitRelu, CompareWithRefs){ + Run(); }; -} // namespace LayerTestsDefinitions + +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/split_trivial_permute_concat.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/split_trivial_permute_concat.hpp index 8b8a553ae577f8..3a314261b2bb26 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/split_trivial_permute_concat.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/split_trivial_permute_concat.hpp @@ -2,32 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 #pragma once -#include -#include -#include -#include +#include "shared_test_classes/subgraph/split_trivial_permute_concat.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" -#include "ngraph_functions/builders.hpp" +namespace SubgraphTestsDefinitions { -namespace LayerTestsDefinitions { - -typedef std::tuple< - InferenceEngine::Precision, //Network precision - std::string, //Device name - std::vector, //Input sizes - size_t, //Split axis - size_t, //Concat axis - std::map //Configuration -> SplitTrivialPermuteConcatTuple; - -class SplitTrivialPermuteConcatTest - : public testing::WithParamInterface, - public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo& obj); -protected: - void SetUp() override; +TEST_P(SplitTrivialPermuteConcatTest, CompareWithRefs) { + Run(); }; -} // namespace LayerTestsDefinitions + +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/trivial_concat.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/trivial_concat.hpp index f34f6103387b57..6b2e71d33f24aa 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/trivial_concat.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/trivial_concat.hpp @@ -4,29 +4,12 @@ #pragma once -#include -#include -#include -#include +#include "shared_test_classes/subgraph/trivial_concat.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" +namespace SubgraphTestsDefinitions { -namespace LayerTestsDefinitions { -using trivialConcatParamsTuple = typename std::tuple< - std::vector, // Inputs shape - InferenceEngine::Precision, // Network precision - std::string, // Device name - std::map // Configuration ->; - -class TrivialConcatLayerTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(const testing::TestParamInfo &obj); -protected: - void SetUp() override; +TEST_P(TrivialConcatLayerTest, CompareWithRefs) { + Run(); }; -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/two_fake_quantize_to_fullyconnected.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/two_fake_quantize_to_fullyconnected.hpp index 8bf3f87dffc7d3..9261422870442a 100644 --- a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/two_fake_quantize_to_fullyconnected.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/two_fake_quantize_to_fullyconnected.hpp @@ -4,49 +4,12 @@ #pragma once -#include -#include -#include -#include +#include "shared_test_classes/subgraph/two_fake_quantize_to_fullyconnected.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" +namespace SubgraphTestsDefinitions { -typedef std::tuple< - std::vector, // levels - std::vector>, // const inputs shape - std::vector, // fake quantize inputLow, inputHigh, outputLow, outputHigh or empty for random - std::vector // input generator data: low, high, resolution -> fqSpecificParams; -typedef std::tuple< - fqSpecificParams, - InferenceEngine::Precision, // Net precision - InferenceEngine::Precision, // Input precision - InferenceEngine::Precision, // Output precision - InferenceEngine::Layout, // Input layout - InferenceEngine::Layout, // Output layout - InferenceEngine::SizeVector, // Input shapes - LayerTestsUtils::TargetDevice, // Device name - std::pair>, // Additional backend configuration and alis name to it - bool -> fqSubgraphTestParamsSet; -namespace LayerTestsDefinitions { +TEST_P(FakeQuantizeSubgraphTest, CompareWithRefs) { + Run(); +} -class FakeQuantizeSubgraphTest : public testing::WithParamInterface, - virtual public LayerTestsUtils::LayerTestsCommon { -public: - static std::string getTestCaseName(testing::TestParamInfo obj); - -protected: - void SetUp() override; - InferenceEngine::Blob::Ptr GenerateInput(const InferenceEngine::InputInfo &info) const override; - -protected: - float inputDataMin = 0.0; - float inputDataMax = 10.0; - float inputDataResolution = 1.0; - int32_t seed = 1; -}; - -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/ie_test_utils/functional_test_utils/import_export_base/import_export_base.cpp b/inference-engine/tests/functional/plugin/shared/src/base/import_export_base/import_export_base.cpp similarity index 97% rename from inference-engine/tests/ie_test_utils/functional_test_utils/import_export_base/import_export_base.cpp rename to inference-engine/tests/functional/plugin/shared/src/base/import_export_base/import_export_base.cpp index af17eb82d1cb9a..d807d80eaa31a8 100644 --- a/inference-engine/tests/ie_test_utils/functional_test_utils/import_export_base/import_export_base.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/base/import_export_base/import_export_base.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "import_export_base.hpp" +#include "base/import_export_base/import_export_base.hpp" #include diff --git a/inference-engine/tests/functional/plugin/shared/src/behavior/set_blob.cpp b/inference-engine/tests/functional/plugin/shared/src/behavior/set_blob.cpp index b11ff0f5045458..dbc5ce5c1f71d2 100644 --- a/inference-engine/tests/functional/plugin/shared/src/behavior/set_blob.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/behavior/set_blob.cpp @@ -3,7 +3,7 @@ // #include "behavior/set_blob.hpp" -#include +#include using namespace InferenceEngine; diff --git a/inference-engine/tests/functional/plugin/shared/src/behavior/set_blob_of_kind.cpp b/inference-engine/tests/functional/plugin/shared/src/behavior/set_blob_of_kind.cpp index ae71b88d57d3c1..962b1fab7b5f72 100644 --- a/inference-engine/tests/functional/plugin/shared/src/behavior/set_blob_of_kind.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/behavior/set_blob_of_kind.cpp @@ -4,8 +4,7 @@ #include "behavior/set_blob_of_kind.hpp" -#include -#include +#include #include diff --git a/inference-engine/tests/functional/plugin/shared/src/execution_graph_tests/num_inputs_fusing_bin_conv.cpp b/inference-engine/tests/functional/plugin/shared/src/execution_graph_tests/num_inputs_fusing_bin_conv.cpp index 7712951b17ae89..2386107c9bab2d 100644 --- a/inference-engine/tests/functional/plugin/shared/src/execution_graph_tests/num_inputs_fusing_bin_conv.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/execution_graph_tests/num_inputs_fusing_bin_conv.cpp @@ -11,7 +11,7 @@ #include #include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "common_test_utils/common_utils.hpp" #include "functional_test_utils/skip_tests_config.hpp" diff --git a/inference-engine/tests/functional/plugin/shared/src/execution_graph_tests/unique_node_names.cpp b/inference-engine/tests/functional/plugin/shared/src/execution_graph_tests/unique_node_names.cpp index e3e78804e8358e..26425abbb0c3b1 100644 --- a/inference-engine/tests/functional/plugin/shared/src/execution_graph_tests/unique_node_names.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/execution_graph_tests/unique_node_names.cpp @@ -16,7 +16,7 @@ #include "common_test_utils/common_utils.hpp" #include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "functional_test_utils/blob_utils.hpp" #include "functional_test_utils/skip_tests_config.hpp" diff --git a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/convolution_transformation.cpp b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/convolution_transformation.cpp index 179e9fed3bc01c..96aca0b33095a9 100755 --- a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/convolution_transformation.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/convolution_transformation.cpp @@ -13,7 +13,7 @@ #include "common_test_utils/common_utils.hpp" #include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "functional_test_utils/blob_utils.hpp" #include "ngraph_functions/pass/convert_prc.hpp" #include "lpt_ngraph_functions/fake_quantize_and_convolution_function.hpp" diff --git a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/convolution_with_incorrect_weights.cpp b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/convolution_with_incorrect_weights.cpp index 2033bf35907166..29aee459c01968 100644 --- a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/convolution_with_incorrect_weights.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/convolution_with_incorrect_weights.cpp @@ -13,7 +13,7 @@ #include "common_test_utils/common_utils.hpp" #include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "functional_test_utils/blob_utils.hpp" #include "ngraph_functions/pass/convert_prc.hpp" #include "lpt_ngraph_functions/convolution_function.hpp" diff --git a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/depth_to_space_transformation.cpp b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/depth_to_space_transformation.cpp index 11450115159b93..ac4575e284a64b 100644 --- a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/depth_to_space_transformation.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/depth_to_space_transformation.cpp @@ -12,7 +12,7 @@ #include "common_test_utils/common_utils.hpp" #include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "functional_test_utils/blob_utils.hpp" #include "ngraph_functions/pass/convert_prc.hpp" diff --git a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/fake_quantize_and_two_output_branches_with_convolution.cpp b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/fake_quantize_and_two_output_branches_with_convolution.cpp index 1b790d5f9319e4..d82c34d4a1f1a6 100644 --- a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/fake_quantize_and_two_output_branches_with_convolution.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/fake_quantize_and_two_output_branches_with_convolution.cpp @@ -13,7 +13,7 @@ #include "common_test_utils/common_utils.hpp" #include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "functional_test_utils/blob_utils.hpp" #include "ngraph_functions/pass/convert_prc.hpp" diff --git a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/fully_connected_transformation.cpp b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/fully_connected_transformation.cpp index d638da1fa42833..d84f563afca7cc 100644 --- a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/fully_connected_transformation.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/fully_connected_transformation.cpp @@ -13,7 +13,7 @@ #include "common_test_utils/common_utils.hpp" #include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "functional_test_utils/blob_utils.hpp" #include "ngraph_functions/pass/convert_prc.hpp" #include "ngraph_functions/builders.hpp" diff --git a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/fuse_convert_transformation.cpp b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/fuse_convert_transformation.cpp index a1c27a0927a508..5d8228f975cc10 100644 --- a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/fuse_convert_transformation.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/fuse_convert_transformation.cpp @@ -13,7 +13,7 @@ #include "common_test_utils/common_utils.hpp" #include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "functional_test_utils/blob_utils.hpp" #include "ngraph_functions/pass/convert_prc.hpp" diff --git a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/gemm_transformation.cpp b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/gemm_transformation.cpp index cde5e4b29bcccf..6987280fba9498 100644 --- a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/gemm_transformation.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/gemm_transformation.cpp @@ -13,7 +13,7 @@ #include "common_test_utils/common_utils.hpp" #include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "functional_test_utils/blob_utils.hpp" #include "ngraph_functions/pass/convert_prc.hpp" #include "ngraph_functions/builders.hpp" diff --git a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/group_convolution_transformation.cpp b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/group_convolution_transformation.cpp index e72372bf7db023..7451e65ad8cdca 100644 --- a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/group_convolution_transformation.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/group_convolution_transformation.cpp @@ -13,7 +13,7 @@ #include "common_test_utils/common_utils.hpp" #include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "functional_test_utils/blob_utils.hpp" #include "ngraph_functions/pass/convert_prc.hpp" #include "lpt_ngraph_functions/group_convolution_function.hpp" diff --git a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/mat_mul_with_optimized_constant_fake_quantize_transformation.cpp b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/mat_mul_with_optimized_constant_fake_quantize_transformation.cpp index 3fa6915790ae6d..12ec61335eefe8 100644 --- a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/mat_mul_with_optimized_constant_fake_quantize_transformation.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/mat_mul_with_optimized_constant_fake_quantize_transformation.cpp @@ -13,7 +13,7 @@ #include "common_test_utils/common_utils.hpp" #include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "functional_test_utils/blob_utils.hpp" #include "ngraph_functions/pass/convert_prc.hpp" #include "lpt_ngraph_functions/mat_mul_with_optimized_constant_fake_quantize_function.hpp" diff --git a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/multiply_to_group_convolution_transformation.cpp b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/multiply_to_group_convolution_transformation.cpp index 4135a983f4be9c..4c306189ef18d4 100644 --- a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/multiply_to_group_convolution_transformation.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/multiply_to_group_convolution_transformation.cpp @@ -13,7 +13,7 @@ #include "common_test_utils/common_utils.hpp" #include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "functional_test_utils/blob_utils.hpp" #include "ngraph_functions/pass/convert_prc.hpp" diff --git a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/mvn_transformation.cpp b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/mvn_transformation.cpp index 5c66a7f500591d..e8a80f7c7a93c5 100644 --- a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/mvn_transformation.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/mvn_transformation.cpp @@ -13,7 +13,7 @@ #include "common_test_utils/common_utils.hpp" #include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "functional_test_utils/blob_utils.hpp" #include "ngraph_functions/pass/convert_prc.hpp" diff --git a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/normalize_transformation.cpp b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/normalize_transformation.cpp index 1205657e466436..edaaf823bbc041 100644 --- a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/normalize_transformation.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/normalize_transformation.cpp @@ -13,7 +13,7 @@ #include "common_test_utils/common_utils.hpp" #include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "functional_test_utils/blob_utils.hpp" #include "ngraph_functions/pass/convert_prc.hpp" diff --git a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/output_layers_handling_in_transformations.cpp b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/output_layers_handling_in_transformations.cpp index 4b7054a51d9012..c939167450a592 100644 --- a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/output_layers_handling_in_transformations.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/output_layers_handling_in_transformations.cpp @@ -13,7 +13,7 @@ #include "common_test_utils/common_utils.hpp" #include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "functional_test_utils/blob_utils.hpp" #include "ngraph_functions/pass/convert_prc.hpp" diff --git a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/output_layers_handling_in_transformations_for_concat.cpp b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/output_layers_handling_in_transformations_for_concat.cpp index bfd17a6a00ca59..fae2f8fdaa17e0 100644 --- a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/output_layers_handling_in_transformations_for_concat.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/output_layers_handling_in_transformations_for_concat.cpp @@ -13,7 +13,7 @@ #include "common_test_utils/common_utils.hpp" #include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "functional_test_utils/blob_utils.hpp" #include "ngraph_functions/pass/convert_prc.hpp" diff --git a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/output_layers_handling_in_transformations_for_concat_multi_channel.cpp b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/output_layers_handling_in_transformations_for_concat_multi_channel.cpp index 9bc98c63ae47f2..ab28134d34bbc4 100644 --- a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/output_layers_handling_in_transformations_for_concat_multi_channel.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/output_layers_handling_in_transformations_for_concat_multi_channel.cpp @@ -13,7 +13,7 @@ #include "common_test_utils/common_utils.hpp" #include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "functional_test_utils/blob_utils.hpp" #include "ngraph_functions/pass/convert_prc.hpp" diff --git a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/transpose_after_matmul_transformation.cpp b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/transpose_after_matmul_transformation.cpp index feb2ca112a09e2..24a3b2fea883c6 100644 --- a/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/transpose_after_matmul_transformation.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/low_precision_transformations/transpose_after_matmul_transformation.cpp @@ -13,7 +13,7 @@ #include "common_test_utils/common_utils.hpp" #include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include "functional_test_utils/blob_utils.hpp" #include "ngraph_functions/pass/convert_prc.hpp" #include "ngraph_functions/builders.hpp" diff --git a/inference-engine/tests/functional/plugin/shared/src/main.cpp b/inference-engine/tests/functional/plugin/shared/src/main.cpp index e47d603a084692..1b3728c518c205 100644 --- a/inference-engine/tests/functional/plugin/shared/src/main.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/main.cpp @@ -4,7 +4,7 @@ #include "gtest/gtest.h" -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" int main(int argc, char* argv[]) { FuncTestUtils::SkipTestsConfig::disable_tests_skipping = false; diff --git a/inference-engine/tests/functional/shared_test_classes/CMakeLists.txt b/inference-engine/tests/functional/shared_test_classes/CMakeLists.txt new file mode 100644 index 00000000000000..b0a95b09709e18 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/CMakeLists.txt @@ -0,0 +1,33 @@ +# Copyright (C) 2020 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 +# + +set(TARGET_NAME sharedTestClasses) + +list(APPEND EXPORT_DEPENDENCIES + funcTestUtils + ngraphFunctions + ) + +addIeTarget( + NAME ${TARGET_NAME} + TYPE STATIC + ROOT "${CMAKE_CURRENT_SOURCE_DIR}/include" + ADD_CPPLINT + DEVELOPER_PACKAGE + INCLUDES + PUBLIC + "${CMAKE_CURRENT_SOURCE_DIR}/include" + ADDITIONAL_SOURCE_DIRS + ${CMAKE_CURRENT_SOURCE_DIR}/src + LINK_LIBRARIES + PRIVATE + ${EXPORT_DEPENDENCIES} + EXPORT_DEPENDENCIES + ${EXPORT_DEPENDENCIES} +) + +ie_faster_build(${TARGET_NAME} + PCH PRIVATE "src/precomp.hpp" + ) + diff --git a/inference-engine/tests/ie_test_utils/functional_test_utils/layer_test_utils.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/base/layer_test_utils.hpp similarity index 97% rename from inference-engine/tests/ie_test_utils/functional_test_utils/layer_test_utils.hpp rename to inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/base/layer_test_utils.hpp index 20c326a4b7e496..a1f47a367c7a41 100644 --- a/inference-engine/tests/ie_test_utils/functional_test_utils/layer_test_utils.hpp +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/base/layer_test_utils.hpp @@ -17,6 +17,7 @@ #include #include +#include "common_test_utils/ngraph_test_utils.hpp" #include "common_test_utils/common_utils.hpp" #include "common_test_utils/test_common.hpp" @@ -136,6 +137,8 @@ class LayerTestsCommon : public CommonTestUtils::TestsCommon { virtual void Run(); + virtual void Serialize(); + virtual void Compare(const std::vector> &expectedOutputs, const std::vector &actualOutputs); @@ -210,6 +213,8 @@ class LayerTestsCommon : public CommonTestUtils::TestsCommon { private: RefMode refMode = RefMode::INTERPRETER; + static std::string GetTimestamp(); + const std::string GetTestName(); }; } // namespace LayerTestsUtils diff --git a/inference-engine/tests/ie_test_utils/functional_test_utils/low_precision_transformations/layer_transformation.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/base/low_precision_transformations/layer_transformation.hpp similarity index 97% rename from inference-engine/tests/ie_test_utils/functional_test_utils/low_precision_transformations/layer_transformation.hpp rename to inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/base/low_precision_transformations/layer_transformation.hpp index 97a0d3b3e9951f..904cac83563175 100644 --- a/inference-engine/tests/ie_test_utils/functional_test_utils/low_precision_transformations/layer_transformation.hpp +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/base/low_precision_transformations/layer_transformation.hpp @@ -10,7 +10,7 @@ #include -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" #include namespace LayerTestsUtils { diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/activation.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/activation.hpp new file mode 100644 index 00000000000000..1552ca270fe0bb --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/activation.hpp @@ -0,0 +1,114 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "ie_core.hpp" +#include "ie_precision.hpp" +#include "details/ie_exception.hpp" + +#include "ngraph/opsets/opset1.hpp" + +#include "functional_test_utils/blob_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "common_test_utils/common_utils.hpp" + +#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "ngraph_functions/builders.hpp" + +namespace LayerTestsDefinitions { + +static std::map activationNames = { + {ngraph::helpers::ActivationTypes::Sigmoid, "Sigmoid"}, + {ngraph::helpers::ActivationTypes::Tanh, "Tanh"}, + {ngraph::helpers::ActivationTypes::Relu, "Relu"}, + {ngraph::helpers::ActivationTypes::LeakyRelu, "LeakyRelu"}, + {ngraph::helpers::ActivationTypes::Exp, "Exp"}, + {ngraph::helpers::ActivationTypes::Log, "Log"}, + {ngraph::helpers::ActivationTypes::Sign, "Sign"}, + {ngraph::helpers::ActivationTypes::Abs, "Abs"}, + {ngraph::helpers::ActivationTypes::Gelu, "Gelu"}, + {ngraph::helpers::ActivationTypes::Clamp, "Clamp"}, + {ngraph::helpers::ActivationTypes::Negative, "Negative"}, + {ngraph::helpers::ActivationTypes::Acos, "Acos"}, + {ngraph::helpers::ActivationTypes::Asin, "Asin"}, + {ngraph::helpers::ActivationTypes::Atan, "Atan"}, + {ngraph::helpers::ActivationTypes::Cos, "Cos"}, + {ngraph::helpers::ActivationTypes::Cosh, "Cosh"}, + {ngraph::helpers::ActivationTypes::Floor, "Floor"}, + {ngraph::helpers::ActivationTypes::Sin, "Sin"}, + {ngraph::helpers::ActivationTypes::Sinh, "Sinh"}, + {ngraph::helpers::ActivationTypes::Sqrt, "Sqrt"}, + {ngraph::helpers::ActivationTypes::Tan, "Tan"}, + {ngraph::helpers::ActivationTypes::Elu, "Elu"}, + {ngraph::helpers::ActivationTypes::Erf, "Erf"}, + {ngraph::helpers::ActivationTypes::HardSigmoid, "HardSigmoid"}, + {ngraph::helpers::ActivationTypes::Selu, "Selu"}, + {ngraph::helpers::ActivationTypes::Sigmoid, "Sigmoid"}, + {ngraph::helpers::ActivationTypes::Tanh, "Tanh"}, + {ngraph::helpers::ActivationTypes::Relu, "Relu"}, + {ngraph::helpers::ActivationTypes::LeakyRelu, "LeakyRelu"}, + {ngraph::helpers::ActivationTypes::Exp, "Exp"}, + {ngraph::helpers::ActivationTypes::Log, "Log"}, + {ngraph::helpers::ActivationTypes::Sign, "Sign"}, + {ngraph::helpers::ActivationTypes::Abs, "Abs"}, + {ngraph::helpers::ActivationTypes::Gelu, "Gelu"}, + {ngraph::helpers::ActivationTypes::Ceiling, "Ceiling"}, + {ngraph::helpers::ActivationTypes::PReLu, "PReLu"}, + {ngraph::helpers::ActivationTypes::Mish, "Mish"}, + {ngraph::helpers::ActivationTypes::HSwish, "HSwish"}, + {ngraph::helpers::ActivationTypes::SoftPlus, "SoftPlus"}, + {ngraph::helpers::ActivationTypes::Swish, "Swish"}, + {ngraph::helpers::ActivationTypes::HSigmoid, "HSigmoid"}, + {ngraph::helpers::ActivationTypes::RoundHalfToEven, "RoundHalfToEven"}, + {ngraph::helpers::ActivationTypes::RoundHalfAwayFromZero, "RoundHalfAwayFromZero"} +}; + +typedef std::tuple< + std::pair>, // Activation type and constant value + InferenceEngine::Precision, + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + InferenceEngine::Layout, // Output layout + std::pair, std::vector>, + std::string> activationParams; + +class ActivationLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + ngraph::helpers::ActivationTypes activationType; + static std::string getTestCaseName(const testing::TestParamInfo &obj); + InferenceEngine::Blob::Ptr GenerateInput(const InferenceEngine::InputInfo &info) const override; + +protected: + void SetUp() override; +}; + +class ActivationParamLayerTest : public ActivationLayerTest { +public: + void Infer() override; + +protected: + void SetUp() override; + +private: + void generateActivationBlob(std::vector constantsValue); + ngraph::ParameterVector createActivationParams( + ngraph::element::Type ngPrc, std::vector inShape = {}); + +private: + std::vector constantsValue; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/batch_norm.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/batch_norm.hpp new file mode 100644 index 00000000000000..f2e883293ed7ec --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/batch_norm.hpp @@ -0,0 +1,33 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" + +namespace LayerTestsDefinitions { +typedef std::tuple< + double, // epsilon + InferenceEngine::Precision, // Net precision + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + InferenceEngine::Layout, // Output layout + InferenceEngine::SizeVector, // Input shapes + LayerTestsUtils::TargetDevice // Target device name +> BatchNormLayerTestParams; + +class BatchNormLayerTest : public testing::WithParamInterface, + public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo& obj); + + InferenceEngine::Blob::Ptr GenerateInput(const InferenceEngine::InputInfo &info) const override; + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/batch_to_space.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/batch_to_space.hpp new file mode 100644 index 00000000000000..6a47951ff2d2f6 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/batch_to_space.hpp @@ -0,0 +1,37 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" + +namespace LayerTestsDefinitions { + +using batchToSpaceParamsTuple = typename std::tuple< + std::vector, // block shape + std::vector, // crops begin + std::vector, // crops end + std::vector, // Input shapes + InferenceEngine::Precision, // Network precision + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + InferenceEngine::Layout, // Output layout + std::string>; // Device name>; + +class BatchToSpaceLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/broadcast.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/broadcast.hpp new file mode 100644 index 00000000000000..7e59367a892883 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/broadcast.hpp @@ -0,0 +1,35 @@ +// Copyright (C) 2019 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace LayerTestsDefinitions { + +using BroadcastParamsTuple = typename std::tuple< + InferenceEngine::SizeVector, // target shape + ngraph::AxisSet, // axes mapping + ngraph::op::BroadcastType, // broadcast mode + InferenceEngine::SizeVector, // Input shape + InferenceEngine::Precision, // Network precision + std::string>; // Device name + +class BroadcastLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/comparison.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/comparison.hpp new file mode 100644 index 00000000000000..5a576d938b1a0c --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/comparison.hpp @@ -0,0 +1,41 @@ +// Copyright (C) 2020 Intel Corporation +// +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include + +#include +#include + +#include "common_test_utils/common_utils.hpp" +#include "common_test_utils/test_common.hpp" +#include "common_test_utils/test_constants.hpp" +#include "ie_core.hpp" + +namespace LayerTestsDefinitions { +namespace ComparisonParams { +using InputShapesTuple = std::pair, std::vector>; +} // ComparisonParams + +typedef std::tuple< + ComparisonParams::InputShapesTuple, // Input shapes tuple + InferenceEngine::Precision, // NG Inputs precision + ngraph::helpers::ComparisonTypes, // Comparison op type + ngraph::helpers::InputLayerType, // Second input type + InferenceEngine::Precision, // IE in precision + InferenceEngine::Precision, // IE out precision + std::string, // Device name + std::map // Additional network configuration +> ComparisonTestParams; + +class ComparisonLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +protected: + void SetUp() override; + +public: + static std::string getTestCaseName(testing::TestParamInfo obj); +}; +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/concat.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/concat.hpp new file mode 100644 index 00000000000000..09c38be111de96 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/concat.hpp @@ -0,0 +1,39 @@ +// Copyright (C) 2019 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace LayerTestsDefinitions { + +using concatParamsTuple = typename std::tuple< + //TODO: according to specification axis have to be int, negative values are allowed + size_t, // Concat axis + std::vector>, // Input shapes + InferenceEngine::Precision, // Network precision + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + InferenceEngine::Layout, // Output layout + std::string>; // Device name + +// Multichannel +class ConcatLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/convert.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/convert.hpp new file mode 100644 index 00000000000000..e009cd0a95c2a4 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/convert.hpp @@ -0,0 +1,35 @@ +// Copyright (C) 2019 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace LayerTestsDefinitions { + +using ConvertParamsTuple = typename std::tuple< + std::vector>, // Input shapes + InferenceEngine::Precision, // Source precision + InferenceEngine::Precision, // Target precision + InferenceEngine::Layout, // Input layout + InferenceEngine::Layout, // Output layout + std::string>; // Device name + +class ConvertLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/convert_like.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/convert_like.hpp new file mode 100644 index 00000000000000..caa715768663e2 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/convert_like.hpp @@ -0,0 +1,36 @@ +// Copyright (C) 2019 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace LayerTestsDefinitions { + +using ConvertLikeParamsTuple = typename std::tuple< + std::vector>, // Input1 shapes + InferenceEngine::Precision, // Input1 precision + std::vector>, // Input2 shapes + InferenceEngine::Precision, // Input2 precision + InferenceEngine::Layout, // Input layout + InferenceEngine::Layout, // Output layout + std::string>; // Device name + +class ConvertLikeLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/convolution.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/convolution.hpp new file mode 100644 index 00000000000000..2a721ac1bb67de --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/convolution.hpp @@ -0,0 +1,49 @@ +// Copyright (C) 2019 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace LayerTestsDefinitions { + +// ! [test_convolution:definition] +typedef std::tuple< + InferenceEngine::SizeVector, // Kernel size + InferenceEngine::SizeVector, // Strides + std::vector, // Pad begin + std::vector, // Pad end + InferenceEngine::SizeVector, // Dilation + size_t, // Num out channels + ngraph::op::PadType // Padding type +> convSpecificParams; +typedef std::tuple< + convSpecificParams, + InferenceEngine::Precision, // Net precision + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + InferenceEngine::Layout, // Output layout + InferenceEngine::SizeVector, // Input shapes + LayerTestsUtils::TargetDevice // Device name +> convLayerTestParamsSet; + +class ConvolutionLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; +// ! [test_convolution:definition] + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/convolution_backprop_data.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/convolution_backprop_data.hpp new file mode 100644 index 00000000000000..f15c2d080cc423 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/convolution_backprop_data.hpp @@ -0,0 +1,48 @@ +// namespace LayerTestsDefinitions +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace LayerTestsDefinitions { + +typedef std::tuple< + InferenceEngine::SizeVector, // Kernel size + InferenceEngine::SizeVector, // Strides + std::vector, // Pad begin + std::vector, // Pad end + InferenceEngine::SizeVector, // Dilation + size_t, // Num out channels + ngraph::op::PadType // Padding type +> convBackpropDataSpecificParams; +typedef std::tuple< + convBackpropDataSpecificParams, + InferenceEngine::Precision, // Net precision + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + InferenceEngine::Layout, // Output layout + InferenceEngine::SizeVector, // Input shapes + LayerTestsUtils::TargetDevice // Device name +> convBackpropDataLayerTestParamsSet; + +class ConvolutionBackpropDataLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/ctc_greedy_decoder.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/ctc_greedy_decoder.hpp new file mode 100644 index 00000000000000..5824f6b69d0a7a --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/ctc_greedy_decoder.hpp @@ -0,0 +1,56 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include + + +#include "ie_core.hpp" +#include "ie_precision.hpp" +#include "details/ie_exception.hpp" + +#include "ngraph/opsets/opset1.hpp" + +#include "functional_test_utils/blob_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "common_test_utils/common_utils.hpp" + +#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "ngraph_functions/builders.hpp" + + +namespace LayerTestsDefinitions { +typedef std::tuple< + InferenceEngine::Precision, + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + InferenceEngine::Layout, // Output layout + InferenceEngine::SizeVector, + bool, + std::string> ctcGreedyDecoderParams; + +class CTCGreedyDecoderLayerTest + : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo& obj); + +protected: + InferenceEngine::SizeVector inputShapes; + InferenceEngine::SizeVector sequenceLengths; + bool mergeRepeated; + + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/ctc_loss.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/ctc_loss.hpp new file mode 100644 index 00000000000000..6c6c0a70fab10d --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/ctc_loss.hpp @@ -0,0 +1,42 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" + +namespace LayerTestsDefinitions { + +typedef std::tuple< + std::vector, // Logits shapes + std::vector, // logits lenght + std::vector>, // labels + std::vector, // labels length + int, // blank index + bool, // preprocessCollapseRepeated + bool, // ctcMergeRepeated + bool // Unique +> CTCLossParamsSubset; + +typedef std::tuple< + CTCLossParamsSubset, + InferenceEngine::Precision, // Float point precision + InferenceEngine::Precision, // Integer precision + LayerTestsUtils::TargetDevice // Device name +> CTCLossParams; + +class CTCLossLayerTest : public testing::WithParamInterface, + public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/cum_sum.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/cum_sum.hpp new file mode 100644 index 00000000000000..212a291fc0140f --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/cum_sum.hpp @@ -0,0 +1,31 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" + +namespace LayerTestsDefinitions { + +typedef std::tuple< + InferenceEngine::SizeVector, // Input shapes + InferenceEngine::Precision, // Input precision + int64_t, // Axis + bool, // Exclusive + bool, // Reverse + std::string> cumSumParams; // Device name + +class CumSumLayerTest : public testing::WithParamInterface, virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/depth_to_space.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/depth_to_space.hpp new file mode 100644 index 00000000000000..8cd29a1c394345 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/depth_to_space.hpp @@ -0,0 +1,32 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" + +namespace LayerTestsDefinitions { + +using depthToSpaceParamsTuple = typename std::tuple< + std::vector, // Input shape + InferenceEngine::Precision, // Input precision + ngraph::opset3::DepthToSpace::DepthToSpaceMode, // Mode + std::size_t, // Block size + std::string>; // Device name> + +class DepthToSpaceLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/detection_output.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/detection_output.hpp new file mode 100644 index 00000000000000..82a56f7d5ca92c --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/detection_output.hpp @@ -0,0 +1,71 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "ngraph/op/detection_output.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" + +namespace LayerTestsDefinitions { + +enum { + idxLocation, + idxConfidence, + idxPriors, + idxArmConfidence, + idxArmLocation, + numInputs +}; + +using DetectionOutputAttributes = std::tuple< + int, // numClasses + int, // backgroundLabelId + int, // topK + std::vector, // keepTopK + std::string, // codeType + float, // nmsThreshold + float, // confidenceThreshold + bool, // clip_afterNms + bool, // clip_beforeNms + bool // decreaseLabelId +>; + +using ParamsWhichSizeDepends = std::tuple< + bool, // varianceEncodedInTarget + bool, // shareLocation + bool, // normalized + size_t, // inputHeight + size_t, // inputWidth + InferenceEngine::SizeVector, // "Location" input + InferenceEngine::SizeVector, // "Confidence" input + InferenceEngine::SizeVector, // "Priors" input + InferenceEngine::SizeVector, // "ArmConfidence" input + InferenceEngine::SizeVector // "ArmLocation" input +>; + +using DetectionOutputParams = std::tuple< + DetectionOutputAttributes, + ParamsWhichSizeDepends, + size_t, // Number of batch + float, // objectnessScore + std::string // Device name +>; + +class DetectionOutputLayerTest : public testing::WithParamInterface, virtual public LayerTestsUtils::LayerTestsCommon { + public: + static std::string getTestCaseName(testing::TestParamInfo obj); + ngraph::op::DetectionOutputAttrs attrs; + std::vector inShapes; + void Infer() override; + void Compare(const std::vector &expected, const InferenceEngine::Blob::Ptr &actual) override; + protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/eltwise.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/eltwise.hpp new file mode 100644 index 00000000000000..4bb3fc324c4c0e --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/eltwise.hpp @@ -0,0 +1,42 @@ +// Copyright (C) 2020 Intel Corporation +// +// SPDX-License-Identifier: Apache-2.0 +// +// NOTE: WILL BE REWORKED (31905) + +#include + +#include +#include + +#include "common_test_utils/common_utils.hpp" +#include "common_test_utils/test_common.hpp" +#include "common_test_utils/test_constants.hpp" +#include "common_test_utils/common_layers_params.hpp" +#include "ie_core.hpp" + +namespace LayerTestsDefinitions { + +typedef std::tuple< + std::vector>, // input shapes + ngraph::helpers::EltwiseTypes, // eltwise op type + ngraph::helpers::InputLayerType, // secondary input type + CommonTestUtils::OpType, // op type + InferenceEngine::Precision, // Net precision + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + std::string, // Device name + std::map // Additional network configuration +> EltwiseTestParams; + +class EltwiseLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +protected: + InferenceEngine::Blob::Ptr GenerateInput(const InferenceEngine::InputInfo &info) const override; + void SetUp() override; + +public: + static std::string getTestCaseName(testing::TestParamInfo obj); +}; +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/embedding_bag_offsets_sum.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/embedding_bag_offsets_sum.hpp new file mode 100644 index 00000000000000..49f298ebb5a5e9 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/embedding_bag_offsets_sum.hpp @@ -0,0 +1,39 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" + +namespace LayerTestsDefinitions { + +typedef std::tuple< + std::vector, // emb_table_shape + std::vector, // indices + std::vector, // offsets + size_t, // default_index + bool, // with_weights + bool // with_def_index +> embeddingBagOffsetsSumParams; + +typedef std::tuple< + embeddingBagOffsetsSumParams, + InferenceEngine::Precision, // embedding table + InferenceEngine::Precision, // indices + LayerTestsUtils::TargetDevice> embeddingBagOffsetsSumLayerTestParamsSet; + +class EmbeddingBagOffsetsSumLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/embedding_bag_packed_sum.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/embedding_bag_packed_sum.hpp new file mode 100644 index 00000000000000..157768c931d77a --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/embedding_bag_packed_sum.hpp @@ -0,0 +1,37 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" + +namespace LayerTestsDefinitions { + +typedef std::tuple< + std::vector, // emb_table_shape + std::vector>, // indices + bool // with_weights +> embeddingBagPackedSumParams; + +typedef std::tuple< + embeddingBagPackedSumParams, + InferenceEngine::Precision, // embedding table + InferenceEngine::Precision, // indices + LayerTestsUtils::TargetDevice> embeddingBagPackedSumLayerTestParamsSet; + + +class EmbeddingBagPackedSumLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/embedding_segments_sum.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/embedding_segments_sum.hpp new file mode 100644 index 00000000000000..3744a87c79f2b3 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/embedding_segments_sum.hpp @@ -0,0 +1,40 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" + +namespace LayerTestsDefinitions { + +typedef std::tuple< + std::vector, // emb_table_shape + std::vector, // indices + std::vector, // segment_ids + size_t, // num_segments + size_t, // default_index + bool, // with_weights + bool // with_def_index +> embeddingSegmentsSumParams; + +typedef std::tuple< + embeddingSegmentsSumParams, + InferenceEngine::Precision, // embedding table + InferenceEngine::Precision, // indices + LayerTestsUtils::TargetDevice> embeddingSegmentsSumLayerTestParamsSet; + +class EmbeddingSegmentsSumLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/extract_image_patches.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/extract_image_patches.hpp new file mode 100644 index 00000000000000..2be311afcf40ab --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/extract_image_patches.hpp @@ -0,0 +1,37 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" + +namespace LayerTestsDefinitions { + +using extractImagePatchesTuple = typename std::tuple< + std::vector, // input shape + std::vector, // kernel size + std::vector, // strides + std::vector, // rates + ngraph::op::PadType, // pad type + InferenceEngine::Precision, // Network precision + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + LayerTestsUtils::TargetDevice>; // Device name + +class ExtractImagePatchesTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/fake_quantize.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/fake_quantize.hpp new file mode 100644 index 00000000000000..cbaee3ddafd164 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/fake_quantize.hpp @@ -0,0 +1,64 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +// seed selected using current cloc time +#define USE_CLOCK_TIME 1 +// seed started from default value, and incremented every time using big number like 9999 +#define USE_INCREMENTAL_SEED 2 + +/** + * redefine this seed to reproduce issue with given seed that can be read from gtest logs + */ +#define BASE_SEED 123 +#define NGRAPH_SEED 123 + +namespace LayerTestsDefinitions { + +typedef std::tuple< + size_t, // levels + std::vector, // const inputs shape + std::vector, // fake quantize inputLow, inputHigh, outputLow, outputHigh or empty for random + std::vector // input generator data: low, high, resolution +> fqSpecificParams; +typedef std::tuple< + fqSpecificParams, + InferenceEngine::Precision, // Net precision + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + InferenceEngine::Layout, // Output layout + InferenceEngine::SizeVector, // Input shapes + LayerTestsUtils::TargetDevice, // Device name + + std::pair> // Additional backend configuration and alis name to it +> fqLayerTestParamsSet; + +class FakeQuantizeLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + InferenceEngine::Blob::Ptr GenerateInput(const InferenceEngine::InputInfo &info) const override; +protected: + void SetUp() override; + void UpdateSeed(); + + protected: + float inputDataMin = 0.0; + float inputDataMax = 10.0; + float inputDataResolution = 1.0; + int32_t seed = 1; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/gather.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/gather.hpp new file mode 100644 index 00000000000000..64b9ea0d25bef1 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/gather.hpp @@ -0,0 +1,44 @@ +// Copyright (C) 2019 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace LayerTestsDefinitions { + +typedef std::tuple< + std::vector, // Indices + std::vector, // Indices shape + int, // Gather axis + std::vector, // Input shapes + InferenceEngine::Precision, // Network precision + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + InferenceEngine::Layout, // Output layout + std::string // Device name +> gatherParamsTuple; + +class GatherLayerTestBase : virtual public LayerTestsUtils::LayerTestsCommon { +protected: + void SetUp(const gatherParamsTuple& params); +}; + +class GatherLayerTest : public testing::WithParamInterface, public GatherLayerTestBase { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/gather_nd.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/gather_nd.hpp new file mode 100644 index 00000000000000..437d71feee71de --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/gather_nd.hpp @@ -0,0 +1,39 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" + +namespace LayerTestsDefinitions { +using Config = std::map; + +typedef std::tuple< + std::vector, // Data shapes + std::vector, // Indices shape + int // batch dims +> GatherNDParamsSubset; + +typedef std::tuple< + GatherNDParamsSubset, + InferenceEngine::Precision, // Data precision + InferenceEngine::Precision, // Indices precision + LayerTestsUtils::TargetDevice, // Device name + Config // Plugin config +> GatherNDParams; + +class GatherNDLayerTest : public testing::WithParamInterface, + public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/gather_tree.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/gather_tree.hpp new file mode 100644 index 00000000000000..9839cedf2b09c9 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/gather_tree.hpp @@ -0,0 +1,38 @@ +// Copyright (C) 2019 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace LayerTestsDefinitions { + +using GatherTreeParamsTuple = typename std::tuple< + std::vector, // Input tensors shape + ngraph::helpers::InputLayerType, // Secondary input type + InferenceEngine::Precision, // Network precision + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + InferenceEngine::Layout, // Output layout + std::string>; // Device name + +class GatherTreeLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + InferenceEngine::Blob::Ptr GenerateInput(const InferenceEngine::InputInfo &info) const override; + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/grn.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/grn.hpp new file mode 100644 index 00000000000000..8aebddcf9df3a4 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/grn.hpp @@ -0,0 +1,55 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include + + +#include "ie_core.hpp" +#include "ie_precision.hpp" +#include "details/ie_exception.hpp" + +#include "ngraph/opsets/opset1.hpp" + +#include "functional_test_utils/blob_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "common_test_utils/common_utils.hpp" + +#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "ngraph_functions/builders.hpp" + + +namespace LayerTestsDefinitions { +typedef std::tuple< + InferenceEngine::Precision, + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + InferenceEngine::Layout, // Output layout + InferenceEngine::SizeVector, + float, + std::string> grnParams; + +class GrnLayerTest + : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon{ +public: + static std::string getTestCaseName(const testing::TestParamInfo& obj); + +protected: + InferenceEngine::SizeVector inputShapes; + float bias; + + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/group_convolution.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/group_convolution.hpp new file mode 100644 index 00000000000000..d17c96c1025305 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/group_convolution.hpp @@ -0,0 +1,45 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace LayerTestsDefinitions { +typedef std::tuple< + InferenceEngine::SizeVector, + InferenceEngine::SizeVector, + std::vector, + std::vector, + InferenceEngine::SizeVector, + size_t, + size_t, + ngraph::op::PadType> groupConvSpecificParams; +typedef std::tuple< + groupConvSpecificParams, + InferenceEngine::Precision, + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + InferenceEngine::Layout, // Output layout + InferenceEngine::SizeVector, + LayerTestsUtils::TargetDevice> groupConvLayerTestParamsSet; + +class GroupConvolutionLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/group_convolution_backprop_data.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/group_convolution_backprop_data.hpp new file mode 100644 index 00000000000000..f2618bb1c400f4 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/group_convolution_backprop_data.hpp @@ -0,0 +1,46 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace LayerTestsDefinitions { + +typedef std::tuple< + InferenceEngine::SizeVector, + InferenceEngine::SizeVector, + std::vector, + std::vector, + InferenceEngine::SizeVector, + size_t, + size_t, + ngraph::op::PadType> groupConvBackpropDataSpecificParams; +typedef std::tuple< + groupConvBackpropDataSpecificParams, + InferenceEngine::Precision, + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + InferenceEngine::Layout, // Output layout + InferenceEngine::SizeVector, + LayerTestsUtils::TargetDevice> groupConvBackpropDataLayerTestParamsSet; + +class GroupConvBackpropDataLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/gru_cell.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/gru_cell.hpp new file mode 100644 index 00000000000000..e28389709f822d --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/gru_cell.hpp @@ -0,0 +1,38 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace LayerTestsDefinitions { + +using GRUCellParams = typename std::tuple< + bool, // using decompose to sub-ops transformation + size_t, // batch + size_t, // hidden size + size_t, // input size + std::vector, // activations + float, // clip + bool, // linear_before_reset + InferenceEngine::Precision, // Network precision + std::string>; // Device name + +class GRUCellTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/gru_sequence.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/gru_sequence.hpp new file mode 100644 index 00000000000000..38cd2ca42549d8 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/gru_sequence.hpp @@ -0,0 +1,46 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include +#include +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace LayerTestsDefinitions { + +using GRUSequenceParams = typename std::tuple< + ngraph::helpers::SequenceTestsMode, // pure Sequence or TensorIterator + size_t, // seq_lengths + size_t, // batch + size_t, // hidden size + // todo: fix. input size hardcoded to 10 due to limitation (10 args) of gtests Combine() func. + //size_t, // input size + std::vector, // activations + float, // clip + bool, // linear_before_reset + ngraph::op::RecurrentSequenceDirection, // direction + InferenceEngine::Precision, // Network precision + std::string>; // Device name + +class GRUSequenceTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + +protected: + void SetUp() override; + void Infer() override; + +private: + ngraph::helpers::SequenceTestsMode m_mode; + int64_t m_max_seq_len = 0; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/interpolate.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/interpolate.hpp new file mode 100644 index 00000000000000..aebb23cd4bb503 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/interpolate.hpp @@ -0,0 +1,53 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" + +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace LayerTestsDefinitions { + +typedef std::tuple< + ngraph::op::v4::Interpolate::InterpolateMode, // InterpolateMode + ngraph::op::v4::Interpolate::ShapeCalcMode, // ShapeCalculationMode + ngraph::op::v4::Interpolate::CoordinateTransformMode, // CoordinateTransformMode + ngraph::op::v4::Interpolate::NearestMode, // NearestMode + bool, // AntiAlias + std::vector, // PadBegin + std::vector, // PadEnd + double, // Cube coef + std::vector, // Axes + std::vector // Scales +> InterpolateSpecificParams; + +typedef std::tuple< + InterpolateSpecificParams, + InferenceEngine::Precision, // Net precision + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + InferenceEngine::Layout, // Output layout + InferenceEngine::SizeVector, // Input shapes + InferenceEngine::SizeVector, // Target shapes + LayerTestsUtils::TargetDevice // Device name +> InterpolateLayerTestParams; + +class InterpolateLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/log_softmax.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/log_softmax.hpp new file mode 100644 index 00000000000000..71780bf6c101e3 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/log_softmax.hpp @@ -0,0 +1,41 @@ +// Copyright (C) 2020 Intel Corporation +// +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace LayerTestsDefinitions { + +using logSoftmaxLayerTestParams = std::tuple< + InferenceEngine::Precision, // netPrecision + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + InferenceEngine::Layout, // Output layout + InferenceEngine::SizeVector, // inputShape + int64_t, // axis + std::string, // targetDevice + std::map // config +>; + +class LogSoftmaxLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/logical.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/logical.hpp new file mode 100644 index 00000000000000..c0864251a684d4 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/logical.hpp @@ -0,0 +1,53 @@ +// Copyright (C) 2020 Intel Corporation +// +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include + +#include +#include + +#include "common_test_utils/common_utils.hpp" +#include "common_test_utils/test_common.hpp" +#include "common_test_utils/test_constants.hpp" +#include "ie_core.hpp" + +namespace LayerTestsDefinitions { +namespace LogicalParams { +using InputShapesTuple = std::pair, std::vector>; +} // LogicalParams + +typedef std::tuple< + LogicalParams::InputShapesTuple, // Input shapes tuple + ngraph::helpers::LogicalTypes, // Logical op type + ngraph::helpers::InputLayerType, // Second input type + InferenceEngine::Precision, // Net precision + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + InferenceEngine::Layout, // Output layout + std::string, // Device name + std::map // Additional network configuration +> LogicalTestParams; + +class LogicalLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +protected: + InferenceEngine::Blob::Ptr GenerateInput(const InferenceEngine::InputInfo &info) const override; + void SetupParams(); + void SetUp() override; + +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + static std::vector combineShapes(const std::map, std::vector>>& inputShapes); + +protected: + LogicalParams::InputShapesTuple inputShapes; + ngraph::helpers::LogicalTypes logicalOpType; + ngraph::helpers::InputLayerType secondInputType; + InferenceEngine::Precision netPrecision; + std::map additional_config; +}; +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/loop.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/loop.hpp new file mode 100644 index 00000000000000..c5b7d9f6cbfb07 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/loop.hpp @@ -0,0 +1,148 @@ +// Copyright (C) 2019 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include +#include +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace LayerTestsDefinitions { +enum LOOP_IN_TYPE { + INVARIANT, + MERGED +}; + +using LoopParams = typename std::tuple< + bool, // ExecuteFirstIteration + bool, // BodyCondition is a constant? + bool, // BodyCondition value, if it is a Const + int64_t, // TripCount, -1 means infinity + std::vector, LOOP_IN_TYPE>>, // inputs + InferenceEngine::Precision, // Network precision + std::string>; // Device name + +class LoopTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + +protected: + void SetUp() override; +}; + + +using StaticShapeLoopParams = typename std::tuple< + bool, + std::tuple< + bool, + int64_t, + int64_t, + int64_t + >, + int64_t, + InferenceEngine::SizeVector, + InferenceEngine::Precision, + std::string + >; + +/** + * Test case with static SHAPE version of loop operation. + * Total iteration count is dynamic. + */ +class StaticShapeLoopTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + InferenceEngine::Blob::Ptr GenerateInput(const InferenceEngine::InputInfo &info) const override; + std::vector> PredefinedRefs(); + +private: + bool static_iter_num; // trip count provided by constant node + bool static_continue_cond; // initial_cond provided by constant node + int64_t max_iter_num; // -1 means infinity loop (expected dynamic exit condition in body) + int64_t dynamic_exit; // -1 means always true + int64_t axis; // -1 means no auto concatenation + int64_t start_value; + InferenceEngine::SizeVector data_shape; + InferenceEngine::Precision data_prc; + + int64_t actual_n_iter(); + +protected: + void SetUp() override; +}; + + +class TrivialLoopTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +protected: + using RefBlobGenerator = std::function; + std::map inputGens, outputGens; + + void CreateSlicedLoop(size_t batch_size, size_t num_iteration, InferenceEngine::Precision iePrc, + InferenceEngine::SizeVector& ieShape); + void CreateSlicedLoopDynCondition(size_t batch_size, size_t num_iteration, InferenceEngine::Precision iePrc, + InferenceEngine::SizeVector& ieShape, size_t trip_count); + InferenceEngine::Blob::Ptr GenerateInput(const InferenceEngine::InputInfo &info) const override { + auto found = inputGens.find(info.name()); + if (found != inputGens.end()) { + return found->second(info.getTensorDesc()); + } + + found = inputGens.find(""); + if (found != inputGens.end()) { + return found->second(info.getTensorDesc()); + } + + return LayerTestsCommon::GenerateInput(info); + } + + std::vector> CalculateRefs() override { + if (outputGens.empty()) + return LayerTestsCommon::CalculateRefs(); + + const auto results = function->get_results(); + const auto outs_info = cnnNetwork.getOutputsInfo(); + const auto num_out_blob = results.size(); + + std::vector> res_collection(num_out_blob); + + for (int i = 0; i < num_out_blob; i++) { + // TODO: name of original NG result doesn't match with outs after conversion. + // Expected : auto name = results[i]->get_friendly_name(); + auto name = results[i]->get_input_node_ptr(0)->get_friendly_name(); + auto data = outs_info.at(name); + IE_ASSERT(data != nullptr); + + RefBlobGenerator generator; + auto found = outputGens.find(name); + if (found != outputGens.end()) { + generator = found->second; + } else { + found = outputGens.find(""); + if (found != outputGens.end()) { + generator = found->second; + } + } + + IE_ASSERT(generator != nullptr) << "Test output generator is not specified"; + auto blob = generator(data->getTensorDesc()); + auto blob_size = blob->byteSize(); + auto blob_ptr = blob->buffer().as(); + + auto &res = res_collection[i]; + res.resize(blob_size); + std::copy(blob_ptr, blob_ptr + blob_size, res.begin()); + } + return res_collection; + } +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/lrn.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/lrn.hpp new file mode 100644 index 00000000000000..40abbedea6e04c --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/lrn.hpp @@ -0,0 +1,43 @@ +// Copyright (C) 2020 Intel Corporation +// +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +#include "shared_test_classes/base/layer_test_utils.hpp" + +namespace LayerTestsDefinitions { + +typedef std::tuple< + double, // Alpha + double, // Beta + double, // Bias + size_t, // Size + std::vector, // Reduction axes + InferenceEngine::Precision, // Network precision + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::SizeVector, // Input shapes + std::string // Device name +> lrnLayerTestParamsSet; + +class LrnLayerTest + : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/lstm_cell.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/lstm_cell.hpp new file mode 100644 index 00000000000000..55c700a862f7af --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/lstm_cell.hpp @@ -0,0 +1,37 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace LayerTestsDefinitions { + +using LSTMCellParams = typename std::tuple< + bool, // using decompose to sub-ops transformation + size_t, // batch + size_t, // hidden size + size_t, // input size + std::vector, // activations + float, // clip + InferenceEngine::Precision, // Network precision + std::string>; // Device name + +class LSTMCellTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/lstm_sequence.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/lstm_sequence.hpp new file mode 100644 index 00000000000000..c141ec070b8211 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/lstm_sequence.hpp @@ -0,0 +1,43 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include +#include +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace LayerTestsDefinitions { + +using LSTMSequenceParams = typename std::tuple< + ngraph::helpers::SequenceTestsMode, // pure Sequence or TensorIterator + size_t, // seq_lengths + size_t, // batch + size_t, // hidden size + size_t, // input size + std::vector, // activations + float, // clip + ngraph::op::RecurrentSequenceDirection, // direction + InferenceEngine::Precision, // Network precision + std::string>; // Device name + +class LSTMSequenceTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); +protected: + void Infer() override; + void SetUp() override; + +private: + ngraph::helpers::SequenceTestsMode m_mode; + int64_t m_max_seq_len = 0; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/mat_mul.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/mat_mul.hpp new file mode 100644 index 00000000000000..d9148b9165fab1 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/mat_mul.hpp @@ -0,0 +1,42 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" + +namespace LayerTestsDefinitions { +struct ShapeRelatedParams { + std::pair input1, input2; +}; + +typedef std::tuple< + ShapeRelatedParams, + InferenceEngine::Precision, // Network precision + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + ngraph::helpers::InputLayerType, // Secondary input type + LayerTestsUtils::TargetDevice, // Device name + std::map // Additional network configuration +> MatMulLayerTestParamsSet; + +class MatMulTest : public testing::WithParamInterface, virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + static std::vector combineShapes(const std::vector>& firstInputShapes, + const std::vector>& secondInputShapes, + bool transposeA, + bool transposeB); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/minimum_maximum.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/minimum_maximum.hpp new file mode 100644 index 00000000000000..c3770155467525 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/minimum_maximum.hpp @@ -0,0 +1,36 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// +#pragma once + +#include +#include +#include +#include +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "common_test_utils/test_constants.hpp" + +namespace LayerTestsDefinitions { + +using MaxMinParamsTuple = typename std::tuple< + std::vector>, // Input shapes + ngraph::helpers::MinMaxOpType, // OperationType + InferenceEngine::Precision, // Network precision + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + InferenceEngine::Layout, // Output layout + ngraph::helpers::InputLayerType, // Secondary input type + std::string>; // Device name + +class MaxMinLayerTest: + public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon{ +public: + static std::string getTestCaseName(const testing::TestParamInfo& obj); +protected: + void SetUp() override; +}; +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/mvn.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/mvn.hpp new file mode 100644 index 00000000000000..ad8372225593f9 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/mvn.hpp @@ -0,0 +1,31 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" + +namespace LayerTestsDefinitions { + +typedef std::tuple< + InferenceEngine::SizeVector, // Input shapes + InferenceEngine::Precision, // Input precision + bool, // Across channels + bool, // Normalize variance + double, // Epsilon + std::string> mvnParams; // Device name + +class MvnLayerTest : public testing::WithParamInterface, virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/non_max_suppression.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/non_max_suppression.hpp new file mode 100644 index 00000000000000..ca7598ea71f7df --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/non_max_suppression.hpp @@ -0,0 +1,47 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" + +namespace LayerTestsDefinitions { + +using InputShapeParams = std::tuple; // Number of classes + +using InputPrecisions = std::tuple; // iou_threshold, score_threshold, soft_nms_sigma precisions + +using NmsParams = std::tuple; // Device name + +class NmsLayerTest : public testing::WithParamInterface, virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + void Infer() override; + void Compare(const std::vector> &expectedOutputs, const std::vector &actualOutputs) override; + +protected: + void SetUp() override; + +private: + size_t numOfSelectedBoxes; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/nonzero.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/nonzero.hpp new file mode 100644 index 00000000000000..dba88a5e8f799a --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/nonzero.hpp @@ -0,0 +1,37 @@ +// Copyright (C) 2020 Intel Corporation +// +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include "shared_test_classes/base/layer_test_utils.hpp" + +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +#include +#include +#include +#include + +namespace LayerTestsDefinitions { + +using ConfigMap = typename std::map; + +using NonZeroLayerTestParamsSet = typename std::tuple< + InferenceEngine::SizeVector, // Input shapes + InferenceEngine::Precision, // Input precision + LayerTestsUtils::TargetDevice, // Device name + ConfigMap>; // Additional network configuration + +class NonZeroLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/normalize_l2.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/normalize_l2.hpp new file mode 100644 index 00000000000000..b7ace7b909c8ad --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/normalize_l2.hpp @@ -0,0 +1,35 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" + +namespace LayerTestsDefinitions { + +using NormalizeL2LayerTestParams = std::tuple< + std::vector, // axes + float, // eps + ngraph::op::EpsMode, // eps_mode + InferenceEngine::SizeVector, // inputShape + InferenceEngine::Precision, // netPrecision + std::string // targetDevice +>; + +class NormalizeL2LayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions + diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/pad.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/pad.hpp new file mode 100644 index 00000000000000..6f5b81892b6316 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/pad.hpp @@ -0,0 +1,38 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" + +namespace LayerTestsDefinitions { +typedef std::tuple< + std::vector, // padsBegin + std::vector, // padsEnd + float, // argPadValue + ngraph::helpers::PadMode, // padMode + InferenceEngine::Precision, // Net precision + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + InferenceEngine::SizeVector, // Input shapes + LayerTestsUtils::TargetDevice // Target device name +> padLayerTestParamsSet; + +class PadLayerTest : public testing::WithParamInterface, + public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/pooling.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/pooling.hpp new file mode 100644 index 00000000000000..85fd53e6fbda30 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/pooling.hpp @@ -0,0 +1,70 @@ +// Copyright (C) 2019-2020 Intel Corporation +// +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +#include "shared_test_classes/base/layer_test_utils.hpp" + +namespace LayerTestsDefinitions { + +typedef std::tuple< + ngraph::helpers::PoolingTypes, // Pooling type, max or avg + std::vector, // Kernel size + std::vector, // Stride + std::vector, // Pad begin + std::vector, // Pad end + ngraph::op::RoundingType, // Rounding type + ngraph::op::PadType, // Pad type + bool // Exclude pad +> poolSpecificParams; +typedef std::tuple< + poolSpecificParams, + InferenceEngine::Precision, // Net precision + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + InferenceEngine::Layout, // Output layout + std::vector, // Input shape + std::string // Device name +> poolLayerTestParamsSet; + +typedef std::tuple< + poolSpecificParams, + InferenceEngine::Precision, // Net precision + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + InferenceEngine::Layout, // Output layout + size_t, // Channel number + std::string // Device name +> globalPoolLayerTestParamsSet; + +class PoolingLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; + +class GlobalPoolingLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/power.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/power.hpp new file mode 100644 index 00000000000000..2394172cd301d6 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/power.hpp @@ -0,0 +1,34 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// +#pragma once + +#include +#include +#include +#include +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "common_test_utils/test_constants.hpp" + +namespace LayerTestsDefinitions { + + using PowerParamsTuple = typename std::tuple< + std::vector>, //input shapes + InferenceEngine::Precision, //Network precision + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + InferenceEngine::Layout, // Output layout + std::string, //Device name + std::vector>; //power + +class PowerLayerTest: + public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon{ +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); +protected: + void SetUp() override; +}; +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/prior_box_clustered.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/prior_box_clustered.hpp new file mode 100644 index 00000000000000..ccba818a65cc3e --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/prior_box_clustered.hpp @@ -0,0 +1,74 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include + + +#include "ie_core.hpp" +#include "ie_precision.hpp" +#include "details/ie_exception.hpp" + +#include "ngraph/opsets/opset1.hpp" + +#include "functional_test_utils/blob_utils.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "common_test_utils/common_utils.hpp" + +#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "ngraph_functions/builders.hpp" + +namespace LayerTestsDefinitions { + +typedef std::tuple< + std::vector, // widths + std::vector, // heights + bool, // clip + float, // step_width + float, // step_height + float, // offset + std::vector> priorBoxClusteredSpecificParams; + +typedef std::tuple< + priorBoxClusteredSpecificParams, + InferenceEngine::Precision, // net precision + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + InferenceEngine::Layout, // Output layout + InferenceEngine::SizeVector, // input shape + InferenceEngine::SizeVector, // image shape + std::string> priorBoxClusteredLayerParams; + +class PriorBoxClusteredLayerTest + : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo& obj); + +protected: + InferenceEngine::SizeVector inputShapes; + InferenceEngine::SizeVector imageShapes; + InferenceEngine::Precision netPrecision; + std::vector widths; + std::vector heights; + std::vector variances; + float step_width; + float step_height; + float offset; + bool clip; + + std::vector> CalculateRefs() override; + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/proposal.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/proposal.hpp new file mode 100644 index 00000000000000..be1f2fa29ee8a9 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/proposal.hpp @@ -0,0 +1,67 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace LayerTestsDefinitions { + +namespace proposalTypes { + +typedef size_t base_size_type; +typedef size_t pre_nms_topn_type; +typedef size_t post_nms_topn_type; +typedef float nms_thresh_type; +typedef size_t min_size_type; +typedef std::vector ratio_type; +typedef std::vector scale_type; +typedef bool clip_before_nms_type; +typedef bool clip_after_nms_type; +typedef bool normalize_type; +typedef size_t feat_stride_type; +typedef float box_size_scale_type; +typedef float box_coordinate_scale_type; +typedef std::string framework_type; + +}; // namespace proposalTypes + +using namespace proposalTypes; + +typedef std::tuple< + base_size_type, + pre_nms_topn_type, + post_nms_topn_type, + nms_thresh_type, + min_size_type, + ratio_type, + scale_type, + clip_before_nms_type, + clip_after_nms_type, + framework_type> proposalSpecificParams; +typedef std::tuple< + proposalSpecificParams, + std::string> proposalLayerTestParamsSet; + +class ProposalLayerTest + : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + static std::string SerializeProposalSpecificParams(proposalSpecificParams& params); + InferenceEngine::Blob::Ptr GenerateInput(const InferenceEngine::InputInfo &info) const override; + +protected: + void SetUp() override; + void Validate() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/psroi_pooling.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/psroi_pooling.hpp new file mode 100644 index 00000000000000..00b77b2835f6e8 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/psroi_pooling.hpp @@ -0,0 +1,48 @@ +// Copyright (C) 2020 Intel Corporation +// +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +#include "shared_test_classes/base/layer_test_utils.hpp" + +namespace LayerTestsDefinitions { + +using psroiParams = std::tuple, // input shape + std::vector, // coords shape + size_t, // output_dim + size_t, // group_size + float, // Spatial scale + size_t, // spatial_bins_x + size_t, // spatial_bins_y + std::string, // mode + InferenceEngine::Precision, // Net precision + LayerTestsUtils::TargetDevice>; // Device name + +class PSROIPoolingLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { + public: + static std::string getTestCaseName(testing::TestParamInfo obj); + void Infer() override; + + protected: + void SetUp() override; + + private: + size_t groupSize_; + float spatialScale_; + size_t spatialBinsX_; + size_t spatialBinsY_; + std::string mode_; + }; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/range.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/range.hpp new file mode 100644 index 00000000000000..54fcdd5d49484e --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/range.hpp @@ -0,0 +1,50 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" + +namespace LayerTestsDefinitions { +typedef std::tuple< + float, // start + float, // stop + float, // step + InferenceEngine::Precision, // Net precision + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + InferenceEngine::Layout, // Output layout + std::string // Target device name +> RangeParams; + +class RangeLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { + float start, stop, step; +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + void Infer() override; + +protected: + void SetUp() override; +}; + +class RangeNumpyLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + void Infer() override; +protected: + void SetUp() override; +private: + float start, stop, step; +}; + +} // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/reduce_ops.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/reduce_ops.hpp new file mode 100644 index 00000000000000..0d228d6d190b4b --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/reduce_ops.hpp @@ -0,0 +1,45 @@ +// Copyright (C) 2019 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "common_test_utils/common_layers_params.hpp" + +namespace LayerTestsDefinitions { + +typedef std::tuple< + std::vector, // Axis to reduce order + CommonTestUtils::OpType, // Scalar or vector type axis + bool, // Keep dims + ngraph::helpers::ReductionType, // Reduce operation type + InferenceEngine::Precision, // Net precision + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + std::vector, // Input shapes + std::string // Target device name +> reduceMeanParams; + +class ReduceOpsLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; + +class ReduceOpsLayerWithSpecificInputTest : public ReduceOpsLayerTest { +protected: + InferenceEngine::Blob::Ptr GenerateInput(const InferenceEngine::InputInfo &info) const override; +}; + +} // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/region_yolo.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/region_yolo.hpp new file mode 100644 index 00000000000000..86b3ae8f14e9a5 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/region_yolo.hpp @@ -0,0 +1,38 @@ +// Copyright (C) 2019 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace LayerTestsDefinitions { + +using regionYoloParamsTuple = std::tuple< + ngraph::Shape, // Input Shape + size_t, // classes + size_t, // coordinates + size_t, // num regions + bool, // do softmax + std::vector, // mask + int, // start axis + int, // end axis + InferenceEngine::Precision, // Network precision + std::string>; // Device name + +class RegionYoloLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/reorg_yolo.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/reorg_yolo.hpp new file mode 100644 index 00000000000000..a242d43f6731be --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/reorg_yolo.hpp @@ -0,0 +1,32 @@ +// Copyright (C) 2019 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace LayerTestsDefinitions { + +using ReorgYoloParamsTuple = typename std::tuple< + ngraph::Shape, // Input Shape + size_t, // stride + InferenceEngine::Precision, // Network precision + std::string>; // Device name + +class ReorgYoloLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/reshape.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/reshape.hpp new file mode 100644 index 00000000000000..c17471bd18a025 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/reshape.hpp @@ -0,0 +1,39 @@ +// Copyright (C) 2019 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +#include "shared_test_classes/base/layer_test_utils.hpp" + +namespace LayerTestsDefinitions { +typedef std::tuple< + bool, // SpecialZero + InferenceEngine::Precision, // Network precision + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + InferenceEngine::Layout, // Output layout + std::vector, // Input shapes + std::vector, // OutForm Shapes + std::string, // Device name + std::map // Config +> reshapeParams; + +class ReshapeLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/reverse_sequence.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/reverse_sequence.hpp new file mode 100644 index 00000000000000..50b5f575446bf0 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/reverse_sequence.hpp @@ -0,0 +1,36 @@ +// Copyright (C) 2019 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace LayerTestsDefinitions { + +using ReverseSequenceParamsTuple = typename std::tuple< + int64_t, // Index of the batch dimension + int64_t, // Index of the sequence dimension + std::vector, // Input shapes + std::vector, // Shape of the input vector with sequence lengths to be reversed + ngraph::helpers::InputLayerType, // Secondary input type + InferenceEngine::Precision, // Network precision + std::string>; // Device name + +class ReverseSequenceLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/rnn_cell.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/rnn_cell.hpp new file mode 100644 index 00000000000000..754aaf17b1ab04 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/rnn_cell.hpp @@ -0,0 +1,37 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace LayerTestsDefinitions { + +using RNNCellParams = typename std::tuple< + bool, // using decompose to sub-ops transformation + size_t, // batch + size_t, // hidden size + size_t, // input size + std::vector, // activations + float, // clip + InferenceEngine::Precision, // Network precision + std::string>; // Device name + +class RNNCellTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/rnn_sequence.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/rnn_sequence.hpp new file mode 100644 index 00000000000000..3d6786c80d40ac --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/rnn_sequence.hpp @@ -0,0 +1,44 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include +#include +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace LayerTestsDefinitions { + +using RNNSequenceParams = typename std::tuple< + ngraph::helpers::SequenceTestsMode, // pure Sequence or TensorIterator + size_t, // seq_lengths + size_t, // batch + size_t, // hidden size + size_t, // input size + std::vector, // activations + float, // clip + ngraph::op::RecurrentSequenceDirection, // direction + InferenceEngine::Precision, // Network precision + std::string>; // Device name + +class RNNSequenceTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + +protected: + void SetUp() override; + void Infer() override; + +private: + ngraph::helpers::SequenceTestsMode m_mode; + int64_t m_max_seq_len = 0; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/roi_pooling.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/roi_pooling.hpp new file mode 100644 index 00000000000000..21163526742db8 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/roi_pooling.hpp @@ -0,0 +1,43 @@ +// Copyright (C) 2020 Intel Corporation +// +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +#include "shared_test_classes/base/layer_test_utils.hpp" + +namespace LayerTestsDefinitions { + +using roiPoolingParamsTuple = std::tuple< + InferenceEngine::SizeVector, // Input shape + InferenceEngine::SizeVector, // Coords shape + std::vector, // Pooled shape {pooled_h, pooled_w} + float, // Spatial scale + ngraph::helpers::ROIPoolingTypes, // ROIPooling method + InferenceEngine::Precision, // Net precision + LayerTestsUtils::TargetDevice>; // Device name + +class ROIPoolingLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + void Infer() override; + +protected: + void SetUp() override; + +private: + ngraph::helpers::ROIPoolingTypes pool_method; + float spatial_scale; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/scatter_ND_update.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/scatter_ND_update.hpp new file mode 100644 index 00000000000000..ccc1a6e0a5717a --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/scatter_ND_update.hpp @@ -0,0 +1,37 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" + +namespace LayerTestsDefinitions { +using sliceSelcetInShape = std::tuple< + std::vector, // input shape + std::vector, // indices shape + std::vector, // indices value + std::vector>; // update shape + +using scatterNDUpdateParamsTuple = typename std::tuple< + sliceSelcetInShape, // Input description + InferenceEngine::Precision, // Network precision + InferenceEngine::Precision, // indices precision + std::string>; // Device name + +class ScatterNDUpdateLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + static std::vector combineShapes( + const std::map, std::map, std::vector>>& inputShapes); + +protected: + void SetUp() override; +}; +} // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/scatter_elements_update.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/scatter_elements_update.hpp new file mode 100644 index 00000000000000..ac83e22d87a067 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/scatter_elements_update.hpp @@ -0,0 +1,37 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" + +namespace LayerTestsDefinitions { +using axisShapeInShape = std::tuple< + std::vector, // input shape + std::vector, // update shape + int>; // axis + +using scatterElementsUpdateParamsTuple = typename std::tuple< + axisShapeInShape, // shape description + std::vector, // indices value + InferenceEngine::Precision, // Network precision + InferenceEngine::Precision, // indices precision + std::string>; // Device name + +class ScatterElementsUpdateLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + static std::vector combineShapes( + const std::map, std::map, std::vector>>& inputShapes); + +protected: + void SetUp() override; +}; +} // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/scatter_update.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/scatter_update.hpp new file mode 100644 index 00000000000000..a1e8748ffb7500 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/scatter_update.hpp @@ -0,0 +1,38 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" + +namespace LayerTestsDefinitions { +using axisUpdateShapeInShape = std::tuple< + std::vector, // input shape + std::vector, // indices shape + std::vector, // update shape + int>; // axis + +using scatterUpdateParamsTuple = typename std::tuple< + axisUpdateShapeInShape, // shape description + std::vector, // indices value + InferenceEngine::Precision, // input precision + InferenceEngine::Precision, // indices precision + std::string>; // Device name + +class ScatterUpdateLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + static std::vector combineShapes( + const std::map, std::map, std::vector>>& inputShapes); + +protected: + void SetUp() override; +}; +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/select.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/select.hpp new file mode 100644 index 00000000000000..a8bfe6860d3883 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/select.hpp @@ -0,0 +1,29 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include + +#include "ngraph_functions/builders.hpp" + +namespace LayerTestsDefinitions { + +typedef std::tuple< + std::vector>, // mask, then, else shapes + InferenceEngine::Precision, // then, else precision + ngraph::op::AutoBroadcastSpec, // broadcast + std::string> selectTestParams; // device name + +class SelectLayerTest : public testing::WithParamInterface, virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/shape_of.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/shape_of.hpp new file mode 100644 index 00000000000000..4c7254eaf5c976 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/shape_of.hpp @@ -0,0 +1,32 @@ +// Copyright (C) 2019 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +#include "shared_test_classes/base/layer_test_utils.hpp" + +namespace LayerTestsDefinitions { +typedef std::tuple< + InferenceEngine::Precision, // Network precision + std::vector, // Input shapes + std::string // Device name +> shapeOfParams; + +class ShapeOfLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/shuffle_channels.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/shuffle_channels.hpp new file mode 100644 index 00000000000000..40a54f55b98730 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/shuffle_channels.hpp @@ -0,0 +1,41 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" + +namespace LayerTestsDefinitions { + +typedef std::tuple< + int, // axis + int // group +> shuffleChannelsSpecificParams; + +typedef std::tuple< + shuffleChannelsSpecificParams, + InferenceEngine::Precision, // Net precision + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + InferenceEngine::Layout, // Output layout + InferenceEngine::SizeVector, // Input shapes + LayerTestsUtils::TargetDevice // Device name +> shuffleChannelsLayerTestParamsSet; + +class ShuffleChannelsLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/softmax.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/softmax.hpp new file mode 100644 index 00000000000000..9130ade310d2f6 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/softmax.hpp @@ -0,0 +1,41 @@ +// Copyright (C) 2020 Intel Corporation +// +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace LayerTestsDefinitions { + +using softMaxLayerTestParams = std::tuple< + InferenceEngine::Precision, // netPrecision + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + InferenceEngine::Layout, // Output layout + InferenceEngine::SizeVector, // inputShape + size_t, // axis + std::string, // targetDevice + std::map // config +>; + +class SoftMaxLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/space_to_batch.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/space_to_batch.hpp new file mode 100644 index 00000000000000..6b7aa533e4e92a --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/space_to_batch.hpp @@ -0,0 +1,36 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" + +namespace LayerTestsDefinitions { + +using spaceToBatchParamsTuple = typename std::tuple< + std::vector, // block_shape + std::vector, // pads_begin + std::vector, // pads_end + std::vector, // Input shapes + InferenceEngine::Precision, // Network precision + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + InferenceEngine::Layout, // Output layout + std::string>; // Device name>; + +class SpaceToBatchLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + +protected: + void SetUp() override; +}; +} // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/space_to_depth.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/space_to_depth.hpp new file mode 100644 index 00000000000000..5aa80f4701bd4a --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/space_to_depth.hpp @@ -0,0 +1,32 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" + +namespace LayerTestsDefinitions { + +using spaceToDepthParamsTuple = typename std::tuple< + std::vector, // Input shape + InferenceEngine::Precision, // Input precision + ngraph::opset3::SpaceToDepth::SpaceToDepthMode, // Mode + std::size_t, // Block size + std::string>; // Device name> + +class SpaceToDepthLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/split.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/split.hpp new file mode 100644 index 00000000000000..ffa62aa15d227e --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/split.hpp @@ -0,0 +1,39 @@ +// Copyright (C) 2019 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" + +namespace LayerTestsDefinitions { + +typedef std::tuple< + size_t, // Num splits + int64_t, // Axis + InferenceEngine::Precision, // Net precision + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + InferenceEngine::Layout, // Output layout + std::vector, // Input shapes + std::vector, // Used outputs indices + std::string // Target device name +> splitParams; + +class SplitLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/squeeze_unsqueeze.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/squeeze_unsqueeze.hpp new file mode 100644 index 00000000000000..70d664c001e50b --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/squeeze_unsqueeze.hpp @@ -0,0 +1,37 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" + +namespace LayerTestsDefinitions { +using ShapeAxesTuple = std::pair, std::vector>; + +typedef std::tuple< + ShapeAxesTuple, // InputShape, Squeeze indexes + ngraph::helpers::SqueezeOpType, // OpType + InferenceEngine::Precision, // Net precision + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + InferenceEngine::Layout, // Output layout + std::string // Target device name +> squeezeParams; + +class SqueezeUnsqueezeLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/strided_slice.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/strided_slice.hpp new file mode 100644 index 00000000000000..96104e75556fdd --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/strided_slice.hpp @@ -0,0 +1,47 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" + +namespace LayerTestsDefinitions { + +struct StridedSliceSpecificParams { + InferenceEngine::SizeVector inputShape; + std::vector begin; + std::vector end; + std::vector strides; + std::vector beginMask; + std::vector endMask; + std::vector newAxisMask; + std::vector shrinkAxisMask; + std::vector ellipsisAxisMask; +}; + +using StridedSliceParams = std::tuple< + StridedSliceSpecificParams, + InferenceEngine::Precision, // Net precision + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + InferenceEngine::Layout, // Output layout + std::string, // Device name + std::map // Additional network configuration +>; + +class StridedSliceLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + +protected: + void SetUp() override; +}; +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/tensor_iterator.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/tensor_iterator.hpp new file mode 100644 index 00000000000000..5214d26c324939 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/tensor_iterator.hpp @@ -0,0 +1,41 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include +#include +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace LayerTestsDefinitions { + +using TensorIteratorParams = typename std::tuple< + bool, // using unroll tensor iterator transformation + size_t, // seq_lengths + size_t, // batch + size_t, // hidden size + // todo: fix. input size hardcoded to 10 due to limitation (10 args) of gtests Combine() func. + //size_t, // input size + size_t, // sequence axis + float, // clip + ngraph::helpers::TensorIteratorBody, // body type + ngraph::op::RecurrentSequenceDirection, // direction + InferenceEngine::Precision, // Network precision + std::string>; // Device name + +class TensorIteratorTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/tile.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/tile.hpp new file mode 100644 index 00000000000000..c3b40a4b0a0c99 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/tile.hpp @@ -0,0 +1,38 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" + +namespace LayerTestsDefinitions { + +typedef std::vector TileSpecificParams; +typedef std::tuple< + TileSpecificParams, + InferenceEngine::Precision, // Net precision + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + InferenceEngine::Layout, // Output layout + InferenceEngine::SizeVector, // Input shapes + LayerTestsUtils::TargetDevice // Device name +> TileLayerTestParamsSet; + +class TileLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/topk.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/topk.hpp new file mode 100644 index 00000000000000..5184c77f21646e --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/topk.hpp @@ -0,0 +1,36 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" + +namespace LayerTestsDefinitions { +typedef std::tuple< + int64_t, // keepK + int64_t, // axis + ngraph::opset4::TopK::Mode, // mode + ngraph::opset4::TopK::SortType, // sort + InferenceEngine::Precision, // Net precision + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + InferenceEngine::SizeVector, // inputShape + std::string // Target device name +> TopKParams; + +class TopKLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/transpose.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/transpose.hpp new file mode 100644 index 00000000000000..975cbb6e29ab0f --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/transpose.hpp @@ -0,0 +1,37 @@ +// Copyright (C) 2019 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" + +namespace LayerTestsDefinitions { + +typedef std::tuple< + std::vector, // Input order + InferenceEngine::Precision, // Net precision + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + InferenceEngine::Layout, // Output layout + std::vector, // Input shapes + std::string // Target device name +> transposeParams; + +class TransposeLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/variadic_split.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/variadic_split.hpp new file mode 100644 index 00000000000000..e6864298ba3448 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/variadic_split.hpp @@ -0,0 +1,38 @@ +// Copyright (C) 2019 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" + +namespace LayerTestsDefinitions { + +typedef std::tuple< + std::vector, // Num splits + size_t, // Axis + InferenceEngine::Precision, // Net precision + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + InferenceEngine::Layout, // Output layout + std::vector, // Input shapes + std::string // Target device name +> VariadicSplitParams; + +class VariadicSplitLayerTest : public testing::WithParamInterface, + public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; + +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/activation_concats_eltwise.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/activation_concats_eltwise.hpp new file mode 100644 index 00000000000000..4c81564f38b633 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/activation_concats_eltwise.hpp @@ -0,0 +1,31 @@ +// Copyright (C) 2019 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" + +namespace SubgraphTestsDefinitions { + +using ActivationConcatsEltwiseParamsTuple = typename std::tuple< + size_t, // input size + size_t, // concat const size + InferenceEngine::Precision, // precision + std::string, // device name + std::map // configuration +>; + + +class ActivationConcatsEltwise : public testing::WithParamInterface, + public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; + +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/basic_lstm.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/basic_lstm.hpp new file mode 100644 index 00000000000000..f19c942d64c343 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/basic_lstm.hpp @@ -0,0 +1,43 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace SubgraphTestsDefinitions { + +typedef std::tuple< + InferenceEngine::Precision, // Network Precision + std::string, // Target Device + std::map // Configuration +> basicLstmParams; + +class Basic_LSTM_S : public testing::WithParamInterface, + public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + + void Run() override; + static std::shared_ptr GetNetwork(size_t thirdDimOut, + size_t hiddenSize, + const InferenceEngine::Precision& netPrecission = InferenceEngine::Precision::FP32, + std::vector* hidden_memory_init_out = nullptr, + std::vector* cell_memory_init_out = nullptr); +protected: + size_t hidden_size; + std::vector hidden_memory_init; + std::vector cell_memory_init; + void SetUp() override; + std::vector> CalculateRefs() override; +}; + +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/broadcast_power.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/broadcast_power.hpp new file mode 100644 index 00000000000000..80bc5cd234b67f --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/broadcast_power.hpp @@ -0,0 +1,33 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "ngraph_functions/builders.hpp" + +namespace SubgraphTestsDefinitions { + +typedef std::tuple< + std::vector>, // Input shapes + InferenceEngine::Precision, // Network Precision + std::string, // Target Device + std::map //Configuration +> BroadCastPowerTuple; + +class BroadcastPowerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/cascade_concat.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/cascade_concat.hpp new file mode 100644 index 00000000000000..0e1ad9a8e293a6 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/cascade_concat.hpp @@ -0,0 +1,31 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +#pragma once + +#include +#include +#include +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" + +namespace SubgraphTestsDefinitions { + +typedef std::tuple< + std::vector>, //input shapes 1 + std::vector>, //input shapes 2 + std::vector>, //input shapes 3 + InferenceEngine::Precision, //Network precision + bool, //Multioutput -> True, Single out ->false + std::string, //Device name + std::map//config + > CascadeConcatTuple; + +class CascadeConcat + : public testing::WithParamInterface, + public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); +protected: + void SetUp() override; +}; +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/concat_multi_input.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/concat_multi_input.hpp new file mode 100644 index 00000000000000..b15e8eac8d41c1 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/concat_multi_input.hpp @@ -0,0 +1,41 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "ngraph_functions/builders.hpp" + +namespace SubgraphTestsDefinitions { + +typedef std::tuple< + std::vector>, // Input shapes + InferenceEngine::Precision, // Network Precision + std::string, // Target Device + std::map // Config +> concatMultiParams; + +class ConcatMultiInput : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +private: + std::vector paramSize; + ngraph::element::Type ngPrc; + std::vector> inputShapes; + +public: + void GenerateStridedSliceModel(); + void GenerateConstOnlyModel(); + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; + +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/concat_quantization.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/concat_quantization.hpp new file mode 100644 index 00000000000000..d69feed8f15332 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/concat_quantization.hpp @@ -0,0 +1,33 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "ngraph_functions/builders.hpp" + +namespace SubgraphTestsDefinitions { + +typedef std::tuple< + InferenceEngine::Precision, // Network Precision + std::string, // Target Device + std::map //Configuration +> concatQuantizationParams; + +class ConcatQuantization : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; + +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/constant_result.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/constant_result.hpp new file mode 100644 index 00000000000000..008b8fcb8a8323 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/constant_result.hpp @@ -0,0 +1,29 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" + +namespace SubgraphTestsDefinitions { + +typedef std::tuple< + std::string // Device name +> constResultParams; + +class ConstantResultSubgraphTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); +protected: + void SetUp() override; +}; +} // namespace SubgraphTestsDefinitions + diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/conv_eltwise_fusion.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/conv_eltwise_fusion.hpp new file mode 100644 index 00000000000000..7d033de8d0d383 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/conv_eltwise_fusion.hpp @@ -0,0 +1,37 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +#pragma once + +#include +#include +#include +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include +#include + +namespace SubgraphTestsDefinitions { + +typedef std::tuple< + ngraph::NodeTypeInfo, // Convolution type + std::tuple< + ngraph::NodeTypeInfo, // Eltwise type + int64_t // Expected number of ops + >, + ngraph::Shape, // Input shape + ngraph::Shape, // Weights shape + ngraph::Shape, // Const shape + ngraph::element::Type, // Network precision + std::string // Device name + > ConvEltwiseFusionParams; + +class ConvEltwiseFusion + : public testing::WithParamInterface, + public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + +protected: + void SetUp() override; +}; +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/convert_pad_to_group_conv.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/convert_pad_to_group_conv.hpp new file mode 100644 index 00000000000000..9bcd3ee825d472 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/convert_pad_to_group_conv.hpp @@ -0,0 +1,33 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +#pragma once + +#include +#include +#include +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include +#include + +namespace SubgraphTestsDefinitions { + +typedef std::tuple< + ngraph::Shape, // input shape + std::vector, // pad_begin + std::vector, // pad_end + float, // pad_value + ngraph::op::PadMode, // pad_mode + std::string // Device name + > PadParams; + +class ConvertPadToConvTests + : public testing::WithParamInterface, + public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + +protected: + void SetUp() override; +}; +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/delayed_copy_layer.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/delayed_copy_layer.hpp new file mode 100644 index 00000000000000..97404963187935 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/delayed_copy_layer.hpp @@ -0,0 +1,33 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "ngraph_functions/builders.hpp" + +namespace SubgraphTestsDefinitions { + +typedef std::tuple< + InferenceEngine::Precision, //Network precision + std::string, //Device name + std::map //Configuration +> ConcatSplitReluTuple; + +class DelayedCopyTest + : public testing::WithParamInterface, + public LayerTestsUtils::LayerTestsCommon { +private: + void switchToNgraphFriendlyModel(); +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); +protected: + void SetUp() override; + void Run() override; +}; +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/first_connect_input_concat.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/first_connect_input_concat.hpp new file mode 100644 index 00000000000000..ef99ed1c8b2818 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/first_connect_input_concat.hpp @@ -0,0 +1,34 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include +#include + + +namespace SubgraphTestsDefinitions { + +typedef std::tuple< + std::vector>, // Input shapes + InferenceEngine::Precision, // Network Precision + std::string, // Target Device + std::map // Config +> concatFirstInputParams; + +class ConcatFirstInputTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; + +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/get_output_before_activation.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/get_output_before_activation.hpp new file mode 100644 index 00000000000000..d7b83970c123d6 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/get_output_before_activation.hpp @@ -0,0 +1,34 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +#pragma once + +#include "common_test_utils/test_common.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" +#include + +namespace SubgraphTestsDefinitions { +enum class midOutputType { + Sum, + Sub, + Mul, +}; + +typedef std::tuple< + std::string, // Target device name + InferenceEngine::Precision, // Network precision + size_t, // Input size + midOutputType, // Type of layer that will be an output + std::map // Configuration +> outputBeforeActivationParams; + +std::ostream& operator<< (std::ostream& os, const midOutputType& oType); + +class OutputBeforeActivation : public LayerTestsUtils::LayerTestsCommon, + public testing::WithParamInterface { +protected: + void SetUp() override; +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + InferenceEngine::Blob::Ptr GenerateInput(const InferenceEngine::InputInfo &info) const override; +}; +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/handling_orientation_conv.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/handling_orientation_conv.hpp new file mode 100644 index 00000000000000..50ee3ba5579838 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/handling_orientation_conv.hpp @@ -0,0 +1,31 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "ngraph_functions/builders.hpp" + +namespace SubgraphTestsDefinitions { +typedef std::tuple< + InferenceEngine::Precision, //Network precision + std::string, //Device name + std::map //Configuration +> HandlingOrientationParams; + +class HandlingOrientationClass : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + +protected: + void SetUp() override; +}; +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/input_conv.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/input_conv.hpp new file mode 100644 index 00000000000000..d6b412917f4ce0 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/input_conv.hpp @@ -0,0 +1,43 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace SubgraphTestsDefinitions { + +typedef std::tuple< + std::vector, // Input Shapes + std::vector, // Kernel Shape + size_t // Stride +> convParams; + +typedef std::tuple< + InferenceEngine::Precision, // Network Precision + std::string, // Target Device + std::map, // Configuration + convParams, // Convolution Params + size_t, // Output Channels + bool // If Add Reshape at the end of the model to reshape to 2D +> inputConvParams; + +class InputConvTest : public testing::WithParamInterface, + public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + InferenceEngine::Blob::Ptr GenerateInput(const InferenceEngine::InputInfo& info) const override; + +protected: + void SetUp() override; +}; + +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/matmul_squeeze_add.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/matmul_squeeze_add.hpp new file mode 100644 index 00000000000000..220ed4e16ba6e9 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/matmul_squeeze_add.hpp @@ -0,0 +1,35 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace SubgraphTestsDefinitions { + +typedef std::tuple< + InferenceEngine::Precision, // Network Precision + std::string, // Target Device + std::map, // Configuration + std::vector, // Input Shapes + size_t // Output Size +> matmulSqueezeAddParams; + +class MatmulSqueezeAddTest : public testing::WithParamInterface, + public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; + +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/memory_LSTMCell.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/memory_LSTMCell.hpp new file mode 100644 index 00000000000000..13d068284a9a9a --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/memory_LSTMCell.hpp @@ -0,0 +1,39 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +#pragma once + +#include "common_test_utils/test_common.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" +#include + +namespace SubgraphTestsDefinitions { +typedef std::tuple< + std::string, // Target device name + InferenceEngine::Precision, // Network precision + size_t, // Input size + size_t, // Hidden size + std::map // Configuration +> memoryLSTMCellParams; + +class MemoryLSTMCellTest : public LayerTestsUtils::LayerTestsCommon, + public testing::WithParamInterface { +private: + // you have to Unroll TI manually and remove memory untill ngraph supports it + void switchToNgraphFriendlyModel(); + void CreatePureTensorIteratorModel(); + // since we switching models we need to generate and save weights biases and inputs in SetUp + std::vector input_bias; + std::vector input_weights; + std::vector hidden_memory_init; + std::vector cell_memory_init; + std::vector weights_vals; + std::vector reccurrenceWeights_vals; + std::vector bias_vals; +protected: + void SetUp() override; + void Run() override; + void RunLowLatency(bool regular_api = false); +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); +}; +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/memory_eltwise_reshape_concat.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/memory_eltwise_reshape_concat.hpp new file mode 100644 index 00000000000000..6862cd38e153c6 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/memory_eltwise_reshape_concat.hpp @@ -0,0 +1,37 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +#pragma once + +#include "common_test_utils/test_common.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" +#include + +namespace SubgraphTestsDefinitions { +typedef std::tuple< + std::string, // Target device name + InferenceEngine::Precision, // Network precision + size_t, // Mutiples of concat size to be used as input size + size_t, // Concat size + std::map // Configuration +> memoryEltwiseReshapeConcatParams; + +class MemoryEltwiseReshapeConcatTest : public LayerTestsUtils::LayerTestsCommon, + public testing::WithParamInterface { +private: + void initTestModel(); + // you have to replace memory layers since ngraph does not support them + void initNgraphFriendlyModel(); + + // since we switching models we need to generate and save these values in SetUp + size_t inputSize; + size_t concatSize; + ngraph::element::Type ngPrc; + std::vector memory_init; + std::vector concat_vals; +protected: + void SetUp() override; + void Run() override; +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); +}; +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/multioutput_eltwise_squeeze_eltwise.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/multioutput_eltwise_squeeze_eltwise.hpp new file mode 100644 index 00000000000000..8997fbf058c08e --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/multioutput_eltwise_squeeze_eltwise.hpp @@ -0,0 +1,30 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +#pragma once + +#include +#include +#include +#include +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace SubgraphTestsDefinitions { + +typedef std::tuple< + std::vector>, //input shapes + InferenceEngine::Precision, //Network precision + std::string, //Device name + std::map //Configuration +> MultioutputEltwiseReshapeEltwiseTuple; + +class MultioutputEltwiseReshapeEltwise + : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); +protected: + void SetUp() override; +}; +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/multiple_LSTMCell.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/multiple_LSTMCell.hpp new file mode 100644 index 00000000000000..26cda14d03d74c --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/multiple_LSTMCell.hpp @@ -0,0 +1,41 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +#pragma once + +#include "common_test_utils/test_common.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" +#include + +namespace SubgraphTestsDefinitions { +typedef std::tuple< + std::string, // Target device name + InferenceEngine::Precision, // Network precision + size_t, // Input size + size_t, // Hidden size + std::map // Configuration +> multipleLSTMCellParams; + +class MultipleLSTMCellTest : public LayerTestsUtils::LayerTestsCommon, + public testing::WithParamInterface { +private: + // you have to Unroll TI manually and remove memory untill ngraph supports it + void switchToNgraphFriendlyModel(); + void CreatePureTensorIteratorModel(); + // since we switching models we need to generate and save weights biases and inputs in SetUp + size_t hiddenSize; + std::vector input_bias; + std::vector input_weights; + std::vector hidden_memory_init; + std::vector cell_memory_init; + std::vector weights_vals; + std::vector weights_2_vals; + std::vector reccurrenceWeights_vals; + std::vector bias_vals; +protected: + void SetUp() override; + void Run() override; + void RunLowLatency(bool regular_api = false); +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); +}; +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/multiple_concat.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/multiple_concat.hpp new file mode 100644 index 00000000000000..09ef8286e3c5ed --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/multiple_concat.hpp @@ -0,0 +1,25 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +#pragma once + +#include "common_test_utils/test_common.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" +#include + +namespace SubgraphTestsDefinitions { +typedef std::tuple< + std::string, // Target device name + InferenceEngine::Precision, // Network precision + size_t, // Input size + size_t, // Const size + std::map // Configuration +> multipleConcatParams; + +class MultipleConcatTest : public LayerTestsUtils::LayerTestsCommon, + public testing::WithParamInterface { +protected: + void SetUp() override; +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); +}; +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/multiply_add.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/multiply_add.hpp new file mode 100644 index 00000000000000..2d6302d5b74014 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/multiply_add.hpp @@ -0,0 +1,32 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// +#pragma once + +#include +#include +#include +#include +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "common_test_utils/test_constants.hpp" + +namespace SubgraphTestsDefinitions { + +using MultiplyAddParamsTuple = typename std::tuple< + std::vector, //input shapes + InferenceEngine::Precision, //Network precision + std::string>; //Device name + +class MultiplyAddLayerTest: + public testing::WithParamInterface, + public LayerTestsUtils::LayerTestsCommon{ +public: + std::shared_ptr fn; + static std::string getTestCaseName(const testing::TestParamInfo &obj); +protected: + void SetUp() override; +}; + +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/negative_memory_layer_offset.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/negative_memory_layer_offset.hpp new file mode 100644 index 00000000000000..a76b9ded6ef84c --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/negative_memory_layer_offset.hpp @@ -0,0 +1,36 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "ngraph_functions/builders.hpp" + +namespace SubgraphTestsDefinitions { + +typedef std::tuple< + InferenceEngine::Precision, //Network precision + std::string, //Device name + size_t, //Input size + size_t, //Hidden size + std::map //Configuration +> NegativeMemoryLayerOffsetTuple; + +class NegativeMemoryOffsetTest + : public testing::WithParamInterface, + public LayerTestsUtils::LayerTestsCommon { +private: + void switchToNgraphFriendlyModel(); + std::vector memory_init; +public: + static std::string getTestCaseName(const testing::TestParamInfo& obj); +protected: + void SetUp() override; + void Run() override; +}; +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/perm_conv_perm_concat.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/perm_conv_perm_concat.hpp new file mode 100644 index 00000000000000..7afc7babf37471 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/perm_conv_perm_concat.hpp @@ -0,0 +1,36 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "ngraph_functions/builders.hpp" + +namespace SubgraphTestsDefinitions { +typedef std::tuple< + InferenceEngine::Precision, // Network Precision + std::string, // Target Device + std::array, // Input shape + std::array, // Kernel shape + size_t, // Output channels + std::map // Configuration +> PermConvPermConcatParams; + +class PermConvPermConcat : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; + void Run() override; +}; +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/quantized_convolution_backprop_data.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/quantized_convolution_backprop_data.hpp new file mode 100644 index 00000000000000..3f597392424185 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/quantized_convolution_backprop_data.hpp @@ -0,0 +1,43 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace SubgraphTestsDefinitions { + +typedef std::tuple< + InferenceEngine::SizeVector, + InferenceEngine::SizeVector, + std::vector, + std::vector, + InferenceEngine::SizeVector, + size_t, + ngraph::op::PadType, + size_t, + ngraph::helpers::QuantizationGranularity> quantConvBackpropDataSpecificParams; +typedef std::tuple< + quantConvBackpropDataSpecificParams, + InferenceEngine::Precision, + InferenceEngine::SizeVector, + LayerTestsUtils::TargetDevice> quantConvBackpropDataLayerTestParamsSet; + +class QuantConvBackpropDataLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; + +} // namespace SubgraphTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/quantized_group_convolution.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/quantized_group_convolution.hpp new file mode 100644 index 00000000000000..a4c446b135e55b --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/quantized_group_convolution.hpp @@ -0,0 +1,44 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace SubgraphTestsDefinitions { + +typedef std::tuple< + InferenceEngine::SizeVector, + InferenceEngine::SizeVector, + std::vector, + std::vector, + InferenceEngine::SizeVector, + size_t, + size_t, + size_t, + ngraph::helpers::QuantizationGranularity, + bool> quantGroupConvSpecificParams; +typedef std::tuple< + quantGroupConvSpecificParams, + InferenceEngine::Precision, + InferenceEngine::SizeVector, + LayerTestsUtils::TargetDevice> quantGroupConvLayerTestParamsSet; + +class QuantGroupConvLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; + +} // namespace SubgraphTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/quantized_group_convolution_backprop_data.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/quantized_group_convolution_backprop_data.hpp new file mode 100644 index 00000000000000..36d98ec98bfffb --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/quantized_group_convolution_backprop_data.hpp @@ -0,0 +1,44 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace SubgraphTestsDefinitions { + +typedef std::tuple< + InferenceEngine::SizeVector, + InferenceEngine::SizeVector, + std::vector, + std::vector, + InferenceEngine::SizeVector, + size_t, + size_t, + ngraph::op::PadType, + size_t, + ngraph::helpers::QuantizationGranularity> quantGroupConvBackpropDataSpecificParams; +typedef std::tuple< + quantGroupConvBackpropDataSpecificParams, + InferenceEngine::Precision, + InferenceEngine::SizeVector, + LayerTestsUtils::TargetDevice> quantGroupConvBackpropDataLayerTestParamsSet; + +class QuantGroupConvBackpropDataLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; + +} // namespace SubgraphTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/quantized_mat_mul.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/quantized_mat_mul.hpp new file mode 100644 index 00000000000000..a9bc3e11dc9b7e --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/quantized_mat_mul.hpp @@ -0,0 +1,36 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" + +namespace SubgraphTestsDefinitions { + +typedef std::tuple< + size_t, + ngraph::helpers::QuantizationGranularity, + InferenceEngine::Precision> QuantParams; + +typedef std::tuple< + QuantParams, + InferenceEngine::Precision, + InferenceEngine::SizeVector, + InferenceEngine::SizeVector, + LayerTestsUtils::TargetDevice> QuantMatMulLayerTestParamsSet; + +class QuantMatMulTest : public testing::WithParamInterface, virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + +protected: + void SetUp() override; +}; + +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/range_add.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/range_add.hpp new file mode 100644 index 00000000000000..903ef8de87ac8c --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/range_add.hpp @@ -0,0 +1,39 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" + +#include "shared_test_classes/single_layer/range.hpp" + +namespace SubgraphTestsDefinitions { + +// ------------------------------ V0 ------------------------------ + +class RangeAddSubgraphTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); +protected: + void SetUp() override; +}; + +// ------------------------------ V4 ------------------------------ + +class RangeNumpyAddSubgraphTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); +protected: + void SetUp() override; +}; + +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/relu_shape_of.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/relu_shape_of.hpp new file mode 100644 index 00000000000000..6ecad136a0f5eb --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/relu_shape_of.hpp @@ -0,0 +1,26 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "shared_test_classes/single_layer/shape_of.hpp" + +#include "ngraph_functions/builders.hpp" + +namespace SubgraphTestsDefinitions { + +class ReluShapeOfSubgraphTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); +protected: + void SetUp() override; +}; +} // namespace SubgraphTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/reshape_permute_conv_permute_reshape_act.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/reshape_permute_conv_permute_reshape_act.hpp new file mode 100644 index 00000000000000..42d79fa72c046d --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/reshape_permute_conv_permute_reshape_act.hpp @@ -0,0 +1,37 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "ngraph_functions/builders.hpp" + +namespace SubgraphTestsDefinitions { + typedef std::tuple< + InferenceEngine::Precision, // Network Precision + std::string, // Target Device + std::array, // Input shape + std::array, // Kernel shape + size_t, // Output channels + std::map // Configuration + > ConvReshapeActParams; + +class ConvReshapeAct : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; + void Run() override; +}; + +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/reshape_permute_reshape.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/reshape_permute_reshape.hpp new file mode 100644 index 00000000000000..732c752bf8f0d7 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/reshape_permute_reshape.hpp @@ -0,0 +1,30 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "ngraph_functions/builders.hpp" + +namespace SubgraphTestsDefinitions { +typedef std::tuple< + std::vector>, //input shapes and permute shapes + InferenceEngine::Precision, //Network precision + std::string //Device name + > ReshapePermuteReshapeTuple; + +class ReshapePermuteReshape : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); + +protected: + void SetUp() override; +}; +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/reshape_squeeze_reshape_relu.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/reshape_squeeze_reshape_relu.hpp new file mode 100644 index 00000000000000..13fc56e08b77f7 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/reshape_squeeze_reshape_relu.hpp @@ -0,0 +1,31 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +#pragma once + +#include +#include +#include +#include +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace SubgraphTestsDefinitions { +using ShapeAxesTuple = std::pair, std::vector>; + +using ReshapeSqueezeReshapeReluTuple = typename std::tuple< + ShapeAxesTuple, // Input shapes & squeeze_indices + InferenceEngine::Precision, // Network precision + std::string, // Device name + ngraph::helpers::SqueezeOpType // SqueezeOpType +>; + +class ReshapeSqueezeReshapeRelu + : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); +protected: + void SetUp() override; +}; +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/scaleshift.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/scaleshift.hpp new file mode 100644 index 00000000000000..5510cc99aebca7 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/scaleshift.hpp @@ -0,0 +1,30 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// +#pragma once + +#include +#include +#include +#include +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "common_test_utils/test_constants.hpp" + +namespace SubgraphTestsDefinitions { + +using ScaleShiftParamsTuple = typename std::tuple< + std::vector>, //input shapes + InferenceEngine::Precision, //Network precision + std::string, //Device name + std::vector, //scale + std::vector>; //shift + +class ScaleShiftLayerTest: + public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon{ +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); +protected: + void SetUp() override; +}; +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/softsign.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/softsign.hpp new file mode 100644 index 00000000000000..37913b6f9cc72c --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/softsign.hpp @@ -0,0 +1,39 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace SubgraphTestsDefinitions { + +typedef std::tuple< + InferenceEngine::Precision, // Network Precision + std::string, // Target Device + std::map, // Configuration + std::vector // Input Shapes +> softsignParams; + +class SoftsignTest : public testing::WithParamInterface, + public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + + void Run() override; + +protected: + void SetUp() override; + +private: + std::shared_ptr GenerateNgraphFriendlySoftSign(); +}; + +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/split_concat_memory.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/split_concat_memory.hpp new file mode 100644 index 00000000000000..6ca5b0b7e82e1f --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/split_concat_memory.hpp @@ -0,0 +1,32 @@ +// Copyright (C) 2019 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" + +namespace SubgraphTestsDefinitions { + +using SplitConcatMemoryParamsTuple = typename std::tuple< + std::vector, // input shapes + InferenceEngine::Precision, // precision + int, // axis of split + std::string // device name +>; + + +class SplitConcatMemory : public testing::WithParamInterface, + public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; + + int axis; +}; + +} // namespace SubgraphTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/split_conv_concat.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/split_conv_concat.hpp new file mode 100644 index 00000000000000..b938bd80ff8554 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/split_conv_concat.hpp @@ -0,0 +1,27 @@ +// Copyright (C) 2019 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "ngraph_functions/builders.hpp" + +namespace SubgraphTestsDefinitions { + +class SplitConvConcat : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; +}; + +} // namespace SubgraphTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/split_relu.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/split_relu.hpp new file mode 100644 index 00000000000000..4335af5cf0fd19 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/split_relu.hpp @@ -0,0 +1,33 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// +#pragma once + +#include +#include +#include +#include +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "common_test_utils/test_constants.hpp" + +namespace SubgraphTestsDefinitions { + +typedef std::tuple< + std::vector>, //input shapes + std::vector, //index connected layer + InferenceEngine::Precision, //Network precision + std::string, //Device name + std::map //Configuration +> SplitReluTuple; + + +class SplitRelu: + public testing::WithParamInterface, + public LayerTestsUtils::LayerTestsCommon{ +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); +protected: + void SetUp() override; +}; +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/split_trivial_permute_concat.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/split_trivial_permute_concat.hpp new file mode 100644 index 00000000000000..7068574f1f75ce --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/split_trivial_permute_concat.hpp @@ -0,0 +1,33 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" +#include "ngraph_functions/builders.hpp" + +namespace SubgraphTestsDefinitions { + +typedef std::tuple< + InferenceEngine::Precision, //Network precision + std::string, //Device name + std::vector, //Input sizes + size_t, //Split axis + size_t, //Concat axis + std::map //Configuration +> SplitTrivialPermuteConcatTuple; + +class SplitTrivialPermuteConcatTest + : public testing::WithParamInterface, + public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo& obj); +protected: + void SetUp() override; +}; +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/trivial_concat.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/trivial_concat.hpp new file mode 100644 index 00000000000000..849696fcf65d15 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/trivial_concat.hpp @@ -0,0 +1,32 @@ +// Copyright (C) 2019 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace SubgraphTestsDefinitions { +using trivialConcatParamsTuple = typename std::tuple< + std::vector, // Inputs shape + InferenceEngine::Precision, // Network precision + std::string, // Device name + std::map // Configuration +>; + +class TrivialConcatLayerTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(const testing::TestParamInfo &obj); +protected: + void SetUp() override; +}; + +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/two_fake_quantize_to_fullyconnected.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/two_fake_quantize_to_fullyconnected.hpp new file mode 100644 index 00000000000000..496192556a6823 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/two_fake_quantize_to_fullyconnected.hpp @@ -0,0 +1,53 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/utils/ngraph_helpers.hpp" + +namespace SubgraphTestsDefinitions { + +typedef std::tuple< + std::vector, // levels + std::vector>, // const inputs shape + std::vector, // fake quantize inputLow, inputHigh, outputLow, outputHigh or empty for random + std::vector // input generator data: low, high, resolution +> fqSpecificParams; +typedef std::tuple< + fqSpecificParams, + InferenceEngine::Precision, // Net precision + InferenceEngine::Precision, // Input precision + InferenceEngine::Precision, // Output precision + InferenceEngine::Layout, // Input layout + InferenceEngine::Layout, // Output layout + InferenceEngine::SizeVector, // Input shapes + LayerTestsUtils::TargetDevice, // Device name + std::pair>, // Additional backend configuration and alis name to it + bool +> fqSubgraphTestParamsSet; + +class FakeQuantizeSubgraphTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); + +protected: + void SetUp() override; + InferenceEngine::Blob::Ptr GenerateInput(const InferenceEngine::InputInfo &info) const override; + +protected: + float inputDataMin = 0.0; + float inputDataMax = 10.0; + float inputDataResolution = 1.0; + int32_t seed = 1; +}; + +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/ie_test_utils/functional_test_utils/layer_test_utils.cpp b/inference-engine/tests/functional/shared_test_classes/src/base/layer_test_utils.cpp similarity index 92% rename from inference-engine/tests/ie_test_utils/functional_test_utils/layer_test_utils.cpp rename to inference-engine/tests/functional/shared_test_classes/src/base/layer_test_utils.cpp index 8ffa066953306a..f90d6ad065f71c 100644 --- a/inference-engine/tests/ie_test_utils/functional_test_utils/layer_test_utils.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/base/layer_test_utils.cpp @@ -3,14 +3,16 @@ // #include +#include #include #include #include #include +#include #include "ngraph/variant.hpp" -#include "layer_test_utils.hpp" -#include "plugin_config.hpp" +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "functional_test_utils/core_config.hpp" namespace LayerTestsUtils { @@ -190,6 +192,31 @@ void LayerTestsCommon::Run() { } } +void LayerTestsCommon::Serialize() { + SKIP_IF_CURRENT_TEST_IS_DISABLED(); + + std::string output_name = GetTestName() + "_" + GetTimestamp(); + + std::string out_xml_path = output_name + ".xml"; + std::string out_bin_path = output_name + ".bin"; + + ngraph::pass::Manager manager; + manager.register_pass(out_xml_path, out_bin_path); + manager.run_passes(function); + + InferenceEngine::Core ie; + auto result = ie.ReadNetwork(out_xml_path, out_bin_path); + + bool success; + std::string message; + std::tie(success, message) = + compare_functions(result.getFunction(), function); + + EXPECT_TRUE(success) << message; + + CommonTestUtils::removeIRFiles(out_xml_path, out_bin_path); +} + InferenceEngine::Blob::Ptr LayerTestsCommon::GenerateInput(const InferenceEngine::InputInfo &info) const { return FuncTestUtils::createAndFillBlob(info.getTensorDesc()); } @@ -296,7 +323,7 @@ void LayerTestsCommon::ConfigureNetwork() { void LayerTestsCommon::LoadNetwork() { cnnNetwork = InferenceEngine::CNNNetwork{function}; - PreparePluginConfiguration(this); + CoreConfiguration(this); ConfigureNetwork(); executableNetwork = core->LoadNetwork(cnnNetwork, targetDevice, configuration); } @@ -445,4 +472,19 @@ std::shared_ptr LayerTestsCommon::GetFunction() { std::map &LayerTestsCommon::GetConfiguration() { return configuration; } + +std::string LayerTestsCommon::GetTimestamp() { + auto now = std::chrono::system_clock::now(); + auto epoch = now.time_since_epoch(); + auto ns = std::chrono::duration_cast(epoch); + return std::to_string(ns.count()); +} + +const std::string LayerTestsCommon::GetTestName() { + std::string test_name = + ::testing::UnitTest::GetInstance()->current_test_info()->name(); + std::replace_if(test_name.begin(), test_name.end(), + [](char c) { return !std::isalnum(c); }, '_'); + return test_name; +} } // namespace LayerTestsUtils diff --git a/inference-engine/tests/ie_test_utils/functional_test_utils/low_precision_transformations/layer_transformation.cpp b/inference-engine/tests/functional/shared_test_classes/src/base/low_precision_transformations/layer_transformation.cpp similarity index 91% rename from inference-engine/tests/ie_test_utils/functional_test_utils/low_precision_transformations/layer_transformation.cpp rename to inference-engine/tests/functional/shared_test_classes/src/base/low_precision_transformations/layer_transformation.cpp index cb79063f6a21c6..932c7085913b44 100644 --- a/inference-engine/tests/ie_test_utils/functional_test_utils/low_precision_transformations/layer_transformation.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/base/low_precision_transformations/layer_transformation.cpp @@ -2,21 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "layer_transformation.hpp" +#include "shared_test_classes/base/low_precision_transformations/layer_transformation.hpp" -#include -#include #include #include -#include #include -#include "cpp_interfaces/interface/ie_internal_plugin_config.hpp" -#include - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" #include "functional_test_utils/blob_utils.hpp" #include "ngraph_functions/pass/convert_prc.hpp" diff --git a/inference-engine/tests/functional/shared_test_classes/src/precomp.hpp b/inference-engine/tests/functional/shared_test_classes/src/precomp.hpp new file mode 100644 index 00000000000000..b9d5fc69556ea3 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/src/precomp.hpp @@ -0,0 +1,36 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include + +#include +#include +#include "ngraph_functions/builders.hpp" +#include "ngraph_functions/subgraph_builders.hpp" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/activation.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/activation.cpp similarity index 95% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/activation.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/activation.cpp index ed115aed9e6f0a..a2a320f9f22b57 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/activation.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/activation.cpp @@ -3,19 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include - -#include "ie_core.hpp" -#include "ie_precision.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/layer_test_utils.hpp" - -#include "single_layer_tests/activation.hpp" +#include "shared_test_classes/single_layer/activation.hpp" namespace LayerTestsDefinitions { @@ -187,8 +175,7 @@ void ActivationParamLayerTest::generateActivationBlob(std::vector constan auto blobHardSigmoidLambda = inferRequest.GetBlob("lambda"); float alpha = constantsValue[0], lambda = constantsValue[1]; blobHardSigmoidAlpha = FuncTestUtils::createAndFillBlobWithFloatArray(blobHardSigmoidAlpha->getTensorDesc(), &alpha, 1); - blobHardSigmoidLambda = FuncTestUtils::createAndFillBlobWithFloatArray(blobHardSigmoidLambda->getTensorDesc(), &lambda, - 1); + blobHardSigmoidLambda = FuncTestUtils::createAndFillBlobWithFloatArray(blobHardSigmoidLambda->getTensorDesc(), &lambda, 1); } default: THROW_IE_EXCEPTION << "Unsupported activation type for Params test type"; @@ -206,7 +193,6 @@ void ActivationParamLayerTest::Infer() { inferRequest.Infer(); } - void ActivationParamLayerTest::SetUp() { InferenceEngine::Precision netPrecision; std::pair, std::vector> shapes; @@ -225,13 +211,4 @@ void ActivationParamLayerTest::SetUp() { auto activation = ngraph::builder::makeActivation(params, ngPrc, activationType); function = std::make_shared(ngraph::NodeVector{activation}, params); } - -TEST_P(ActivationLayerTest, CompareWithRefs) { - Run(); -} - -TEST_P(ActivationParamLayerTest, CompareWithRefs) { - Run(); -} - } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/batch_norm.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/batch_norm.cpp similarity index 95% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/batch_norm.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/batch_norm.cpp index 58d9bcaa519a5a..8ccbe96faacd29 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/batch_norm.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/batch_norm.cpp @@ -2,8 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "single_layer_tests/batch_norm.hpp" - +#include "shared_test_classes/single_layer/batch_norm.hpp" namespace LayerTestsDefinitions { std::string BatchNormLayerTest::getTestCaseName(const testing::TestParamInfo& obj) { @@ -47,8 +46,4 @@ void BatchNormLayerTest::SetUp() { function = std::make_shared(results, params, "BatchNormInference"); } -TEST_P(BatchNormLayerTest, CompareWithRefs) { - Run(); -} - } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/batch_to_space.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/batch_to_space.cpp similarity index 82% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/batch_to_space.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/batch_to_space.cpp index b6748e98d65953..5aa8f6c0ddf872 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/batch_to_space.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/batch_to_space.cpp @@ -2,21 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "common_test_utils/common_utils.hpp" - -#include "single_layer_tests/batch_to_space.hpp" +#include "ngraph_functions/builders.hpp" +#include "shared_test_classes/single_layer/batch_to_space.hpp" namespace LayerTestsDefinitions { @@ -56,8 +43,4 @@ void BatchToSpaceLayerTest::SetUp() { function = std::make_shared(results, params, "BatchToSpace"); } -TEST_P(BatchToSpaceLayerTest, CompareWithRefs) { - Run(); -}; - } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/broadcast.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/broadcast.cpp similarity index 93% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/broadcast.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/broadcast.cpp index e42a8f0093844f..b9aba40f0bdc32 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/broadcast.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/broadcast.cpp @@ -2,8 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "single_layer_tests/broadcast.hpp" - +#include "shared_test_classes/single_layer/broadcast.hpp" namespace LayerTestsDefinitions { std::string BroadcastLayerTest::getTestCaseName(const testing::TestParamInfo& obj) { @@ -42,8 +41,4 @@ void BroadcastLayerTest::SetUp() { function = std::make_shared(results, params, "BroadcastInference"); } -TEST_P(BroadcastLayerTest, CompareWithRefs) { - Run(); -} - -} // namespace LayerTestsDefinitions \ No newline at end of file +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/comparison.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/comparison.cpp similarity index 91% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/comparison.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/comparison.cpp index 51c78e53972257..4ccee588367121 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/comparison.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/comparison.cpp @@ -3,15 +3,8 @@ // SPDX-License-Identifier: Apache-2.0 // -#include - -#include - -#include "functional_test_utils/layer_test_utils.hpp" #include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" - -#include "single_layer_tests/comparison.hpp" +#include "shared_test_classes/single_layer/comparison.hpp" using namespace LayerTestsDefinitions::ComparisonParams; @@ -84,9 +77,4 @@ void ComparisonLayerTest::SetUp() { auto comparisonNode = ngraph::builder::makeComparison(inputs[0], secondInput, comparisonOpType); function = std::make_shared(comparisonNode, inputs, "Comparison"); } - - -TEST_P(ComparisonLayerTest, ComparisonTests) { - Run(); -} -} // namespace LayerTestsDefinitions \ No newline at end of file +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/concat.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/concat.cpp similarity index 77% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/concat.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/concat.cpp index 073f8eed5b6028..af5bfa39d25ee8 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/concat.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/concat.cpp @@ -2,21 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include - -#include "ie_core.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/skip_tests_config.hpp" - -#include "single_layer_tests/concat.hpp" +#include "shared_test_classes/single_layer/concat.hpp" namespace LayerTestsDefinitions { @@ -53,9 +39,4 @@ void ConcatLayerTest::SetUp() { ngraph::ResultVector results{std::make_shared(concat)}; function = std::make_shared(results, params, "concat"); } - - -TEST_P(ConcatLayerTest, CompareWithRefs) { - Run(); -}; -} // namespace LayerTestsDefinitions \ No newline at end of file +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/convert.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/convert.cpp similarity index 83% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/convert.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/convert.cpp index d45f2a2027419d..6c5ae263ae46be 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/convert.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/convert.cpp @@ -2,16 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/skip_tests_config.hpp" - -#include "single_layer_tests/convert.hpp" +#include "shared_test_classes/single_layer/convert.hpp" namespace LayerTestsDefinitions { @@ -42,8 +33,4 @@ void ConvertLayerTest::SetUp() { ngraph::ResultVector results{std::make_shared(convert)}; function = std::make_shared(results, params, "Convert"); } - -TEST_P(ConvertLayerTest, CompareWithRefs) { - Run(); -}; } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/convert_like.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/convert_like.cpp similarity index 84% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/convert_like.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/convert_like.cpp index cf11f2be059fa4..9f62289fc4ec61 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/convert_like.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/convert_like.cpp @@ -2,16 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/skip_tests_config.hpp" - -#include "single_layer_tests/convert_like.hpp" +#include "shared_test_classes/single_layer/convert_like.hpp" namespace LayerTestsDefinitions { @@ -44,8 +35,4 @@ void ConvertLikeLayerTest::SetUp() { ngraph::ResultVector results{std::make_shared(convertLike)}; function = std::make_shared(results, params, "ConvertLike"); } - -TEST_P(ConvertLikeLayerTest, CompareWithRefs) { - Run(); -}; } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/convolution.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/convolution.cpp similarity index 86% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/convolution.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/convolution.cpp index 9e02aeaae3abea..b4cff7443a5ed2 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/convolution.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/convolution.cpp @@ -2,21 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include - -#include "ie_core.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" - -#include "single_layer_tests/convolution.hpp" +#include "shared_test_classes/single_layer/convolution.hpp" namespace LayerTestsDefinitions { @@ -74,8 +60,4 @@ void ConvolutionLayerTest::SetUp() { ngraph::ResultVector results{std::make_shared(conv)}; function = std::make_shared(results, params, "convolution"); } - -TEST_P(ConvolutionLayerTest, CompareWithRefs) { - Run(); -} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/convolution_backprop_data.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/convolution_backprop_data.cpp similarity index 86% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/convolution_backprop_data.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/convolution_backprop_data.cpp index f94483609d2047..3d42398b444e59 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/convolution_backprop_data.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/convolution_backprop_data.cpp @@ -2,21 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include - -#include "ie_core.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" - -#include "single_layer_tests/convolution_backprop_data.hpp" +#include "shared_test_classes/single_layer/convolution_backprop_data.hpp" namespace LayerTestsDefinitions { @@ -72,8 +58,4 @@ void ConvolutionBackpropDataLayerTest::SetUp() { ngraph::ResultVector results{std::make_shared(convBackpropData)}; function = std::make_shared(results, params, "convolutionBackpropData"); } - -TEST_P(ConvolutionBackpropDataLayerTest, CompareWithRefs) { - Run(); -} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/ctc_greedy_decoder.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/ctc_greedy_decoder.cpp similarity index 79% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/ctc_greedy_decoder.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/ctc_greedy_decoder.cpp index c759aebd1456c5..7f073ea11ea566 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/ctc_greedy_decoder.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/ctc_greedy_decoder.cpp @@ -3,23 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include -#include - -#include "ie_core.hpp" -#include "ie_precision.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" - -#include "single_layer_tests/ctc_greedy_decoder.hpp" +#include "shared_test_classes/single_layer/ctc_greedy_decoder.hpp" namespace LayerTestsDefinitions { std::string CTCGreedyDecoderLayerTest::getTestCaseName( @@ -67,8 +51,4 @@ void CTCGreedyDecoderLayerTest::SetUp() { ngraph::ResultVector results{ std::make_shared(ctcGreedyDecoder) }; function = std::make_shared(results, paramsIn, "Grn"); } - -TEST_P(CTCGreedyDecoderLayerTest, CompareWithRefs) { - Run(); -}; } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/ctc_loss.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/ctc_loss.cpp similarity index 94% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/ctc_loss.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/ctc_loss.cpp index 83007bff637327..4e1047f0232f4b 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/ctc_loss.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/ctc_loss.cpp @@ -2,13 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include - #include "ngraph_functions/builders.hpp" -#include "single_layer_tests/ctc_loss.hpp" +#include "shared_test_classes/single_layer/ctc_loss.hpp" namespace LayerTestsDefinitions { @@ -64,8 +59,4 @@ void CTCLossLayerTest::SetUp() { ngraph::ResultVector results{std::make_shared(conv)}; function = std::make_shared(results, params, "CTCLoss"); } - -TEST_P(CTCLossLayerTest, CompareWithRefs) { - Run(); -} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/cum_sum.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/cum_sum.cpp similarity index 80% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/cum_sum.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/cum_sum.cpp index c45697acd3eaa0..1d8c0584dbca7e 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/cum_sum.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/cum_sum.cpp @@ -2,20 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include - -#include "ie_core.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" - -#include "single_layer_tests/cum_sum.hpp" +#include "shared_test_classes/single_layer/cum_sum.hpp" namespace LayerTestsDefinitions { @@ -56,9 +43,4 @@ void CumSumLayerTest::SetUp() { ngraph::ResultVector results{std::make_shared(cumSum)}; function = std::make_shared(results, paramVector, "cumsum"); } - -TEST_P(CumSumLayerTest, CompareWithRefs) { - Run(); -}; - } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/depth_to_space.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/depth_to_space.cpp similarity index 83% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/depth_to_space.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/depth_to_space.cpp index 30124195a7c2d2..9129ebea0790d9 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/depth_to_space.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/depth_to_space.cpp @@ -2,26 +2,13 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include +#include "ngraph_functions/builders.hpp" +#include "shared_test_classes/single_layer/depth_to_space.hpp" -#include -#include - -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "common_test_utils/common_utils.hpp" - -#include "single_layer_tests/depth_to_space.hpp" +namespace LayerTestsDefinitions { using namespace ngraph::opset3; -namespace LayerTestsDefinitions { - static inline std::string DepthToSpaceModeToString(const DepthToSpace::DepthToSpaceMode& mode) { static std::map names = { {DepthToSpace::DepthToSpaceMode::BLOCKS_FIRST, "BLOCKS_FIRST"}, @@ -64,9 +51,4 @@ void DepthToSpaceLayerTest::SetUp() { ngraph::ResultVector results{std::make_shared(d2s)}; function = std::make_shared(results, params, "DepthToSpace"); } - -TEST_P(DepthToSpaceLayerTest, CompareWithRefs) { - Run(); -}; - } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/detection_output.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/detection_output.cpp similarity index 96% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/detection_output.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/detection_output.cpp index 5a4f690d66ca85..a60c204db55eea 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/detection_output.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/detection_output.cpp @@ -2,13 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include - #include "ngraph_functions/builders.hpp" -#include "common_test_utils/data_utils.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "single_layer_tests/detection_output.hpp" +#include "shared_test_classes/single_layer/detection_output.hpp" namespace LayerTestsDefinitions { @@ -155,10 +150,5 @@ void DetectionOutputLayerTest::SetUp() { ngraph::ResultVector results{std::make_shared(detOut)}; function = std::make_shared(results, params, "DetectionOutput"); } - -TEST_P(DetectionOutputLayerTest, CompareWithRefs) { - Run(); -}; - } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/eltwise.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/eltwise.cpp similarity index 96% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/eltwise.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/eltwise.cpp index 1c407733fc4459..164587f60cac64 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/eltwise.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/eltwise.cpp @@ -3,15 +3,9 @@ // SPDX-License-Identifier: Apache-2.0 // -#include - -#include - -#include "functional_test_utils/layer_test_utils.hpp" #include "ngraph_functions/builders.hpp" #include "ngraph_functions/utils/ngraph_helpers.hpp" - -#include "single_layer_tests/eltwise.hpp" +#include "shared_test_classes/single_layer/eltwise.hpp" namespace LayerTestsDefinitions { @@ -113,9 +107,4 @@ void EltwiseLayerTest::SetUp() { auto eltwise = ngraph::builder::makeEltwise(input[0], secondaryInput, eltwiseType); function = std::make_shared(eltwise, input, "Eltwise"); } - - -TEST_P(EltwiseLayerTest, EltwiseTests) { - Run(); -} } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/embedding_bag_offsets_sum.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/embedding_bag_offsets_sum.cpp similarity index 90% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/embedding_bag_offsets_sum.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/embedding_bag_offsets_sum.cpp index 6b9435efed1e89..fc0e711bb75b6a 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/embedding_bag_offsets_sum.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/embedding_bag_offsets_sum.cpp @@ -2,17 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include - -#include "single_layer_tests/embedding_bag_offsets_sum.hpp" - -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/single_layer/embedding_bag_offsets_sum.hpp" #include "ngraph_functions/builders.hpp" - namespace LayerTestsDefinitions { std::string EmbeddingBagOffsetsSumLayerTest::getTestCaseName(testing::TestParamInfo obj) { @@ -59,8 +51,4 @@ void EmbeddingBagOffsetsSumLayerTest::SetUp() { ngraph::ResultVector results{std::make_shared(embBag)}; function = std::make_shared(results, params, "embeddingBagOffsetsSum"); } - -TEST_P(EmbeddingBagOffsetsSumLayerTest, CompareWithRefs) { - Run(); -} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/embedding_bag_packed_sum.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/embedding_bag_packed_sum.cpp similarity index 89% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/embedding_bag_packed_sum.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/embedding_bag_packed_sum.cpp index de642364d7ab20..98a70f092cf4d8 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/embedding_bag_packed_sum.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/embedding_bag_packed_sum.cpp @@ -1,18 +1,9 @@ // Copyright (C) 2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // - -#include -#include -#include -#include - -#include "single_layer_tests/embedding_bag_packed_sum.hpp" - -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/single_layer/embedding_bag_packed_sum.hpp" #include "ngraph_functions/builders.hpp" - namespace LayerTestsDefinitions { std::string EmbeddingBagPackedSumLayerTest::getTestCaseName(testing::TestParamInfo obj) { @@ -56,8 +47,4 @@ void EmbeddingBagPackedSumLayerTest::SetUp() { ngraph::ResultVector results{std::make_shared(embBag)}; function = std::make_shared(results, params, "embeddingBagPackedSum"); } - -TEST_P(EmbeddingBagPackedSumLayerTest, CompareWithRefs) { - Run(); -} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/embedding_segments_sum.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/embedding_segments_sum.cpp similarity index 91% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/embedding_segments_sum.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/embedding_segments_sum.cpp index 4e32a1535481dc..27e1ef7941596f 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/embedding_segments_sum.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/embedding_segments_sum.cpp @@ -2,14 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include - -#include "single_layer_tests/embedding_segments_sum.hpp" - -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/single_layer/embedding_segments_sum.hpp" #include "ngraph_functions/builders.hpp" @@ -60,9 +53,4 @@ void EmbeddingSegmentsSumLayerTest::SetUp() { ngraph::ResultVector results{std::make_shared(embBag)}; function = std::make_shared(results, params, "embeddingSegmentsSum"); } - -TEST_P(EmbeddingSegmentsSumLayerTest, CompareWithRefs) { - Run(); -} - } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/extract_image_patches.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/extract_image_patches.cpp similarity index 88% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/extract_image_patches.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/extract_image_patches.cpp index 3331d5603ee735..a10acf218f08fd 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/extract_image_patches.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/extract_image_patches.cpp @@ -2,16 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include - -#include "single_layer_tests/extract_image_patches.hpp" - -#include "functional_test_utils/layer_test_utils.hpp" +#include "shared_test_classes/single_layer/extract_image_patches.hpp" #include "ngraph_functions/builders.hpp" @@ -54,9 +45,4 @@ void ExtractImagePatchesTest::SetUp() { ngraph::ResultVector results{std::make_shared(extImgPatches)}; function = std::make_shared(results, params, "ExtractImagePatches"); } - -TEST_P(ExtractImagePatchesTest, CompareWithRefs) { - Run(); -}; - } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/fake_quantize.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/fake_quantize.cpp similarity index 80% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/fake_quantize.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/fake_quantize.cpp index 1c3bc5fd2c15c7..e09811ccb4f8c6 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/fake_quantize.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/fake_quantize.cpp @@ -2,32 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include - -#include "ie_core.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" - -#include "single_layer_tests/fake_quantize.hpp" - -// seed selected using current cloc time -#define USE_CLOCK_TIME 1 -// seed started from default value, and incremented every time using big number like 9999 -#define USE_INCREMENTAL_SEED 2 - -/** - * redefine this seed to reproduce issue with given seed that can be read from gtest logs - */ -#define BASE_SEED 123 -#define NGRAPH_SEED 123 +#include "shared_test_classes/single_layer/fake_quantize.hpp" namespace LayerTestsDefinitions { @@ -138,21 +113,4 @@ void FakeQuantizeLayerTest::UpdateSeed() { std::cout << "\033[0;32m" << "[ ] " << "\033[0;0m" << "seed = " << seed << std::endl; } - -TEST_P(FakeQuantizeLayerTest, CompareWithRefs) { - Run(); - SKIP_IF_CURRENT_TEST_IS_DISABLED(); - - if (BASE_SEED != USE_CLOCK_TIME && - BASE_SEED != USE_INCREMENTAL_SEED) { - return; - } - - size_t nIterations = 1; - for (; nIterations != 0; nIterations--) { - UpdateSeed(); - Infer(); - Validate(); - } -} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/gather.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/gather.cpp similarity index 84% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/gather.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/gather.cpp index 438e4755a7d1cb..8cfc86e6c0467e 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/gather.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/gather.cpp @@ -2,21 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include - -#include "ie_core.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/skip_tests_config.hpp" - -#include "single_layer_tests/gather.hpp" +#include "shared_test_classes/single_layer/gather.hpp" namespace LayerTestsDefinitions { @@ -65,9 +51,4 @@ void GatherLayerTest::SetUp() { GatherLayerTestBase::SetUp(GetParam()); } - -TEST_P(GatherLayerTest, CompareWithRefs) { - Run(); -}; - } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/gather_nd.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/gather_nd.cpp similarity index 93% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/gather_nd.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/gather_nd.cpp index be43cc93bec6a0..a566830357e4fd 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/gather_nd.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/gather_nd.cpp @@ -2,13 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include - #include "ngraph_functions/builders.hpp" -#include "single_layer_tests/gather_nd.hpp" +#include "shared_test_classes/single_layer/gather_nd.hpp" namespace LayerTestsDefinitions { @@ -59,8 +54,4 @@ void GatherNDLayerTest::SetUp() { ngraph::ResultVector results{std::make_shared(gather)}; function = std::make_shared(results, params, "gatherND"); } - -TEST_P(GatherNDLayerTest, CompareWithRefs) { - Run(); -} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/gather_tree.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/gather_tree.cpp similarity index 90% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/gather_tree.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/gather_tree.cpp index 08cc8c0246a52c..06ca1448b3f55e 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/gather_tree.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/gather_tree.cpp @@ -2,16 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/skip_tests_config.hpp" - -#include "single_layer_tests/gather_tree.hpp" +#include "shared_test_classes/single_layer/gather_tree.hpp" namespace LayerTestsDefinitions { std::string GatherTreeLayerTest::getTestCaseName(const testing::TestParamInfo &obj) { @@ -85,9 +76,4 @@ InferenceEngine::Blob::Ptr GatherTreeLayerTest::GenerateInput(const InferenceEng return FuncTestUtils::createAndFillBlob(info.getTensorDesc(), maxBeamIndx); } - -TEST_P(GatherTreeLayerTest, CompareWithRefs) { - Run(); -}; - } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/grn.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/grn.cpp similarity index 78% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/grn.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/grn.cpp index c35cee4e454524..4ebfbee9793e1e 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/grn.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/grn.cpp @@ -3,23 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include -#include - -#include "ie_core.hpp" -#include "ie_precision.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" - -#include "single_layer_tests/grn.hpp" +#include "shared_test_classes/single_layer/grn.hpp" namespace LayerTestsDefinitions { std::string GrnLayerTest::getTestCaseName(const testing::TestParamInfo& obj) { @@ -60,8 +44,4 @@ void GrnLayerTest::SetUp() { ngraph::ResultVector results{ std::make_shared(grn) }; function = std::make_shared(results, paramsIn, "Grn"); } - -TEST_P(GrnLayerTest, CompareWithRefs) { - Run(); -}; } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/group_convolution.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/group_convolution.cpp similarity index 86% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/group_convolution.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/group_convolution.cpp index 313921a6dd90f6..83ec247692d768 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/group_convolution.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/group_convolution.cpp @@ -2,21 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include - -#include "ie_core.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" - -#include "single_layer_tests/group_convolution.hpp" +#include "shared_test_classes/single_layer/group_convolution.hpp" namespace LayerTestsDefinitions { @@ -73,8 +59,4 @@ void GroupConvolutionLayerTest::SetUp() { ngraph::ResultVector results{std::make_shared(groupConv)}; function = std::make_shared(results, params, "groupConvolution"); } - -TEST_P(GroupConvolutionLayerTest, CompareWithRefs) { - Run(); -} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/group_convolution_backprop_data.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/group_convolution_backprop_data.cpp similarity index 86% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/group_convolution_backprop_data.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/group_convolution_backprop_data.cpp index 5e70506485ad08..ee13c9627abcf8 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/group_convolution_backprop_data.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/group_convolution_backprop_data.cpp @@ -2,21 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include - -#include "ie_core.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" - -#include "single_layer_tests/group_convolution_backprop_data.hpp" +#include "shared_test_classes/single_layer/group_convolution_backprop_data.hpp" namespace LayerTestsDefinitions { @@ -73,8 +59,4 @@ void GroupConvBackpropDataLayerTest::SetUp() { ngraph::ResultVector results{std::make_shared(groupConvBackpropData)}; function = std::make_shared(results, params, "GroupConvolutionBackpropData"); } - -TEST_P(GroupConvBackpropDataLayerTest, CompareWithRefs) { - Run(); -} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/gru_cell.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/gru_cell.cpp similarity index 87% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/gru_cell.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/gru_cell.cpp index 4258d4627baed4..3aea409dcb5e20 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/gru_cell.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/gru_cell.cpp @@ -2,22 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include - -#include "ie_core.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/skip_tests_config.hpp" - #include -#include "single_layer_tests/gru_cell.hpp" +#include "shared_test_classes/single_layer/gru_cell.hpp" namespace LayerTestsDefinitions { @@ -87,9 +73,4 @@ void GRUCellTest::SetUp() { m.run_passes(function); } } - - -TEST_P(GRUCellTest, CompareWithRefs) { - Run(); -}; } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/gru_sequence.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/gru_sequence.cpp similarity index 90% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/gru_sequence.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/gru_sequence.cpp index 875f1bfda71b90..ee8edd16937ebd 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/gru_sequence.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/gru_sequence.cpp @@ -2,23 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include - -#include "ie_core.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/skip_tests_config.hpp" - -#include "single_layer_tests/gru_sequence.hpp" -#include -#include +#include "shared_test_classes/single_layer/gru_sequence.hpp" +#include "transformations/op_conversions/bidirectional_sequences_decomposition.hpp" +#include "transformations/op_conversions/convert_sequences_to_tensor_iterator.hpp" namespace LayerTestsDefinitions { @@ -128,8 +114,4 @@ namespace LayerTestsDefinitions { } inferRequest.Infer(); } - - TEST_P(GRUSequenceTest, CompareWithRefs) { - Run(); - }; } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/interpolate.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/interpolate.cpp similarity index 93% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/interpolate.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/interpolate.cpp index 1d96cab5a958e6..072775a7a2e9f9 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/interpolate.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/interpolate.cpp @@ -2,16 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/layer_test_utils.hpp" - -#include "single_layer_tests/interpolate.hpp" +#include "shared_test_classes/single_layer/interpolate.hpp" #include "ngraph_functions/builders.hpp" #include "ngraph_functions/utils/ngraph_helpers.hpp" @@ -99,8 +90,4 @@ void InterpolateLayerTest::SetUp() { const ngraph::ResultVector results{std::make_shared(interpolate)}; function = std::make_shared(results, params, "interpolate"); } - -TEST_P(InterpolateLayerTest, CompareWithRefs) { - Run(); -} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/log_softmax.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/log_softmax.cpp similarity index 84% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/log_softmax.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/log_softmax.cpp index 998157158f3cca..df1b40fd90b6fa 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/log_softmax.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/log_softmax.cpp @@ -3,18 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "single_layer_tests/log_softmax.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/skip_tests_config.hpp" -#include "functional_test_utils/layer_test_utils.hpp" - -#include "ie_core.hpp" - -#include -#include -#include -#include +#include "shared_test_classes/single_layer/log_softmax.hpp" namespace LayerTestsDefinitions { @@ -62,9 +51,4 @@ void LogSoftmaxLayerTest::SetUp() { function = std::make_shared(results, params, "logSoftmax"); } - -TEST_P(LogSoftmaxLayerTest, CompareWithRefs) { - Run(); -} - } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/logical.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/logical.cpp similarity index 93% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/logical.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/logical.cpp index 14429e97c4db10..e1979af54f4c2c 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/logical.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/logical.cpp @@ -3,15 +3,8 @@ // SPDX-License-Identifier: Apache-2.0 // -#include - -#include - -#include "functional_test_utils/layer_test_utils.hpp" #include "ngraph_functions/builders.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" - -#include "single_layer_tests/logical.hpp" +#include "shared_test_classes/single_layer/logical.hpp" using namespace LayerTestsDefinitions::LogicalParams; @@ -87,9 +80,4 @@ void LogicalLayerTest::SetUp() { function = std::make_shared(logicalNode, inputs, "Logical"); } - - -TEST_P(LogicalLayerTest, LogicalTests) { - Run(); -} } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/loop.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/loop.cpp similarity index 63% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/loop.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/loop.cpp index 50f0ee590ae55f..1265757c0bf19d 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/loop.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/loop.cpp @@ -2,22 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include - -#include "ie_core.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/skip_tests_config.hpp" - -#include "single_layer_tests/loop.hpp" +#include "shared_test_classes/single_layer/loop.hpp" namespace LayerTestsDefinitions { @@ -154,11 +139,6 @@ namespace LayerTestsDefinitions { function = std::make_shared(ngraph::ResultVector{result0, result1, result2}, params, "loop"); } - - TEST_P(LoopTest, CompareWithRefs) { - Run(); - } - void StaticShapeLoopTest::SetUp() { SKIP_IF_CURRENT_TEST_IS_DISABLED() auto args_papck = std::tie(static_iter_num, max_iter_num, dynamic_exit, axis); @@ -287,115 +267,6 @@ namespace LayerTestsDefinitions { return {res}; } - TEST_P(StaticShapeLoopTest, CompareWithRefs) { - Run(); - } - - TEST_P(StaticShapeLoopTest, CompareWithPredefinedRefs) { - SKIP_IF_CURRENT_TEST_IS_DISABLED() - LoadNetwork(); - Infer(); - auto expectedOutputs = PredefinedRefs(); // use predefined refs instead of CalculateRefs function - const auto& actualOutputs = GetOutputs(); - - if (expectedOutputs.empty()) { - return; - } - - IE_ASSERT(actualOutputs.size() == expectedOutputs.size()) - << "nGraph interpreter has " << expectedOutputs.size() << " outputs, while IE " << actualOutputs.size(); - - Compare(expectedOutputs, actualOutputs); - } - - TEST_P(TrivialLoopTest, PassThroughBody) { - SKIP_IF_CURRENT_TEST_IS_DISABLED() - InferenceEngine::Precision iePrc; - InferenceEngine::SizeVector ieShape; - std::tie(iePrc, ieShape, targetDevice) = GetParam(); - - const auto prc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(iePrc); - const auto shape = ngraph::Shape{ieShape}; - const auto scalarShape = ngraph::Shape{}; - - auto start = std::make_shared(prc, shape); - auto count = std::make_shared(ngraph::element::i64, scalarShape, 5); - auto icond = std::make_shared(ngraph::element::boolean, scalarShape, true); - - // Loop body - auto b_data = std::make_shared(prc, shape); - auto b_cond = std::make_shared(ngraph::element::boolean, scalarShape); - - auto body = std::make_shared( - ngraph::OutputVector {b_cond, b_data}, // | passthrough body, no data changes - ngraph::ParameterVector {b_cond, b_data}); // | input -> output - - auto loop = std::make_shared(count, icond); - loop->set_function(body); - loop->set_special_body_ports({-1, 0}); - loop->set_invariant_input(b_cond, icond); - loop->set_invariant_input(b_data, start); - loop->get_iter_value(b_data, -1); - - function = std::make_shared( - ngraph::OutputVector {loop}, - ngraph::ParameterVector {start}); - - // Precalculated ref blobs - auto blob = make_blob_with_precision({iePrc, ieShape, InferenceEngine::TensorDesc::getLayoutByDims(ieShape)}); - blob->allocate(); - CommonTestUtils::fill_data_with_broadcast(blob, 0, {10}); - - inputGens[""] = [&] (InferenceEngine::TensorDesc tdesc) { return blob; }; - outputGens[""] = [&] (InferenceEngine::TensorDesc tdesc) { return blob; }; - - Run(); - } - - TEST_P(TrivialLoopTest, UnusedInputBody) { - SKIP_IF_CURRENT_TEST_IS_DISABLED() - InferenceEngine::Precision iePrc; - InferenceEngine::SizeVector ieShape; - std::tie(iePrc, ieShape, targetDevice) = GetParam(); - - const auto prc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(iePrc); - const auto shape = ngraph::Shape{ieShape}; - const auto scalarShape = ngraph::Shape{}; - - auto start = std::make_shared(prc, shape); - auto count = std::make_shared(ngraph::element::i64, scalarShape, 5); - auto icond = std::make_shared(ngraph::element::boolean, scalarShape, true); - - // Loop body - auto b_data = std::make_shared(prc, shape); - auto b_cond = std::make_shared(ngraph::element::boolean, scalarShape, true); - auto b_iter = std::make_shared(ngraph::element::i64, scalarShape); - - auto body = std::make_shared( - ngraph::OutputVector {b_cond, b_data}, - ngraph::ParameterVector {b_data, b_iter}); - - auto loop = std::make_shared(count, icond); - loop->set_function(body); - loop->set_special_body_ports({1, 0}); - loop->set_invariant_input(b_data, start); - loop->get_iter_value(b_data, -1); - - function = std::make_shared( - ngraph::OutputVector {loop}, - ngraph::ParameterVector {start}); - - // Precalculated ref blobs - auto blob = make_blob_with_precision({iePrc, ieShape, InferenceEngine::TensorDesc::getLayoutByDims(ieShape)}); - blob->allocate(); - CommonTestUtils::fill_data_with_broadcast(blob, 0, {10}); - - inputGens[""] = [&] (InferenceEngine::TensorDesc tdesc) { return blob; }; - outputGens[""] = [&] (InferenceEngine::TensorDesc tdesc) { return blob; }; - - Run(); - } - void TrivialLoopTest::CreateSlicedLoop(size_t batch_size, size_t num_iteration, InferenceEngine::Precision iePrc, InferenceEngine::SizeVector& ieShape) { const auto prc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(iePrc); @@ -471,106 +342,4 @@ namespace LayerTestsDefinitions { ngraph::OutputVector {loop}, ngraph::ParameterVector {to_slice}); } - - TEST_P(TrivialLoopTest, AutoSlicingInput_CheckPredefinedValues) { - SKIP_IF_CURRENT_TEST_IS_DISABLED() - InferenceEngine::Precision iePrc; - InferenceEngine::SizeVector ieShape; - std::tie(iePrc, ieShape, targetDevice) = GetParam(); - const size_t batch_size = 5; - const size_t num_iteration = 3; - ieShape[0] = 1; - auto ieShape_to_slice = ieShape; - ieShape_to_slice[0] = batch_size; - CreateSlicedLoop(batch_size, num_iteration, iePrc, ieShape); - Run(); - // Precalculated ref blobs - auto blob = make_blob_with_precision({iePrc, ieShape_to_slice, InferenceEngine::TensorDesc::getLayoutByDims(ieShape_to_slice)}); - blob->allocate(); - std::vector seq_raw_data(batch_size); - std::iota(seq_raw_data.begin(), seq_raw_data.end(), 1); - CommonTestUtils::fill_data_with_broadcast(blob, 0, seq_raw_data); - - auto blob_ref = make_blob_with_precision({iePrc, ieShape, InferenceEngine::TensorDesc::getLayoutByDims(ieShape)}); - blob_ref->allocate(); - CommonTestUtils::fill_data_with_broadcast(blob_ref, 0, { num_iteration * (num_iteration + 1) / 2}); - - inputGens[""] = [&] (InferenceEngine::TensorDesc tdesc) { return blob; }; - outputGens[""] = [&] (InferenceEngine::TensorDesc tdesc) { return blob_ref; }; - } - - TEST_P(TrivialLoopTest, AutoSlicingInputWithDynCondition_CheckPredefinedValues) { - SKIP_IF_CURRENT_TEST_IS_DISABLED() - InferenceEngine::Precision iePrc; - InferenceEngine::SizeVector ieShape; - std::tie(iePrc, ieShape, targetDevice) = GetParam(); - - // auto slicing size : 5 - // trip count limit : 4 - // dyn exit after iter : 3 - // --------------------- - // should exit after 4 iterations - const size_t batch_size = 5; - const size_t trip_count = 5; - const size_t num_iteration = 3; - - ieShape[0] = 1; - auto ieShape_to_slice = ieShape; - ieShape_to_slice[0] = batch_size; - - CreateSlicedLoopDynCondition(batch_size, num_iteration, iePrc, ieShape, trip_count); - // Precalculated ref blobs - auto blob = make_blob_with_precision({iePrc, ieShape_to_slice, InferenceEngine::TensorDesc::getLayoutByDims(ieShape_to_slice)}); - blob->allocate(); - std::vector seq_raw_data(batch_size); - std::iota(seq_raw_data.begin(), seq_raw_data.end(), 1); - CommonTestUtils::fill_data_with_broadcast(blob, 0, seq_raw_data); - - auto blob_ref = make_blob_with_precision({iePrc, ieShape, InferenceEngine::TensorDesc::getLayoutByDims(ieShape)}); - blob_ref->allocate(); - const size_t real_iter = num_iteration + 1; - CommonTestUtils::fill_data_with_broadcast(blob_ref, 0, { real_iter * (real_iter + 1) / 2}); - - inputGens[""] = [&] (InferenceEngine::TensorDesc tdesc) { return blob; }; - outputGens[""] = [&] (InferenceEngine::TensorDesc tdesc) { return blob_ref; }; - - Run(); - } - - TEST_P(TrivialLoopTest, AutoSlicingInput_CheckReference) { - SKIP_IF_CURRENT_TEST_IS_DISABLED() - InferenceEngine::Precision iePrc; - InferenceEngine::SizeVector ieShape; - std::tie(iePrc, ieShape, targetDevice) = GetParam(); - const size_t batch_size = 5; - const size_t num_iteration = 3; - ieShape[0] = 1; - auto ieShape_to_slice = ieShape; - ieShape_to_slice[0] = batch_size; - CreateSlicedLoop(batch_size, num_iteration, iePrc, ieShape); - Run(); - } - - TEST_P(TrivialLoopTest, AutoSlicingInputWithDynCondition_CheckReference) { - SKIP_IF_CURRENT_TEST_IS_DISABLED() - InferenceEngine::Precision iePrc; - InferenceEngine::SizeVector ieShape; - std::tie(iePrc, ieShape, targetDevice) = GetParam(); - - // auto slicing size : 5 - // trip count limit : 4 - // dyn exit after iter : 3 - // --------------------- - // should exit after 4 iterations - const size_t batch_size = 5; - const size_t trip_count = 5; - const size_t num_iteration = 3; - - ieShape[0] = 1; - auto ieShape_to_slice = ieShape; - ieShape_to_slice[0] = batch_size; - - CreateSlicedLoopDynCondition(batch_size, num_iteration, iePrc, ieShape, trip_count); - Run(); - } } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/lrn.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/lrn.cpp similarity index 92% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/lrn.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/lrn.cpp index e374649f91980d..2170c3f2114569 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/lrn.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/lrn.cpp @@ -3,12 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include - -#include "single_layer_tests/lrn.hpp" +#include "shared_test_classes/single_layer/lrn.hpp" namespace LayerTestsDefinitions { @@ -56,8 +51,4 @@ void LrnLayerTest::SetUp() { ngraph::ResultVector results {std::make_shared(lrn)}; function = std::make_shared(results, params, "lrn"); } - -TEST_P(LrnLayerTest, CompareWithRefs) { - Run(); -} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/lstm_cell.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/lstm_cell.cpp similarity index 85% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/lstm_cell.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/lstm_cell.cpp index 81fe07d1a05802..0d38fbea707731 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/lstm_cell.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/lstm_cell.cpp @@ -2,22 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include - -#include "ie_core.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/skip_tests_config.hpp" - -#include -#include "single_layer_tests/lstm_cell.hpp" +#include "transformations/op_conversions/lstm_cell_decomposition.hpp" +#include "shared_test_classes/single_layer/lstm_cell.hpp" namespace LayerTestsDefinitions { @@ -81,9 +67,4 @@ void LSTMCellTest::SetUp() { m.run_passes(function); } } - - -TEST_P(LSTMCellTest, CompareWithRefs) { - Run(); -}; } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/lstm_sequence.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/lstm_sequence.cpp similarity index 89% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/lstm_sequence.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/lstm_sequence.cpp index 88c113929cc98d..1756a0616c544a 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/lstm_sequence.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/lstm_sequence.cpp @@ -2,24 +2,10 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include - -#include "ie_core.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/skip_tests_config.hpp" - -#include "single_layer_tests/lstm_sequence.hpp" -#include -#include -#include +#include "shared_test_classes/single_layer/lstm_sequence.hpp" +#include "transformations/op_conversions/bidirectional_sequences_decomposition.hpp" +#include "transformations/op_conversions/convert_sequences_to_tensor_iterator.hpp" +#include "ngraph/pass/visualize_tree.hpp" namespace LayerTestsDefinitions { @@ -128,8 +114,4 @@ namespace LayerTestsDefinitions { } inferRequest.Infer(); } - - TEST_P(LSTMSequenceTest, CompareWithRefs) { - Run(); - }; } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/mat_mul.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/mat_mul.cpp similarity index 95% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/mat_mul.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/mat_mul.cpp index 0d057604afd6d9..19a6f9fa10d437 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/mat_mul.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/mat_mul.cpp @@ -2,14 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include - -#include "single_layer_tests/mat_mul.hpp" #include "ngraph_functions/builders.hpp" +#include "shared_test_classes/single_layer/mat_mul.hpp" namespace LayerTestsDefinitions { @@ -81,8 +75,4 @@ void MatMulTest::SetUp() { function = std::make_shared(results, params, "MatMul"); } -TEST_P(MatMulTest, CompareWithRefs) { - Run(); -}; - } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/minimum_maximum.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/minimum_maximum.cpp similarity index 86% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/minimum_maximum.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/minimum_maximum.cpp index 25ee6fffbdcea2..8d9545abf48dea 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/minimum_maximum.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/minimum_maximum.cpp @@ -2,16 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/skip_tests_config.hpp" -#include "single_layer_tests/minimum_maximum.hpp" +#include "shared_test_classes/single_layer/minimum_maximum.hpp" namespace LayerTestsDefinitions { std::string MaxMinLayerTest::getTestCaseName(const testing::TestParamInfo &obj) { @@ -56,8 +47,4 @@ namespace LayerTestsDefinitions { auto op = ngraph::builder::makeMinMax(input[0], secondaryInput, opType); function = std::make_shared(op, input, "MinMax"); } - - TEST_P(MaxMinLayerTest, CompareWithRefs){ - Run(); - }; } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/mvn.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/mvn.cpp similarity index 77% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/mvn.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/mvn.cpp index e21fd7732d653a..ea42aec04ef0d3 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/mvn.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/mvn.cpp @@ -2,22 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include - -#include "ie_core.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" - -#include "single_layer_tests/mvn.hpp" +#include "shared_test_classes/single_layer/mvn.hpp" namespace LayerTestsDefinitions { @@ -51,9 +36,4 @@ void MvnLayerTest::SetUp() { ngraph::ResultVector results{std::make_shared(mvn)}; function = std::make_shared(results, param, "mvn"); } - -TEST_P(MvnLayerTest, CompareWithRefs) { - Run(); -}; - } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/non_max_suppression.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/non_max_suppression.cpp similarity index 98% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/non_max_suppression.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/non_max_suppression.cpp index d9a6869e5a3d9b..5554dcfd0294d3 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/non_max_suppression.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/non_max_suppression.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "single_layer_tests/non_max_suppression.hpp" +#include "shared_test_classes/single_layer/non_max_suppression.hpp" namespace LayerTestsDefinitions { @@ -133,8 +133,4 @@ void NmsLayerTest::SetUp() { function = std::make_shared(OutputVector{nms_0_identity, nms_1_identity, nms_2_identity}, params, "NMS"); } -TEST_P(NmsLayerTest, CompareWithRefs) { - Run(); -}; - } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/nonzero.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/nonzero.cpp similarity index 82% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/nonzero.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/nonzero.cpp index ccfe5c59e266e8..3964348637c110 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/nonzero.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/nonzero.cpp @@ -3,18 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "single_layer_tests/nonzero.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/skip_tests_config.hpp" -#include "functional_test_utils/layer_test_utils.hpp" - -#include "ie_core.hpp" - -#include -#include -#include -#include +#include "shared_test_classes/single_layer/nonzero.hpp" namespace LayerTestsDefinitions { @@ -49,8 +38,4 @@ void NonZeroLayerTest::SetUp() { ngraph::ResultVector results{std::make_shared(nonZeroOp)}; function = std::make_shared(results, ngraph::ParameterVector{paramNode}, "non_zero"); } - -TEST_P(NonZeroLayerTest, CompareWithReference) { - Run(); -} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/normalize_l2.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/normalize_l2.cpp similarity index 93% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/normalize_l2.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/normalize_l2.cpp index 3d6c472e3fcebf..5562bba1b29edc 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/normalize_l2.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/normalize_l2.cpp @@ -2,8 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "single_layer_tests/normalize_l2.hpp" - +#include "shared_test_classes/single_layer/normalize_l2.hpp" namespace LayerTestsDefinitions { @@ -40,8 +39,4 @@ void NormalizeL2LayerTest::SetUp() { function = std::make_shared(results, params, "NormalizeL2"); } -TEST_P(NormalizeL2LayerTest, CompareWithRefs) { - Run(); -} - } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/pad.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/pad.cpp similarity index 92% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/pad.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/pad.cpp index 08c62661b87571..0a0ef76222ff6b 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/pad.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/pad.cpp @@ -2,14 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include - -#include "single_layer_tests/pad.hpp" - +#include "shared_test_classes/single_layer/pad.hpp" namespace LayerTestsDefinitions { @@ -57,9 +50,4 @@ void PadLayerTest::SetUp() { ngraph::ResultVector results{std::make_shared(pad)}; function = std::make_shared(results, params, "pad"); } - -TEST_P(PadLayerTest, CompareWithRefs) { - Run(); -} - } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/pooling.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/pooling.cpp similarity index 92% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/pooling.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/pooling.cpp index f77b4d38b3aa90..f768a27d954ed9 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/pooling.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/pooling.cpp @@ -3,22 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include - -#include "ie_core.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/skip_tests_config.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" - - -#include "single_layer_tests/pooling.hpp" +#include "shared_test_classes/single_layer/pooling.hpp" namespace LayerTestsDefinitions { @@ -177,16 +162,4 @@ void GlobalPoolingLayerTest::SetUp() { ngraph::ResultVector results{std::make_shared(pooling)}; function = std::make_shared(results, params, "pooling"); } - -TEST_P(PoolingLayerTest, CompareWithRefs) { - Run(); -} - -TEST_P(GlobalPoolingLayerTest, CompareWithRefs) { - Run(); - - if (targetDevice == std::string{CommonTestUtils::DEVICE_GPU}) { - PluginCache::get().reset(); - } -} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/power.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/power.cpp similarity index 89% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/power.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/power.cpp index 56413e815c2c26..6f8f341f7a8fef 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/power.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/power.cpp @@ -2,10 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/skip_tests_config.hpp" -#include "single_layer_tests/power.hpp" +#include "shared_test_classes/single_layer/power.hpp" namespace LayerTestsDefinitions { std::string PowerLayerTest::getTestCaseName(const testing::TestParamInfo &obj) { @@ -44,8 +41,4 @@ namespace LayerTestsDefinitions { function = std::make_shared(pow, paramsIn, "power"); } - - TEST_P(PowerLayerTest, CompareWithRefs){ - Run(); - }; } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/prior_box_clustered.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/prior_box_clustered.cpp similarity index 92% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/prior_box_clustered.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/prior_box_clustered.cpp index 1530eaa6252fbe..57bab8cdacfb08 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/prior_box_clustered.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/prior_box_clustered.cpp @@ -3,24 +3,8 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include -#include - -#include "ie_core.hpp" -#include "ie_precision.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" - -#include "single_layer_tests/prior_box_clustered.hpp" #include "legacy/ngraph_ops/prior_box_clustered_ie.hpp" +#include "shared_test_classes/single_layer/prior_box_clustered.hpp" namespace LayerTestsDefinitions { std::string PriorBoxClusteredLayerTest::getTestCaseName(const testing::TestParamInfo& obj) { @@ -186,8 +170,4 @@ void PriorBoxClusteredLayerTest::SetUp() { ngraph::ResultVector results{ std::make_shared(priorBoxClustered) }; function = std::make_shared(results, paramsIn, "PB_Clustered"); } - -TEST_P(PriorBoxClusteredLayerTest, CompareWithRefs) { - Run(); -}; } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/proposal.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/proposal.cpp similarity index 92% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/proposal.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/proposal.cpp index 5a8cdb39c11561..ac4838fd083e63 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/proposal.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/proposal.cpp @@ -2,21 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include - -#include "ie_core.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" - -#include "single_layer_tests/proposal.hpp" +#include "shared_test_classes/single_layer/proposal.hpp" namespace LayerTestsDefinitions { @@ -151,8 +137,4 @@ InferenceEngine::Blob::Ptr ProposalLayerTest::GenerateInput(const InferenceEngin // TODO: for validation, reference version is required (#28373) void ProposalLayerTest::Validate() {} - -TEST_P(ProposalLayerTest, CompareWithRefs) { - Run(); -} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/psroi_pooling.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/psroi_pooling.cpp similarity index 92% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/psroi_pooling.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/psroi_pooling.cpp index d184a8ec456588..bcc0ee146d826b 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/psroi_pooling.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/psroi_pooling.cpp @@ -3,19 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/skip_tests_config.hpp" -#include "functional_test_utils/layer_test_utils.hpp" - -#include "single_layer_tests/psroi_pooling.hpp" - -using namespace InferenceEngine; -using namespace FuncTestUtils::PrecisionUtils; +#include "shared_test_classes/single_layer/psroi_pooling.hpp" namespace LayerTestsDefinitions { @@ -98,7 +86,7 @@ namespace LayerTestsDefinitions { size_t it = 0; for (const auto &input : cnnNetwork.getInputsInfo()) { const auto &info = input.second; - Blob::Ptr blob; + InferenceEngine::Blob::Ptr blob; if (it == 1) { blob = make_blob_with_precision(info->getTensorDesc()); @@ -139,8 +127,4 @@ namespace LayerTestsDefinitions { ngraph::ResultVector results{std::make_shared(psroiPooling)}; function = std::make_shared(results, params, "psroi_pooling"); } - - TEST_P(PSROIPoolingLayerTest, CompareWithRefs) { - Run(); - } } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/range.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/range.cpp similarity index 94% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/range.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/range.cpp index 55dcc0cf129d54..2a4d5d61bb4626 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/range.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/range.cpp @@ -3,17 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include - -#include "ie_precision.hpp" - -#include "functional_test_utils/layer_test_utils.hpp" - -#include "single_layer_tests/range.hpp" +#include "shared_test_classes/single_layer/range.hpp" namespace LayerTestsDefinitions { @@ -128,9 +118,4 @@ void RangeNumpyLayerTest::SetUp() { const ngraph::ResultVector results{std::make_shared(range)}; function = std::make_shared(results, params, "Range"); } - -TEST_P(RangeNumpyLayerTest, CompareWithRefs) { - Run(); -} - } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/reduce_ops.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/reduce_ops.cpp similarity index 87% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/reduce_ops.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/reduce_ops.cpp index 507944f692c973..34f055bcdbf8be 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/reduce_ops.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/reduce_ops.cpp @@ -2,20 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include - -#include "ie_core.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/layer_test_utils.hpp" - -#include "single_layer_tests/reduce_ops.hpp" +#include "shared_test_classes/single_layer/reduce_ops.hpp" namespace LayerTestsDefinitions { @@ -83,10 +70,6 @@ void ReduceOpsLayerTest::SetUp() { function = std::make_shared(results, params, "Reduce"); } -TEST_P(ReduceOpsLayerTest, CompareWithRefs) { - Run(); -} - InferenceEngine::Blob::Ptr ReduceOpsLayerWithSpecificInputTest::GenerateInput(const InferenceEngine::InputInfo &info) const { auto axis_vec = std::get<0>(GetParam()); IE_ASSERT(axis_vec.size() == 1); @@ -105,8 +88,4 @@ InferenceEngine::Blob::Ptr ReduceOpsLayerWithSpecificInputTest::GenerateInput(co return blob; } -TEST_P(ReduceOpsLayerWithSpecificInputTest, CompareWithRefs) { - Run(); -} - } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/region_yolo.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/region_yolo.cpp similarity index 84% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/region_yolo.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/region_yolo.cpp index fbbd2cc627dd02..928954ddb6e4ed 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/region_yolo.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/region_yolo.cpp @@ -2,15 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "ie_core.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/skip_tests_config.hpp" - -#include "single_layer_tests/region_yolo.hpp" +#include "shared_test_classes/single_layer/region_yolo.hpp" namespace LayerTestsDefinitions { @@ -56,8 +48,4 @@ void RegionYoloLayerTest::SetUp() { function = std::make_shared(std::make_shared(region_yolo), ngraph::ParameterVector{param}, "RegionYolo"); } -TEST_P(RegionYoloLayerTest, CompareWithRefs) { - Run(); -}; - } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/reorg_yolo.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/reorg_yolo.cpp similarity index 77% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/reorg_yolo.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/reorg_yolo.cpp index 716e271d0d5dd2..bd4087cb228e51 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/reorg_yolo.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/reorg_yolo.cpp @@ -2,15 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "ie_core.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/skip_tests_config.hpp" - -#include "single_layer_tests/reorg_yolo.hpp" +#include "shared_test_classes/single_layer/reorg_yolo.hpp" namespace LayerTestsDefinitions { @@ -39,8 +31,4 @@ void ReorgYoloLayerTest::SetUp() { function = std::make_shared(std::make_shared(reorg_yolo), ngraph::ParameterVector{param}, "ReorgYolo"); } -TEST_P(ReorgYoloLayerTest, CompareWithRefs) { - Run(); -}; - } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/reshape.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/reshape.cpp similarity index 84% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/reshape.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/reshape.cpp index cda6f4b9dde0f2..b36296b69dd254 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/reshape.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/reshape.cpp @@ -2,18 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include -#include - -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "common_test_utils/common_utils.hpp" -#include "single_layer_tests/reshape.hpp" +#include "shared_test_classes/single_layer/reshape.hpp" namespace LayerTestsDefinitions { std::string ReshapeLayerTest::getTestCaseName(testing::TestParamInfo obj) { @@ -54,8 +43,4 @@ void ReshapeLayerTest::SetUp() { ngraph::ResultVector results{std::make_shared(reshape)}; function = std::make_shared(results, paramsIn, "Reshape"); } - -TEST_P(ReshapeLayerTest, CompareWithRefsDynamicBath) { - Run(); -} } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/reverse_sequence.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/reverse_sequence.cpp similarity index 87% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/reverse_sequence.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/reverse_sequence.cpp index d56bb12b25b021..0977ddcd1fb946 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/reverse_sequence.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/reverse_sequence.cpp @@ -2,16 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/skip_tests_config.hpp" - -#include "single_layer_tests/reverse_sequence.hpp" +#include "shared_test_classes/single_layer/reverse_sequence.hpp" namespace LayerTestsDefinitions { std::string ReverseSequenceLayerTest::getTestCaseName(const testing::TestParamInfo &obj) { @@ -60,8 +51,4 @@ void ReverseSequenceLayerTest::SetUp() { function = std::make_shared(results, paramsIn, "ReverseSequence"); } -TEST_P(ReverseSequenceLayerTest, CompareWithRefs) { - Run(); -}; - } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/rnn_cell.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/rnn_cell.cpp similarity index 83% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/rnn_cell.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/rnn_cell.cpp index be04765dd6fc15..9175872007eed2 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/rnn_cell.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/rnn_cell.cpp @@ -2,22 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include - -#include "ie_core.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/skip_tests_config.hpp" - -#include -#include "single_layer_tests/rnn_cell.hpp" +#include "transformations/op_conversions/rnn_cell_decomposition.hpp" +#include "shared_test_classes/single_layer/rnn_cell.hpp" namespace LayerTestsDefinitions { @@ -75,9 +61,4 @@ void RNNCellTest::SetUp() { m.run_passes(function); } } - - -TEST_P(RNNCellTest, CompareWithRefs) { - Run(); -}; } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/rnn_sequence.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/rnn_sequence.cpp similarity index 89% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/rnn_sequence.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/rnn_sequence.cpp index 42aab9d64bef54..e0a660203cfd88 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/rnn_sequence.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/rnn_sequence.cpp @@ -2,23 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include - -#include "ie_core.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/skip_tests_config.hpp" - -#include "single_layer_tests/rnn_sequence.hpp" -#include -#include +#include "transformations/op_conversions/bidirectional_sequences_decomposition.hpp" +#include "transformations/op_conversions/convert_sequences_to_tensor_iterator.hpp" +#include "shared_test_classes/single_layer/rnn_sequence.hpp" namespace LayerTestsDefinitions { @@ -126,8 +112,4 @@ namespace LayerTestsDefinitions { } inferRequest.Infer(); } - - TEST_P(RNNSequenceTest, CompareWithRefs) { - Run(); - }; } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/roi_pooling.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/roi_pooling.cpp similarity index 89% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/roi_pooling.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/roi_pooling.cpp index c2f7d584558420..d0b7efa2889c13 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/roi_pooling.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/roi_pooling.cpp @@ -3,19 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/skip_tests_config.hpp" -#include "functional_test_utils/layer_test_utils.hpp" - -#include "single_layer_tests/roi_pooling.hpp" - -using namespace InferenceEngine; -using namespace FuncTestUtils::PrecisionUtils; +#include "shared_test_classes/single_layer/roi_pooling.hpp" namespace LayerTestsDefinitions { @@ -59,7 +47,7 @@ namespace LayerTestsDefinitions { size_t it = 0; for (const auto &input : cnnNetwork.getInputsInfo()) { const auto &info = input.second; - Blob::Ptr blob; + InferenceEngine::Blob::Ptr blob; if (it == 1) { blob = make_blob_with_precision(info->getTensorDesc()); @@ -97,8 +85,4 @@ namespace LayerTestsDefinitions { ngraph::ResultVector results{std::make_shared(roi_pooling)}; function = std::make_shared(results, params, "roi_pooling"); } - - TEST_P(ROIPoolingLayerTest, CompareWithRefs) { - Run(); - } } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/scatter_ND_update.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/scatter_ND_update.cpp similarity index 88% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/scatter_ND_update.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/scatter_ND_update.cpp index 2191c30138e4bc..d8c07e3fad8464 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/scatter_ND_update.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/scatter_ND_update.cpp @@ -2,23 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "common_test_utils/common_utils.hpp" - -#include "single_layer_tests/scatter_ND_update.hpp" - -using namespace ngraph::opset3; +#include "ngraph_functions/builders.hpp" +#include "shared_test_classes/single_layer/scatter_ND_update.hpp" namespace LayerTestsDefinitions { @@ -86,9 +71,4 @@ void ScatterNDUpdateLayerTest::SetUp() { ngraph::ResultVector results{std::make_shared(s2d)}; function = std::make_shared(results, paramVector, "ScatterNDUpdate"); } - -TEST_P(ScatterNDUpdateLayerTest, CompareWithRefs) { - Run(); -}; - } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/scatter_elements_update.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/scatter_elements_update.cpp similarity index 85% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/scatter_elements_update.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/scatter_elements_update.cpp index c0a9904f29765d..b9422c46fdf74a 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/scatter_elements_update.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/scatter_elements_update.cpp @@ -2,23 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "common_test_utils/common_utils.hpp" - -#include "single_layer_tests/scatter_elements_update.hpp" - -using namespace ngraph::opset3; +#include "ngraph_functions/builders.hpp" +#include "shared_test_classes/single_layer/scatter_elements_update.hpp" namespace LayerTestsDefinitions { @@ -74,9 +59,4 @@ void ScatterElementsUpdateLayerTest::SetUp() { ngraph::ResultVector results{std::make_shared(s2d)}; function = std::make_shared(results, paramVector, "ScatterElementsUpdate"); } - -TEST_P(ScatterElementsUpdateLayerTest, CompareWithRefs) { - Run(); -}; - } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/scatter_update.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/scatter_update.cpp similarity index 89% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/scatter_update.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/scatter_update.cpp index ae5909acec21f5..07cf1e1a72a981 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/scatter_update.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/scatter_update.cpp @@ -2,26 +2,10 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "common_test_utils/common_utils.hpp" - -#include "single_layer_tests/scatter_update.hpp" - -using namespace ngraph::opset3; +#include "ngraph_functions/builders.hpp" +#include "shared_test_classes/single_layer/scatter_update.hpp" namespace LayerTestsDefinitions { - std::string ScatterUpdateLayerTest::getTestCaseName(const testing::TestParamInfo &obj) { axisUpdateShapeInShape shapeDescript; std::vector inShape; @@ -97,9 +81,4 @@ void ScatterUpdateLayerTest::SetUp() { ngraph::ResultVector results{std::make_shared(s2d)}; function = std::make_shared(results, paramVector, "ScatterUpdate"); } - -TEST_P(ScatterUpdateLayerTest, CompareWithRefs) { - Run(); -}; - } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/select.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/select.cpp similarity index 82% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/select.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/select.cpp index 52d28308ff2524..43f20309cb2642 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/select.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/select.cpp @@ -2,21 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include - -#include -#include - -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/skip_tests_config.hpp" -#include "functional_test_utils/plugin_cache.hpp" - -#include "single_layer_tests/select.hpp" +#include "shared_test_classes/single_layer/select.hpp" namespace LayerTestsDefinitions { enum { CONDITION, THEN, ELSE, numOfInputs }; @@ -56,9 +42,4 @@ namespace LayerTestsDefinitions { ngraph::ResultVector results{std::make_shared(select)}; function = std::make_shared(results, paramNodesVector, "select"); } - - TEST_P(SelectLayerTest, CompareWithRefImpl) { - Run(); - } - } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/shape_of.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/shape_of.cpp similarity index 73% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/shape_of.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/shape_of.cpp index e1cafa6df6318e..98522daf5e722f 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/shape_of.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/shape_of.cpp @@ -2,22 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include - -#include "ie_core.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" - -#include "single_layer_tests/shape_of.hpp" +#include "shared_test_classes/single_layer/shape_of.hpp" namespace LayerTestsDefinitions { @@ -45,8 +30,4 @@ namespace LayerTestsDefinitions { function = std::make_shared(results, param, "shapeOf"); } - TEST_P(ShapeOfLayerTest, CompareWithRefs) { - Run(); - } - } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/shuffle_channels.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/shuffle_channels.cpp similarity index 91% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/shuffle_channels.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/shuffle_channels.cpp index 397d341b794f5d..1217ea256c68b4 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/shuffle_channels.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/shuffle_channels.cpp @@ -2,14 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include - -#include "single_layer_tests/shuffle_channels.hpp" #include "ngraph_functions/builders.hpp" +#include "shared_test_classes/single_layer/shuffle_channels.hpp" namespace LayerTestsDefinitions { @@ -53,8 +47,4 @@ void ShuffleChannelsLayerTest::SetUp() { ngraph::ResultVector results{std::make_shared(shuffleChannels)}; function = std::make_shared(results, params, "shuffleChannels"); } - -TEST_P(ShuffleChannelsLayerTest, CompareWithRefs) { - Run(); -} } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/softmax.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/softmax.cpp similarity index 83% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/softmax.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/softmax.cpp index dfa6d64880f399..1b00d622882f3d 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/softmax.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/softmax.cpp @@ -3,20 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "single_layer_tests/softmax.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/skip_tests_config.hpp" -#include "functional_test_utils/layer_test_utils.hpp" - -#include "ie_core.hpp" - -#include "ngraph/op/softmax.hpp" - -#include -#include -#include -#include +#include "shared_test_classes/single_layer/softmax.hpp" namespace LayerTestsDefinitions { @@ -64,9 +51,4 @@ void SoftMaxLayerTest::SetUp() { function = std::make_shared(results, params, "softMax"); } - -TEST_P(SoftMaxLayerTest, CompareWithRefs) { - Run(); -} - } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/space_to_batch.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/space_to_batch.cpp similarity index 82% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/space_to_batch.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/space_to_batch.cpp index ed576b42e0c536..264d42e924a7cf 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/space_to_batch.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/space_to_batch.cpp @@ -2,21 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "common_test_utils/common_utils.hpp" - -#include "single_layer_tests/space_to_batch.hpp" +#include "ngraph_functions/builders.hpp" +#include "shared_test_classes/single_layer/space_to_batch.hpp" namespace LayerTestsDefinitions { @@ -56,9 +43,4 @@ void SpaceToBatchLayerTest::SetUp() { ngraph::ResultVector results{std::make_shared(s2b)}; function = std::make_shared(results, params, "SpaceToBatch"); } - -TEST_P(SpaceToBatchLayerTest, CompareWithRefs) { - Run(); -} - } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/space_to_depth.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/space_to_depth.cpp similarity index 83% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/space_to_depth.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/space_to_depth.cpp index ff61a2ae7515c1..49266bd4db38eb 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/space_to_depth.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/space_to_depth.cpp @@ -2,26 +2,13 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include +#include "ngraph_functions/builders.hpp" +#include "shared_test_classes/single_layer/space_to_depth.hpp" -#include -#include - -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "common_test_utils/common_utils.hpp" - -#include "single_layer_tests/space_to_depth.hpp" +namespace LayerTestsDefinitions { using namespace ngraph::opset3; -namespace LayerTestsDefinitions { - static inline std::string SpaceToDepthModeToString(const SpaceToDepth::SpaceToDepthMode& mode) { static std::map names = { {SpaceToDepth::SpaceToDepthMode::BLOCKS_FIRST, "BLOCKS_FIRST"}, @@ -64,9 +51,4 @@ void SpaceToDepthLayerTest::SetUp() { ngraph::ResultVector results{std::make_shared(s2d)}; function = std::make_shared(results, params, "SpaceToDepth"); } - -TEST_P(SpaceToDepthLayerTest, CompareWithRefs) { - Run(); -}; - } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/split.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/split.cpp similarity index 82% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/split.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/split.cpp index b2a73675652214..a0d0e205839fe7 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/split.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/split.cpp @@ -2,22 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include - -#include "ie_core.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" - -#include "single_layer_tests/split.hpp" +#include "shared_test_classes/single_layer/split.hpp" namespace LayerTestsDefinitions { @@ -70,9 +55,4 @@ void SplitLayerTest::SetUp() { } function = std::make_shared(results, params, "split"); } - -TEST_P(SplitLayerTest, CompareWithRefs) { - Run(); -}; - } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/squeeze_unsqueeze.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/squeeze_unsqueeze.cpp similarity index 84% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/squeeze_unsqueeze.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/squeeze_unsqueeze.cpp index 979511140ed072..e2a760280a874f 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/squeeze_unsqueeze.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/squeeze_unsqueeze.cpp @@ -3,18 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include - -#include "ie_precision.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/layer_test_utils.hpp" - -#include "single_layer_tests/squeeze_unsqueeze.hpp" +#include "shared_test_classes/single_layer/squeeze_unsqueeze.hpp" namespace LayerTestsDefinitions { std::string SqueezeUnsqueezeLayerTest::getTestCaseName(testing::TestParamInfo obj) { @@ -54,9 +43,4 @@ void SqueezeUnsqueezeLayerTest::SetUp() { const ngraph::ResultVector results{std::make_shared(squeeze)}; function = std::make_shared(results, params, "Squeeze"); } - -TEST_P(SqueezeUnsqueezeLayerTest, CompareWithRefs) { - Run(); -} - } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/strided_slice.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/strided_slice.cpp similarity index 86% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/strided_slice.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/strided_slice.cpp index 215da3225a6792..4fd9c256262ed3 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/strided_slice.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/strided_slice.cpp @@ -2,21 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include +#include "ngraph_functions/builders.hpp" -#include -#include - -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "common_test_utils/common_utils.hpp" - -#include "single_layer_tests/strided_slice.hpp" +#include "shared_test_classes/single_layer/strided_slice.hpp" namespace LayerTestsDefinitions { @@ -64,8 +52,4 @@ void StridedSliceLayerTest::SetUp() { function = std::make_shared(results, params, "StridedSlice"); } -TEST_P(StridedSliceLayerTest, CompareWithRefs) { - Run(); -} - } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/tensor_iterator.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/tensor_iterator.cpp similarity index 96% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/tensor_iterator.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/tensor_iterator.cpp index 4b166d129098dc..411b3973c3b134 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/tensor_iterator.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/tensor_iterator.cpp @@ -2,22 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include - -#include "ie_core.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/skip_tests_config.hpp" - -#include "single_layer_tests/tensor_iterator.hpp" #include +#include "shared_test_classes/single_layer/tensor_iterator.hpp" namespace LayerTestsDefinitions { @@ -235,8 +221,4 @@ namespace LayerTestsDefinitions { m.run_passes(function); } } - - TEST_P(TensorIteratorTest, CompareWithRefs) { - Run(); - }; } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/tile.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/tile.cpp similarity index 90% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/tile.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/tile.cpp index f5650714e32014..d4ce236d9a2e58 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/tile.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/tile.cpp @@ -2,14 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include - -#include "single_layer_tests/tile.hpp" - +#include "shared_test_classes/single_layer/tile.hpp" namespace LayerTestsDefinitions { @@ -48,8 +41,4 @@ void TileLayerTest::SetUp() { function = std::make_shared(results, params, "tile"); } -TEST_P(TileLayerTest, CompareWithRefs) { - Run(); -} - } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/topk.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/topk.cpp similarity index 95% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/topk.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/topk.cpp index a16f0fe3052e0f..fb59c80fccecfa 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/topk.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/topk.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "single_layer_tests/topk.hpp" +#include "shared_test_classes/single_layer/topk.hpp" namespace LayerTestsDefinitions { std::string TopKLayerTest::getTestCaseName(testing::TestParamInfo obj) { @@ -52,8 +52,4 @@ void TopKLayerTest::SetUp() { } function = std::make_shared(results, params, "TopK"); } - -TEST_P(TopKLayerTest, CompareWithRefsDynamicBath) { - Run(); -} } // namespace LayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/transpose.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/transpose.cpp similarity index 84% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/transpose.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/transpose.cpp index d743f71367aa2b..d05d90d8ce75ad 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/transpose.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/transpose.cpp @@ -2,20 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include - -#include "ie_core.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/layer_test_utils.hpp" - -#include "single_layer_tests/transpose.hpp" +#include "shared_test_classes/single_layer/transpose.hpp" namespace LayerTestsDefinitions { @@ -58,8 +45,4 @@ void TransposeLayerTest::SetUp() { function = std::make_shared(results, params, "Transpose"); } -TEST_P(TransposeLayerTest, CompareWithRefs) { - Run(); -}; - } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/variadic_split.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/variadic_split.cpp similarity index 80% rename from inference-engine/tests/functional/plugin/shared/src/single_layer_tests/variadic_split.cpp rename to inference-engine/tests/functional/shared_test_classes/src/single_layer/variadic_split.cpp index f3b7e8c9e8257d..9922080182bd9e 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/variadic_split.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/variadic_split.cpp @@ -2,22 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include - -#include "ie_core.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" - -#include "single_layer_tests/variadic_split.hpp" +#include "shared_test_classes/single_layer/variadic_split.hpp" namespace LayerTestsDefinitions { @@ -63,8 +48,4 @@ namespace LayerTestsDefinitions { function = std::make_shared(results, params, "VariadicSplit"); } - TEST_P(VariadicSplitLayerTest, CompareWithRefs) { - Run(); - } - -} // namespace LayerTestsDefinitions \ No newline at end of file +} // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/activation_concats_eltwise.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/activation_concats_eltwise.cpp similarity index 81% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/activation_concats_eltwise.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/activation_concats_eltwise.cpp index ecf97d9acb8dd4..70f947f9bee124 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/activation_concats_eltwise.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/activation_concats_eltwise.cpp @@ -1,20 +1,10 @@ // Copyright (C) 2019 Intel Corporation // SPDX-License-Identifier: Apache-2.0 -// -#include -#include -#include -#include -#include -#include "common_test_utils/common_utils.hpp" -#include "common_test_utils/data_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/skip_tests_config.hpp" -#include "subgraph_tests/activation_concats_eltwise.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" + #include "ngraph_functions/builders.hpp" +#include "shared_test_classes/subgraph/activation_concats_eltwise.hpp" -namespace LayerTestsDefinitions { +namespace SubgraphTestsDefinitions { using namespace CommonTestUtils; using namespace InferenceEngine; @@ -62,8 +52,4 @@ void ActivationConcatsEltwise::SetUp() { auto final_reshape = std::make_shared(eltw, reshape_pattern, false); function = std::make_shared(final_reshape, input, "ActivationConcatsEltwise"); } - -TEST_P(ActivationConcatsEltwise, CompareWithRefs) { - Run(); -} -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/basic_lstm.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/basic_lstm.cpp similarity index 66% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/basic_lstm.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/basic_lstm.cpp index 077a5e4db856b3..d0ab98bdc304d1 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/basic_lstm.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/basic_lstm.cpp @@ -2,27 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include -#include - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "ngraph_functions/pass/convert_prc.hpp" -#include "transformations/control_flow/unroll_tensor_iterator.hpp" -#include "transformations/common_optimizations/low_latency.hpp" - -#include "subgraph_tests/basic_lstm.hpp" - +#include +#include "shared_test_classes/subgraph/basic_lstm.hpp" #include "ngraph_functions/builders.hpp" -namespace LayerTestsDefinitions { +namespace SubgraphTestsDefinitions { std::string Basic_LSTM_S::getTestCaseName(testing::TestParamInfo obj) { InferenceEngine::Precision netPrecision; @@ -54,10 +38,10 @@ void Basic_LSTM_S::SetUp() { } std::shared_ptr Basic_LSTM_S::GetNetwork(size_t thirdDimOut, - size_t hiddenSize, - const InferenceEngine::Precision& netPrecission, - std::vector* hidden_memory_init_out, - std::vector* cell_memory_init_out) { + size_t hiddenSize, + const InferenceEngine::Precision& netPrecission, + std::vector* hidden_memory_init_out, + std::vector* cell_memory_init_out) { auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecission); auto params = ngraph::builder::makeParams(ngPrc, { {1, 10 * thirdDimOut} }); @@ -181,57 +165,4 @@ std::vector> Basic_LSTM_S::CalculateRefs() { return referenceOutputs; } -TEST_P(Basic_LSTM_S, CompareWithRefImpl) { - Run(); -}; - -TEST_P(Basic_LSTM_S, CompareWithRefImpl_LowLatencyTransformation) { - InferenceEngine::TensorDesc state_description(InferenceEngine::Precision::FP32, - InferenceEngine::SizeVector({1, hidden_size}), - InferenceEngine::Layout::NC); - // Reshape - auto params = ngraph::builder::makeParams(function->get_parameters().at(0)->get_element_type(), { {1, 49} }); - function->replace_parameter(0, params[0]); - - // todo: it is better to modify the model -> use ShapeOf() and Gather() - std::vector outFormShapes1 = { 1, 1, 49 }; - auto pattern1 = std::make_shared(ngraph::element::Type_t::i64, ngraph::Shape{3}, outFormShapes1); - auto param_target_inputs = function->get_parameters().at(0)->output(0).get_target_inputs(); - - // replace hardcoded shape - for (const auto& target : param_target_inputs.begin()->get_node()->input(1).get_source_output().get_target_inputs()) { - target.replace_source_output(pattern1); - } - function->validate_nodes_and_infer_types(); - - // Calculate References for the network before transformation passes - auto referenceOutputs = CalculateRefs(); - - // Apply LowLatency and UnrollTensorIterator transformations - ngraph::pass::Manager manager; - manager.register_pass(); // LowLatency enables UnrollTI - manager.run_passes(function); - LoadNetwork(); - IE_SUPPRESS_DEPRECATED_START - auto states = executableNetwork.QueryState(); - for (auto& state : states) { - auto name = state.GetName(); - if (name.find("cell_state_1") != std::string::npos) { - auto blob = FuncTestUtils::createAndFillBlobWithFloatArray(state_description, - cell_memory_init.data(), cell_memory_init.size()); - state.SetState(blob); - } else if (name.find("hidden_state_1") != std::string::npos) { - auto blob = FuncTestUtils::createAndFillBlobWithFloatArray(state_description, - hidden_memory_init.data(), hidden_memory_init.size()); - state.SetState(blob); - } else { - GTEST_FAIL() << "unknown memory state"; - } - } - IE_SUPPRESS_DEPRECATED_END - // Run and compare - Infer(); - const auto& actualOutputs = GetOutputs(); - Compare(referenceOutputs, actualOutputs); -}; -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/broadcast_power.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/broadcast_power.cpp similarity index 85% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/broadcast_power.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/broadcast_power.cpp index 3fd88279fce343..8af1e2d4b2d4eb 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/broadcast_power.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/broadcast_power.cpp @@ -2,13 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/skip_tests_config.hpp" -#include "subgraph_tests/broadcast_power.hpp" +#include "shared_test_classes/subgraph/broadcast_power.hpp" -namespace LayerTestsDefinitions { +namespace SubgraphTestsDefinitions { std::string BroadcastPowerTest::getTestCaseName(testing::TestParamInfo obj) { InferenceEngine::Precision netPrecision; std::string targetDevice; @@ -45,8 +41,4 @@ void BroadcastPowerTest::SetUp() { auto reshape_2 = std::make_shared(sum, reshape_pattern_2, false); function = std::make_shared(reshape_2, params, "BroadcastPowerPass"); } - -TEST_P(BroadcastPowerTest, CompareWithRefImpl) { - Run(); -}; -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/cascade_concat.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/cascade_concat.cpp similarity index 90% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/cascade_concat.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/cascade_concat.cpp index 53b20a7e8693db..29b160da3419de 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/cascade_concat.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/cascade_concat.cpp @@ -1,13 +1,10 @@ // Copyright (C) 2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // -#include -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/skip_tests_config.hpp" -#include "subgraph_tests/cascade_concat.hpp" -namespace LayerTestsDefinitions { +#include "shared_test_classes/subgraph/cascade_concat.hpp" + +namespace SubgraphTestsDefinitions { std::string CascadeConcat::getTestCaseName(const testing::TestParamInfo &obj) { std::vector> input1, input2, input3; @@ -59,8 +56,4 @@ void CascadeConcat::SetUp() { } function = std::make_shared(results, input, "concat_reshape_reshape_concat_mul"); } - -TEST_P(CascadeConcat, CompareWithRefs) { - Run(); -} -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/concat_multi_input.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/concat_multi_input.cpp similarity index 86% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/concat_multi_input.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/concat_multi_input.cpp index 8c51603c381869..4e29db92b5a635 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/concat_multi_input.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/concat_multi_input.cpp @@ -2,25 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include - -#include - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" - -#include "ngraph_functions/pass/convert_prc.hpp" - -#include "subgraph_tests/concat_multi_input.hpp" - - -namespace LayerTestsDefinitions { +#include "shared_test_classes/subgraph/concat_multi_input.hpp" +namespace SubgraphTestsDefinitions { std::string ConcatMultiInput::getTestCaseName(testing::TestParamInfo obj) { std::vector> inputShapes; @@ -121,14 +105,4 @@ void ConcatMultiInput::GenerateConstOnlyModel() { function = std::make_shared(results, input_vector, "ConcatConstOnly"); } -TEST_P(ConcatMultiInput, CompareWithRefStridedSlice) { - GenerateStridedSliceModel(); - Run(); -}; - -TEST_P(ConcatMultiInput, CompareWithRefConstOnly) { - GenerateConstOnlyModel(); - Run(); -}; - -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/concat_qunatization.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/concat_qunatization.cpp similarity index 77% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/concat_qunatization.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/concat_qunatization.cpp index 6ded72df083250..c9b45485854b64 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/concat_qunatization.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/concat_qunatization.cpp @@ -2,20 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include +#include "shared_test_classes/subgraph/concat_quantization.hpp" -#include - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" - -#include "subgraph_tests/concat_quantization.hpp" - - -namespace LayerTestsDefinitions { +namespace SubgraphTestsDefinitions { std::string ConcatQuantization::getTestCaseName(testing::TestParamInfo obj) { InferenceEngine::Precision netPrecision; @@ -68,20 +57,4 @@ void ConcatQuantization::SetUp() { ngraph::ResultVector results{std::make_shared(concat)}; function = std::make_shared(results, params, "ConcatQuantization"); } - -TEST_P(ConcatQuantization, CompareWithRefImpl) { - InferenceEngine::Core* core = PluginCache::get().ie(targetDevice).get(); - if (!configuration.empty()) { - core->SetConfig(configuration, targetDevice); - } - - try { - InferenceEngine::CNNNetwork cnnNetwork = InferenceEngine::CNNNetwork{ function }; - executableNetwork = core->LoadNetwork(cnnNetwork, targetDevice); - } - catch (InferenceEngine::details::InferenceEngineException ex) { - FAIL() << ex.what(); - } -}; - -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/constant_result.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/constant_result.cpp similarity index 84% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/constant_result.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/constant_result.cpp index bd54c89c6bdc0e..a6fc6c11ed84f6 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/constant_result.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/constant_result.cpp @@ -2,9 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "subgraph_tests/constant_result.hpp" +#include "shared_test_classes/subgraph/constant_result.hpp" -namespace LayerTestsDefinitions { +namespace SubgraphTestsDefinitions { std::string ConstantResultSubgraphTest::getTestCaseName(testing::TestParamInfo obj) { std::string targetDevice; @@ -28,9 +28,5 @@ void ConstantResultSubgraphTest::SetUp() { function = std::make_shared(results, params, "ConstResult"); } -TEST_P(ConstantResultSubgraphTest, CompareWithRefs) { - Run(); -} - -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/conv_eltwise_fusion.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/conv_eltwise_fusion.cpp similarity index 87% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/conv_eltwise_fusion.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/conv_eltwise_fusion.cpp index c5d4a755b2975b..df3462318a16d6 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/conv_eltwise_fusion.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/conv_eltwise_fusion.cpp @@ -1,17 +1,14 @@ // Copyright (C) 2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // -#include -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/skip_tests_config.hpp" -#include "subgraph_tests/conv_eltwise_fusion.hpp" -#include -#include -#include -#include -namespace LayerTestsDefinitions { +#include "transformations/common_optimizations/conv_mul_fusion.hpp" +#include "transformations/op_conversions/convert_convolutions.hpp" +#include "transformations/common_optimizations/conv_bias_fusion.hpp" +#include "ngraph/pass/constant_folding.hpp" +#include "shared_test_classes/subgraph/conv_eltwise_fusion.hpp" + +namespace SubgraphTestsDefinitions { std::string ConvEltwiseFusion::getTestCaseName(const testing::TestParamInfo &obj) { ngraph::NodeTypeInfo conv_type, eltwise_type; @@ -89,8 +86,4 @@ void ConvEltwiseFusion::SetUp() { ASSERT_EQ(cloned_function->get_ops().size(), expected_number_of_ops); } - -TEST_P(ConvEltwiseFusion, CompareWithRefs) { - Run(); -} -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/convert_pad_to_group_conv.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/convert_pad_to_group_conv.cpp similarity index 83% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/convert_pad_to_group_conv.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/convert_pad_to_group_conv.cpp index 4d28a166a2474b..027d2c7fb8b631 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/convert_pad_to_group_conv.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/convert_pad_to_group_conv.cpp @@ -1,13 +1,10 @@ // Copyright (C) 2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // -#include -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/skip_tests_config.hpp" -#include "subgraph_tests/convert_pad_to_group_conv.hpp" -namespace LayerTestsDefinitions { +#include "shared_test_classes/subgraph/convert_pad_to_group_conv.hpp" + +namespace SubgraphTestsDefinitions { std::string ConvertPadToConvTests::getTestCaseName(const testing::TestParamInfo &obj) { ngraph::Shape input_shape; @@ -44,8 +41,4 @@ void ConvertPadToConvTests::SetUp() { function = std::make_shared(ngraph::OutputVector{relu}, ngraph::ParameterVector{param}, "pad"); } } - -TEST_P(ConvertPadToConvTests, CompareWithRefs) { - Run(); -} -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/delayed_copy_layer.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/delayed_copy_layer.cpp similarity index 88% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/delayed_copy_layer.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/delayed_copy_layer.cpp index 7180cacb4acc08..43aba42012e1fd 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/delayed_copy_layer.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/delayed_copy_layer.cpp @@ -1,17 +1,9 @@ // Copyright (C) 2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/skip_tests_config.hpp" -#include "subgraph_tests/delayed_copy_layer.hpp" - -namespace LayerTestsDefinitions { +#include "shared_test_classes/subgraph/delayed_copy_layer.hpp" + +namespace SubgraphTestsDefinitions { std::string DelayedCopyTest::getTestCaseName(const testing::TestParamInfo &obj) { InferenceEngine::Precision netPrecision; std::string targetName; @@ -76,7 +68,4 @@ namespace LayerTestsDefinitions { Validate(); } - TEST_P(DelayedCopyTest, CompareWithRefs) { - Run(); -}; -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/first_connect_input_concat.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/first_connect_input_concat.cpp similarity index 74% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/first_connect_input_concat.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/first_connect_input_concat.cpp index 01e8fbc91d6bc7..597dcfd7cd7f4a 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/first_connect_input_concat.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/first_connect_input_concat.cpp @@ -2,24 +2,10 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include +#include "shared_test_classes/subgraph/first_connect_input_concat.hpp" -#include -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" - -#include "ngraph_functions/pass/convert_prc.hpp" - -#include "subgraph_tests/first_connect_input_concat.hpp" - - -namespace LayerTestsDefinitions { +namespace SubgraphTestsDefinitions { std::string ConcatFirstInputTest::getTestCaseName(testing::TestParamInfo obj) { std::vector> inputShapes; @@ -51,8 +37,4 @@ void ConcatFirstInputTest::SetUp() { function = std::make_shared(results, params, "ConcatMultiInput"); } - -TEST_P(ConcatFirstInputTest, CompareWithRefImpl) { - Run(); -}; -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/get_output_before_activation.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/get_output_before_activation.cpp similarity index 84% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/get_output_before_activation.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/get_output_before_activation.cpp index 3f7207ad4c429e..6c8450482afc11 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/get_output_before_activation.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/get_output_before_activation.cpp @@ -1,21 +1,8 @@ // Copyright (C) 2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 -#include -#include -#include -#include -#include -#include -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "ngraph_functions/pass/convert_prc.hpp" - -#include "ngraph_functions/utils/ngraph_helpers.hpp" #include "ngraph_functions/builders.hpp" -#include "subgraph_tests/get_output_before_activation.hpp" +#include "shared_test_classes/subgraph/get_output_before_activation.hpp" namespace SubgraphTestsDefinitions { std::ostream& operator<<(std::ostream& os, const midOutputType& oType) { @@ -89,8 +76,4 @@ void OutputBeforeActivation::SetUp() { InferenceEngine::Blob::Ptr OutputBeforeActivation::GenerateInput(const InferenceEngine::InputInfo &info) const { return FuncTestUtils::createAndFillBlob(info.getTensorDesc(), 2, -1, 100); } - -TEST_P(OutputBeforeActivation, CompareWithRefs) { - Run(); -}; } // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/handling_orientation_conv.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/handling_orientation_conv.cpp similarity index 89% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/handling_orientation_conv.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/handling_orientation_conv.cpp index be38326f132bcd..5b09e39de5c000 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/handling_orientation_conv.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/handling_orientation_conv.cpp @@ -1,16 +1,10 @@ // Copyright (C) 2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/skip_tests_config.hpp" -#include "subgraph_tests/handling_orientation_conv.hpp" -namespace LayerTestsDefinitions { +#include "shared_test_classes/subgraph/handling_orientation_conv.hpp" + +namespace SubgraphTestsDefinitions { std::string HandlingOrientationClass::getTestCaseName(const testing::TestParamInfo &obj) { InferenceEngine::Precision netPrecision; std::string targetName; @@ -60,8 +54,4 @@ namespace LayerTestsDefinitions { std::make_shared(reshape4)}; function = std::make_shared(results, params, "RemovePermutationPass"); } - - TEST_P(HandlingOrientationClass, CompareWithRefs){ - Run(); - }; -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/input_conv.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/input_conv.cpp similarity index 88% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/input_conv.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/input_conv.cpp index 9dc052a5956305..adceb26d194eb5 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/input_conv.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/input_conv.cpp @@ -2,24 +2,10 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "ngraph_functions/pass/convert_prc.hpp" - -#include "subgraph_tests/input_conv.hpp" - +#include "shared_test_classes/subgraph/input_conv.hpp" #include "ngraph_functions/builders.hpp" -namespace LayerTestsDefinitions { +namespace SubgraphTestsDefinitions { std::string InputConvTest::getTestCaseName(testing::TestParamInfo obj) { InferenceEngine::Precision netPrecision; @@ -110,9 +96,4 @@ void InputConvTest::SetUp() { function = std::make_shared(results, params, "InputConvTest"); } } - -TEST_P(InputConvTest, CompareWithRefImpl) { - Run(); -}; - -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/matmul_squeeze_add.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/matmul_squeeze_add.cpp similarity index 82% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/matmul_squeeze_add.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/matmul_squeeze_add.cpp index 05f65ebfb35034..7cb45319172fa2 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/matmul_squeeze_add.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/matmul_squeeze_add.cpp @@ -2,24 +2,10 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "ngraph_functions/pass/convert_prc.hpp" - -#include "subgraph_tests/matmul_squeeze_add.hpp" - +#include "shared_test_classes/subgraph/matmul_squeeze_add.hpp" #include "ngraph_functions/builders.hpp" -namespace LayerTestsDefinitions { +namespace SubgraphTestsDefinitions { std::string MatmulSqueezeAddTest::getTestCaseName(testing::TestParamInfo obj) { InferenceEngine::Precision netPrecision; @@ -70,9 +56,4 @@ void MatmulSqueezeAddTest::SetUp() { ngraph::ResultVector results {std::make_shared(squeeze_0)}; function = std::make_shared(results, params, "MatmulSqueezeAddTest"); } - -TEST_P(MatmulSqueezeAddTest, CompareWithRefImpl) { - Run(); -}; - -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/memory_LSTMCell.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/memory_LSTMCell.cpp similarity index 94% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/memory_LSTMCell.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/memory_LSTMCell.cpp index 1f3dc9ffcc15ed..20b522ed19b0c2 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/memory_LSTMCell.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/memory_LSTMCell.cpp @@ -2,27 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include - -#include "ie_core.hpp" - -#include "ie_transformations.hpp" -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/skip_tests_config.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" -#include "ngraph_functions/builders.hpp" +#include +#include -#include -#include "transformations/control_flow/unroll_tensor_iterator.hpp" -#include "transformations/common_optimizations/low_latency.hpp" -#include "subgraph_tests/memory_LSTMCell.hpp" +#include "ngraph/pass/low_latency.hpp" +#include "ngraph_functions/builders.hpp" +#include "shared_test_classes/subgraph/memory_LSTMCell.hpp" namespace SubgraphTestsDefinitions { @@ -291,7 +276,7 @@ namespace SubgraphTestsDefinitions { cnnNetwork = InferenceEngine::CNNNetwork{function}; InferenceEngine::LowLatency(cnnNetwork); ConfigureNetwork(); - executableNetwork = core->LoadNetwork(cnnNetwork, targetDevice, configuration); + executableNetwork = core->LoadNetwork(static_cast(cnnNetwork), targetDevice, configuration); } else { // Apply LowLatency (insert Assigns/ReadValues) and UnrollTensorIterator ngraph::pass::Manager manager; @@ -324,16 +309,4 @@ namespace SubgraphTestsDefinitions { manager_2.run_passes(function); Validate(); } - - TEST_P(MemoryLSTMCellTest, CompareWithRefs) { - Run(); - }; - - TEST_P(MemoryLSTMCellTest, CompareWithRefs_LowLatencyTransformation) { - RunLowLatency(); - }; - - TEST_P(MemoryLSTMCellTest, CompareWithRefs_LowLatencyRegularAPITransformation) { - RunLowLatency(true); - }; } // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/memory_eltwise_reshape_concat.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/memory_eltwise_reshape_concat.cpp similarity index 91% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/memory_eltwise_reshape_concat.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/memory_eltwise_reshape_concat.cpp index a1754b04157c27..985252c06a4803 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/memory_eltwise_reshape_concat.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/memory_eltwise_reshape_concat.cpp @@ -2,24 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include - -#include "ie_core.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/skip_tests_config.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" -#include "ngraph_functions/builders.hpp" #include -#include "subgraph_tests/memory_eltwise_reshape_concat.hpp" + +#include "ngraph_functions/builders.hpp" +#include "shared_test_classes/subgraph/memory_eltwise_reshape_concat.hpp" namespace SubgraphTestsDefinitions { @@ -145,8 +132,4 @@ void MemoryEltwiseReshapeConcatTest::Run() { initNgraphFriendlyModel(); Validate(); } - -TEST_P(MemoryEltwiseReshapeConcatTest, CompareWithRefs) { - Run(); -}; } // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/multioutput_eltwise_squeeze_eltwise.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/multioutput_eltwise_squeeze_eltwise.cpp similarity index 84% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/multioutput_eltwise_squeeze_eltwise.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/multioutput_eltwise_squeeze_eltwise.cpp index 6ad09862dce5bc..d95b33eb7afddd 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/multioutput_eltwise_squeeze_eltwise.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/multioutput_eltwise_squeeze_eltwise.cpp @@ -1,17 +1,9 @@ // Copyright (C) 2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/skip_tests_config.hpp" -#include "subgraph_tests/multioutput_eltwise_squeeze_eltwise.hpp" +#include "shared_test_classes/subgraph/multioutput_eltwise_squeeze_eltwise.hpp" -namespace LayerTestsDefinitions { +namespace SubgraphTestsDefinitions { std::string MultioutputEltwiseReshapeEltwise::getTestCaseName(const testing::TestParamInfo &obj) { std::vector> input; InferenceEngine::Precision netPrecision; @@ -49,8 +41,4 @@ namespace LayerTestsDefinitions { std::make_shared(eltwise3)}; function = std::make_shared(results, input, "eltwise_reshape_eltwise_multioutput"); } - - TEST_P(MultioutputEltwiseReshapeEltwise, CompareWithRefs){ - Run(); - }; -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/multiple_LSTMCell.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/multiple_LSTMCell.cpp similarity index 96% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/multiple_LSTMCell.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/multiple_LSTMCell.cpp index f52d1a95af1796..1bb7454a53b6ff 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/multiple_LSTMCell.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/multiple_LSTMCell.cpp @@ -2,28 +2,14 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include - -#include "ie_core.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/skip_tests_config.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" -#include "ngraph_functions/builders.hpp" +#include "ngraph/pass/low_latency.hpp" -#include -#include -#include +#include "ie_transformations.hpp" #include "transformations/control_flow/unroll_tensor_iterator.hpp" -#include "transformations/common_optimizations/low_latency.hpp" -#include "subgraph_tests/multiple_LSTMCell.hpp" + +#include "ngraph_functions/builders.hpp" + +#include "shared_test_classes/subgraph/multiple_LSTMCell.hpp" namespace SubgraphTestsDefinitions { std::string MultipleLSTMCellTest::getTestCaseName(const testing::TestParamInfo &obj) { @@ -486,16 +472,4 @@ void MultipleLSTMCellTest::RunLowLatency(bool regular_api) { manager_2.run_passes(function); Validate(); } - -TEST_P(MultipleLSTMCellTest, CompareWithRefs) { - Run(); -}; - -TEST_P(MultipleLSTMCellTest, CompareWithRefs_LowLatencyTransformation) { - RunLowLatency(); -}; - -TEST_P(MultipleLSTMCellTest, CompareWithRefs_LowLatencyRegularAPITransformation) { - RunLowLatency(true); -}; } // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/multiple_concat.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/multiple_concat.cpp similarity index 80% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/multiple_concat.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/multiple_concat.cpp index 01291111b5fc30..d9b57e0a6c6952 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/multiple_concat.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/multiple_concat.cpp @@ -2,22 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include - -#include "ie_core.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/skip_tests_config.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" #include "ngraph_functions/builders.hpp" -#include "subgraph_tests/multiple_concat.hpp" +#include "shared_test_classes/subgraph/multiple_concat.hpp" namespace SubgraphTestsDefinitions { @@ -64,8 +50,4 @@ void MultipleConcatTest::SetUp() { function = std::make_shared(act, input_parameter, "multiple_concat"); } - -TEST_P(MultipleConcatTest, CompareWithRefs) { - Run(); -}; } // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/multiply_add.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/multiply_add.cpp similarity index 75% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/multiply_add.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/multiply_add.cpp index 1be404d6396839..9ee694f9e9db92 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/multiply_add.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/multiply_add.cpp @@ -2,23 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include -#include "ie_core.hpp" +#include "shared_test_classes/subgraph/multiply_add.hpp" -#include "subgraph_tests/multiply_add.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/skip_tests_config.hpp" - -namespace LayerTestsDefinitions { +namespace SubgraphTestsDefinitions { std::string MultiplyAddLayerTest::getTestCaseName(const testing::TestParamInfo &obj) { std::vector inputShapes; InferenceEngine::Precision netPrecision; @@ -51,8 +37,4 @@ void MultiplyAddLayerTest::SetUp() { ngraph::ResultVector results{std::make_shared(add)}; function = std::make_shared(results, params, "multiplyAdd"); } - -TEST_P(MultiplyAddLayerTest, CompareWithRefs) { - Run(); -}; -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/negative_memory_layer_offset.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/negative_memory_layer_offset.cpp similarity index 90% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/negative_memory_layer_offset.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/negative_memory_layer_offset.cpp index d1efd0eff1b65b..ee715e0ce9674e 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/negative_memory_layer_offset.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/negative_memory_layer_offset.cpp @@ -1,17 +1,10 @@ // Copyright (C) 2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/skip_tests_config.hpp" -#include "subgraph_tests/negative_memory_layer_offset.hpp" -namespace LayerTestsDefinitions { +#include "shared_test_classes/subgraph/negative_memory_layer_offset.hpp" + +namespace SubgraphTestsDefinitions { std::string NegativeMemoryOffsetTest::getTestCaseName(const testing::TestParamInfo& obj) { InferenceEngine::Precision netPrecision; std::string targetName; @@ -96,8 +89,4 @@ namespace LayerTestsDefinitions { switchToNgraphFriendlyModel(); Validate(); } - - TEST_P(NegativeMemoryOffsetTest, CompareWithRefs) { - Run(); - }; -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/perm_conv_perm_concat.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/perm_conv_perm_concat.cpp similarity index 92% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/perm_conv_perm_concat.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/perm_conv_perm_concat.cpp index b816e3aeace49c..8ec5bb0ccac6e2 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/perm_conv_perm_concat.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/perm_conv_perm_concat.cpp @@ -1,16 +1,7 @@ // Copyright (C) 2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 -#include -#include -#include -#include -#include -#include -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/skip_tests_config.hpp" -#include "subgraph_tests/perm_conv_perm_concat.hpp" +#include "shared_test_classes/subgraph/perm_conv_perm_concat.hpp" namespace SubgraphTestsDefinitions { std::string PermConvPermConcat::getTestCaseName(testing::TestParamInfo obj) { @@ -115,8 +106,4 @@ void PermConvPermConcat::Run() { Validate(); } - -TEST_P(PermConvPermConcat, CompareWithRefs) { - Run(); -} } // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/quantized_convolution_backprop_data.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/quantized_convolution_backprop_data.cpp similarity index 87% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/quantized_convolution_backprop_data.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/quantized_convolution_backprop_data.cpp index 2e265454425839..6f3ed8ce463543 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/quantized_convolution_backprop_data.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/quantized_convolution_backprop_data.cpp @@ -2,26 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include - -#include "ie_core.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" - -#include "subgraph_tests/quantized_convolution_backprop_data.hpp" +#include "shared_test_classes/subgraph/quantized_convolution_backprop_data.hpp" +namespace SubgraphTestsDefinitions { using ngraph::helpers::QuantizationGranularity; -namespace LayerTestsDefinitions { - std::string QuantConvBackpropDataLayerTest::getTestCaseName(testing::TestParamInfo obj) { quantConvBackpropDataSpecificParams groupConvBackpropDataParams; InferenceEngine::Precision netPrecision; @@ -93,8 +78,4 @@ void QuantConvBackpropDataLayerTest::SetUp() { ngraph::ResultVector results{std::make_shared(convBackpropData)}; function = std::make_shared(results, params, "QuantConvolutionBackpropData"); } - -TEST_P(QuantConvBackpropDataLayerTest, CompareWithRefs) { - Run(); -} -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/quantized_group_convolution.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/quantized_group_convolution.cpp similarity index 88% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/quantized_group_convolution.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/quantized_group_convolution.cpp index 0f86ef693ee2d8..032c394a0ca2a8 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/quantized_group_convolution.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/quantized_group_convolution.cpp @@ -2,25 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include - -#include "ie_core.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" - -#include "subgraph_tests/quantized_group_convolution.hpp" +#include "shared_test_classes/subgraph/quantized_group_convolution.hpp" using ngraph::helpers::QuantizationGranularity; -namespace LayerTestsDefinitions { +namespace SubgraphTestsDefinitions { std::string QuantGroupConvLayerTest::getTestCaseName(testing::TestParamInfo obj) { quantGroupConvSpecificParams groupConvParams; @@ -107,8 +93,4 @@ void QuantGroupConvLayerTest::SetUp() { ngraph::ResultVector results{std::make_shared(groupConv)}; function = std::make_shared(results, params, "QuantGroupConvolution"); } - -TEST_P(QuantGroupConvLayerTest, CompareWithRefs) { - Run(); -} -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/quantized_group_convolution_backprop_data.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/quantized_group_convolution_backprop_data.cpp similarity index 88% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/quantized_group_convolution_backprop_data.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/quantized_group_convolution_backprop_data.cpp index 545084c9e2a21b..007185bbfd083b 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/quantized_group_convolution_backprop_data.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/quantized_group_convolution_backprop_data.cpp @@ -2,26 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include - -#include "ie_core.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" - -#include "subgraph_tests/quantized_group_convolution_backprop_data.hpp" +#include "shared_test_classes/subgraph/quantized_group_convolution_backprop_data.hpp" +namespace SubgraphTestsDefinitions { using ngraph::helpers::QuantizationGranularity; -namespace LayerTestsDefinitions { - std::string QuantGroupConvBackpropDataLayerTest::getTestCaseName(testing::TestParamInfo obj) { quantGroupConvBackpropDataSpecificParams groupConvBackpropDataParams; InferenceEngine::Precision netPrecision; @@ -99,8 +84,4 @@ void QuantGroupConvBackpropDataLayerTest::SetUp() { ngraph::ResultVector results{std::make_shared(groupConvBackpropData)}; function = std::make_shared(results, params, "QuantGroupConvolutionBackpropData"); } - -TEST_P(QuantGroupConvBackpropDataLayerTest, CompareWithRefs) { - Run(); -} -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/quantized_mat_mul.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/quantized_mat_mul.cpp similarity index 92% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/quantized_mat_mul.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/quantized_mat_mul.cpp index f35992c7eefc86..a1c55c0357b300 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/quantized_mat_mul.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/quantized_mat_mul.cpp @@ -2,18 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include - -#include "subgraph_tests/quantized_mat_mul.hpp" +#include "shared_test_classes/subgraph/quantized_mat_mul.hpp" #include "ngraph_functions/builders.hpp" -using ngraph::helpers::QuantizationGranularity; +namespace SubgraphTestsDefinitions { -namespace LayerTestsDefinitions { +using ngraph::helpers::QuantizationGranularity; std::string QuantMatMulTest::getTestCaseName(const testing::TestParamInfo &obj) { QuantParams quantParams; @@ -80,9 +74,4 @@ void QuantMatMulTest::SetUp() { ngraph::ResultVector results{std::make_shared(MatMul)}; function = std::make_shared(results, params, "QuantMatMul"); } - -TEST_P(QuantMatMulTest, CompareWithRefs) { - Run(); -}; - -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/range_add.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/range_add.cpp similarity index 92% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/range_add.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/range_add.cpp index 6ea03edde43021..751e1b441a0fff 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/range_add.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/range_add.cpp @@ -2,13 +2,13 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "subgraph_tests/range_add.hpp" +#include "shared_test_classes/subgraph/range_add.hpp" -namespace LayerTestsDefinitions { +namespace SubgraphTestsDefinitions { // ------------------------------ V0 ------------------------------ -std::string RangeAddSubgraphTest::getTestCaseName(testing::TestParamInfo obj) { +std::string RangeAddSubgraphTest::getTestCaseName(testing::TestParamInfo obj) { InferenceEngine::Precision netPrecision; InferenceEngine::Precision inPrc, outPrc; InferenceEngine::Layout inLayout, outLayout; @@ -43,13 +43,9 @@ void RangeAddSubgraphTest::SetUp() { function = std::make_shared(results, params, "RangeEltwise"); } -TEST_P(RangeAddSubgraphTest, CompareWithRefs) { - Run(); -} - // ------------------------------ V4 ------------------------------ -std::string RangeNumpyAddSubgraphTest::getTestCaseName(testing::TestParamInfo obj) { +std::string RangeNumpyAddSubgraphTest::getTestCaseName(testing::TestParamInfo obj) { InferenceEngine::Precision netPrc; InferenceEngine::Precision constPrc; InferenceEngine::Precision outPrc; @@ -87,9 +83,4 @@ void RangeNumpyAddSubgraphTest::SetUp() { const ngraph::ResultVector results{std::make_shared(eltwise)}; function = std::make_shared(results, params, "RangeEltwise"); } - -TEST_P(RangeNumpyAddSubgraphTest, CompareWithRefs) { - Run(); -} - -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/relu_shape_of.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/relu_shape_of.cpp similarity index 85% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/relu_shape_of.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/relu_shape_of.cpp index 4edd6bf6472998..bc5c6e6b9290f0 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/relu_shape_of.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/relu_shape_of.cpp @@ -2,11 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "subgraph_tests/relu_shape_of.hpp" +#include "shared_test_classes/subgraph/relu_shape_of.hpp" -namespace LayerTestsDefinitions { +namespace SubgraphTestsDefinitions { - std::string ReluShapeOfSubgraphTest::getTestCaseName(testing::TestParamInfo obj) { + std::string ReluShapeOfSubgraphTest::getTestCaseName(testing::TestParamInfo obj) { InferenceEngine::SizeVector inputShapes; InferenceEngine::Precision inputPrecision; std::string targetDevice; @@ -29,8 +29,4 @@ namespace LayerTestsDefinitions { const ngraph::ResultVector results{std::make_shared(shapeOf)}; function = std::make_shared(results, param, "ReluShapeOf"); } - -TEST_P(ReluShapeOfSubgraphTest, CompareWithRefs) { - Run(); -} -} // namespace LayerTestsDefinitions \ No newline at end of file +} // namespace SubgraphTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/reshape_permute_conv_permute_reshape_act.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/reshape_permute_conv_permute_reshape_act.cpp similarity index 90% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/reshape_permute_conv_permute_reshape_act.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/reshape_permute_conv_permute_reshape_act.cpp index e1951c887551ad..0157f720716cb1 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/reshape_permute_conv_permute_reshape_act.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/reshape_permute_conv_permute_reshape_act.cpp @@ -1,18 +1,9 @@ // Copyright (C) 2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 -#include -#include -#include -#include -#include -#include -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/skip_tests_config.hpp" -#include "subgraph_tests/reshape_permute_conv_permute_reshape_act.hpp" - -namespace LayerTestsDefinitions { +#include "shared_test_classes/subgraph/reshape_permute_conv_permute_reshape_act.hpp" + +namespace SubgraphTestsDefinitions { std::string ConvReshapeAct::getTestCaseName(testing::TestParamInfo obj) { InferenceEngine::Precision netPrecision; std::string targetName; @@ -112,8 +103,4 @@ namespace LayerTestsDefinitions { threshold = 0.1; Validate(); } - - TEST_P(ConvReshapeAct, CompareWithRefs) { - Run(); - } -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/reshape_permute_reshape.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/reshape_permute_reshape.cpp similarity index 85% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/reshape_permute_reshape.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/reshape_permute_reshape.cpp index d149da0d645d30..4620bbe8b0cf91 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/reshape_permute_reshape.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/reshape_permute_reshape.cpp @@ -1,17 +1,10 @@ // Copyright (C) 2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 -#include -#include -#include -#include #include -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/skip_tests_config.hpp" -#include "subgraph_tests/reshape_permute_reshape.hpp" +#include "shared_test_classes/subgraph/reshape_permute_reshape.hpp" -namespace LayerTestsDefinitions { +namespace SubgraphTestsDefinitions { std::string ReshapePermuteReshape::getTestCaseName(const testing::TestParamInfo &obj) { std::vector> input; InferenceEngine::Precision netPrecision; @@ -47,8 +40,4 @@ namespace LayerTestsDefinitions { auto reshape2 = std::make_shared(permute, reshape2_pattern, false); function = std::make_shared(reshape2, input, "reshape_permute_reshape"); } - - TEST_P(ReshapePermuteReshape, CompareWithRefs) { - Run(); - } -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/reshape_squeeze_reshape_relu.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/reshape_squeeze_reshape_relu.cpp similarity index 85% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/reshape_squeeze_reshape_relu.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/reshape_squeeze_reshape_relu.cpp index c29e1c4f8d2353..573a022b07d2cd 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/reshape_squeeze_reshape_relu.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/reshape_squeeze_reshape_relu.cpp @@ -1,17 +1,11 @@ // Copyright (C) 2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include + #include -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/skip_tests_config.hpp" -#include "subgraph_tests/reshape_squeeze_reshape_relu.hpp" +#include "shared_test_classes/subgraph/reshape_squeeze_reshape_relu.hpp" -namespace LayerTestsDefinitions { +namespace SubgraphTestsDefinitions { std::string ReshapeSqueezeReshapeRelu::getTestCaseName(const testing::TestParamInfo &obj) { ShapeAxesTuple squeezeShape; InferenceEngine::Precision netPrecision; @@ -51,8 +45,4 @@ namespace LayerTestsDefinitions { function = std::make_shared(func, input, "reshape_squeeze_reshape_relu"); } - - TEST_P(ReshapeSqueezeReshapeRelu, CompareWithRefs){ - Run(); - }; -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/scale_shift.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/scale_shift.cpp similarity index 86% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/scale_shift.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/scale_shift.cpp index b31280766ce88d..ae95e5e6ed2a00 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/scale_shift.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/scale_shift.cpp @@ -2,13 +2,10 @@ // SPDX-License-Identifier: Apache-2.0 // -#include #include "ngraph_functions/builders.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/skip_tests_config.hpp" -#include "subgraph_tests/scaleshift.hpp" +#include "shared_test_classes/subgraph/scaleshift.hpp" -namespace LayerTestsDefinitions { +namespace SubgraphTestsDefinitions { std::string ScaleShiftLayerTest::getTestCaseName(const testing::TestParamInfo &obj) { std::vector> inputShapes; InferenceEngine::Precision netPrecision; @@ -41,8 +38,4 @@ namespace LayerTestsDefinitions { auto add = std::make_shared(mul, add_const); function = std::make_shared(add, paramsIn, "scale_shift"); } - - TEST_P(ScaleShiftLayerTest, CompareWithRefs){ - Run(); - }; -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/softsign.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/softsign.cpp similarity index 84% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/softsign.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/softsign.cpp index 47ffe1eb418170..45f69e108528c3 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/softsign.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/softsign.cpp @@ -2,24 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "ngraph_functions/pass/convert_prc.hpp" #include -#include "subgraph_tests/softsign.hpp" - +#include "shared_test_classes/subgraph/softsign.hpp" #include "ngraph_functions/builders.hpp" -namespace LayerTestsDefinitions { +namespace SubgraphTestsDefinitions { std::string SoftsignTest::getTestCaseName(testing::TestParamInfo obj) { InferenceEngine::Precision netPrecision; @@ -83,9 +70,4 @@ std::shared_ptr SoftsignTest::GenerateNgraphFriendlySoftSign() ngraph::ResultVector results{ std::make_shared(mul) }; return std::make_shared(results, params, "SoftSignTest"); } - -TEST_P(SoftsignTest, CompareWithRefImpl) { - Run(); -}; - -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/split_concat_memory.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/split_concat_memory.cpp similarity index 62% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/split_concat_memory.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/split_concat_memory.cpp index 98518f9c5517d4..fb2ce486f16ddf 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/split_concat_memory.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/split_concat_memory.cpp @@ -2,10 +2,10 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "subgraph_tests/split_concat_memory.hpp" +#include "shared_test_classes/subgraph/split_concat_memory.hpp" #include "common_test_utils/xml_net_builder/ir_net.hpp" -namespace LayerTestsDefinitions { +namespace SubgraphTestsDefinitions { using namespace CommonTestUtils; using namespace InferenceEngine; @@ -79,58 +79,4 @@ void SplitConcatMemory::SetUp() { ngraph::ParameterVector {input}, "CyclicBuffer4"); } - -TEST_P(SplitConcatMemory, cyclicBufferCorrectness) { - auto ie = PluginCache::get().ie(); - cnnNetwork = InferenceEngine::CNNNetwork{function}; - - auto exe_net = ie->LoadNetwork(cnnNetwork, "CPU"); - auto inf_reg = exe_net.CreateInferRequest(); - - /* - * cnc1 out | mem | In|q - * |===============| - * iter_1 | 0 | 0 | 0 | 1 | - * iter_2 | 0 | 0 | 1 | 2 | - * iter 3 | 0 | 1 | 2 | 3 | - */ - - auto i_blob = inf_reg.GetBlob("input"); - auto o_blob = inf_reg.GetBlob("plus_one"); - - auto o_blob_ref = make_blob_with_precision(o_blob->getTensorDesc()); - o_blob_ref->allocate(); - - auto fill_by_quarter = [this] (Blob::Ptr& blob, std::vector vals) { - IE_ASSERT(vals.size() == 4); - auto quarter_blocked_shape = blob->getTensorDesc().getDims(); - - // splis axis dimension into chunk - IE_ASSERT(quarter_blocked_shape[axis] % vals.size() == 0); - quarter_blocked_shape[axis] /= vals.size(); - quarter_blocked_shape.insert(quarter_blocked_shape.begin() + axis, vals.size()); - - auto quarter_blocked_view = make_reshape_view(blob, quarter_blocked_shape); - fill_data_with_broadcast(quarter_blocked_view, axis, vals); - }; - - // iteration 1 - fill_data_const(i_blob, 1); - fill_by_quarter(o_blob_ref, {1, 1, 1, 2}); - inf_reg.Infer(); - Compare(o_blob_ref, o_blob); - - // iteration 2 - fill_data_const(i_blob, 2); - fill_by_quarter(o_blob_ref, {1, 1, 2, 3}); - inf_reg.Infer(); - Compare(o_blob_ref, o_blob); - - // iteration 3 - fill_data_const(i_blob, 3); - fill_by_quarter(o_blob_ref, {1, 2, 3, 4}); - inf_reg.Infer(); - Compare(o_blob_ref, o_blob); -} - -} // namespace LayerTestsDefinitions \ No newline at end of file +} // namespace SubgraphTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/split_conv_concat.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/split_conv_concat.cpp similarity index 77% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/split_conv_concat.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/split_conv_concat.cpp index d247ac28fdb8ee..a6e4018938a156 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/split_conv_concat.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/split_conv_concat.cpp @@ -2,24 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include +#include "shared_test_classes/subgraph/split_conv_concat.hpp" -#include - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" - -#include "ngraph_functions/pass/convert_prc.hpp" - -#include "subgraph_tests/split_conv_concat.hpp" - - -namespace LayerTestsDefinitions { +namespace SubgraphTestsDefinitions { std::string SplitConvConcat::getTestCaseName(testing::TestParamInfo obj) { InferenceEngine::Precision netPrecision; @@ -57,8 +42,4 @@ void SplitConvConcat::SetUp() { function = std::make_shared(results, params, "SplitConvConcat"); } -TEST_P(SplitConvConcat, CompareWithRefImpl) { - Run(); -}; - -} // namespace LayerTestsDefinitions \ No newline at end of file +} // namespace SubgraphTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/split_relu.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/split_relu.cpp similarity index 81% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/split_relu.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/split_relu.cpp index 914df8931b9391..adebfbf01396ed 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/split_relu.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/split_relu.cpp @@ -1,17 +1,10 @@ // Copyright (C) 2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/skip_tests_config.hpp" -#include "subgraph_tests/split_relu.hpp" -namespace LayerTestsDefinitions { +#include "shared_test_classes/subgraph/split_relu.hpp" + +namespace SubgraphTestsDefinitions { std::string SplitRelu::getTestCaseName(const testing::TestParamInfo &obj) { std::vector> input; std::vector connect_input; @@ -46,8 +39,4 @@ namespace LayerTestsDefinitions { } function = std::make_shared(results, input, "split_relu"); } - - TEST_P(SplitRelu, CompareWithRefs){ - Run(); - }; -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/split_trivial_permute_concat.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/split_trivial_permute_concat.cpp similarity index 82% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/split_trivial_permute_concat.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/split_trivial_permute_concat.cpp index c04e2a5d17655c..ec3d46f2d381d3 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/split_trivial_permute_concat.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/split_trivial_permute_concat.cpp @@ -1,18 +1,10 @@ // Copyright (C) 2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/skip_tests_config.hpp" -#include "subgraph_tests/split_trivial_permute_concat.hpp" -#include "ngraph_functions/utils/ngraph_helpers.hpp" -namespace LayerTestsDefinitions { +#include "shared_test_classes/subgraph/split_trivial_permute_concat.hpp" + +namespace SubgraphTestsDefinitions { std::string SplitTrivialPermuteConcatTest::getTestCaseName(const testing::TestParamInfo& obj) { InferenceEngine::Precision netPrecision; std::string targetName; @@ -54,8 +46,4 @@ namespace LayerTestsDefinitions { auto act = ngraph::builder::makeActivation(concat, ngPrc, ngraph::helpers::ActivationTypes::Relu); function = std::make_shared(act, input, "split_trivial_permute_concat"); } - - TEST_P(SplitTrivialPermuteConcatTest, CompareWithRefs) { - Run(); - }; -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/trivial_concat.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/trivial_concat.cpp similarity index 82% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/trivial_concat.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/trivial_concat.cpp index 9626204fe7857a..7b4d2a3982b628 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/trivial_concat.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/trivial_concat.cpp @@ -2,24 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include +#include "shared_test_classes/subgraph/trivial_concat.hpp" -#include "ie_core.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "common_test_utils/data_utils.hpp" -#include "functional_test_utils/precision_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/skip_tests_config.hpp" - -#include "subgraph_tests/trivial_concat.hpp" - -namespace LayerTestsDefinitions { +namespace SubgraphTestsDefinitions { std::string TrivialConcatLayerTest::getTestCaseName(const testing::TestParamInfo &obj) { int axis; @@ -70,9 +55,4 @@ void TrivialConcatLayerTest::SetUp() { ngraph::ResultVector results{std::make_shared(act)}; function = std::make_shared(results, params, "trivial_concat"); } - - -TEST_P(TrivialConcatLayerTest, CompareWithRefs) { - Run(); -}; -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/two_fake_quantize_to_fullyconnected.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/two_fake_quantize_to_fullyconnected.cpp similarity index 92% rename from inference-engine/tests/functional/plugin/shared/src/subgraph_tests/two_fake_quantize_to_fullyconnected.cpp rename to inference-engine/tests/functional/shared_test_classes/src/subgraph/two_fake_quantize_to_fullyconnected.cpp index 70f18870136861..dc71ff14ed4dac 100644 --- a/inference-engine/tests/functional/plugin/shared/src/subgraph_tests/two_fake_quantize_to_fullyconnected.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/two_fake_quantize_to_fullyconnected.cpp @@ -2,24 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include +#include "shared_test_classes/subgraph/two_fake_quantize_to_fullyconnected.hpp" -#include "ie_core.hpp" - -#include "common_test_utils/common_utils.hpp" -#include "functional_test_utils/blob_utils.hpp" -#include "functional_test_utils/plugin_cache.hpp" -#include "functional_test_utils/layer_test_utils.hpp" - -#include "subgraph_tests/two_fake_quantize_to_fullyconnected.hpp" - - -namespace LayerTestsDefinitions { +namespace SubgraphTestsDefinitions { std::string FakeQuantizeSubgraphTest::getTestCaseName(testing::TestParamInfo obj) { fqSpecificParams fqParams; @@ -161,8 +146,4 @@ InferenceEngine::Blob::Ptr FakeQuantizeSubgraphTest::GenerateInput(const Inferen return FuncTestUtils::createAndFillBlob(info.getTensorDesc(), inputDataMax - inputDataMin, inputDataMin, 1 / inputDataResolution, seed); } - -TEST_P(FakeQuantizeSubgraphTest, CompareWithRefs) { - Run(); -} -} // namespace LayerTestsDefinitions +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/ie_test_utils/functional_test_utils/CMakeLists.txt b/inference-engine/tests/ie_test_utils/functional_test_utils/CMakeLists.txt index 3ebae5a7da7489..623648e691d29a 100644 --- a/inference-engine/tests/ie_test_utils/functional_test_utils/CMakeLists.txt +++ b/inference-engine/tests/ie_test_utils/functional_test_utils/CMakeLists.txt @@ -14,13 +14,17 @@ list(APPEND EXPORT_DEPENDENCIES addIeTarget( NAME ${TARGET_NAME} TYPE STATIC - ROOT ${CMAKE_CURRENT_SOURCE_DIR} + ROOT "${CMAKE_CURRENT_SOURCE_DIR}/include" ADD_CPPLINT DEVELOPER_PACKAGE + INCLUDES + PUBLIC + "${CMAKE_CURRENT_SOURCE_DIR}/include" + ADDITIONAL_SOURCE_DIRS + ${CMAKE_CURRENT_SOURCE_DIR}/src LINK_LIBRARIES PUBLIC ${EXPORT_DEPENDENCIES} - ngraphFunctions inference_engine_transformations INCLUDES PUBLIC @@ -30,6 +34,6 @@ addIeTarget( ) ie_faster_build(${TARGET_NAME} - PCH PRIVATE "precomp.hpp" + PCH PRIVATE "src/precomp.hpp" ) diff --git a/inference-engine/tests/ie_test_utils/functional_test_utils/blob_utils.hpp b/inference-engine/tests/ie_test_utils/functional_test_utils/include/functional_test_utils/blob_utils.hpp similarity index 100% rename from inference-engine/tests/ie_test_utils/functional_test_utils/blob_utils.hpp rename to inference-engine/tests/ie_test_utils/functional_test_utils/include/functional_test_utils/blob_utils.hpp diff --git a/inference-engine/tests/ie_test_utils/functional_test_utils/include/functional_test_utils/core_config.hpp b/inference-engine/tests/ie_test_utils/functional_test_utils/include/functional_test_utils/core_config.hpp new file mode 100644 index 00000000000000..ea043267b79606 --- /dev/null +++ b/inference-engine/tests/ie_test_utils/functional_test_utils/include/functional_test_utils/core_config.hpp @@ -0,0 +1,9 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include "shared_test_classes/base/layer_test_utils.hpp" + +void CoreConfiguration(LayerTestsUtils::LayerTestsCommon* test); diff --git a/inference-engine/tests/ie_test_utils/functional_test_utils/network_utils.hpp b/inference-engine/tests/ie_test_utils/functional_test_utils/include/functional_test_utils/network_utils.hpp similarity index 100% rename from inference-engine/tests/ie_test_utils/functional_test_utils/network_utils.hpp rename to inference-engine/tests/ie_test_utils/functional_test_utils/include/functional_test_utils/network_utils.hpp diff --git a/inference-engine/tests/ie_test_utils/functional_test_utils/plugin_cache.hpp b/inference-engine/tests/ie_test_utils/functional_test_utils/include/functional_test_utils/plugin_cache.hpp similarity index 100% rename from inference-engine/tests/ie_test_utils/functional_test_utils/plugin_cache.hpp rename to inference-engine/tests/ie_test_utils/functional_test_utils/include/functional_test_utils/plugin_cache.hpp diff --git a/inference-engine/tests/ie_test_utils/functional_test_utils/precision_utils.hpp b/inference-engine/tests/ie_test_utils/functional_test_utils/include/functional_test_utils/precision_utils.hpp similarity index 100% rename from inference-engine/tests/ie_test_utils/functional_test_utils/precision_utils.hpp rename to inference-engine/tests/ie_test_utils/functional_test_utils/include/functional_test_utils/precision_utils.hpp diff --git a/inference-engine/tests/ie_test_utils/functional_test_utils/skip_tests_config.hpp b/inference-engine/tests/ie_test_utils/functional_test_utils/include/functional_test_utils/skip_tests_config.hpp similarity index 100% rename from inference-engine/tests/ie_test_utils/functional_test_utils/skip_tests_config.hpp rename to inference-engine/tests/ie_test_utils/functional_test_utils/include/functional_test_utils/skip_tests_config.hpp diff --git a/inference-engine/tests/ie_test_utils/functional_test_utils/test_model/test_model.hpp b/inference-engine/tests/ie_test_utils/functional_test_utils/include/functional_test_utils/test_model/test_model.hpp similarity index 100% rename from inference-engine/tests/ie_test_utils/functional_test_utils/test_model/test_model.hpp rename to inference-engine/tests/ie_test_utils/functional_test_utils/include/functional_test_utils/test_model/test_model.hpp diff --git a/inference-engine/tests/ie_test_utils/functional_test_utils/plugin_config.hpp b/inference-engine/tests/ie_test_utils/functional_test_utils/plugin_config.hpp deleted file mode 100644 index 6bbf7f750dc247..00000000000000 --- a/inference-engine/tests/ie_test_utils/functional_test_utils/plugin_config.hpp +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (C) 2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#pragma once - -#include "functional_test_utils/layer_test_utils.hpp" - -void PreparePluginConfiguration(LayerTestsUtils::LayerTestsCommon* test); diff --git a/inference-engine/tests/ie_test_utils/functional_test_utils/network_utils.cpp b/inference-engine/tests/ie_test_utils/functional_test_utils/src/network_utils.cpp similarity index 99% rename from inference-engine/tests/ie_test_utils/functional_test_utils/network_utils.cpp rename to inference-engine/tests/ie_test_utils/functional_test_utils/src/network_utils.cpp index ced9fc340c6a07..8d92cdc2ccdfe1 100644 --- a/inference-engine/tests/ie_test_utils/functional_test_utils/network_utils.cpp +++ b/inference-engine/tests/ie_test_utils/functional_test_utils/src/network_utils.cpp @@ -9,9 +9,9 @@ #include #include -#include "network_utils.hpp" +#include "functional_test_utils/network_utils.hpp" #include "cpp/ie_cnn_network.h" -#include "blob_utils.hpp" +#include "functional_test_utils/blob_utils.hpp" #include namespace FuncTestUtils { diff --git a/inference-engine/tests/ie_test_utils/functional_test_utils/plugin_cache.cpp b/inference-engine/tests/ie_test_utils/functional_test_utils/src/plugin_cache.cpp similarity index 98% rename from inference-engine/tests/ie_test_utils/functional_test_utils/plugin_cache.cpp rename to inference-engine/tests/ie_test_utils/functional_test_utils/src/plugin_cache.cpp index 99a29052262262..16f1aedd06f7b7 100644 --- a/inference-engine/tests/ie_test_utils/functional_test_utils/plugin_cache.cpp +++ b/inference-engine/tests/ie_test_utils/functional_test_utils/src/plugin_cache.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "plugin_cache.hpp" +#include "functional_test_utils/plugin_cache.hpp" #include #include diff --git a/inference-engine/tests/ie_test_utils/functional_test_utils/precomp.hpp b/inference-engine/tests/ie_test_utils/functional_test_utils/src/precomp.hpp similarity index 100% rename from inference-engine/tests/ie_test_utils/functional_test_utils/precomp.hpp rename to inference-engine/tests/ie_test_utils/functional_test_utils/src/precomp.hpp diff --git a/inference-engine/tests/ie_test_utils/functional_test_utils/skip_tests_config.cpp b/inference-engine/tests/ie_test_utils/functional_test_utils/src/skip_tests_config.cpp similarity index 100% rename from inference-engine/tests/ie_test_utils/functional_test_utils/skip_tests_config.cpp rename to inference-engine/tests/ie_test_utils/functional_test_utils/src/skip_tests_config.cpp diff --git a/inference-engine/tests/ie_test_utils/functional_test_utils/test_model/test_model.cpp b/inference-engine/tests/ie_test_utils/functional_test_utils/src/test_model/test_model.cpp similarity index 99% rename from inference-engine/tests/ie_test_utils/functional_test_utils/test_model/test_model.cpp rename to inference-engine/tests/ie_test_utils/functional_test_utils/src/test_model/test_model.cpp index 3adca88c8324cf..17b08a40d97cff 100644 --- a/inference-engine/tests/ie_test_utils/functional_test_utils/test_model/test_model.cpp +++ b/inference-engine/tests/ie_test_utils/functional_test_utils/src/test_model/test_model.cpp @@ -8,7 +8,7 @@ #include #include -#include "test_model.hpp" +#include "functional_test_utils/test_model/test_model.hpp" #include "common_test_utils/xml_net_builder/ir_net.hpp" #include "common_test_utils/xml_net_builder/xml_filler.hpp" #include "common_test_utils/common_layers_params.hpp" From 47485646bb7001e370500765c8dfc15c5ed8df01 Mon Sep 17 00:00:00 2001 From: Mateusz Tabaka Date: Wed, 16 Dec 2020 09:02:12 +0100 Subject: [PATCH 080/244] Revise DetectionOutput reference implementation (#3448) * Revice DetectionOutput reference implementation Ticket: 37433 * fix test_create_op * fix test_dyn_attributes * apply code format * fix crash on Windows when variance_encoded_in_target == 1 * add more checks for DetectionOutput inputs * Fix single layer tests * apply code format * fix ssd_vgg16_300 inference with batch size > 1 * update types in docs * fix crash on windows * apply code style * fix python tests * fix setting output type * change False to false and True to true in docs * Allow prior boxes to have different type than box logits Some models work that way * simplify output shape calculation * fixes to docs --- docs/ops/detection/DetectionOutput_1.md | 87 +- .../legacy_api/src/ie_layer_validators.cpp | 9 +- .../mkldnn_plugin/nodes/detectionoutput.cpp | 12 +- .../include/ngraph/op/detection_output.hpp | 4 +- .../runtime/reference/detection_output.hpp | 171 ++-- ngraph/core/src/op/detection_output.cpp | 217 ++++- .../tests/test_ngraph/test_create_op.py | 10 +- .../tests/test_ngraph/test_dyn_attributes.py | 14 +- ngraph/test/CMakeLists.txt | 2 + ngraph/test/attributes.cpp | 10 +- ngraph/test/backend/detection_output.in.cpp | 872 ++++++++++++++++++ .../models/onnx/detection_output.prototxt | 2 +- ngraph/test/onnx/onnx_import.in.cpp | 12 +- .../runtime/interpreter/evaluates_map.cpp | 6 +- ngraph/test/type_prop/detection_output.cpp | 783 ++++++++++++++++ ngraph/test/type_prop_layers.cpp | 15 - 16 files changed, 2082 insertions(+), 144 deletions(-) create mode 100644 ngraph/test/backend/detection_output.in.cpp create mode 100644 ngraph/test/type_prop/detection_output.cpp diff --git a/docs/ops/detection/DetectionOutput_1.md b/docs/ops/detection/DetectionOutput_1.md index d6ab50950ddf7f..6175a9668982bc 100644 --- a/docs/ops/detection/DetectionOutput_1.md +++ b/docs/ops/detection/DetectionOutput_1.md @@ -6,7 +6,7 @@ **Short description**: *DetectionOutput* performs non-maximum suppression to generate the detection output using information on location and confidence predictions. -**Detailed description**: [Reference](https://arxiv.org/pdf/1512.02325.pdf). The layer has 3 mandatory inputs: tensor with box logits, tensor with confidence predictions and tensor with box coordinates (proposals). It can have 2 additional inputs with additional confidence predictions and box coordinates described in the [article](https://arxiv.org/pdf/1711.06897.pdf). The 5-input version of the layer is supported with Myriad plugin only. The output tensor contains information about filtered detections described with 7 element tuples: *[batch_id, class_id, confidence, x_1, y_1, x_2, y_2]*. The first tuple with *batch_id* equal to *-1* means end of output. +**Detailed description**: [Reference](https://arxiv.org/pdf/1512.02325.pdf). The layer has 3 mandatory inputs: tensor with box logits, tensor with confidence predictions and tensor with box coordinates (proposals). It can have 2 additional inputs with additional confidence predictions and box coordinates described in the [article](https://arxiv.org/pdf/1711.06897.pdf). The output tensor contains information about filtered detections described with 7 element tuples: `[batch_id, class_id, confidence, x_1, y_1, x_2, y_2]`. The first tuple with `batch_id` equal to `-1` means end of output. At each feature map cell, *DetectionOutput* predicts the offsets relative to the default box shapes in the cell, as well as the per-class scores that indicate the presence of a class instance in each of those boxes. Specifically, for each box out of k at a given location, *DetectionOutput* computes class scores and the four offsets relative to the original default box shape. This results in a total of \f$(c + 4)k\f$ filters that are applied around each location in the feature map, yielding \f$(c + 4)kmn\f$ outputs for a *m \* n* feature map. @@ -63,9 +63,9 @@ At each feature map cell, *DetectionOutput* predicts the offsets relative to the * *share_location* * **Description**: *share_location* is a flag that denotes if bounding boxes are shared among different classes. - * **Range of values**: 0 or 1 - * **Type**: int - * **Default value**: 1 + * **Range of values**: false or true + * **Type**: boolean + * **Default value**: true * **Required**: *no* * *nms_threshold* @@ -87,35 +87,35 @@ At each feature map cell, *DetectionOutput* predicts the offsets relative to the * *clip_after_nms* * **Description**: *clip_after_nms* flag that denotes whether to perform clip bounding boxes after non-maximum suppression or not. - * **Range of values**: 0 or 1 - * **Type**: int - * **Default value**: 0 + * **Range of values**: false or true + * **Type**: boolean + * **Default value**: false * **Required**: *no* * *clip_before_nms* * **Description**: *clip_before_nms* flag that denotes whether to perform clip bounding boxes before non-maximum suppression or not. - * **Range of values**: 0 or 1 - * **Type**: int - * **Default value**: 0 + * **Range of values**: false or true + * **Type**: boolean + * **Default value**: false * **Required**: *no* * *decrease_label_id* * **Description**: *decrease_label_id* flag that denotes how to perform NMS. * **Range of values**: - * 0 - perform NMS like in Caffe\*. - * 1 - perform NMS like in MxNet\*. - * **Type**: int - * **Default value**: 0 + * false - perform NMS like in Caffe\*. + * true - perform NMS like in MxNet\*. + * **Type**: boolean + * **Default value**: false * **Required**: *no* * *normalized* - * **Description**: *normalized* flag that denotes whether input tensors with boxes are normalized. If tensors are not normalized then *input_height* and *input_width* attributes are used to normalize box coordinates. - * **Range of values**: 0 or 1 - * **Type**: int - * **Default value**: 0 + * **Description**: *normalized* flag that denotes whether input tensor with proposal boxes is normalized. If tensor is not normalized then *input_height* and *input_width* attributes are used to normalize box coordinates. + * **Range of values**: false or true + * **Type**: boolean + * **Default value**: false * **Required**: *no* * *input_height (input_width)* @@ -133,21 +133,52 @@ At each feature map cell, *DetectionOutput* predicts the offsets relative to the * **Type**: float * **Default value**: 0 * **Required**: *no* - + **Inputs** -* **1**: 2D input tensor with box logits. Required. -* **2**: 2D input tensor with class predictions. Required. -* **3**: 3D input tensor with proposals. Required. -* **4**: 2D input tensor with additional class predictions information described in the [article](https://arxiv.org/pdf/1711.06897.pdf). Optional. -* **5**: 2D input tensor with additional box predictions information described in the [article](https://arxiv.org/pdf/1711.06897.pdf). Optional. +* **1**: 2D input tensor with box logits with shape `[N, num_prior_boxes * num_loc_classes * 4]` and type *T*. `num_loc_classes` is equal to `num_classes` when `share_location` is 0 or it's equal to 1 otherwise. Required. +* **2**: 2D input tensor with class predictions with shape `[N, num_prior_boxes * num_classes]` and type *T*. Required. +* **3**: 3D input tensor with proposals with shape `[priors_batch_size, 1, num_prior_boxes * prior_box_size]` or `[priors_batch_size, 2, num_prior_boxes * prior_box_size]`. `priors_batch_size` is either 1 or `N`. Size of the second dimension depends on `variance_encoded_in_target`. If `variance_encoded_in_target` is equal to 0, the second dimension equals to 2 and variance values are provided for each boxes coordinates. If `variance_encoded_in_target` is equal to 1, the second dimension equals to 1 and this tensor contains proposals boxes only. `prior_box_size` is equal to 4 when `normalized` is set to 1 or it's equal to 5 otherwise. Required. + Required. +* **4**: 2D input tensor with additional class predictions information described in the [article](https://arxiv.org/pdf/1711.06897.pdf). Its shape must be equal to `[N, num_prior_boxes * 2]`. Optional. +* **5**: 2D input tensor with additional box predictions information described in the [article](https://arxiv.org/pdf/1711.06897.pdf). Its shape must be equal to first input tensor shape. Optional. + +**Outputs** + +* **1**: 4D output tensor with type *T*. Its shape depends on `keep_top_k` or `top_k` being set. It `keep_top_k[0]` is greater than zero, then the shape is `[1, 1, N * keep_top_k[0], 7]`. If `keep_top_k[0]` is set to -1 and `top_k` is greater than zero, then the shape is `[1, 1, N * top_k * num_classes, 7]`. Otherwise, the output shape is equal to `[1, 1, N * num_classes * num_prior_boxes, 7]`. + +**Types** + +* *T*: any supported floating point type. + **Example** ```xml - - ... - ... + + + + 1 + 5376 + + + 1 + 2688 + + + 1 + 2 + 5376 + + + + + 1 + 1 + 200 + 7 + + -``` \ No newline at end of file +``` diff --git a/inference-engine/src/legacy_api/src/ie_layer_validators.cpp b/inference-engine/src/legacy_api/src/ie_layer_validators.cpp index 5b45c48a1d2d72..33151de3111427 100644 --- a/inference-engine/src/legacy_api/src/ie_layer_validators.cpp +++ b/inference-engine/src/legacy_api/src/ie_layer_validators.cpp @@ -931,11 +931,12 @@ void DetectionOutputValidator::parseParams(CNNLayer* layer) { if (_nms_threshold < 0) { THROW_IE_EXCEPTION << "nms_threshold parameter of DetectionOutput layer can't be less then zero"; } - int _keep_top_k = layer->GetParamAsUInt("keep_top_k", -1); + int _keep_top_k = layer->GetParamAsInt("keep_top_k", -1); if (layer->CheckParamPresence("background_label_id")) - int _background_label_id = layer->GetParamAsUInt("background_label_id", -1); - if (layer->CheckParamPresence("top_k")) int _top_k = layer->GetParamAsUInt("top_k", -1); + int _background_label_id = layer->GetParamAsInt("background_label_id", -1); + if (layer->CheckParamPresence("top_k")) + int _top_k = layer->GetParamAsInt("top_k", -1); if (layer->CheckParamPresence("variance_encoded_in_target")) bool _variance_encoded_in_target = static_cast(layer->GetParamAsUInt("variance_encoded_in_target", 0)); if (layer->CheckParamPresence("num_orient_classes")) @@ -947,7 +948,7 @@ void DetectionOutputValidator::parseParams(CNNLayer* layer) { if (layer->CheckParamPresence("confidence_threshold")) { float _confidence_threshold = layer->GetParamAsFloat("confidence_threshold"); if (_confidence_threshold < 0) { - THROW_IE_EXCEPTION << "_nms_threshold parameter of DetectionOutput layer can't be less then zero"; + THROW_IE_EXCEPTION << "_confidence_threshold parameter of DetectionOutput layer can't be less then zero"; } } diff --git a/inference-engine/src/mkldnn_plugin/nodes/detectionoutput.cpp b/inference-engine/src/mkldnn_plugin/nodes/detectionoutput.cpp index e96cf5ee32eaa4..c53d55ffc4a9a8 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/detectionoutput.cpp +++ b/inference-engine/src/mkldnn_plugin/nodes/detectionoutput.cpp @@ -278,17 +278,23 @@ class DetectionOutputImpl: public ExtLayerBase { } } + const int num_results = outputs[0]->getTensorDesc().getDims()[2]; const int DETECTION_SIZE = outputs[0]->getTensorDesc().getDims()[3]; if (DETECTION_SIZE != 7) { return NOT_IMPLEMENTED; } - auto dst_data_size = N * _keep_top_k * DETECTION_SIZE * sizeof(float); + int dst_data_size = 0; + if (_keep_top_k > 0) + dst_data_size = N * _keep_top_k * DETECTION_SIZE * sizeof(float); + else if (_top_k > 0) + dst_data_size = N * _top_k * _num_classes * DETECTION_SIZE * sizeof(float); + else + dst_data_size = N * _num_classes * _num_priors * DETECTION_SIZE * sizeof(float); if (dst_data_size > outputs[0]->byteSize()) { return OUT_OF_BOUNDS; } - memset(dst_data, 0, dst_data_size); int count = 0; @@ -331,7 +337,7 @@ class DetectionOutputImpl: public ExtLayerBase { } } - if (count < N*_keep_top_k) { + if (count < num_results) { // marker at end of boxes list dst_data[count * DETECTION_SIZE + 0] = -1; } diff --git a/ngraph/core/include/ngraph/op/detection_output.hpp b/ngraph/core/include/ngraph/op/detection_output.hpp index ac7972d9b2b7bf..55457bf4f0fe2c 100644 --- a/ngraph/core/include/ngraph/op/detection_output.hpp +++ b/ngraph/core/include/ngraph/op/detection_output.hpp @@ -28,11 +28,11 @@ namespace ngraph int background_label_id = 0; int top_k = -1; bool variance_encoded_in_target = false; - std::vector keep_top_k = {1}; + std::vector keep_top_k; std::string code_type = std::string{"caffe.PriorBoxParameter.CORNER"}; bool share_location = true; float nms_threshold; - float confidence_threshold = std::numeric_limits::min(); + float confidence_threshold = 0; bool clip_after_nms = false; bool clip_before_nms = false; bool decrease_label_id = false; diff --git a/ngraph/core/reference/include/ngraph/runtime/reference/detection_output.hpp b/ngraph/core/reference/include/ngraph/runtime/reference/detection_output.hpp index 9d372b62c633ad..c2fb331f714517 100644 --- a/ngraph/core/reference/include/ngraph/runtime/reference/detection_output.hpp +++ b/ngraph/core/reference/include/ngraph/runtime/reference/detection_output.hpp @@ -9,6 +9,7 @@ #include #include +#include "ngraph/op/detection_output.hpp" #include "ngraph/shape.hpp" namespace ngraph @@ -37,7 +38,6 @@ namespace ngraph dataType ymin = dataType(0); dataType xmax = dataType(0); dataType ymax = dataType(0); - dataType size = dataType(0); }; using LabelBBox = std::map>; @@ -45,8 +45,11 @@ namespace ngraph size_t numImages; size_t priorSize; size_t numPriors; + size_t priorsBatchSize; size_t numLocClasses; size_t offset; + size_t numResults; + size_t outTotalSize; void GetLocPredictions(const dataType* locData, std::vector& locations) { @@ -145,13 +148,12 @@ namespace ngraph std::vector>& priorBboxes, std::vector>>& priorVariances) { - priorBboxes.resize(numImages); - priorVariances.resize(numImages); - for (int n = 0; n < numImages; n++) + priorBboxes.resize(priorsBatchSize); + priorVariances.resize(priorsBatchSize); + int off = attrs.variance_encoded_in_target ? (numPriors * priorSize) + : (2 * numPriors * priorSize); + for (int n = 0; n < priorsBatchSize; n++) { - priorData += attrs.variance_encoded_in_target - ? n * numPriors * priorSize - : 2 * n * numPriors * priorSize; std::vector& currPrBbox = priorBboxes[n]; std::vector>& currPrVar = priorVariances[n]; for (int i = 0; i < numPriors; ++i) @@ -162,8 +164,6 @@ namespace ngraph bbox.ymin = priorData[start_idx + 1 + offset]; bbox.xmax = priorData[start_idx + 2 + offset]; bbox.ymax = priorData[start_idx + 3 + offset]; - dataType bbox_size = BBoxSize(bbox); - bbox.size = bbox_size; currPrBbox.push_back(bbox); } if (!attrs.variance_encoded_in_target) @@ -172,14 +172,15 @@ namespace ngraph for (int i = 0; i < numPriors; ++i) { int start_idx = i * 4; - std::vector var; + std::vector var(4); for (int j = 0; j < 4; ++j) { - var.push_back(priorVar[start_idx + j]); + var[j] = (priorVar[start_idx + j]); } currPrVar.push_back(var); } } + priorData += off; } } @@ -200,22 +201,13 @@ namespace ngraph priorXmax /= attrs.input_width; priorYmax /= attrs.input_height; } + if (attrs.code_type == "caffe.PriorBoxParameter.CORNER") { - if (attrs.variance_encoded_in_target) - { - decodeBbox.xmin = priorXmin + bbox.xmin; - decodeBbox.ymin = priorYmin + bbox.ymin; - decodeBbox.xmax = priorXmax + bbox.xmax; - decodeBbox.ymax = priorYmax + bbox.ymax; - } - else - { - decodeBbox.xmin = priorXmin + priorVariances[0] * bbox.xmin; - decodeBbox.ymin = priorYmin + priorVariances[1] * bbox.ymin; - decodeBbox.xmax = priorXmax + priorVariances[2] * bbox.xmax; - decodeBbox.ymax = priorYmax + priorVariances[3] * bbox.ymax; - } + decodeBbox.xmin = priorXmin + priorVariances[0] * bbox.xmin; + decodeBbox.ymin = priorYmin + priorVariances[1] * bbox.ymin; + decodeBbox.xmax = priorXmax + priorVariances[2] * bbox.xmax; + decodeBbox.ymax = priorYmax + priorVariances[3] * bbox.ymax; } else if (attrs.code_type == "caffe.PriorBoxParameter.CENTER_SIZE") { @@ -225,41 +217,60 @@ namespace ngraph dataType priorCenterY = (priorYmin + priorYmax) / 2; dataType decodeBboxCenterX, decodeBboxCenterY; dataType decodeBboxWidth, decodeBboxHeight; - if (attrs.variance_encoded_in_target) - { - decodeBboxCenterX = bbox.xmin * priorWidth + priorCenterX; - decodeBboxCenterY = bbox.ymin * priorHeight + priorCenterY; - decodeBboxWidth = std::exp(bbox.xmax) * priorWidth; - decodeBboxHeight = std::exp(bbox.ymax) * priorHeight; - } - else - { - decodeBboxCenterX = - priorVariances[0] * bbox.xmin * priorWidth + priorCenterX; - decodeBboxCenterY = - priorVariances[1] * bbox.ymin * priorHeight + priorCenterY; - decodeBboxWidth = std::exp(priorVariances[2] * bbox.xmax) * priorWidth; - decodeBboxHeight = - std::exp(priorVariances[3] * bbox.ymax) * priorHeight; - } + decodeBboxCenterX = + priorVariances[0] * bbox.xmin * priorWidth + priorCenterX; + decodeBboxCenterY = + priorVariances[1] * bbox.ymin * priorHeight + priorCenterY; + decodeBboxWidth = std::exp(priorVariances[2] * bbox.xmax) * priorWidth; + decodeBboxHeight = std::exp(priorVariances[3] * bbox.ymax) * priorHeight; decodeBbox.xmin = decodeBboxCenterX - decodeBboxWidth / 2; decodeBbox.ymin = decodeBboxCenterY - decodeBboxHeight / 2; decodeBbox.xmax = decodeBboxCenterX + decodeBboxWidth / 2; decodeBbox.ymax = decodeBboxCenterY + decodeBboxHeight / 2; } - if (attrs.clip_before_nms) + } + + void DecodeBBox(const NormalizedBBox& priorBboxes, + const NormalizedBBox& bbox, + NormalizedBBox& decodeBbox) + { + dataType priorXmin = priorBboxes.xmin; + dataType priorYmin = priorBboxes.ymin; + dataType priorXmax = priorBboxes.xmax; + dataType priorYmax = priorBboxes.ymax; + + if (!attrs.normalized) + { + priorXmin /= attrs.input_width; + priorYmin /= attrs.input_height; + priorXmax /= attrs.input_width; + priorYmax /= attrs.input_height; + } + + if (attrs.code_type == "caffe.PriorBoxParameter.CORNER") { - decodeBbox.xmin = - std::max(0, std::min(1, decodeBbox.xmin)); - decodeBbox.ymin = - std::max(0, std::min(1, decodeBbox.ymin)); - decodeBbox.xmax = - std::max(0, std::min(1, decodeBbox.xmax)); - decodeBbox.ymax = - std::max(0, std::min(1, decodeBbox.ymax)); + decodeBbox.xmin = priorXmin + bbox.xmin; + decodeBbox.ymin = priorYmin + bbox.ymin; + decodeBbox.xmax = priorXmax + bbox.xmax; + decodeBbox.ymax = priorYmax + bbox.ymax; + } + else if (attrs.code_type == "caffe.PriorBoxParameter.CENTER_SIZE") + { + dataType priorWidth = priorXmax - priorXmin; + dataType priorHeight = priorYmax - priorYmin; + dataType priorCenterX = (priorXmin + priorXmax) / 2; + dataType priorCenterY = (priorYmin + priorYmax) / 2; + dataType decodeBboxCenterX, decodeBboxCenterY; + dataType decodeBboxWidth, decodeBboxHeight; + decodeBboxCenterX = bbox.xmin * priorWidth + priorCenterX; + decodeBboxCenterY = bbox.ymin * priorHeight + priorCenterY; + decodeBboxWidth = std::exp(bbox.xmax) * priorWidth; + decodeBboxHeight = std::exp(bbox.ymax) * priorHeight; + decodeBbox.xmin = decodeBboxCenterX - decodeBboxWidth / 2; + decodeBbox.ymin = decodeBboxCenterY - decodeBboxHeight / 2; + decodeBbox.xmax = decodeBboxCenterX + decodeBboxWidth / 2; + decodeBbox.ymax = decodeBboxCenterY + decodeBboxHeight / 2; } - dataType bboxSize = BBoxSize(decodeBbox); - decodeBbox.size = bboxSize; } void DecodeBBoxes(const std::vector& priorBboxes, @@ -271,7 +282,27 @@ namespace ngraph for (int i = 0; i < numBboxes; ++i) { NormalizedBBox decodeBbox; - DecodeBBox(priorBboxes[i], priorVariances[i], labelLocPreds[i], decodeBbox); + + if (attrs.variance_encoded_in_target) + { + DecodeBBox(priorBboxes[i], labelLocPreds[i], decodeBbox); + } + else + { + DecodeBBox( + priorBboxes[i], priorVariances[i], labelLocPreds[i], decodeBbox); + } + if (attrs.clip_before_nms) + { + decodeBbox.xmin = + std::max(0, std::min(1, decodeBbox.xmin)); + decodeBbox.ymin = + std::max(0, std::min(1, decodeBbox.ymin)); + decodeBbox.xmax = + std::max(0, std::min(1, decodeBbox.xmax)); + decodeBbox.ymax = + std::max(0, std::min(1, decodeBbox.ymax)); + } decodeBboxes.push_back(decodeBbox); } } @@ -286,12 +317,19 @@ namespace ngraph for (int i = 0; i < numImages; ++i) { LabelBBox& decodeBboxesImage = decodeBboxes[i]; - const std::vector& currPrBbox = priorBboxes[i]; - const std::vector>& currPrVar = priorVariances[i]; + int pboxIdx = i; + if (priorBboxes.size() == 1) + { + pboxIdx = 0; + } + const std::vector& currPrBbox = priorBboxes[pboxIdx]; + const std::vector>& currPrVar = + priorVariances[pboxIdx]; for (int c = 0; c < numLocClasses; ++c) { int label = attrs.share_location ? -1 : c; - if (label == attrs.background_label_id) + if (attrs.background_label_id > -1 && + label == attrs.background_label_id) { continue; } @@ -319,7 +357,8 @@ namespace ngraph for (int c = 0; c < numLocClasses; ++c) { int label = attrs.share_location ? -1 : c; - if (label == attrs.background_label_id) + if (attrs.background_label_id > -1 && + label == attrs.background_label_id) { continue; } @@ -360,6 +399,7 @@ namespace ngraph std::stable_sort( scoreIndexVec.begin(), scoreIndexVec.end(), SortScorePairDescend); + if (topK > -1 && topK < scoreIndexVec.size()) { scoreIndexVec.resize(topK); @@ -391,6 +431,7 @@ namespace ngraph { NormalizedBBox intersectBbox; IntersectBBox(bbox1, bbox2, intersectBbox); + dataType intersectWidth, intersectHeight; intersectWidth = intersectBbox.xmax - intersectBbox.xmin; intersectHeight = intersectBbox.ymax - intersectBbox.ymin; @@ -399,7 +440,6 @@ namespace ngraph dataType intersect_size = intersectWidth * intersectHeight; dataType bbox1_size = BBoxSize(bbox1); dataType bbox2_size = BBoxSize(bbox2); - return intersect_size / (bbox1_size + bbox2_size - intersect_size); } else @@ -423,6 +463,7 @@ namespace ngraph { const int kept_idx = indices[k]; dataType overlap = JaccardOverlap(bboxes[idx], bboxes[kept_idx]); + if (overlap > attrs.nms_threshold) { keep = false; @@ -448,6 +489,8 @@ namespace ngraph int id = 0; for (int c = 1; c < attrs.num_classes; c++) { + if (attrs.background_label_id > -1 && c == attrs.background_label_id) + continue; dataType temp = confScores.at(c)[p]; if (temp > conf) { @@ -497,15 +540,19 @@ namespace ngraph public: referenceDetectionOutput(const ngraph::op::DetectionOutputAttrs& _attrs, const ngraph::Shape& locShape, - const ngraph::Shape& priorsShape) + const ngraph::Shape& priorsShape, + const ngraph::Shape& outShape) : attrs(_attrs) { numImages = locShape[0]; priorSize = _attrs.normalized ? 4 : 5; offset = _attrs.normalized ? 0 : 1; numPriors = priorsShape[2] / priorSize; + priorsBatchSize = priorsShape[0]; numLocClasses = _attrs.share_location ? 1 : static_cast(_attrs.num_classes); + numResults = outShape[2]; + outTotalSize = shape_size(outShape); } void run(const dataType* _location, @@ -515,6 +562,7 @@ namespace ngraph const dataType* _armLocation, dataType* result) { + std::memset(result, 0, outTotalSize * sizeof(dataType)); bool withAddBoxPred = _armConfidence != nullptr && _armLocation != nullptr; std::vector armLocPreds; if (withAddBoxPred) @@ -566,6 +614,7 @@ namespace ngraph if (confScores.find(c) == confScores.end()) continue; const std::vector& scores = confScores.find(c)->second; + int label = attrs.share_location ? -1 : c; if (decodeBboxesImage.find(label) == decodeBboxesImage.end()) continue; @@ -666,7 +715,7 @@ namespace ngraph } } } - if (count < numImages * attrs.keep_top_k[0]) + if (count < numResults) { result[count * 7 + 0] = -1; } diff --git a/ngraph/core/src/op/detection_output.cpp b/ngraph/core/src/op/detection_output.cpp index 86a107deb5d92f..e0471495bb0c7b 100644 --- a/ngraph/core/src/op/detection_output.cpp +++ b/ngraph/core/src/op/detection_output.cpp @@ -45,16 +45,223 @@ op::DetectionOutput::DetectionOutput(const Output& box_logits, void op::DetectionOutput::validate_and_infer_types() { - if (get_input_partial_shape(0).is_static()) + NODE_VALIDATION_CHECK( + this, m_attrs.num_classes > 0, "Number of classes must be greater than zero"); + + NODE_VALIDATION_CHECK( + this, m_attrs.keep_top_k.size() > 0, "keep_top_k attribute must be provided"); + + NODE_VALIDATION_CHECK(this, + m_attrs.code_type == "caffe.PriorBoxParameter.CORNER" || + m_attrs.code_type == "caffe.PriorBoxParameter.CENTER_SIZE", + "code_type must be either \"caffe.PriorBoxParameter.CORNER\" or " + "\"caffe.PriorBoxParameter.CENTER_SIZE\""); + + auto box_logits_et = get_input_element_type(0); + NODE_VALIDATION_CHECK(this, + box_logits_et.is_real(), + "Box logits' data type must be floating point. Got " + + box_logits_et.get_type_name()); + auto class_preds_et = get_input_element_type(1); + NODE_VALIDATION_CHECK(this, + class_preds_et == box_logits_et, + "Class predictions' data type must be the same as box logits type (" + + box_logits_et.get_type_name() + "). Got " + + class_preds_et.get_type_name()); + auto proposals_et = get_input_element_type(2); + NODE_VALIDATION_CHECK(this, + proposals_et.is_real(), + "Proposals' data type must be floating point. Got " + + proposals_et.get_type_name()); + + const PartialShape& box_logits_pshape = get_input_partial_shape(0); + const PartialShape& class_preds_pshape = get_input_partial_shape(1); + const PartialShape& proposals_pshape = get_input_partial_shape(2); + + int num_loc_classes = m_attrs.share_location ? 1 : m_attrs.num_classes; + int prior_box_size = m_attrs.normalized ? 4 : 5; + + Dimension num_images = Dimension::dynamic(); + Dimension num_prior_boxes = Dimension::dynamic(); + if (box_logits_pshape.rank().is_static()) + { + NODE_VALIDATION_CHECK(this, + box_logits_pshape.rank().get_length() == 2, + "Box logits rank must be 2. Got " + + std::to_string(box_logits_pshape.rank().get_length())); + num_images = box_logits_pshape[0]; + if (box_logits_pshape[1].is_static()) + { + NODE_VALIDATION_CHECK( + this, + (box_logits_pshape[1].get_length() % (num_loc_classes * 4)) == 0, + "Box logits' second dimension must be a multiply of num_loc_classes * 4 (" + + std::to_string(num_loc_classes * 4) + "). Current value is: ", + box_logits_pshape[1].get_length(), + "."); + num_prior_boxes = box_logits_pshape[1].get_length() / (num_loc_classes * 4); + } + } + if (class_preds_pshape.rank().is_static()) + { + NODE_VALIDATION_CHECK(this, + class_preds_pshape.rank().get_length() == 2, + "Class predictions rank must be 2. Got " + + std::to_string(class_preds_pshape.rank().get_length())); + if (num_images.is_dynamic() && class_preds_pshape[0].is_static()) + { + num_images = class_preds_pshape[0]; + } + else + { + NODE_VALIDATION_CHECK( + this, + class_preds_pshape[0].compatible(num_images), + "Class predictions' first dimension is not compatible with batch size."); + } + if (class_preds_pshape[1].is_static()) + { + if (num_prior_boxes.is_dynamic()) + { + NODE_VALIDATION_CHECK( + this, + class_preds_pshape[1].get_length() % m_attrs.num_classes == 0, + "Class predictions' second dimension must be a multiply of num_classes (" + + std::to_string(m_attrs.num_classes) + "). Current value is: ", + class_preds_pshape[1].get_length(), + "."); + num_prior_boxes = class_preds_pshape[1].get_length() / m_attrs.num_classes; + } + else + { + int num_prior_boxes_val = num_prior_boxes.get_length(); + NODE_VALIDATION_CHECK( + this, + class_preds_pshape[1].get_length() == num_prior_boxes_val * m_attrs.num_classes, + "Class predictions' second dimension must be equal to num_prior_boxes * " + "num_classes (" + + std::to_string(num_prior_boxes_val * m_attrs.num_classes) + + "). Current value is: ", + class_preds_pshape[1].get_length(), + "."); + } + } + } + if (proposals_pshape.rank().is_static()) + { + NODE_VALIDATION_CHECK(this, + proposals_pshape.rank().get_length() == 3, + "Proposals rank must be 3. Got " + + std::to_string(proposals_pshape.rank().get_length())); + if (num_images.is_static() && proposals_pshape[0].is_static()) + { + int64_t proposals_1st_dim = proposals_pshape[0].get_length(); + int64_t num_images_val = num_images.get_length(); + NODE_VALIDATION_CHECK( + this, + proposals_1st_dim == 1 || proposals_1st_dim == num_images_val, + "Proposals' first dimension is must be equal to either batch size (" + + std::to_string(num_images_val) + ") or 1. Got: " + + std::to_string(proposals_1st_dim) + "."); + } + if (proposals_pshape[1].is_static()) + { + size_t proposals_expected_2nd_dim = m_attrs.variance_encoded_in_target ? 1 : 2; + NODE_VALIDATION_CHECK(this, + proposals_pshape[1].compatible(proposals_expected_2nd_dim), + "Proposals' second dimension is mismatched. Current value is: ", + proposals_pshape[1].get_length(), + ", expected: ", + proposals_expected_2nd_dim, + "."); + } + if (proposals_pshape[2].is_static()) + { + if (num_prior_boxes.is_dynamic()) + { + NODE_VALIDATION_CHECK( + this, + proposals_pshape[2].get_length() % prior_box_size == 0, + "Proposals' third dimension must be a multiply of prior_box_size (" + + std::to_string(prior_box_size) + "). Current value is: ", + proposals_pshape[2].get_length(), + "."); + num_prior_boxes = proposals_pshape[2].get_length() / prior_box_size; + } + else + { + int num_prior_boxes_val = num_prior_boxes.get_length(); + NODE_VALIDATION_CHECK(this, + proposals_pshape[2].get_length() == + num_prior_boxes_val * prior_box_size, + "Proposals' third dimension must be equal to num_prior_boxes " + "* prior_box_size (" + + std::to_string(num_prior_boxes_val * prior_box_size) + + "). Current value is: ", + proposals_pshape[2].get_length(), + "."); + } + } + } + + if (get_input_size() > 3) { - auto box_logits_shape = get_input_partial_shape(0).to_shape(); - set_output_type( - 0, element::f32, Shape{1, 1, m_attrs.keep_top_k[0] * box_logits_shape[0], 7}); + auto aux_class_preds_et = get_input_element_type(3); + NODE_VALIDATION_CHECK(this, + aux_class_preds_et == class_preds_et, + "Additional class predictions' data type must be the same as class " + "predictions data type (" + + class_preds_et.get_type_name() + "). Got " + + aux_class_preds_et.get_type_name()); + auto aux_box_preds_et = get_input_element_type(4); + NODE_VALIDATION_CHECK( + this, + aux_box_preds_et == box_logits_et, + "Additional box predictions' data type must be the same as box logits data type (" + + box_logits_et.get_type_name() + "). Got " + aux_box_preds_et.get_type_name()); + + const PartialShape& aux_class_preds_pshape = get_input_partial_shape(3); + const PartialShape& aux_box_preds_pshape = get_input_partial_shape(4); + if (aux_class_preds_pshape.rank().is_static()) + { + NODE_VALIDATION_CHECK(this, + aux_class_preds_pshape[0].compatible(num_images), + "Additional class predictions' first dimension must be " + "compatible with batch size."); + if (num_prior_boxes.is_static()) + { + int num_prior_boxes_val = num_prior_boxes.get_length(); + NODE_VALIDATION_CHECK( + this, + aux_class_preds_pshape[1].get_length() == num_prior_boxes_val * 2, + "Additional class predictions' second dimension must be equal to " + "num_prior_boxes * 2 (" + + std::to_string(num_prior_boxes_val * 2) + "). Got " + + std::to_string(aux_class_preds_pshape[1].get_length()) + "."); + } + } + NODE_VALIDATION_CHECK( + this, + aux_box_preds_pshape.compatible(box_logits_pshape), + "Additional box predictions' shape must be compatible with box logits shape."); + } + + std::vector output_shape{1, 1}; + if (m_attrs.keep_top_k[0] > 0) + { + output_shape.push_back(num_images * m_attrs.keep_top_k[0]); + } + else if (m_attrs.top_k > 0) + { + output_shape.push_back(num_images * m_attrs.top_k * m_attrs.num_classes); } else { - set_output_type(0, element::f32, PartialShape::dynamic()); + output_shape.push_back(num_images * num_prior_boxes * m_attrs.num_classes); } + output_shape.push_back(7); + + set_output_type(0, box_logits_et, output_shape); } shared_ptr op::DetectionOutput::clone_with_new_inputs(const OutputVector& new_args) const diff --git a/ngraph/python/tests/test_ngraph/test_create_op.py b/ngraph/python/tests/test_ngraph/test_create_op.py index 4a3b6d0eeef051..c403c8ff022569 100644 --- a/ngraph/python/tests/test_ngraph/test_create_op.py +++ b/ngraph/python/tests/test_ngraph/test_create_op.py @@ -932,11 +932,11 @@ def test_detection_output(int_dtype, fp_dtype): "nms_threshold": fp_dtype(0.645), } - box_logits = ng.parameter([4, 1, 5, 5], fp_dtype, "box_logits") - class_preds = ng.parameter([2, 1, 4, 5], fp_dtype, "class_preds") - proposals = ng.parameter([2, 1, 4, 5], fp_dtype, "proposals") - aux_class_preds = ng.parameter([2, 1, 4, 5], fp_dtype, "aux_class_preds") - aux_box_preds = ng.parameter([2, 1, 4, 5], fp_dtype, "aux_box_preds") + box_logits = ng.parameter([4, 8], fp_dtype, "box_logits") + class_preds = ng.parameter([4, 170], fp_dtype, "class_preds") + proposals = ng.parameter([4, 2, 10], fp_dtype, "proposals") + aux_class_preds = ng.parameter([4, 4], fp_dtype, "aux_class_preds") + aux_box_preds = ng.parameter([4, 8], fp_dtype, "aux_box_preds") node = ng.detection_output(box_logits, class_preds, proposals, attributes, aux_class_preds, aux_box_preds) diff --git a/ngraph/python/tests/test_ngraph/test_dyn_attributes.py b/ngraph/python/tests/test_ngraph/test_dyn_attributes.py index c56a7ab7837fd3..c4ee4c427e4f40 100644 --- a/ngraph/python/tests/test_ngraph/test_dyn_attributes.py +++ b/ngraph/python/tests/test_ngraph/test_dyn_attributes.py @@ -71,7 +71,7 @@ def test_dynamic_get_attribute_value(int_dtype, fp_dtype): "top_k": int_dtype(16), "variance_encoded_in_target": True, "keep_top_k": np.array([64, 32, 16, 8], dtype=int_dtype), - "code_type": "pytorch.some_parameter_name", + "code_type": "caffe.PriorBoxParameter.CENTER_SIZE", "share_location": False, "nms_threshold": fp_dtype(0.645), "confidence_threshold": fp_dtype(0.111), @@ -84,11 +84,11 @@ def test_dynamic_get_attribute_value(int_dtype, fp_dtype): "objectness_score": fp_dtype(0.77), } - box_logits = ng.parameter([4, 1, 5, 5], fp_dtype, "box_logits") - class_preds = ng.parameter([2, 1, 4, 5], fp_dtype, "class_preds") - proposals = ng.parameter([2, 1, 4, 5], fp_dtype, "proposals") - aux_class_preds = ng.parameter([2, 1, 4, 5], fp_dtype, "aux_class_preds") - aux_box_preds = ng.parameter([2, 1, 4, 5], fp_dtype, "aux_box_preds") + box_logits = ng.parameter([4, 680], fp_dtype, "box_logits") + class_preds = ng.parameter([4, 170], fp_dtype, "class_preds") + proposals = ng.parameter([4, 1, 8], fp_dtype, "proposals") + aux_class_preds = ng.parameter([4, 4], fp_dtype, "aux_class_preds") + aux_box_preds = ng.parameter([4, 680], fp_dtype, "aux_box_preds") node = ng.detection_output(box_logits, class_preds, proposals, attributes, aux_class_preds, aux_box_preds) @@ -97,7 +97,7 @@ def test_dynamic_get_attribute_value(int_dtype, fp_dtype): assert node.get_top_k() == int_dtype(16) assert node.get_variance_encoded_in_target() assert np.all(np.equal(node.get_keep_top_k(), np.array([64, 32, 16, 8], dtype=int_dtype))) - assert node.get_code_type() == "pytorch.some_parameter_name" + assert node.get_code_type() == "caffe.PriorBoxParameter.CENTER_SIZE" assert not node.get_share_location() assert np.isclose(node.get_nms_threshold(), fp_dtype(0.645)) assert np.isclose(node.get_confidence_threshold(), fp_dtype(0.111)) diff --git a/ngraph/test/CMakeLists.txt b/ngraph/test/CMakeLists.txt index 651957fa1e6834..43d79f9bc571cf 100644 --- a/ngraph/test/CMakeLists.txt +++ b/ngraph/test/CMakeLists.txt @@ -117,6 +117,7 @@ set(SRC type_prop/ctc_loss.cpp type_prop/deformable_convolution.cpp type_prop/deformable_psroi_pooling.cpp + type_prop/detection_output.cpp type_prop/depth_to_space.cpp type_prop/dyn_reshape.cpp type_prop/strided_slice.cpp @@ -280,6 +281,7 @@ set(MULTI_TEST_SRC backend/cosh.in.cpp backend/ctc_greedy_decoder.in.cpp backend/cum_sum.in.cpp + backend/detection_output.in.cpp backend/divide.in.cpp backend/dyn_reshape.in.cpp backend/strided_slice.in.cpp diff --git a/ngraph/test/attributes.cpp b/ngraph/test/attributes.cpp index f015be27f03d77..3772615337ba44 100644 --- a/ngraph/test/attributes.cpp +++ b/ngraph/test/attributes.cpp @@ -1473,11 +1473,11 @@ TEST(attributes, interpolate_op) TEST(attributes, detection_output_op) { FactoryRegistry::get().register_factory(); - const auto box_logits = make_shared(element::f32, Shape{1, 3, 32, 32}); - const auto class_preds = make_shared(element::f32, Shape{32}); - const auto proposals = make_shared(element::f32, Shape{128, 2}); - const auto aux_class_preds = make_shared(element::f32, Shape{16}); - const auto aux_box_pred = make_shared(element::f32, Shape{32, 2}); + const auto box_logits = make_shared(element::f32, Shape{1, 2 * 1 * 4}); + const auto class_preds = make_shared(element::f32, Shape{1, 2 * 32}); + const auto proposals = make_shared(element::f32, Shape{1, 2, 2 * 4}); + const auto aux_class_preds = make_shared(element::f32, Shape{1, 2 * 2}); + const auto aux_box_pred = make_shared(element::f32, Shape{1, 2 * 1 * 4}); op::DetectionOutputAttrs attrs; attrs.num_classes = 32; diff --git a/ngraph/test/backend/detection_output.in.cpp b/ngraph/test/backend/detection_output.in.cpp new file mode 100644 index 00000000000000..103ca24d6f03bd --- /dev/null +++ b/ngraph/test/backend/detection_output.in.cpp @@ -0,0 +1,872 @@ +//***************************************************************************** +// Copyright 2020 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//***************************************************************************** + +// clang-format off +#ifdef ${BACKEND_NAME}_FLOAT_TOLERANCE_BITS +#define DEFAULT_FLOAT_TOLERANCE_BITS ${BACKEND_NAME}_FLOAT_TOLERANCE_BITS +#endif + +#ifdef ${BACKEND_NAME}_DOUBLE_TOLERANCE_BITS +#define DEFAULT_DOUBLE_TOLERANCE_BITS ${BACKEND_NAME}_DOUBLE_TOLERANCE_BITS +#endif +// clang-format on + +#include "gtest/gtest.h" +#include "ngraph/ngraph.hpp" +#include "util/engine/test_engines.hpp" +#include "util/test_case.hpp" +#include "util/test_control.hpp" + +using namespace std; +using namespace ngraph; + +static string s_manifest = "${MANIFEST}"; +using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); + +NGRAPH_TEST(${BACKEND_NAME}, detection_output_3_inputs) +{ + op::DetectionOutputAttrs attrs; + attrs.num_classes = 3; + attrs.background_label_id = -1; + attrs.top_k = -1; + attrs.variance_encoded_in_target = true; + attrs.keep_top_k = {2}; + attrs.code_type = "caffe.PriorBoxParameter.CORNER"; + attrs.share_location = false; + attrs.nms_threshold = 0.5; + attrs.confidence_threshold = 0.3; + attrs.clip_after_nms = false; + attrs.clip_before_nms = true; + attrs.decrease_label_id = false; + attrs.normalized = true; + attrs.input_height = 0; + attrs.input_width = 0; + attrs.objectness_score = 0; + + size_t num_prior_boxes = 2; + size_t num_loc_classes = attrs.share_location ? 1 : attrs.num_classes; + size_t prior_box_size = attrs.normalized ? 4 : 5; + size_t num_images = 2; + Shape loc_shape{num_images, num_prior_boxes * num_loc_classes * prior_box_size}; + Shape conf_shape{num_images, num_prior_boxes * attrs.num_classes}; + Shape prior_boxes_shape{ + 1, attrs.variance_encoded_in_target ? 1UL : 2UL, num_prior_boxes * prior_box_size}; + + auto loc = make_shared(element::f32, loc_shape); + auto conf = make_shared(element::f32, conf_shape); + auto prior_boxes = make_shared(element::f32, prior_boxes_shape); + auto f = make_shared(make_shared(loc, conf, prior_boxes, attrs), + ParameterVector{loc, conf, prior_boxes}); + + auto test_case = test::TestCase(f); + // locations + test_case.add_input({ + // batch 0, class 0 + 0.1, + 0.1, + 0.2, + 0.2, + 0.0, + 0.1, + 0.2, + 0.15, + // batch 0, class 1 + 0.3, + 0.2, + 0.5, + 0.3, + 0.2, + 0.1, + 0.42, + 0.66, + // batch 0, class 2 + 0.05, + 0.1, + 0.2, + 0.3, + 0.2, + 0.1, + 0.33, + 0.44, + // batch 1, class 0 + 0.2, + 0.1, + 0.4, + 0.2, + 0.1, + 0.05, + 0.2, + 0.25, + // batch 1, class 1 + 0.1, + 0.2, + 0.5, + 0.3, + 0.1, + 0.1, + 0.12, + 0.34, + // batch 1, class 2 + 0.25, + 0.11, + 0.4, + 0.32, + 0.2, + 0.12, + 0.38, + 0.24, + }); + test_case.add_input({ + // batch 0 + 0.1, + 0.9, + 0.4, + 0.7, + 0, + 0.2, + // batch 1 + 0.7, + 0.8, + 0.42, + 0.33, + 0.81, + 0.2, + }); + test_case.add_input({ + // prior box 0 + 0.0, + 0.5, + 0.1, + 0.2, + // prior box 1 + 0.0, + 0.3, + 0.1, + 0.35, + }); + Shape output_shape{1, 1, num_images * static_cast(attrs.keep_top_k[0]), 7}; + test_case.add_expected_output( + output_shape, {0, 0, 0.7, 0.2, 0.4, 0.52, 1, 0, 1, 0.9, 0, 0.6, 0.3, 0.35, + 1, 1, 0.81, 0.25, 0.41, 0.5, 0.67, 1, 1, 0.8, 0.1, 0.55, 0.3, 0.45}); + test_case.run(); +} + +NGRAPH_TEST(${BACKEND_NAME}, detection_output_3_inputs_share_location) +{ + op::DetectionOutputAttrs attrs; + attrs.num_classes = 3; + attrs.background_label_id = -1; + attrs.top_k = -1; + attrs.variance_encoded_in_target = true; + attrs.keep_top_k = {2}; + attrs.code_type = "caffe.PriorBoxParameter.CORNER"; + attrs.share_location = true; + attrs.nms_threshold = 0.5; + attrs.confidence_threshold = 0.3; + attrs.clip_after_nms = false; + attrs.clip_before_nms = true; + attrs.decrease_label_id = false; + attrs.normalized = true; + attrs.input_height = 0; + attrs.input_width = 0; + attrs.objectness_score = 0; + + size_t num_prior_boxes = 2; + size_t num_loc_classes = attrs.share_location ? 1 : attrs.num_classes; + size_t prior_box_size = attrs.normalized ? 4 : 5; + size_t num_images = 2; + Shape loc_shape{num_images, num_prior_boxes * num_loc_classes * prior_box_size}; + Shape conf_shape{num_images, num_prior_boxes * attrs.num_classes}; + Shape prior_boxes_shape{ + num_images, attrs.variance_encoded_in_target ? 1UL : 2UL, num_prior_boxes * prior_box_size}; + + auto loc = make_shared(element::f32, loc_shape); + auto conf = make_shared(element::f32, conf_shape); + auto prior_boxes = make_shared(element::f32, prior_boxes_shape); + auto f = make_shared(make_shared(loc, conf, prior_boxes, attrs), + ParameterVector{loc, conf, prior_boxes}); + + auto test_case = test::TestCase(f); + // locations + test_case.add_input({ + // batch 0 + 0.1, + 0.1, + 0.2, + 0.2, + 0.0, + 0.1, + 0.2, + 0.15, + // batch 1 + 0.2, + 0.1, + 0.4, + 0.2, + 0.1, + 0.05, + 0.2, + 0.25, + }); + test_case.add_input({ + // batch 0 + 0.1, + 0.9, + 0.4, + 0.7, + 0, + 0.2, + // batch 1 + 0.7, + 0.8, + 0.42, + 0.33, + 0.81, + 0.2, + }); + test_case.add_input({ + // batch 0 + 0.0, + 0.5, + 0.1, + 0.2, + 0.0, + 0.3, + 0.1, + 0.35, + // batch 1 + 0.33, + 0.2, + 0.52, + 0.37, + 0.22, + 0.1, + 0.32, + 0.36, + }); + Shape output_shape{1, 1, num_images * static_cast(attrs.keep_top_k[0]), 7}; + test_case.add_expected_output(output_shape, + { + 0, 0, 0.7, 0, 0.4, 0.3, 0.5, 0, 1, 0.9, + 0.1, 0.6, 0.3, 0.4, 1, 1, 0.81, 0.32, 0.15, 0.52, + 0.61, 1, 1, 0.8, 0.53, 0.3, 0.92, 0.57, + + }); + test_case.run(); +} + +NGRAPH_TEST(${BACKEND_NAME}, detection_output_3_inputs_normalized) +{ + op::DetectionOutputAttrs attrs; + attrs.num_classes = 3; + attrs.background_label_id = -1; + attrs.top_k = -1; + attrs.variance_encoded_in_target = true; + attrs.keep_top_k = {2}; + attrs.code_type = "caffe.PriorBoxParameter.CORNER"; + attrs.share_location = true; + attrs.nms_threshold = 0.5; + attrs.confidence_threshold = 0.3; + attrs.clip_after_nms = false; + attrs.clip_before_nms = true; + attrs.decrease_label_id = false; + attrs.normalized = true; + attrs.input_height = 0; + attrs.input_width = 0; + attrs.objectness_score = 0; + + size_t num_prior_boxes = 2; + size_t num_loc_classes = attrs.share_location ? 1 : attrs.num_classes; + size_t prior_box_size = attrs.normalized ? 4 : 5; + size_t num_images = 2; + Shape loc_shape{num_images, num_prior_boxes * num_loc_classes * prior_box_size}; + Shape conf_shape{num_images, num_prior_boxes * attrs.num_classes}; + Shape prior_boxes_shape{ + num_images, attrs.variance_encoded_in_target ? 1UL : 2UL, num_prior_boxes * prior_box_size}; + + auto loc = make_shared(element::f32, loc_shape); + auto conf = make_shared(element::f32, conf_shape); + auto prior_boxes = make_shared(element::f32, prior_boxes_shape); + auto f = make_shared(make_shared(loc, conf, prior_boxes, attrs), + ParameterVector{loc, conf, prior_boxes}); + + auto test_case = test::TestCase(f); + // locations + test_case.add_input({ + // batch 0 + 0.1, + 0.1, + 0.2, + 0.2, + 0.0, + 0.1, + 0.2, + 0.15, + // batch 1 + 0.2, + 0.1, + 0.4, + 0.2, + 0.1, + 0.05, + 0.2, + 0.25, + }); + test_case.add_input({ + // batch 0 + 0.1, + 0.9, + 0.4, + 0.7, + 0, + 0.2, + // batch 1 + 0.7, + 0.8, + 0.42, + 0.33, + 0.81, + 0.2, + }); + test_case.add_input({ + // batch 0 + 0.0, + 0.5, + 0.1, + 0.2, + 0.0, + 0.3, + 0.1, + 0.35, + // batch 1 + 0.33, + 0.2, + 0.52, + 0.37, + 0.22, + 0.1, + 0.32, + 0.36, + }); + Shape output_shape{1, 1, num_images * static_cast(attrs.keep_top_k[0]), 7}; + test_case.add_expected_output(output_shape, + { + 0, 0, 0.7, 0, 0.4, 0.3, 0.5, 0, 1, 0.9, + 0.1, 0.6, 0.3, 0.4, 1, 1, 0.81, 0.32, 0.15, 0.52, + 0.61, 1, 1, 0.8, 0.53, 0.3, 0.92, 0.57, + + }); + test_case.run(); +} + +NGRAPH_TEST(${BACKEND_NAME}, detection_output_3_inputs_keep_all_bboxes) +{ + op::DetectionOutputAttrs attrs; + attrs.num_classes = 2; + attrs.background_label_id = -1; + attrs.top_k = -1; + attrs.variance_encoded_in_target = false; + attrs.keep_top_k = {-1}; + attrs.code_type = "caffe.PriorBoxParameter.CORNER"; + attrs.share_location = false; + attrs.nms_threshold = 0.5; + attrs.confidence_threshold = 0.3; + attrs.clip_after_nms = false; + attrs.clip_before_nms = true; + attrs.decrease_label_id = false; + attrs.normalized = true; + attrs.input_height = 0; + attrs.input_width = 0; + attrs.objectness_score = 0; + + size_t num_prior_boxes = 2; + size_t num_loc_classes = attrs.share_location ? 1 : attrs.num_classes; + size_t prior_box_size = attrs.normalized ? 4 : 5; + size_t num_images = 3; + Shape loc_shape{num_images, num_prior_boxes * num_loc_classes * prior_box_size}; + Shape conf_shape{num_images, num_prior_boxes * attrs.num_classes}; + Shape prior_boxes_shape{ + num_images, attrs.variance_encoded_in_target ? 1UL : 2UL, num_prior_boxes * prior_box_size}; + + auto loc = make_shared(element::f32, loc_shape); + auto conf = make_shared(element::f32, conf_shape); + auto prior_boxes = make_shared(element::f32, prior_boxes_shape); + auto f = make_shared(make_shared(loc, conf, prior_boxes, attrs), + ParameterVector{loc, conf, prior_boxes}); + + auto test_case = test::TestCase(f); + // locations + test_case.add_input({ + // batch 0, class 0 + 0.1, + 0.1, + 0.2, + 0.2, + 0.0, + 0.1, + 0.2, + 0.15, + // batch 0, class 1 + 0.3, + 0.2, + 0.5, + 0.3, + 0.2, + 0.1, + 0.42, + 0.66, + // batch 1, class 0 + 0.05, + 0.1, + 0.2, + 0.3, + 0.2, + 0.1, + 0.33, + 0.44, + // batch 1, class 1 + 0.2, + 0.1, + 0.4, + 0.2, + 0.1, + 0.05, + 0.2, + 0.25, + // batch 2, class 0 + 0.1, + 0.2, + 0.5, + 0.3, + 0.1, + 0.1, + 0.12, + 0.34, + // batch 2, class 1 + 0.25, + 0.11, + 0.4, + 0.32, + 0.2, + 0.12, + 0.38, + 0.24, + }); + test_case.add_input({ + // batch 0 + 0.1, + 0.9, + 0.4, + 0.7, + // batch 1 + 0.7, + 0.8, + 0.42, + 0.33, + // batch 1 + 0.1, + 0.2, + 0.32, + 0.43, + }); + test_case.add_input({ + // batch 0 priors + 0.0, + 0.5, + 0.1, + 0.2, + 0.0, + 0.3, + 0.1, + 0.35, + // batch 0 variances + 0.12, + 0.11, + 0.32, + 0.02, + 0.02, + 0.20, + 0.09, + 0.71, + // batch 1 priors + 0.33, + 0.2, + 0.52, + 0.37, + 0.22, + 0.1, + 0.32, + 0.36, + // batch 1 variances + 0.01, + 0.07, + 0.12, + 0.13, + 0.41, + 0.33, + 0.2, + 0.1, + // batch 2 priors + 0.0, + 0.3, + 0.1, + 0.35, + 0.22, + 0.1, + 0.32, + 0.36, + // batch 2 variances + 0.32, + 0.02, + 0.13, + 0.41, + 0.33, + 0.2, + 0.02, + 0.20, + }); + Shape output_shape{1, 1, num_images * attrs.num_classes * num_prior_boxes, 7}; + test_case.add_expected_output( + output_shape, + { + + 0, 0, 0.4, 0.006, 0.34, 0.145, 0.563, 0, 1, 0.9, 0, 0.511, 0.164, 0.203, + 0, 1, 0.7, 0.004, 0.32, 0.1378, 0.8186, 1, 0, 0.7, 0.3305, 0.207, 0.544, 0.409, + 1, 0, 0.42, 0.302, 0.133, 0.4, 0.38, 1, 1, 0.8, 0.332, 0.207, 0.5596, 0.4272, + 1, 1, 0.33, 0.261, 0.1165, 0.36, 0.385, 2, 0, 0.32, 0.3025, 0.122, 0.328, 0.424, + 2, 1, 0.43, 0.286, 0.124, 0.3276, 0.408, -1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + }); + test_case.run(); +} + +NGRAPH_TEST(${BACKEND_NAME}, detection_output_3_inputs_center_size) +{ + op::DetectionOutputAttrs attrs; + attrs.num_classes = 3; + attrs.background_label_id = -1; + attrs.top_k = -1; + attrs.variance_encoded_in_target = true; + attrs.keep_top_k = {2}; + attrs.code_type = "caffe.PriorBoxParameter.CENTER_SIZE"; + attrs.share_location = false; + attrs.nms_threshold = 0.5; + attrs.confidence_threshold = 0.3; + attrs.clip_after_nms = false; + attrs.clip_before_nms = true; + attrs.decrease_label_id = false; + attrs.normalized = true; + attrs.input_height = 0; + attrs.input_width = 0; + attrs.objectness_score = 0; + + size_t num_prior_boxes = 2; + size_t num_loc_classes = attrs.share_location ? 1 : attrs.num_classes; + size_t prior_box_size = attrs.normalized ? 4 : 5; + size_t num_images = 2; + Shape loc_shape{num_images, num_prior_boxes * num_loc_classes * prior_box_size}; + Shape conf_shape{num_images, num_prior_boxes * attrs.num_classes}; + Shape prior_boxes_shape{ + num_images, attrs.variance_encoded_in_target ? 1UL : 2UL, num_prior_boxes * prior_box_size}; + + auto loc = make_shared(element::f32, loc_shape); + auto conf = make_shared(element::f32, conf_shape); + auto prior_boxes = make_shared(element::f32, prior_boxes_shape); + auto f = make_shared(make_shared(loc, conf, prior_boxes, attrs), + ParameterVector{loc, conf, prior_boxes}); + + auto test_case = test::TestCase(f); + // locations + test_case.add_input({ + // batch 0, class 0 + 0.1, + 0.1, + 0.2, + 0.2, + 0.0, + 0.1, + 0.2, + 0.15, + // batch 0, class 1 + 0.3, + 0.2, + 0.5, + 0.3, + 0.2, + 0.1, + 0.42, + 0.66, + // batch 0, class 2 + 0.05, + 0.1, + 0.2, + 0.3, + 0.2, + 0.1, + 0.33, + 0.44, + // batch 1, class 0 + 0.2, + 0.1, + 0.4, + 0.2, + 0.1, + 0.05, + 0.2, + 0.25, + // batch 1, class 1 + 0.1, + 0.2, + 0.5, + 0.3, + 0.1, + 0.1, + 0.12, + 0.34, + // batch 1, class 2 + 0.25, + 0.11, + 0.4, + 0.32, + 0.2, + 0.12, + 0.38, + 0.24, + }); + test_case.add_input({ + // batch 0 + 0.1, + 0.9, + 0.4, + 0.7, + 0, + 0.2, + // batch 1 + 0.7, + 0.8, + 0.42, + 0.33, + 0.81, + 0.2, + }); + test_case.add_input({ + // batch 0 + 0.0, + 0.5, + 0.1, + 0.2, + 0.0, + 0.3, + 0.1, + 0.35, + // batch 1 + 0.33, + 0.2, + 0.52, + 0.37, + 0.22, + 0.1, + 0.32, + 0.36, + }); + Shape output_shape{1, 1, num_images * static_cast(attrs.keep_top_k[0]), 7}; + test_case.add_expected_output( + output_shape, + { + 0, 0, 0.7, 0, 0.28163019, 0.14609808, 0.37836978, + 0, 1, 0.9, 0, 0.49427515, 0.11107014, 0.14572485, + 1, 1, 0.81, 0.22040875, 0.079573378, 0.36959124, 0.4376266, + 1, 1, 0.8, 0.32796675, 0.18435785, 0.56003326, 0.40264216, + }); + test_case.run(); +} + +NGRAPH_TEST(${BACKEND_NAME}, detection_output_5_inputs) +{ + op::DetectionOutputAttrs attrs; + attrs.num_classes = 2; + attrs.background_label_id = -1; + attrs.top_k = -1; + attrs.variance_encoded_in_target = true; + attrs.keep_top_k = {2}; + attrs.code_type = "caffe.PriorBoxParameter.CORNER"; + attrs.share_location = false; + attrs.nms_threshold = 0.5; + attrs.confidence_threshold = 0.3; + attrs.clip_after_nms = false; + attrs.clip_before_nms = true; + attrs.decrease_label_id = false; + attrs.normalized = true; + attrs.input_height = 0; + attrs.input_width = 0; + attrs.objectness_score = 0.6; + + size_t num_prior_boxes = 2; + size_t num_loc_classes = attrs.share_location ? 1 : attrs.num_classes; + size_t prior_box_size = attrs.normalized ? 4 : 5; + size_t num_images = 2; + Shape loc_shape{num_images, num_prior_boxes * num_loc_classes * prior_box_size}; + Shape conf_shape{num_images, num_prior_boxes * attrs.num_classes}; + Shape prior_boxes_shape{ + num_images, attrs.variance_encoded_in_target ? 1UL : 2UL, num_prior_boxes * prior_box_size}; + + auto loc = make_shared(element::f32, loc_shape); + auto conf = make_shared(element::f32, conf_shape); + auto prior_boxes = make_shared(element::f32, prior_boxes_shape); + auto aux_loc = make_shared(element::f32, loc_shape); + auto aux_conf = make_shared(element::f32, conf_shape); + auto f = make_shared( + make_shared(loc, conf, prior_boxes, aux_conf, aux_loc, attrs), + ParameterVector{loc, conf, prior_boxes, aux_conf, aux_loc}); + + auto test_case = test::TestCase(f); + // locations + test_case.add_input({ + // batch 0, class 0 + 0.1, + 0.1, + 0.2, + 0.2, + 0.0, + 0.1, + 0.2, + 0.15, + // batch 0, class 1 + 0.3, + 0.2, + 0.5, + 0.3, + 0.2, + 0.1, + 0.42, + 0.66, + // batch 1, class 0 + 0.2, + 0.1, + 0.4, + 0.2, + 0.1, + 0.05, + 0.2, + 0.25, + // batch 1, class 1 + 0.1, + 0.2, + 0.5, + 0.3, + 0.1, + 0.1, + 0.12, + 0.34, + }); + // confidence + test_case.add_input({ + // batch 0 + 0.1, + 0.9, + 0.4, + 0.7, + // batch 1 + 0.42, + 0.33, + 0.81, + 0.2, + }); + // prior boxes + test_case.add_input({ + // batch 0 + 0.0, + 0.5, + 0.1, + 0.2, + 0.0, + 0.3, + 0.1, + 0.35, + // batch 1 + 0.33, + 0.2, + 0.52, + 0.37, + 0.22, + 0.1, + 0.32, + 0.36, + }); + // aux conf + test_case.add_input({ + // batch 0 + 0.1, + 0.3, + 0.5, + 0.8, + // batch 1 + 0.5, + 0.8, + 0.01, + 0.1, + }); + // aux locations + test_case.add_input({ + // batch 0, class 0 + 0.1, + 0.2, + 0.5, + 0.3, + 0.1, + 0.1, + 0.12, + 0.34, + // batch 0, class 1 + 0.25, + 0.11, + 0.4, + 0.32, + 0.2, + 0.12, + 0.38, + 0.24, + // batch 1, class 0 + 0.3, + 0.2, + 0.5, + 0.3, + 0.2, + 0.1, + 0.42, + 0.66, + // batch 1, class 1 + 0.05, + 0.1, + 0.2, + 0.3, + 0.2, + 0.1, + 0.33, + 0.44, + }); + + Shape output_shape{1, 1, num_images * static_cast(attrs.keep_top_k[0]), 7}; + test_case.add_expected_output( + output_shape, + { + 0, 0, 0.4, 0.55, 0.61, 1, 0.97, 0, 1, 0.7, 0.4, 0.52, 0.9, 1, + 1, 0, 0.42, 0.83, 0.5, 1, 0.87, 1, 1, 0.33, 0.63, 0.35, 1, 1, + + }); + test_case.run(); +} diff --git a/ngraph/test/models/onnx/detection_output.prototxt b/ngraph/test/models/onnx/detection_output.prototxt index 04f00de63bf764..3ce54672ee12e6 100644 --- a/ngraph/test/models/onnx/detection_output.prototxt +++ b/ngraph/test/models/onnx/detection_output.prototxt @@ -106,7 +106,7 @@ graph { dim_value: 2 } dim { - dim_value: 15 + dim_value: 12 } } } diff --git a/ngraph/test/onnx/onnx_import.in.cpp b/ngraph/test/onnx/onnx_import.in.cpp index 0625b6f26133a7..d6fc5163e04cc8 100644 --- a/ngraph/test/onnx/onnx_import.in.cpp +++ b/ngraph/test/onnx/onnx_import.in.cpp @@ -3082,12 +3082,12 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_detection_output) std::vector logits = gen_vector(12, -2, 2); std::vector class_preds = gen_vector(9, 0, 1); - std::vector proposals = gen_vector(15 * 2, 0, 1); - std::vector output = {0, 1, 0.777778, 0.241012, 0.260378, 0.418248, 0.499622, - 0, 1, 0.444444, 0.10963, 0.146239, 0.176296, 0.228576, - 0, 2, 0.888889, 0.241012, 0.260378, 0.418248, 0.499622, - 0, 2, 0.555556, 0.10963, 0.146239, 0.176296, 0.228576, - 0, 2, 0.222222, -0.0378917, -0.00169918, -0.00210832, 0.0387362}; + std::vector proposals = gen_vector(12 * 2, 0, 1); + std::vector output = {0, 1, 0.777778, 0.279849, 0.283779, 0.562743, 0.695387, + 0, 1, 0.444444, 0.12963, 0.176075, 0.212963, 0.284573, + 0, 2, 0.888889, 0.279849, 0.283779, 0.562743, 0.695387, + 0, 2, 0.555556, 0.12963, 0.176075, 0.212963, 0.284573, + 0, 2, 0.222222, -0.0608094, -0.0142007, -0.0225239, 0.0304044}; test_case.add_input(logits); test_case.add_input(class_preds); test_case.add_input(proposals); diff --git a/ngraph/test/runtime/interpreter/evaluates_map.cpp b/ngraph/test/runtime/interpreter/evaluates_map.cpp index c96a14b3d9055e..462808b1fb4dd5 100644 --- a/ngraph/test/runtime/interpreter/evaluates_map.cpp +++ b/ngraph/test/runtime/interpreter/evaluates_map.cpp @@ -577,8 +577,10 @@ namespace const HostTensorVector& inputs) { using T = typename element_type_traits::value_type; - runtime::reference::referenceDetectionOutput refDetOut( - op->get_attrs(), op->get_input_shape(0), op->get_input_shape(2)); + runtime::reference::referenceDetectionOutput refDetOut(op->get_attrs(), + op->get_input_shape(0), + op->get_input_shape(2), + op->get_output_shape(0)); if (op->get_input_size() == 3) { refDetOut.run(inputs[0]->get_data_ptr(), diff --git a/ngraph/test/type_prop/detection_output.cpp b/ngraph/test/type_prop/detection_output.cpp new file mode 100644 index 00000000000000..44dd87cbf91f5a --- /dev/null +++ b/ngraph/test/type_prop/detection_output.cpp @@ -0,0 +1,783 @@ +//***************************************************************************** +// Copyright 2020 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//***************************************************************************** + +#include "gtest/gtest.h" + +#include "ngraph/ngraph.hpp" +#include "ngraph/op/detection_output.hpp" +#include "util/type_prop.hpp" + +#include + +using namespace std; +using namespace ngraph; + +std::shared_ptr + create_detection_output(const PartialShape& box_logits_shape, + const PartialShape& class_preds_shape, + const PartialShape& proposals_shape, + const PartialShape& aux_class_preds_shape, + const PartialShape& aux_box_preds_shape, + const op::DetectionOutputAttrs& attrs, + element::Type input_type, + element::Type proposals_type) +{ + auto box_logits = make_shared(input_type, box_logits_shape); + auto class_preds = make_shared(input_type, class_preds_shape); + auto proposals = make_shared(proposals_type, proposals_shape); + auto aux_class_preds = make_shared(input_type, aux_class_preds_shape); + auto aux_box_preds = make_shared(input_type, aux_box_preds_shape); + return make_shared( + box_logits, class_preds, proposals, aux_class_preds, aux_box_preds, attrs); +} + +TEST(type_prop_layers, detection_output) +{ + op::DetectionOutputAttrs attrs; + attrs.keep_top_k = {200}; + attrs.num_classes = 2; + attrs.normalized = true; + auto op = create_detection_output(Shape{4, 20}, + Shape{4, 10}, + Shape{4, 2, 20}, + Shape{4, 10}, + Shape{4, 20}, + attrs, + element::f32, + element::f32); + ASSERT_EQ(op->get_shape(), (Shape{1, 1, 800, 7})); + ASSERT_EQ(op->get_element_type(), element::f32); +} + +TEST(type_prop_layers, detection_output_f16) +{ + op::DetectionOutputAttrs attrs; + attrs.keep_top_k = {200}; + attrs.num_classes = 2; + attrs.normalized = true; + auto op = create_detection_output(Shape{4, 20}, + Shape{4, 10}, + Shape{4, 2, 20}, + Shape{4, 10}, + Shape{4, 20}, + attrs, + element::f16, + element::f16); + ASSERT_EQ(op->get_shape(), (Shape{1, 1, 800, 7})); + ASSERT_EQ(op->get_element_type(), element::f16); +} + +TEST(type_prop_layers, detection_f16_with_proposals_f32) +{ + op::DetectionOutputAttrs attrs; + attrs.keep_top_k = {200}; + attrs.num_classes = 2; + attrs.normalized = true; + auto op = create_detection_output(Shape{4, 20}, + Shape{4, 10}, + Shape{4, 2, 20}, + Shape{4, 10}, + Shape{4, 20}, + attrs, + element::f16, + element::f32); + ASSERT_EQ(op->get_shape(), (Shape{1, 1, 800, 7})); + ASSERT_EQ(op->get_element_type(), element::f16); +} + +TEST(type_prop_layers, detection_output_not_normalized) +{ + op::DetectionOutputAttrs attrs; + attrs.keep_top_k = {200}; + attrs.num_classes = 2; + attrs.normalized = false; + auto op = create_detection_output(Shape{4, 20}, + Shape{4, 10}, + Shape{4, 2, 25}, + Shape{4, 10}, + Shape{4, 20}, + attrs, + element::f32, + element::f32); + ASSERT_EQ(op->get_shape(), (Shape{1, 1, 800, 7})); + ASSERT_EQ(op->get_element_type(), element::f32); +} + +TEST(type_prop_layers, detection_output_negative_keep_top_k) +{ + op::DetectionOutputAttrs attrs; + attrs.keep_top_k = {-1}; + attrs.top_k = -1; + attrs.normalized = true; + attrs.num_classes = 2; + auto op = create_detection_output(Shape{4, 20}, + Shape{4, 10}, + Shape{4, 2, 20}, + Shape{4, 10}, + Shape{4, 20}, + attrs, + element::f32, + element::f32); + ASSERT_EQ(op->get_shape(), (Shape{1, 1, 40, 7})); + ASSERT_EQ(op->get_element_type(), element::f32); +} + +TEST(type_prop_layers, detection_output_no_share_location) +{ + op::DetectionOutputAttrs attrs; + attrs.keep_top_k = {-1}; + attrs.top_k = -1; + attrs.normalized = true; + attrs.num_classes = 2; + attrs.share_location = false; + auto op = create_detection_output(Shape{4, 40}, + Shape{4, 10}, + Shape{4, 2, 20}, + Shape{4, 10}, + Shape{4, 40}, + attrs, + element::f32, + element::f32); + ASSERT_EQ(op->get_shape(), (Shape{1, 1, 40, 7})); + ASSERT_EQ(op->get_element_type(), element::f32); +} + +TEST(type_prop_layers, detection_output_top_k) +{ + op::DetectionOutputAttrs attrs; + attrs.keep_top_k = {-1}; + attrs.top_k = 7; + attrs.normalized = true; + attrs.num_classes = 2; + auto op = create_detection_output(Shape{4, 20}, + Shape{4, 10}, + Shape{4, 2, 20}, + Shape{4, 10}, + Shape{4, 20}, + attrs, + element::f32, + element::f32); + ASSERT_EQ(op->get_shape(), (Shape{1, 1, 56, 7})); + ASSERT_EQ(op->get_element_type(), element::f32); +} + +TEST(type_prop_layers, detection_output_all_dynamic_shapes) +{ + PartialShape dyn_shape = PartialShape::dynamic(); + op::DetectionOutputAttrs attrs; + attrs.keep_top_k = {-1}; + attrs.num_classes = 1; + auto op = create_detection_output( + dyn_shape, dyn_shape, dyn_shape, dyn_shape, dyn_shape, attrs, element::f32, element::f32); + ASSERT_EQ(op->get_output_partial_shape(0), (PartialShape{1, 1, Dimension::dynamic(), 7})); + ASSERT_EQ(op->get_element_type(), element::f32); +} + +TEST(type_prop_layers, detection_output_dynamic_batch) +{ + op::DetectionOutputAttrs attrs; + attrs.keep_top_k = {200}; + attrs.num_classes = 2; + attrs.normalized = true; + auto op = create_detection_output(PartialShape{Dimension::dynamic(), 20}, + PartialShape{Dimension::dynamic(), 10}, + PartialShape{Dimension::dynamic(), 2, 20}, + PartialShape{Dimension::dynamic(), 10}, + PartialShape{Dimension::dynamic(), 20}, + attrs, + element::f32, + element::f32); + ASSERT_EQ(op->get_output_partial_shape(0), (PartialShape{{1, 1, Dimension::dynamic(), 7}})); + ASSERT_EQ(op->get_element_type(), element::f32); +} + +void detection_output_invalid_data_type_test(element::Type box_logits_et, + element::Type class_preds_et, + element::Type proposals_et, + element::Type aux_class_preds_et, + element::Type aux_box_preds_et, + const std::string& expected_msg) +{ + try + { + auto box_logits = make_shared(box_logits_et, Shape{4, 20}); + auto class_preds = make_shared(class_preds_et, Shape{4, 10}); + auto proposals = make_shared(proposals_et, Shape{4, 2, 20}); + auto aux_class_preds = make_shared(aux_class_preds_et, Shape{4, 10}); + auto aux_box_preds = make_shared(aux_box_preds_et, Shape{4, 20}); + op::DetectionOutputAttrs attrs; + attrs.keep_top_k = {200}; + attrs.num_classes = 2; + attrs.normalized = true; + auto op = make_shared( + box_logits, class_preds, proposals, aux_class_preds, aux_box_preds, attrs); + FAIL() << "Exception expected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING(error.what(), expected_msg); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } +} + +TEST(type_prop_layers, detection_output_invalid_data_type) +{ + detection_output_invalid_data_type_test( + element::i32, + element::f32, + element::f32, + element::f32, + element::f32, + "Box logits' data type must be floating point. Got i32"); + detection_output_invalid_data_type_test( + element::f32, + element::i32, + element::f32, + element::f32, + element::f32, + "Class predictions' data type must be the same as box logits type (f32). Got i32"); + detection_output_invalid_data_type_test(element::f32, + element::f32, + element::i32, + element::f32, + element::f32, + "Proposals' data type must be floating point. Got i32"); + detection_output_invalid_data_type_test(element::f32, + element::f32, + element::f32, + element::i32, + element::f32, + "Additional class predictions' data type must be the " + "same as class predictions data type (f32). Got i32"); + detection_output_invalid_data_type_test(element::f32, + element::f32, + element::f32, + element::f32, + element::i32, + "Additional box predictions' data type must be the " + "same as box logits data type (f32). Got i32"); +} + +TEST(type_prop_layers, detection_output_mismatched_batch_size) +{ + { + try + { + op::DetectionOutputAttrs attrs; + attrs.keep_top_k = {200}; + attrs.num_classes = 2; + attrs.normalized = true; + auto op = create_detection_output(Shape{4, 20}, + Shape{5, 10}, + Shape{4, 2, 20}, + Shape{4, 10}, + Shape{4, 20}, + attrs, + element::f32, + element::f32); + FAIL() << "Exception expected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING( + error.what(), + std::string( + "Class predictions' first dimension is not compatible with batch size.")); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } + } + { + try + { + op::DetectionOutputAttrs attrs; + attrs.keep_top_k = {200}; + attrs.num_classes = 2; + attrs.normalized = true; + auto op = create_detection_output(Shape{4, 20}, + Shape{4, 10}, + Shape{5, 2, 20}, + Shape{4, 10}, + Shape{4, 20}, + attrs, + element::f32, + element::f32); + FAIL() << "Exception expected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING(error.what(), + std::string("Proposals' first dimension is must be equal to " + "either batch size (4) or 1. Got: 5.")); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } + } +} + +TEST(type_prop_layers, detection_output_invalid_ranks) +{ + { + try + { + op::DetectionOutputAttrs attrs; + attrs.keep_top_k = {200}; + attrs.num_classes = 2; + attrs.normalized = true; + auto op = create_detection_output(Shape{4, 20, 1}, + Shape{4, 10}, + Shape{4, 2, 20}, + Shape{4, 10}, + Shape{4, 20}, + attrs, + element::f32, + element::f32); + FAIL() << "Exception expected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING(error.what(), std::string("Box logits rank must be 2. Got 3")); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } + } + { + try + { + op::DetectionOutputAttrs attrs; + attrs.keep_top_k = {200}; + attrs.num_classes = 2; + attrs.normalized = true; + auto op = create_detection_output(Shape{4, 20}, + Shape{4, 10, 1}, + Shape{4, 2, 20}, + Shape{4, 10}, + Shape{4, 20}, + attrs, + element::f32, + element::f32); + FAIL() << "Exception expected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING(error.what(), + std::string("Class predictions rank must be 2. Got 3")); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } + } + { + try + { + op::DetectionOutputAttrs attrs; + attrs.keep_top_k = {200}; + attrs.num_classes = 2; + attrs.normalized = true; + auto op = create_detection_output(Shape{4, 20}, + Shape{4, 10}, + Shape{4, 2}, + Shape{4, 10}, + Shape{4, 20}, + attrs, + element::f32, + element::f32); + FAIL() << "Exception expected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING(error.what(), std::string("Proposals rank must be 3. Got 2")); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } + } +} + +TEST(type_prop_layers, detection_output_invalid_box_logits_shape) +{ + // share_location = true + { + try + { + op::DetectionOutputAttrs attrs; + attrs.keep_top_k = {-1}; + attrs.num_classes = 3; + attrs.share_location = true; + attrs.variance_encoded_in_target = false; + attrs.normalized = true; + auto op = create_detection_output(Shape{4, 13}, + Shape{4, 9}, + Shape{4, 2, 12}, + Shape{4, 6}, + Shape{4, 12}, + attrs, + element::f32, + element::f32); + FAIL() << "Exception expected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING( + error.what(), + std::string( + "Box logits' second dimension must be a multiply of num_loc_classes * 4 (4)")); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } + } + // share_location = false + { + try + { + op::DetectionOutputAttrs attrs; + attrs.keep_top_k = {-1}; + attrs.num_classes = 3; + attrs.share_location = false; + attrs.variance_encoded_in_target = false; + attrs.normalized = true; + auto op = create_detection_output(Shape{4, 37}, + Shape{4, 9}, + Shape{4, 2, 12}, + Shape{4, 6}, + Shape{4, 12}, + attrs, + element::f32, + element::f32); + FAIL() << "Exception expected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING( + error.what(), + std::string( + "Box logits' second dimension must be a multiply of num_loc_classes * 4 (12)")); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } + } +} + +TEST(type_prop_layers, detection_output_invalid_class_preds_shape) +{ + try + { + op::DetectionOutputAttrs attrs; + attrs.keep_top_k = {-1}; + attrs.num_classes = 3; + auto op = create_detection_output(Shape{4, 12}, + Shape{4, 10}, + Shape{4, 2, 12}, + Shape{4, 6}, + Shape{4, 12}, + attrs, + element::f32, + element::f32); + FAIL() << "Exception expected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING( + error.what(), + std::string("Class predictions' second dimension must be equal to " + "num_prior_boxes * num_classes (9). Current value is: 10.")); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } +} + +TEST(type_prop_layers, detection_output_invalid_proposals_shape) +{ + // variance_encoded_in_target = false + { + try + { + op::DetectionOutputAttrs attrs; + attrs.keep_top_k = {-1}; + attrs.num_classes = 3; + attrs.share_location = true; + attrs.variance_encoded_in_target = false; + attrs.normalized = true; + auto op = create_detection_output(Shape{4, 12}, + Shape{4, 9}, + Shape{4, 1, 12}, + Shape{4, 6}, + Shape{4, 12}, + attrs, + element::f32, + element::f32); + FAIL() << "Exception expected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING( + error.what(), + std::string( + "Proposals' second dimension is mismatched. Current value is: 1, expected: 2")); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } + } + // variance_encoded_in_target = true + { + try + { + op::DetectionOutputAttrs attrs; + attrs.keep_top_k = {-1}; + attrs.num_classes = 3; + attrs.share_location = true; + attrs.variance_encoded_in_target = true; + attrs.normalized = true; + auto op = create_detection_output(Shape{4, 12}, + Shape{4, 9}, + Shape{4, 2, 12}, + Shape{4, 6}, + Shape{4, 12}, + attrs, + element::f32, + element::f32); + FAIL() << "Exception expected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING( + error.what(), + std::string( + "Proposals' second dimension is mismatched. Current value is: 2, expected: 1")); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } + } + // normalized = false + { + try + { + op::DetectionOutputAttrs attrs; + attrs.keep_top_k = {-1}; + attrs.num_classes = 3; + attrs.share_location = true; + attrs.variance_encoded_in_target = false; + attrs.normalized = false; + auto op = create_detection_output(Shape{4, 12}, + Shape{4, 9}, + Shape{4, 2, 16}, + Shape{4, 6}, + Shape{4, 12}, + attrs, + element::f32, + element::f32); + FAIL() << "Exception expected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING( + error.what(), + std::string("Proposals' third dimension must be equal to num_prior_boxes * " + "prior_box_size (15). Current value is: 16.")); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } + } + // normalized = true + { + try + { + op::DetectionOutputAttrs attrs; + attrs.keep_top_k = {-1}; + attrs.num_classes = 3; + attrs.share_location = true; + attrs.variance_encoded_in_target = false; + attrs.normalized = true; + auto op = create_detection_output(Shape{4, 12}, + Shape{4, 9}, + Shape{4, 2, 13}, + Shape{4, 6}, + Shape{4, 12}, + attrs, + element::f32, + element::f32); + FAIL() << "Exception expected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING( + error.what(), + std::string("Proposals' third dimension must be equal to num_prior_boxes * " + "prior_box_size (12). Current value is: 13.")); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } + } +} + +TEST(type_prop_layers, detection_output_invalid_aux_class_preds) +{ + // invalid batch size + { + try + { + op::DetectionOutputAttrs attrs; + attrs.keep_top_k = {-1}; + attrs.num_classes = 3; + attrs.share_location = true; + attrs.variance_encoded_in_target = false; + attrs.normalized = true; + auto op = create_detection_output(Shape{4, 12}, + Shape{4, 9}, + Shape{4, 2, 12}, + Shape{5, 6}, + Shape{4, 12}, + attrs, + element::f32, + element::f32); + FAIL() << "Exception expected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING(error.what(), + std::string("Additional class predictions' first dimension must " + "be compatible with batch size.")); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } + } + // invalid 2nd dimension + { + try + { + op::DetectionOutputAttrs attrs; + attrs.keep_top_k = {-1}; + attrs.num_classes = 3; + attrs.share_location = true; + attrs.variance_encoded_in_target = false; + attrs.normalized = true; + auto op = create_detection_output(Shape{4, 12}, + Shape{4, 9}, + Shape{4, 2, 12}, + Shape{4, 7}, + Shape{4, 12}, + attrs, + element::f32, + element::f32); + FAIL() << "Exception expected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING(error.what(), + std::string("Additional class predictions' second dimension must " + "be equal to num_prior_boxes * 2 (6). Got 7.")); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } + } +} + +TEST(type_prop_layers, detection_output_invalid_aux_box_preds) +{ + // invalid batch size + { + try + { + op::DetectionOutputAttrs attrs; + attrs.keep_top_k = {-1}; + attrs.num_classes = 3; + attrs.share_location = true; + attrs.variance_encoded_in_target = false; + attrs.normalized = true; + auto op = create_detection_output(Shape{4, 12}, + Shape{4, 9}, + Shape{4, 2, 12}, + Shape{4, 6}, + Shape{5, 12}, + attrs, + element::f32, + element::f32); + FAIL() << "Exception expected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING( + error.what(), + std::string( + "Additional box predictions' shape must be compatible with box logits shape.")); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } + } + // invalid 2nd dimension + { + try + { + op::DetectionOutputAttrs attrs; + attrs.keep_top_k = {-1}; + attrs.num_classes = 3; + attrs.share_location = true; + attrs.variance_encoded_in_target = false; + attrs.normalized = true; + auto op = create_detection_output(Shape{4, 12}, + Shape{4, 9}, + Shape{4, 2, 12}, + Shape{4, 6}, + Shape{4, 22}, + attrs, + element::f32, + element::f32); + FAIL() << "Exception expected"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING( + error.what(), + std::string( + "Additional box predictions' shape must be compatible with box logits shape.")); + } + catch (...) + { + FAIL() << "Unknown exception was thrown"; + } + } +} diff --git a/ngraph/test/type_prop_layers.cpp b/ngraph/test/type_prop_layers.cpp index 10050741c43a73..483e57d72e09c9 100644 --- a/ngraph/test/type_prop_layers.cpp +++ b/ngraph/test/type_prop_layers.cpp @@ -18,7 +18,6 @@ #include "ngraph/ngraph.hpp" #include "ngraph/op/ctc_greedy_decoder.hpp" -#include "ngraph/op/detection_output.hpp" #include "ngraph/op/interpolate.hpp" #include "ngraph/op/prior_box.hpp" #include "ngraph/op/prior_box_clustered.hpp" @@ -38,20 +37,6 @@ TEST(type_prop_layers, ctc_greedy_decoder) ASSERT_EQ(op->get_shape(), (Shape{2, 88, 1, 1})); } -TEST(type_prop_layers, detection_output) -{ - auto box_logits = make_shared(element::f32, Shape{4, 1, 5, 5}); - auto class_preds = make_shared(element::f32, Shape{2, 1, 4, 5}); - auto proposals = make_shared(element::f32, Shape{2, 1, 4, 5}); - auto aux_class_preds = make_shared(element::f32, Shape{2, 1, 4, 5}); - auto aux_box_preds = make_shared(element::f32, Shape{2, 1, 4, 5}); - op::DetectionOutputAttrs attrs; - attrs.keep_top_k = {200}; - auto op = make_shared( - box_logits, class_preds, proposals, aux_class_preds, aux_box_preds, attrs); - ASSERT_EQ(op->get_shape(), (Shape{1, 1, 800, 7})); -} - TEST(type_prop_layers, interpolate) { auto image = make_shared(element::f32, Shape{2, 2, 33, 65}); From 8685c20baf07daa20f0767f2eaf84162332d7156 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Wed, 16 Dec 2020 12:17:29 +0300 Subject: [PATCH 081/244] Fixed HETERO + Template cases (#3580) * Fixed tests compilation for Android ARM * Small fixes * Fixed issues CVS-44775, CVS-34206, CVS-34349 * Disabled KSO tests for Template * Eliminated invalid subgraphs * Enabled KSO QueryNetwork tests for Template * Fixed other plugins as well * Used NodeTypeInfo instead of std::string Co-authored-by: apankratovantonp --- docs/template_plugin/src/template_plugin.cpp | 56 ++++++++++++++----- .../tests/functional/skip_tests_config.cpp | 12 ---- .../src/cldnn_engine/cldnn_engine.cpp | 10 ++++ .../src/gna_plugin/CMakeLists.txt | 2 +- .../src/mkldnn_plugin/mkldnn_plugin.cpp | 22 ++++++-- .../src/vpu/myriad_plugin/myriad_plugin.cpp | 10 ++++ .../skip_tests_config.cpp | 2 - .../skip_tests_config.cpp | 2 - .../include/behavior/core_integration.hpp | 8 +-- 9 files changed, 80 insertions(+), 44 deletions(-) diff --git a/docs/template_plugin/src/template_plugin.cpp b/docs/template_plugin/src/template_plugin.cpp index 11073ca9115b3c..4472e481f16eb4 100644 --- a/docs/template_plugin/src/template_plugin.cpp +++ b/docs/template_plugin/src/template_plugin.cpp @@ -51,14 +51,6 @@ Plugin::~Plugin() { std::shared_ptr TransformNetwork(const std::shared_ptr& function) { // 1. Copy ngraph::Function first to apply some transformations which modify original ngraph::Function - std::vector<::ngraph::element::Type> new_types; - std::vector<::ngraph::PartialShape> new_shapes; - - for (const auto ¶meter : function->get_parameters()) { - new_shapes.emplace_back(parameter->get_partial_shape()); - new_types.emplace_back(parameter->get_element_type()); - } - auto transformedNetwork = ngraph::clone_function(*function); // 2. Perform common optimizations and device-specific transformations @@ -94,7 +86,7 @@ InferenceEngine::ExecutableNetworkInternal::Ptr Plugin::LoadExeNetworkImpl(const if (output_precision != InferenceEngine::Precision::FP32 && output_precision != InferenceEngine::Precision::FP16 && output_precision != InferenceEngine::Precision::U8) { - THROW_IE_EXCEPTION << "Template device supports only FP16 and FP32 output precision."; + THROW_IE_EXCEPTION << "Template device supports only U8, FP16 and FP32 output precision."; } } @@ -147,15 +139,17 @@ InferenceEngine::QueryNetworkResult Plugin::QueryNetwork(const InferenceEngine:: // 1. First of all we should store initial input operation set std::unordered_set originalOps; + std::map friendlyNameToType; for (auto&& node : function->get_ops()) { originalOps.emplace(node->get_friendly_name()); + friendlyNameToType[node->get_friendly_name()] = node->get_type_info(); } // 2. It is needed to apply all transformations as it is done in LoadExeNetworkImpl auto transformedFunction = TransformNetwork(function); // 3. The same input node can be transformed into supported and unsupported backend node - // So we need store as supported ether unsupported node sets + // So we need store as supported either unsupported node sets std::unordered_set supported; std::unordered_set unsupported; auto opset = ngraph::get_opset4(); @@ -165,7 +159,7 @@ InferenceEngine::QueryNetworkResult Plugin::QueryNetwork(const InferenceEngine:: // Filter just nodes from original operation set // TODO: fill with actual decision rules based on whether kernel is supported by backend if (InferenceEngine::details::contains(originalOps, fusedLayerName)) { - if (opset.contains_type_insensitive(fusedLayerName)) { + if (opset.contains_type(friendlyNameToType[fusedLayerName])) { supported.emplace(fusedLayerName); } else { unsupported.emplace(fusedLayerName); @@ -174,11 +168,43 @@ InferenceEngine::QueryNetworkResult Plugin::QueryNetwork(const InferenceEngine:: } } - // 4. The result set should contains just nodes from supported set - for (auto&& layerName : supported) { - if (!InferenceEngine::details::contains(unsupported, layerName)) { - res.supportedLayersMap.emplace(layerName, GetName()); + // 4. The result set should contain just nodes from supported set + for (auto&& unsupportedNode : unsupported) { + supported.erase(unsupportedNode); + } + + for (auto&& node : function->get_ops()) { + // 5. If some housekeeping nodes were not added - add them. + if (InferenceEngine::details::contains(supported, node->get_friendly_name())) { + for (auto&& inputNodeOutput : node->input_values()) { + if (ngraph::op::is_constant(inputNodeOutput.get_node()) || ngraph::op::is_parameter(inputNodeOutput.get_node())) { + supported.emplace(inputNodeOutput.get_node()->get_friendly_name()); + } + } + for (auto&& outputs : node->outputs()) { + for (auto&& outputNodeInput : outputs.get_target_inputs()) { + if (ngraph::op::is_output(outputNodeInput.get_node())) { + supported.emplace(outputNodeInput.get_node()->get_friendly_name()); + } + } + } } + + // 6. Eliminate subgraphs that consist of housekeeping nodes only + if (ngraph::op::is_constant(node) || ngraph::op::is_parameter(node)) { + if (!InferenceEngine::details::contains(supported, node->output(0).get_target_inputs().begin()->get_node()->get_friendly_name())) { + supported.erase(node->get_friendly_name()); + } + } else if (ngraph::op::is_output(node)) { + if (!InferenceEngine::details::contains(supported, node->input_values().begin()->get_node()->get_friendly_name())) { + supported.erase(node->get_friendly_name()); + } + } + } + + // 7. Produce the result + for (auto&& layerName : supported) { + res.supportedLayersMap.emplace(layerName, GetName()); } return res; diff --git a/docs/template_plugin/tests/functional/skip_tests_config.cpp b/docs/template_plugin/tests/functional/skip_tests_config.cpp index 0e3979b5d2cc61..37d4a75c74c72d 100644 --- a/docs/template_plugin/tests/functional/skip_tests_config.cpp +++ b/docs/template_plugin/tests/functional/skip_tests_config.cpp @@ -12,18 +12,6 @@ std::vector disabledTestPatterns() { ".*ExclusiveAsyncRequests.*", ".*reusableCPUStreamsExecutor.*", R"(.*SplitLayerTest.*numSplits\=30.*)", - // CVS-44775: for all cases below - ".*Hetero.*", - ".*QueryNetwork.*", - ".*SetAffinityWithKSO.*", - ".*queryNetworkResultContainAllAndOnlyInputLayers.*", - R"(.*IEClassExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS.*)", - R"(.*IEClassExecutableNetworkGetMetricTest_SUPPORTED_METRICS.*/2)", - R"(.*IEClassExecutableNetworkGetMetricTest_NETWORK_NAME.*/2)", - R"(.*IEClassExecutableNetworkGetMetricTest_OPTIMAL_NUMBER_OF_INFER_REQUESTS.*/2)", - ".*LoadNetworkActualHeteroDeviceNoThrow.*", - ".*LoadNetworkActualHeteroDevice2NoThrow.*", - ".*IEClassHeteroExecutableNetworkGetMetricTest_SUPPORTED_CONFIG_KEYS.*", // CVS-44774 ".*PreprocessTest.*", }; diff --git a/inference-engine/src/cldnn_engine/cldnn_engine.cpp b/inference-engine/src/cldnn_engine/cldnn_engine.cpp index d772214e031a0b..41126fa4289576 100644 --- a/inference-engine/src/cldnn_engine/cldnn_engine.cpp +++ b/inference-engine/src/cldnn_engine/cldnn_engine.cpp @@ -581,6 +581,16 @@ QueryNetworkResult clDNNEngine::QueryNetwork(const CNNNetwork& network, } } } + + if (ngraph::op::is_constant(node) || ngraph::op::is_parameter(node)) { + if (!InferenceEngine::details::contains(supported, node->output(0).get_target_inputs().begin()->get_node()->get_friendly_name())) { + supported.erase(node->get_friendly_name()); + } + } else if (ngraph::op::is_output(node)) { + if (!InferenceEngine::details::contains(supported, node->input_values().begin()->get_node()->get_friendly_name())) { + supported.erase(node->get_friendly_name()); + } + } } for (auto&& layerName : supported) { diff --git a/inference-engine/src/gna_plugin/CMakeLists.txt b/inference-engine/src/gna_plugin/CMakeLists.txt index c01325c06cd3ad..17f6201caaec90 100644 --- a/inference-engine/src/gna_plugin/CMakeLists.txt +++ b/inference-engine/src/gna_plugin/CMakeLists.txt @@ -71,5 +71,5 @@ set_target_properties(${TARGET_NAME} ${TARGET_NAME}_test_static file(GLOB_RECURSE source_list "${libGNA_LIBRARIES_BASE_PATH}/*${CMAKE_SHARED_LIBRARY_SUFFIX}*") install(FILES ${source_list} - DESTINATION ${IE_CPACK_IE_DIR}/external/gna/lib + DESTINATION ${IE_CPACK_IE_DIR}/external/gna/lib COMPONENT gna) diff --git a/inference-engine/src/mkldnn_plugin/mkldnn_plugin.cpp b/inference-engine/src/mkldnn_plugin/mkldnn_plugin.cpp index 582e0f27c41597..c2ae55fb06a83c 100644 --- a/inference-engine/src/mkldnn_plugin/mkldnn_plugin.cpp +++ b/inference-engine/src/mkldnn_plugin/mkldnn_plugin.cpp @@ -465,11 +465,13 @@ QueryNetworkResult Engine::QueryNetwork(const CNNNetwork& network, const std::ma } } } - + for (auto&& unsupportedNode : unsupported) { + supported.erase(unsupportedNode); + } for (auto&& node : function->get_ops()) { - if (!InferenceEngine::details::contains(unsupported, node->get_friendly_name())) { + if (InferenceEngine::details::contains(supported, node->get_friendly_name())) { for (auto&& inputNodeOutput : node->input_values()) { - if (ngraph::op::is_constant(inputNodeOutput.get_node())) { + if (ngraph::op::is_constant(inputNodeOutput.get_node()) || ngraph::op::is_parameter(inputNodeOutput.get_node())) { supported.emplace(inputNodeOutput.get_node()->get_friendly_name()); } } @@ -481,12 +483,20 @@ QueryNetworkResult Engine::QueryNetwork(const CNNNetwork& network, const std::ma } } } + + if (ngraph::op::is_constant(node) || ngraph::op::is_parameter(node)) { + if (!InferenceEngine::details::contains(supported, node->output(0).get_target_inputs().begin()->get_node()->get_friendly_name())) { + supported.erase(node->get_friendly_name()); + } + } else if (ngraph::op::is_output(node)) { + if (!InferenceEngine::details::contains(supported, node->input_values().begin()->get_node()->get_friendly_name())) { + supported.erase(node->get_friendly_name()); + } + } } for (auto&& layerName : supported) { - if (!InferenceEngine::details::contains(unsupported, layerName)) { - res.supportedLayersMap.emplace(layerName, GetName()); - } + res.supportedLayersMap.emplace(layerName, GetName()); } } else { details::CNNNetworkIterator i(network); diff --git a/inference-engine/src/vpu/myriad_plugin/myriad_plugin.cpp b/inference-engine/src/vpu/myriad_plugin/myriad_plugin.cpp index 21c230f5e58a2f..389e764d9d737f 100644 --- a/inference-engine/src/vpu/myriad_plugin/myriad_plugin.cpp +++ b/inference-engine/src/vpu/myriad_plugin/myriad_plugin.cpp @@ -215,6 +215,16 @@ QueryNetworkResult Engine::QueryNetwork( } } } + + if (ngraph::op::is_constant(node) || ngraph::op::is_parameter(node)) { + if (!InferenceEngine::details::contains(supported, node->output(0).get_target_inputs().begin()->get_node()->get_friendly_name())) { + supported.erase(node->get_friendly_name()); + } + } else if (ngraph::op::is_output(node)) { + if (!InferenceEngine::details::contains(supported, node->input_values().begin()->get_node()->get_friendly_name())) { + supported.erase(node->get_friendly_name()); + } + } } for (const auto& layerName : supported) { diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/skip_tests_config.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/skip_tests_config.cpp index dcd331a0241161..6dd10d2c263a5b 100644 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/skip_tests_config.cpp +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/skip_tests_config.cpp @@ -11,8 +11,6 @@ std::vector disabledTestPatterns() { return { // Issues - 34059 ".*BehaviorTests\\.pluginDoesNotChangeOriginalNetwork.*", - //TODO: Issue: 34349 - R"(.*(IEClassLoadNetwork).*(QueryNetworkMULTIWithHETERONoThrow_V10|QueryNetworkHETEROWithMULTINoThrow_V10).*)", //TODO: Issue: 34748 R"(.*(ComparisonLayerTest).*)", // TODO: Issue: 39014 diff --git a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/skip_tests_config.cpp b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/skip_tests_config.cpp index 8d11db060a4685..afb0cae9a3d8fb 100644 --- a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/skip_tests_config.cpp +++ b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/skip_tests_config.cpp @@ -19,8 +19,6 @@ std::vector disabledTestPatterns() { ".*ConcatLayerTest.*axis=0.*", // TODO: Issue 31197 R"(.*(IEClassBasicTestP).*smoke_registerPluginsXMLUnicodePath.*)", - // TODO: Issue: 34206 - R"(.*(IEClassLoadNetwork).*(QueryNetworkMULTIWithHETERONoThrow_V10|QueryNetworkHETEROWithMULTINoThrow_V10).*)", // TODO: Issue: 34348 R"(.*IEClassGetAvailableDevices.*)", // TODO: Issue: 40473 diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/core_integration.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/core_integration.hpp index 1028aae982c8a7..0b8224fa6af6f2 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/core_integration.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/core_integration.hpp @@ -1360,9 +1360,7 @@ TEST_P(IEClassLoadNetworkTest, QueryNetworkHETEROWithMULTINoThrow_V10) { ASSERT_NE(nullptr, function); std::unordered_set expectedLayers; for (auto &&node : function->get_ops()) { - if (!ngraph::op::is_constant(node) && !ngraph::op::is_parameter(node) && !ngraph::op::is_output(node)) { - expectedLayers.emplace(node->get_friendly_name()); - } + expectedLayers.emplace(node->get_friendly_name()); } QueryNetworkResult result; std::string targetFallback(CommonTestUtils::DEVICE_MULTI + std::string(",") + CommonTestUtils::DEVICE_CPU); @@ -1397,9 +1395,7 @@ TEST_P(IEClassLoadNetworkTest, QueryNetworkMULTIWithHETERONoThrow_V10) { ASSERT_NE(nullptr, function); std::unordered_set expectedLayers; for (auto &&node : function->get_ops()) { - if (!ngraph::op::is_constant(node) && !ngraph::op::is_parameter(node) && !ngraph::op::is_output(node)) { - expectedLayers.emplace(node->get_friendly_name()); - } + expectedLayers.emplace(node->get_friendly_name()); } QueryNetworkResult result; ASSERT_NO_THROW(result = ie.QueryNetwork(multinputNetwork, CommonTestUtils::DEVICE_MULTI, { From 679e4ae4d7fe46a08fee19d0d1ee30d0cf85cb9e Mon Sep 17 00:00:00 2001 From: Irina Efode Date: Wed, 16 Dec 2020 13:10:27 +0300 Subject: [PATCH 082/244] [IE TESTS] Move multi base test class (#3623) --- .../plugin/shared/include/base}/multi/multi_helpers.hpp | 0 .../plugin/shared/include/multi/multi_remote_blob_tests.hpp | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename inference-engine/tests/{ie_test_utils => functional/plugin/shared/include/base}/multi/multi_helpers.hpp (100%) diff --git a/inference-engine/tests/ie_test_utils/multi/multi_helpers.hpp b/inference-engine/tests/functional/plugin/shared/include/base/multi/multi_helpers.hpp similarity index 100% rename from inference-engine/tests/ie_test_utils/multi/multi_helpers.hpp rename to inference-engine/tests/functional/plugin/shared/include/base/multi/multi_helpers.hpp diff --git a/inference-engine/tests/functional/plugin/shared/include/multi/multi_remote_blob_tests.hpp b/inference-engine/tests/functional/plugin/shared/include/multi/multi_remote_blob_tests.hpp index 89d388044511ac..13f529557080b9 100644 --- a/inference-engine/tests/functional/plugin/shared/include/multi/multi_remote_blob_tests.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/multi/multi_remote_blob_tests.hpp @@ -4,7 +4,7 @@ #include #include -#include "multi/multi_helpers.hpp" +#include "base/multi/multi_helpers.hpp" #include "functional_test_utils/plugin_cache.hpp" TEST_P(MultiDevice_SupportTest, canCreateContextThenRequestThenBlobsAndInfer) { From 9376f78994dc1b163ee40b97dfa8c7a25e3b8048 Mon Sep 17 00:00:00 2001 From: Katarzyna Mitrus Date: Wed, 16 Dec 2020 11:16:06 +0100 Subject: [PATCH 083/244] [ONNX] Dynamic version of ONNX Size op (#3553) --- ngraph/frontend/onnx_import/src/op/size.cpp | 10 +- .../onnx/dynamic_shapes/size_op_dyn.prototxt | 40 +++++++ .../models/onnx/size_op_graph_end.prototxt | 65 +++++++++++ .../models/onnx/size_op_graph_middle.prototxt | 80 +++++++++++++ .../size_op_on_input_graph_middle.prototxt | 105 ++++++++++++++++++ .../test/models/onnx/size_op_single.prototxt | 40 +++++++ ngraph/test/onnx/onnx_import.in.cpp | 48 ++++++++ .../test/onnx/onnx_import_dyn_shapes.in.cpp | 11 ++ ngraph/test/runtime/ie/unit_test.manifest | 9 ++ 9 files changed, 401 insertions(+), 7 deletions(-) create mode 100644 ngraph/test/models/onnx/dynamic_shapes/size_op_dyn.prototxt create mode 100644 ngraph/test/models/onnx/size_op_graph_end.prototxt create mode 100644 ngraph/test/models/onnx/size_op_graph_middle.prototxt create mode 100644 ngraph/test/models/onnx/size_op_on_input_graph_middle.prototxt create mode 100644 ngraph/test/models/onnx/size_op_single.prototxt diff --git a/ngraph/frontend/onnx_import/src/op/size.cpp b/ngraph/frontend/onnx_import/src/op/size.cpp index b1331f3c3af124..96a59e5e704d78 100644 --- a/ngraph/frontend/onnx_import/src/op/size.cpp +++ b/ngraph/frontend/onnx_import/src/op/size.cpp @@ -34,13 +34,9 @@ namespace ngraph OutputVector size(const Node& node) { auto data = node.get_ng_inputs().at(0); - std::int64_t tensor_elements_count{ - static_cast(shape_size(data.get_shape()))}; - - return {std::make_shared( - ngraph::element::i64, - Shape{}, - std::vector{tensor_elements_count})}; + auto axes = default_opset::Constant::create(ngraph::element::i32, Shape{}, {0}); + auto input_shape = std::make_shared(data); + return {std::make_shared(input_shape, axes)}; } } // namespace set_1 diff --git a/ngraph/test/models/onnx/dynamic_shapes/size_op_dyn.prototxt b/ngraph/test/models/onnx/dynamic_shapes/size_op_dyn.prototxt new file mode 100644 index 00000000000000..75b060ac3b86f2 --- /dev/null +++ b/ngraph/test/models/onnx/dynamic_shapes/size_op_dyn.prototxt @@ -0,0 +1,40 @@ +ir_version: 7 +producer_name: "onnx-importer-test" +graph { + node { + input: "X" + output: "Y" + op_type: "Size" + } + name: "test-model-size-op" + input { + name: "X" + type { + tensor_type { + elem_type: 1 + shape { + dim { + dim_param: "?" + } + dim { + dim_value: 3 + } + } + } + } + } + output { + name: "Y" + type { + tensor_type { + elem_type: 7 + shape { + } + } + } + } +} +opset_import { + domain: "" + version: 12 +} diff --git a/ngraph/test/models/onnx/size_op_graph_end.prototxt b/ngraph/test/models/onnx/size_op_graph_end.prototxt new file mode 100644 index 00000000000000..c082bd045653e8 --- /dev/null +++ b/ngraph/test/models/onnx/size_op_graph_end.prototxt @@ -0,0 +1,65 @@ +ir_version: 7 +producer_name: "onnx-importer-test" +graph { + node { + output: "N" + op_type: "Constant" + attribute { + name: "value" + t { + dims: 1 + data_type: 1 + float_data: 2.0 + name: "const_tensor_N" + } + type: TENSOR + } + } + node { + input: "X" + output: "A" + op_type: "Relu" + } + node { + input: "A" + input: "N" + output: "B" + op_type: "Pow" + } + node { + input: "B" + output: "Y" + op_type: "Size" + } + name: "test-model" + input { + name: "X" + type { + tensor_type { + elem_type: 1 + shape { + dim { + dim_value: 1 + } + dim { + dim_value: 4 + } + } + } + } + } + output { + name: "Y" + type { + tensor_type { + elem_type: 7 + shape { + } + } + } + } +} +opset_import { + domain: "" + version: 12 +} diff --git a/ngraph/test/models/onnx/size_op_graph_middle.prototxt b/ngraph/test/models/onnx/size_op_graph_middle.prototxt new file mode 100644 index 00000000000000..293a8535ee9733 --- /dev/null +++ b/ngraph/test/models/onnx/size_op_graph_middle.prototxt @@ -0,0 +1,80 @@ +ir_version: 7 +producer_name: "onnx-importer-test" +graph { + node { + output: "N" + op_type: "Constant" + attribute { + name: "value" + t { + dims: 1 + data_type: 6 + int32_data: 2 + name: "const_tensor_N" + } + type: TENSOR + } + } + node { + input: "X" + output: "A" + op_type: "Relu" + } + node { + input: "A" + input: "N" + output: "B" + op_type: "Pow" + } + node { + input: "B" + output: "C" + op_type: "Size" + } + node { + input: "C" + output: "D" + op_type: "Cast" + attribute { + name: "to" + i: 1 + type: INT + } + } + node { + input: "D" + output: "Y" + op_type: "Relu" + } + name: "test-model" + input { + name: "X" + type { + tensor_type { + elem_type: 1 + shape { + dim { + dim_value: 1 + } + dim { + dim_value: 4 + } + } + } + } + } + output { + name: "Y" + type { + tensor_type { + elem_type: 1 + shape { + } + } + } + } +} +opset_import { + domain: "" + version: 12 +} diff --git a/ngraph/test/models/onnx/size_op_on_input_graph_middle.prototxt b/ngraph/test/models/onnx/size_op_on_input_graph_middle.prototxt new file mode 100644 index 00000000000000..2faed09ea624da --- /dev/null +++ b/ngraph/test/models/onnx/size_op_on_input_graph_middle.prototxt @@ -0,0 +1,105 @@ +ir_version: 7 +producer_name: "onnx-importer-test" +graph { + node { + output: "N" + op_type: "Constant" + attribute { + name: "value" + t { + dims: 1 + data_type: 6 + int32_data: 1 + name: "const_tensor_N" + } + type: TENSOR + } + } + node { + input: "X" + output: "A" + op_type: "Relu" + } + node { + input: "A" + input: "N" + output: "B" + op_type: "Pow" + } + node { + input: "X" + output: "C" + op_type: "Size" + } + node { + input: "C" + output: "D" + op_type: "Cast" + attribute { + name: "to" + i: 1 + type: INT + } + } + node { + input: "D" + input: "B" + output: "Y" + op_type: "Add" + } + name: "test-model" + input { + name: "X" + type { + tensor_type { + elem_type: 1 + shape { + dim { + dim_value: 1 + } + dim { + dim_value: 2 + } + dim { + dim_value: 4 + } + dim { + dim_value: 1 + } + dim { + dim_value: 3 + } + } + } + } + } + output { + name: "Y" + type { + tensor_type { + elem_type: 1 + shape { + dim { + dim_value: 1 + } + dim { + dim_value: 2 + } + dim { + dim_value: 4 + } + dim { + dim_value: 1 + } + dim { + dim_value: 3 + } + } + } + } + } +} +opset_import { + domain: "" + version: 12 +} diff --git a/ngraph/test/models/onnx/size_op_single.prototxt b/ngraph/test/models/onnx/size_op_single.prototxt new file mode 100644 index 00000000000000..fb05474b66f7c9 --- /dev/null +++ b/ngraph/test/models/onnx/size_op_single.prototxt @@ -0,0 +1,40 @@ +ir_version: 7 +producer_name: "onnx-importer-test" +graph { + node { + input: "X" + output: "Y" + op_type: "Size" + } + name: "test-model-size-op" + input { + name: "X" + type { + tensor_type { + elem_type: 1 + shape { + dim { + dim_value: 2 + } + dim { + dim_value: 3 + } + } + } + } + } + output { + name: "Y" + type { + tensor_type { + elem_type: 7 + shape { + } + } + } + } +} +opset_import { + domain: "" + version: 12 +} diff --git a/ngraph/test/onnx/onnx_import.in.cpp b/ngraph/test/onnx/onnx_import.in.cpp index d6fc5163e04cc8..ac1d1702e68fbe 100644 --- a/ngraph/test/onnx/onnx_import.in.cpp +++ b/ngraph/test/onnx/onnx_import.in.cpp @@ -2973,6 +2973,54 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_image_scaler) test_case.run(); } +NGRAPH_TEST(${BACKEND_NAME}, onnx_size_op_single) +{ + const auto function = onnx_import::import_onnx_model( + file_util::path_join(SERIALIZED_ZOO, "onnx/size_op_single.prototxt")); + + auto test_case = test::TestCase(function); + test_case.add_input(Shape{2, 3}, {1.0, 2.0, 3.0, 4.0, 5.0, 6.0}); + test_case.add_expected_output(Shape{}, {6}); + test_case.run(); +} + +NGRAPH_TEST(${BACKEND_NAME}, onnx_size_op_graph_end) +{ + const auto function = onnx_import::import_onnx_model( + file_util::path_join(SERIALIZED_ZOO, "onnx/size_op_graph_end.prototxt")); + + auto test_case = test::TestCase(function); + test_case.add_input({1.0, 2.0, 3.0, 4.0}); + test_case.add_expected_output(Shape{}, {4}); + test_case.run(); +} + +NGRAPH_TEST(${BACKEND_NAME}, onnx_size_op_graph_middle) +{ + const auto function = onnx_import::import_onnx_model( + file_util::path_join(SERIALIZED_ZOO, "onnx/size_op_graph_middle.prototxt")); + + auto test_case = test::TestCase(function); + test_case.add_input({1.0, 2.0, 3.0, 4.0}); + test_case.add_expected_output(Shape{}, {4.0}); + test_case.run(); +} + +NGRAPH_TEST(${BACKEND_NAME}, onnx_size_op_on_input_graph_middle) +{ + const auto function = onnx_import::import_onnx_model( + file_util::path_join(SERIALIZED_ZOO, "onnx/size_op_on_input_graph_middle.prototxt")); + + auto test_case = test::TestCase(function); + test_case.add_input(Shape{1, 2, 4, 1, 3}, + {0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., + 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.}); + test_case.add_expected_output( + Shape{1, 2, 4, 1, 3}, {24., 24., 24., 24., 24., 24., 24., 24., 24., 24., 24., 24., + 24., 24., 24., 24., 24., 24., 24., 24., 24., 24., 24., 24.}); + test_case.run(); +} + NGRAPH_TEST(${BACKEND_NAME}, onnx_empty_initializers_handling) { // int this test the "scales" input of the Resize operator is set to an empty initializer diff --git a/ngraph/test/onnx/onnx_import_dyn_shapes.in.cpp b/ngraph/test/onnx/onnx_import_dyn_shapes.in.cpp index 86bce63d6fbbf4..a922a6361d7d9f 100644 --- a/ngraph/test/onnx/onnx_import_dyn_shapes.in.cpp +++ b/ngraph/test/onnx/onnx_import_dyn_shapes.in.cpp @@ -1286,6 +1286,17 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_dyn_shapes_reduce_max_dynamic_input_rank_negat test_case.run(); } +NGRAPH_TEST(${BACKEND_NAME}, onnx_size_dyn_op) +{ + const auto function = onnx_import::import_onnx_model( + file_util::path_join(SERIALIZED_ZOO, "onnx/dynamic_shapes/size_op_dyn.prototxt")); + + auto test_case = test::TestCase(function); + test_case.add_input(Shape{2, 3}, {1.0, 2.0, 3.0, 4.0, 5.0, 6.0}); + test_case.add_expected_output(Shape{}, {6}); + test_case.run(); +} + NGRAPH_TEST(${BACKEND_NAME}, onnx_model_max_pool_dyn_rank_without_default_attrs) { auto function = onnx_import::import_onnx_model(file_util::path_join( diff --git a/ngraph/test/runtime/ie/unit_test.manifest b/ngraph/test/runtime/ie/unit_test.manifest index 775c670d84f453..c3794a1893bdc7 100644 --- a/ngraph/test/runtime/ie/unit_test.manifest +++ b/ngraph/test/runtime/ie/unit_test.manifest @@ -248,6 +248,15 @@ IE_GPU.onnx_model_gru_fwd_mixed_seq_len_const ## Const layer has incorrect dimensions in the output data IE_CPU.nothing_to_reverse +# Unsupported dynamic ops +onnx_size_dyn_op + +# Constant network +# MKLDNNGraph::CreateGraph: No inputs for the topology +onnx_size_op_single +onnx_size_op_graph_end +onnx_size_op_graph_middle + #------------------------------------------------------------------------------- # From 859559a6dc0e47093e880401393e17e49e4340ba Mon Sep 17 00:00:00 2001 From: Alexey Suhov Date: Wed, 16 Dec 2020 14:13:51 +0300 Subject: [PATCH 084/244] [README.md] change latest release to 2021.2 (#3638) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3fa6a27fc9ce46..d8346171b7de3f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # [OpenVINO™ Toolkit](https://01.org/openvinotoolkit) - Deep Learning Deployment Toolkit repository -[![Stable release](https://img.shields.io/badge/version-2021.1-green.svg)](https://github.com/openvinotoolkit/openvino/releases/tag/2021.1) +[![Stable release](https://img.shields.io/badge/version-2021.2-green.svg)](https://github.com/openvinotoolkit/openvino/releases/tag/2021.2) [![Apache License Version 2.0](https://img.shields.io/badge/license-Apache_2.0-green.svg)](LICENSE) ![Azure DevOps builds (branch)](https://img.shields.io/azure-devops/build/openvinoci/b2bab62f-ab2f-4871-a538-86ea1be7d20f/9/master?label=Public%20CI) From fd1522d9a712cf604aa02006d4ca57ba5950b099 Mon Sep 17 00:00:00 2001 From: Vladislav Volkov Date: Wed, 16 Dec 2020 14:26:56 +0300 Subject: [PATCH 085/244] Fixes for external ITT API library (#3603) --- openvino/itt/CMakeLists.txt | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/openvino/itt/CMakeLists.txt b/openvino/itt/CMakeLists.txt index efbdf7f392bd08..c67a68d53cc509 100644 --- a/openvino/itt/CMakeLists.txt +++ b/openvino/itt/CMakeLists.txt @@ -27,31 +27,24 @@ if(ENABLE_PROFILING_ITT) message(WARNING "Profiling option enabled, but no ITT library was found under INTEL_VTUNE_DIR") endif() else() - include(ExternalProject) - set(ITTAPI_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/ittapi/build) - set(ITTAPI_SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/ittapi/source) - set(ITTNOTIFY_LIBRARY ${ITTAPI_BINARY_DIR}/bin/${CMAKE_STATIC_LIBRARY_PREFIX}ittnotify${CMAKE_STATIC_LIBRARY_SUFFIX}) - ExternalProject_Add( + include(FetchContent) + FetchContent_Declare( ext_ittapi - PREFIX ittapi GIT_REPOSITORY https://github.com/intel/ittapi.git GIT_TAG v3.18.6 - LOG_DOWNLOAD ON - LOG_CONFIGURE ON - LOG_BUILD ON - INSTALL_COMMAND "" - UPDATE_COMMAND "" - CMAKE_GENERATOR ${CMAKE_GENERATOR} - CMAKE_GENERATOR_PLATFORM ${CMAKE_GENERATOR_PLATFORM} - CMAKE_GENERATOR_TOOLSET ${CMAKE_GENERATOR_TOOLSET} - BINARY_DIR ${ITTAPI_BINARY_DIR} - SOURCE_DIR ${ITTAPI_SOURCE_DIR} - EXCLUDE_FROM_ALL TRUE - BUILD_BYPRODUCTS ${ITTNOTIFY_LIBRARY}) - add_library(ittnotify INTERFACE) - add_dependencies(ittnotify ext_ittapi) - target_link_libraries(ittnotify INTERFACE ${ITTNOTIFY_LIBRARY}) - target_include_directories(ittnotify INTERFACE ${ITTAPI_SOURCE_DIR}/include) + ) + + FetchContent_GetProperties(ext_ittapi) + if(NOT ext_ittapi_POPULATED) + FetchContent_Populate(ext_ittapi) + add_subdirectory(${ext_ittapi_SOURCE_DIR} ${ext_ittapi_BINARY_DIR}) + endif() + + target_compile_definitions(ittnotify INTERFACE ENABLE_PROFILING_ITT) + if (UNIX) + target_compile_options(ittnotify PRIVATE -Wno-undef) + endif() + openvino_developer_export_targets(ittnotify) endif() endif() From 9509244729c4fab36c6326b50c8071a17930b019 Mon Sep 17 00:00:00 2001 From: "Gladilov, Gleb" Date: Wed, 16 Dec 2020 15:47:25 +0300 Subject: [PATCH 086/244] [IE][VPU]: Enables check on split by dynamic dimension for VariadicSplit (#3571) Signed-off-by: Gladilov, Gleb --- .../src/ngraph/transformations/dynamic_to_static_shape.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inference-engine/src/vpu/common/src/ngraph/transformations/dynamic_to_static_shape.cpp b/inference-engine/src/vpu/common/src/ngraph/transformations/dynamic_to_static_shape.cpp index 4dbaac8dce64b1..79936780502899 100644 --- a/inference-engine/src/vpu/common/src/ngraph/transformations/dynamic_to_static_shape.cpp +++ b/inference-engine/src/vpu/common/src/ngraph/transformations/dynamic_to_static_shape.cpp @@ -72,7 +72,7 @@ bool propagateUpperBoundFromExistingDSR(std::shared_ptr& funct void validateDynamicFunction(const ngraph::Function& function) { for (auto const& split : function.get_ordered_ops()) { - if (split->get_type_info() != ngraph::opset5::Split::type_info) { + if (split->get_type_info() != ngraph::opset5::Split::type_info && split->get_type_info() != ngraph::opset5::VariadicSplit::type_info) { continue; } From 95f531e9e0a430f6b3e97a39496120646c3a87c8 Mon Sep 17 00:00:00 2001 From: Maksim Kutakov Date: Wed, 16 Dec 2020 16:51:01 +0300 Subject: [PATCH 087/244] [CPU] Improved Split layer (#3449) * [CPU] Added more optimal Split implementation --- .../src/mkldnn_plugin/bf16transformer.cpp | 2 +- .../src/mkldnn_plugin/bf16transformer.h | 2 +- .../src/mkldnn_plugin/mkldnn_edge.cpp | 2 +- .../src/mkldnn_plugin/mkldnn_memory.cpp | 9 +- .../mkldnn_plugin/nodes/mkldnn_split_node.cpp | 627 ++++++++---------- .../mkldnn_plugin/nodes/mkldnn_split_node.h | 11 +- .../cpu/single_layer_tests/region_yolo.cpp | 1 - .../plugin/cpu/single_layer_tests/split.cpp | 239 +++++++ .../layers/internal/graph_split_test.cpp | 162 +---- 9 files changed, 549 insertions(+), 506 deletions(-) create mode 100644 inference-engine/tests/functional/plugin/cpu/single_layer_tests/split.cpp diff --git a/inference-engine/src/mkldnn_plugin/bf16transformer.cpp b/inference-engine/src/mkldnn_plugin/bf16transformer.cpp index 0ddaf3fdbd0f9e..6f238d46f7820c 100644 --- a/inference-engine/src/mkldnn_plugin/bf16transformer.cpp +++ b/inference-engine/src/mkldnn_plugin/bf16transformer.cpp @@ -210,7 +210,7 @@ void BF16Transformer::optimizeToFloat(InferenceEngine::CNNNetwork &network) { } bool marked = tryToMarkFP32(inputTo.second->outData[o], immutable); if (marked) { - toAnalyzeTensors.insert(layer->outData[o]); + toAnalyzeTensors.insert(inputTo.second->outData[o]); } } } diff --git a/inference-engine/src/mkldnn_plugin/bf16transformer.h b/inference-engine/src/mkldnn_plugin/bf16transformer.h index 02cf8316610e9a..fc618ad4eee3c5 100644 --- a/inference-engine/src/mkldnn_plugin/bf16transformer.h +++ b/inference-engine/src/mkldnn_plugin/bf16transformer.h @@ -28,7 +28,7 @@ class BF16Transformer { { "concat", "eltwise" }; // prevent fallback to fp32 without considering both input and output nodes const InferenceEngine::details::caseless_set _skipmarking = - { "memory" }; + { "memory", "Split" }; /** * Tries to mark tensor as FP32 by analyzing of local consumers of the tensor. Do not mark if diff --git a/inference-engine/src/mkldnn_plugin/mkldnn_edge.cpp b/inference-engine/src/mkldnn_plugin/mkldnn_edge.cpp index 209bcc44d61343..17531da32627c1 100644 --- a/inference-engine/src/mkldnn_plugin/mkldnn_edge.cpp +++ b/inference-engine/src/mkldnn_plugin/mkldnn_edge.cpp @@ -93,7 +93,7 @@ bool MKLDNNEdge::needReorder() { }; const auto portChildEdges = getParent()->getChildEdgesAtPort(inNumber); - if (in_place && detectInPlaceChildsNum(portChildEdges) > 1 && childCanChangeMem) + if (in_place && childCanChangeMem && portChildEdges.size() > 1 && detectInPlaceChildsNum(portChildEdges) > 1) canBeInPlaceConflicts = true; if (!canBeInPlaceConflicts && in_place && !getParent()->getChildEdges().empty()) { for (auto &p_edge_peer : portChildEdges) { diff --git a/inference-engine/src/mkldnn_plugin/mkldnn_memory.cpp b/inference-engine/src/mkldnn_plugin/mkldnn_memory.cpp index 0f2b2f28ecbb63..e7724ac4cae448 100644 --- a/inference-engine/src/mkldnn_plugin/mkldnn_memory.cpp +++ b/inference-engine/src/mkldnn_plugin/mkldnn_memory.cpp @@ -288,7 +288,6 @@ bool MKLDNNMemory::IsGroupedFormat(memory::format format) { memory::format MKLDNNMemory::GetPlainFormat(memory::dims dims) { switch (dims.size()) { case 0: - return memory::x; case 1: return memory::x; case 2: @@ -576,6 +575,7 @@ MKLDNNMemoryDesc::operator InferenceEngine::TensorDesc() const { blkDims = dims; break; case memory::tnc: + case memory::ncw: layout = Layout::CHW; order = {0, 1, 2}; blkDims = dims; @@ -587,6 +587,13 @@ MKLDNNMemoryDesc::operator InferenceEngine::TensorDesc() const { static_cast(dims[0]), static_cast(dims[2])}; break; + case memory::nwc: + layout = Layout::CHW; + order = {0, 2, 1}; + blkDims = {static_cast(dims[0]), + static_cast(dims[2]), + static_cast(dims[1])}; + break; case memory::oihw: case memory::nchw: layout = Layout::NCHW; diff --git a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_split_node.cpp b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_split_node.cpp index c5b88316fc0000..bac3366f98dd19 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_split_node.cpp +++ b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_split_node.cpp @@ -3,136 +3,206 @@ // #include "mkldnn_split_node.h" +#include "common/cpu_memcpy.h" #include -#include #include -#include #include #include #include #include +#define THROW_ERROR THROW_IE_EXCEPTION << "Split layer with name '" << getName() <<"' " + using namespace mkldnn; using namespace MKLDNNPlugin; using namespace InferenceEngine; +static TensorDesc makePlainTensorDesc(const Precision& precision, const SizeVector& srcDims) { + SizeVector order(srcDims.size()); + std::iota(order.begin(), order.end(), 0); + return TensorDesc(precision, srcDims, {srcDims, order}); +} + +static TensorDesc makePerChannelTensorDesc(const Precision& precision, const SizeVector& srcDims) { + constexpr size_t channelsPos = 1lu; + SizeVector order(srcDims.size()); + std::iota(order.begin(), order.end(), 0); + SizeVector blkDims = srcDims; + if (srcDims.size() > 2) { + auto moveElementBack = [](SizeVector& vector, size_t indx) { + auto itr = vector.begin() + indx; + std::rotate(itr, itr + 1, vector.end()); + }; + + moveElementBack(order, channelsPos); + moveElementBack(blkDims, channelsPos); + } + + return TensorDesc(precision, srcDims, {blkDims, order}); +} + +static TensorDesc makeChannelBlockedTensorDesc(const Precision& precision, const SizeVector& srcDims, size_t blockSize) { + if (srcDims.size() < 2) { + THROW_IE_EXCEPTION << "Can't create blocked tensor descriptor!"; + } + + constexpr size_t channelsPos = 1lu; + SizeVector order(srcDims.size()); + std::iota(order.begin(), order.end(), 0); + order.push_back(channelsPos); + + SizeVector blkDims = srcDims; + blkDims[1] = blkDims[1] / blockSize + (blkDims[1] % blockSize ? 1 : 0); + blkDims.push_back(blockSize); + + return TensorDesc(precision, srcDims, {blkDims, order}); +} + +static inline uint8_t* getDataPtr(const MKLDNNMemory& memoryPtr) { + return reinterpret_cast(memoryPtr.GetData()) + memoryPtr.GetDescriptor().data.layout_desc.blocking.offset_padding * + MKLDNNExtensionUtils::sizeOfDataType(mkldnn::memory::data_type(memoryPtr.GetDescriptor().data.data_type)); +} + MKLDNNSplitNode::MKLDNNSplitNode(const InferenceEngine::CNNLayerPtr& layer, const mkldnn::engine& eng, MKLDNNWeightsSharing::Ptr &cache) : MKLDNNNode(layer, eng, cache) {} void MKLDNNSplitNode::getSupportedDescriptors() { - auto * splitLayer = dynamic_cast(getCnnLayer().get()); + auto splitLayer = dynamic_cast(getCnnLayer().get()); if (splitLayer == nullptr) - THROW_IE_EXCEPTION << "Cannot convert split layer."; + THROW_ERROR << "can not convert from CNN layer."; if (getParentEdges().size() != 1) - THROW_IE_EXCEPTION << "Incorrect number of input nodes."; + THROW_ERROR << "has incorrect number of input nodes."; if (getChildEdges().empty()) - THROW_IE_EXCEPTION << "Incorrect number of output nodes."; + THROW_ERROR << "has incorrect number of output nodes."; axis = splitLayer->_axis; if (axis >= getParentEdgeAt(0)->getDims().ndims()) - THROW_IE_EXCEPTION << "Invalid value of axis parameter in split layer"; + THROW_ERROR << "has invalid value of axis parameter."; } void MKLDNNSplitNode::initSupportedPrimitiveDescriptors() { + using TensorDescFactory = std::function; + constexpr size_t channelsPos = 1lu; + // perform guard checks if (!supportedPrimitiveDescriptors.empty()) return; - InferenceEngine::Precision precision = getCnnLayer()->insData[0].lock()->getPrecision(); - if (precision != InferenceEngine::Precision::FP32) - precision = InferenceEngine::Precision::FP32; - auto inputDataType = MKLDNNExtensionUtils::IEPrecisionToDataType(precision); - precision = getCnnLayer()->outData[0]->getPrecision(); - if (precision != InferenceEngine::Precision::FP32) - precision = InferenceEngine::Precision::FP32; - auto outputDataType = MKLDNNExtensionUtils::IEPrecisionToDataType(precision); - - auto srcDims = getParentEdgeAt(0)->getDims(); - - InferenceEngine::LayerConfig config; - config.dynBatchSupport = true; - config.inConfs.resize(1); - config.inConfs[0].inPlace = -1; - config.inConfs[0].constant = false; - config.inConfs[0].desc = MKLDNNMemoryDesc(srcDims, inputDataType, memory::format::any); - config.outConfs.resize(outDims.size()); + if (getCnnLayer()->insData.empty()) { + THROW_ERROR << "has an empty input in the CNN layer"; + } - std::vector outFormats; + auto inpData = getCnnLayer()->insData[0].lock(); + if (!inpData) { + THROW_ERROR << "input data is empty"; + } + auto srcDims = getParentEdgeAt(0)->getDims(); auto axis_size = 0; auto dstFirstDims = getChildEdgeAt(0)->getDims(); for (size_t i = 0; i < outDims.size(); i++) { auto o_Dims = outDims[i]; if (dstFirstDims.ndims() != o_Dims.ndims()) { - THROW_IE_EXCEPTION << "Split " << getName() << " supports only output blob with equal number of dimensions"; + THROW_ERROR << "only supports output blobs with equal number of dimensions"; } - config.outConfs[i].inPlace = -1; - config.outConfs[i].constant = false; - config.outConfs[i].desc = MKLDNNMemoryDesc(o_Dims, outputDataType, memory::format::any); - outFormats.push_back(memory::format::any); - axis_size += o_Dims[axis]; for (size_t j = 0; j < dstFirstDims.ndims(); j++) { if (j == axis) continue; if (o_Dims[j] != dstFirstDims[j]) - THROW_IE_EXCEPTION << "Split " << getName() << " has incorrect output dimensions"; + THROW_ERROR << "has incorrect output dimensions"; } } dstFirstDims[axis] = axis_size; if (dstFirstDims.size() != srcDims.size()) - THROW_IE_EXCEPTION << "The sizes of input blob and sum of output blobs are not equal."; - supportedPrimitiveDescriptors.emplace_back(config, impl_desc_type::ref, outFormats); + THROW_ERROR << "sizes of input blob and sum of output blobs are not equal."; + - auto numOfDim = static_cast(srcDims.ndims()); + InferenceEngine::Precision inpPrecision = inpData->getPrecision(); + auto outPrecision = inpPrecision; // the split layer doesn't convert precisions - SizeVector order; - SizeVector offsets(numOfDim, 0lu); - size_t offset = (std::numeric_limits::max)(); - for (size_t i = 0; i < numOfDim; i++) { - order.push_back(i); + // make primitive descriptor factory function for different configurations + bool dynBatchSupport = true; + if (axis < 1) { + dynBatchSupport = false; } + auto makePdInfo = [dynBatchSupport](TensorDescFactory getTensorDesc, const Precision& precision, const MKLDNNDims& srcDims, + const std::vector& outDims, impl_desc_type type) -> PrimitiveDescInfo { + InferenceEngine::LayerConfig config; - SizeVector strides(numOfDim); - strides[numOfDim - 1] = 1; - for (size_t i = 2; i <= numOfDim; i++) { - if (numOfDim - i < axis) { - strides[numOfDim - i] = (std::numeric_limits::max)(); - } else { - strides[numOfDim - i] = strides[numOfDim - i + 1] * srcDims[numOfDim - i + 1]; + config.dynBatchSupport = dynBatchSupport; + config.inConfs.resize(1); + config.inConfs[0].inPlace = -1; + config.inConfs[0].constant = false; + config.inConfs[0].desc = getTensorDesc(precision, srcDims.ToSizeVector()); + config.outConfs.resize(outDims.size()); + + std::vector outFormats; + + for (size_t i = 0; i < outDims.size(); i++) { + auto o_Dims = outDims[i]; + + config.outConfs[i].inPlace = -1; + config.outConfs[i].constant = false; + config.outConfs[i].desc = getTensorDesc(precision, o_Dims.ToSizeVector()); + outFormats.push_back(MKLDNNMemoryDesc(config.outConfs[i].desc).getFormat()); + } + return {config, type, outFormats}; + }; + + //Set plain format + supportedPrimitiveDescriptors.push_back(makePdInfo(&makePlainTensorDesc, inpPrecision, srcDims, outDims, impl_desc_type::ref)); + + //Set per channel format. + supportedPrimitiveDescriptors.push_back(makePdInfo(&makePerChannelTensorDesc, inpPrecision, srcDims, outDims, impl_desc_type::ref)); + + //Support channel blocked format + std::vector blockedPdIndexes; + if (srcDims.ndims() > channelsPos) { + for (size_t sizeS : {8lu, 16lu}) { + SizeVector blkDims = srcDims.ToSizeVector(); + if (blkDims[channelsPos] % sizeS) + continue; + + bool blocked = true; + for (size_t i = 0; i < outDims.size(); i++) { + if (outDims[i].ToSizeVector()[channelsPos] % sizeS) { + blocked = false; + break; + } + } + if (blocked) { + using std::placeholders::_1; + using std::placeholders::_2; + supportedPrimitiveDescriptors.push_back(makePdInfo(std::bind(&makeChannelBlockedTensorDesc, _1, _2, sizeS), + inpPrecision, srcDims, outDims, impl_desc_type::ref)); + blockedPdIndexes.push_back(supportedPrimitiveDescriptors.size() - 1); + } } } - config.inConfs[0].desc = TensorDesc(Precision::FP32, srcDims.ToSizeVector(), {srcDims.ToSizeVector(), order, offset, offsets, strides}); - outFormats.clear(); - for (size_t i = 0; i < outDims.size(); i++) { - auto dims = outDims[i].ToSizeVector(); - config.outConfs[i].inPlace = 0; - config.outConfs[i].desc = TensorDesc(Precision::FP32, dims, - {dims, order, offset, offsets, strides}); - outFormats.push_back(MKLDNNMemory::Convert(config.outConfs[i].desc.getLayout())); + // Optimized inplace case + std::vector pdIndexesToReuse(1, 0); // at least the first plain layout can be optimized inplace. + if (axis < 2) { + pdIndexesToReuse.insert(pdIndexesToReuse.end(), blockedPdIndexes.begin(), blockedPdIndexes.end()); } - supportedPrimitiveDescriptors.emplace_back(config, impl_desc_type::unknown, outFormats); - if ((numOfDim != 4 && numOfDim != 5) || axis != 1) - return; + for (auto refPdIndex : pdIndexesToReuse) { + const auto& refConfig = supportedPrimitiveDescriptors[refPdIndex].getConfig(); + auto config = refConfig; - order.push_back(1); - numOfDim = order.size(); - offsets = SizeVector(numOfDim, 0lu); + const auto& order = refConfig.inConfs[0].desc.getBlockingDesc().getOrder(); + const auto& blkDims = refConfig.inConfs[0].desc.getBlockingDesc().getBlockDims(); + auto numOfDim = blkDims.size(); - // nChw8c and nChw16c - for (size_t sizeS : {8lu, 16lu}) { - SizeVector blkDims = srcDims.ToSizeVector(); - if (blkDims[1] % sizeS) - continue; - blkDims[1] = blkDims[1] / sizeS + (blkDims[1] % sizeS ? 1lu : 0lu); - blkDims.push_back(sizeS); + std::vector outFormats; + SizeVector offsets(numOfDim, 0lu); + SizeVector strides(numOfDim); + strides.back() = 1lu; + size_t offset = (std::numeric_limits::max)(); - strides.resize(numOfDim); - strides[numOfDim - 1] = 1lu; for (size_t i = 2; i <= numOfDim; i++) { if (numOfDim - i < axis) { strides[numOfDim - i] = (std::numeric_limits::max)(); @@ -140,318 +210,60 @@ void MKLDNNSplitNode::initSupportedPrimitiveDescriptors() { strides[numOfDim - i] = strides[numOfDim - i + 1] * blkDims[numOfDim - i + 1]; } } - config.inConfs[0].desc = TensorDesc(Precision::FP32, srcDims.ToSizeVector(), {blkDims, order, offset, offsets, strides}); - outFormats.clear(); - bool canInplace = true; - for (size_t i = 0; i < outDims.size(); i++) { - auto dims = outDims[i].ToSizeVector(); - blkDims = dims; + config.inConfs[0].desc = TensorDesc(inpPrecision, srcDims.ToSizeVector(), {blkDims, order, offset, offsets, strides}); - if (blkDims[1] % sizeS) { - canInplace = false; - break; - } - blkDims[1] = blkDims[1] / sizeS + (blkDims[1] % sizeS ? 1lu : 0lu); - blkDims.push_back(sizeS); - config.outConfs[i].desc = TensorDesc(Precision::FP32, dims, {blkDims, order, offset, offsets, strides}); + for (size_t i = 0; i < outDims.size(); i++) { + const auto& outBlkDims = refConfig.outConfs[i].desc.getBlockingDesc().getBlockDims(); + const auto& dims = refConfig.outConfs[i].desc.getDims(); - outFormats.emplace_back(MKLDNNMemory::Convert(config.outConfs[i].desc.getLayout())); + config.outConfs[i].inPlace = 0; + config.outConfs[i].desc = TensorDesc(outPrecision, dims, {outBlkDims, order, offset, offsets, strides}); + outFormats.emplace_back(MKLDNNMemoryDesc(config.outConfs[i].desc).getFormat()); } - if (canInplace) - supportedPrimitiveDescriptors.emplace_back(config, impl_desc_type::unknown, outFormats); + supportedPrimitiveDescriptors.emplace_back(config, impl_desc_type::unknown, outFormats); } } void MKLDNNSplitNode::createPrimitive() { auto& srcMemPtr = getParentEdgeAt(0)->getMemoryPtr(); if (!srcMemPtr || !srcMemPtr->GetPrimitivePtr()) - THROW_IE_EXCEPTION << "Input memory didn't allocate."; + THROW_ERROR << "Input memory has not been allocated."; for (size_t i = 0; i < getChildEdges().size(); i++) { if (!getChildEdgeAt(i)->getMemoryPtr() || !getChildEdgeAt(i)->getMemory().GetPrimitivePtr()) - THROW_IE_EXCEPTION << "Destination memory didn't allocate."; + THROW_ERROR << "Destination memory has not been allocated."; } if (getSelectedPrimitiveDescriptor() == nullptr) - THROW_IE_EXCEPTION << "Preferable primitive descriptor is not set."; - - canUseOptimizedImpl = true; - if (axis != 1) - canUseOptimizedImpl = false; + THROW_ERROR << "Preferable primitive descriptor is not set."; - if (getParentEdgeAt(0)->getBlob()->getTensorDesc().getLayout() != NHWC && - getParentEdgeAt(0)->getBlob()->getTensorDesc().getLayout() != NDHWC) - canUseOptimizedImpl = false; - - for (size_t i = 0; i < getChildEdges().size(); i++) { - if (getChildEdgeAt(i)->getBlob()->getTensorDesc().getLayout() != NCHW && - getChildEdgeAt(i)->getBlob()->getTensorDesc().getLayout() != NCDHW) - canUseOptimizedImpl = false; - } -} - -void MKLDNNSplitNode::optimizedImpl(size_t MB) { - const int ndims = getParentEdgeAt(0)->getDims().ndims(); - const size_t IC = getParentEdgeAt(0)->getDims()[1]; - const size_t D = ndims == 5 ? getParentEdgeAt(0)->getDims()[ndims - 3] : 1; - const size_t H = getParentEdgeAt(0)->getDims()[ndims - 2]; - const size_t W = getParentEdgeAt(0)->getDims()[ndims - 1]; - - auto srcBlob = getParentEdgeAt(0)->getBlob(); - const auto *srcData = srcBlob->cbuffer().as(); - for (size_t i = 0, sIdx = 0; i < getChildEdges().size(); i++) { - auto dstBlob = getChildEdgeAt(i)->getBlob(); - auto *dstData = dstBlob->buffer().as(); - - const size_t OC = getChildEdgeAt(i)->getDims()[1]; - - size_t innerSize = 1; - for (size_t j = axis; j < dstBlob->getTensorDesc().getDims().size(); j++) { - innerSize *= dstBlob->getTensorDesc().getDims()[j]; - } - - auto srcPtr = srcData + srcBlob->getTensorDesc().offset(sIdx); - - parallel_for4d(MB, D, H, W, [&](size_t b, size_t d, size_t h, size_t w) { - for (size_t c = 0; c < OC; c++) { - size_t srcOff = b*D*H*W*IC + d*H*W*IC + h*W*IC + w*IC + c; - size_t dstOff = b*OC*D*H*W + c*D*H*W + d*H*W + h*W + w; - - dstData[dstOff] = srcPtr[srcOff]; - } - }); - - sIdx += innerSize; - } + if (!isOptimized()) + prepareOptimizedParams(); } void MKLDNNSplitNode::execute(mkldnn::stream strm) { if (isOptimized()) return; - // FIXME: add more optimal implementation - MKLDNNDims par_dims = getParentEdgeAt(0)->getDims(); int MB = batchToProcess(); - auto srcBlob = getParentEdgeAt(0)->getBlob(); - const auto *srcData = srcBlob->cbuffer().as(); - - size_t outerSize = 1; - for (int i = 0; i < axis; i++) { - if (i == 0) - outerSize *= MB; - else - outerSize *= srcBlob->getTensorDesc().getDims()[i]; - } + uint8_t* srcData = getDataPtr(this->getParentEdgeAt(0)->getMemory()); + size_t batch = this->getParentEdgeAt(0)->getDims()[0]; - if (canUseOptimizedImpl) { - optimizedImpl(MB); - return; - } + if (batch != MB) + optimizedParams.countStrides = optimizedParams.countStrides / batch * MB; - size_t srcSize = getParentEdgeAt(0)->getMemory().GetSize(); - size_t src_batch_off = srcBlob->getTensorDesc().offset(srcBlob->size() / outerSize) - - srcBlob->getTensorDesc().offset(0); + parallel_for2d(this->getChildEdges().size(), optimizedParams.countStrides, [&](size_t i, size_t j) { + uint8_t* dstData = optimizedParams.dstMemPtrs[i]; - for (size_t i = 0, sIdx = 0; i < getChildEdges().size(); i++) { - auto dstBlob = getChildEdgeAt(i)->getBlob(); - auto *dstData = dstBlob->buffer().as(); - - size_t innerSize = 1; - for (size_t j = axis; j < dstBlob->getTensorDesc().getDims().size(); j++) { - innerSize *= dstBlob->getTensorDesc().getDims()[j]; - } - - size_t dst_batch_off = dstBlob->getTensorDesc().offset(innerSize) - dstBlob->getTensorDesc().offset(0); - - for (size_t dIdx = 0; dIdx < innerSize; dIdx++, sIdx++) { - for (unsigned b = 0; b < outerSize; b++) { - if (sIdx + b*src_batch_off >= srcSize) - THROW_IE_EXCEPTION << "Incorrect configuration of split layer " << getName() << "!"; - dstData[b * dst_batch_off + dstBlob->getTensorDesc().offset(dIdx)] = - srcData[b * src_batch_off + srcBlob->getTensorDesc().offset(sIdx)]; - } - } - } + cpu_memcpy(&dstData[j * optimizedParams.dataSize[i]], + &srcData[optimizedParams.srcDataOffsets[i] + j * optimizedParams.srcDataStride], + optimizedParams.dataSize[i]); + }); } bool MKLDNNSplitNode::created() const { return getType() == Split; } -void MKLDNNSplitNode::selectOptimalPrimitiveDescriptor() { - if (implPriorities.size() > 0 && implPriorities[0] == impl_desc_type::ref) { - selectPrimitiveDescriptorByIndex(0); - return; - } - InferenceEngine::Precision precision = getCnnLayer()->insData[0].lock()->getPrecision(); - if (precision != InferenceEngine::Precision::FP32) - precision = InferenceEngine::Precision::FP32; - auto inputDataType = MKLDNNExtensionUtils::IEPrecisionToDataType(precision); - precision = getCnnLayer()->outData[0]->getPrecision(); - if (precision != InferenceEngine::Precision::FP32) - precision = InferenceEngine::Precision::FP32; - auto outputDataType = MKLDNNExtensionUtils::IEPrecisionToDataType(precision); - - bool hasUnknown = false; - std::vector canSelectPrimitive; - for (size_t i = 0; i < supportedPrimitiveDescriptors.size(); i++) { - bool hasAny = true; - auto &primDescInfo = supportedPrimitiveDescriptors[i]; - if (primDescInfo.getImplementationType() != impl_desc_type::unknown || - primDescInfo.getConfig().outConfs[0].inPlace < 0) - continue; - hasUnknown = true; - for (auto iInfo : primDescInfo.getConfig().inConfs) { - if (iInfo.desc.getLayout() != InferenceEngine::Layout::ANY) { - hasAny = false; - break; - } - } - - if (hasAny) { - for (auto oInfo : primDescInfo.getConfig().outConfs) { - if (oInfo.desc.getLayout() != InferenceEngine::Layout::ANY) { - hasAny = false; - break; - } - } - } - - if (!hasAny) { - canSelectPrimitive.push_back(i); - } - } - - bool canOptimize = false; - if (hasUnknown) { - canOptimize = true; - - if (canSelectPrimitive.size() == 1) { - selectPrimitiveDescriptorByIndex(static_cast(canSelectPrimitive[0])); - return; - } - } - - std::map formatFrequency; - for (size_t i = 0; i < getParentEdges().size(); i++) { - auto parentEdge = getParentEdgeAt(i); - auto parent = parentEdge->getParent(); - - if (parent->getSelectedPrimitiveDescriptor() == nullptr) - continue; - - int outputIndex = parentEdge->getOutputNum(); - if (outputIndex < 0) - THROW_IE_EXCEPTION << "Cannot find index of output node"; - if (outputIndex >= parent->getSelectedPrimitiveDescriptor()->getConfig().outConfs.size()) - outputIndex = 0; - auto outDesc = MKLDNNMemoryDesc(parent->getSelectedPrimitiveDescriptor()->getConfig().outConfs[outputIndex].desc); - if (!outDesc) - continue; - if (formatFrequency.find(outDesc.getFormat()) != formatFrequency.end()) - formatFrequency[outDesc.getFormat()] += 1; - else - formatFrequency[outDesc.getFormat()] = 1; - } - for (size_t i = 0; i < getChildEdges().size(); i++) { - auto childEdge = getChildEdgeAt(i); - auto child = childEdge->getChild(); - if (child->getSelectedPrimitiveDescriptor() == nullptr) - continue; - int inputIndex = childEdge->getOutputNum(); - if (inputIndex < 0) - THROW_IE_EXCEPTION << "Cannot find index of output node"; - if (inputIndex >= child->getSelectedPrimitiveDescriptor()->getConfig().inConfs.size()) - inputIndex = 0; - auto outDesc = MKLDNNMemoryDesc(child->getSelectedPrimitiveDescriptor()->getConfig().inConfs[inputIndex].desc); - if (!outDesc) - continue; - if (formatFrequency.find(outDesc.getFormat()) != formatFrequency.end()) - formatFrequency[outDesc.getFormat()] += 1; - else - formatFrequency[outDesc.getFormat()] = 1; - } - - size_t maxCount = 0; - mkldnn::memory::format convertTo = MKLDNNMemory::GetPlainFormat(getParentEdgeAt(0)->getDims()); - for (auto &it : formatFrequency) { - if (it.second > maxCount && !MKLDNNMemoryDesc(getParentEdgeAt(0)->getDims(), inputDataType, it.first).blocksExtended()) { - maxCount = it.second; - convertTo = it.first; - } - } - - // This logic is needed to cover cases when Split node cannot be optimized out for particular block size - // In general it is significantly better to have additional reorders in graph than to use reference Split implementation - if (convertTo == memory::nChw16c || convertTo == memory::nCdhw16c || - convertTo == memory::nChw8c || convertTo == memory::nCdhw8c) { - int blockSize = convertTo == memory::nChw16c || convertTo == memory::nCdhw16c ? 16 : 8; - bool shouldDecreaseBlockSize = false; - for (auto& parentEdge : getParentEdges()) { - if (parentEdge.lock()->getDims()[1] % blockSize != 0) - shouldDecreaseBlockSize = true; - } - - for (auto& childEdge : getChildEdges()) { - if (childEdge.lock()->getDims()[1] % blockSize != 0) - shouldDecreaseBlockSize = true; - } - - if (shouldDecreaseBlockSize) { - int decreasedBlockSize = 8; - bool canDecreaseBlockSize = true; - for (auto &parentEdge : getParentEdges()) { - if (parentEdge.lock()->getDims()[1] % decreasedBlockSize != 0) - canDecreaseBlockSize = false; - } - - for (auto &childEdge : getChildEdges()) { - if (childEdge.lock()->getDims()[1] % decreasedBlockSize != 0) - canDecreaseBlockSize = false; - } - - if (canDecreaseBlockSize) - convertTo = getParentEdgeAt(0)->getDims().ndims() == 5 ? memory::nCdhw8c : memory::nChw8c; - else - convertTo = MKLDNNMemory::GetPlainFormat(getParentEdgeAt(0)->getDims()); - } - } - - if (canOptimize && MKLDNNMemoryDesc(getParentEdgeAt(0)->getDims(), inputDataType, convertTo).blocksExtended()) - canOptimize = false; - for (size_t i = 0; canOptimize && i < getChildEdges().size(); i++) { - if (MKLDNNMemoryDesc(getChildEdgeAt(i)->getDims(), outputDataType, convertTo).blocksExtended()) - canOptimize = false; - } - - if (canOptimize) { - for (auto supportedPdIndex : canSelectPrimitive) { - if (MKLDNNMemoryDesc(supportedPrimitiveDescriptors[supportedPdIndex].getConfig().inConfs[0].desc).getFormat() == convertTo) { - selectPrimitiveDescriptorByIndex(static_cast(supportedPdIndex)); - return; - } - } - } - - for (size_t i = 0; i < supportedPrimitiveDescriptors.size(); i++) { - auto &primDescInfo = supportedPrimitiveDescriptors[i]; - if (primDescInfo.getImplementationType() == impl_desc_type::unknown) - continue; - if (convertTo == MKLDNNMemoryDesc(supportedPrimitiveDescriptors[i].getConfig().outConfs[0].desc).getFormat()) { - size_t num = 0; - for (num = 0; num < getParentEdges().size(); num++) { - if (MKLDNNMemoryDesc(getParentEdgeAt(num)->getDims(), inputDataType, convertTo).blocksExtended()) - break; - } - if (num == getParentEdges().size()) { - selectPrimitiveDescriptorByIndex(i); - return; - } - } - } - - selectPrimitiveDescriptorByIndex(0); -} - bool MKLDNNSplitNode::isOptimized() { return getSelectedPrimitiveDescriptor() && getSelectedPrimitiveDescriptor()->getConfig().outConfs[0].inPlace >= 0; } @@ -464,7 +276,7 @@ void MKLDNNSplitNode::initOptimalPrimitiveDescriptor() { auto selected_pd = getSelectedPrimitiveDescriptor(); if (selected_pd == nullptr) - THROW_IE_EXCEPTION << "Preferable primitive descriptor is not set."; + THROW_ERROR << "Preferable primitive descriptor is not set."; auto config = selected_pd->getConfig(); if (isInitConfig(config)) return; @@ -497,12 +309,11 @@ void MKLDNNSplitNode::initOptimalPrimitiveDescriptor() { } const auto& cnnLayer = getCnnLayer(); if (!cnnLayer) - THROW_IE_EXCEPTION << "Cannot create Split layer " << getName() << " without CNNLayer!"; + THROW_ERROR << "cannot be created without CNNLayer!"; if (config.outConfs.size() != outDims.size()) - THROW_IE_EXCEPTION << "Invalid config for Split layer " << getName(); + THROW_ERROR << "has invalid config"; size_t offset = 0; for (size_t i = 0; i < cnnLayer->outData.size(); i++) { - size_t confNum = i; config.outConfs[i].desc = InferenceEngine::TensorDesc(config.outConfs[i].desc.getPrecision(), config.outConfs[i].desc.getDims(), { config.outConfs[i].desc.getBlockingDesc().getBlockDims(), @@ -512,21 +323,119 @@ void MKLDNNSplitNode::initOptimalPrimitiveDescriptor() { config.inConfs[0].desc.getBlockingDesc().getStrides() }); size_t axisSize = 1; - for (size_t j = axis; j < config.outConfs[confNum].desc.getBlockingDesc().getBlockDims().size(); j++) { - axisSize *= config.outConfs[confNum].desc.getBlockingDesc().getBlockDims()[j]; + for (size_t j = axis; j < config.outConfs[i].desc.getBlockingDesc().getBlockDims().size(); j++) { + axisSize *= config.outConfs[i].desc.getBlockingDesc().getBlockDims()[j]; } offset += axisSize; } initDescriptor(config); } +void MKLDNNSplitNode::selectOptimalPrimitiveDescriptor() { + if (implPriorities.size() > 0 && implPriorities[0] == impl_desc_type::ref) { + selectPrimitiveDescriptorByIndex(0); + return; + } + + //check the descriptors and select the ones that have the same data format as the input + + std::vector canSelectPrimitive; + for (size_t i = 0; i < supportedPrimitiveDescriptors.size(); i++) { + auto parentEdge = getParentEdgeAt(0); + auto parentPtr = parentEdge->getParent(); + auto parent_spd = parentPtr->getSelectedPrimitiveDescriptor(); + + if (parent_spd != nullptr && !parent_spd->getConfig().outConfs.empty()) { + int inNum = parentEdge->getInputNum(); + if (inNum < 0 || inNum >= parent_spd->getConfig().outConfs.size()) { + inNum = 0; + } + if (MKLDNNExtensionUtils::initTensorsAreEqual( + getSupportedPrimitiveDescriptors()[i].getConfig().inConfs[0].desc, + parent_spd->getConfig().outConfs[inNum].desc)) { + canSelectPrimitive.push_back(i); + } + } + } + if (canSelectPrimitive.size() == 1) { + selectPrimitiveDescriptorByIndex(static_cast(canSelectPrimitive[0])); + return; + } + // if there are more then one PD with similar data layouts - select the optimized one + for (auto indx : canSelectPrimitive) { + if (supportedPrimitiveDescriptors[indx].getImplementationType() == impl_desc_type::unknown) { + selectPrimitiveDescriptorByIndex(static_cast(indx)); + return; + } + } + + // if there are no matching data layouts, select first optimized implementation + for (size_t i = 0; i < supportedPrimitiveDescriptors.size(); i++) { + if (supportedPrimitiveDescriptors[i].getImplementationType() == impl_desc_type::unknown) { + selectPrimitiveDescriptorByIndex(static_cast(i)); + return; + } + } + + selectPrimitiveDescriptorByIndex(0); +} + void MKLDNNSplitNode::setDynamicBatchLim(int lim) { if (axis == 0) - THROW_IE_EXCEPTION << "Dynamic batch is not supported by split layer with axis == 0 parameter"; + THROW_ERROR << "Dynamic batch is not supported by split layer with axis == 0 parameter"; dynBatchLim = lim; if (prim) { prim.setBatchLimit(batchToProcess(), getParentEdges().size(), getChildEdges().size()); } } + +void MKLDNNSplitNode::prepareOptimizedParams() { + const auto& inpTensorDesc = this->getSelectedPrimitiveDescriptor()->getConfig().inConfs[0].desc; + + //find axis order position + const auto& order = inpTensorDesc.getBlockingDesc().getOrder(); + unsigned axisOrderPos = UINT_MAX; + for (size_t i = 0; i < order.size(); ++i) { + if (order[i] == axis) { + axisOrderPos = i; + break; + } + } + if (UINT_MAX == axisOrderPos) { + THROW_ERROR << "Can't find the axis in the input tensor order list"; + } + + uint8_t srcDataSize = inpTensorDesc.getPrecision().size(); + const auto& srcDims = inpTensorDesc.getBlockingDesc().getBlockDims(); + int nDims = srcDims.size(); + + optimizedParams.countStrides = 1; + for (int i = 0; i < axisOrderPos; i++) + optimizedParams.countStrides *= srcDims[i]; + + optimizedParams.srcDataStride = 0; + optimizedParams.dataSize.resize(this->getChildEdges().size()); + optimizedParams.dstMemPtrs.clear(); + for (int i = 0; i < this->getChildEdges().size(); i++) { + if (uint8_t* dstData = getDataPtr(this->getChildEdgeAt(i)->getMemory())) { + optimizedParams.dstMemPtrs.push_back(dstData); + } else { + THROW_ERROR << "can't get child edge indx " << i << "data."; + } + + optimizedParams.dataSize[i] = srcDataSize; + + for (int j = axisOrderPos; j < nDims; j++) + optimizedParams.dataSize[i] *= this->getChildEdgeAt(i)->getDesc().getBlockingDesc().getBlockDims()[j]; + + optimizedParams.srcDataStride += optimizedParams.dataSize[i]; + } + + optimizedParams.srcDataOffsets.resize(this->getChildEdges().size()); + optimizedParams.srcDataOffsets[0] = 0; + for (int i = 1; i < this->getChildEdges().size(); i++) { + optimizedParams.srcDataOffsets[i] = optimizedParams.srcDataOffsets[i - 1] + optimizedParams.dataSize[i - 1]; + } +} REG_MKLDNN_PRIM_FOR(MKLDNNSplitNode, Split); diff --git a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_split_node.h b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_split_node.h index db8b554f1330c4..b7813dd3714c24 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_split_node.h +++ b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_split_node.h @@ -28,10 +28,17 @@ class MKLDNNSplitNode : public MKLDNNNode { void setDynamicBatchLim(int lim) override; private: - void optimizedImpl(size_t MB); + void prepareOptimizedParams(); - bool canUseOptimizedImpl = true; size_t axis = 1; + + struct { + std::vector dataSize; + std::vector srcDataOffsets; + std::vector dstMemPtrs; + size_t srcDataStride; + size_t countStrides; + } optimizedParams; }; } // namespace MKLDNNPlugin diff --git a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/region_yolo.cpp b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/region_yolo.cpp index 2a67767e993201..d57871383af4ad 100644 --- a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/region_yolo.cpp +++ b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/region_yolo.cpp @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 // -#include #include "ngraph_functions/builders.hpp" #include "test_utils/cpu_test_utils.hpp" diff --git a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/split.cpp b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/split.cpp new file mode 100644 index 00000000000000..d699f9b8df8a6e --- /dev/null +++ b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/split.cpp @@ -0,0 +1,239 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "ngraph_functions/builders.hpp" +#include "test_utils/cpu_test_utils.hpp" + +using namespace InferenceEngine; +using namespace CPUTestUtils; + +namespace CPULayerTestsDefinitions { + +typedef std::tuple< + size_t, // Num splits + int64_t, // Axis + InferenceEngine::Precision, // Net precision + std::vector, // Input shapes + std::vector, // Used outputs indices + std::string, // Target device name + CPUSpecificParams +> splitCPUTestParams; + +class SplitLayerCPUTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon, public CPUTestsBase { +public: + static std::string getTestCaseName(testing::TestParamInfo obj) { + size_t numSplits; + int64_t axis; + InferenceEngine::Precision netPrecision; + InferenceEngine::SizeVector inputShape, outIndices; + std::string targetDevice; + CPUSpecificParams cpuParams; + std::tie(numSplits, axis, netPrecision, inputShape, outIndices, targetDevice, cpuParams) = obj.param; + + std::ostringstream result; + result << "IS=" << CommonTestUtils::vec2str(inputShape) << "_"; + result << "numSplits=" << numSplits << "_"; + result << "axis=" << axis << "_"; + if (!outIndices.empty()) { + result << "outIndices" << CommonTestUtils::vec2str(outIndices) << "_"; + } + result << "netPRC=" << netPrecision.name() << "_"; + result << "trgDev=" << targetDevice; + result << CPUTestsBase::getTestCaseName(cpuParams); + return result.str(); + } +protected: + void SetUp() override { + SetRefMode(LayerTestsUtils::RefMode::CONSTANT_FOLDING); + size_t axis, numSplits; + std::vector inputShape, outIndices; + InferenceEngine::Precision netPrecision; + CPUSpecificParams cpuParams; + std::tie(numSplits, axis, netPrecision, inputShape, outIndices, targetDevice, cpuParams) = this->GetParam(); + inPrc = outPrc = netPrecision; + if (outIndices.empty()) { + for (int i = 0; i < numSplits; ++i) { + outIndices.push_back(i); + } + } + + std::tie(inFmts, outFmts, priority, selectedType) = cpuParams; + selectedType += std::string("_") + inPrc.name(); + + auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecision); + auto params = ngraph::builder::makeParams(ngPrc, {inputShape}); + auto paramOuts = ngraph::helpers::convert2OutputVector( + ngraph::helpers::castOps2Nodes(params)); + auto split = std::dynamic_pointer_cast(ngraph::builder::makeSplit(paramOuts[0], + ngPrc, numSplits, axis)); + ngraph::ResultVector results; + for (int i = 0; i < outIndices.size(); i++) { + results.push_back(std::make_shared(split->output(outIndices[i]))); + } + split->get_rt_info() = getCPUInfo(); + function = std::make_shared(results, params, "split"); + } +}; + +TEST_P(SplitLayerCPUTest, CompareWithRefs) { + SKIP_IF_CURRENT_TEST_IS_DISABLED() + + Run(); + CheckCPUImpl(executableNetwork, "Split"); +} + +namespace { +const auto planar_4D_ref = CPUSpecificParams{{nchw}, {nchw}, {"ref"}, "ref"}; +const auto planar_5D_ref = CPUSpecificParams{{ncdhw}, {ncdhw}, {"ref"}, "ref"}; + +const auto planar_4D = CPUSpecificParams{{nchw}, {nchw}, {}, "unknown"}; +const auto planar_5D = CPUSpecificParams{{ncdhw}, {ncdhw}, {}, "unknown"}; + +const auto planarChannels_4D = CPUSpecificParams{{nhwc}, {nhwc}, {}, "ref"}; +const auto planarChannels_5D = CPUSpecificParams{{ndhwc}, {ndhwc}, {}, "ref"}; + +const auto blocked8_4D = CPUSpecificParams{{nChw8c}, {nChw8c}, {}, "unknown"}; +const auto blocked8_5D = CPUSpecificParams{{nCdhw8c}, {nCdhw8c}, {}, "unknown"}; + +const auto blocked8_4D_ref = CPUSpecificParams{{nChw8c}, {nChw8c}, {}, "ref"}; +const auto blocked8_5D_ref = CPUSpecificParams{{nCdhw8c}, {nCdhw8c}, {}, "ref"}; + +const auto blocked16_4D = CPUSpecificParams{{nChw16c}, {nChw16c}, {}, "unknown"}; +const auto blocked16_5D = CPUSpecificParams{{nCdhw16c}, {nCdhw16c}, {}, "unknown"}; + +const auto blocked16_4D_ref = CPUSpecificParams{{nChw16c}, {nChw16c}, {}, "ref"}; +const auto blocked16_5D_ref = CPUSpecificParams{{nCdhw16c}, {nCdhw16c}, {}, "ref"}; + +// List of precisions natively supported by mkldnn. +const std::vector netPrecisions = { + Precision::I8, + Precision::I16, + Precision::I32, + Precision::FP32, + Precision::BF16 +}; + +INSTANTIATE_TEST_CASE_P(smoke_Split4D_CPU_Block8inPlace, SplitLayerCPUTest, + ::testing::Combine( + ::testing::Values(3), + ::testing::Values(0, 1), + ::testing::ValuesIn(netPrecisions), + ::testing::Values(std::vector({3, 24, 24, 9})), + ::testing::Values(std::vector({})), + ::testing::Values(CommonTestUtils::DEVICE_CPU), + ::testing::Values(planar_4D, planar_4D_ref, planarChannels_4D, blocked8_4D)), + SplitLayerCPUTest::getTestCaseName); + +INSTANTIATE_TEST_CASE_P(smoke_Split4D_CPU_Block8, SplitLayerCPUTest, + ::testing::Combine( + ::testing::Values(3), + ::testing::Values(2, 3), + ::testing::ValuesIn(netPrecisions), + ::testing::Values(std::vector({3, 24, 24, 9})), + ::testing::Values(std::vector({})), + ::testing::Values(CommonTestUtils::DEVICE_CPU), + ::testing::Values(planar_4D, planar_4D_ref, planarChannels_4D, blocked8_4D_ref)), + SplitLayerCPUTest::getTestCaseName); + +INSTANTIATE_TEST_CASE_P(smoke_Split4D_CPU_Block16inPlace, SplitLayerCPUTest, + ::testing::Combine( + ::testing::Values(4), + ::testing::Values(0, 1), + ::testing::ValuesIn(netPrecisions), + ::testing::Values(std::vector({4, 64, 32, 12})), + ::testing::Values(std::vector({})), + ::testing::Values(CommonTestUtils::DEVICE_CPU), + ::testing::Values(blocked16_4D)), + SplitLayerCPUTest::getTestCaseName); + +INSTANTIATE_TEST_CASE_P(smoke_Split4D_CPU_Block16, SplitLayerCPUTest, + ::testing::Combine( + ::testing::Values(4), + ::testing::Values(2, 3), + ::testing::ValuesIn(netPrecisions), + ::testing::Values(std::vector({4, 64, 32, 12})), + ::testing::Values(std::vector({})), + ::testing::Values(CommonTestUtils::DEVICE_CPU), + ::testing::Values(blocked16_4D_ref)), + SplitLayerCPUTest::getTestCaseName); + +INSTANTIATE_TEST_CASE_P(smoke_Split5D_CPU_Block8inPlace, SplitLayerCPUTest, + ::testing::Combine( + ::testing::Values(3), + ::testing::Values(0, 1), + ::testing::ValuesIn(netPrecisions), + ::testing::Values(std::vector({3, 24, 24, 9, 15})), + ::testing::Values(std::vector({})), + ::testing::Values(CommonTestUtils::DEVICE_CPU), + ::testing::Values(planar_5D, planar_5D_ref, planarChannels_5D, blocked8_5D)), + SplitLayerCPUTest::getTestCaseName); + +INSTANTIATE_TEST_CASE_P(smoke_Split5D_CPU_Block8, SplitLayerCPUTest, + ::testing::Combine( + ::testing::Values(3), + ::testing::Values(2, 3, 4), + ::testing::ValuesIn(netPrecisions), + ::testing::Values(std::vector({3, 24, 24, 9, 15})), + ::testing::Values(std::vector({})), + ::testing::Values(CommonTestUtils::DEVICE_CPU), + ::testing::Values(planar_5D, planar_5D_ref, planarChannels_5D, blocked8_5D_ref)), + SplitLayerCPUTest::getTestCaseName); + +INSTANTIATE_TEST_CASE_P(smoke_Split5D_CPU_Block16inPlace, SplitLayerCPUTest, + ::testing::Combine( + ::testing::Values(4), + ::testing::Values(0, 1), + ::testing::ValuesIn(netPrecisions), + ::testing::Values(std::vector({4, 64, 32, 12, 20})), + ::testing::Values(std::vector({})), + ::testing::Values(CommonTestUtils::DEVICE_CPU), + ::testing::Values(blocked16_5D)), + SplitLayerCPUTest::getTestCaseName); + +INSTANTIATE_TEST_CASE_P(smoke_Split5D_CPU_Block16, SplitLayerCPUTest, + ::testing::Combine( + ::testing::Values(4), + ::testing::Values(2, 3, 4), + ::testing::ValuesIn(netPrecisions), + ::testing::Values(std::vector({4, 64, 32, 12, 20})), + ::testing::Values(std::vector({})), + ::testing::Values(CommonTestUtils::DEVICE_CPU), + ::testing::Values(blocked16_5D_ref)), + SplitLayerCPUTest::getTestCaseName); + +INSTANTIATE_TEST_CASE_P(smoke_Split3D, SplitLayerCPUTest, + ::testing::Combine( + ::testing::Values(7), + ::testing::Values(0, 1, 2), + ::testing::ValuesIn(netPrecisions), + ::testing::Values(std::vector({14, 42, 21})), + ::testing::Values(std::vector({})), + ::testing::Values(CommonTestUtils::DEVICE_CPU), + ::testing::Values(CPUSpecificParams{{}, {}, {}, "unknown"}, CPUSpecificParams{{}, {}, {"ref"}, "ref"})), + SplitLayerCPUTest::getTestCaseName); + +INSTANTIATE_TEST_CASE_P(smoke_Split2D, SplitLayerCPUTest, + ::testing::Combine( + ::testing::Values(2), + ::testing::Values(0, 1), + ::testing::ValuesIn(netPrecisions), + ::testing::Values(std::vector({6, 12})), + ::testing::Values(std::vector({})), + ::testing::Values(CommonTestUtils::DEVICE_CPU), + ::testing::Values(CPUSpecificParams{{}, {}, {}, "unknown"}, CPUSpecificParams{{}, {}, {"ref"}, "ref"})), + SplitLayerCPUTest::getTestCaseName); + +INSTANTIATE_TEST_CASE_P(smoke_Split1D, SplitLayerCPUTest, + ::testing::Combine( + ::testing::Values(5), + ::testing::Values(0), + ::testing::ValuesIn(netPrecisions), + ::testing::Values(std::vector({10})), + ::testing::Values(std::vector({})), + ::testing::Values(CommonTestUtils::DEVICE_CPU), + ::testing::Values(CPUSpecificParams{{}, {}, {}, "unknown"}, CPUSpecificParams{{}, {}, {"ref"}, "ref"})), + SplitLayerCPUTest::getTestCaseName); +} // namespace +} // namespace CPULayerTestsDefinitions \ No newline at end of file diff --git a/inference-engine/tests_deprecated/unit/engines/mkldnn/graph/layers/internal/graph_split_test.cpp b/inference-engine/tests_deprecated/unit/engines/mkldnn/graph/layers/internal/graph_split_test.cpp index 0d8062c9855313..ac415ac2fe577b 100644 --- a/inference-engine/tests_deprecated/unit/engines/mkldnn/graph/layers/internal/graph_split_test.cpp +++ b/inference-engine/tests_deprecated/unit/engines/mkldnn/graph/layers/internal/graph_split_test.cpp @@ -230,171 +230,75 @@ INSTANTIATE_TEST_CASE_P( split_test_params { {1, 24, 2, 5}, {{1, 16, 2, 5}, {1, 8, 2, 5}}, - 1, 3, MKLDNNPlugin::impl_desc_type::unknown, {}, { - [](MKLDNNPlugin::PrimitiveDescInfo impl) { - ASSERT_EQ(MKLDNNPlugin::impl_desc_type::ref, impl.getImplementationType()); - ASSERT_EQ(1, impl.getConfig().inConfs.size()); - ASSERT_EQ(2, impl.getConfig().outConfs.size()); - ASSERT_EQ(InferenceEngine::Layout::ANY, impl.getConfig().inConfs.at(0).desc.getLayout()); - ASSERT_EQ(InferenceEngine::Layout::ANY, impl.getConfig().outConfs.at(0).desc.getLayout()); - ASSERT_EQ(InferenceEngine::Layout::ANY, impl.getConfig().outConfs.at(1).desc.getLayout()); - }, - [](MKLDNNPlugin::PrimitiveDescInfo impl) { - ASSERT_EQ(MKLDNNPlugin::impl_desc_type::unknown, impl.getImplementationType()); - ASSERT_EQ(1, impl.getConfig().inConfs.size()); - ASSERT_EQ(2, impl.getConfig().outConfs.size()); - ASSERT_EQ(InferenceEngine::Layout::NCHW, impl.getConfig().inConfs.at(0).desc.getLayout()); - ASSERT_EQ(InferenceEngine::Layout::NCHW, impl.getConfig().outConfs.at(0).desc.getLayout()); - ASSERT_EQ(InferenceEngine::Layout::NCHW, impl.getConfig().outConfs.at(1).desc.getLayout()); - }, - [](MKLDNNPlugin::PrimitiveDescInfo impl) { - ASSERT_EQ(MKLDNNPlugin::impl_desc_type::unknown, impl.getImplementationType()); - ASSERT_EQ(1, impl.getConfig().inConfs.size()); - ASSERT_EQ(2, impl.getConfig().outConfs.size()); - ASSERT_EQ(InferenceEngine::Layout::BLOCKED, impl.getConfig().inConfs.at(0).desc.getLayout()); - ASSERT_EQ(InferenceEngine::Layout::BLOCKED, impl.getConfig().outConfs.at(0).desc.getLayout()); - ASSERT_EQ(InferenceEngine::Layout::BLOCKED, impl.getConfig().outConfs.at(1).desc.getLayout()); - } - } + 1, 5, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} }, split_test_params { {1, 20, 2, 5}, {{1, 13, 2, 5}, {1, 7, 2, 5}}, - 1, 2, MKLDNNPlugin::impl_desc_type::unknown, {}, { - [](MKLDNNPlugin::PrimitiveDescInfo impl) { - ASSERT_EQ(MKLDNNPlugin::impl_desc_type::ref, impl.getImplementationType()); - ASSERT_EQ(1, impl.getConfig().inConfs.size()); - ASSERT_EQ(2, impl.getConfig().outConfs.size()); - ASSERT_EQ(InferenceEngine::Layout::ANY, impl.getConfig().inConfs.at(0).desc.getLayout()); - ASSERT_EQ(InferenceEngine::Layout::ANY, impl.getConfig().outConfs.at(0).desc.getLayout()); - ASSERT_EQ(InferenceEngine::Layout::ANY, impl.getConfig().outConfs.at(1).desc.getLayout()); - }, - [](MKLDNNPlugin::PrimitiveDescInfo impl) { - ASSERT_EQ(MKLDNNPlugin::impl_desc_type::unknown, impl.getImplementationType()); - ASSERT_EQ(1, impl.getConfig().inConfs.size()); - ASSERT_EQ(2, impl.getConfig().outConfs.size()); - ASSERT_EQ(InferenceEngine::Layout::NCHW, impl.getConfig().inConfs.at(0).desc.getLayout()); - ASSERT_EQ(InferenceEngine::Layout::NCHW, impl.getConfig().outConfs.at(0).desc.getLayout()); - ASSERT_EQ(InferenceEngine::Layout::NCHW, impl.getConfig().outConfs.at(1).desc.getLayout()); - } - } - }, - split_test_params { - {1, 20, 2, 5}, - {{1, 10, 2, 5}, {1, 10, 2, 5}}, - 1, 2, MKLDNNPlugin::impl_desc_type::unknown, {}, { - [](MKLDNNPlugin::PrimitiveDescInfo impl) { - ASSERT_EQ(MKLDNNPlugin::impl_desc_type::ref, impl.getImplementationType()); - ASSERT_EQ(1, impl.getConfig().inConfs.size()); - ASSERT_EQ(2, impl.getConfig().outConfs.size()); - ASSERT_EQ(InferenceEngine::Layout::ANY, impl.getConfig().inConfs.at(0).desc.getLayout()); - ASSERT_EQ(InferenceEngine::Layout::ANY, impl.getConfig().outConfs.at(0).desc.getLayout()); - ASSERT_EQ(InferenceEngine::Layout::ANY, impl.getConfig().outConfs.at(1).desc.getLayout()); - }, - [](MKLDNNPlugin::PrimitiveDescInfo impl) { - ASSERT_EQ(MKLDNNPlugin::impl_desc_type::unknown, impl.getImplementationType()); - ASSERT_EQ(1, impl.getConfig().inConfs.size()); - ASSERT_EQ(2, impl.getConfig().outConfs.size()); - ASSERT_EQ(InferenceEngine::Layout::NCHW, impl.getConfig().inConfs.at(0).desc.getLayout()); - ASSERT_EQ(InferenceEngine::Layout::NCHW, impl.getConfig().outConfs.at(0).desc.getLayout()); - ASSERT_EQ(InferenceEngine::Layout::NCHW, impl.getConfig().outConfs.at(1).desc.getLayout()); - } - } - }, - split_test_params { - {2, 20, 2, 5}, - {{2, 10, 2, 5}, {2, 10, 2, 5}}, - 1, 2, MKLDNNPlugin::impl_desc_type::unknown, {}, { - [](MKLDNNPlugin::PrimitiveDescInfo impl) { - ASSERT_EQ(MKLDNNPlugin::impl_desc_type::ref, impl.getImplementationType()); - ASSERT_EQ(1, impl.getConfig().inConfs.size()); - ASSERT_EQ(2, impl.getConfig().outConfs.size()); - ASSERT_EQ(InferenceEngine::Layout::ANY, impl.getConfig().inConfs.at(0).desc.getLayout()); - ASSERT_EQ(InferenceEngine::Layout::ANY, impl.getConfig().outConfs.at(0).desc.getLayout()); - ASSERT_EQ(InferenceEngine::Layout::ANY, impl.getConfig().outConfs.at(1).desc.getLayout()); - }, - [](MKLDNNPlugin::PrimitiveDescInfo impl) { - ASSERT_EQ(MKLDNNPlugin::impl_desc_type::unknown, impl.getImplementationType()); - ASSERT_EQ(1, impl.getConfig().inConfs.size()); - ASSERT_EQ(2, impl.getConfig().outConfs.size()); - ASSERT_EQ(InferenceEngine::Layout::NCHW, impl.getConfig().inConfs.at(0).desc.getLayout()); - ASSERT_EQ(InferenceEngine::Layout::NCHW, impl.getConfig().outConfs.at(0).desc.getLayout()); - ASSERT_EQ(InferenceEngine::Layout::NCHW, impl.getConfig().outConfs.at(1).desc.getLayout()); - } - } - }, - split_test_params { - {1, 24, 2, 5}, - {{1, 16, 2, 5}, {1, 8, 2, 5}}, 1, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} }, - split_test_params { - {1, 20, 2, 5}, - {{1, 13, 2, 5}, {1, 7, 2, 5}}, - 1, 2, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} - }, split_test_params { {1, 20, 2, 5}, {{1, 10, 2, 5}, {1, 10, 2, 5}}, - 1, 2, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} + 1, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} }, split_test_params { {2, 20, 2, 5}, {{2, 10, 2, 5}, {2, 10, 2, 5}}, - 1, 2, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} + 1, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} }, split_test_params { {2, 20, 2, 5}, {{2, 15, 2, 5}, {2, 5, 2, 5}}, - 1, 2, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} + 1, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} }, split_test_params { {9, 11, 7, 5}, {{3, 11, 7, 5}, {6, 11, 7, 5}}, - 0, 2, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} + 0, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} }, split_test_params { {3, 11, 7, 5}, {{3, 11, 4, 5}, {3, 11, 3, 5}}, - 2, 2, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} + 2, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} }, split_test_params { {3, 11, 7, 5}, {{3, 11, 7, 1}, {3, 11, 7, 4}}, - 3, 2, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} + 3, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} }, split_test_params { {5, 6, 7, 15}, {{1, 6, 7, 15}, {2, 6, 7, 15}, {1, 6, 7, 15}, {1, 6, 7, 15}}, - 0, 2, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} + 0, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} }, split_test_params { {5, 6, 7, 15}, {{5, 1, 7, 15}, {5, 2, 7, 15}, {5, 1, 7, 15}, {5, 2, 7, 15}}, - 1, 2, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} + 1, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} }, split_test_params { {5, 6, 7, 15}, {{5, 6, 3, 15}, {5, 6, 1, 15}, {5, 6, 2, 15}, {5, 6, 1, 15}}, - 2, 2, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} + 2, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} }, split_test_params { {5, 6, 7, 15}, {{5, 6, 7, 5}, {5, 6, 7, 3}, {5, 6, 7, 4}, {5, 6, 7, 3}}, - 3, 2, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} + 3, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} }, split_test_params { {5, 6, 7, 15}, {{5, 6, 7, 15}}, - 1, 2, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref}}, + 1, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref}}, split_test_params { {1, 32, 16, 16, 16}, {{1, 8, 16, 16, 16}, {1, 8, 16, 16, 16}, {1, 8, 16, 16, 16}, {1, 8, 16, 16, 16}}, - 1, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref}}, + 1, 5, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref}}, split_test_params { {1, 32, 16, 16, 16}, {{1, 8, 16, 16, 16}, {1, 8, 16, 16, 16}, {1, 8, 16, 16, 16}, {1, 8, 16, 16, 16}}, - 1, 3, MKLDNNPlugin::impl_desc_type::unknown, {}})); + 1, 5, MKLDNNPlugin::impl_desc_type::unknown, {}})); class MKLDNNGraphDynBatchSplitTests: public MKLDNNGraphSplitTests { protected: @@ -544,32 +448,10 @@ INSTANTIATE_TEST_CASE_P( // } // } // }, - split_test_params { - {2, 20, 2, 5}, - {{2, 10, 2, 5}, {2, 10, 2, 5}}, - 1, 2, MKLDNNPlugin::impl_desc_type::unknown, {}, { - [](MKLDNNPlugin::PrimitiveDescInfo impl) { - ASSERT_EQ(MKLDNNPlugin::impl_desc_type::ref, impl.getImplementationType()); - ASSERT_EQ(1, impl.getConfig().inConfs.size()); - ASSERT_EQ(2, impl.getConfig().outConfs.size()); - ASSERT_EQ(InferenceEngine::Layout::ANY, impl.getConfig().inConfs.at(0).desc.getLayout()); - ASSERT_EQ(InferenceEngine::Layout::ANY, impl.getConfig().outConfs.at(0).desc.getLayout()); - ASSERT_EQ(InferenceEngine::Layout::ANY, impl.getConfig().outConfs.at(1).desc.getLayout()); - }, - [](MKLDNNPlugin::PrimitiveDescInfo impl) { - ASSERT_EQ(MKLDNNPlugin::impl_desc_type::unknown, impl.getImplementationType()); - ASSERT_EQ(1, impl.getConfig().inConfs.size()); - ASSERT_EQ(2, impl.getConfig().outConfs.size()); - ASSERT_EQ(InferenceEngine::Layout::NCHW, impl.getConfig().inConfs.at(0).desc.getLayout()); - ASSERT_EQ(InferenceEngine::Layout::NCHW, impl.getConfig().outConfs.at(0).desc.getLayout()); - ASSERT_EQ(InferenceEngine::Layout::NCHW, impl.getConfig().outConfs.at(1).desc.getLayout()); - } - } - }, split_test_params { {2, 24, 2, 5}, {{2, 16, 2, 5}, {2, 8, 2, 5}}, - 1, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} + 1, 5, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} }, // TODO: rewrite to ngraph to have reshape functionality // split_test_params { @@ -586,34 +468,34 @@ INSTANTIATE_TEST_CASE_P( split_test_params { {2, 20, 2, 5}, {{2, 10, 2, 5}, {2, 10, 2, 5}}, - 1, 2, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} + 1, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} }, split_test_params { {2, 20, 2, 5}, {{2, 15, 2, 5}, {2, 5, 2, 5}}, - 1, 2, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} + 1, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} }, split_test_params { {3, 11, 7, 5}, {{3, 11, 4, 5}, {3, 11, 3, 5}}, - 2, 2, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} + 2, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} }, split_test_params { {3, 11, 7, 5}, {{3, 11, 7, 1}, {3, 11, 7, 4}}, - 3, 2, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} + 3, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} }, split_test_params { {5, 6, 7, 15}, {{5, 1, 7, 15}, {5, 2, 7, 15}, {5, 1, 7, 15}, {5, 2, 7, 15}}, - 1, 2, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} + 1, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} }, split_test_params { {5, 6, 7, 15}, {{5, 6, 3, 15}, {5, 6, 1, 15}, {5, 6, 2, 15}, {5, 6, 1, 15}}, - 2, 2, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} + 2, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref} }, split_test_params { {5, 6, 7, 15}, {{5, 6, 7, 5}, {5, 6, 7, 3}, {5, 6, 7, 4}, {5, 6, 7, 3}}, - 3, 2, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref}})); + 3, 3, MKLDNNPlugin::impl_desc_type::ref, {MKLDNNPlugin::impl_desc_type::ref}})); From 676bd8a86110af8b60133639a5000d8b00b1e1a7 Mon Sep 17 00:00:00 2001 From: Anastasia Kuporosova Date: Wed, 16 Dec 2020 17:06:32 +0300 Subject: [PATCH 088/244] [Python API] requirements (#1804) * [Python API] requirements * add setuptools * revert commit --- inference-engine/ie_bridges/python/requirements.txt | 4 ++-- inference-engine/ie_bridges/python/sample/requirements.txt | 4 ++-- inference-engine/ie_bridges/python/src/requirements-dev.txt | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/inference-engine/ie_bridges/python/requirements.txt b/inference-engine/ie_bridges/python/requirements.txt index ca2e0cd13f5715..2789db52718643 100644 --- a/inference-engine/ie_bridges/python/requirements.txt +++ b/inference-engine/ie_bridges/python/requirements.txt @@ -1,2 +1,2 @@ -numpy==1.16.3 -cython==0.29.17 +numpy>=1.16.3 +cython>=0.29.17 diff --git a/inference-engine/ie_bridges/python/sample/requirements.txt b/inference-engine/ie_bridges/python/sample/requirements.txt index 087eea0de87861..6f93dbf487ffcf 100644 --- a/inference-engine/ie_bridges/python/sample/requirements.txt +++ b/inference-engine/ie_bridges/python/sample/requirements.txt @@ -1,2 +1,2 @@ -opencv-python==3.4.4.19 -numpy==1.16.3 +opencv-python>=3.4.4.19 +numpy>=1.16.3 diff --git a/inference-engine/ie_bridges/python/src/requirements-dev.txt b/inference-engine/ie_bridges/python/src/requirements-dev.txt index 9e01c116ce829d..00c455c2c62ed2 100644 --- a/inference-engine/ie_bridges/python/src/requirements-dev.txt +++ b/inference-engine/ie_bridges/python/src/requirements-dev.txt @@ -1,4 +1,4 @@ -opencv-python==3.4.4.19 +opencv-python>=3.4.4.19 pytest==4.0.1 attrs==19.1.0 pytest-html==1.19.0 From f511f77894b475d2b0f86e1ee2371017ec3353c5 Mon Sep 17 00:00:00 2001 From: Irina Efode Date: Wed, 16 Dec 2020 18:16:16 +0300 Subject: [PATCH 089/244] [IE TESTS] Disable CancellationTests.*canResetAfterCancelAsyncRequest tests (#3645) --- .../plugin/cpu/shared_tests_instances/skip_tests_config.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/skip_tests_config.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/skip_tests_config.cpp index eec9226f080f46..fe38a7e93ddf64 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/skip_tests_config.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/skip_tests_config.cpp @@ -60,7 +60,7 @@ std::vector disabledTestPatterns() { // TODO: Issue 43417 sporadic issue, looks like an issue in test, reproducible only on Windows platform R"(.*decomposition1_batch=5_hidden_size=10_input_size=30_.*tanh.relu.*_clip=0_linear_before_reset=1.*_targetDevice=CPU_.*)", // TODO: Sporadic Issue: 45163 - R"(.*Behavior.*CancellationTests.*canResetAfterCancelAsyncRequest.*netPRC=FP16.*)", + R"(.*Behavior.*CancellationTests.*canResetAfterCancelAsyncRequest.*)", }; if (!InferenceEngine::with_cpu_x86_avx512_core()) { From c80e3c3a82408bd56d2a42e7114d24b37122ffe8 Mon Sep 17 00:00:00 2001 From: Junya Hayashi Date: Thu, 17 Dec 2020 00:48:38 +0900 Subject: [PATCH 090/244] =?UTF-8?q?gna=5Fplugin:=20include=20cmath=20libra?= =?UTF-8?q?ry=20to=20avoid=20call=20of=20overloaded=20=E2=80=98abs(float)?= =?UTF-8?q?=E2=80=99=20is=20ambiguous=20error=20(#3622)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inference-engine/src/gna_plugin/gna_plugin_config.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/inference-engine/src/gna_plugin/gna_plugin_config.cpp b/inference-engine/src/gna_plugin/gna_plugin_config.cpp index 1b52fe599f2d52..b49604cdaea11e 100644 --- a/inference-engine/src/gna_plugin/gna_plugin_config.cpp +++ b/inference-engine/src/gna_plugin/gna_plugin_config.cpp @@ -2,6 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // +#include #include #include "gna_plugin.hpp" #include "gna_plugin_config.hpp" From 261cb6ecf817f88544eda524db5746d38b52eee7 Mon Sep 17 00:00:00 2001 From: Mateusz Bencer Date: Wed, 16 Dec 2020 16:52:08 +0100 Subject: [PATCH 091/244] Enable yolo v3 test, added post-processing step (#3510) --- ngraph/python/tests/__init__.py | 1 - .../python/tests/test_onnx/test_zoo_models.py | 21 +++++++++++--- .../tests/test_onnx/utils/model_importer.py | 28 +++++++++++++------ 3 files changed, 37 insertions(+), 13 deletions(-) diff --git a/ngraph/python/tests/__init__.py b/ngraph/python/tests/__init__.py index 378bbcf1885618..8ead341d75440e 100644 --- a/ngraph/python/tests/__init__.py +++ b/ngraph/python/tests/__init__.py @@ -221,7 +221,6 @@ def xfail_test(reason="Mark the test as expected to fail", strict=True): "indices value that points to non-existing output tensor element") xfail_issue_39663 = xfail_test(reason="RuntimeError: Unsupported primitive of type: ROIAlign name: Y") xfail_issue_43380 = xfail_test(reason="RuntimeError: Sorting not possible, due to existed loop") -xfail_issue_43382 = xfail_test(reason="Testing models which have upper bound output shape is not supported") xfail_issue_41894 = xfail_test(reason="CPU plugin elementwise computation missmatch") diff --git a/ngraph/python/tests/test_onnx/test_zoo_models.py b/ngraph/python/tests/test_onnx/test_zoo_models.py index d4298586c0e374..5006dfc268db2d 100644 --- a/ngraph/python/tests/test_onnx/test_zoo_models.py +++ b/ngraph/python/tests/test_onnx/test_zoo_models.py @@ -19,6 +19,8 @@ from operator import itemgetter from pathlib import Path import os +from typing import Sequence, Any +import numpy as np from tests.test_onnx.utils import OpenVinoOnnxBackend from tests.test_onnx.utils.model_importer import ModelImportRunner @@ -27,7 +29,6 @@ xfail_issue_38701, xfail_issue_43742, xfail_issue_43380, - xfail_issue_43382, xfail_issue_43439, xfail_issue_39684, xfail_issue_40957, @@ -46,6 +47,18 @@ MODELS_ROOT_DIR = tests.MODEL_ZOO_DIR +def yolov3_post_processing(outputs : Sequence[Any]) -> Sequence[Any]: + concat_out_index = 2 + # remove all elements with value -1 from yolonms_layer_1/concat_2:0 output + concat_out = outputs[concat_out_index][outputs[concat_out_index] != -1] + concat_out = np.expand_dims(concat_out, axis=0) + outputs[concat_out_index] = concat_out + return outputs + +post_processing = { + "yolov3" : {"post_processing" : yolov3_post_processing} +} + tolerance_map = { "arcface_lresnet100e_opset8": {"atol": 0.001, "rtol": 0.001}, "fp16_inception_v1": {"atol": 0.001, "rtol": 0.001}, @@ -117,6 +130,8 @@ # updated model looks now: # {"model_name": path, "model_file": file, "dir": mdir, "atol": ..., "rtol": ...} model.update(tolerance_map[basedir]) + if basedir in post_processing: + model.update(post_processing[basedir]) zoo_models.append(model) if len(zoo_models) > 0: @@ -163,7 +178,6 @@ (xfail_issue_39669, "test_onnx_model_zoo_text_machine_comprehension_t5_model_t5_encoder_12_t5_encoder_cpu"), (xfail_issue_38084, "test_onnx_model_zoo_vision_object_detection_segmentation_mask_rcnn_model_MaskRCNN_10_mask_rcnn_R_50_FPN_1x_cpu"), (xfail_issue_38084, "test_onnx_model_zoo_vision_object_detection_segmentation_faster_rcnn_model_FasterRCNN_10_faster_rcnn_R_50_FPN_1x_cpu"), - (xfail_issue_43382, "test_onnx_model_zoo_vision_object_detection_segmentation_yolov3_model_yolov3_10_yolov3_yolov3_cpu"), (xfail_issue_43380, "test_onnx_model_zoo_vision_object_detection_segmentation_tiny_yolov3_model_tiny_yolov3_11_yolov3_tiny_cpu"), # Model MSFT @@ -182,8 +196,7 @@ (xfail_issue_39669, "test_MSFT_opset9_cgan_cgan_cpu"), (xfail_issue_40957, "test_MSFT_opset10_BERT_Squad_bertsquad10_cpu"), - (xfail_issue_43380, "test_MSFT_opset11_tinyyolov3_yolov3_tiny_cpu"), - (xfail_issue_43382, "test_MSFT_opset10_yolov3_yolov3_cpu"), + (xfail_issue_43380, "test_MSFT_opset11_tinyyolov3_yolov3_tiny_cpu") ] for test_case in import_xfail_list + execution_xfail_list: diff --git a/ngraph/python/tests/test_onnx/utils/model_importer.py b/ngraph/python/tests/test_onnx/utils/model_importer.py index afda808f35c3b3..dbe6d90210e452 100644 --- a/ngraph/python/tests/test_onnx/utils/model_importer.py +++ b/ngraph/python/tests/test_onnx/utils/model_importer.py @@ -19,14 +19,18 @@ import onnx.backend.test import unittest -from collections import defaultdict +from collections import defaultdict, namedtuple from onnx import numpy_helper, NodeProto, ModelProto from onnx.backend.base import Backend, BackendRep from onnx.backend.test.case.test_case import TestCase as OnnxTestCase from onnx.backend.test.runner import TestItem from pathlib import Path from tests.test_onnx.utils.onnx_helpers import import_onnx_model -from typing import Any, Dict, List, Optional, Pattern, Set, Text, Type, Union +from typing import Any, Dict, List, Optional, Pattern, Set, Text, Type, Union, Callable, Sequence + + +# add post-processing function as part of test data +ExtOnnxTestCase = namedtuple("TestCaseExt", OnnxTestCase._fields + ("post_processing",)) class ModelImportRunner(onnx.backend.test.BackendTest): @@ -51,7 +55,7 @@ def __init__( .replace("\\", "_") \ .replace("-", "_") - test_case = OnnxTestCase( + test_case = ExtOnnxTestCase( name=test_name, url=None, model_name=model["model_name"], @@ -61,6 +65,7 @@ def __init__( kind="OnnxBackendRealModelTest", rtol=model.get("rtol", 0.001), atol=model.get("atol", 1e-07), + post_processing=model.get("post_processing", None) ) self._add_model_import_test(test_case) self._add_model_execution_test(test_case) @@ -72,7 +77,7 @@ def _load_onnx_model(model_dir: Path, filename: Path) -> ModelProto: return onnx.load(model_dir / filename) - def _add_model_import_test(self, model_test: OnnxTestCase) -> None: + def _add_model_import_test(self, model_test: ExtOnnxTestCase) -> None: # model is loaded at runtime, note sometimes it could even # never loaded if the test skipped model_marker = [None] # type: List[Optional[Union[ModelProto, NodeProto]]] @@ -87,6 +92,7 @@ def run_import(test_self: Any, device: Text) -> None: @classmethod def _execute_npz_data( cls, model_dir: str, prepared_model: BackendRep, result_rtol: float, result_atol: float, + post_processing: Callable[[Sequence[Any]], Sequence[Any]] = None ) -> int: executed_tests = 0 for test_data_npz in model_dir.glob("test_data_*.npz"): @@ -94,6 +100,8 @@ def _execute_npz_data( inputs = list(test_data["inputs"]) outputs = list(prepared_model.run(inputs)) ref_outputs = test_data["outputs"] + if post_processing is not None: + outputs = post_processing(outputs) cls.assert_similar_outputs(ref_outputs, outputs, result_rtol, result_atol) executed_tests = executed_tests + 1 return executed_tests @@ -101,6 +109,7 @@ def _execute_npz_data( @classmethod def _execute_pb_data( cls, model_dir: str, prepared_model: BackendRep, result_rtol: float, result_atol: float, + post_processing: Callable[[Sequence[Any]], Sequence[Any]] = None ) -> int: executed_tests = 0 for test_data_dir in model_dir.glob("test_data_set*"): @@ -123,11 +132,13 @@ def _execute_pb_data( if(len(inputs) == 0): continue outputs = list(prepared_model.run(inputs)) + if post_processing is not None: + outputs = post_processing(outputs) cls.assert_similar_outputs(ref_outputs, outputs, result_rtol, result_atol) executed_tests = executed_tests + 1 return executed_tests - def _add_model_execution_test(self, model_test: OnnxTestCase) -> None: + def _add_model_execution_test(self, model_test: ExtOnnxTestCase) -> None: # model is loaded at runtime, note sometimes it could even # never loaded if the test skipped model_marker = [None] # type: List[Optional[Union[ModelProto, NodeProto]]] @@ -138,12 +149,13 @@ def run_execution(test_self: Any, device: Text) -> None: prepared_model = self.backend.prepare(model, device) assert prepared_model is not None executed_tests = ModelImportRunner._execute_npz_data( - model_test.model_dir, prepared_model, model_test.rtol, model_test.atol + model_test.model_dir, prepared_model, model_test.rtol, model_test.atol, + model_test.post_processing ) executed_tests = executed_tests + ModelImportRunner._execute_pb_data( - model_test.model_dir, prepared_model, model_test.rtol, model_test.atol + model_test.model_dir, prepared_model, model_test.rtol, model_test.atol, + model_test.post_processing ) - assert executed_tests > 0, "This model has no test data" self._add_test("ModelExecution", model_test.name, run_execution, model_marker) From 5f9ef0cf26543b3dde80b3b2bfc7e996e7c55d5b Mon Sep 17 00:00:00 2001 From: Bartosz Lesniewski Date: Wed, 16 Dec 2020 17:51:28 +0100 Subject: [PATCH 092/244] Remove ops from Layer Creator/ Node Converter - part 5 (#3493) * remove avgpool op from layer creator * remove binaryconvolution op from layer creator * remove broadcast op from layer creator * remove ctcgreedydecoder op from layer creator * remove stridedslice op from layer creator * remove convolutionbackpropdata op from layer creator * adjust broadcast op to deduce broadcast mode * add default strides if not provided when creating stridedslice * code review comments --- .../src/convert_function_to_cnn_network.cpp | 11 +- .../src/ie_cnn_layer_builder_ngraph.cpp | 79 -------- .../src/readers/ir_reader/ie_ir_parser.cpp | 173 ------------------ .../src/readers/ir_reader/ie_ir_parser.hpp | 6 + ngraph/core/src/op/broadcast.cpp | 22 ++- ngraph/core/src/op/strided_slice.cpp | 8 + 6 files changed, 44 insertions(+), 255 deletions(-) diff --git a/inference-engine/src/legacy_api/src/convert_function_to_cnn_network.cpp b/inference-engine/src/legacy_api/src/convert_function_to_cnn_network.cpp index 9b9e2517fcc770..fecb8d8a5a85e3 100644 --- a/inference-engine/src/legacy_api/src/convert_function_to_cnn_network.cpp +++ b/inference-engine/src/legacy_api/src/convert_function_to_cnn_network.cpp @@ -1291,6 +1291,15 @@ InferenceEngine::details::CNNLayerCreator::CNNLayerCreator(const std::shared_ptr } return res; }); + + addSpecificCreator({"CTCGreedyDecoder"}, [](const std::shared_ptr<::ngraph::Node>& node, + const std::map& params) -> CNNLayerPtr { + LayerParams attrs = {node->get_friendly_name(), "CTCGreedyDecoder", details::convertPrecision(node->get_output_element_type(0))}; + auto res = std::make_shared(attrs); + res->params = params; + res->params["ctc_merge_repeated"] = res->getBoolStrParamAsIntStr("ctc_merge_repeated"); + return res; + }); } CNNLayerPtr InferenceEngine::details::CNNLayerCreator::create() { @@ -1318,9 +1327,7 @@ void convertFunctionToICNNNetwork(const std::shared_ptr> convertors = { - std::make_shared>(), std::make_shared>(), - std::make_shared>(), std::make_shared>(), std::make_shared>(), std::make_shared>(), diff --git a/inference-engine/src/legacy_api/src/ie_cnn_layer_builder_ngraph.cpp b/inference-engine/src/legacy_api/src/ie_cnn_layer_builder_ngraph.cpp index f27a22067c4627..79559f8a54b71f 100644 --- a/inference-engine/src/legacy_api/src/ie_cnn_layer_builder_ngraph.cpp +++ b/inference-engine/src/legacy_api/src/ie_cnn_layer_builder_ngraph.cpp @@ -550,72 +550,6 @@ CNNLayer::Ptr NodeConverter::createLayer( return res; } -template <> -CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ptr& layer) const { - LayerParams params = {layer->get_friendly_name(), "Pooling", - details::convertPrecision(layer->get_output_element_type(0))}; - auto res = std::make_shared(params); - auto castedLayer = ngraph::as_type_ptr(layer); - if (castedLayer == nullptr) THROW_IE_EXCEPTION << "Cannot get " << params.type << " layer " << params.name; - - std::string value; - for (const auto& val : castedLayer->get_pads_begin()) { - if (!value.empty()) value += ","; - value += asString(val); - } - res->params["pads_begin"] = value; - - value.clear(); - for (const auto& val : castedLayer->get_pads_end()) { - if (!value.empty()) value += ","; - value += asString(val); - } - res->params["pads_end"] = value; - - value.clear(); - for (const auto& val : castedLayer->get_strides()) { - if (!value.empty()) value += ","; - value += asString(val); - } - res->params["strides"] = value; - - value.clear(); - for (const auto& val : castedLayer->get_kernel()) { - if (!value.empty()) value += ","; - value += asString(val); - } - res->params["kernel"] = value; - - switch (castedLayer->get_auto_pad()) { - case ngraph::op::PadType::VALID: - res->params["auto_pad"] = "valid"; - break; - case ngraph::op::PadType::SAME_UPPER: - res->params["auto_pad"] = "same_upper"; - break; - case ngraph::op::PadType::SAME_LOWER: - res->params["auto_pad"] = "same_lower"; - break; - default: - break; - } - - auto exclude_pad = castedLayer->get_exclude_pad(); - res->params["exclude-pad"] = exclude_pad ? "true" : "false"; - res->params["pool-method"] = "avg"; - switch (castedLayer->get_rounding_type()) { - case ngraph::op::RoundingType::CEIL: - res->params["rounding_type"] = "ceil"; - break; - case ngraph::op::RoundingType::FLOOR: - res->params["rounding_type"] = "floor"; - break; - default: - THROW_IE_EXCEPTION << "Unsupported ngraph rounding type."; - } - return res; -} - template <> CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ptr& layer) const { LayerParams params = {layer->get_friendly_name(), "Pooling", @@ -1162,19 +1096,6 @@ CNNLayer::Ptr NodeConverter::createLayer(const std::sha return res; } -template <> -CNNLayer::Ptr NodeConverter::createLayer( - const std::shared_ptr& layer) const { - LayerParams params = {layer->get_friendly_name(), "CTCGreedyDecoder", - details::convertPrecision(layer->get_output_element_type(0))}; - auto res = std::make_shared(params); - auto castedLayer = ngraph::as_type_ptr(layer); - if (castedLayer == nullptr) THROW_IE_EXCEPTION << "Cannot get " << params.type << " layer " << params.name; - - res->params["ctc_merge_repeated"] = castedLayer->get_ctc_merge_repeated() ? "1" : "0"; - return res; -} - template <> CNNLayer::Ptr NodeConverter::createLayer(const std::shared_ptr& layer) const { LayerParams params = {layer->get_friendly_name(), "Erf", diff --git a/inference-engine/src/readers/ir_reader/ie_ir_parser.cpp b/inference-engine/src/readers/ir_reader/ie_ir_parser.cpp index b2db09a4676594..4a970130fbf77a 100644 --- a/inference-engine/src/readers/ir_reader/ie_ir_parser.cpp +++ b/inference-engine/src/readers/ir_reader/ie_ir_parser.cpp @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include @@ -397,17 +396,11 @@ std::shared_ptr V10Parser::createNode(const std::vector> creators = { - std::make_shared>("AvgPool"), - std::make_shared>("CTCGreedyDecoder"), std::make_shared>("DeformableConvolution"), std::make_shared>("DeformablePSROIPooling"), - std::make_shared>("Broadcast"), - std::make_shared>("StridedSlice"), std::make_shared>("GreaterEqual"), std::make_shared>("GroupConvolution"), - std::make_shared>("ConvolutionBackpropData"), std::make_shared>("GroupConvolutionBackpropData"), - std::make_shared>("BinaryConvolution"), std::make_shared>("SquaredDifference"), std::make_shared>("LessEqual"), std::make_shared>("Equal"), @@ -775,20 +768,6 @@ std::shared_ptr V10Parser::LayerCreator: activations, activations_alpha, activations_beta, clip); } -// CTCGreedyDecoder layer -template <> -std::shared_ptr V10Parser::LayerCreator::createLayer( - const ngraph::OutputVector& inputs, const pugi::xml_node& node, const Blob::CPtr& weights, - const GenericLayerParams& layerParsePrms) { - checkParameters(inputs, layerParsePrms, 2); - pugi::xml_node dn = node.child("data"); - if (dn.empty()) - THROW_IE_EXCEPTION << "Cannot read parameter for " << getType() << " layer with name: " << layerParsePrms.name; - - return std::make_shared(inputs[0], inputs[1], - GetBoolAttr(dn, "ctc_merge_repeated", true)); -} - // SquaredDifference layer template <> std::shared_ptr V10Parser::LayerCreator::createLayer( @@ -857,44 +836,6 @@ std::shared_ptr V10Parser::LayerCreator::creat return std::make_shared(inputs[0]); } -// StridedSlice layer -template <> -std::shared_ptr V10Parser::LayerCreator::createLayer( - const ngraph::OutputVector& inputs, const pugi::xml_node& node, const Blob::CPtr& weights, - const GenericLayerParams& layerParsePrms) { - - pugi::xml_node dn = node.child("data"); - - std::vector begin_mask = getParameters(dn, "begin_mask"); - std::vector end_mask = getParameters(dn, "end_mask"); - std::vector new_axis = getParameters(dn, "new_axis_mask"); - std::vector shrink_axis = getParameters(dn, "shrink_axis_mask"); - std::vector ellipsis_mask = getParameters(dn, "ellipsis_mask"); - - if (inputs.size() == 3) { - return std::make_shared(inputs[0], inputs[1], inputs[2], begin_mask, - end_mask, new_axis, shrink_axis, ellipsis_mask); - } else if (inputs.size() == 4) { - return std::make_shared(inputs[0], inputs[1], inputs[2], inputs[3], begin_mask, - end_mask, new_axis, shrink_axis, ellipsis_mask); - } else { - THROW_IE_EXCEPTION << "Incorrect number of inputs " << inputs.size() << " for " << getType() << " layer with name: " << layerParsePrms.name; - } -} - -// Broadcast layer -template <> -std::shared_ptr V10Parser::LayerCreator::createLayer( - const ngraph::OutputVector& inputs, const pugi::xml_node& node, const Blob::CPtr& weights, - const GenericLayerParams& layerParsePrms) { - if (inputs.size() == 2) { - return std::make_shared(inputs[0], inputs[1]); - } else if (layerParsePrms.inputPorts.size() == 3) { - return std::make_shared(inputs[0], inputs[1], inputs[2]); - } - THROW_IE_EXCEPTION << "Invalid number of inputs: " << layerParsePrms.inputPorts.size(); -} - // RegionYolo layer template <> std::shared_ptr V10Parser::LayerCreator::createLayer( @@ -934,41 +875,6 @@ std::shared_ptr V10Parser::LayerCreator::cr return std::make_shared(inputs[0], ngraph::Strides {stride}); } -// BinaryConvolution layer -template <> -std::shared_ptr V10Parser::LayerCreator::createLayer( - const ngraph::OutputVector& inputs, const pugi::xml_node& node, const Blob::CPtr& weights, - const GenericLayerParams& layerParsePrms) { - checkParameters(inputs, layerParsePrms, 2); - pugi::xml_node dn = node.child("data"); - - if (dn.empty()) - THROW_IE_EXCEPTION << "Cannot read parameter for " << getType() << " layer with name: " << layerParsePrms.name; - - size_t group = GetUIntAttr(dn, "group", 1); - if (group != 1) THROW_IE_EXCEPTION << "Cannot create grouped BinaryConvolution layer " << layerParsePrms.name; - - ngraph::op::PadType pad_type = ngraph::op::PadType::EXPLICIT; - std::string auto_pad = GetStrAttr(dn, "auto_pad", ""); - if (auto_pad == "same_lower") { - pad_type = ngraph::op::PadType::SAME_LOWER; - } else if (auto_pad == "same_upper") { - pad_type = ngraph::op::PadType::SAME_UPPER; - } else if (auto_pad == "valid") { - pad_type = ngraph::op::PadType::VALID; - } - - auto strides = ngraph::Strides(getParameters(dn, "strides")); - auto dilations = ngraph::Strides(getParameters(dn, "dilations")); - auto pads_begin = ngraph::CoordinateDiff(getParameters(dn, "pads_begin")); - auto pads_end = ngraph::CoordinateDiff(getParameters(dn, "pads_end")); - auto mode = GetStrAttr(dn, "mode"); - auto pad_value = GetFloatAttr(dn, "pad_value"); - - return std::make_shared(inputs[0], inputs[1], strides, pads_begin, pads_end, - dilations, mode, pad_value, pad_type); -} - // GroupConvolution layer template <> std::shared_ptr V10Parser::LayerCreator::createLayer( @@ -1032,44 +938,6 @@ std::shared_ptr V10Parser::LayerCreator -std::shared_ptr V10Parser::LayerCreator::createLayer( - const ngraph::OutputVector& inputs, const pugi::xml_node& node, const Blob::CPtr& weights, - const GenericLayerParams& layerParsePrms) { - pugi::xml_node dn = node.child("data"); - - if (dn.empty()) - THROW_IE_EXCEPTION << "Cannot read parameter for " << getType() << " layer with name: " << layerParsePrms.name; - - ngraph::op::PadType pad_type = ngraph::op::PadType::EXPLICIT; - std::string auto_pad = GetStrAttr(dn, "auto_pad", ""); - if (auto_pad == "same_lower") { - pad_type = ngraph::op::PadType::SAME_LOWER; - } else if (auto_pad == "same_upper") { - pad_type = ngraph::op::PadType::SAME_UPPER; - } else if (auto_pad == "valid") { - pad_type = ngraph::op::PadType::VALID; - } - - auto strides = ngraph::Strides(getParameters(dn, "strides")); - auto dilations = ngraph::Strides(getParameters(dn, "dilations")); - auto pads_begin = ngraph::CoordinateDiff(getParameters(dn, "pads_begin", {})); - auto pads_end = ngraph::CoordinateDiff(getParameters(dn, "pads_end", {})); - auto output_padding = ngraph::CoordinateDiff(getParameters(dn, "output_padding", {})); - if (inputs.size() != 3 && inputs.size() != 2) { - THROW_IE_EXCEPTION << layerParsePrms.type << " layer " << layerParsePrms.name << " has incorrect number of input ports!"; - } - - if (inputs.size() == 3) { - return std::make_shared(inputs[0], inputs[1], inputs[2], strides, pads_begin, pads_end, - dilations, pad_type, output_padding); - } else { - return std::make_shared(inputs[0], inputs[1], strides, pads_begin, pads_end, - dilations, pad_type, output_padding); - } -} - // GroupConvolutionBackpropData layer template <> std::shared_ptr V10Parser::LayerCreator::createLayer( @@ -1109,47 +977,6 @@ std::shared_ptr V10Parser::LayerCreator -std::shared_ptr V10Parser::LayerCreator::createLayer( - const ngraph::OutputVector& inputs, const pugi::xml_node& node, const Blob::CPtr& weights, - const GenericLayerParams& layerParsePrms) { - checkParameters(inputs, layerParsePrms, 1); - pugi::xml_node dn = node.child("data"); - - if (dn.empty()) - THROW_IE_EXCEPTION << "Cannot read parameter for " << getType() << " layer with name: " << layerParsePrms.name; - - auto exclude_pad = GetStrAttr(dn, "exclude-pad") == "true"; - auto strides = ngraph::Strides(getParameters(dn, "strides")); - auto kernel = ngraph::Shape(getParameters(dn, "kernel")); - auto pads_begin = ngraph::Shape(getParameters(dn, "pads_begin")); - auto pads_end = ngraph::Shape(getParameters(dn, "pads_end")); - auto pad_type = ngraph::op::PadType::EXPLICIT; - - auto pad_type_str = GetStrAttr(dn, "auto_pad", ""); - if (pad_type_str == "same_lower") { - pad_type = ngraph::op::PadType::SAME_LOWER; - } else if (pad_type_str == "same_upper") { - pad_type = ngraph::op::PadType::SAME_UPPER; - } else if (pad_type_str == "valid") { - pad_type = ngraph::op::PadType::VALID; - } - - ngraph::op::RoundingType rounding_type; - auto str_rounding_type = GetStrAttr(dn, "rounding_type", "floor"); - if (str_rounding_type == "floor") { - rounding_type = ngraph::op::RoundingType::FLOOR; - } else if (str_rounding_type == "ceil") { - rounding_type = ngraph::op::RoundingType::CEIL; - } else { - THROW_IE_EXCEPTION << "Unsuppored rounding type: " << str_rounding_type; - } - - return std::make_shared(inputs[0], strides, pads_begin, pads_end, kernel, exclude_pad, - rounding_type, pad_type); -} - // MaxPool layer template <> std::shared_ptr V10Parser::LayerCreator::createLayer( diff --git a/inference-engine/src/readers/ir_reader/ie_ir_parser.hpp b/inference-engine/src/readers/ir_reader/ie_ir_parser.hpp index c103eadc68479c..689881bf90c941 100644 --- a/inference-engine/src/readers/ir_reader/ie_ir_parser.hpp +++ b/inference-engine/src/readers/ir_reader/ie_ir_parser.hpp @@ -313,6 +313,12 @@ class V10Parser : public IParser { adapter.set(value); } + void on_adapter(const std::string& name, ngraph::ValueAccessor>& adapter) override { + std::vector value; + if (!getParameters(node.child("data"), name, value)) return; + adapter.set(value); + } + void on_adapter(const std::string& name, ngraph::ValueAccessor>& adapter) override { std::vector value; if (!getParameters(node.child("data"), name, value)) return; diff --git a/ngraph/core/src/op/broadcast.cpp b/ngraph/core/src/op/broadcast.cpp index 4f91709a84692b..a006797a568181 100644 --- a/ngraph/core/src/op/broadcast.cpp +++ b/ngraph/core/src/op/broadcast.cpp @@ -269,8 +269,28 @@ op::v1::Broadcast::Broadcast(const Output& arg, void op::v1::Broadcast::validate_and_infer_types() { - util::BroadcastBase::validate_and_infer_types(); + // m_type is deduced and not always explicitly stated, for cases where broadcast + // has 2 inputs its always NUMPY mode + if (m_broadcast_spec.m_type == AutoBroadcastType::NONE && get_input_size() < 3) + { + m_broadcast_spec.m_type = AutoBroadcastType::NUMPY; + } + + // Mocking axes_mapping input for cases that don't require it + if (m_broadcast_spec.m_type == AutoBroadcastType::NUMPY && get_input_size() < 3) + { + auto output = op::v0::Constant::create(element::u8, Shape{}, {0})->output(0); + set_argument(2, output); + } + // update the base class' mode spec + auto base_spec = to_broadcast_mode(m_broadcast_spec); + if (util::BroadcastBase::m_mode.m_type != base_spec.m_type) + { + util::BroadcastBase::m_mode = base_spec; + } + + util::BroadcastBase::validate_and_infer_types(); set_input_is_relevant_to_shape(0); // arg - Result element type set_input_is_relevant_to_shape(1); // target_shape - Result shape set_input_is_relevant_to_shape(2); // axes_mapping - Broadcast type diff --git a/ngraph/core/src/op/strided_slice.cpp b/ngraph/core/src/op/strided_slice.cpp index 8dc5ca05b976a5..6823acfb09d095 100644 --- a/ngraph/core/src/op/strided_slice.cpp +++ b/ngraph/core/src/op/strided_slice.cpp @@ -172,6 +172,14 @@ void op::v1::StridedSlice::validate_and_infer_types() ")."); } + // Fill up strides input with default strides if not set by this point. + if (get_input_size() < 4) + { + set_argument(3, + calculate_default_strides(get_input_node_ptr(1)->output(0), + get_input_node_ptr(2)->output(0))); + } + set_input_is_relevant_to_shape(1); set_input_is_relevant_to_shape(2); set_input_is_relevant_to_shape(3); From f2f5e99f9f91964a7d8b0a02ca9215fb6627c5b3 Mon Sep 17 00:00:00 2001 From: Andrew Bakalin Date: Thu, 17 Dec 2020 12:08:22 +0300 Subject: [PATCH 093/244] [IE][VPU][Tests] Support DTS for Select (#3604) * Support DTS + binary eltwise tests refactoring (avoid code duplication) --- .../dynamic_to_static_shape.cpp | 1 + ...mic_to_static_shape_binary_elementwise.cpp | 39 ++- ...mic_to_static_shape_binary_elementwise.cpp | 324 +++++++----------- .../subgraph_tests/dsr_binary_elementwise.cpp | 11 +- 4 files changed, 161 insertions(+), 214 deletions(-) diff --git a/inference-engine/src/vpu/common/src/ngraph/transformations/dynamic_to_static_shape.cpp b/inference-engine/src/vpu/common/src/ngraph/transformations/dynamic_to_static_shape.cpp index 79936780502899..6b7926bac03578 100644 --- a/inference-engine/src/vpu/common/src/ngraph/transformations/dynamic_to_static_shape.cpp +++ b/inference-engine/src/vpu/common/src/ngraph/transformations/dynamic_to_static_shape.cpp @@ -100,6 +100,7 @@ const Transformations& getDefaultTransformations() { {ngraph::opset3::Maximum::type_info, dynamicToStaticShapeBinaryEltwise}, {ngraph::opset3::Minimum::type_info, dynamicToStaticShapeBinaryEltwise}, {ngraph::opset3::Less::type_info, dynamicToStaticShapeBinaryEltwise}, + {ngraph::opset5::Select::type_info, dynamicToStaticShapeBinaryEltwise}, {ngraph::opset5::NonMaxSuppression::type_info, dynamicToStaticNonMaxSuppression}, {ngraph::opset3::NonZero::type_info, dynamicToStaticShapeNonZero}, {ngraph::opset3::TopK::type_info, dynamicToStaticShapeTopK}, diff --git a/inference-engine/src/vpu/common/src/ngraph/transformations/dynamic_to_static_shape_binary_elementwise.cpp b/inference-engine/src/vpu/common/src/ngraph/transformations/dynamic_to_static_shape_binary_elementwise.cpp index c6d7c763460a12..d1b4f2e9898151 100644 --- a/inference-engine/src/vpu/common/src/ngraph/transformations/dynamic_to_static_shape_binary_elementwise.cpp +++ b/inference-engine/src/vpu/common/src/ngraph/transformations/dynamic_to_static_shape_binary_elementwise.cpp @@ -10,32 +10,36 @@ #include "ngraph/graph_util.hpp" #include "ngraph/opsets/opset3.hpp" +#include "ngraph/opsets/opset5.hpp" +#include #include namespace vpu { -void dynamicToStaticShapeBinaryEltwise(std::shared_ptr eltwise) { - const auto lhsRank = eltwise->input_value(0).get_partial_shape().rank(); - const auto rhsRank = eltwise->input_value(1).get_partial_shape().rank(); +namespace { + +void processBinaryEltwise(std::shared_ptr eltwise, size_t lhsIndex, size_t rhsIndex) { + const auto lhsRank = eltwise->input_value(lhsIndex).get_partial_shape().rank(); + const auto rhsRank = eltwise->input_value(rhsIndex).get_partial_shape().rank(); const auto copied = eltwise->copy_with_new_inputs(eltwise->input_values()); - const auto lhsDSR = ngraph::as_type_ptr(eltwise->input_value(0).get_node_shared_ptr()); - const auto rhsDSR = ngraph::as_type_ptr(eltwise->input_value(1).get_node_shared_ptr()); + const auto lhsDSR = ngraph::as_type_ptr(eltwise->input_value(lhsIndex).get_node_shared_ptr()); + const auto rhsDSR = ngraph::as_type_ptr(eltwise->input_value(rhsIndex).get_node_shared_ptr()); VPU_THROW_UNLESS(lhsDSR || rhsDSR, "DynamicToStaticShape transformation for {} of type {} expects at least one DSR as input", - eltwise->get_friendly_name(), eltwise->get_type_info()); + eltwise->get_friendly_name(), eltwise->get_type_info()); if (lhsDSR && rhsDSR) { VPU_THROW_UNLESS(lhsDSR->get_input_element_type(1) == rhsDSR->get_input_element_type(1), - "DynamicToStaticShape transformation for {} of type {} expects equal shapes data types, actual {} vs {}", - eltwise->get_friendly_name(), eltwise->get_type_info(), - lhsDSR->get_input_element_type(1), rhsDSR->get_input_element_type(1)); + "DynamicToStaticShape transformation for {} of type {} expects equal shapes data types, actual {} vs {}", + eltwise->get_friendly_name(), eltwise->get_type_info(), + lhsDSR->get_input_element_type(1), rhsDSR->get_input_element_type(1)); } const auto shapeElementType = lhsDSR ? lhsDSR->get_input_element_type(1) : rhsDSR->get_input_element_type(1); - auto lhsInput = lhsDSR ? lhsDSR->input_value(1) : shapeToConstant(shapeElementType, eltwise->get_input_shape(0)); - auto rhsInput = rhsDSR ? rhsDSR->input_value(1) : shapeToConstant(shapeElementType, eltwise->get_input_shape(1)); + auto lhsInput = lhsDSR ? lhsDSR->input_value(1) : shapeToConstant(shapeElementType, eltwise->get_input_shape(lhsIndex)); + auto rhsInput = rhsDSR ? rhsDSR->input_value(1) : shapeToConstant(shapeElementType, eltwise->get_input_shape(rhsIndex)); const auto diff = std::abs(lhsRank.get_length() - rhsRank.get_length()); if (diff) { @@ -51,4 +55,17 @@ void dynamicToStaticShapeBinaryEltwise(std::shared_ptr eltwise) { ngraph::replace_node(std::move(eltwise), std::move(outDSR)); } +} // namespace + +void dynamicToStaticShapeBinaryEltwise(std::shared_ptr eltwise) { + if (eltwise->get_type_info() == ngraph::opset5::Select::type_info) { + processBinaryEltwise(eltwise, 1, 2); + } else { + VPU_THROW_UNLESS(eltwise->get_input_size() == 2, + "DynamicToStaticShape transformation for {} of type {} expects two inputs while {} were provided", + eltwise->get_friendly_name(), eltwise->get_type_info(), eltwise->get_input_size()); + processBinaryEltwise(eltwise, 0, 1); + } +} + } // namespace vpu diff --git a/inference-engine/tests/functional/plugin/myriad/ngraph/transformations/dynamic_to_static_shape_binary_elementwise.cpp b/inference-engine/tests/functional/plugin/myriad/ngraph/transformations/dynamic_to_static_shape_binary_elementwise.cpp index 111d12b0127f50..9628207d3c9815 100644 --- a/inference-engine/tests/functional/plugin/myriad/ngraph/transformations/dynamic_to_static_shape_binary_elementwise.cpp +++ b/inference-engine/tests/functional/plugin/myriad/ngraph/transformations/dynamic_to_static_shape_binary_elementwise.cpp @@ -3,6 +3,7 @@ // #include +#include #include #include @@ -17,24 +18,31 @@ namespace { +enum class TestShapeTypes { + ALL_DYNAMIC, + SINGLE_DSR +}; + using DataType = ngraph::element::Type_t; using DataDims = ngraph::Shape; -using refFunction = std::function (const DataType&, const ngraph::NodeTypeInfo&, const DataDims&, const DataDims&)>; +using refFunction = std::function ( + const DataType&, const ngraph::NodeTypeInfo&, const DataDims&, const DataDims&, TestShapeTypes)>; using EltwiseParams = std::tuple; class DynamicToStaticShapeEltwise: public CommonTestUtils::TestsCommon, public testing::WithParamInterface> { + ngraph::NodeTypeInfo, EltwiseParams, TestShapeTypes>> { public: void SetUp() override { const auto& dataType = std::get<0>(GetParam()); const auto& eltwiseType = std::get<1>(GetParam()); const auto& eltwiseParams = std::get<2>(GetParam()); + const auto& testShapeTypes = std::get<3>(GetParam()); - const auto& input0_shape = std::get<0>(eltwiseParams); - const auto& input1_shape = std::get<1>(eltwiseParams); + const auto& input0Shape = std::get<0>(eltwiseParams); + const auto& input1Shape = std::get<1>(eltwiseParams); - ngraph::helpers::CompareFunctions(*transform(dataType, eltwiseType, input0_shape, input1_shape), - *std::get<2>(eltwiseParams)(dataType, eltwiseType, input0_shape, input1_shape)); + ngraph::helpers::CompareFunctions(*transform(dataType, eltwiseType, input0Shape, input1Shape, testShapeTypes), + *std::get<2>(eltwiseParams)(dataType, eltwiseType, input0Shape, input1Shape, testShapeTypes)); } protected: @@ -42,27 +50,36 @@ class DynamicToStaticShapeEltwise: public CommonTestUtils::TestsCommon, public t const ngraph::element::Type_t& dataType, const ngraph::NodeTypeInfo& eltwiseType, const ngraph::Shape& dataDims0, - const ngraph::Shape& dataDims1) const { + const ngraph::Shape& dataDims1, + TestShapeTypes testShapeTypes) const { const auto input0 = std::make_shared(dataType, dataDims0); const auto input1 = std::make_shared(dataType, dataDims1); - const auto input0_dsr = std::make_shared(ngraph::element::i64, ngraph::Shape{dataDims0.size()}); - const auto input1_dsr = std::make_shared(ngraph::element::i64, ngraph::Shape{dataDims1.size()}); + const auto input0Dims = std::make_shared(ngraph::element::i64, ngraph::Shape{dataDims0.size()}); + const auto dsr0 = std::make_shared(input0, input0Dims); - const auto dsr0 = std::make_shared(input0, input0_dsr); - const auto dsr1 = std::make_shared(input1, input1_dsr); + ngraph::ParameterVector params{input0, input1, input0Dims}; - const auto eltwise = ngraph::helpers::getNodeSharedPtr(eltwiseType, {dsr0, dsr1}); + std::shared_ptr eltwiseInput1 = input1; + if (testShapeTypes == TestShapeTypes::ALL_DYNAMIC) { + const auto input1Dims = std::make_shared(ngraph::element::i64, + ngraph::Shape{dataDims1.size()}); + eltwiseInput1 = std::make_shared(input1, input1Dims); + params.push_back(input1Dims); + } + + const auto eltwise = buildEltwise(eltwiseType, {dsr0, eltwiseInput1}, params, testShapeTypes); const auto function = std::make_shared( ngraph::NodeVector{eltwise}, - ngraph::ParameterVector{input0, input1, input0_dsr, input1_dsr}, + params, "Actual"); eltwise->set_output_type(0, eltwise->get_input_element_type(0), ngraph::PartialShape::dynamic(eltwise->get_output_partial_shape(0).rank())); const auto transformations = vpu::Transformations{{eltwiseType, vpu::dynamicToStaticShapeBinaryEltwise}}; vpu::DynamicToStaticShape(transformations).run_on_function(function); + return function; } @@ -72,228 +89,156 @@ class DynamicToStaticShapeEltwise: public CommonTestUtils::TestsCommon, public t const ngraph::element::Type_t& dataType, const ngraph::NodeTypeInfo& eltwiseType, const ngraph::Shape& dataDims0, - const ngraph::Shape& dataDims1) { + const ngraph::Shape& dataDims1, + TestShapeTypes testShapeTypes) { // Data flow subgraph const auto input0 = std::make_shared(dataType, dataDims0); const auto input1 = std::make_shared(dataType, dataDims1); - const auto input0_dsr = std::make_shared(ngraph::element::i64, ngraph::Shape{dataDims0.size()}); - const auto input1_dsr = std::make_shared(ngraph::element::i64, ngraph::Shape{dataDims1.size()}); + const auto input0Dims = std::make_shared(ngraph::element::i64, ngraph::Shape{dataDims0.size()}); + const auto dsr0 = std::make_shared(input0, input0Dims); - const auto dsr0 = std::make_shared(input0, input0_dsr); - const auto dsr1 = std::make_shared(input1, input1_dsr); + ngraph::ParameterVector params{input0, input1, input0Dims}; - const auto eltwise = ngraph::helpers::getNodeSharedPtr(eltwiseType, {dsr0, dsr1}); + std::shared_ptr dims; + if (testShapeTypes == TestShapeTypes:: ALL_DYNAMIC) { + params.push_back(std::make_shared(ngraph::element::i64, ngraph::Shape{dataDims1.size()})); + dims = params.back(); + } else { + dims = ngraph::opset3::Constant::create(ngraph::element::i64, {dataDims1.size()}, dataDims1); + } - // Shape infer subgraph - const auto maximum = std::make_shared(input0_dsr, input1_dsr); - const auto dsr_final = std::make_shared(eltwise, maximum); - - const auto function = std::make_shared( - ngraph::NodeVector{dsr_final}, - ngraph::ParameterVector{input0, input1, input0_dsr, input1_dsr}, - "Actual"); + std::shared_ptr eltwiseInput1 = input1; + if (testShapeTypes == TestShapeTypes::ALL_DYNAMIC) { + eltwiseInput1 = std::make_shared(input1, dims); + } - return function; - } - - static - std::shared_ptr reference_broadcast_left( - const ngraph::element::Type_t& dataType, - const ngraph::NodeTypeInfo& eltwiseType, - const ngraph::Shape& dataDims0, - const ngraph::Shape& dataDims1) { - // Data flow subgraph - const auto input0 = std::make_shared(dataType, dataDims0); - const auto input1 = std::make_shared(dataType, dataDims1); - - const auto input0_dsr = std::make_shared(ngraph::element::i64, ngraph::Shape{dataDims0.size()}); - const auto input1_dsr = std::make_shared(ngraph::element::i64, ngraph::Shape{dataDims1.size()}); - - const auto dsr0 = std::make_shared(input0, input0_dsr); - const auto dsr1 = std::make_shared(input1, input1_dsr); - - const auto eltwise = ngraph::helpers::getNodeSharedPtr(eltwiseType, {dsr0, dsr1}); + const auto eltwise = buildEltwise(eltwiseType, {dsr0, eltwiseInput1}, params, testShapeTypes); // Shape infer subgraph - const auto broadcast_const = ngraph::opset3::Constant::create(ngraph::element::i64, {dataDims1.size() - dataDims0.size()}, {1}); - const auto concat = std::make_shared(ngraph::OutputVector{broadcast_const, input0_dsr}, 0); - const auto maximum = std::make_shared(concat, input1_dsr); + const auto maximum = std::make_shared(input0Dims, dims); const auto dsr_final = std::make_shared(eltwise, maximum); const auto function = std::make_shared( ngraph::NodeVector{dsr_final}, - ngraph::ParameterVector{input0, input1, input0_dsr, input1_dsr}, + params, "Actual"); return function; } static - std::shared_ptr reference_broadcast_right( + std::shared_ptr reference_broadcast_left( const ngraph::element::Type_t& dataType, const ngraph::NodeTypeInfo& eltwiseType, const ngraph::Shape& dataDims0, - const ngraph::Shape& dataDims1) { + const ngraph::Shape& dataDims1, + TestShapeTypes testShapeTypes) { // Data flow subgraph const auto input0 = std::make_shared(dataType, dataDims0); const auto input1 = std::make_shared(dataType, dataDims1); - const auto input0_dsr = std::make_shared(ngraph::element::i64, ngraph::Shape{dataDims0.size()}); - const auto input1_dsr = std::make_shared(ngraph::element::i64, ngraph::Shape{dataDims1.size()}); + const auto input0Dims = std::make_shared(ngraph::element::i64, ngraph::Shape{dataDims0.size()}); + const auto dsr0 = std::make_shared(input0, input0Dims); - const auto dsr0 = std::make_shared(input0, input0_dsr); - const auto dsr1 = std::make_shared(input1, input1_dsr); + ngraph::ParameterVector params{input0, input1, input0Dims}; - const auto eltwise = ngraph::helpers::getNodeSharedPtr(eltwiseType, {dsr0, dsr1}); + std::shared_ptr dims; + if (testShapeTypes == TestShapeTypes::ALL_DYNAMIC) { + params.push_back(std::make_shared(ngraph::element::i64, ngraph::Shape{dataDims1.size()})); + dims = params.back(); + } else { + dims = ngraph::opset3::Constant::create(ngraph::element::i64, {dataDims1.size()}, dataDims1); + } - // Shape infer subgraph - const auto broadcast_const = ngraph::opset3::Constant::create(ngraph::element::i64, {dataDims0.size() - dataDims1.size()}, {1}); - const auto concat = std::make_shared(ngraph::OutputVector{broadcast_const, input1_dsr}, 0); - const auto maximum = std::make_shared(input0_dsr, concat); - const auto dsr_final = std::make_shared(eltwise, maximum); + std::shared_ptr eltwiseInput1 = input1; + if (testShapeTypes == TestShapeTypes::ALL_DYNAMIC) { + eltwiseInput1 = std::make_shared(input1, dims); + } - const auto function = std::make_shared( - ngraph::NodeVector{dsr_final}, - ngraph::ParameterVector{input0, input1, input0_dsr, input1_dsr}, - "Actual"); + const auto eltwise = buildEltwise(eltwiseType, {dsr0, eltwiseInput1}, params, testShapeTypes); - return function; - } -}; - -class DynamicToStaticShapeEltwiseSingleDSR: public CommonTestUtils::TestsCommon, public testing::WithParamInterface> { -public: - void SetUp() override { - const auto& dataType = std::get<0>(GetParam()); - const auto& eltwiseType = std::get<1>(GetParam()); - const auto& eltwiseParams = std::get<2>(GetParam()); - - const auto& input0_shape = std::get<0>(eltwiseParams); - const auto& input1_shape = std::get<1>(eltwiseParams); - - ngraph::helpers::CompareFunctions(*transform(dataType, eltwiseType, input0_shape, input1_shape), - *std::get<2>(eltwiseParams)(dataType, eltwiseType, input0_shape, input1_shape)); - } - -protected: - std::shared_ptr transform( - const ngraph::element::Type_t& dataType, - const ngraph::NodeTypeInfo& eltwiseType, - const ngraph::Shape& dataDims0, - const ngraph::Shape& dataDims1) const { - const auto input0 = std::make_shared(dataType, dataDims0); - const auto input1 = std::make_shared(dataType, dataDims1); - - const auto input0_dsr = std::make_shared(ngraph::element::i64, ngraph::Shape{dataDims0.size()}); - - const auto dsr0 = std::make_shared(input0, input0_dsr); - - const auto eltwise = ngraph::helpers::getNodeSharedPtr(eltwiseType, {dsr0, input1}); + // Shape infer subgraph + const auto broadcastConst = ngraph::opset3::Constant::create(ngraph::element::i64, {dataDims1.size() - dataDims0.size()}, {1}); + const auto concat = std::make_shared(ngraph::OutputVector{broadcastConst, input0Dims}, 0); + const auto maximum = std::make_shared(concat, dims); + const auto dsrFinal = std::make_shared(eltwise, maximum); const auto function = std::make_shared( - ngraph::NodeVector{eltwise}, - ngraph::ParameterVector{input0, input1, input0_dsr}, + ngraph::NodeVector{dsrFinal}, + params, "Actual"); - eltwise->set_output_type(0, eltwise->get_input_element_type(0), ngraph::PartialShape::dynamic(eltwise->get_output_partial_shape(0).rank())); - - const auto transformations = vpu::Transformations{{eltwiseType, vpu::dynamicToStaticShapeBinaryEltwise}}; - vpu::DynamicToStaticShape(transformations).run_on_function(function); return function; } -public: static - std::shared_ptr reference_simple( + std::shared_ptr reference_broadcast_right( const ngraph::element::Type_t& dataType, const ngraph::NodeTypeInfo& eltwiseType, const ngraph::Shape& dataDims0, - const ngraph::Shape& dataDims1) { + const ngraph::Shape& dataDims1, + TestShapeTypes testShapeTypes) { // Data flow subgraph const auto input0 = std::make_shared(dataType, dataDims0); const auto input1 = std::make_shared(dataType, dataDims1); - const auto input0_dsr = std::make_shared(ngraph::element::i64, ngraph::Shape{dataDims0.size()}); - const auto input1_const = ngraph::opset3::Constant::create(ngraph::element::i64, {dataDims1.size()}, dataDims1); + const auto input0Dims = std::make_shared(ngraph::element::i64, ngraph::Shape{dataDims0.size()}); + const auto dsr0 = std::make_shared(input0, input0Dims); - const auto dsr0 = std::make_shared(input0, input0_dsr); + ngraph::ParameterVector params{input0, input1, input0Dims}; - const auto eltwise = ngraph::helpers::getNodeSharedPtr(eltwiseType, {dsr0, input1}); - - // Shape infer subgraph - const auto maximum = std::make_shared(input0_dsr, input1_const); - const auto dsr_final = std::make_shared(eltwise, maximum); + std::shared_ptr dims; + if (testShapeTypes == TestShapeTypes::ALL_DYNAMIC) { + params.push_back(std::make_shared(ngraph::element::i64, ngraph::Shape{dataDims1.size()})); + dims = params.back(); + } else { + dims = ngraph::opset3::Constant::create(ngraph::element::i64, {dataDims1.size()}, dataDims1); + } - const auto function = std::make_shared( - ngraph::NodeVector{dsr_final}, - ngraph::ParameterVector{input0, input1, input0_dsr}, - "Actual"); + std::shared_ptr eltwiseInput1 = input1; + if (testShapeTypes == TestShapeTypes::ALL_DYNAMIC) { + eltwiseInput1 = std::make_shared(input1, dims); + } - return function; - } - - static - std::shared_ptr reference_broadcast_left( - const ngraph::element::Type_t& dataType, - const ngraph::NodeTypeInfo& eltwiseType, - const ngraph::Shape& dataDims0, - const ngraph::Shape& dataDims1) { - // Data flow subgraph - const auto input0 = std::make_shared(dataType, dataDims0); - const auto input1 = std::make_shared(dataType, dataDims1); - - const auto input0_dsr = std::make_shared(ngraph::element::i64, ngraph::Shape{dataDims0.size()}); - const auto input1_const = ngraph::opset3::Constant::create(ngraph::element::i64, {dataDims1.size()}, dataDims1); - - const auto dsr0 = std::make_shared(input0, input0_dsr); - - const auto eltwise = ngraph::helpers::getNodeSharedPtr(eltwiseType, {dsr0, input1}); + const auto eltwise = buildEltwise(eltwiseType, {dsr0, eltwiseInput1}, params, testShapeTypes); // Shape infer subgraph - const auto broadcast_const = ngraph::opset3::Constant::create(ngraph::element::i64, {dataDims1.size() - dataDims0.size()}, {1}); - const auto concat = std::make_shared(ngraph::OutputVector{broadcast_const, input0_dsr}, 0); - const auto maximum = std::make_shared(concat, input1_const); - const auto dsr_final = std::make_shared(eltwise, maximum); + const auto broadcastConst = ngraph::opset3::Constant::create(ngraph::element::i64, {dataDims0.size() - dataDims1.size()}, {1}); + const auto concat = std::make_shared(ngraph::OutputVector{broadcastConst, dims}, 0); + const auto maximum = std::make_shared(input0Dims, concat); + const auto dsrFinal = std::make_shared(eltwise, maximum); const auto function = std::make_shared( - ngraph::NodeVector{dsr_final}, - ngraph::ParameterVector{input0, input1, input0_dsr}, + ngraph::NodeVector{dsrFinal}, + params, "Actual"); return function; } +private: static - std::shared_ptr reference_broadcast_right( - const ngraph::element::Type_t& dataType, + std::shared_ptr buildEltwise( const ngraph::NodeTypeInfo& eltwiseType, - const ngraph::Shape& dataDims0, - const ngraph::Shape& dataDims1) { - // Data flow subgraph - const auto input0 = std::make_shared(dataType, dataDims0); - const auto input1 = std::make_shared(dataType, dataDims1); - - const auto input0_dsr = std::make_shared(ngraph::element::i64, ngraph::Shape{dataDims0.size()}); - const auto input1_const = ngraph::opset3::Constant::create(ngraph::element::i64, {dataDims1.size()}, dataDims1); - - const auto dsr0 = std::make_shared(input0, input0_dsr); - - const auto eltwise = ngraph::helpers::getNodeSharedPtr(eltwiseType, {dsr0, input1}); - - // Shape infer subgraph - const auto broadcast_const = ngraph::opset3::Constant::create(ngraph::element::i64, {dataDims0.size() - dataDims1.size()}, {1}); - const auto concat = std::make_shared(ngraph::OutputVector{broadcast_const, input1_const}, 0); - const auto maximum = std::make_shared(input0_dsr, concat); - const auto dsr_final = std::make_shared(eltwise, maximum); - - const auto function = std::make_shared( - ngraph::NodeVector{dsr_final}, - ngraph::ParameterVector{input0, input1, input0_dsr}, - "Actual"); - - return function; + const ngraph::OutputVector& inputs, + ngraph::ParameterVector& params, + TestShapeTypes testShapeTypes) { + if (eltwiseType == ngraph::opset5::Select::type_info) { + params.push_back(std::make_shared( + ngraph::element::boolean, + ngraph::Shape{inputs.front().get_shape()})); + std::shared_ptr condInput = params.back(); + if (testShapeTypes == TestShapeTypes::ALL_DYNAMIC) { + params.push_back(std::make_shared( + ngraph::element::i64, + ngraph::Shape{static_cast(inputs.front().get_partial_shape().rank().get_length())})); + condInput = std::make_shared(condInput, params.back()); + } + return ngraph::helpers::getNodeSharedPtr(eltwiseType, {condInput, inputs[0], inputs[1]}); + } else { + return ngraph::helpers::getNodeSharedPtr(eltwiseType, inputs); + } } }; @@ -317,37 +262,14 @@ INSTANTIATE_TEST_CASE_P(smoke_EltwiseBroadcast, DynamicToStaticShapeEltwise, tes ngraph::opset3::Subtract::type_info, ngraph::opset3::Maximum::type_info, ngraph::opset3::Minimum::type_info, - ngraph::opset3::Less::type_info), + ngraph::opset3::Less::type_info, + ngraph::opset5::Select::type_info), testing::Values( EltwiseParams{DataDims{1000}, DataDims{1}, DynamicToStaticShapeEltwise::reference_simple}, EltwiseParams{DataDims{1000, 1, 1}, DataDims{1000, 1, 1}, DynamicToStaticShapeEltwise::reference_simple}, EltwiseParams{DataDims{2, 1000}, DataDims{3, 1, 1}, DynamicToStaticShapeEltwise::reference_broadcast_left}, - EltwiseParams{DataDims{1000, 64}, DataDims{1}, DynamicToStaticShapeEltwise::reference_broadcast_right}))); + EltwiseParams{DataDims{1000, 64}, DataDims{1}, DynamicToStaticShapeEltwise::reference_broadcast_right}), + testing::Values(TestShapeTypes::ALL_DYNAMIC, TestShapeTypes::SINGLE_DSR) +)); -TEST_P(DynamicToStaticShapeEltwiseSingleDSR, CompareFunctions) { -} - -INSTANTIATE_TEST_CASE_P(smoke_EltwiseBroadcastSingleDSR, DynamicToStaticShapeEltwiseSingleDSR, testing::Combine( - testing::Values( - ngraph::element::f16, - ngraph::element::f32, - ngraph::element::i32, - ngraph::element::i64, - ngraph::element::u8), - testing::Values( - ngraph::opset3::Add::type_info, - ngraph::opset3::Divide::type_info, - ngraph::opset3::Equal::type_info, - ngraph::opset3::Greater::type_info, - ngraph::opset3::Power::type_info, - ngraph::opset3::Multiply::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}, - EltwiseParams{DataDims{2, 1000}, DataDims{3, 1, 1}, DynamicToStaticShapeEltwiseSingleDSR::reference_broadcast_left}, - EltwiseParams{DataDims{1000, 64}, DataDims{1}, DynamicToStaticShapeEltwiseSingleDSR::reference_broadcast_right}))); } // namespace \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_binary_elementwise.cpp b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_binary_elementwise.cpp index ee159c6db3e661..2df9b2fe8d2526 100644 --- a/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_binary_elementwise.cpp +++ b/inference-engine/tests/functional/plugin/myriad/subgraph_tests/dsr_binary_elementwise.cpp @@ -37,7 +37,10 @@ class DSR_BinaryElementwiseBothDSR : public testing::WithParamInterface binaryEltwiseTypeVector = { ngraph::opset3::Equal::type_info, ngraph::opset3::Greater::type_info, ngraph::opset3::Power::type_info, + ngraph::opset5::Select::type_info, }; static const std::set doNotSupportI32 = { From b91047e9fe0963c027f1ce78bd2ab2700b2f036b Mon Sep 17 00:00:00 2001 From: Lukasz Debski Date: Thu, 17 Dec 2020 10:15:59 +0100 Subject: [PATCH 094/244] [IE CLDNN] Fully Connected layer 3d support (#2709) --- .../src/cldnn_engine/cldnn_engine.cpp | 7 ++ .../src/cldnn_engine/cldnn_program.cpp | 9 +- .../thirdparty/clDNN/api/fully_connected.hpp | 14 ++- .../fully_connected_kernel_bf_tiled.cpp | 72 ++++++++++-- .../fully_connected_kernel_bfyx_ref.cpp | 17 ++- .../fully_connected_kernel_mmad.cpp | 53 +++++++-- .../cl_kernels/fully_connected_gpu_MMAD.cl | 17 ++- .../fully_connected_gpu_bf_tiled.cl | 63 ++++++----- .../fully_connected_gpu_bfyx_ref.cl | 26 ++++- .../thirdparty/clDNN/src/fully_connected.cpp | 7 ++ .../clDNN/src/gpu/fully_connected_gpu.cpp | 5 +- .../test_cases/fully_connected_gpu_test.cpp | 103 ++++++++++++++++++ .../tests/test_cases/fusings_gpu_test.cpp | 98 +++++++++++++---- .../clDNN/tests/test_utils/network_test.h | 47 +++++++- 14 files changed, 453 insertions(+), 85 deletions(-) diff --git a/inference-engine/src/cldnn_engine/cldnn_engine.cpp b/inference-engine/src/cldnn_engine/cldnn_engine.cpp index 41126fa4289576..a1d89d7b6b149f 100644 --- a/inference-engine/src/cldnn_engine/cldnn_engine.cpp +++ b/inference-engine/src/cldnn_engine/cldnn_engine.cpp @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -241,11 +242,17 @@ InferenceEngine::ICNNNetwork::Ptr clDNNEngine::CloneAndTransformNetwork(const In transformer.transform(nGraphFunc); } + const auto reshape_fc_callback = [](const std::shared_ptr& node) -> bool { + return node->input_value(0).get_shape().size() <= 3lu; + }; + { ngraph::pass::Manager manager = ngraph::pass::Manager(); manager.register_pass(); manager.register_pass(); manager.set_callback(transformations_callback); + auto pass_config = manager.get_pass_config(); + pass_config->set_callback(reshape_fc_callback); manager.run_passes(nGraphFunc); } diff --git a/inference-engine/src/cldnn_engine/cldnn_program.cpp b/inference-engine/src/cldnn_engine/cldnn_program.cpp index 535821e187a321..1e08c0893d4b17 100644 --- a/inference-engine/src/cldnn_engine/cldnn_program.cpp +++ b/inference-engine/src/cldnn_engine/cldnn_program.cpp @@ -1084,6 +1084,8 @@ void Program::CreateWeightAndBiasPrimitives(cldnn::topology& topology, case FullyConnected: { groupSize = 1; outFeatures = static_cast(layer->outData[0]->getTensorDesc().getDims()[1]); + if (in0dims.size() == 3) + outFeatures = static_cast(layer->outData[0]->getTensorDesc().getDims()[2]); switch (in0dims.size()) { case 4: weightDimsVec = { TensorValue(layer->outData[0]->getTensorDesc().getDims().back()), @@ -1093,8 +1095,8 @@ void Program::CreateWeightAndBiasPrimitives(cldnn::topology& topology, break; case 3: weightDimsVec = { TensorValue(layer->outData[0]->getTensorDesc().getDims().back()), - TensorValue(in0dims[1]), TensorValue(in0dims[2]), + 1, 1 }; break; case 2: @@ -2927,11 +2929,14 @@ void Program::CreateFullyConnectedPrimitive(cldnn::topology& topology, Inference IE_ASSERT(weightPrimID.size() == 1); IE_ASSERT(biasPrimID.size() <= 1); + auto outDims = layer->outData[0]->getTensorDesc().getDims().size(); auto fcPrim = cldnn::fully_connected(fcLayerName, inputPrimitives[0], weightPrimID[0], biasPrimID.empty() ? "" : biasPrimID[0], - DataTypeFromPrecision(fcLayer->outData[0]->getTensorDesc().getPrecision())); + DataTypeFromPrecision(fcLayer->outData[0]->getTensorDesc().getPrecision()), + cldnn::padding(), + layer->outData[0]->getTensorDesc().getDims().size()); topology.add(fcPrim); diff --git a/inference-engine/thirdparty/clDNN/api/fully_connected.hpp b/inference-engine/thirdparty/clDNN/api/fully_connected.hpp index 3c2f22e26eb5e6..0801e8fd03acd4 100644 --- a/inference-engine/thirdparty/clDNN/api/fully_connected.hpp +++ b/inference-engine/thirdparty/clDNN/api/fully_connected.hpp @@ -61,10 +61,12 @@ struct fully_connected : public primitive_base { const primitive_id& input, const primitive_id& weights, const primitive_id& bias = "", - const padding& output_padding = padding()) + const padding& output_padding = padding(), + const size_t input_size = 2) : primitive_base(id, {input}, output_padding), weights(weights), - bias(bias) + bias(bias), + input_size(input_size) {} /// @brief Constructs fully connected layer. @@ -77,16 +79,20 @@ struct fully_connected : public primitive_base { const primitive_id& weights, const primitive_id& bias, const data_types data_type, - const padding& output_padding = padding()) + const padding& output_padding = padding(), + const size_t input_size = 2) : primitive_base(id, { input }, output_padding, optional_data_type{data_type}), weights(weights), - bias(bias) + bias(bias), + input_size(input_size) {} /// @brief Primitive id containing weights data. primitive_id weights; /// @brief Primitive id containing bias data. primitive_id bias; + /// @brief Primitive dimension size. + size_t input_size; protected: std::vector> get_dependencies() const override { diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/fully_connected/fully_connected_kernel_bf_tiled.cpp b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/fully_connected/fully_connected_kernel_bf_tiled.cpp index 858c43b4c56c29..69cfdc0f1d02b9 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/fully_connected/fully_connected_kernel_bf_tiled.cpp +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/fully_connected/fully_connected_kernel_bf_tiled.cpp @@ -52,6 +52,7 @@ ParamsKey FullyConnected_bf_tiled::GetSupportedKey() const { k.EnableInputLayout(DataLayout::bf); k.EnableInputLayout(DataLayout::bfyx); k.EnableOutputLayout(DataLayout::bf); + k.EnableOutputLayout(DataLayout::bfyx); k.EnableBatching(); k.EnableBiasPerFeature(); k.EnableNonBiasTerm(); @@ -68,11 +69,17 @@ bool FullyConnected_bf_tiled::Validate(const Params& params, const optional_para auto& fc_params = static_cast(params); auto& input = fc_params.inputs[0]; + auto& output = fc_params.output; // Block reads must be aligned to 4 bytes, for fp16 we can correct for offset misalignment, // but we need to ensure that batch pitch preserves alignment. - if (input.GetDType() == Datatype::F16 && input.Batch().pitch % 2 != 0 && input.Batch().v > 1) - return false; + if (input.GetDType() == Datatype::F16) { + if (input.Batch().pitch % 2 != 0 && input.Batch().v > 1) + return false; + // for 3d case we have to check feature alignment as well + if (output.GetLayout() == DataLayout::bfyx && input.Feature().pitch % 2 != 0 && input.Feature().v > 1) + return false; + } if (input.GetLayout() == DataLayout::bfyx) { // Padding on input is not supported. @@ -83,6 +90,12 @@ bool FullyConnected_bf_tiled::Validate(const Params& params, const optional_para return false; } + // We don't support 4d output + if (fc_params.output.GetLayout() == DataLayout::bfyx) { + if (input.X().v > 1) + return false; + } + return true; } @@ -127,13 +140,20 @@ struct TuneParamsSelector { bool TuneParamsSelector::VerifyTuneParams(const fully_connected_params& params, const tune_params& tparams) { // Check divisibility by dispatch tile sizes. - if (params.output.Batch().v % (tparams.tile_b * tparams.dispatch_bsv) != 0) + size_t output_f = params.output.Feature().v; + size_t output_b = params.output.Batch().v; + if (params.output.GetLayout() == DataLayout::bfyx) { + output_b *= params.output.Feature().v; + output_f = params.output.Y().v; + } + + if (output_b % (tparams.tile_b * tparams.dispatch_bsv) != 0) return false; - if (CeilDiv(params.output.Feature().v, tparams.tile_ofm * simd) % tparams.dispatch_fsv != 0) + if (CeilDiv(output_f, tparams.tile_ofm * simd) % tparams.dispatch_fsv != 0) return false; // Same result can be achieved with smaller tile_ofm. - if (params.output.Feature().v <= (tparams.tile_ofm / 2) * simd) + if (output_f <= (tparams.tile_ofm / 2) * simd) return false; // No weights layout for such huge tile ofm. if (tparams.tile_ofm * simd > 64) @@ -163,6 +183,12 @@ FullyConnected_bf_tiled::GetAutoTuneParams(const fully_connected_params& params, size_t batch = params.output.Batch().v; size_t output_f = params.output.Feature().v; + + // 3d output + if (params.output.GetLayout() == DataLayout::bfyx) { + batch *= params.output.Feature().v; + output_f = params.output.Y().v; + } Datatype dtype = params.inputs[0].GetDType(); auto selector = TuneParamsSelector(params); @@ -219,6 +245,10 @@ FullyConnected_bf_tiled::SetDefault(const fully_connected_params& params, int au size_t feature_threads = CeilDiv(params.output.Feature().v, tparams.tile_ofm * simd); size_t batch_threads = params.output.Batch().v / tparams.tile_b; + if (params.output.GetLayout() == DataLayout::bfyx) { + feature_threads = CeilDiv(params.output.Y().v, tparams.tile_ofm * simd); + batch_threads = (params.output.Batch().v * params.output.Feature().v) / tparams.tile_b; + } dispatchData.gws[0] = feature_threads * batch_threads * simd; dispatchData.gws[1] = 1; @@ -252,7 +282,7 @@ JitConstants FullyConnected_bf_tiled::GetJitConstants(const fully_connected_para jit.Merge(MakeConstantLoopUnrollJitConstants(dispatchData.tile_m)); - bool realign_fp16_offset = params.inputs[0].GetDType() == Datatype::F16 && params.output.GetFirstElementOffset() % 2 != 0; + bool realign_fp16_offset = params.inputs[0].GetDType() == Datatype::F16 && params.inputs[0].GetFirstElementOffset() % 2 != 0; jit.AddConstant(MakeJitConstant("REALIGN_FP16_OFFSET", realign_fp16_offset)); auto activation_dt = GetActivationType(params); @@ -260,13 +290,32 @@ JitConstants FullyConnected_bf_tiled::GetJitConstants(const fully_connected_para jit.Merge(MakeTypeJitConstants(activation_dt, "ACTIVATION")); jit.Merge(MakeActivationJitConstants(params.activations, activation_dt, "_TYPED")); + // for 3d output we are treating spatial as features + if (params.output.GetLayout() == DataLayout::bfyx) { + jit.AddConstant(MakeJitConstant("TILE_OUT_F_NUM", params.output.Y().v)); + jit.AddConstant(MakeJitConstant("TILE_OUT_F_PITCH", params.output.Y().pitch)); + jit.AddConstant(MakeJitConstant("TILE_IN_B_PITCH", params.inputs[0].Feature().pitch)); + jit.AddConstant(MakeJitConstant("TILE_OUT_B_PITCH", params.output.Feature().pitch)); + jit.AddConstant(MakeJitConstant("OUTPUT_3D", true)); + } + else { + jit.AddConstant(MakeJitConstant("TILE_OUT_F_NUM", params.output.Feature().v)); + jit.AddConstant(MakeJitConstant("TILE_OUT_F_PITCH", params.output.Feature().pitch)); + jit.AddConstant(MakeJitConstant("TILE_IN_B_PITCH", params.inputs[0].Batch().pitch)); + jit.AddConstant(MakeJitConstant("TILE_OUT_B_PITCH", params.output.Batch().pitch)); + } + + size_t output_f = params.output.GetLayout() == DataLayout::bfyx ? params.output.Y().v : params.output.Feature().v; if (!params.fused_ops.empty()) { auto boundary_check = BoundaryCheck::DISABLED; - if (params.output.Feature().v % (dispatchData.tile_n * simd) != 0) + if (output_f % (dispatchData.tile_n * simd) != 0) boundary_check = BoundaryCheck::ENABLED; + std::vector idx_order = {"(out_b + bi)", "out_f", "0", "0"}; + if (params.output.GetLayout() == DataLayout::bfyx) + idx_order = {"(out_b + bi) % OUTPUT_BATCH_NUM", "(out_b + bi) / OUTPUT_BATCH_NUM", "out_f", "0"}; FusedOpsConfiguration conf = { "", - {"(out_b + bi)", "out_f", "0", "0"}, + idx_order, "activated[bi]", activation_dt, dispatchData.tile_n, @@ -284,6 +333,9 @@ KernelsData FullyConnected_bf_tiled::GetTunedKernelsDataByIndex(const Params &pa const optional_params &options, const int autoTuneIndex) const { auto& fc_params = static_cast(params); + size_t output_b = fc_params.output.Batch().v; + if (fc_params.output.GetLayout() == DataLayout::bfyx) + output_b *= fc_params.output.Feature().v; if (autoTuneIndex >= 0 && autoTuneIndex < (int)auto_tune_params.size() && !TuneParamsSelector::VerifyTuneParams(fc_params, auto_tune_params[autoTuneIndex])) @@ -298,9 +350,9 @@ KernelsData FullyConnected_bf_tiled::GetTunedKernelsDataByIndex(const Params &pa weights_layout = WeightsLayout::os_iyx_osv64; float estimated_time = DONT_USE_IF_HAVE_SOMETHING_ELSE; - if (fc_params.output.Batch().v > 1 && fc_params.inputs[0].GetDType() == Datatype::F32) + if (output_b > 1 && fc_params.inputs[0].GetDType() == Datatype::F32) estimated_time = FORCE_PRIORITY_3; - if (fc_params.output.Batch().v > 1 && fc_params.inputs[0].GetDType() == Datatype::F16) + if (output_b > 1 && fc_params.inputs[0].GetDType() == Datatype::F16) estimated_time = FORCE_PRIORITY_4; return GetCommonKernelsData(params, diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/fully_connected/fully_connected_kernel_bfyx_ref.cpp b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/fully_connected/fully_connected_kernel_bfyx_ref.cpp index 4937335e345f51..5665f3db65b5e9 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/fully_connected/fully_connected_kernel_bfyx_ref.cpp +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/fully_connected/fully_connected_kernel_bfyx_ref.cpp @@ -34,8 +34,10 @@ ParamsKey FullyConnected_bfyx_Ref::GetSupportedKey() const { k.EnableDifferentInputWeightsTypes(); k.EnableDifferentTypes(); k.EnableInputLayout(DataLayout::bf); + k.EnableInputLayout(DataLayout::bfyx); k.EnableOutputLayout(DataLayout::bf); k.EnableOutputLayout(DataLayout::fb); + k.EnableOutputLayout(DataLayout::bfyx); k.EnableBiasPerOutput(); k.EnableBiasPerFeature(); k.EnableNonBiasTerm(); @@ -50,7 +52,11 @@ FullyConnected_bfyx_Ref::DispatchData FullyConnected_bfyx_Ref::SetDefault(const int) const { auto dispatchData = Parent::SetDefault(params); - dispatchData.gws = { params.output.Feature().v, params.output.Batch().v, 1 }; + std::vector global = {params.output.Feature().v, params.output.Batch().v, 1}; + if (params.output.GetLayout() == DataLayout::bfyx) + global = {params.output.Feature().v * params.output.Y().v, params.output.Batch().v, 1}; + + dispatchData.gws = global; dispatchData.lws = GetOptimalLocalWorkGroupSizes(dispatchData.gws, params.engineInfo); return dispatchData; @@ -69,13 +75,14 @@ JitConstants FullyConnected_bfyx_Ref::GetJitConstants(const fully_connected_para accumulator_dt = Datatype::F32; activation_dt = Datatype::F32; } - + if (params.output.GetLayout() == DataLayout::bfyx) + jit.AddConstant(MakeJitConstant("OUTPUT_3D", true)); jit.Merge(MakeTypeJitConstants(activation_dt, "ACTIVATION")); jit.Merge(MakeTypeJitConstants(accumulator_dt, "ACCUMULATOR")); jit.Merge(MakeActivationJitConstants(params.activations, activation_dt, "_TYPED")); if (!params.fused_ops.empty()) { - FusedOpsConfiguration conf = { "", {"b", "ofm", "y", "x"}, "dequantized", activation_dt, 1 }; + FusedOpsConfiguration conf = { "", {"b", "ofm", "oym", "0"}, "dequantized", activation_dt, 1 }; jit.Merge(MakeFusedOpsJitConstants(params, { conf })); } return jit; @@ -126,6 +133,10 @@ bool FullyConnected_bfyx_Ref::Validate(const Params& params, const optional_para if (!is_quantization && !has_fused_op) return false; + // We don't support 4d output + if (fc_params.output.GetLayout() == DataLayout::bfyx && fc_params.output.X().v > 1) + return false; + return true; } diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/fully_connected/fully_connected_kernel_mmad.cpp b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/fully_connected/fully_connected_kernel_mmad.cpp index 306d4b60d23d83..6c7890ce77aeae 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/fully_connected/fully_connected_kernel_mmad.cpp +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/fully_connected/fully_connected_kernel_mmad.cpp @@ -66,9 +66,21 @@ FullyConnectedKernelMMAD::FullyConnectedTuningData FullyConnectedKernelMMAD::Get const auto& input = params.inputs[0]; const auto& output = params.output; + size_t input_feature = input.Feature().v; + size_t input_batch = input.Batch().v; + size_t output_feature = output.Feature().v; + size_t output_batch = output.Batch().v; + // for 3d case + if (output.GetLayout() == DataLayout::bfyx) { + input_batch *= input.Feature().v; + input_feature = input.Y().v; + output_batch *= output.Feature().v; + output_feature = output.Y().v; + } tuning_data.sub_group_size = 8; - if (input.X().v == 1 && input.Y().v == 1 && input.Z().v == 1 && input.Batch().v == 1) { + if (input.X().v == 1 && input.Z().v == 1 && input.Batch().v == 1 && + ((input.Y().v == 1 && output.GetLayout() != DataLayout::bfyx) || (input.Feature().v == 1 && output.GetLayout() == DataLayout::bfyx)) ) { // Known cases for TGL where simd16 works better than simd8 bool simd16_exception_1 = input.Feature().v == 25088 && output.Feature().v == 512; bool simd16_exception_2 = input.Feature().v == 21504 && output.Feature().v == 512; @@ -79,14 +91,14 @@ FullyConnectedKernelMMAD::FullyConnectedTuningData FullyConnectedKernelMMAD::Get size_t sub_group_pack_size = tuning_data.sub_group_size * tuning_data.pack_size; - tuning_data.feature_blocks_count = input.GetLayout() == DataLayout::bfyx && input.Feature().v % sub_group_pack_size != 0 ? - input.Feature().v / sub_group_pack_size : + tuning_data.feature_blocks_count = input.GetLayout() == DataLayout::bfyx && input_feature % sub_group_pack_size != 0 ? + input_feature / sub_group_pack_size : input.GetLayout() != DataLayout::bfyx && tuning_data.sub_group_size == 16 ? - CeilDiv(input.Feature().v, 32) % 2 == 0 ? CeilDiv(input.Feature().v, 64) : CeilDiv(input.Feature().v, 64) - 1 : - CeilDiv(input.Feature().v, sub_group_pack_size); + CeilDiv(input_feature, 32) % 2 == 0 ? CeilDiv(input_feature, 64) : CeilDiv(input_feature, 64) - 1 : + CeilDiv(input_feature, sub_group_pack_size); - bool slm_div_factor_exception = input.Batch().v == 300 && input.Feature().v == 2048 && - output.Batch().v == 300 && (output.Feature().v == 324 || output.Feature().v == 81); + bool slm_div_factor_exception = input_batch == 300 && input_feature == 2048 && + output_batch == 300 && (output_feature == 324 || output_feature == 81); if (tuning_data.feature_blocks_count && tuning_data.sub_group_size == 8 && !slm_div_factor_exception) while (tuning_data.feature_blocks_count % (tuning_data.slm_div_factor * 2) == 0 && @@ -120,7 +132,11 @@ FullyConnectedKernelMMAD::DispatchData FullyConnectedKernelMMAD::SetDefault(cons auto dispatchData = Parent::SetDefault(params); const auto& output = params.output; - dispatchData.gws = { Align(output.Feature().v, tuning_data.sub_group_size) * tuning_data.slm_div_factor, output.Batch().v, 1 }; + std::vector global = { Align(output.Feature().v, tuning_data.sub_group_size) * tuning_data.slm_div_factor, output.Batch().v, 1 }; + if (output.GetLayout() == DataLayout::bfyx) + global = { Align(output.Y().v, tuning_data.sub_group_size) * tuning_data.slm_div_factor, output.Batch().v, output.Feature().v }; + + dispatchData.gws = global; dispatchData.lws = { tuning_data.work_group_size, 1, 1 }; return dispatchData; @@ -133,6 +149,7 @@ JitConstants FullyConnectedKernelMMAD::GetJitConstants(const fully_connected_par auto jit = Parent::GetJitConstants(params, runInfo); auto& input = params.inputs[0]; + auto& output = params.output; auto& weights = params.weights; size_t sub_group_pack_size = tuning_data.sub_group_size * tuning_data.pack_size; @@ -181,6 +198,9 @@ JitConstants FullyConnectedKernelMMAD::GetJitConstants(const fully_connected_par bool has_feature_leftovers = (input.GetLayout() == DataLayout::bfyx && input.Feature().v % sub_group_pack_size) || (input.GetLayout() != DataLayout::bfyx && tuning_data.sub_group_size == 16 && CeilDiv(input.Feature().v, 32) % 2); + if (output.GetLayout() == DataLayout::bfyx) + has_feature_leftovers = input.Y().v % sub_group_pack_size; + jit.AddConstant(MakeJitConstant("HAS_FEATURE_LEFTOVERS", has_feature_leftovers)); jit.AddConstant(MakeJitConstant("FEATURE_BLOCKS_COUNT", tuning_data.feature_blocks_count)); jit.AddConstant(MakeJitConstant("SLM_DIV_FACTOR", tuning_data.slm_div_factor)); @@ -200,9 +220,24 @@ JitConstants FullyConnectedKernelMMAD::GetJitConstants(const fully_connected_par jit.AddConstant(MakeJitConstant("SPLIT_SPATIAL", split_spatial)); jit.AddConstant(MakeJitConstant("SPATIAL_MAJOR", spatial_major)); + if (output.GetLayout() == DataLayout::bfyx) { + jit.AddConstant(MakeJitConstant("FEATURE_PITCH", input.Y().pitch)); + jit.AddConstant(MakeJitConstant("OUT_FEATURE_NUM", output.Y().v)); + jit.AddConstant(MakeJitConstant("IN_FEATURE_NUM", input.Y().v)); + jit.AddConstant(MakeJitConstant("IS_3D", true)); + } else { + jit.AddConstant(MakeJitConstant("FEATURE_PITCH", input.Feature().pitch)); + jit.AddConstant(MakeJitConstant("OUT_FEATURE_NUM", output.Feature().v)); + jit.AddConstant(MakeJitConstant("IN_FEATURE_NUM", input.Feature().v)); + } + if (!params.fused_ops.empty()) { auto input_dt = GetActivationType(params); - FusedOpsConfiguration conf = { "", {"batch", "feature", "0", "0"}, "dequantized", input_dt, 1 }; + std::vector idx_order = {"batch", "feature", "0", "0"}; + if (output.GetLayout() == DataLayout::bfyx) + idx_order = {"batch", "skip_f", "feature", "0"}; + + FusedOpsConfiguration conf = { "", idx_order, "dequantized", input_dt, 1 }; jit.Merge(MakeFusedOpsJitConstants(params, { conf })); } diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/fully_connected_gpu_MMAD.cl b/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/fully_connected_gpu_MMAD.cl index 7b59f7e15d59b2..3dadc5fe9f9f7b 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/fully_connected_gpu_MMAD.cl +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/fully_connected_gpu_MMAD.cl @@ -49,6 +49,7 @@ KERNEL(fully_connected_gpu_MMAD)( const uint feature = (uint)get_group_id(0) * feature_per_wg + (uint)get_global_id(0) % feature_per_wg; const uint feature_block = lid0 / feature_per_wg; const uint batch = (uint)get_global_id(1); + const uint skip_f = (uint)get_global_id(2); int dotProd = 0; @@ -56,7 +57,7 @@ KERNEL(fully_connected_gpu_MMAD)( #if INPUT0_DIMS == 5 const uint input_offset = INPUT0_GET_INDEX(batch, 0, 0, 0, 0); #else - const uint input_offset = INPUT0_GET_INDEX(batch, 0, 0, 0); + const uint input_offset = INPUT0_GET_INDEX(batch, skip_f, 0, 0); #endif #if SLM_DIV_FACTOR > 1 @@ -221,17 +222,17 @@ KERNEL(fully_connected_gpu_MMAD)( #endif // SPATIAL_MAJOR #if !SPLIT_SPATIAL - uint input_idx = input_offset + spatial * MMAD_INPUT_SPATIAL_PITCH + FEATURE_BLOCKS_COUNT * INPUT0_FEATURE_PITCH; + uint input_idx = input_offset + spatial * MMAD_INPUT_SPATIAL_PITCH + FEATURE_BLOCKS_COUNT * FEATURE_PITCH; #else - uint input_idx = input_offset + FEATURE_BLOCKS_COUNT * INPUT0_FEATURE_PITCH + + uint input_idx = input_offset + FEATURE_BLOCKS_COUNT * FEATURE_PITCH + zi * MMAD_INPUT_Z_PITCH + yi * MMAD_INPUT_Y_PITCH + xi * MMAD_INPUT_X_PITCH; #endif // !SPLIT_SPATIAL uint filter_idx = filter_offset + spatial * MMAD_FILTER_SPATIAL_PITCH + FEATURE_BLOCKS_COUNT * MMAD_FILTER_FBLOCK_PITCH; MAKE_VECTOR_TYPE(INPUT0_TYPE, 4) input_data_u = (0, 0, 0, 0); for (uint i = 0; i < 4; i++) { - if (FEATURE_BLOCKS_COUNT * SUB_GROUP_SIZE * 4 + sglid * 4 + i < INPUT0_FEATURE_NUM) { - input_data_u[i] = input[input_idx + (sglid * 4 + i) * INPUT0_FEATURE_PITCH]; + if (FEATURE_BLOCKS_COUNT * SUB_GROUP_SIZE * 4 + sglid * 4 + i < IN_FEATURE_NUM) { + input_data_u[i] = input[input_idx + (sglid * 4 + i) * FEATURE_PITCH]; } } INPUT_PACKED_TYPE input_data = AS_TYPE(INPUT_PACKED_TYPE, input_data_u); @@ -269,7 +270,7 @@ KERNEL(fully_connected_gpu_MMAD)( } #endif // HAS_FEATURE_LEFTOVERS - if (OUTPUT_FEATURE_NUM % SUB_GROUP_SIZE != 0 && feature >= OUTPUT_FEATURE_NUM) + if (OUT_FEATURE_NUM % SUB_GROUP_SIZE != 0 && feature >= OUT_FEATURE_NUM) return; #if BIAS_TERM @@ -284,7 +285,11 @@ KERNEL(fully_connected_gpu_MMAD)( float dequantized = (float)dotProd; #endif // BIAS_TERM +#if IS_3D + const uint out_idx = OUTPUT_GET_INDEX(batch, skip_f, feature, 0); +#else const uint out_idx = OUTPUT_GET_INDEX(batch, feature, 0, 0); +#endif #if HAS_FUSED_OPS FUSED_OPS; diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/fully_connected_gpu_bf_tiled.cl b/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/fully_connected_gpu_bf_tiled.cl index 4879fcf6e1122c..e0705cdfcd3131 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/fully_connected_gpu_bf_tiled.cl +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/fully_connected_gpu_bf_tiled.cl @@ -67,13 +67,27 @@ #define MAX(a, b) ((a) > (b) ? (a) : (b)) // Check alignment restrictions for using block writes on output. -#define USE_BLOCK_WRITE ((OUTPUT_TYPE_SIZE * OUTPUT_BATCH_PITCH) % 16 == 0 && (OUTPUT_TYPE_SIZE * OUTPUT_OFFSET) % 16 == 0) +#define USE_BLOCK_WRITE ((OUTPUT_TYPE_SIZE * TILE_OUT_B_PITCH) % 16 == 0 && (OUTPUT_TYPE_SIZE * OUTPUT_OFFSET) % 16 == 0) #if !REALIGN_FP16_OFFSET -# define MAIN_LOOP_ELEMENTS_COUNT INPUT0_ELEMENTS_COUNT +# if OUTPUT_3D +# define MAIN_LOOP_ELEMENTS_COUNT INPUT0_SIZE_Y +# else +# define MAIN_LOOP_ELEMENTS_COUNT INPUT0_ELEMENTS_COUNT +# endif #else // For REALIGN_FP16_OFFSET one feature is processed separately before entering main loop to correct alignment. -# define MAIN_LOOP_ELEMENTS_COUNT (INPUT0_ELEMENTS_COUNT - 1) +# if OUTPUT_3D +# define MAIN_LOOP_ELEMENTS_COUNT (INPUT0_SIZE_Y - 1) +# else +# define MAIN_LOOP_ELEMENTS_COUNT (INPUT0_ELEMENTS_COUNT - 1) +# endif +#endif + +#if OUTPUT_3D +# define INPUT_ELEMENTS_COUNT INPUT0_SIZE_Y +#else +# define INPUT_ELEMENTS_COUNT INPUT0_ELEMENTS_COUNT #endif __attribute__((intel_reqd_sub_group_size(SIMD))) @@ -97,25 +111,24 @@ KERNEL(fc)( // full dispatch pipeline. uint feature_mini_block = gid % DISPATCH_FSV; uint batch_mini_block = gid / DISPATCH_FSV % DISPATCH_BSV; - uint feature_mega_block = gid / (DISPATCH_FSV * DISPATCH_BSV) % (CEIL_DIV(OUTPUT_FEATURE_NUM, TILE_OFM * SIMD) / DISPATCH_FSV); - uint batch_mega_block = gid / (DISPATCH_FSV * DISPATCH_BSV * CEIL_DIV(OUTPUT_FEATURE_NUM, TILE_OFM * SIMD) / DISPATCH_FSV); + uint feature_mega_block = gid / (DISPATCH_FSV * DISPATCH_BSV) % (CEIL_DIV(TILE_OUT_F_NUM, TILE_OFM * SIMD) / DISPATCH_FSV); + uint batch_mega_block = gid / (DISPATCH_FSV * DISPATCH_BSV * CEIL_DIV(TILE_OUT_F_NUM, TILE_OFM * SIMD) / DISPATCH_FSV); uint out_f = (feature_mega_block * DISPATCH_FSV + feature_mini_block) * (TILE_OFM * SIMD); - uint out_b = (batch_mega_block * DISPATCH_BSV + batch_mini_block) * TILE_B; + uint out_b = ((batch_mega_block * DISPATCH_BSV + batch_mini_block) * TILE_B); ACCUMULATOR_VEC_TYPE acc[TILE_B] = { }; INPUT_VEC_TYPE in_0[TILE_B] = { }; FILTER_VEC_TYPE wei = 0; - - uint weights_offset = out_f * INPUT0_ELEMENTS_COUNT; - uint input_offset = out_b * INPUT0_BATCH_PITCH + INPUT0_OFFSET; + uint input_offset = out_b * TILE_IN_B_PITCH + INPUT0_OFFSET; + uint weights_offset = out_f * INPUT_ELEMENTS_COUNT; #if REALIGN_FP16_OFFSET // For fp16 we need to ensure that all block reads are aligned to 4 byte (2 words) boundary. // To do this solve first input feature separately. { - INPUT0_TYPE tmp_input = input[input_offset + get_sub_group_local_id() % TILE_B * INPUT0_BATCH_PITCH]; + INPUT0_TYPE tmp_input = input[input_offset + get_sub_group_local_id() % TILE_B * TILE_IN_B_PITCH]; MAKE_VECTOR_TYPE(FILTER_TYPE, TILE_OFM) tmp_wei = BLOCK_READN(FILTER_TYPE, TILE_OFM, weights, weights_offset); __attribute__((opencl_unroll_hint)) @@ -135,13 +148,12 @@ KERNEL(fc)( // Load input. #define LOAD_IN_0(bi) do { \ in_0[bi] = INPUT_BLOCK_READ(input, input_offset); \ - input_offset += INPUT0_BATCH_PITCH; \ + input_offset += TILE_IN_B_PITCH; \ } while (false) CONST_LOOP(TILE_B, LOAD_IN_0); #undef LOAD_IN_0 - input_offset += TILE_IFM * SIMD - INPUT0_BATCH_PITCH * TILE_B; - + input_offset += TILE_IFM * SIMD - TILE_IN_B_PITCH * TILE_B; // NOTE: Manually unrolling multiplication loop leads to lower register pressure and allows for bigger block sizes, // but significantly degrades readability and generality of code. // It doesn't also show noticable performance improvement on tested configurations. @@ -172,13 +184,12 @@ KERNEL(fc)( { #define LOAD_IN_0(bi) do { \ in_0[bi] = INPUT_BLOCK_READ(input, input_offset); \ - input_offset += INPUT0_BATCH_PITCH; \ + input_offset += TILE_IN_B_PITCH; \ } while (false) CONST_LOOP(TILE_B, LOAD_IN_0); #undef LOAD_IN_0 - input_offset += TILE_IFM * SIMD - INPUT0_BATCH_PITCH * TILE_B; - + input_offset += TILE_IFM * SIMD - TILE_IN_B_PITCH * TILE_B; __attribute__((opencl_unroll_hint)) for (uint ki = 0; ki < CEIL_DIV(LEFTOVER_IFM, TILE_K); ++ki) { wei = FILTER_BLOCK_READ(weights, weights_offset); @@ -210,7 +221,7 @@ KERNEL(fc)( } #if BIAS_TERM - #if OUTPUT_FEATURE_NUM % (TILE_OFM * SIMD) == 0 + #if TILE_OUT_F_NUM % (TILE_OFM * SIMD) == 0 BIAS_VEC_TYPE bias = BIAS_BLOCK_READ(biases, out_f); #else BIAS_VEC_TYPE bias = 0; @@ -242,12 +253,12 @@ KERNEL(fc)( #endif // ===================================================================================================================================== // Write results - uint output_offset = out_f * OUTPUT_FEATURE_PITCH + out_b * OUTPUT_BATCH_PITCH + OUTPUT_OFFSET; + uint output_offset = out_f * TILE_OUT_F_PITCH + out_b * TILE_OUT_B_PITCH + OUTPUT_OFFSET; - if (USE_BLOCK_WRITE && (OUTPUT_FEATURE_NUM % (TILE_OFM * SIMD) == 0 || out_f + (TILE_OFM * SIMD) <= OUTPUT_FEATURE_NUM)) { + if (USE_BLOCK_WRITE && (TILE_OUT_F_NUM % (TILE_OFM * SIMD) == 0 || out_f + (TILE_OFM * SIMD) <= TILE_OUT_F_NUM)) { #define WRITE_OUTPUT(bi) do { \ OUTPUT_BLOCK_WRITE(output, output_offset, result[bi]); \ - output_offset += OUTPUT_BATCH_PITCH; \ + output_offset += TILE_OUT_B_PITCH; \ } while (false) CONST_LOOP(TILE_B, WRITE_OUTPUT); @@ -258,8 +269,8 @@ KERNEL(fc)( // TODO: Investigate why below code doesn't compile and check how it affects performance. //#define WRITE_OUTPUT_FEATURE(fi) do { \ // const bool should_write = \ - // OUTPUT_FEATURE_NUM % (TILE_OFM * SIMD) == 0 || \ - // out_f + (fi) * SIMD + get_sub_group_local_id() < OUTPUT_FEATURE_NUM; \ + // TILE_OUT_F_NUM % (TILE_OFM * SIMD) == 0 || \ + // out_f + (fi) * SIMD + get_sub_group_local_id() < TILE_OUT_F_NUM; \ // if (should_write) { \ // output[output_offset] = result[out_bi][fi]; \ // } \ @@ -269,7 +280,7 @@ KERNEL(fc)( //#define WRITE_OUTPUT(bi) do { \ // const uint out_bi = bi; \ // CONST_LOOP(TILE_OFM, WRITE_OUTPUT_FEATURE); \ - // output_offset += OUTPUT_BATCH_PITCH - TILE_OFM * SIMD; \ + // output_offset += TILE_OUT_B_PITCH - TILE_OFM * SIMD; \ // } while (false) // //CONST_LOOP(TILE_B, WRITE_OUTPUT); @@ -279,14 +290,14 @@ KERNEL(fc)( for (uint bi = 0; bi < TILE_B; ++bi) { for (uint fi = 0; fi < TILE_OFM; ++fi) { const bool should_write = - OUTPUT_FEATURE_NUM % (TILE_OFM * SIMD) == 0 || - out_f + fi * SIMD + get_sub_group_local_id() < OUTPUT_FEATURE_NUM; + TILE_OUT_F_NUM % (TILE_OFM * SIMD) == 0 || + out_f + fi * SIMD + get_sub_group_local_id() < TILE_OUT_F_NUM; if (should_write) { output[output_offset] = ((OUTPUT_TYPE*)(&result[bi]))[fi]; } output_offset += SIMD; } - output_offset += OUTPUT_BATCH_PITCH - TILE_OFM * SIMD; + output_offset += TILE_OUT_B_PITCH - TILE_OFM * SIMD; } } // ===================================================================================================================================== diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/fully_connected_gpu_bfyx_ref.cl b/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/fully_connected_gpu_bfyx_ref.cl index 00d2722f116c26..c8a6076b15f918 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/fully_connected_gpu_bfyx_ref.cl +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/fully_connected_gpu_bfyx_ref.cl @@ -27,10 +27,31 @@ KERNEL(fc)( #endif ) { +#if OUTPUT_3D + const uint oxfm = get_global_id(0); + const uint b = get_global_id(1); + const uint oym = oxfm % OUTPUT_SIZE_Y; + const uint ofm = oxfm / OUTPUT_SIZE_Y; + + ACCUMULATOR_TYPE dotProd = ACCUMULATOR_VAL_ZERO; + + for (uint y = 0; y < INPUT0_SIZE_Y; ++y) + { + for(uint x = 0; x < INPUT0_SIZE_X; ++x ) + { + const uint input0_idx = GET_DATA_INDEX(INPUT0, b, ofm, y, x); + const uint filter_idx = GET_FILTER_INDEX(FILTER, 0, oym, y, 0, 0); + dotProd += (ACCUMULATOR_TYPE)(input[input0_idx] * weights[filter_idx]); + } + } + + const uint dst_index = GET_DATA_INDEX(OUTPUT, b, ofm, oym, 0); + const uint bias_index = oym; +#else const uint ofm = get_global_id(0); const uint b = get_global_id(1); - ACCUMULATOR_TYPE dotProd = (ACCUMULATOR_TYPE)0; + ACCUMULATOR_TYPE dotProd = ACCUMULATOR_VAL_ZERO; for (uint ifm = 0; ifm < INPUT0_FEATURE_NUM; ++ifm) { @@ -46,9 +67,10 @@ KERNEL(fc)( } const uint dst_index = GET_DATA_INDEX(OUTPUT, b, ofm, 0, 0); + const uint bias_index = ofm; +#endif #if BIAS_TERM - const uint bias_index = ofm; ACTIVATION_TYPE dequantized = dotProd + biases[bias_index]; #else ACTIVATION_TYPE dequantized = dotProd; diff --git a/inference-engine/thirdparty/clDNN/src/fully_connected.cpp b/inference-engine/thirdparty/clDNN/src/fully_connected.cpp index 040d631d252c25..13c4cbdb6c7e42 100644 --- a/inference-engine/thirdparty/clDNN/src/fully_connected.cpp +++ b/inference-engine/thirdparty/clDNN/src/fully_connected.cpp @@ -54,6 +54,10 @@ bool is_batch_after_spatial(const std::string order) { format::type get_preferred_format(const fully_connected_node& node) { auto input_layout = node.input().get_output_layout(); + // for 3d output we have to chose bfyx format + if (node.get_primitive()->input_size == 3) + return format::bfyx; + if (data_type_traits::is_floating_point(input_layout.data_type) && (is_batch_after_spatial(input_layout.format.order()) || input_layout.format == format::bs_x_bsv16 || @@ -107,6 +111,9 @@ layout fully_connected_inst::calc_output_layout(fully_connected_node const& node } auto output_size = tensor(input_layout.size.batch[0], weights_layout.size.batch[0], 1, 1); + if (desc->input_size == 3) { + output_size = tensor(input_layout.size.batch[0], input_layout.size.feature[0], 1, weights_layout.size.batch[0]); + } format output_format = get_preferred_format(node); return layout(output_type, output_format, output_size); diff --git a/inference-engine/thirdparty/clDNN/src/gpu/fully_connected_gpu.cpp b/inference-engine/thirdparty/clDNN/src/gpu/fully_connected_gpu.cpp index 069501d11f867a..677e93224fe42c 100644 --- a/inference-engine/thirdparty/clDNN/src/gpu/fully_connected_gpu.cpp +++ b/inference-engine/thirdparty/clDNN/src/gpu/fully_connected_gpu.cpp @@ -57,10 +57,11 @@ struct fully_connected_gpu : typed_primitive_gpu_impl { arg.get_program()); fc_optional_params.allowInputReordering = true; - fc_params.output = fc_params.output.FlattenFeatureAndSpatials(); - const auto primitive = arg.get_primitive(); + if (primitive->input_size != 3) + fc_params.output = fc_params.output.FlattenFeatureAndSpatials(); + if (arg.get_output_layout().data_type == data_types::i8 || arg.get_output_layout().data_type == data_types::u8) { fc_params.quantization = kernel_selector::QuantizationType::SYMMETRIC; diff --git a/inference-engine/thirdparty/clDNN/tests/test_cases/fully_connected_gpu_test.cpp b/inference-engine/thirdparty/clDNN/tests/test_cases/fully_connected_gpu_test.cpp index f0bf5fc59d84c2..e129a31d908fde 100644 --- a/inference-engine/thirdparty/clDNN/tests/test_cases/fully_connected_gpu_test.cpp +++ b/inference-engine/thirdparty/clDNN/tests/test_cases/fully_connected_gpu_test.cpp @@ -1150,6 +1150,109 @@ INSTANTIATE_TEST_CASE_P(smoke_bfyx_batched, ::testing::Values(format::bfyx), ::testing::Values("")), ); + +template +struct fully_connected_random_test_3d : ::testing::TestWithParam { + void run_test() { + size_t batch, input_f, input_x, input_y, output_y; + format::type input_format, output_format; + std::string kernel; + + std::tie(batch, input_f, input_x, input_y, output_y, input_format, output_format, kernel) = GetParam(); + + auto input_data = generate_smart_random_4d(batch, input_f, input_y, input_x); + auto weights_data = generate_smart_random_4d(output_y, input_y, 1, 1); + auto bias_data = generate_smart_random_2d(1, output_y); + + auto eng = get_test_engine(); + auto net = network_test(eng); + auto input = net.add_input_layout("input", input_format, std::move(input_data)); + auto weights = net.add_data("weights", format::oiyx, std::move(weights_data)); + auto bias = net.add_data("bias", format::bfyx, std::move(bias_data)); + auto fc = net.add_fully_connected_3d("fc", input, weights, bias, implementation_desc{ output_format, kernel }, 3); + + net.run(build_options(build_option::optimize_data(true))); + } +}; + + +using fully_connected_random_test_f32_3d = fully_connected_random_test_3d; +using fully_connected_random_test_f16_3d = fully_connected_random_test_3d; +using fully_connected_random_test_i8_3d = fully_connected_random_test_3d; + +TEST_P(fully_connected_random_test_f32_3d, basic) { + run_test(); +} + +INSTANTIATE_TEST_CASE_P(smoke, + fully_connected_random_test_f32_3d, + ::testing::Combine( + ::testing::Values(1,3), + ::testing::Values(1,3), + ::testing::Values(1), + ::testing::Values(1,3,16), + ::testing::Values(1,3,16), + ::testing::Values(format::bfyx), + ::testing::Values(format::any), + ::testing::Values("")), ); + +INSTANTIATE_TEST_CASE_P(smoke_big, + fully_connected_random_test_f32_3d, + ::testing::Combine( + ::testing::Values(3), + ::testing::Values(16, 17, 32), + ::testing::Values(1), + ::testing::Values(17, 32), + ::testing::Values(17, 32), + ::testing::Values(format::bfyx), + ::testing::Values(format::any), + ::testing::Values("")), ); + +TEST_P(fully_connected_random_test_f16_3d, basic) { + run_test(); +} + +INSTANTIATE_TEST_CASE_P(smoke, + fully_connected_random_test_f16_3d, + ::testing::Combine( + ::testing::Values(1,3), + ::testing::Values(1,3), + ::testing::Values(1), + ::testing::Values(1,3,16), + ::testing::Values(1,3,16), + ::testing::Values(format::bfyx), + ::testing::Values(format::any), + ::testing::Values("")), ); + +TEST_P(fully_connected_random_test_i8_3d, basic) { + run_test(); +} + +INSTANTIATE_TEST_CASE_P(smoke, + fully_connected_random_test_i8_3d, + ::testing::Combine( + ::testing::Values(1,3), + ::testing::Values(1,3), + ::testing::Values(1), + ::testing::Values(1,3,16), + ::testing::Values(1,3,16), + ::testing::Values(format::bfyx), + ::testing::Values(format::any), + ::testing::Values("")), ); + +INSTANTIATE_TEST_CASE_P(smoke_big, + fully_connected_random_test_i8_3d, + ::testing::Combine( + ::testing::Values(1,3), + ::testing::Values(16,17), + ::testing::Values(1), + ::testing::Values(17, 32), + ::testing::Values(17, 32), + ::testing::Values(format::bfyx), + ::testing::Values(format::any), + ::testing::Values("")), ); + + struct quantization_t { VF input_low; VF input_high; diff --git a/inference-engine/thirdparty/clDNN/tests/test_cases/fusings_gpu_test.cpp b/inference-engine/thirdparty/clDNN/tests/test_cases/fusings_gpu_test.cpp index 6d043cf5d5a6ed..aee13eed135c16 100644 --- a/inference-engine/thirdparty/clDNN/tests/test_cases/fusings_gpu_test.cpp +++ b/inference-engine/thirdparty/clDNN/tests/test_cases/fusings_gpu_test.cpp @@ -368,6 +368,38 @@ class WeightsPrimitiveFusingTest : public ::BaseFusingTest { layout get_per_channel_layout(T& p) { return layout{ p.default_type, p.default_format, tensor{1, p.out_shape.feature[0], 1, 1} }; } + + size_t get_fc_output_dim_size(bc_test_params& p) { + size_t size = 2; + for (auto i : p.out_shape.spatial) { + if (i > 1) + size++; + } + return size; + } + + layout get_fc_weights_layout(T& p) { + cldnn::tensor weights_tensor; + if (p.out_shape.spatial[1] > 1) { + // 3d case + weights_tensor = cldnn::tensor(p.kernel.batch[0], p.kernel.feature[0], 1, 1); + } + else { + weights_tensor = cldnn::tensor(batch(p.out_shape.feature[0]), feature(p.in_shape.feature[0]), + spatial(p.kernel.spatial[0], p.kernel.spatial[1], p.kernel.spatial[2])); + } + return layout{p.weights_type, p.weights_format, weights_tensor}; + } + + layout get_fc_bias_layout(T& p) { + if (p.out_shape.spatial[1] > 1) { + // 3d case + return layout{ p.default_type, format::bfyx, tensor{1, p.out_shape.spatial[1], 1, 1} }; + } + else { + return layout{ p.default_type, format::bfyx, tensor{1, p.out_shape.feature[0], 1, 1} }; + } + } }; class ResamplePrimitiveFusingTest : public ::BaseFusingTest { @@ -557,10 +589,16 @@ class ConvEltwTest : public ::BaseFusingTest { #define CASE_FC_FP32_1 {1, 1, 3, 1}, {1, 4, 1, 1}, {4, 1, 3, 1}, tensor{1}, tensor{0}, tensor{1}, 1, data_types::f32, format::bfyx, data_types::f32, format::oiyx, data_types::f32, format::bfyx #define CASE_FC_FP32_2 {2, 1, 3, 1}, {2, 4, 1, 1}, {4, 1, 3, 1}, tensor{1}, tensor{0}, tensor{1}, 1, data_types::f32, format::yxfb, data_types::f32, format::oiyx, data_types::f32, format::bfyx #define CASE_FC_FP32_3 {2, 32, 1, 1}, {2, 16, 1, 1}, {16, 32, 1, 1}, tensor{1}, tensor{0}, tensor{1}, 1, data_types::f32, format::bfyx, data_types::i8, format::oiyx, data_types::f32, format::bfyx +#define CASE_FC_FP32_3D_1 {5, 3, 1, 3}, {5, 3, 1, 5}, {5, 3, 1, 1}, tensor{1}, tensor{0}, tensor{1}, 1, data_types::f32, format::bfyx, data_types::f32, format::os_iyx_osv16, data_types::f32, format::bfyx +#define CASE_FC_FP32_3D_2 {2, 1, 1, 1}, {2, 1, 1, 32}, {32, 1, 1, 1}, tensor{1}, tensor{0}, tensor{1}, 1, data_types::f32, format::bfyx, data_types::f32, format::os_iyx_osv16, data_types::f32, format::bfyx +#define CASE_FC_FP32_3D_3 {2, 32, 1, 32}, {2, 32, 1, 16}, {16, 32, 1, 1}, tensor{1}, tensor{0}, tensor{1}, 1, data_types::f32, format::bfyx, data_types::f32, format::os_iyx_osv16, data_types::f32, format::bfyx #define CASE_FC_U8S8_1 {1, 1, 3, 1}, {1, 4, 1, 1}, {4, 1, 3, 1}, tensor{1}, tensor{0}, tensor{1}, 1, data_types::u8, format::bfyx, data_types::i8, format::oiyx, data_types::f32, format::bfyx #define CASE_FC_U8S8_2 {2, 1, 3, 1}, {2, 4, 1, 1}, {4, 1, 3, 1}, tensor{1}, tensor{0}, tensor{1}, 1, data_types::u8, format::b_fs_yx_fsv4, data_types::i8, format::oiyx, data_types::f32, format::bfyx #define CASE_FC_U8S8_3 {2, 32, 1, 1}, {2, 16, 1, 1}, {16, 32, 1, 1}, tensor{1}, tensor{0}, tensor{1}, 1, data_types::u8, format::b_fs_yx_fsv4, data_types::i8, format::oiyx, data_types::f32, format::bfyx +#define CASE_FC_U8S8_3D_1 {2, 32, 1, 3}, {2, 32, 1, 16}, {16, 3, 1, 1}, tensor{1}, tensor{0}, tensor{1}, 1, data_types::u8, format::bfyx, data_types::i8, format::oiyx, data_types::f32, format::bfyx +#define CASE_FC_U8S8_3D_2 {1, 1, 1, 3}, {1, 1, 1, 32}, {32, 3, 1, 1}, tensor{1}, tensor{0}, tensor{1}, 1, data_types::u8, format::bfyx, data_types::i8, format::oiyx, data_types::f32, format::bfyx +#define CASE_FC_U8S8_3D_3 {2, 3, 1, 1}, {2, 3, 1, 15}, {15, 1, 1, 1}, tensor{1}, tensor{0}, tensor{1}, 1, data_types::u8, format::bfyx, data_types::i8, format::oiyx, data_types::f32, format::bfyx #define CASE_NORMALIZE_I8_1 {1, 2, 3, 3}, data_types::u8, format::bfyx, data_types::f32, format::bfyx @@ -2475,9 +2513,9 @@ class fc_fp32_activation : public FCFusingTest {}; TEST_P(fc_fp32_activation, basic) { auto p = GetParam(); create_topologies(input_layout("input", get_input_layout(p)), - data("weights", get_mem(get_weights_layout(p))), - data("bias", get_mem(get_bias_layout(p))), - fully_connected("fc_prim", "input", "weights", "bias"), + data("weights", get_mem(get_fc_weights_layout(p))), + data("bias", get_mem(get_fc_bias_layout(p))), + fully_connected("fc_prim", "input", "weights", "bias", padding(), get_fc_output_dim_size(p)), activation("activation", "fc_prim", activation_func::abs), reorder("reorder_bfyx", "activation", p.default_format, data_types::f32) ); @@ -2490,14 +2528,17 @@ INSTANTIATE_TEST_CASE_P(fusings_gpu, fc_fp32_activation, ::testing::ValuesIn(std bc_test_params{ CASE_FC_FP32_1, 2, 3 }, bc_test_params{ CASE_FC_FP32_2, 2, 3 }, bc_test_params{ CASE_FC_FP32_3, 2, 3 }, + bc_test_params{ CASE_FC_FP32_3D_1, 2, 3 }, + bc_test_params{ CASE_FC_FP32_3D_2, 2, 3 }, + bc_test_params{ CASE_FC_FP32_3D_3, 2, 3 }, }), ); class fc_fp32_bias : public FCFusingTest {}; TEST_P(fc_fp32_bias, basic) { auto p = GetParam(); create_topologies(input_layout("input", get_input_layout(p)), - data("weights", get_mem(get_weights_layout(p))), - data("bias", get_mem(get_bias_layout(p))), + data("weights", get_mem(get_fc_weights_layout(p))), + data("bias", get_mem(get_fc_bias_layout(p))), fully_connected("fc_prim", "input", "weights", ""), eltwise("bias_add", {"fc_prim", "bias"}, eltwise_mode::sum), reorder("reorder_bfyx", "bias_add", p.default_format, data_types::f32) @@ -2517,10 +2558,10 @@ class fc_int8_scale : public FCFusingTest {}; TEST_P(fc_int8_scale, basic) { auto p = GetParam(); create_topologies(input_layout("input", get_input_layout(p)), - data("weights", get_mem(get_weights_layout(p))), - data("bias", get_mem(get_bias_layout(p))), + data("weights", get_mem(get_fc_weights_layout(p))), + data("bias", get_mem(get_fc_bias_layout(p))), data("scale_data", get_mem(get_per_channel_layout(p), 1.0f / p.kernel.count())), - fully_connected("fc_prim", "input", "weights", "bias", data_types::f32), + fully_connected("fc_prim", "input", "weights", "bias", data_types::f32, padding(), get_fc_output_dim_size(p)), scale("scale", "fc_prim", "scale_data"), reorder("reorder_bfyx", "scale", p.default_format, data_types::f32) ); @@ -2532,10 +2573,10 @@ TEST_P(fc_int8_scale, basic) { TEST_P(fc_int8_scale, fp16_scale_out) { auto p = GetParam(); create_topologies(input_layout("input", get_input_layout(p)), - data("weights", get_mem(get_weights_layout(p))), - data("bias", get_mem(get_bias_layout(p))), + data("weights", get_mem(get_fc_weights_layout(p))), + data("bias", get_mem(get_fc_bias_layout(p))), data("scale_data", get_mem(get_per_channel_layout(p), 1.0f / p.kernel.count())), - fully_connected("fc_prim", "input", "weights", "bias", data_types::f32), + fully_connected("fc_prim", "input", "weights", "bias", data_types::f32, padding(), get_fc_output_dim_size(p)), scale("scale", "fc_prim", "scale_data", optional_data_type{data_types::f16}), reorder("reorder_bfyx", "scale", p.default_format, data_types::f32) ); @@ -2549,19 +2590,22 @@ INSTANTIATE_TEST_CASE_P(fusings_gpu, fc_int8_scale, bc_test_params{ CASE_FC_U8S8_1, 2, 3 }, bc_test_params{ CASE_FC_U8S8_2, 2, 3 }, bc_test_params{ CASE_FC_U8S8_3, 2, 3 }, + bc_test_params{ CASE_FC_U8S8_3D_1, 2, 3 }, + bc_test_params{ CASE_FC_U8S8_3D_2, 2, 3 }, + bc_test_params{ CASE_FC_U8S8_3D_3, 2, 3 }, }), ); class fc_int8_quantize_u8 : public FCFusingTest {}; TEST_P(fc_int8_quantize_u8, basic) { auto p = GetParam(); create_topologies(input_layout("input", get_input_layout(p)), - data("weights", get_mem(get_weights_layout(p))), - data("bias", get_mem(get_bias_layout(p))), + data("weights", get_mem(get_fc_weights_layout(p))), + data("bias", get_mem(get_fc_bias_layout(p))), data("in_lo", get_mem(get_per_channel_layout(p), min_random, 0)), data("in_hi", get_mem(get_per_channel_layout(p), 1, max_random)), data("out_lo", get_mem(get_single_element_layout(p), 0)), data("out_hi", get_mem(get_single_element_layout(p), 255)), - fully_connected("fc_prim", "input", "weights", "bias", data_types::f32), + fully_connected("fc_prim", "input", "weights", "bias", data_types::f32, padding(), get_fc_output_dim_size(p)), quantize("quantize", "fc_prim", "in_lo", "in_hi", "out_lo", "out_hi", 256, data_types::u8), reorder("reorder_bfyx", "quantize", p.default_format, data_types::f32) ); @@ -2575,20 +2619,23 @@ INSTANTIATE_TEST_CASE_P(fusings_gpu_fc, fc_int8_quantize_u8, bc_test_params{CASE_FC_U8S8_1, 2, 3}, bc_test_params{CASE_FC_U8S8_2, 2, 3}, bc_test_params{CASE_FC_U8S8_3, 2, 3}, + bc_test_params{ CASE_FC_U8S8_3D_1, 2, 3 }, + bc_test_params{ CASE_FC_U8S8_3D_2, 2, 3 }, + bc_test_params{ CASE_FC_U8S8_3D_3, 2, 3 }, }), ); class fc_int8_scale_quantize_i8 : public FCFusingTest {}; TEST_P(fc_int8_scale_quantize_i8, basic) { auto p = GetParam(); create_topologies(input_layout("input", get_input_layout(p)), - data("weights", get_mem(get_weights_layout(p))), - data("bias", get_mem(get_bias_layout(p))), + data("weights", get_mem(get_fc_weights_layout(p))), + data("bias", get_mem(get_fc_bias_layout(p))), data("in_lo", get_mem(get_per_channel_layout(p), min_random, 0)), data("in_hi", get_mem(get_per_channel_layout(p), 1, max_random)), data("out_lo", get_mem(get_single_element_layout(p), -127)), data("out_hi", get_mem(get_single_element_layout(p), 127)), data("scale_data", get_mem(get_per_channel_layout(p), 1.0f / p.kernel.count() / 255)), - fully_connected("fc_prim", "input", "weights", "bias", data_types::f32), + fully_connected("fc_prim", "input", "weights", "bias", data_types::f32, padding(), get_fc_output_dim_size(p)), scale("scale", "fc_prim", "scale_data"), quantize("quantize", "scale", "in_lo", "in_hi", "out_lo", "out_hi", 255, data_types::i8), reorder("reorder_bfyx", "quantize", p.default_format, data_types::f32) @@ -2602,6 +2649,9 @@ INSTANTIATE_TEST_CASE_P(fusings_gpu, fc_int8_scale_quantize_i8, bc_test_params{CASE_FC_U8S8_1, 2, 4}, bc_test_params{CASE_FC_U8S8_2, 2, 4}, bc_test_params{CASE_FC_U8S8_3, 2, 4}, + bc_test_params{ CASE_FC_U8S8_3D_1, 2, 4 }, + bc_test_params{ CASE_FC_U8S8_3D_2, 2, 4 }, + bc_test_params{ CASE_FC_U8S8_3D_3, 2, 4 }, }), ); @@ -2610,14 +2660,14 @@ class fc_int8_scale_activation_quantize_i8 : public FCFusingTest {}; TEST_P(fc_int8_scale_activation_quantize_i8, basic) { auto p = GetParam(); create_topologies(input_layout("input", get_input_layout(p)), - data("weights", get_mem(get_weights_layout(p))), - data("bias", get_mem(get_bias_layout(p))), + data("weights", get_mem(get_fc_weights_layout(p))), + data("bias", get_mem(get_fc_bias_layout(p))), data("in_lo", get_mem(get_per_channel_layout(p), min_random, 0)), data("in_hi", get_mem(get_per_channel_layout(p), 1, max_random)), data("out_lo", get_mem(get_single_element_layout(p), -127)), data("out_hi", get_mem(get_single_element_layout(p), 127)), data("scale_data", get_mem(get_per_channel_layout(p), 1.0f / p.kernel.count() / 255)), - fully_connected("fc_prim", "input", "weights", "bias", data_types::f32), + fully_connected("fc_prim", "input", "weights", "bias", data_types::f32, padding(), get_fc_output_dim_size(p)), scale("scale", "fc_prim", "scale_data"), activation("activation_scale", "scale", activation_func::exp), quantize("quantize", "activation_scale", "in_lo", "in_hi", "out_lo", "out_hi", 255, data_types::i8), @@ -2633,6 +2683,14 @@ INSTANTIATE_TEST_CASE_P(fusings_gpu, fc_int8_scale_activation_quantize_i8, bc_test_params{CASE_FC_U8S8_1, 2, 5}, bc_test_params{CASE_FC_U8S8_2, 2, 5}, bc_test_params{CASE_FC_U8S8_3, 2, 5}, + + bc_test_params{ CASE_FC_U8S8_3D_1, 2, 5 }, + bc_test_params{ CASE_FC_U8S8_3D_2, 2, 5 }, + bc_test_params{ CASE_FC_U8S8_3D_3, 2, 5 }, + + bc_test_params{ CASE_FC_FP32_3D_1, 3, 5 }, + bc_test_params{ CASE_FC_FP32_3D_2, 3, 5 }, + bc_test_params{ CASE_FC_FP32_3D_3, 3, 5 }, }), ); diff --git a/inference-engine/thirdparty/clDNN/tests/test_utils/network_test.h b/inference-engine/thirdparty/clDNN/tests/test_utils/network_test.h index 1848a32ad09948..74cd673fde8455 100644 --- a/inference-engine/thirdparty/clDNN/tests/test_utils/network_test.h +++ b/inference-engine/thirdparty/clDNN/tests/test_utils/network_test.h @@ -144,7 +144,6 @@ template struct reference_tensor_typed : reference_tensor { using vector_type = VVVVF; reference_tensor_typed(vector_type data) : reference(std::move(data)) {} - void compare(cldnn::memory actual) override { auto ptr = actual.pointer(); for (size_t bi = 0; bi < reference.size(); ++bi) { @@ -231,6 +230,36 @@ VVF fully_connected_reference_typed(VVVVF& input, VVVVF::type> +VVVVF fully_connected_reference_typed_3d(VVVVF& input, VVVVF& weights, VF& bias) { + size_t input_f = input[0].size(); + size_t input_y = input[0][0].size(); + size_t input_x = input[0][0][0].size(); + size_t output_b = input.size(); // input is assumed to be bfyx + size_t output_f = weights.size(); // weights is assumed to be bfyx + size_t weights_f = weights[0].size(); // weights is assumed to be bfyx + VVVVF output(output_b, VVVF(input_f, VVF(output_f, VF(1)))); + OutputT res; + for (size_t b = 0; b < output_b; ++b) { + for (size_t n = 0; n < input_f; ++n) { + for (size_t f = 0; f < output_f; ++f) { + res = bias[f]; + for (size_t y = 0; y < input_y; ++y) { + for (size_t x = 0; x < input_x; ++x) { + res += (OutputT)input[b][n][y][x] * (OutputT)weights[f][y][0][0]; + } + } + output[b][n][f][0] = (OutputT)res; + } + } + } + return output; +} + // ===================================================================================================================== // Network test struct reference_node_interface { @@ -300,6 +329,22 @@ class network_test { return add_node(id, reference_tensor_typed(output_data), { input, weights, bias }); } + template + typename reference_node::ptr add_fully_connected_3d(cldnn::primitive_id id, + std::shared_ptr> input, + std::shared_ptr> weights, + std::shared_ptr> bias, + cldnn::implementation_desc force = cldnn::implementation_desc{cldnn::format::any, ""}, + size_t input_dim_size = 3) { + topo.add(cldnn::fully_connected(id, input->id, weights->id, bias->id, cldnn::type_to_data_type::value, cldnn::padding(), input_dim_size)); + if (force.output_format != cldnn::format::any || force.kernel_name != "") + forced_impls[id] = force; + VVVVF output_data = fully_connected_reference_typed_3d(input->reference.reference, + weights->reference.reference, + bias->reference.reference[0]); + return add_node(id, reference_tensor_typed(output_data), {input, weights, bias}); + } + cldnn::network build_network(cldnn::build_options opts) { opts.set_option(cldnn::build_option::force_implementations(forced_impls)); auto net = cldnn::network(eng, topo, opts); From da54a40fa1f36710c713d4372958015a411c23e0 Mon Sep 17 00:00:00 2001 From: iliya mironov Date: Thu, 17 Dec 2020 14:05:24 +0300 Subject: [PATCH 095/244] Add spec for CTCGreedyDecoderSecLen (#3250) * Add spec for CTCGreedyDecoder * Update spec * Fix spec according to code rewiev * Update spec * Update spec * Update spec according to review * Update spec * Update spec * Update spec * Update example spec * Fix space in spec * Fix spec * Fix spec according to review * fix spec * update spec * Update spec * Change format outputs in spec * Hot fix * Minor fixes * Add new attribute for op in spec * change input * Add precision to outputs * Fix input in spec * Update spec * Update CTCGreedyDecoderSeqLen_6.md fix mistakes * Change first input layout * fix example Co-authored-by: Your Name --- docs/doxygen/ie_docs.xml | 1 + docs/ops/sequence/CTCGreedyDecoderSeqLen_6.md | 99 +++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 docs/ops/sequence/CTCGreedyDecoderSeqLen_6.md diff --git a/docs/doxygen/ie_docs.xml b/docs/doxygen/ie_docs.xml index 9028504e31d2e4..7095f03bb3bfa9 100644 --- a/docs/doxygen/ie_docs.xml +++ b/docs/doxygen/ie_docs.xml @@ -89,6 +89,7 @@ + diff --git a/docs/ops/sequence/CTCGreedyDecoderSeqLen_6.md b/docs/ops/sequence/CTCGreedyDecoderSeqLen_6.md new file mode 100644 index 00000000000000..f59c1636f1eb2f --- /dev/null +++ b/docs/ops/sequence/CTCGreedyDecoderSeqLen_6.md @@ -0,0 +1,99 @@ +## CTCGreedyDecoderSeqLen {#openvino_docs_ops_sequence_CTCGreedyDecoderSeqLen_6} + +**Versioned name**: *CTCGreedyDecoderSeqLen-6* + +**Category**: Sequence processing + +**Short description**: *CTCGreedyDecoderSeqLen* performs greedy decoding of the logits provided as the first input. The sequence lengths are provided as the second input. + +**Detailed description**: + +This operation is similar to the [TensorFlow CTCGreedyDecoder](https://www.tensorflow.org/api_docs/python/tf/nn/ctc_greedy_decoder). + +The operation *CTCGreedyDecoderSeqLen* implements best path decoding. +Decoding is done in two steps: + +1. Concatenate the most probable classes per time-step which yields the best path. + +2. Remove duplicate consecutive elements if the attribute *merge_repeated* is true and then remove all blank elements. + +Sequences in the batch can have different length. The lengths of sequences are coded in the second input integer tensor `sequence_length`. + +The main difference between [CTCGreedyDecoder](CTCGreedyDecoder_1.md) and CTCGreedyDecoderSeqLen is in the second input. CTCGreedyDecoder uses 2D input floating point tensor with sequence masks for each sequence in the batch while CTCGreedyDecoderSeqLen uses 1D integer tensor with sequence lengths. + +**Attributes** + +* *merge_repeated* + + * **Description**: *merge_repeated* is a flag for merging repeated labels during the CTC calculation. If the value is false the sequence `ABB*B*B` (where '*' is the blank class) will look like `ABBBB`. But if the value is true, the sequence will be `ABBB`. + * **Range of values**: true or false + * **Type**: `boolean` + * **Default value**: true + * **Required**: *No* + +* *classes_index_type* + + * **Description**: the type of output tensor with classes indices + * **Range of values**: "i64" or "i32" + * **Type**: string + * **Default value**: "i32" + * **Required**: *No* + +* *sequence_length_type* + + * **Description**: the type of output tensor with sequence length + * **Range of values**: "i64" or "i32" + * **Type**: string + * **Default value**: "i32" + * **Required**: *No* + +**Inputs** + +* **1**: `data` - input tensor of type *T_F* of shape `[N, T, C]` with a batch of sequences. Where `T` is the maximum sequence length, `N` is the batch size and `C` is the number of classes. **Required.** + +* **2**: `sequence_length` - input tensor of type *T_I* of shape `[N]` with sequence lengths. The values of sequence length must be less or equal to `T`. **Required.** + +* **3**: `blank_index` - scalar or 1D tensor with 1 element of type *T_I*. Specifies the class index to use for the blank class. The `blank_index` is not saved to the result sequence and it is used for post-processing. Default value is `C-1`. **Optional**. + +**Output** + +* **1**: Output tensor of type *T_IND1* shape `[N, T]` and containing the decoded classes. All elements that do not code sequence classes are filled with -1. + +* **2**: Output tensor of type *T_IND2* shape `[N]` and containing length of decoded class sequence for each batch. + +**Types** + +* *T_F*: any supported floating point type. + +* *T_I*: `int32` or `int64`. + +* *T_IND1*: `int32` or `int64` and depends on `classes_index_type` attribute. + +* *T_IND2*: `int32` or `int64` and depends on `sequence_length_type` attribute. + +**Example** + +```xml + + + + 8 + 20 + 128 + + + 8 + + + + + + 8 + 20 + + + 8 + + + +``` From 66883d5905e3e75e4db5b980ef003e30e6697c2b Mon Sep 17 00:00:00 2001 From: Andrew Bakalin Date: Thu, 17 Dec 2020 15:00:47 +0300 Subject: [PATCH 096/244] [IE COMMON] Fix FP32 to FP16 positive infinity conversion (#3647) * [IE COMMON] Fix FP32 to FP16 positive infinity conversion * [TESTS] Unit tests * [TOOLS] Use fixed convert in VPU perfcheck --- .../src/inference_engine/precision_utils.cpp | 2 +- .../inference_engine/precision_utils_test.cpp | 48 +++++++++ .../tools/vpu/vpu_perfcheck/CMakeLists.txt | 1 + .../tools/vpu/vpu_perfcheck/main.cpp | 102 +----------------- 4 files changed, 54 insertions(+), 99 deletions(-) create mode 100644 inference-engine/tests/unit/inference_engine/precision_utils_test.cpp diff --git a/inference-engine/src/inference_engine/precision_utils.cpp b/inference-engine/src/inference_engine/precision_utils.cpp index ba28d8b2e56ce0..991ae5f67751cd 100644 --- a/inference-engine/src/inference_engine/precision_utils.cpp +++ b/inference-engine/src/inference_engine/precision_utils.cpp @@ -129,7 +129,7 @@ ie_fp16 f32tof16(float x) { if (v.u & 0x007FFFFF) { return s | (v.u >> (23 - 10)) | 0x0200; // return NAN f16 } else { - return s | (v.u >> (23 - 10)); // return INF f16 + return s | EXP_MASK_F16; // return INF f16 } } diff --git a/inference-engine/tests/unit/inference_engine/precision_utils_test.cpp b/inference-engine/tests/unit/inference_engine/precision_utils_test.cpp new file mode 100644 index 00000000000000..b987e5d8d898bf --- /dev/null +++ b/inference-engine/tests/unit/inference_engine/precision_utils_test.cpp @@ -0,0 +1,48 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "precision_utils.h" + +#include + +#include + +using namespace InferenceEngine; + +using PrecisionUtilsTests = ::testing::Test; + +static constexpr ie_fp16 positiveInf = 0x7C00; +static constexpr ie_fp16 negativeInf = 0xFC00; +static constexpr ie_fp16 largestNumber = 0x7BFF; +static constexpr ie_fp16 lowestNumber = 0xFBFF; + +TEST_F(PrecisionUtilsTests, FP32ToFP16PositiveInfinity) { + const auto fp16ConvertedInf = InferenceEngine::PrecisionUtils::f32tof16(std::numeric_limits::infinity()); + ASSERT_EQ(fp16ConvertedInf, positiveInf); +} + +TEST_F(PrecisionUtilsTests, FP32ToFP16NegativeInfinity) { + const auto fp16ConvertedInf = InferenceEngine::PrecisionUtils::f32tof16(-1 * std::numeric_limits::infinity()); + ASSERT_EQ(fp16ConvertedInf, negativeInf); +} + +TEST_F(PrecisionUtilsTests, FP16ToFP32PositiveInfinity) { + const auto fp32ConvertedInf = InferenceEngine::PrecisionUtils::f16tof32(positiveInf); + ASSERT_EQ(fp32ConvertedInf, std::numeric_limits::infinity()); +} + +TEST_F(PrecisionUtilsTests, FP16ToFP32NegativeInfinity) { + const auto fp32ConvertedInf = InferenceEngine::PrecisionUtils::f16tof32(negativeInf); + ASSERT_EQ(fp32ConvertedInf, -1 * std::numeric_limits::infinity()); +} + +TEST_F(PrecisionUtilsTests, FP32ToFP16MaximumValue) { + const auto fp16ConvertedMaxValue = InferenceEngine::PrecisionUtils::f32tof16(std::numeric_limits::max()); + ASSERT_EQ(fp16ConvertedMaxValue, largestNumber); +} + +TEST_F(PrecisionUtilsTests, FP32ToFP16LowestValue) { + const auto fp16ConvertedLowestValue = InferenceEngine::PrecisionUtils::f32tof16(std::numeric_limits::lowest()); + ASSERT_EQ(fp16ConvertedLowestValue, lowestNumber); +} diff --git a/inference-engine/tools/vpu/vpu_perfcheck/CMakeLists.txt b/inference-engine/tools/vpu/vpu_perfcheck/CMakeLists.txt index c098e04c39684e..b000e63c00146c 100644 --- a/inference-engine/tools/vpu/vpu_perfcheck/CMakeLists.txt +++ b/inference-engine/tools/vpu/vpu_perfcheck/CMakeLists.txt @@ -33,6 +33,7 @@ function(add_perfcheck_target TARGET_NAME PLUGIN_NAME) target_include_directories(${TARGET_NAME} SYSTEM PRIVATE "${IE_MAIN_SOURCE_DIR}/src/vpu/graph_transformer/include" + "${IE_MAIN_SOURCE_DIR}/src/plugin_api" "${IE_MAIN_SOURCE_DIR}/samples/common/samples" "${IE_MAIN_SOURCE_DIR}/samples/common/format_reader") diff --git a/inference-engine/tools/vpu/vpu_perfcheck/main.cpp b/inference-engine/tools/vpu/vpu_perfcheck/main.cpp index 43448e62c17055..d2e752582d300a 100644 --- a/inference-engine/tools/vpu/vpu_perfcheck/main.cpp +++ b/inference-engine/tools/vpu/vpu_perfcheck/main.cpp @@ -32,6 +32,7 @@ #include #include +#include #include #include @@ -145,8 +146,6 @@ class BitMap { } \ } -static short f32tof16(float x); -static float f16tof32(short x); static bool loadImage(const std::string &imageFilename, InferenceEngine::Blob::Ptr &blob); static bool loadVideo(const std::vector &imagesFolder, InferenceEngine::Blob::Ptr &blob); static bool loadBinaryTensor(const std::string &binaryFilename, InferenceEngine::Blob::Ptr &blob); @@ -593,99 +592,6 @@ int main(int argc, char *argv[]) { return -1; } -inline float asfloat(uint32_t v) { - return *reinterpret_cast(&v); -} - -#define EXP_MASK_F32 0x7F800000U -#define EXP_MASK_F16 0x7C00U - -static short f32tof16(float x) { - static float min16 = asfloat((127 - 14) << 23); - - static float max16 = asfloat(((127 + 15) << 23) | 0x007FE000); - static uint32_t max16f16 = ((15 + 15) << 10) | 0x3FF; - - union { - float f; - uint32_t u; - } v{}; - v.f = x; - - uint32_t s = (v.u >> 16) & 0x8000; - - v.u &= 0x7FFFFFFF; - - if ((v.u & EXP_MASK_F32) == EXP_MASK_F32) { - if (v.u & 0x007FFFFF) { - return s | (v.u >> (23 - 10)) | 0x0200; - } else { - return s | (v.u >> (23 - 10)); - } - } - - float halfULP = asfloat(v.u & EXP_MASK_F32) * asfloat((127 - 11) << 23); - v.f += halfULP; - - if (v.f < min16 * 0.5F) { - return s; - } - - if (v.f < min16) { - return s | (1 << 10); - } - - if (v.f >= max16) { - return max16f16 | s; - } - - v.u -= ((127 - 15) << 23); - - v.u >>= (23 - 10); - - return v.u | s; -} - -static float f16tof32(short x) { - // this is storage for output result - uint32_t u = x; - - // get sign in 32bit format - uint32_t s = ((u & 0x8000) << 16); - - // check for NAN and INF - if ((u & EXP_MASK_F16) == EXP_MASK_F16) { - // keep mantissa only - u &= 0x03FF; - - // check if it is NAN and raise 10 bit to be align with intrin - if (u) { - u |= 0x0200; - } - - u <<= (23 - 10); - u |= EXP_MASK_F32; - u |= s; - } else if ((x & EXP_MASK_F16) == 0) { // check for zero and denormals. both are converted to zero - u = s; - } else { - // abs - u = (u & 0x7FFF); - - // shift mantissa and exp from f16 to f32 position - u <<= (23 - 10); - - // new bias for exp (f16 bias is 15 and f32 bias is 127) - u += ((127 - 15) << 23); - - // add sign - u |= s; - } - - // finally represent result as float and return - return *reinterpret_cast(&u); -} - static bool loadImage(const std::string &imageFilename, InferenceEngine::Blob::Ptr &blob) { InferenceEngine::TensorDesc tensDesc = blob->getTensorDesc(); const InferenceEngine::Layout layout = tensDesc.getLayout(); @@ -737,7 +643,7 @@ static bool loadImage(const std::string &imageFilename, InferenceEngine::Blob::P int x = static_cast(std::floor((w + 0.5f) * xScale)); for (int c = 0; c < C; c++) { blobDataPtr[n * strideN + c * strideC + h * strideH + w * strideW] = - f32tof16(1.0 * RGB8[(y * img_w + x) * numImageChannels + c]); + InferenceEngine::PrecisionUtils::f32tof16(1.0 * RGB8[(y * img_w + x) * numImageChannels + c]); } } } @@ -800,7 +706,7 @@ static bool loadVideo(const std::vector &imagesFolder, InferenceEng int x = static_cast(std::floor((w + 0.5f) * xScale)); for (int c = 0; c < C; c++) { blobDataPtr[n * strideN + c * strideC + d * strideD + h * strideH + w * strideW] = - f32tof16(1.0 * RGB8[(y * img_w + x) * numImageChannels + c]); + InferenceEngine::PrecisionUtils::f32tof16(1.0 * RGB8[(y * img_w + x) * numImageChannels + c]); } } } @@ -845,7 +751,7 @@ bool loadBinaryTensor(const std::string &binaryFilename, InferenceEngine::Blob:: for (size_t i = 0; i < count; i++) { float tmp = 0.f; binaryFile.read(reinterpret_cast(&tmp), sizeof(float)); - blobDataPtr[i] = f32tof16(tmp); + blobDataPtr[i] = InferenceEngine::PrecisionUtils::f32tof16(tmp); } } else { std::cout << "loadBinaryTensor error: While reading a file an error is encountered" << std::endl; From 55f58a6e230ed4e4e84c07138723497e3592b760 Mon Sep 17 00:00:00 2001 From: Mateusz Tabaka Date: Thu, 17 Dec 2020 14:01:18 +0100 Subject: [PATCH 097/244] Fix checking input/output size in hello_reshape_ssd (#3636) --- inference-engine/samples/hello_reshape_ssd/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inference-engine/samples/hello_reshape_ssd/main.cpp b/inference-engine/samples/hello_reshape_ssd/main.cpp index 63a7cc8d6ee957..a2551dce384af3 100644 --- a/inference-engine/samples/hello_reshape_ssd/main.cpp +++ b/inference-engine/samples/hello_reshape_ssd/main.cpp @@ -45,7 +45,7 @@ int main(int argc, char* argv[]) { OutputsDataMap outputs_info(network.getOutputsInfo()); InputsDataMap inputs_info(network.getInputsInfo()); - if (inputs_info.size() != 1 && outputs_info.size() != 1) + if (inputs_info.size() != 1 || outputs_info.size() != 1) throw std::logic_error("Sample supports clean SSD network with one input and one output"); // --------------------------- Resize network to match image sizes and given batch---------------------- From be69a4de2f760c3275bc58e0090f1f0049c1d23c Mon Sep 17 00:00:00 2001 From: Rafal Blaczkowski Date: Thu, 17 Dec 2020 14:12:47 +0100 Subject: [PATCH 098/244] Enable automatic update of ONNX Model Zoo for ONNX CI (#3511) --- .ci/openvino-onnx/Jenkinsfile | 13 +- .../tests/test_onnx/model_zoo_preprocess.sh | 180 ++++++++++++------ 2 files changed, 134 insertions(+), 59 deletions(-) diff --git a/.ci/openvino-onnx/Jenkinsfile b/.ci/openvino-onnx/Jenkinsfile index 147b73afdccb5e..1f01f7d8dabf8c 100644 --- a/.ci/openvino-onnx/Jenkinsfile +++ b/.ci/openvino-onnx/Jenkinsfile @@ -77,7 +77,14 @@ def gitSubmoduleUpdate(String repository_name) { } } +def updateModels() { + sh """ + ./ngraph/python/tests/test_onnx/model_zoo_preprocess.sh -d ${HOME}/ONNX_CI/data -o + """ +} + def buildDockerImage() { + updateModels() sh """ docker build --tag=${DOCKER_IMAGE_TAG} --file=.ci/openvino-onnx/Dockerfile \ --build-arg http_proxy=http://proxy-chain.intel.com:911/ \ @@ -88,12 +95,12 @@ def buildDockerImage() { def runTests() { sh """ docker run --name ${DOCKER_CONTAINER_NAME} \ - --volume ${HOME}/ONNX_CI/onnx-models-28-Oct/.onnx/model_zoo:/root/.onnx/model_zoo \ - --volume ${HOME}/ONNX_CI/onnx-models/.onnx/model_zoo/MSFT:/root/.onnx/model_zoo/MSFT \ + --volume ${HOME}/ONNX_CI/data/model_zoo:/root/.onnx/model_zoo \ ${DOCKER_IMAGE_TAG} """ } + pipeline { agent { label "OpenVino" @@ -118,7 +125,7 @@ pipeline { } stage("Prepare Docker environment") { steps{ - dir("${WORKDIR}") { + dir("${WORKDIR}") { buildDockerImage() } } diff --git a/ngraph/python/tests/test_onnx/model_zoo_preprocess.sh b/ngraph/python/tests/test_onnx/model_zoo_preprocess.sh index 49931a400cded4..17b369a04ff304 100755 --- a/ngraph/python/tests/test_onnx/model_zoo_preprocess.sh +++ b/ngraph/python/tests/test_onnx/model_zoo_preprocess.sh @@ -1,21 +1,26 @@ #!/bin/bash set -e -MODELS_DIR=false -CLEAN_DIR=false +# provide ONNX Model Zoo commit hash ID to update: +ONNX_SHA=5c9f64f470c825ccbe1bbaa8d460c0463ff6efec + +MODELS_DIR="$HOME/.onnx/model_zoo" ENABLE_MSFT=false -CLONE=false +ENABLE_ONNX_MODELS_ZOO=false +ENABLE_MSFT_MODELS=false +FORCE_MODE=false function print_help { echo "Model preprocessing options:" echo " -h display this help message" - echo " -c clone ONNX models repository" - echo " -m

set location of the models" - echo " -f clean target directory(during clone or after enable MSFT models)" - echo " -e download and prepare MSFT models" + echo " -d set location of the models (for onnx model ZOO and MSFT models)" + printf " By default the models location is: %s\n" "$HOME/.onnx/model_zoo" + echo " -o update Onnx Model Zoo models" + echo " -m update MSFT models" + echo " -f force update of a chosen model" } -while getopts ":hcefm:" opt; do +while getopts ":homfd:" opt; do case ${opt} in h ) print_help @@ -26,69 +31,132 @@ while getopts ":hcefm:" opt; do : ) print_help ;; - c ) - CLONE=true + d ) + MODELS_DIR="$OPTARG" + ;; + o ) + ENABLE_ONNX_MODELS_ZOO=true ;; m ) - MODELS_DIR="$OPTARG" + ENABLE_MSFT_MODELS=true ;; f ) - CLEAN_DIR=true - ;; - e ) - ENABLE_MSFT=true + FORCE_MODE=true ;; esac done shift $((OPTIND -1)) -if [ "$MODELS_DIR" = false ] ; then - echo "Unknown location of the ZOO models" +MODEL_ZOO_DIR="$MODELS_DIR/model_zoo" +ONNX_MODELS_DIR="$MODEL_ZOO_DIR/onnx_model_zoo" +MSFT_MODELS_DIR="$MODEL_ZOO_DIR/MSFT" + +function pull_and_postprocess_onnx_model_zoo() { + git fetch + git reset HEAD --hard + + git checkout $ONNX_SHA + + echo "Pulling models data via Git LFS for onnx model zoo repository" + git lfs pull --include="*" --exclude="*.onnx" + find "$ONNX_MODELS_DIR" -name "*.onnx" | while read filename; do rm "$filename"; done; + + printf "Extracting tar.gz archives into %s\n" "$ONNX_MODELS_DIR" + find "$ONNX_MODELS_DIR" -name '*.tar.gz' -execdir sh -c 'BASEDIR=$(basename "{}" .tar.gz) && mkdir -p $BASEDIR' \; -execdir sh -c 'BASEDIR=$(basename "{}" .tar.gz) && tar --warning=no-unknown-keyword -xzf "{}" -C $BASEDIR' \; + + echo "Postprocessing of ONNX Model Zoo models:" + echo "Fix yolo v4 model" + cd "$ONNX_MODELS_DIR/vision/object_detection_segmentation/yolov4/model/yolov4/yolov4/test_data_set" + + mv input0.pb input_0.pb + mv input1.pb input_1.pb + mv input2.pb input_2.pb + mv output0.pb output_0.pb + mv output1.pb output_1.pb + mv output2.pb output_2.pb + + echo "Fix roberta model" + cd "$ONNX_MODELS_DIR/text/machine_comprehension/roberta/model/roberta-sequence-classification-9/roberta-sequence-classification-9" + mkdir -p test_data_set_0 + mv *.pb test_data_set_0/ + +} + +function update_onnx_models() { + if [[ ! -d $ONNX_MODELS_DIR ]] ; then + echo "The ONNX Model Zoo repository doesn't exist on your filesystem then will be cloned" + git clone https://github.com/onnx/models.git "$ONNX_MODELS_DIR" + cd "$ONNX_MODELS_DIR" + pull_and_postprocess_onnx_model_zoo + else + # Check if ONNX Model Zoo directory consists of proper git repo + git_remote_url=`git -C $ONNX_MODELS_DIR config --local remote.origin.url 2> /dev/null 2>&1` + printf "ONNX Model Zoo repository exists: %s\n" "$ONNX_MODELS_DIR" + if [[ $git_remote_url = "https://github.com/onnx/models.git" ]]; then + printf "The proper github repository detected: %s\n" "$git_remote_url" + else + echo "The ONNX Model Zoo repository doesn't exist then will be cloned" + git clone https://github.com/onnx/models.git "$ONNX_MODELS_DIR" + fi + fi + + cd "$ONNX_MODELS_DIR" + CURRENT_ONNX_MODELS_SHA=`git rev-parse HEAD` + if [[ $ONNX_SHA = $CURRENT_ONNX_MODELS_SHA ]] ; then + echo "ONNX Model Zoo repository is in the right state" + else + printf "Current onnx model zoo state is: %s \nChecking out to expected onnx model zoo state: %s \n\n" "$CURRENT_ONNX_MODELS_SHA" "$ONNX_SHA" + pull_and_postprocess_onnx_model_zoo + fi +} + +function update_msft_models() { + wget https://onnxruntimetestdata.blob.core.windows.net/models/20191107.zip -O "$MSFT_MODELS_DIR.zip" + unzip "$MSFT_MODELS_DIR.zip" -d "$MSFT_MODELS_DIR" && rm "$MSFT_MODELS_DIR.zip" + +} + +function postprocess_msft_models() { + echo "Postprocessing of MSFT models:" + + echo "Fix LSTM_Seq_lens_unpacked" + mv $MSFT_MODELS_DIR/opset9/LSTM_Seq_lens_unpacked/seq_lens_sorted $MSFT_MODELS_DIR/opset9/LSTM_Seq_lens_unpacked/test_data_set_0 + mv $MSFT_MODELS_DIR/opset9/LSTM_Seq_lens_unpacked/seq_lens_unsorted $MSFT_MODELS_DIR/opset9/LSTM_Seq_lens_unpacked/test_data_set_1 +} + +if [[ $ENABLE_ONNX_MODELS_ZOO = false ]] && [[ $ENABLE_MSFT_MODELS = false ]] ; then + printf "Please choose an option to update chosen model: + -o to update ONNX Model ZOO + -m to update MSFT models" exit 170 fi -MODEL_ZOO_DIR="$MODELS_DIR/model_zoo" -ONNX_MODELS_DIR="$MODELS_DIR/model_zoo/onnx_model_zoo" -ONNX_MODELS_COMMIT_SHA="db621492211d75cce197c5fda500fff209e8ba6a" +if [[ $MODELS_DIR = false ]] ; then + printf "Unknown location of the general models directory (onnx model ZOO and MSFT models) + Please specify the location using -d flag" + exit 170 +fi + + +# check if general model zoo directory exists (directory to store ONNX model zoo and MSFT models) +if [[ ! -d $MODEL_ZOO_DIR ]] ; then + printf "The general model directory: %s doesn't exist on your filesystem then will be created \n" "$MODEL_ZOO_DIR" + mkdir -p $MODEL_ZOO_DIR +else + printf "The general model directory: %s found\n" "$MODEL_ZOO_DIR" +fi -if [ "$CLONE" = true ] ; then - if [ "$CLEAN_DIR" = true ] ; then - rm -rf "$ONNX_MODELS_DIR" +if [[ $ENABLE_ONNX_MODELS_ZOO = true ]] ; then + if [[ $FORCE_MODE = true ]]; then + rm -rf $ONNX_MODELS_DIR fi - git clone https://github.com/onnx/models.git "$ONNX_MODELS_DIR" + update_onnx_models fi -mkdir -p "$ONNX_MODELS_DIR" -cd "$ONNX_MODELS_DIR" -# remove already downloaded models -git clean -f -x -d -git checkout . -git fetch -p -git checkout $ONNX_MODELS_COMMIT_SHA -# pull models from the lfs repository -# onnx models are included in the tar.gz archives -git lfs pull --include="*" --exclude="*.onnx" -find "$ONNX_MODELS_DIR" -name "*.onnx" | while read filename; do rm "$filename"; done; -echo "extracting tar.gz archives..." -find "$ONNX_MODELS_DIR" -name '*.tar.gz' -execdir sh -c 'BASEDIR=$(basename "{}" .tar.gz) && mkdir -p $BASEDIR' \; -execdir sh -c 'BASEDIR=$(basename "{}" .tar.gz) && tar -xzvf "{}" -C $BASEDIR' \; -# fix yolo v4 model -cd "$ONNX_MODELS_DIR/vision/object_detection_segmentation/yolov4/model/yolov4/yolov4/test_data_set" -mv input0.pb input_0.pb -mv input1.pb input_1.pb -mv input2.pb input_2.pb -mv output0.pb output_0.pb -mv output1.pb output_1.pb -mv output2.pb output_2.pb -# fix roberta model -cd "$ONNX_MODELS_DIR/text/machine_comprehension/roberta/model/roberta-sequence-classification-9/roberta-sequence-classification-9" -mkdir test_data_set_0 -mv *.pb test_data_set_0/ - -# Prepare MSFT models -if [ "$ENABLE_MSFT" = true ] ; then - if [ "$CLEAN_DIR" = true ] ; then - rm -rf "$MODEL_ZOO_DIR/MSFT" +if [[ $ENABLE_MSFT_MODELS = true ]] ; then + if [[ $FORCE_MODE = true ]]; then + rm -rf $MSFT_MODELS_DIR fi - wget https://onnxruntimetestdata.blob.core.windows.net/models/20191107.zip -O "$MODEL_ZOO_DIR/MSFT.zip" - unzip "$MODEL_ZOO_DIR/MSFT.zip" -d "$MODEL_ZOO_DIR" && rm "$MODEL_ZOO_DIR/MSFT.zip" + update_msft_models + postprocess_msft_models fi From 6d89a96d9e9f1af7e159723cb1161731f4751bd5 Mon Sep 17 00:00:00 2001 From: Katarzyna Mitrus Date: Thu, 17 Dec 2020 14:20:01 +0100 Subject: [PATCH 099/244] Ramove LSTM_Seq_lens model xfail declaration (#3635) --- ngraph/python/tests/__init__.py | 2 -- ngraph/python/tests/test_onnx/test_zoo_models.py | 1 - 2 files changed, 3 deletions(-) diff --git a/ngraph/python/tests/__init__.py b/ngraph/python/tests/__init__.py index 8ead341d75440e..aca4c4409f6479 100644 --- a/ngraph/python/tests/__init__.py +++ b/ngraph/python/tests/__init__.py @@ -195,8 +195,6 @@ def xfail_test(reason="Mark the test as expected to fail", strict=True): "Input order must have shape [n], where n is the rank of arg.") # Model MSFT issues: -xfail_issue_36465 = xfail_test(reason="LSTM_Seq_lens: RuntimeError: get_shape was called on a " - "descriptor::Tensor with dynamic shape") xfail_issue_37957 = xfail_test(reason="RuntimeError: nGraph does not support the following ONNX operations:" "com.microsoft.CropAndResize, com.microsoft.GatherND," "com.microsoft.Pad, com.microsoft.Range") diff --git a/ngraph/python/tests/test_onnx/test_zoo_models.py b/ngraph/python/tests/test_onnx/test_zoo_models.py index 5006dfc268db2d..2dd566631b0c80 100644 --- a/ngraph/python/tests/test_onnx/test_zoo_models.py +++ b/ngraph/python/tests/test_onnx/test_zoo_models.py @@ -34,7 +34,6 @@ xfail_issue_40957, xfail_issue_39685, xfail_issue_37957, - xfail_issue_36465, xfail_issue_38084, xfail_issue_39669, xfail_issue_38726, From 29f1c38ba0ae51897f47946d79d6bd6be7a494f0 Mon Sep 17 00:00:00 2001 From: Bartosz Sledz Date: Fri, 18 Dec 2020 02:30:40 +0100 Subject: [PATCH 100/244] Remove doubled Reshape operator tests and revise unittest.manifest (#3642) * Remove doubled reshape tests * Clean manifest and enable unblocked tests --- ngraph/test/backend/reshape.in.cpp | 26 ++--------------------- ngraph/test/runtime/ie/unit_test.manifest | 17 +++++++++------ 2 files changed, 12 insertions(+), 31 deletions(-) diff --git a/ngraph/test/backend/reshape.in.cpp b/ngraph/test/backend/reshape.in.cpp index 130629430b54e4..25c3518ac1ea86 100644 --- a/ngraph/test/backend/reshape.in.cpp +++ b/ngraph/test/backend/reshape.in.cpp @@ -44,7 +44,7 @@ static string s_manifest = "${MANIFEST}"; using TestEngine = test::ENGINE_CLASS_NAME(${BACKEND_NAME}); -NGRAPH_TEST(${BACKEND_NAME}, reshape_t2v_012) +NGRAPH_TEST(${BACKEND_NAME}, reshape_t2v) { Shape shape_a{2, 2, 3}; auto A = make_shared(element::f32, shape_a); @@ -67,29 +67,7 @@ NGRAPH_TEST(${BACKEND_NAME}, reshape_t2v_012) MIN_FLOAT_TOLERANCE_BITS)); } -NGRAPH_TEST(${BACKEND_NAME}, reshape_t2s_012) -{ - Shape shape_a{1, 1, 1}; - auto A = make_shared(element::f32, shape_a); - Shape shape_r{}; - auto r = make_shared( - A, op::Constant::create(element::u64, {shape_r.size()}, shape_r), false); - auto f = make_shared(r, ParameterVector{A}); - - auto backend = runtime::Backend::create("${BACKEND_NAME}"); - - // Create some tensors for input/output - auto a = backend->create_tensor(element::f32, shape_a); - copy_data(a, vector{6}); - auto result = backend->create_tensor(element::f32, shape_r); - - auto handle = backend->compile(f); - handle->call_with_validate({result}, {a}); - EXPECT_TRUE(test::all_close_f( - (vector{6}), read_vector(result), MIN_FLOAT_TOLERANCE_BITS)); -} - -NGRAPH_TEST(${BACKEND_NAME}, reshape_t2s_120) +NGRAPH_TEST(${BACKEND_NAME}, reshape_t2s) { Shape shape_a{1, 1, 1}; auto A = make_shared(element::f32, shape_a); diff --git a/ngraph/test/runtime/ie/unit_test.manifest b/ngraph/test/runtime/ie/unit_test.manifest index c3794a1893bdc7..706abec717d51b 100644 --- a/ngraph/test/runtime/ie/unit_test.manifest +++ b/ngraph/test/runtime/ie/unit_test.manifest @@ -421,13 +421,14 @@ reduce_sum_large_1d_to_scalar # Doesn't throw expected exception type. unhandled_op -# Cannot cast ngraph node Reshape_158305 to CNNLayer -transpose -slice_matrix_axis_0_in_place_with_reshape -reshape_t2v_012 -reshape_t2s_012 -reshape_t2s_120 -reshape_s2t +# Const layer Constant_6325 has incorrect dimensions in the output data 0 +reshape_t2s + +# Expected equality of these values: +# (vector{42}) +# Which is: { '*' (42, 0x2A) } +# read_vector(result) +# Which is: { '\0' } reshape_s2t1 reshape_v2m_col reshape_v2m_row @@ -924,7 +925,9 @@ broadcast_algo_matrix_stride_2 broadcast_algo_matrix_stride_3 # Cannot find blob with name: Parameter_1 +dyn_group_convolution_backprop_data dynamic_transpose +transpose # Failing from new reason after unblocking more Blob types gather_2d_negative_and_positive_indices_axis_0_2d_input From a788c02c3db15ecfbc422e8ae0af41cb0be16456 Mon Sep 17 00:00:00 2001 From: Anton Chetverikov Date: Fri, 18 Dec 2020 11:47:41 +0300 Subject: [PATCH 101/244] Actualize operations attributes (#3613) * Fix missed/redundant attrs for some operations * Align auto_pad attr values in spec * Update MO IR Reader extenders for appropriate operations * Allign auto_pad attr values for appropriate operations * Remove changes in extenders * Update backend_attrs for some operations * Changes in shape_infer functions to correct work with explicit mode * Apply offline comments --- docs/ops/convolution/ConvolutionBackpropData_1.md | 2 +- docs/ops/convolution/Convolution_1.md | 2 +- docs/ops/convolution/DeformableConvolution_1.md | 2 +- .../ops/convolution/GroupConvolutionBackpropData_1.md | 2 +- docs/ops/convolution/GroupConvolution_1.md | 2 +- docs/ops/pooling/AvgPool_1.md | 2 +- docs/ops/pooling/MaxPool_1.md | 2 +- model-optimizer/extensions/ops/elementwise.py | 9 ++++++++- model-optimizer/extensions/ops/fakequantize.py | 2 ++ model-optimizer/extensions/ops/select.py | 4 ++++ model-optimizer/mo/ops/convolution.py | 11 +++++++---- model-optimizer/mo/ops/pooling.py | 4 ++-- 12 files changed, 30 insertions(+), 14 deletions(-) diff --git a/docs/ops/convolution/ConvolutionBackpropData_1.md b/docs/ops/convolution/ConvolutionBackpropData_1.md index 472309cf07c8a7..e1bbc6bbbb46c7 100644 --- a/docs/ops/convolution/ConvolutionBackpropData_1.md +++ b/docs/ops/convolution/ConvolutionBackpropData_1.md @@ -75,7 +75,7 @@ else: * *auto_pad* * **Description**: *auto_pad* has the same definition as *auto_pad* for a regular Convolution but applied in the backward way, for the output tensor. - * None (not specified): use explicit padding values from `pads_begin` and `pads_end`. + * *explicit*: use explicit padding values from `pads_begin` and `pads_end`. * *same_upper (same_lower)* the input is padded to match the output size. In case of odd padding value an extra padding is added at the end (at the beginning). * *valid* - do not use padding. * **Type**: string diff --git a/docs/ops/convolution/Convolution_1.md b/docs/ops/convolution/Convolution_1.md index e1f9276b1584d2..e6c4ece350bc8a 100644 --- a/docs/ops/convolution/Convolution_1.md +++ b/docs/ops/convolution/Convolution_1.md @@ -70,7 +70,7 @@ n_{out} = \left ( \frac{n_{in} + 2p - k}{s} \right ) + 1 * *auto_pad* * **Description**: *auto_pad* how the padding is calculated. Possible values: - * None (not specified): use explicit padding values. + * *explicit*: use explicit padding values from `pads_begin` and `pads_end`. * *same_upper (same_lower)* the input is padded to match the output size. In case of odd padding value an extra padding is added at the end (at the beginning). * *valid* - do not use padding. * **Type**: string diff --git a/docs/ops/convolution/DeformableConvolution_1.md b/docs/ops/convolution/DeformableConvolution_1.md index 323926c873f212..247c52ea121e7e 100644 --- a/docs/ops/convolution/DeformableConvolution_1.md +++ b/docs/ops/convolution/DeformableConvolution_1.md @@ -45,7 +45,7 @@ * *auto_pad* * **Description**: *auto_pad* how the padding is calculated. Possible values: - * None (not specified): use explicit padding values. + * *explicit*: use explicit padding values from `pads_begin` and `pads_end`. * *same_upper (same_lower)* the input is padded to match the output size. In case of odd padding value an extra padding is added at the end (at the beginning). * *valid* - do not use padding. * **Type**: string diff --git a/docs/ops/convolution/GroupConvolutionBackpropData_1.md b/docs/ops/convolution/GroupConvolutionBackpropData_1.md index c3ebfcc62306cb..828629f33886e9 100644 --- a/docs/ops/convolution/GroupConvolutionBackpropData_1.md +++ b/docs/ops/convolution/GroupConvolutionBackpropData_1.md @@ -77,7 +77,7 @@ else: * *auto_pad* * **Description**: *auto_pad* has the same definition as *auto_pad* for a regular Convolution but applied in the backward way, for the output tensor. - * None (not specified): use explicit padding values from `pads_begin` and `pads_end`. + * *explicit*: use explicit padding values from `pads_begin` and `pads_end`. * *same_upper (same_lower)* the input is padded to match the output size. In case of odd padding value an extra padding is added at the end (at the beginning). * *valid* - do not use padding. * **Type**: string diff --git a/docs/ops/convolution/GroupConvolution_1.md b/docs/ops/convolution/GroupConvolution_1.md index 4c59445a526fe8..3cd78c99c7ad35 100644 --- a/docs/ops/convolution/GroupConvolution_1.md +++ b/docs/ops/convolution/GroupConvolution_1.md @@ -47,7 +47,7 @@ * *auto_pad* * **Description**: *auto_pad* how the padding is calculated. Possible values: - * None (not specified): use explicit padding values. + * *explicit*: use explicit padding values from `pads_begin` and `pads_end`. * *same_upper (same_lower)* the input is padded to match the output size. In case of odd padding value an extra padding is added at the end (at the beginning). * *valid* - do not use padding. * **Type**: string diff --git a/docs/ops/pooling/AvgPool_1.md b/docs/ops/pooling/AvgPool_1.md index 450d6188f3a8cf..c0832a1f0d9f76 100644 --- a/docs/ops/pooling/AvgPool_1.md +++ b/docs/ops/pooling/AvgPool_1.md @@ -64,7 +64,7 @@ * *auto_pad* * **Description**: *auto_pad* how the padding is calculated. Possible values: - * None (not specified): use explicit padding values. + * *explicit*: use explicit padding values from `pads_begin` and `pads_end`. * *same_upper (same_lower)* the input is padded to match the output size. In case of odd padding value an extra padding is added at the end (at the beginning). * *valid* - do not use padding. * **Type**: string diff --git a/docs/ops/pooling/MaxPool_1.md b/docs/ops/pooling/MaxPool_1.md index 6c54d387913e12..d5c8701a033e64 100644 --- a/docs/ops/pooling/MaxPool_1.md +++ b/docs/ops/pooling/MaxPool_1.md @@ -57,7 +57,7 @@ * *auto_pad* * **Description**: *auto_pad* how the padding is calculated. Possible values: - * *explicit*: use explicit padding values. + * *explicit*: use explicit padding values from `pads_begin` and `pads_end`. * *same_upper (same_lower)* the input is padded to match the output size. In case of odd padding value an extra padding is added at the end (at the beginning). * *valid* - do not use padding. * **Type**: string diff --git a/model-optimizer/extensions/ops/elementwise.py b/model-optimizer/extensions/ops/elementwise.py index 65dc693bae2f2b..ee2187fe4da42b 100644 --- a/model-optimizer/extensions/ops/elementwise.py +++ b/model-optimizer/extensions/ops/elementwise.py @@ -63,7 +63,8 @@ def __init__(self, graph: Graph, attrs: dict): 'in_ports_count': 2, 'out_ports_count': 1, 'is_eltwise': True, - 'stop_value_propagation': False + 'stop_value_propagation': False, + 'auto_broadcast': 'numpy' }, attrs) @staticmethod @@ -71,6 +72,9 @@ def type_infer(node): override_data_type_of_constant(node) node.out_port(0).set_data_type(node.in_port(0).get_data_type()) + def backend_attrs(self): + return ['auto_broadcast'] + class UnaryElementwise(Elementwise): def __init__(self, graph: Graph, attrs: dict): @@ -82,6 +86,9 @@ def __init__(self, graph: Graph, attrs: dict): def type_infer(node): copy_type_infer(node) + def backend_attrs(self): + return [] + class Add(Elementwise): op = 'Add' diff --git a/model-optimizer/extensions/ops/fakequantize.py b/model-optimizer/extensions/ops/fakequantize.py index 42b717449069df..00d48da7a4752d 100644 --- a/model-optimizer/extensions/ops/fakequantize.py +++ b/model-optimizer/extensions/ops/fakequantize.py @@ -49,6 +49,7 @@ def __init__(self, graph: Graph, attrs: dict): 'infer': self.infer, 'in_ports_count': 5, 'out_ports_count': 1, + 'auto_broadcast': 'numpy' } super().__init__(graph, mandatory_props, attrs) if self.attrs['levels'] is None: @@ -57,6 +58,7 @@ def __init__(self, graph: Graph, attrs: dict): def supported_attrs(self): return [ 'levels', + 'auto_broadcast' ] @staticmethod diff --git a/model-optimizer/extensions/ops/select.py b/model-optimizer/extensions/ops/select.py index 09d541a2b0a3d4..fd298e10a8e31f 100644 --- a/model-optimizer/extensions/ops/select.py +++ b/model-optimizer/extensions/ops/select.py @@ -33,9 +33,13 @@ def __init__(self, graph: Graph, attrs: dict): 'out_ports_count': 1, 'infer': __class__.infer, 'type_infer': __class__.type_infer, + 'auto_broadcast': 'numpy' } super().__init__(graph, mandatory_props, attrs) + def backend_attrs(self): + return ['auto_broadcast'] + @staticmethod def infer(node: Node): assert len([port for port in node.in_ports().values() if not port.disconnected()]) == 3, "Select operation must have 3 inputs:" \ diff --git a/model-optimizer/mo/ops/convolution.py b/model-optimizer/mo/ops/convolution.py index 6082240cdbf0ac..5320f14a937f22 100644 --- a/model-optimizer/mo/ops/convolution.py +++ b/model-optimizer/mo/ops/convolution.py @@ -48,18 +48,21 @@ def pad_attribute_helper(node: Node, pad_type: str='begin'): if not node.has_valid('pad'): return None pad = get_backend_pad(node.pad, node.spatial_dims, 0 if pad_type == 'begin' else 1) - if node.has_valid('auto_pad'): + if node.has_valid('auto_pad') and node.auto_pad != 'explicit': pad = [0 for _ in pad] return ','.join(map(str, pad)) return [ - 'auto_pad', + ('auto_pad', lambda node: node.auto_pad if node.has_valid('auto_pad') else 'explicit'), ('strides', lambda node: ','.join(map(str, node['stride'][node.spatial_dims]))), ('dilations', lambda node: ','.join(map(str, node['dilation'][node.spatial_dims]))), ('pads_begin', lambda node: pad_attribute_helper(node, 'begin')), ('pads_end', lambda node: pad_attribute_helper(node, 'end')), + + # for Backpropdata operations only - according to spec ('output_padding', lambda node: ','.join(map(str, node.output_padding[node.spatial_dims])) \ - if node.has_valid('output_padding') else None), + if node.has_valid('output_padding') and node.type in + ('GroupConvolutionBackpropData', 'ConvolutionBackpropData') else None), # for BinaryConvolution only 'pad_value', @@ -187,7 +190,7 @@ def infer(node: Node): # TensorFlow always has auto_pad attribute that can be either valid or same_upper # In ONNX auto_pad attribute is deprecated but appears in some models (could be valid, same_upper or same_lower) # Caffe do not use auto_pad attribute - if node.has_valid('auto_pad') and not node.has_valid('output_spatial_shape'): + if node.has_valid('auto_pad') and node.auto_pad != 'explicit' and not node.has_valid('output_spatial_shape'): node['pad_spatial_shape'], node['output_spatial_shape'] = tf_window_op_pad_infer(input_spatial_shape, kernel_extent, stride_spatial_shape, diff --git a/model-optimizer/mo/ops/pooling.py b/model-optimizer/mo/ops/pooling.py index 0d65a9240e270f..f8bc2c7f922b38 100644 --- a/model-optimizer/mo/ops/pooling.py +++ b/model-optimizer/mo/ops/pooling.py @@ -48,7 +48,7 @@ def backend_attrs(self): ('exclude-pad', 'exclude_pad'), 'rounding_type', - 'auto_pad', + ('auto_pad', lambda node: node.auto_pad if node.has_valid('auto_pad') else 'explicit'), ] @staticmethod @@ -80,7 +80,7 @@ def infer(node: Node): stride_spatial = node.stride[node.spatial_dims] assert any(stride_spatial), 'Stride can not be zero in node {}'.format(node.id) - if node.has_valid('auto_pad'): + if node.has_valid('auto_pad') and node.auto_pad != 'explicit': node.pad_spatial_shape, node.output_spatial_shape = tf_window_op_pad_infer(input_spatial_shape, window_spatial_shape, stride_spatial, node.auto_pad) From 129a6553fa34521888ec2dc0605098e67c8ddc4b Mon Sep 17 00:00:00 2001 From: Anton Chetverikov Date: Mon, 21 Dec 2020 14:05:41 +0300 Subject: [PATCH 102/244] soft_get fix (#3662) --- model-optimizer/mo/back/ie_ir_ver_2/emitter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model-optimizer/mo/back/ie_ir_ver_2/emitter.py b/model-optimizer/mo/back/ie_ir_ver_2/emitter.py index 9449026243f745..68ed23ef2a502c 100644 --- a/model-optimizer/mo/back/ie_ir_ver_2/emitter.py +++ b/model-optimizer/mo/back/ie_ir_ver_2/emitter.py @@ -441,7 +441,7 @@ def port_renumber(graph: Graph): for node in graph.get_op_nodes(): base = 0 # we need to check operation type, if it is const op, we don't renumber out ports to count them from zero - if node.type != 'Const': + if node.soft_get('type') != 'Const': for u, d in node.get_sorted_inputs(): d['in'] = base base += 1 From c6bfac6e05130a389e5bb89fa15f42ccf04298fc Mon Sep 17 00:00:00 2001 From: Evgeny Lazarev Date: Mon, 21 Dec 2020 14:21:39 +0300 Subject: [PATCH 103/244] Enable TF 2.0 Object Detection API models (#3556) * Config for TF 2.0 Faster R-CNN models, refactored subgraph_between_nodes to use graph API * Added support for new type of Preprocessing block in the TF 2.0 OD API models. Various fixes to enable the Faster R-CNN ResNet 50 * Updated text comments * Fixed sub_graph_between_nodes for TensorIteratorMerge. Added support for the TF 2.X EfficientDet models (not yet reshape-able) * Fixed unit tests * Fixed regression for TF 1.X OD API SSD model, enabled TF 2.0 OD API SSD models * Code clean up * Switched TF 2.0 OD API Faster R-CNN to preprocessor replacement type 2 * Refactored ObjectDetectionAPIPreprocessorReplacement and ObjectDetectionAPIPreprocessor2Replacement * Fixed bug in the Div transformation to Mul when input is integer. * Added support for the TF 2.0 OD API Mask R-CNN * Added unit tests for Div operation. Updated incorrectly modified mask_rcnn_support_api_v1.14.json * Updated document with list of supported configuration files for TF OD API models * Review comments * Added tests for control flow edges for the sub_graph_between_nodes function * Two more tests --- .../Convert_Object_Detection_API_Models.md | 32 +-- model-optimizer/automation/package_BOM.txt | 6 +- model-optimizer/extensions/front/div.py | 5 + model-optimizer/extensions/front/div_test.py | 18 ++ .../extensions/front/tf/ObjectDetectionAPI.py | 213 ++++++++++++------ .../tf/efficient_det_support_api_v2.0.json | 50 ++++ .../tf/faster_rcnn_support_api_v2.0.json | 82 +++++++ .../front/tf/mask_rcnn_support_api_v1.11.json | 3 +- .../front/tf/mask_rcnn_support_api_v1.13.json | 3 +- .../front/tf/mask_rcnn_support_api_v1.14.json | 3 +- .../front/tf/mask_rcnn_support_api_v1.15.json | 1 + .../front/tf/mask_rcnn_support_api_v1.7.json | 3 +- .../front/tf/mask_rcnn_support_api_v2.0.json | 91 ++++++++ .../front/tf/ssd_support_api_v2.0.json | 50 ++++ model-optimizer/mo/front/subgraph_matcher.py | 2 +- .../mo/utils/custom_replacement_config.py | 2 +- model-optimizer/mo/utils/graph.py | 37 +-- model-optimizer/mo/utils/graph_test.py | 56 +++++ model-optimizer/mo/utils/pipeline_config.py | 3 + .../mo/utils/pipeline_config_test.py | 3 + model-optimizer/mo/utils/version_test.py | 5 +- 21 files changed, 559 insertions(+), 109 deletions(-) create mode 100644 model-optimizer/extensions/front/tf/efficient_det_support_api_v2.0.json create mode 100644 model-optimizer/extensions/front/tf/faster_rcnn_support_api_v2.0.json create mode 100644 model-optimizer/extensions/front/tf/mask_rcnn_support_api_v2.0.json create mode 100644 model-optimizer/extensions/front/tf/ssd_support_api_v2.0.json diff --git a/docs/MO_DG/prepare_model/convert_model/tf_specific/Convert_Object_Detection_API_Models.md b/docs/MO_DG/prepare_model/convert_model/tf_specific/Convert_Object_Detection_API_Models.md index d0e310088e091e..a7880220c94af6 100644 --- a/docs/MO_DG/prepare_model/convert_model/tf_specific/Convert_Object_Detection_API_Models.md +++ b/docs/MO_DG/prepare_model/convert_model/tf_specific/Convert_Object_Detection_API_Models.md @@ -8,29 +8,33 @@ With 2018 R3 release, the Model Optimizer introduces a new approach to convert models created using the TensorFlow\* Object Detection API. Compared with the previous approach, the new process produces inference results with higher accuracy and does not require modifying any configuration files and providing intricate command line parameters. -You can download TensorFlow\* Object Detection API models from the Object Detection Model Zoo. +You can download TensorFlow\* Object Detection API models from the TensorFlow 1 Detection Model Zoo +or TensorFlow 2 Detection Model Zoo. NOTE: Before converting, make sure you have configured the Model Optimizer. For configuration steps, refer to [Configuring the Model Optimizer](../../Config_Model_Optimizer.md). To convert a TensorFlow\* Object Detection API model, go to the `/deployment_tools/model_optimizer` directory and run the `mo_tf.py` script with the following required parameters: -* `--input_model ` --- File with a pre-trained model (binary or text .pb file after freezing) +* `--input_model ` --- File with a pre-trained model (binary or text .pb file after freezing) OR `--saved_model_dir ` for the TensorFlow\* 2 models * `--transformations_config ` --- A subgraph replacement configuration file with transformations description. For the models downloaded from the TensorFlow\* Object Detection API zoo, you can find the configuration files in the `/deployment_tools/model_optimizer/extensions/front/tf` directory. Use: * `ssd_v2_support.json` --- for frozen SSD topologies from the models zoo version up to 1.13.X inclusively - * `ssd_support_api_v.1.14.json` --- for frozen SSD topologies trained manually using the TensorFlow* Object Detection API version 1.14 up to 1.14.X inclusively - * `ssd_support_api_v.1.15.json` --- for frozen SSD topologies trained manually using the TensorFlow* Object Detection API version 1.15 or higher + * `ssd_support_api_v.1.14.json` --- for frozen SSD topologies trained using the TensorFlow\* Object Detection API version 1.14 up to 1.14.X inclusively + * `ssd_support_api_v.1.15.json` --- for frozen SSD topologies trained using the TensorFlow\* Object Detection API version 1.15 up to 2.0 + * `ssd_support_api_v.2.0.json` --- for frozen SSD topologies trained using the TensorFlow\* Object Detection API version 2.0 or higher * `faster_rcnn_support.json` --- for frozen Faster R-CNN topologies from the models zoo - * `faster_rcnn_support_api_v1.7.json` --- for Faster R-CNN topologies trained manually using the TensorFlow* Object Detection API version 1.7.0 up to 1.9.X inclusively - * `faster_rcnn_support_api_v1.10.json` --- for Faster R-CNN topologies trained manually using the TensorFlow* Object Detection API version 1.10.0 up to 1.12.X inclusively - * `faster_rcnn_support_api_v1.13.json` --- for Faster R-CNN topologies trained manually using the TensorFlow* Object Detection API version 1.13.X - * `faster_rcnn_support_api_v1.14.json` --- for Faster R-CNN topologies trained manually using the TensorFlow* Object Detection API version 1.14.0 up to 1.14.X inclusively - * `faster_rcnn_support_api_v1.15.json` --- for Faster R-CNN topologies trained manually using the TensorFlow* Object Detection API version 1.15.0 or higher + * `faster_rcnn_support_api_v1.7.json` --- for Faster R-CNN topologies trained using the TensorFlow\* Object Detection API version 1.7.0 up to 1.9.X inclusively + * `faster_rcnn_support_api_v1.10.json` --- for Faster R-CNN topologies trained using the TensorFlow\* Object Detection API version 1.10.0 up to 1.12.X inclusively + * `faster_rcnn_support_api_v1.13.json` --- for Faster R-CNN topologies trained using the TensorFlow\* Object Detection API version 1.13.X + * `faster_rcnn_support_api_v1.14.json` --- for Faster R-CNN topologies trained using the TensorFlow\* Object Detection API version 1.14.0 up to 1.14.X inclusively + * `faster_rcnn_support_api_v1.15.json` --- for Faster R-CNN topologies trained using the TensorFlow\* Object Detection API version 1.15.0 up to 2.0 + * `faster_rcnn_support_api_v2.0.json` --- for Faster R-CNN topologies trained using the TensorFlow\* Object Detection API version 2.0 or higher * `mask_rcnn_support.json` --- for frozen Mask R-CNN topologies from the models zoo - * `mask_rcnn_support_api_v1.7.json` --- for Mask R-CNN topologies trained manually using the TensorFlow* Object Detection API version 1.7.0 up to 1.9.X inclusively - * `mask_rcnn_support_api_v1.11.json` --- for Mask R-CNN topologies trained manually using the TensorFlow* Object Detection API version 1.11.0 up to 1.12.X inclusively - * `mask_rcnn_support_api_v1.13.json` --- for Mask R-CNN topologies trained manually using the TensorFlow* Object Detection API version 1.13.0 up to 1.13.X inclusively - * `mask_rcnn_support_api_v1.14.json` --- for Mask R-CNN topologies trained manually using the TensorFlow* Object Detection API version 1.14.0 up to 1.14.X inclusively - * `mask_rcnn_support_api_v1.15.json` --- for Mask R-CNN topologies trained manually using the TensorFlow* Object Detection API version 1.15.0 or higher + * `mask_rcnn_support_api_v1.7.json` --- for Mask R-CNN topologies trained using the TensorFlow\* Object Detection API version 1.7.0 up to 1.9.X inclusively + * `mask_rcnn_support_api_v1.11.json` --- for Mask R-CNN topologies trained using the TensorFlow\* Object Detection API version 1.11.0 up to 1.12.X inclusively + * `mask_rcnn_support_api_v1.13.json` --- for Mask R-CNN topologies trained using the TensorFlow\* Object Detection API version 1.13.0 up to 1.13.X inclusively + * `mask_rcnn_support_api_v1.14.json` --- for Mask R-CNN topologies trained using the TensorFlow\* Object Detection API version 1.14.0 up to 1.14.X inclusively + * `mask_rcnn_support_api_v1.15.json` --- for Mask R-CNN topologies trained using the TensorFlow\* Object Detection API version 1.15.0 up to 2.0 + * `mask_rcnn_support_api_v2.0.json` --- for Mask R-CNN topologies trained using the TensorFlow\* Object Detection API version 2.0 or higher * `rfcn_support.json` --- for the frozen RFCN topology from the models zoo frozen with TensorFlow\* version 1.9.0 or lower. * `rfcn_support_api_v1.10.json` --- for the frozen RFCN topology from the models zoo frozen with TensorFlow\* version 1.10.0 up to 1.12.X inclusively * `rfcn_support_api_v1.13.json` --- for the frozen RFCN topology from the models zoo frozen with TensorFlow\* version 1.13.X. diff --git a/model-optimizer/automation/package_BOM.txt b/model-optimizer/automation/package_BOM.txt index 34a3f8ffbd40a9..01b755e3c2be9f 100644 --- a/model-optimizer/automation/package_BOM.txt +++ b/model-optimizer/automation/package_BOM.txt @@ -373,6 +373,7 @@ extensions/front/tf/CTCLossReplacement.py extensions/front/tf/cumsum_ext.py extensions/front/tf/deconv_ext.py extensions/front/tf/depth_to_space.py +extensions/front/tf/efficient_det_support_api_v2.0.json extensions/front/tf/elementwise_ext.py extensions/front/tf/embedding_segments_sum.py extensions/front/tf/expand_dims_ext.py @@ -386,6 +387,7 @@ extensions/front/tf/faster_rcnn_support_api_v1.13.json extensions/front/tf/faster_rcnn_support_api_v1.14.json extensions/front/tf/faster_rcnn_support_api_v1.15.json extensions/front/tf/faster_rcnn_support_api_v1.7.json +extensions/front/tf/faster_rcnn_support_api_v2.0.json extensions/front/tf/fifo_queue_v2_ext.py extensions/front/tf/fifo_replacer.py extensions/front/tf/fill_ext.py @@ -410,6 +412,7 @@ extensions/front/tf/mask_rcnn_support_api_v1.13.json extensions/front/tf/mask_rcnn_support_api_v1.14.json extensions/front/tf/mask_rcnn_support_api_v1.15.json extensions/front/tf/mask_rcnn_support_api_v1.7.json +extensions/front/tf/mask_rcnn_support_api_v2.0.json extensions/front/tf/matmul_ext.py extensions/front/tf/mvn.py extensions/front/tf/mvn_unrolled.py @@ -457,6 +460,7 @@ extensions/front/tf/split_ext.py extensions/front/tf/ssd_support.json extensions/front/tf/ssd_support_api_v1.14.json extensions/front/tf/ssd_support_api_v1.15.json +extensions/front/tf/ssd_support_api_v2.0.json extensions/front/tf/ssd_toolbox_detection_output.json extensions/front/tf/ssd_toolbox_multihead_detection_output.json extensions/front/tf/ssd_v2_support.json @@ -1011,4 +1015,4 @@ requirements_kaldi.txt requirements_mxnet.txt requirements_onnx.txt requirements_tf.txt -requirements_tf2.txt \ No newline at end of file +requirements_tf2.txt diff --git a/model-optimizer/extensions/front/div.py b/model-optimizer/extensions/front/div.py index b31a1d45ed77f2..1c0f875ee44f11 100644 --- a/model-optimizer/extensions/front/div.py +++ b/model-optimizer/extensions/front/div.py @@ -33,6 +33,11 @@ def div_to_mul_replacement(div: Node): if div.in_port(0).data.get_value() is not None and div.in_port(1).data.get_value() is not None: return + # cannot replace Div with Mul when the divisor is integer because the reciprocal number will be 0 + value = div.in_port(1).data.get_value() + if value is not None and type(value.item(0)) == int: + return + graph = div.graph name = div.soft_get('name', div.id) diff --git a/model-optimizer/extensions/front/div_test.py b/model-optimizer/extensions/front/div_test.py index 0c85ff289d7588..e06f08208d7101 100644 --- a/model-optimizer/extensions/front/div_test.py +++ b/model-optimizer/extensions/front/div_test.py @@ -78,3 +78,21 @@ def test_div_test_2(self): (flag, resp) = compare_graphs(graph, graph_ref, 'output', check_op_attrs=True) self.assertTrue(flag, resp) self.assertTrue(graph.node[graph.get_nodes_with_attributes(type='Multiply')[0]]['name'] == 'my_div') + + def test_div_with_integer(self): + # Test where transformation should not be applied because the divisor is integer + graph = build_graph({ + **regular_op_with_shaped_data('parameter', [1, 227, 227, 3], {'type': 'Parameter', 'data_type': np.int32}), + **valued_const_with_data('const', np.array([-1.], dtype=np.int32)), + **regular_op_with_shaped_data('div', None, {'op': 'Div', 'type': 'Divide', 'name': 'my_div'}), + **result()}, + [ + *connect('parameter:0', '0:div'), + *connect_data('const:0', '1:div'), + *connect('div', 'output'), + ]) + graph_ref = graph.copy() + Div().find_and_replace_pattern(graph) + + (flag, resp) = compare_graphs(graph, graph_ref, 'output', check_op_attrs=True) + self.assertTrue(flag, resp) diff --git a/model-optimizer/extensions/front/tf/ObjectDetectionAPI.py b/model-optimizer/extensions/front/tf/ObjectDetectionAPI.py index 125aa8f9aaa542..33940be9df6328 100644 --- a/model-optimizer/extensions/front/tf/ObjectDetectionAPI.py +++ b/model-optimizer/extensions/front/tf/ObjectDetectionAPI.py @@ -240,7 +240,8 @@ def _create_prior_boxes_node(graph: Graph, pipeline_config: PipelineConfig): # connect the PriorBoxClustered node with the "Cast" node of the Placeholder node because the pass that removes # Cast operations is executed in the middle phase and it will fail when there are several consumers of the # Placeholder - prior_box_node = prior_box_op.create_node([ssd_head_node, Node(graph, 'image_tensor').out_node(0)], + input_node_name = 'image_tensor' if 'image_tensor' in graph.nodes else 'input_tensor' + prior_box_node = prior_box_op.create_node([ssd_head_node, Node(graph, input_node_name).out_node(0)], {'name': 'PriorBoxClustered_{}'.format(ssd_head_ind)}) prior_box_nodes.append(prior_box_node) if len(prior_box_nodes) == 1: @@ -399,16 +400,17 @@ def calculate_placeholder_spatial_shape(graph: Graph, match: SubgraphMatch, pipe width = None user_shapes = graph.graph['user_shapes'] - if 'preprocessed_image_height' in match.custom_replacement_desc.custom_attributes or 'preprocessed_image_width' in \ - match.custom_replacement_desc.custom_attributes: + if match and ('preprocessed_image_height' in match.custom_replacement_desc.custom_attributes or + 'preprocessed_image_width' in match.custom_replacement_desc.custom_attributes): log.error('The "preprocessed_image_height" or "preprocessed_image_width" is specified in the sub-graph ' 'replacement configuration file but they are ignored. Please, specify desired input shape using the ' '"--input_shape" command line parameter.', extra={'is_warning': True}) user_defined_height = None user_defined_width = None - if user_shapes and 'image_tensor' in user_shapes and user_shapes['image_tensor']: - user_defined_shape = user_shapes['image_tensor'][0]['shape'] + input_name = 'input_tensor' if 'input_tensor' in graph.nodes else 'image_tensor' + if user_shapes and input_name in user_shapes and user_shapes[input_name]: + user_defined_shape = user_shapes[input_name][0]['shape'] if user_defined_shape is not None: user_defined_height = user_defined_shape[1] user_defined_width = user_defined_shape[2] @@ -464,6 +466,43 @@ def calculate_placeholder_spatial_shape(graph: Graph, match: SubgraphMatch, pipe return height, width +def update_parameter_shape(graph: Graph, match: [SubgraphMatch, None]): + """ + Updates the shape of the model Parameter node based on the user provided input shape or values provided in the + pipeline.config configuration file used for model training. + :param graph: model graph + :param match: Match object with information abouot matched sub-graph + :return: tupe with input node names and Parameter Node + """ + argv = graph.graph['cmd_params'] + if argv.tensorflow_object_detection_api_pipeline_config is None: + raise Error(missing_param_error) + + pipeline_config = PipelineConfig(argv.tensorflow_object_detection_api_pipeline_config) + if argv.tensorflow_object_detection_api_pipeline_config is None: + raise Error(missing_param_error) + + initial_input_node_name = 'input_tensor' if 'input_tensor' in graph.nodes else 'image_tensor' + if initial_input_node_name not in graph.nodes(): + raise Error('Input node "{}" of the graph is not found. Do not run the Model Optimizer with ' + '"--input" command line parameter.'.format(initial_input_node_name)) + parameter_node = Node(graph, initial_input_node_name) + + # set default value of the batch size to 1 if user didn't specify batch size and input shape + layout = graph.graph['layout'] + batch_dim = get_batch_dim(layout, 4) + if argv.batch is None and parameter_node.shape[batch_dim] == -1: + parameter_node.shape[batch_dim] = 1 + height, width = calculate_placeholder_spatial_shape(graph, match, pipeline_config) + parameter_node.shape[get_height_dim(layout, 4)] = height + parameter_node.shape[get_width_dim(layout, 4)] = width + + # save the pre-processed image spatial sizes to be used in the other replacers + graph.graph['preprocessed_image_height'] = parameter_node.shape[get_height_dim(layout, 4)] + graph.graph['preprocessed_image_width'] = parameter_node.shape[get_width_dim(layout, 4)] + return initial_input_node_name, parameter_node + + class ObjectDetectionAPIPreprocessorReplacement(FrontReplacementFromConfigFileSubGraph): """ The class replaces the "Preprocessor" block resizing input image and applying mean/scale values. Only nodes related @@ -504,12 +543,6 @@ def is_preprocessing_applied_before_resize(self, to_float: Node, mul: Node, sub: return any([port.node.id == sub.id for port in to_float.out_port(0).get_destinations()]) def generate_sub_graph(self, graph: Graph, match: SubgraphMatch): - argv = graph.graph['cmd_params'] - layout = graph.graph['layout'] - if argv.tensorflow_object_detection_api_pipeline_config is None: - raise Error(missing_param_error) - pipeline_config = PipelineConfig(argv.tensorflow_object_detection_api_pipeline_config) - sub_node = match.output_node(0)[0] if sub_node.soft_get('op') != 'Sub': raise Error('The output op of the Preprocessor sub-graph is not of type "Sub". Looks like the topology is ' @@ -520,23 +553,7 @@ def generate_sub_graph(self, graph: Graph, match: SubgraphMatch): log.info('There is image scaling node in the Preprocessor block.') mul_node = sub_node.in_port(0).get_source().node - initial_input_node_name = 'image_tensor' - if initial_input_node_name not in graph.nodes(): - raise Error('Input node "{}" of the graph is not found. Do not run the Model Optimizer with ' - '"--input" command line parameter.'.format(initial_input_node_name)) - placeholder_node = Node(graph, initial_input_node_name) - - # set default value of the batch size to 1 if user didn't specify batch size and input shape - batch_dim = get_batch_dim(layout, 4) - if argv.batch is None and placeholder_node.shape[batch_dim] == -1: - placeholder_node.shape[batch_dim] = 1 - height, width = calculate_placeholder_spatial_shape(graph, match, pipeline_config) - placeholder_node.shape[get_height_dim(layout, 4)] = height - placeholder_node.shape[get_width_dim(layout, 4)] = width - - # save the pre-processed image spatial sizes to be used in the other replacers - graph.graph['preprocessed_image_height'] = placeholder_node.shape[get_height_dim(layout, 4)] - graph.graph['preprocessed_image_width'] = placeholder_node.shape[get_width_dim(layout, 4)] + initial_input_node_name, placeholder_node = update_parameter_shape(graph, match) to_float_node = placeholder_node.out_port(0).get_destination().node if to_float_node.soft_get('op') != 'Cast': @@ -563,6 +580,41 @@ def generate_sub_graph(self, graph: Graph, match: SubgraphMatch): return {} +class ObjectDetectionAPIPreprocessor2Replacement(FrontReplacementFromConfigFileGeneral): + """ + The class replaces the "Preprocessor" block resizing input image and applying mean/scale values. Only nodes related + to applying mean/scaling values are kept. The transformation is used for TensorFlow 2.X models. + """ + replacement_id = 'ObjectDetectionAPIPreprocessor2Replacement' + + def run_before(self): + # PadTFToPad inserts Transpose ops for Pad ops inside the sub-graph corresponding to DetectionOutput. + # But the inputs corresponding to padding values is re-used as inputs for newly created Pad node. This input + # is removed during removing nodes from the DO sub-graph so the first input to Transpose is missing which + # results in TransposeOrderNormalizer transformation failure. + return [Pack, TransposeOrderNormalizer, PadTFToPad] + + def transform_graph(self, graph: Graph, replacement_descriptions: dict): + update_parameter_shape(graph, None) + + start_nodes = replacement_descriptions['start_nodes'] + end_nodes = replacement_descriptions['end_nodes'] + + assert len(start_nodes) >= 1 + assert start_nodes[0] in graph.nodes + input_node = Node(graph, start_nodes[0]) + + assert len(end_nodes) >= 1 + assert end_nodes[0] in graph.nodes + output_node = Node(graph, end_nodes[0]) + + output_node.out_port(0).get_connection().set_source(input_node.in_port(0).get_source()) + input_node.in_port(0).disconnect() + + print('The Preprocessor block has been removed. Only nodes performing mean value subtraction and scaling (if' + ' applicable) are kept.') + + class ObjectDetectionAPIDetectionOutputReplacement(FrontReplacementFromConfigFileSubGraph): """ Replaces the sub-graph that is equal to the DetectionOutput layer from Inference Engine. This replacer is used for @@ -606,6 +658,7 @@ def generate_sub_graph(self, graph: Graph, match: SubgraphMatch): if argv.tensorflow_object_detection_api_pipeline_config is None: raise Error(missing_param_error) pipeline_config = PipelineConfig(argv.tensorflow_object_detection_api_pipeline_config) + custom_attributes = match.custom_replacement_desc.custom_attributes num_classes = _value_or_raise(match, pipeline_config, 'num_classes') max_proposals = _value_or_raise(match, pipeline_config, 'first_stage_max_proposals') @@ -630,18 +683,27 @@ def generate_sub_graph(self, graph: Graph, match: SubgraphMatch): current_node = skip_nodes_by_condition(match.single_input_node(0)[0].in_node(0), lambda x: x['kind'] == 'op' and x.has_and_set('reinterp_shape')) - reshape_loc_node = create_op_node_with_second_input(graph, Reshape, int64_array([-1, num_classes, 1, 4]), - dict(name='reshape_loc'), current_node) + share_box_across_classes = _value_or_raise(match, pipeline_config, 'share_box_across_classes') + background_label_id = int(custom_attributes.get('background_label_id', 0)) + if share_box_across_classes: + reshape_loc_node = create_op_node_with_second_input(graph, Reshape, int64_array([-1, 1, 1, 4]), + dict(name='reshape_loc'), current_node) + else: + reshape_loc_node = create_op_node_with_second_input(graph, Reshape, int64_array([-1, num_classes, 1, 4]), + dict(name='reshape_loc'), current_node) mark_as_correct_data_layout(reshape_loc_node) # constant node with variances variances_const_op = Const(graph, dict(value=_variance_from_pipeline_config(pipeline_config))) variances_const_node = variances_const_op.create_node([]) - # TF produces locations tensor without boxes for background. - # Inference Engine DetectionOutput layer requires background boxes so we generate them - loc_node = add_fake_background_loc(graph, reshape_loc_node) - PermuteAttrs.set_permutation(reshape_loc_node, loc_node, None) + if share_box_across_classes: + loc_node = reshape_loc_node + else: + # TF produces locations tensor without boxes for background. + # Inference Engine DetectionOutput layer requires background boxes so we generate them + loc_node = add_fake_background_loc(graph, reshape_loc_node) + PermuteAttrs.set_permutation(reshape_loc_node, loc_node, None) # reshape locations tensor to 2D so it could be passed to Eltwise which will be converted to ScaleShift reshape_loc_2d_node = create_op_node_with_second_input(graph, Reshape, int64_array([-1, 4]), @@ -659,7 +721,6 @@ def generate_sub_graph(self, graph: Graph, match: SubgraphMatch): # calculate the second dimension so the batch value will be deduced from it with help of "-1". reshape_loc_do_op = Reshape(graph, dict(name='do_reshape_locs')) - custom_attributes = match.custom_replacement_desc.custom_attributes coordinates_swap_method = 'add_convolution' if 'coordinates_swap_method' not in custom_attributes: log.error('The ObjectDetectionAPIDetectionOutputReplacement sub-graph replacement configuration file ' @@ -683,8 +744,12 @@ def generate_sub_graph(self, graph: Graph, match: SubgraphMatch): else: reshape_loc_do_node = reshape_loc_do_op.create_node([eltwise_locs_node]) - reshape_loc_do_dims = Const(graph, {'value': int64_array([-1, (num_classes + 1) * max_proposals * 4]), - 'name': reshape_loc_do_node.name + '/Dim'}).create_node() + if share_box_across_classes: + reshape_loc_do_dims = Const(graph, {'value': int64_array([-1, max_proposals * 4]), + 'name': reshape_loc_do_node.name + '/Dim'}).create_node() + else: + reshape_loc_do_dims = Const(graph, {'value': int64_array([-1, (num_classes + 1) * max_proposals * 4]), + 'name': reshape_loc_do_node.name + '/Dim'}).create_node() reshape_loc_do_dims.out_port(0).connect(reshape_loc_do_node.in_port(1)) mark_as_correct_data_layout(reshape_loc_do_node) @@ -716,7 +781,10 @@ def generate_sub_graph(self, graph: Graph, match: SubgraphMatch): detection_output_node = detection_output_op.create_node( [reshape_loc_do_node, reshape_conf_node, reshape_priors_node], - dict(name=detection_output_op.attrs['type'], share_location=0, variance_encoded_in_target=1, + dict(name=detection_output_op.attrs['type'], + share_location=int(share_box_across_classes), + variance_encoded_in_target=1, + background_label_id=background_label_id, code_type='caffe.PriorBoxParameter.CENTER_SIZE', pad_mode='caffe.ResizeParameter.CONSTANT', resize_mode='caffe.ResizeParameter.WARP', num_classes=num_classes, @@ -730,12 +798,15 @@ def generate_sub_graph(self, graph: Graph, match: SubgraphMatch): if coordinates_swap_method == 'swap_weights': swap_weights_xy(graph, backward_bfs_for_operation(detection_output_node.in_node(0), ['MatMul', 'Conv2D'])) + # when the use_matmul_crop_and_resize = True then the prior boxes were not swapped and we need to swap them from + # YXYX to XYXY before passing to the DetectionOutput operation + if pipeline_config.get_param('use_matmul_crop_and_resize'): + insert_weights_swap_xy_sub_graph(graph, detection_output_node.in_port(2).get_connection()) output_op = Result(graph, dict(name='do_OutputOp')) output_op.create_node([detection_output_node]) - print('The graph output nodes "num_detections", "detection_boxes", "detection_classes", "detection_scores" ' - 'have been replaced with a single layer of type "Detection Output". Refer to IR catalogue in the ' - 'documentation for information about this layer.') + print('The graph output nodes have been replaced with a single layer of type "DetectionOutput". Refer to the ' + 'operation set specification documentation for more information about the operation.') return {'detection_output_node': detection_output_node} @@ -818,17 +889,18 @@ def run_after(self): return [ObjectDetectionAPIMaskRCNNROIPoolingSecondReplacement] def transform_graph(self, graph: Graph, replacement_descriptions): + masks_node_prefix_name = replacement_descriptions.get('masks_node_prefix_name', 'SecondStageBoxPredictor') op_outputs = graph.get_op_nodes(op='Result') for op_output in op_outputs: last_node = op_output.in_port(0).get_source().node - if last_node.name.startswith('SecondStageBoxPredictor'): + if last_node.name.startswith(masks_node_prefix_name): sigmoid_node = Sigmoid(graph, dict(name='masks')).create_node() op_output.in_port(0).get_connection().insert_node(sigmoid_node) print('The predicted masks are produced by the "masks" layer for each bounding box generated with a ' - '"detection_output" layer.\n Refer to IR catalogue in the documentation for information ' - 'about the DetectionOutput layer and Inference Engine documentation about output data interpretation.\n' - 'The topology can be inferred using dedicated demo "mask_rcnn_demo".') + '"detection_output" operation.\n Refer to operation specification in the documentation for information ' + 'about the DetectionOutput operation output data interpretation.\n' + 'The model can be inferred using the dedicated demo "mask_rcnn_demo" from the OpenVINO Open Model Zoo.') class ObjectDetectionAPIProposalReplacement(FrontReplacementFromConfigFileSubGraph): @@ -840,10 +912,10 @@ class ObjectDetectionAPIProposalReplacement(FrontReplacementFromConfigFileSubGra replacement_id = 'ObjectDetectionAPIProposalReplacement' def run_after(self): - return [ObjectDetectionAPIPreprocessorReplacement] + return [ObjectDetectionAPIPreprocessorReplacement, ObjectDetectionAPIPreprocessor2Replacement] def run_before(self): - return [CropAndResizeReplacement, TransposeOrderNormalizer] + return [CropAndResizeReplacement, TransposeOrderNormalizer, Pack] def output_edges_match(self, graph: Graph, match: SubgraphMatch, new_sub_graph: dict): return {match.output_node(0)[0].id: new_sub_graph['proposal_node'].id} @@ -945,35 +1017,35 @@ def generate_sub_graph(self, graph: Graph, match: SubgraphMatch): proposal_node = proposal_op.create_node([reshape_permute_node, anchors_node, input_with_image_size_node], dict(name='proposals')) - if 'do_not_swap_proposals' in match.custom_replacement_desc.custom_attributes and \ - match.custom_replacement_desc.custom_attributes['do_not_swap_proposals']: - swapped_proposals_node = proposal_node - else: - swapped_proposals_node = add_convolution_to_swap_xy_coordinates(graph, proposal_node, 5) + # models with use_matmul_crop_and_resize = True should not swap order of elements (YX to XY) after the Proposal + swap_proposals = not match.custom_replacement_desc.custom_attributes.get('do_not_swap_proposals', False) and \ + not pipeline_config.get_param('use_matmul_crop_and_resize') + + if swap_proposals: + proposal_node = add_convolution_to_swap_xy_coordinates(graph, proposal_node, 5) proposal_reshape_2d_node = create_op_node_with_second_input(graph, Reshape, int64_array([-1, 5]), dict(name="reshape_swap_proposals_2d"), - swapped_proposals_node) + proposal_node) mark_input_as_in_correct_layout(proposal_reshape_2d_node, 0) - # feed the CropAndResize node with a correct boxes information produced with the Proposal layer - # find the first CropAndResize node in the BFS order crop_and_resize_nodes_ids = [node_id for node_id in bfs_search(graph, [match.single_input_node(0)[0].id]) if graph.node[node_id]['op'] == 'CropAndResize'] - assert len(crop_and_resize_nodes_ids) != 0, "Didn't find any CropAndResize nodes in the graph." - if 'do_not_swap_proposals' not in match.custom_replacement_desc.custom_attributes or not \ - match.custom_replacement_desc.custom_attributes['do_not_swap_proposals']: + if len(crop_and_resize_nodes_ids) != 0 and swap_proposals: + # feed the CropAndResize node with a correct boxes information produced with the Proposal layer + # find the first CropAndResize node in the BFS order. This is needed in the case when we already swapped + # box coordinates data after the Proposal node crop_and_resize_node = Node(graph, crop_and_resize_nodes_ids[0]) - # set a marker that the input with box coordinates has been pre-processed so the CropAndResizeReplacement + # set a marker that an input with box coordinates has been pre-processed so the CropAndResizeReplacement # transform doesn't try to merge the second and the third inputs crop_and_resize_node['inputs_preprocessed'] = True - graph.remove_edge(crop_and_resize_node.in_node(1).id, crop_and_resize_node.id) - graph.create_edge(proposal_reshape_2d_node, crop_and_resize_node, out_port=0, in_port=1) + crop_and_resize_node.in_port(1).disconnect() + proposal_reshape_2d_node.out_port(0).connect(crop_and_resize_node.in_port(1)) tf_proposal_reshape_4d_node = create_op_node_with_second_input(graph, Reshape, int64_array([-1, 1, max_proposals, 5]), dict(name="reshape_proposal_4d"), - swapped_proposals_node) + proposal_node) crop_op = Crop(graph, dict(axis=int64_array([3]), offset=int64_array([1]), dim=int64_array([4]), nchw_layout=True)) @@ -991,7 +1063,8 @@ class ObjectDetectionAPISSDPostprocessorReplacement(FrontReplacementFromConfigFi replacement_id = 'ObjectDetectionAPISSDPostprocessorReplacement' def run_after(self): - return [ObjectDetectionAPIPreprocessorReplacement, FakeQuantWithMinMaxVarsToQuantize] + return [ObjectDetectionAPIPreprocessorReplacement, ObjectDetectionAPIPreprocessor2Replacement, + FakeQuantWithMinMaxVarsToQuantize] def run_before(self): return [StandaloneConstEraser, TransposeOrderNormalizer, TFSliceToSliceReplacer] @@ -1006,10 +1079,12 @@ def generate_sub_graph(self, graph: Graph, match: SubgraphMatch): if argv.tensorflow_object_detection_api_pipeline_config is None: raise Error(missing_param_error) pipeline_config = PipelineConfig(argv.tensorflow_object_detection_api_pipeline_config) - num_classes = _value_or_raise(match, pipeline_config, 'num_classes') + + has_background_class = _value_or_raise(match, pipeline_config, 'add_background_class') + num_classes = _value_or_raise(match, pipeline_config, 'num_classes') + has_background_class # reshapes confidences to 4D before applying activation function and do not convert from NHWC to NCHW this node - expand_dims_node = create_op_node_with_second_input(graph, Reshape, int64_array([0, 1, -1, num_classes + 1]), + expand_dims_node = create_op_node_with_second_input(graph, Reshape, int64_array([0, 1, -1, num_classes]), {'name': 'do_ExpandDims_conf'}) expand_dims_node.in_port(0).connect(match.input_nodes(1)[0][0].in_node(0).out_port(0)) @@ -1040,7 +1115,7 @@ def generate_sub_graph(self, graph: Graph, match: SubgraphMatch): (pipeline_config.get_param('ssd_anchor_generator_num_layers') is not None or pipeline_config.get_param('multiscale_anchor_generator_min_level') is not None): # change the Reshape operations with hardcoded number of output elements of the convolution nodes to be - # reshapable + # reshape-able _relax_reshape_nodes(graph, pipeline_config) # create PriorBoxClustered nodes instead of a constant value with prior boxes so the model could be reshaped @@ -1120,7 +1195,8 @@ class ObjectDetectionAPIOutputReplacement(FrontReplacementFromConfigFileGeneral) replacement_id = 'ObjectDetectionAPIOutputReplacement' def run_before(self): - return [ObjectDetectionAPIPreprocessorReplacement, TransposeOrderNormalizer] + return [ObjectDetectionAPIPreprocessorReplacement, ObjectDetectionAPIPreprocessor2Replacement, + TransposeOrderNormalizer] def transform_graph(self, graph: Graph, replacement_descriptions: dict): if graph.graph['cmd_params'].output is not None: @@ -1215,7 +1291,8 @@ class ObjectDetectionAPIConstValueOverride(FrontReplacementFromConfigFileGeneral replacement_id = 'ObjectDetectionAPIConstValueOverride' def run_before(self): - return [ObjectDetectionAPIPreprocessorReplacement, TransposeOrderNormalizer] + return [ObjectDetectionAPIPreprocessorReplacement, ObjectDetectionAPIPreprocessor2Replacement, + TransposeOrderNormalizer] def transform_graph(self, graph: Graph, replacement_descriptions: dict): argv = graph.graph['cmd_params'] diff --git a/model-optimizer/extensions/front/tf/efficient_det_support_api_v2.0.json b/model-optimizer/extensions/front/tf/efficient_det_support_api_v2.0.json new file mode 100644 index 00000000000000..f1333461f9d0b3 --- /dev/null +++ b/model-optimizer/extensions/front/tf/efficient_det_support_api_v2.0.json @@ -0,0 +1,50 @@ +[ + { + "custom_attributes": { + "start_nodes": ["StatefulPartitionedCall/Preprocessor/unstack"], + "end_nodes": ["StatefulPartitionedCall/Preprocessor/stack", + "StatefulPartitionedCall/Preprocessor/stack_1"] + }, + "id": "ObjectDetectionAPIPreprocessor2Replacement", + "match_kind": "general" + }, + { + "custom_attributes": { + "code_type": "caffe.PriorBoxParameter.CENTER_SIZE", + "pad_mode": "caffe.ResizeParameter.CONSTANT", + "resize_mode": "caffe.ResizeParameter.WARP", + "clip_before_nms": false, + "clip_after_nms": true, + "disable_prior_boxes_layers_generator": true + }, + "id": "ObjectDetectionAPISSDPostprocessorReplacement", + "include_inputs_to_sub_graph": true, + "include_outputs_to_sub_graph": true, + "instances": { + "end_points": [ + "StatefulPartitionedCall/Identity", + "StatefulPartitionedCall/Identity_1", + "StatefulPartitionedCall/Identity_2", + "StatefulPartitionedCall/Identity_3", + "StatefulPartitionedCall/Identity_4", + "StatefulPartitionedCall/Identity_5", + "StatefulPartitionedCall/Identity_6", + "StatefulPartitionedCall/Identity_7" + ], + "start_points": [ + "StatefulPartitionedCall/Postprocessor/Reshape_1", + "StatefulPartitionedCall/Postprocessor/scale_logits", + "StatefulPartitionedCall/Postprocessor/Tile", + "StatefulPartitionedCall/Postprocessor/Cast_1" + ] + }, + "match_kind": "points" + }, + { + "custom_attributes": { + "outputs": "StatefulPartitionedCall/Identity,StatefulPartitionedCall/Identity_1,StatefulPartitionedCall/Identity_2,StatefulPartitionedCall/Identity_3,StatefulPartitionedCall/Identity_4,StatefulPartitionedCall/Identity_5,StatefulPartitionedCall/Identity_6,StatefulPartitionedCall/Identity_7" + }, + "id": "ObjectDetectionAPIOutputReplacement", + "match_kind": "general" + } +] diff --git a/model-optimizer/extensions/front/tf/faster_rcnn_support_api_v2.0.json b/model-optimizer/extensions/front/tf/faster_rcnn_support_api_v2.0.json new file mode 100644 index 00000000000000..179454be90cf30 --- /dev/null +++ b/model-optimizer/extensions/front/tf/faster_rcnn_support_api_v2.0.json @@ -0,0 +1,82 @@ +[ + { + "custom_attributes": { + "start_nodes": ["StatefulPartitionedCall/Preprocessor/unstack"], + "end_nodes": ["StatefulPartitionedCall/Preprocessor/stack", + "StatefulPartitionedCall/Preprocessor/stack_1"] + }, + "id": "ObjectDetectionAPIPreprocessor2Replacement", + "match_kind": "general" + }, + { + "custom_attributes": { + "clip_before_nms": false, + "clip_after_nms": true + }, + "id": "ObjectDetectionAPIProposalReplacement", + "include_inputs_to_sub_graph": true, + "include_outputs_to_sub_graph": true, + "instances": { + "end_points": [ + "StatefulPartitionedCall/stack_3", + "StatefulPartitionedCall/BatchMultiClassNonMaxSuppression/stack_10", + "StatefulPartitionedCall/Shape" + ], + "start_points": [ + "StatefulPartitionedCall/concat/concat", + "StatefulPartitionedCall/concat_1/concat", + "StatefulPartitionedCall/GridAnchorGenerator/Identity", + "StatefulPartitionedCall/Cast_1", + "StatefulPartitionedCall/Cast_2", + "StatefulPartitionedCall/Shape" + ] + }, + "match_kind": "points" + }, + { + "custom_attributes": { + "clip_before_nms": false, + "clip_after_nms": true, + "background_label_id": 0, + "coordinates_swap_method": "swap_weights" + }, + "id": "ObjectDetectionAPIDetectionOutputReplacement", + "inputs": [ + [ + { + "node": "Reshape$", + "port": 0 + } + ], + [ + { + "node": "Reshape_1$", + "port": 0 + } + ], + [ + { + "node": "ExpandDims$", + "port": 0 + } + ] + ], + "instances": [ + ".*SecondStagePostprocessor/" + ], + "match_kind": "scope", + "outputs": [ + { + "node": "Cast_3$", + "port": 0 + } + ] + }, + { + "custom_attributes": { + "outputs": "StatefulPartitionedCall/SecondStagePostprocessor/Cast_3" + }, + "id": "ObjectDetectionAPIOutputReplacement", + "match_kind": "general" + } +] diff --git a/model-optimizer/extensions/front/tf/mask_rcnn_support_api_v1.11.json b/model-optimizer/extensions/front/tf/mask_rcnn_support_api_v1.11.json index 178b53bb649702..a5323525d5e17d 100644 --- a/model-optimizer/extensions/front/tf/mask_rcnn_support_api_v1.11.json +++ b/model-optimizer/extensions/front/tf/mask_rcnn_support_api_v1.11.json @@ -98,6 +98,7 @@ }, { "custom_attributes": { + "masks_node_prefix_name": "SecondStageBoxPredictor" }, "id": "ObjectDetectionAPIMaskRCNNSigmoidReplacement", "match_kind": "general" @@ -117,4 +118,4 @@ "id": "ObjectDetectionAPIConstValueOverride", "match_kind": "general" } -] \ No newline at end of file +] diff --git a/model-optimizer/extensions/front/tf/mask_rcnn_support_api_v1.13.json b/model-optimizer/extensions/front/tf/mask_rcnn_support_api_v1.13.json index 6d5f76265b5b7a..3f5df3d5eba129 100644 --- a/model-optimizer/extensions/front/tf/mask_rcnn_support_api_v1.13.json +++ b/model-optimizer/extensions/front/tf/mask_rcnn_support_api_v1.13.json @@ -99,6 +99,7 @@ }, { "custom_attributes": { + "masks_node_prefix_name": "SecondStageBoxPredictor" }, "id": "ObjectDetectionAPIMaskRCNNSigmoidReplacement", "match_kind": "general" @@ -118,4 +119,4 @@ "id": "ObjectDetectionAPIConstValueOverride", "match_kind": "general" } -] \ No newline at end of file +] diff --git a/model-optimizer/extensions/front/tf/mask_rcnn_support_api_v1.14.json b/model-optimizer/extensions/front/tf/mask_rcnn_support_api_v1.14.json index 1cafef964c4176..738c6bfe5bd946 100644 --- a/model-optimizer/extensions/front/tf/mask_rcnn_support_api_v1.14.json +++ b/model-optimizer/extensions/front/tf/mask_rcnn_support_api_v1.14.json @@ -99,6 +99,7 @@ }, { "custom_attributes": { + "masks_node_prefix_name": "SecondStageBoxPredictor" }, "id": "ObjectDetectionAPIMaskRCNNSigmoidReplacement", "match_kind": "general" @@ -118,4 +119,4 @@ "id": "ObjectDetectionAPIConstValueOverride", "match_kind": "general" } -] \ No newline at end of file +] diff --git a/model-optimizer/extensions/front/tf/mask_rcnn_support_api_v1.15.json b/model-optimizer/extensions/front/tf/mask_rcnn_support_api_v1.15.json index d20007650ee54f..9e0b971fec8b96 100644 --- a/model-optimizer/extensions/front/tf/mask_rcnn_support_api_v1.15.json +++ b/model-optimizer/extensions/front/tf/mask_rcnn_support_api_v1.15.json @@ -99,6 +99,7 @@ }, { "custom_attributes": { + "masks_node_prefix_name": "SecondStageBoxPredictor" }, "id": "ObjectDetectionAPIMaskRCNNSigmoidReplacement", "match_kind": "general" diff --git a/model-optimizer/extensions/front/tf/mask_rcnn_support_api_v1.7.json b/model-optimizer/extensions/front/tf/mask_rcnn_support_api_v1.7.json index 3574f7a49ef2e9..075dee8bc7dd90 100644 --- a/model-optimizer/extensions/front/tf/mask_rcnn_support_api_v1.7.json +++ b/model-optimizer/extensions/front/tf/mask_rcnn_support_api_v1.7.json @@ -98,6 +98,7 @@ }, { "custom_attributes": { + "masks_node_prefix_name": "SecondStageBoxPredictor" }, "id": "ObjectDetectionAPIMaskRCNNSigmoidReplacement", "match_kind": "general" @@ -117,4 +118,4 @@ "id": "ObjectDetectionAPIConstValueOverride", "match_kind": "general" } -] \ No newline at end of file +] diff --git a/model-optimizer/extensions/front/tf/mask_rcnn_support_api_v2.0.json b/model-optimizer/extensions/front/tf/mask_rcnn_support_api_v2.0.json new file mode 100644 index 00000000000000..ab868a6206592c --- /dev/null +++ b/model-optimizer/extensions/front/tf/mask_rcnn_support_api_v2.0.json @@ -0,0 +1,91 @@ +[ + { + "custom_attributes": { + "start_nodes": ["StatefulPartitionedCall/Preprocessor/unstack"], + "end_nodes": ["StatefulPartitionedCall/Preprocessor/stack", + "StatefulPartitionedCall/Preprocessor/stack_1"] + }, + "id": "ObjectDetectionAPIPreprocessor2Replacement", + "match_kind": "general" + }, + { + "custom_attributes": { + "clip_before_nms": false, + "clip_after_nms": true + }, + "id": "ObjectDetectionAPIProposalReplacement", + "include_inputs_to_sub_graph": true, + "include_outputs_to_sub_graph": true, + "instances": { + "end_points": [ + "StatefulPartitionedCall/stack_3", + "StatefulPartitionedCall/BatchMultiClassNonMaxSuppression/stack_10", + "StatefulPartitionedCall/Shape" + ], + "start_points": [ + "StatefulPartitionedCall/concat/concat", + "StatefulPartitionedCall/concat_1/concat", + "StatefulPartitionedCall/GridAnchorGenerator/Identity", + "StatefulPartitionedCall/Cast_1", + "StatefulPartitionedCall/Cast_2", + "StatefulPartitionedCall/Shape" + ] + }, + "match_kind": "points" + }, + { + "custom_attributes": { + "clip_before_nms": false, + "clip_after_nms": true, + "background_label_id": 0, + "coordinates_swap_method": "swap_weights" + }, + "id": "ObjectDetectionAPIDetectionOutputReplacement", + "include_inputs_to_sub_graph": true, + "include_outputs_to_sub_graph": true, + "instances": { + "end_points": [ + "StatefulPartitionedCall/BatchMultiClassNonMaxSuppression_1/stack_8", + "StatefulPartitionedCall/BatchMultiClassNonMaxSuppression_1/stack_6" + ], + "start_points": [ + "StatefulPartitionedCall/Reshape_4", + "StatefulPartitionedCall/Reshape_5", + "StatefulPartitionedCall/ExpandDims_6", + "StatefulPartitionedCall/Cast_5" + ] + }, + "match_kind": "points" + }, + { + "custom_attributes": { + }, + "id": "ObjectDetectionAPIMaskRCNNROIPoolingSecondReplacement", + "include_inputs_to_sub_graph": true, + "include_outputs_to_sub_graph": true, + "instances": { + "end_points": [ + "StatefulPartitionedCall/Reshape_10" + ], + "start_points": [ + "StatefulPartitionedCall/CropAndResize_1/CropAndResize", + "StatefulPartitionedCall/CropAndResize_1/Reshape" + ] + }, + "match_kind": "points" + }, + { + "custom_attributes": { + "masks_node_prefix_name": "StatefulPartitionedCall/mask_rcnn_keras_box_predictor/mask_rcnn_mask_head/" + }, + "id": "ObjectDetectionAPIMaskRCNNSigmoidReplacement", + "match_kind": "general" + }, + { + "custom_attributes": { + "outputs": "StatefulPartitionedCall/mask_rcnn_keras_box_predictor/mask_rcnn_mask_head/MaskPredictor_last_conv2d/BiasAdd,StatefulPartitionedCall/Reshape_13" + }, + "id": "ObjectDetectionAPIOutputReplacement", + "match_kind": "general" + } +] diff --git a/model-optimizer/extensions/front/tf/ssd_support_api_v2.0.json b/model-optimizer/extensions/front/tf/ssd_support_api_v2.0.json new file mode 100644 index 00000000000000..f1333461f9d0b3 --- /dev/null +++ b/model-optimizer/extensions/front/tf/ssd_support_api_v2.0.json @@ -0,0 +1,50 @@ +[ + { + "custom_attributes": { + "start_nodes": ["StatefulPartitionedCall/Preprocessor/unstack"], + "end_nodes": ["StatefulPartitionedCall/Preprocessor/stack", + "StatefulPartitionedCall/Preprocessor/stack_1"] + }, + "id": "ObjectDetectionAPIPreprocessor2Replacement", + "match_kind": "general" + }, + { + "custom_attributes": { + "code_type": "caffe.PriorBoxParameter.CENTER_SIZE", + "pad_mode": "caffe.ResizeParameter.CONSTANT", + "resize_mode": "caffe.ResizeParameter.WARP", + "clip_before_nms": false, + "clip_after_nms": true, + "disable_prior_boxes_layers_generator": true + }, + "id": "ObjectDetectionAPISSDPostprocessorReplacement", + "include_inputs_to_sub_graph": true, + "include_outputs_to_sub_graph": true, + "instances": { + "end_points": [ + "StatefulPartitionedCall/Identity", + "StatefulPartitionedCall/Identity_1", + "StatefulPartitionedCall/Identity_2", + "StatefulPartitionedCall/Identity_3", + "StatefulPartitionedCall/Identity_4", + "StatefulPartitionedCall/Identity_5", + "StatefulPartitionedCall/Identity_6", + "StatefulPartitionedCall/Identity_7" + ], + "start_points": [ + "StatefulPartitionedCall/Postprocessor/Reshape_1", + "StatefulPartitionedCall/Postprocessor/scale_logits", + "StatefulPartitionedCall/Postprocessor/Tile", + "StatefulPartitionedCall/Postprocessor/Cast_1" + ] + }, + "match_kind": "points" + }, + { + "custom_attributes": { + "outputs": "StatefulPartitionedCall/Identity,StatefulPartitionedCall/Identity_1,StatefulPartitionedCall/Identity_2,StatefulPartitionedCall/Identity_3,StatefulPartitionedCall/Identity_4,StatefulPartitionedCall/Identity_5,StatefulPartitionedCall/Identity_6,StatefulPartitionedCall/Identity_7" + }, + "id": "ObjectDetectionAPIOutputReplacement", + "match_kind": "general" + } +] diff --git a/model-optimizer/mo/front/subgraph_matcher.py b/model-optimizer/mo/front/subgraph_matcher.py index f7b5d7a997a279..f3b4369a5e996d 100644 --- a/model-optimizer/mo/front/subgraph_matcher.py +++ b/model-optimizer/mo/front/subgraph_matcher.py @@ -199,7 +199,7 @@ def _match_sub_graph_for_points(self, graph: Graph): node_name, self.replacement_desc.id)) return None - matched_nodes = sub_graph_between_nodes(graph, start_points, end_points) + matched_nodes = sub_graph_between_nodes(graph, start_points, end_points, include_control_flow=False) return SubgraphMatch(graph, self.replacement_desc, matched_nodes, self.replacement_desc.get_inputs_description(), self.replacement_desc.get_outputs_description(), '') diff --git a/model-optimizer/mo/utils/custom_replacement_config.py b/model-optimizer/mo/utils/custom_replacement_config.py index e15e5b4ed4def3..83ea75a3a142dd 100644 --- a/model-optimizer/mo/utils/custom_replacement_config.py +++ b/model-optimizer/mo/utils/custom_replacement_config.py @@ -229,7 +229,7 @@ def update_custom_replacement_attributes(self, graph: Graph): start_points = self.get_internal_input_nodes(graph) end_points = self.get_internal_output_nodes(graph) - matched_nodes = sub_graph_between_nodes(graph, start_points, end_points) + matched_nodes = sub_graph_between_nodes(graph, start_points, end_points, include_control_flow=False) output_tensors = set() input_nodes_mapping = dict() # key is the input tensor name, value is the pair: (input_port, output_node_name) for src_node_name, dst_node_name, edge_attrs in graph.edges(data=True): diff --git a/model-optimizer/mo/utils/graph.py b/model-optimizer/mo/utils/graph.py index 9a669514d25581..d5c377eae9cdbd 100644 --- a/model-optimizer/mo/utils/graph.py +++ b/model-optimizer/mo/utils/graph.py @@ -117,13 +117,17 @@ def is_connected_component(graph: Graph, node_names: list): return set(node_names).issubset(visited) -def sub_graph_between_nodes(graph: Graph, start_nodes: list, end_nodes: list, detect_extra_start_node: callable=None): +def sub_graph_between_nodes(graph: Graph, start_nodes: list, end_nodes: list, detect_extra_start_node: callable=None, + include_control_flow=True): """ Finds nodes of the sub-graph between 'start_nodes' and 'end_nodes'. Input nodes for the sub-graph nodes are also added to the sub-graph. Constant inputs of the 'start_nodes' are also added to the sub-graph. :param graph: graph to operate on. :param start_nodes: list of nodes names that specifies start nodes. :param end_nodes: list of nodes names that specifies end nodes. + :param detect_extra_start_node: callable function to add additional nodes to the list of start nodes instead of + traversing the graph further. The list of additional start nodes is returned of the function is not None. + :param include_control_flow: flag to specify whether to follow the control flow edges or not :return: list of nodes of the identified sub-graph or None if the sub-graph cannot be extracted. """ sub_graph_nodes = list() @@ -133,23 +137,24 @@ def sub_graph_between_nodes(graph: Graph, start_nodes: list, end_nodes: list, de nx.set_node_attributes(G=graph, name='prev', values=None) while len(d) != 0: - cur_node_name = d.popleft() - sub_graph_nodes.append(cur_node_name) - if cur_node_name not in end_nodes: # do not add output nodes of the end_nodes - for _, dst_node_name in graph.out_edges(cur_node_name): - if dst_node_name not in visited: + cur_node_id = d.popleft() + sub_graph_nodes.append(cur_node_id) + if cur_node_id not in end_nodes: # do not add output nodes of the end_nodes + for _, dst_node_name, attrs in graph.out_edges(cur_node_id, data=True): + if dst_node_name not in visited and (include_control_flow or not attrs.get('control_flow_edge', False)): d.append(dst_node_name) visited.add(dst_node_name) - graph.node[dst_node_name]['prev'] = cur_node_name + graph.node[dst_node_name]['prev'] = cur_node_id - for src_node_name, _ in graph.in_edges(cur_node_name): + for src_node_name, _, attrs in graph.in_edges(cur_node_id, data=True): # add input nodes for the non-start_nodes - if cur_node_name not in start_nodes and src_node_name not in visited: - if detect_extra_start_node is not None and detect_extra_start_node(Node(graph, cur_node_name)): - extra_start_nodes.append(cur_node_name) + if cur_node_id not in start_nodes and src_node_name not in visited and\ + (include_control_flow or not attrs.get('control_flow_edge', False)): + if detect_extra_start_node is not None and detect_extra_start_node(Node(graph, cur_node_id)): + extra_start_nodes.append(cur_node_id) else: d.append(src_node_name) - graph.node[src_node_name]['prev'] = cur_node_name + graph.node[src_node_name]['prev'] = cur_node_id visited.add(src_node_name) # use forward dfs to check that all end nodes are reachable from at least one of input nodes @@ -161,16 +166,16 @@ def sub_graph_between_nodes(graph: Graph, start_nodes: list, end_nodes: list, de raise Error('End node "{}" is not reachable from start nodes: {}. '.format(end_node, start_nodes) + refer_to_faq_msg(74)) - for node_name in sub_graph_nodes: + for node_id in sub_graph_nodes: # sub-graph should not contain Placeholder nodes - if graph.node[node_name].get('op', '') == 'Parameter': + if graph.node[node_id].get('op', '') == 'Parameter': path = list() - cur_node = node_name + cur_node = node_id while cur_node and 'prev' in graph.node[cur_node]: path.append(str(cur_node)) cur_node = graph.node[cur_node]['prev'] log.debug("The path from input node is the following: {}".format('\n'.join(path))) - raise Error('The matched sub-graph contains network input node "{}". '.format(node_name) + + raise Error('The matched sub-graph contains network input node "{}". '.format(node_id) + refer_to_faq_msg(75)) if detect_extra_start_node is None: return sub_graph_nodes diff --git a/model-optimizer/mo/utils/graph_test.py b/model-optimizer/mo/utils/graph_test.py index c2d1e768a7c96a..03c99aff62c5ba 100644 --- a/model-optimizer/mo/utils/graph_test.py +++ b/model-optimizer/mo/utils/graph_test.py @@ -211,3 +211,59 @@ def test_sub_graph_between_nodes_branches_included(self): # after merging node 2 into sub-graph the node 2 will be removed and it is not known how to calculate the tensor # between node 2 and 3. self.assertListEqual(sorted(sub_graph_between_nodes(graph, [2], [8])), [n for n in node_names if n != 1]) + + def test_sub_graph_between_nodes_control_flow_included(self): + """ + Check that the function works correctly for case when control flow edges must be traversed (edge 5 -> 2). + 6 -> 5-> + \ + 1 -> 2 -> 3 -> 4 + """ + graph = Graph() + graph.add_nodes_from(list(range(1, 7))) + graph.add_edges_from([(1, 2), (2, 3), (3, 4), (5, 2, {'control_flow_edge': True}), (6, 5)]) + sub_graph_nodes = sub_graph_between_nodes(graph, [1], [4], include_control_flow=True) + self.assertIsNotNone(sub_graph_nodes) + self.assertListEqual(sorted(sub_graph_nodes), sorted([1, 2, 3, 4, 5, 6])) + + def test_sub_graph_between_nodes_control_flow_not_included(self): + """ + Check that the function works correctly for case when control flow edges should not be traversed (edge 5 -> 2). + 6 -> 5-> + \ + 1 -> 2 -> 3 -> 4 + """ + graph = Graph() + graph.add_nodes_from(list(range(1, 7))) + graph.add_edges_from([(1, 2), (2, 3), (3, 4), (5, 2, {'control_flow_edge': True}), (6, 5)]) + sub_graph_nodes = sub_graph_between_nodes(graph, [1], [4], include_control_flow=False) + self.assertIsNotNone(sub_graph_nodes) + self.assertListEqual(sorted(sub_graph_nodes), sorted([1, 2, 3, 4])) + + def test_sub_graph_between_nodes_control_flow_included_forward(self): + """ + Check that the function works correctly for case when control flow edges should not be traversed (edge 3 -> 5). + 1 -> 2 -> 3 -> 4 + \ + -> 5 -> 6 + """ + graph = Graph() + graph.add_nodes_from(list(range(1, 7))) + graph.add_edges_from([(1, 2), (2, 3), (3, 4), (3, 5, {'control_flow_edge': True}), (5, 6)]) + sub_graph_nodes = sub_graph_between_nodes(graph, [1], [4], include_control_flow=True) + self.assertIsNotNone(sub_graph_nodes) + self.assertListEqual(sorted(sub_graph_nodes), sorted([1, 2, 3, 4, 5, 6])) + + def test_sub_graph_between_nodes_control_flow_not_included_forward(self): + """ + Check that the function works correctly for case when control flow edges should not be traversed (edge 3 -> 5). + 1 -> 2 -> 3 -> 4 + \ + -> 5 -> 6 + """ + graph = Graph() + graph.add_nodes_from(list(range(1, 7))) + graph.add_edges_from([(1, 2), (2, 3), (3, 4), (3, 5, {'control_flow_edge': True}), (5, 6)]) + sub_graph_nodes = sub_graph_between_nodes(graph, [1], [4], include_control_flow=False) + self.assertIsNotNone(sub_graph_nodes) + self.assertListEqual(sorted(sub_graph_nodes), sorted([1, 2, 3, 4])) diff --git a/model-optimizer/mo/utils/pipeline_config.py b/model-optimizer/mo/utils/pipeline_config.py index 340b1882fb25f9..536b06020b7819 100644 --- a/model-optimizer/mo/utils/pipeline_config.py +++ b/model-optimizer/mo/utils/pipeline_config.py @@ -64,12 +64,15 @@ ('crop_height', '.*/rfcn_box_predictor/crop_height'), ('crop_width', '.*/rfcn_box_predictor/crop_width'), 'initial_crop_size', + ('use_matmul_crop_and_resize', 'use_matmul_crop_and_resize', False), + ('add_background_class', 'add_background_class', True), # Detection Output layer attributes ('postprocessing_score_converter', '.*/score_converter'), ('postprocessing_score_threshold', '.*/batch_non_max_suppression/score_threshold'), ('postprocessing_iou_threshold', '.*/batch_non_max_suppression/iou_threshold'), ('postprocessing_max_detections_per_class', '.*/batch_non_max_suppression/max_detections_per_class'), ('postprocessing_max_total_detections', '.*/batch_non_max_suppression/max_total_detections'), + ('share_box_across_classes', 'second_stage_box_predictor/.*/share_box_across_classes$', False), # Variances for predicted bounding box deltas (tx, ty, tw, th) ('frcnn_variance_x', 'box_coder/faster_rcnn_box_coder/x_scale', 10.0), ('frcnn_variance_y', 'box_coder/faster_rcnn_box_coder/y_scale', 10.0), diff --git a/model-optimizer/mo/utils/pipeline_config_test.py b/model-optimizer/mo/utils/pipeline_config_test.py index 3c9e60e85eb6b1..4f415d4ff82190 100644 --- a/model-optimizer/mo/utils/pipeline_config_test.py +++ b/model-optimizer/mo/utils/pipeline_config_test.py @@ -148,6 +148,9 @@ def test_pipeline_config_existing_file(self): 'ssd_anchor_generator_min_scale': 0.2, 'ssd_anchor_generator_max_scale': 0.95, 'ssd_anchor_generator_interpolated_scale_aspect_ratio': 1.0, + 'use_matmul_crop_and_resize': False, + 'add_background_class': True, + 'share_box_across_classes': False, } os.unlink(file_name) self.assertDictEqual(pipeline_config._model_params, expected_result) diff --git a/model-optimizer/mo/utils/version_test.py b/model-optimizer/mo/utils/version_test.py index 0975f7f9345e00..d53254c1a47ed8 100644 --- a/model-optimizer/mo/utils/version_test.py +++ b/model-optimizer/mo/utils/version_test.py @@ -23,12 +23,9 @@ class TestingVersion(unittest.TestCase): - def test_unknown_version(self): - self.assertNotEqual(get_version(), "unknown version") - @patch('os.path.isfile') @mock.patch('builtins.open', new_callable=mock_open, create=True, read_data='2021.1.0-1028-55e4d5673a8') def test_get_version(self, mock_open, mock_isfile): mock_isfile.return_value = True mock_open.return_value.__enter__ = mock_open - self.assertEqual(get_version(), '2021.1.0-1028-55e4d5673a8') \ No newline at end of file + self.assertEqual(get_version(), '2021.1.0-1028-55e4d5673a8') From 0b05653d7a3c02786a16a9440b6b95bef8b31946 Mon Sep 17 00:00:00 2001 From: Mateusz Bencer Date: Mon, 21 Dec 2020 12:32:15 +0100 Subject: [PATCH 104/244] Resolved problems with ssd_resnet34_mlperf_opset10 (#3487) * Resolved problems with ssd_resnet34_1200 * removed debug code * Added correct handling onnx nodes from parent graph scope * removed unnecessary include * fixed calcution index to replace * fixed LoopParentParametersUsedInBody test * added set_friendly_name * apply Unsqueeze for each concatenated Loop output * added handling trip count with value max_int * merge from upstream/master * update xfail list * added checking is trip_count is constant --- .../transformations/sr_sub_graph_ops.cpp | 132 ++++++++++++- ngraph/core/src/op/loop.cpp | 37 ++-- .../include/onnx_import/core/graph.hpp | 9 +- .../include/onnx_import/core/graph_cache.hpp | 29 +++ .../frontend/onnx_import/src/core/graph.cpp | 55 +++--- .../onnx_import/src/core/graph_cache.cpp | 21 ++ ngraph/frontend/onnx_import/src/op/loop.cpp | 35 +++- ngraph/frontend/onnx_import/src/op/topk.cpp | 16 +- ngraph/python/tests/__init__.py | 6 +- .../python/tests/test_onnx/test_zoo_models.py | 4 +- ...op_2d_add_input_from_parent_graph.prototxt | 166 ++++++++++++++++ .../loop_2d_add_trip_count_max_int.prototxt | 177 +++++++++++++++++ ..._scope_used_in_parent_and_in_body.prototxt | 181 ++++++++++++++++++ ...11_const_k_smallest_negative_axis.prototxt | 97 ++++++++++ ngraph/test/onnx/onnx_import.in.cpp | 14 ++ .../test/onnx/onnx_import_controlflow.in.cpp | 75 ++++++-- ngraph/test/runtime/ie/unit_test.manifest | 2 + ngraph/test/type_prop/loop.cpp | 180 ++++++++++++++++- 18 files changed, 1152 insertions(+), 84 deletions(-) create mode 100644 ngraph/test/models/onnx/loop/loop_2d_add_input_from_parent_graph.prototxt create mode 100644 ngraph/test/models/onnx/loop/loop_2d_add_trip_count_max_int.prototxt create mode 100644 ngraph/test/models/onnx/loop/loop_add_node_from_parent_scope_used_in_parent_and_in_body.prototxt create mode 100644 ngraph/test/models/onnx/top_k_opset_11_const_k_smallest_negative_axis.prototxt diff --git a/inference-engine/tests/functional/inference_engine/transformations/sr_sub_graph_ops.cpp b/inference-engine/tests/functional/inference_engine/transformations/sr_sub_graph_ops.cpp index 72f71cdc200c8a..c454c4288f7cdc 100644 --- a/inference-engine/tests/functional/inference_engine/transformations/sr_sub_graph_ops.cpp +++ b/inference-engine/tests/functional/inference_engine/transformations/sr_sub_graph_ops.cpp @@ -256,4 +256,134 @@ TEST(SmartReshapeTests, LoopDynamicParameters) { // concat output ASSERT_TRUE(network.getFunction()->get_results()[2]->get_output_partial_shape(0).compatible({32, 10, 10})); ASSERT_TRUE(network.getFunction()->get_results()[3]->get_output_partial_shape(0).compatible({32, 1, 1})); -} \ No newline at end of file +} + +TEST(SmartReshapeTests, LoopParentParametersUsedInBody) { + std::shared_ptr f(nullptr); + { + // That which we iterate over + auto X = std::make_shared(element::f32, PartialShape::dynamic()); + auto Y = std::make_shared(element::f32, PartialShape::dynamic()); + auto add_Y = std::make_shared(Y, + std::make_shared(ngraph::element::f32, ngraph::Shape{}, std::vector{0.f})); + auto M = std::make_shared(element::f32, PartialShape::dynamic()); + X->set_friendly_name("X"); + Y->set_friendly_name("Y"); + M->set_friendly_name("M"); + + // Set up the cell body, a function from (Xi, add_Y) -> (Zo) + // Body parameters + auto current_iteration = std::make_shared(element::i64, Shape{}); + auto Xi = std::make_shared(element::f32, PartialShape::dynamic()); + auto Yi = std::make_shared(element::f32, PartialShape::dynamic()); + auto M_body = std::make_shared(element::f32, PartialShape::dynamic()); + auto body_condition = + std::make_shared(ngraph::element::boolean, ngraph::Shape{}, true); + + auto trip_count = + std::make_shared(ngraph::element::i64, ngraph::Shape{}, 10); + auto exec_condition = + std::make_shared(ngraph::element::boolean, ngraph::Shape{}, true); + // Body + auto sum = std::make_shared(Xi, Yi); + auto Zo = std::make_shared(sum, M_body); + auto body = std::make_shared(OutputVector{Zo, body_condition, sum}, + ParameterVector{Xi, current_iteration, Yi, M_body}); + + auto loop = std::make_shared(trip_count, exec_condition); + loop->set_function(body); + loop->set_special_body_ports(ngraph::opset5::Loop::SpecialBodyPorts{1, 1}); + + loop->set_sliced_input(Xi, X, 0, 1, 1, -1, 2); + loop->set_merged_input(M_body, M, Zo); + // Set invariant input which uses parameter from parent graph + loop->set_invariant_input(Yi, add_Y); + + // Output 0 is last Zo + auto out0 = loop->get_iter_value(body_condition, -1); + auto out1 = loop->get_iter_value(Zo, -1); + // Output 1 is concat of Zos + // start=0, stride=1, part_size=1, end=-1, axis=1 + auto out2 = loop->get_concatenated_slices(Zo, 0, 1, 1, -1, 1); + auto out3 = loop->get_iter_value(sum, -1); + + f = std::make_shared(OutputVector{out0, out1, out2, out3}, ParameterVector{X, Y, M}); + } + + InferenceEngine::CNNNetwork network(f); + ASSERT_TRUE(network.getFunction()->get_results()[0]->get_output_partial_shape(0).compatible({})); + ASSERT_TRUE(network.getFunction()->get_results()[1]->get_output_partial_shape(0).compatible(PartialShape::dynamic())); + // concat output + ASSERT_TRUE(network.getFunction()->get_results()[2]->get_output_partial_shape(0).compatible(PartialShape::dynamic())); + ASSERT_TRUE(network.getFunction()->get_results()[3]->get_output_partial_shape(0).compatible(PartialShape::dynamic())); + + ASSERT_NO_THROW(network.reshape({{"X", {4, 3, 2}}, {"Y", {4, 3, 2}}, {"M", {4, 3, 2}}})); + + ASSERT_TRUE(network.getFunction()->get_results()[0]->get_output_partial_shape(0).compatible({})); + ASSERT_TRUE(network.getFunction()->get_results()[1]->get_output_partial_shape(0).compatible({4, 3, 2})); + // concat output + ASSERT_TRUE(network.getFunction()->get_results()[2]->get_output_partial_shape(0).compatible({4, 30, 2})); + ASSERT_TRUE(network.getFunction()->get_results()[3]->get_output_partial_shape(0).compatible({4, 3, 2})); +} + +TEST(SmartReshapeTests, TensorIteratorParentParameterUsedInBody) { + std::shared_ptr f(nullptr); + { + // That which we iterate over + auto X = std::make_shared(element::f32, Shape{1, 1, 1}); + auto Y = std::make_shared(element::f32, Shape{1, 1, 1}); + auto add_Y = std::make_shared(Y, + std::make_shared(ngraph::element::f32, ngraph::Shape{}, std::vector{0.f})); + auto M = std::make_shared(element::f32, Shape{1, 1, 1}); + X->set_friendly_name("X"); + Y->set_friendly_name("Y"); + M->set_friendly_name("M"); + + // Set up the cell body, a function from (Xi, add_Y) -> (Zo) + // Body parameters + auto Xi = std::make_shared(element::f32, PartialShape::dynamic()); + auto Yi = std::make_shared(element::f32, PartialShape::dynamic()); + auto M_body = std::make_shared(element::f32, PartialShape::dynamic()); + auto body_condition = + std::make_shared(ngraph::element::boolean, ngraph::Shape{}, true); + + // Body + auto sum = std::make_shared(Xi, Yi); + auto Zo = std::make_shared(sum, M_body); + auto body = std::make_shared(OutputVector{Zo, body_condition, sum}, + ParameterVector{Xi, Yi, M_body}); + + auto tensor_iterator = std::make_shared(); + tensor_iterator->set_function(body); + + tensor_iterator->set_sliced_input(Xi, X, 0, 1, 1, -1, 2); + tensor_iterator->set_merged_input(M_body, M, Zo); + // Set invariant input which uses parameter from parent graph + tensor_iterator->set_invariant_input(Yi, add_Y); + + // Output 0 is last Zo + auto out0 = tensor_iterator->get_iter_value(body_condition, -1); + auto out1 = tensor_iterator->get_iter_value(Zo, -1); + // Output 1 is concat of Zos + // start=0, stride=1, part_size=1, end=-1, axis=1 + auto out2 = tensor_iterator->get_concatenated_slices(Zo, 0, 1, 1, -1, 1); + auto out3 = tensor_iterator->get_iter_value(sum, -1); + + f = std::make_shared(OutputVector{out0, out1, out2, out3}, ParameterVector{X, Y, M}); + } + + InferenceEngine::CNNNetwork network(f); + ASSERT_TRUE(network.getFunction()->get_results()[0]->get_output_partial_shape(0).compatible({})); + ASSERT_TRUE(network.getFunction()->get_results()[1]->get_output_partial_shape(0).compatible({1, 1, 1})); + // concat output (seq len = 1, so it means num_iter = 1) + ASSERT_TRUE(network.getFunction()->get_results()[2]->get_output_partial_shape(0).compatible({1, 1, 1})); + ASSERT_TRUE(network.getFunction()->get_results()[3]->get_output_partial_shape(0).compatible({1, 1, 1})); + + ASSERT_NO_THROW(network.reshape({{"X", {32, 1, 10}}, {"Y", {1, 1, 1}}, {"M", {32, 1, 10}}})); + + ASSERT_TRUE(network.getFunction()->get_results()[0]->get_output_partial_shape(0).compatible({})); + ASSERT_TRUE(network.getFunction()->get_results()[1]->get_output_partial_shape(0).compatible({32, 1, 10})); + // concat output + ASSERT_TRUE(network.getFunction()->get_results()[2]->get_output_partial_shape(0).compatible({32, 10, 10})); + ASSERT_TRUE(network.getFunction()->get_results()[3]->get_output_partial_shape(0).compatible({32, 1, 1})); +} diff --git a/ngraph/core/src/op/loop.cpp b/ngraph/core/src/op/loop.cpp index e00db9a3148a2d..65892380db821a 100644 --- a/ngraph/core/src/op/loop.cpp +++ b/ngraph/core/src/op/loop.cpp @@ -247,15 +247,22 @@ void op::v5::Loop::validate_and_infer_types() as_type_ptr(output_description)) { const auto& body_value_partial_shape = body_value.get_partial_shape(); - set_output_type(index, body_value.get_element_type(), PartialShape::dynamic()); - if (body_value_partial_shape.is_static()) + if (body_value_partial_shape.rank().is_dynamic()) + { + set_output_type(index, body_value.get_element_type(), PartialShape::dynamic()); + } + else { - auto body_value_shape = body_value_partial_shape.to_shape(); auto axis = concat_output_description->m_axis; - Shape out_shape{body_value_shape}; + NODE_VALIDATION_CHECK(this, + axis < body_value_partial_shape.rank().get_length(), + "Concatenation axis must be less than sliced output rank"); - if (body_value_shape.empty()) + PartialShape out_shape{body_value_partial_shape}; + + if (body_value_partial_shape.is_static() && + ngraph::is_scalar(body_value_partial_shape.to_shape())) { NODE_VALIDATION_CHECK( this, @@ -266,23 +273,23 @@ void op::v5::Loop::validate_and_infer_types() out_shape = Shape(1); } - if (m_num_iterations != -1) + if (m_num_iterations != -1 && body_value_partial_shape[axis].is_static()) { - out_shape[axis] = m_num_iterations * body_value_shape[axis]; + out_shape[axis] = + m_num_iterations * body_value_partial_shape[axis].get_length(); if (zero_number_of_iter) { - out_shape.at(0) = 0; + out_shape[0] = 0; } - set_output_type(index, body_value.get_element_type(), out_shape); } - } - else - { - set_output_type(index, - body_value.get_element_type(), - PartialShape::dynamic(body_value.get_partial_shape().rank())); + else + { + out_shape[axis] = Dimension::dynamic(); + } + set_output_type(index, body_value.get_element_type(), out_shape); } } + else if (auto body_output_description = as_type_ptr(output_description)) { diff --git a/ngraph/frontend/onnx_import/include/onnx_import/core/graph.hpp b/ngraph/frontend/onnx_import/include/onnx_import/core/graph.hpp index 40a9da798c1e2c..f8c6e7c17be05c 100644 --- a/ngraph/frontend/onnx_import/include/onnx_import/core/graph.hpp +++ b/ngraph/frontend/onnx_import/include/onnx_import/core/graph.hpp @@ -67,10 +67,10 @@ namespace ngraph protected: ParameterVector m_parameters; + std::unique_ptr m_cache; private: const ONNX_NAMESPACE::GraphProto* m_graph_proto; - std::unique_ptr m_cache; std::vector m_nodes; std::vector m_inputs; std::vector m_outputs; @@ -91,6 +91,13 @@ namespace ngraph Subgraph(const ONNX_NAMESPACE::GraphProto& proto, Model& model, const Graph& parent_graph); + + /// \brief Return outputs which are on the edge the subgraph and the parent graph. + /// \return Vector of edge nodes from parent scope. + const std::vector> get_outputs_from_parent() const; + + private: + std::vector> m_outputs_from_parent; }; inline std::ostream& operator<<(std::ostream& outs, const Graph& graph) diff --git a/ngraph/frontend/onnx_import/include/onnx_import/core/graph_cache.hpp b/ngraph/frontend/onnx_import/include/onnx_import/core/graph_cache.hpp index cb31f64b60041a..13297845e78c91 100644 --- a/ngraph/frontend/onnx_import/include/onnx_import/core/graph_cache.hpp +++ b/ngraph/frontend/onnx_import/include/onnx_import/core/graph_cache.hpp @@ -25,6 +25,17 @@ namespace ngraph { namespace onnx_import { + /// \brief Enum which determines scope (visibility) of nodes in GraphCache. + enum class NodeScope + { + // in parent graph scope + ParentGraph = 1, + // in subgraph scope + SubGraph, + // not available at all + Lack + }; + /// \brief GraphCache stores and provides access to ONNX graph initializers. class GraphCache { @@ -53,6 +64,16 @@ namespace ngraph /// \return true if the node named `name` exist in the cache, false otherwise. virtual bool contains(const std::string& name) const; + /// \brief Return NodeScope enum which determines scope of the node. + /// \note If the method is called on GraphCache the ParentGraph enum + /// value is retunred always. + /// + /// \param[in] name The name of the node. + /// + /// \return SubGraph if node belongs to SubgraphCache, ParentGraph if + /// is avalible in parent_graph_cache, otherwise Lack + virtual NodeScope node_scope(const std::string& name) const; + private: std::map> m_graph_cache_map; }; @@ -82,6 +103,14 @@ namespace ngraph /// (subgraph or parent graph), false otherwise. bool contains(const std::string& name) const override; + /// \brief Return NodeScope enum which determines scope of the node. + /// + /// \param[in] name The name of the node. + /// + /// \return SubGraph if the node belongs to SubgraphCache, ParentGraph if + /// is avalible in parent_graph_cache, otherwise Lack + NodeScope node_scope(const std::string& name) const override; + private: const GraphCache* m_parent_graph_cache; }; diff --git a/ngraph/frontend/onnx_import/src/core/graph.cpp b/ngraph/frontend/onnx_import/src/core/graph.cpp index 30c4f56541e5d0..605fdfba27cb3e 100644 --- a/ngraph/frontend/onnx_import/src/core/graph.cpp +++ b/ngraph/frontend/onnx_import/src/core/graph.cpp @@ -315,39 +315,48 @@ namespace ngraph model, std::unique_ptr(new SubgraphCache(parent_graph.get_graph_cache()))) { - std::vector> subgraph_root_nodes; - const auto& outputs = as_result_vector(get_ng_outputs()); - for (auto& out : outputs) + // find all nodes on edge parent graph-subgraph + // (it means input of node from parent graph, output from subgraph) + for (const auto& node_proto : proto.node()) { - subgraph_root_nodes.push_back(out); - } - const auto& params = get_ng_parameters(); - for (auto& param : params) - { - subgraph_root_nodes.push_back(param); - } - const auto subgraph_nodes = topological_sort(subgraph_root_nodes); - - const auto& parent_graph_parameters = parent_graph.get_ng_parameters(); - for (const auto& node : subgraph_nodes) - { - if (op::is_parameter(node)) + int input_index = 0; + for (const auto& in_name : node_proto.input()) { - const auto sub_it = std::find(m_parameters.begin(), m_parameters.end(), node); - // not present as subgraph parameter - if (sub_it == m_parameters.end()) + if (m_cache->node_scope(in_name) == NodeScope::ParentGraph) { - const auto parent_it = std::find( - parent_graph_parameters.begin(), parent_graph_parameters.end(), node); - if (parent_it != m_parameters.end()) + const auto& from_parent_node = m_cache->get_node(in_name); + // constants are skipped + if (!ngraph::is_type( + from_parent_node.get_node_shared_ptr())) { - m_parameters.push_back(*parent_it); + for (const auto& out_name : node_proto.output()) + { + if (m_cache->node_scope(out_name) == NodeScope::SubGraph) + { + auto out_node_to_replace_input = m_cache->get_node(out_name); + auto new_param = std::make_shared( + from_parent_node.get_element_type(), + from_parent_node.get_partial_shape()); + // replace input from parent scope with parameter + out_node_to_replace_input.get_node() + ->input(input_index) + .replace_source_output(new_param); + m_parameters.push_back(new_param); + m_outputs_from_parent.push_back(from_parent_node); + } + } } } + ++input_index; } } } + const std::vector> Subgraph::get_outputs_from_parent() const + { + return m_outputs_from_parent; + } + } // namespace onnx_import } // namespace ngraph diff --git a/ngraph/frontend/onnx_import/src/core/graph_cache.cpp b/ngraph/frontend/onnx_import/src/core/graph_cache.cpp index 54305b0ececdb4..2155bb0e01d233 100644 --- a/ngraph/frontend/onnx_import/src/core/graph_cache.cpp +++ b/ngraph/frontend/onnx_import/src/core/graph_cache.cpp @@ -43,6 +43,11 @@ namespace ngraph return (m_graph_cache_map.count(name) > 0); } + NodeScope GraphCache::node_scope(const std::string& name) const + { + return contains(name) ? NodeScope::ParentGraph : NodeScope::Lack; + } + SubgraphCache::SubgraphCache(const GraphCache& parent_graph_cache) : m_parent_graph_cache{&parent_graph_cache} { @@ -71,5 +76,21 @@ namespace ngraph return GraphCache::contains(name) || m_parent_graph_cache->contains(name); } + NodeScope SubgraphCache::node_scope(const std::string& name) const + { + if (GraphCache::contains(name)) + { + return NodeScope::SubGraph; + } + else if (m_parent_graph_cache->contains(name)) + { + return NodeScope::ParentGraph; + } + else + { + return NodeScope::Lack; + } + } + } // namespace onnx_import } // namespace ngraph diff --git a/ngraph/frontend/onnx_import/src/op/loop.cpp b/ngraph/frontend/onnx_import/src/op/loop.cpp index 2039b12b46ff65..faa3419a6b78fb 100644 --- a/ngraph/frontend/onnx_import/src/op/loop.cpp +++ b/ngraph/frontend/onnx_import/src/op/loop.cpp @@ -87,7 +87,12 @@ namespace ngraph // optional inputs Output trip_count; - if (ngraph::op::is_null(ng_inputs.at(0))) // trip count skipped + // trip count skipped or has value max(int64_t) means infinitive loop + if (ngraph::op::is_null(ng_inputs.at(0)) || + (ngraph::op::is_constant(ng_inputs.at(0).get_node_shared_ptr()) && + as_type_ptr(ng_inputs.at(0).get_node_shared_ptr()) + ->cast_vector()[0] == + std::numeric_limits::max())) { // -1 means infinite Loop trip_count = ngraph::op::Constant::create(ngraph::element::i64, {1}, {-1}); @@ -132,17 +137,13 @@ namespace ngraph const int64_t concat_axis = 0; const auto concat_axis_const = ngraph::op::Constant::create(ngraph::element::i64, {1}, {concat_axis}); - // provide scalar handing for scan outputs + // add dimension along which scan outputs will be concatenated for (size_t i = loop_carried_dependencies.size() + 1; i < body_outputs.size(); ++i) { - auto body_output_shape = body_outputs[i].get_partial_shape(); - if (body_output_shape.is_static() && - ngraph::is_scalar(body_output_shape.to_shape())) - { - body_outputs[i] = std::make_shared( - body_outputs[i], concat_axis_const); - } + const auto& body_output_shape = body_outputs[i].get_partial_shape(); + body_outputs[i] = std::make_shared( + body_outputs[i], concat_axis_const); } const auto& body_loop_out_cond = body_outputs.at(0).get_node_shared_ptr(); @@ -193,6 +194,22 @@ namespace ngraph final_values.push_back(loop->get_iter_value(*body_outputs_it++, -1)); } + const auto& outputs_from_parent = body_graph.get_outputs_from_parent(); + CHECK_VALID_NODE(node, + std::distance(body_inputs_it, body_inputs.end()) == + outputs_from_parent.size(), + "Expected number of invariant parameters is" + " not equal number of provided outputs from parent scope"); + + // Set-up parameters from parent graph which are not changed during Loop's + // iterations + for (auto out_from_parent_it = outputs_from_parent.begin(); + body_inputs_it != body_inputs.end(); + ++body_inputs_it, ++out_from_parent_it) + { + loop->set_invariant_input(*body_inputs_it, *out_from_parent_it); + } + // Set-up scan outputs OutputVector scan_outputs; for (; body_outputs_it != body_outputs.end(); body_outputs_it++) diff --git a/ngraph/frontend/onnx_import/src/op/topk.cpp b/ngraph/frontend/onnx_import/src/op/topk.cpp index 8dfb1ecb4ecc1e..a6ae196a435c2b 100644 --- a/ngraph/frontend/onnx_import/src/op/topk.cpp +++ b/ngraph/frontend/onnx_import/src/op/topk.cpp @@ -29,16 +29,6 @@ namespace { - /// \return Parse node attribute value for axis and adjust for negative value if needed. - std::int64_t get_axis(const ngraph::onnx_import::Node& node) - { - std::int64_t axis{node.get_attribute_value("axis", -1)}; - - const auto data = node.get_ng_inputs().at(0); - const auto data_rank = data.get_partial_shape().rank(); - return ngraph::normalize_axis(node.get_description(), axis, data_rank); - } - /// \return Return the second input to the TopK node reshaped to a scalar. ngraph::Output get_k(const ngraph::onnx_import::Node& node) { @@ -64,7 +54,7 @@ namespace ngraph auto data = node.get_ng_inputs().at(0); std::int64_t k{node.get_attribute_value("k")}; auto k_node = default_opset::Constant::create(element::i64, Shape{}, {k}); - auto axis = get_axis(node); + const std::int64_t axis{node.get_attribute_value("axis", -1)}; std::shared_ptr top_k = std::make_shared( data, @@ -84,7 +74,7 @@ namespace ngraph { auto data = node.get_ng_inputs().at(0); auto k = get_k(node); - auto axis = get_axis(node); + const std::int64_t axis{node.get_attribute_value("axis", -1)}; std::shared_ptr top_k = std::make_shared( data, @@ -107,7 +97,7 @@ namespace ngraph auto k = get_k(node); // Process attributes - const auto axis = get_axis(node); + const std::int64_t axis{node.get_attribute_value("axis", -1)}; const auto largest = node.get_attribute_value("largest", 1); const auto sorted = node.get_attribute_value("sorted", 1); diff --git a/ngraph/python/tests/__init__.py b/ngraph/python/tests/__init__.py index aca4c4409f6479..3ae971b31573d5 100644 --- a/ngraph/python/tests/__init__.py +++ b/ngraph/python/tests/__init__.py @@ -137,10 +137,8 @@ def xfail_test(reason="Mark the test as expected to fail", strict=True): "Argument element types are inconsistent.") xfail_issue_43742 = xfail_test(reason="RuntimeError: nGraph does not support the following ONNX operations:" "If") -xfail_issue_43439 = xfail_test(reason="Check 'tensor_rank.is_static()' failed at " - "ngraph/core/src/validation_util.cpp:884:" - "map_1/while/select_bboxes/sort_bboxes_10/TopKV2 " - "Rank must be static in order to normalize negative axis=-1") +xfail_issue_45457 = xfail_test(reason="RuntimeError: Unsupported dynamic ops: v5::Loop" + "Not constant termination condition body output is not supported") xfail_issue_38715 = xfail_test(reason="RuntimeError: While validating ONNX node '':" "While validating node 'v1::OneHot OneHot_" "(Convert_13525[0]:i64{3}, depth[0]:f32{}," diff --git a/ngraph/python/tests/test_onnx/test_zoo_models.py b/ngraph/python/tests/test_onnx/test_zoo_models.py index 2dd566631b0c80..11c55c2ecf91ef 100644 --- a/ngraph/python/tests/test_onnx/test_zoo_models.py +++ b/ngraph/python/tests/test_onnx/test_zoo_models.py @@ -29,7 +29,7 @@ xfail_issue_38701, xfail_issue_43742, xfail_issue_43380, - xfail_issue_43439, + xfail_issue_45457, xfail_issue_39684, xfail_issue_40957, xfail_issue_39685, @@ -152,7 +152,6 @@ def yolov3_post_processing(outputs : Sequence[Any]) -> Sequence[Any]: # Model MSFT (xfail_issue_43742, "test_MSFT_opset10_mlperf_ssd_mobilenet_300_ssd_mobilenet_v1_coco_2018_01_28_cpu"), - (xfail_issue_43439, "test_MSFT_opset10_mlperf_ssd_resnet34_1200_ssd_resnet34_mAP_20.2_cpu"), (xfail_issue_37957, "test_MSFT_opset10_mask_rcnn_keras_mask_rcnn_keras_cpu"), ] for test_case in import_xfail_list: @@ -178,6 +177,7 @@ def yolov3_post_processing(outputs : Sequence[Any]) -> Sequence[Any]: (xfail_issue_38084, "test_onnx_model_zoo_vision_object_detection_segmentation_mask_rcnn_model_MaskRCNN_10_mask_rcnn_R_50_FPN_1x_cpu"), (xfail_issue_38084, "test_onnx_model_zoo_vision_object_detection_segmentation_faster_rcnn_model_FasterRCNN_10_faster_rcnn_R_50_FPN_1x_cpu"), (xfail_issue_43380, "test_onnx_model_zoo_vision_object_detection_segmentation_tiny_yolov3_model_tiny_yolov3_11_yolov3_tiny_cpu"), + (xfail_issue_45457, "test_MSFT_opset10_mlperf_ssd_resnet34_1200_ssd_resnet34_mAP_20.2_cpu"), # Model MSFT (xfail_issue_37973, "test_MSFT_opset7_tf_inception_v2_model_cpu"), diff --git a/ngraph/test/models/onnx/loop/loop_2d_add_input_from_parent_graph.prototxt b/ngraph/test/models/onnx/loop/loop_2d_add_input_from_parent_graph.prototxt new file mode 100644 index 00000000000000..46c928876d280e --- /dev/null +++ b/ngraph/test/models/onnx/loop/loop_2d_add_input_from_parent_graph.prototxt @@ -0,0 +1,166 @@ +ir_version: 6 +producer_name: "nGraph ONNX Importer" +graph { + name: "basic loop" + node { + input: "trip_count" + input: "" + input: "a_init" + output: "a_final" + output: "a_values" + op_type: "Loop" + attribute { + name: "body" + g { + node { + input: "a_in" + input: "b" + output: "current_a" + name: "loop_body_add" + op_type: "Add" + } + node { + input: "cond_in" + output: "cond_out" + name: "cond_identity" + op_type: "Identity" + } + node { + input: "current_a" + output: "a_out" + name: "output_accumulator" + op_type: "Identity" + } + name: "simple add" + input { + name: "i" + type { + tensor_type { + elem_type: 7 + shape { + } + } + } + } + input { + name: "cond_in" + type { + tensor_type { + elem_type: 9 + shape { + } + } + } + } + input { + name: "a_in" + type { + tensor_type { + elem_type: 1 + shape { + dim { + dim_value: 1 + } + dim { + dim_value: 2 + } + } + } + } + } + output { + name: "cond_out" + type { + tensor_type { + elem_type: 9 + shape { + } + } + } + } + output { + name: "current_a" + type { + tensor_type { + elem_type: 1 + shape { + } + } + } + } + output { + name: "a_out" + type { + tensor_type { + elem_type: 1 + shape { + } + } + } + } + } + type: GRAPH + } + } + initializer { + dims: 1 + data_type: 7 + int64_data: 3 + name: "trip_count" + } + input { + name: "a_init" + type { + tensor_type { + elem_type: 1 + shape { + dim { + dim_value: 1 + } + dim { + dim_value: 2 + } + } + } + } + } + input { + name: "b" + type { + tensor_type { + elem_type: 1 + shape { + dim { + dim_value: 1 + } + dim { + dim_value: 2 + } + } + } + } + } + output { + name: "a_final" + type { + tensor_type { + elem_type: 1 + shape { + } + } + } + } + output { + name: "a_values" + type { + tensor_type { + elem_type: 1 + shape { + } + } + } + } +} +opset_import { + version: 11 +} diff --git a/ngraph/test/models/onnx/loop/loop_2d_add_trip_count_max_int.prototxt b/ngraph/test/models/onnx/loop/loop_2d_add_trip_count_max_int.prototxt new file mode 100644 index 00000000000000..227e00d9e56f7f --- /dev/null +++ b/ngraph/test/models/onnx/loop/loop_2d_add_trip_count_max_int.prototxt @@ -0,0 +1,177 @@ +ir_version: 6 +producer_name: "nGraph ONNX Importer" +graph { + name: "basic loop" + node { + input: "trip_count" + input: "cond_in" + input: "a_init" + output: "a_final" + output: "a_values" + op_type: "Loop" + attribute { + name: "body" + g { + node { + input: "a_in" + input: "b" + output: "current_a" + name: "loop_body_add" + op_type: "Add" + } + node { + input: "i" + input: "threshold" + output: "cond_out" + name: "condition_calc" + op_type: "Less" + } + node { + input: "current_a" + output: "a_out" + name: "output_accumulator" + op_type: "Identity" + } + name: "simple add" + initializer { + dims: 1 + dims: 2 + data_type: 1 + float_data: 1 + float_data: 1 + name: "b" + } + input { + name: "i" + type { + tensor_type { + elem_type: 7 + shape { + dim { + dim_value: 1 + } + } + } + } + } + input { + name: "cond" + type { + tensor_type { + elem_type: 9 + } + } + } + input { + name: "a_in" + type { + tensor_type { + elem_type: 1 + shape { + dim { + dim_value: 1 + } + dim { + dim_value: 2 + } + } + } + } + } + output { + name: "cond_out" + type { + tensor_type { + elem_type: 9 + } + } + } + output { + name: "current_a" + type { + tensor_type { + elem_type: 1 + shape { + } + } + } + } + output { + name: "a_out" + type { + tensor_type { + elem_type: 1 + shape { + } + } + } + } + } + type: GRAPH + } + } + initializer { + dims: 1 + data_type: 7 + int64_data: 5 + name: "threshold" + } + initializer { + dims: 1 + data_type: 7 + int64_data: 9223372036854775807 + name: "trip_count" + } + input { + name: "cond_in" + type { + tensor_type { + elem_type: 9 + shape { + dim { + dim_value: 1 + } + } + } + } + } + input { + name: "a_init" + type { + tensor_type { + elem_type: 1 + shape { + dim { + dim_value: 1 + } + dim { + dim_value: 2 + } + } + } + } + } + output { + name: "a_final" + type { + tensor_type { + elem_type: 1 + shape { + } + } + } + } + output { + name: "a_values" + type { + tensor_type { + elem_type: 1 + shape { + } + } + } + } +} +opset_import { + version: 11 +} diff --git a/ngraph/test/models/onnx/loop/loop_add_node_from_parent_scope_used_in_parent_and_in_body.prototxt b/ngraph/test/models/onnx/loop/loop_add_node_from_parent_scope_used_in_parent_and_in_body.prototxt new file mode 100644 index 00000000000000..ad594c795e41e1 --- /dev/null +++ b/ngraph/test/models/onnx/loop/loop_add_node_from_parent_scope_used_in_parent_and_in_body.prototxt @@ -0,0 +1,181 @@ +ir_version: 6 +producer_name: "nGraph ONNX Importer" +graph { + name: "basic loop" + node { + input: "parent_input" + input: "scale" + name: "mul_node" + op_type: "Mul" + output: "b" + } + node { + input: "parent_input" + input: "b" + name: "parent_add_node" + op_type: "Add" + output: "c" + } + node { + input: "trip_count" + input: "cond_in" + input: "a_init" + output: "a_final" + output: "a_values" + op_type: "Loop" + attribute { + name: "body" + g { + name: "simple add" + node { + input: "b" + input: "a_in" + output: "current_a" + name: "loop_body_add" + op_type: "Add" + } + node { + input: "cond" + output: "cond_out" + name: "cond_identity" + op_type: "Identity" + } + node { + input: "current_a" + output: "a_out" + name: "output_accumulator" + op_type: "Identity" + } + input { + name: "i" + type { + tensor_type { + elem_type: 7 + shape { + dim { + dim_value: 1 + } + } + } + } + } + input { + name: "cond" + type { + tensor_type { + elem_type: 9 + } + } + } + input { + name: "a_in" + type { + tensor_type { + elem_type: 1 + } + } + } + output { + name: "cond_out" + type { + tensor_type { + elem_type: 9 + } + } + } + output { + name: "current_a" + type { + tensor_type { + elem_type: 1 + } + } + } + output { + name: "a_out" + type { + tensor_type { + elem_type: 1 + } + } + } + } + type: GRAPH + } + } + initializer { + dims: 1 + data_type: 7 + int64_data: 3 + name: "trip_count" + } + initializer { + dims: 1 + data_type: 9 + int32_data: 00000001 + name: "cond_in" + } + initializer { + dims: 1 + data_type: 1 + float_data: 2 + name: "scale" + } + + input { + name: "a_init" + type { + tensor_type { + elem_type: 1 + shape { + dim { + dim_value: 1 + } + dim { + dim_value: 2 + } + } + } + } + } + input { + name: "parent_input" + type { + tensor_type { + elem_type: 1 + shape { + dim { + dim_value: 1 + } + } + } + } + } + output { + name: "a_final" + type { + tensor_type { + elem_type: 1 + } + } + } + output { + name: "a_values" + type { + tensor_type { + elem_type: 1 + } + } + } + output { + name: "c" + type { + tensor_type { + elem_type: 1 + } + } + } +} +opset_import { + version: 11 +} diff --git a/ngraph/test/models/onnx/top_k_opset_11_const_k_smallest_negative_axis.prototxt b/ngraph/test/models/onnx/top_k_opset_11_const_k_smallest_negative_axis.prototxt new file mode 100644 index 00000000000000..18d2440497122d --- /dev/null +++ b/ngraph/test/models/onnx/top_k_opset_11_const_k_smallest_negative_axis.prototxt @@ -0,0 +1,97 @@ +ir_version: 5 +producer_name: "nGraph ONNX Importer" +graph { + node { + input: "x" + input: "k" + output: "values" + output: "indices" + op_type: "TopK" + attribute { + name: "axis" + i: -1 + type: INT + } + attribute { + name: "largest" + i: 0 + type: INT + } + attribute { + name: "sorted" + i: 1 + type: INT + } + } + name: "test_top_k" + input { + name: "x" + type { + tensor_type { + elem_type: 1 + shape { + dim { + dim_value: 3 + } + dim { + dim_value: 4 + } + } + } + } + } + input { + name: "k" + type { + tensor_type { + elem_type: 7 + shape { + dim { + dim_value: 1 + } + } + } + } + } + initializer { + dims: 1 + data_type: 7 + int64_data: 3 + name: "k" + } + output { + name: "values" + type { + tensor_type { + elem_type: 1 + shape { + dim { + dim_value: 3 + } + dim { + dim_value: 3 + } + } + } + } + } + output { + name: "indices" + type { + tensor_type { + elem_type: 7 + shape { + dim { + dim_value: 3 + } + dim { + dim_value: 3 + } + } + } + } + } +} +opset_import { + version: 11 +} diff --git a/ngraph/test/onnx/onnx_import.in.cpp b/ngraph/test/onnx/onnx_import.in.cpp index ac1d1702e68fbe..e33db62054604c 100644 --- a/ngraph/test/onnx/onnx_import.in.cpp +++ b/ngraph/test/onnx/onnx_import.in.cpp @@ -2308,6 +2308,20 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_top_k_opset_11_const_k_smallest) test_case.run(); } +NGRAPH_TEST(${BACKEND_NAME}, onnx_top_k_opset_11_const_k_smallest_negative_axis) +{ + auto function = onnx_import::import_onnx_model(file_util::path_join( + SERIALIZED_ZOO, "onnx/top_k_opset_11_const_k_smallest_negative_axis.prototxt")); + + auto test_case = test::TestCase(function); + test_case.add_input({0, 1, 2, 3, 4, 5, 6, 7, 11, 10, 9, 8}); + + test_case.add_expected_output(Shape{3, 3}, {0, 1, 2, 4, 5, 6, 8, 9, 10}); // values + test_case.add_expected_output(Shape{3, 3}, + {0, 1, 2, 0, 1, 2, 3, 2, 1}); // indices + test_case.run(); +} + NGRAPH_TEST(${BACKEND_NAME}, onnx_model_acosh) { auto function = diff --git a/ngraph/test/onnx/onnx_import_controlflow.in.cpp b/ngraph/test/onnx/onnx_import_controlflow.in.cpp index 827c5b4d716fe0..278371bb883a6f 100644 --- a/ngraph/test/onnx/onnx_import_controlflow.in.cpp +++ b/ngraph/test/onnx/onnx_import_controlflow.in.cpp @@ -60,14 +60,14 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_add) EXPECT_EQ(function->get_output_shape(0), (Shape{1, 2})); EXPECT_EQ(function->get_output_element_type(1), ngraph::element::f32); EXPECT_TRUE(function->get_output_partial_shape(1).is_static()); - EXPECT_EQ(function->get_output_shape(1), (Shape{3, 2})); + EXPECT_EQ(function->get_output_shape(1), (Shape{3, 1, 2})); auto test_case = test::TestCase(function); // a_init test_case.add_input({0.f, 0.f}); test_case.add_expected_output(Shape{1, 2}, {3.f, 3.f}); - test_case.add_expected_output(Shape{3, 2}, {1.f, 1.f, 2.f, 2.f, 3.f, 3.f}); + test_case.add_expected_output(Shape{3, 1, 2}, {1.f, 1.f, 2.f, 2.f, 3.f, 3.f}); test_case.run(); } @@ -89,7 +89,24 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_no_identity_termination_co test_case.add_expected_output(Shape{1, 2}, {6.f, 6.f}); test_case.add_expected_output( - Shape{6, 2}, {1.f, 1.f, 2.f, 2.f, 3.f, 3.f, 4.f, 4.f, 5.f, 5.f, 6.f, 6.f}); + Shape{6, 1, 2}, {1.f, 1.f, 2.f, 2.f, 3.f, 3.f, 4.f, 4.f, 5.f, 5.f, 6.f, 6.f}); + test_case.run(); +} + +NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_trip_count_max_int) +{ + const auto function = onnx_import::import_onnx_model( + file_util::path_join(SERIALIZED_ZOO, "onnx/loop/loop_2d_add_trip_count_max_int.prototxt")); + + auto test_case = test::TestCase(function); + // termination condition + test_case.add_input({true}); + // a_init + test_case.add_input({0.f, 0.f}); + + test_case.add_expected_output(Shape{1, 2}, {6.f, 6.f}); + test_case.add_expected_output( + Shape{6, 1, 2}, {1.f, 1.f, 2.f, 2.f, 3.f, 3.f, 4.f, 4.f, 5.f, 5.f, 6.f, 6.f}); test_case.run(); } @@ -140,7 +157,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_const_no_identity_terminat test_case.add_input({0.f, 0.f}); test_case.add_expected_output(Shape{1, 2}, {4.f, 4.f}); - test_case.add_expected_output(Shape{4, 2}, {1, 1, 2, 2, 3, 3, 4, 4}); + test_case.add_expected_output(Shape{4, 1, 2}, {1, 1, 2, 2, 3, 3, 4, 4}); test_case.run(); } @@ -182,7 +199,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_both_cond_and_trip_count_a test_case.add_expected_output(Shape{1, 2}, {6.f, 6.f}); test_case.add_expected_output( - Shape{6, 2}, {1.f, 1.f, 2.f, 2.f, 3.f, 3.f, 4.f, 4.f, 5.f, 5.f, 6.f, 6.f}); + Shape{6, 1, 2}, {1.f, 1.f, 2.f, 2.f, 3.f, 3.f, 4.f, 4.f, 5.f, 5.f, 6.f, 6.f}); test_case.run(); } @@ -220,7 +237,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_initializer_from_parent_s test_case.add_input({0.f, 0.f}); test_case.add_expected_output(Shape{1, 2}, {6.f, 6.f}); - test_case.add_expected_output(Shape{3, 2}, {2.f, 2.f, 4.f, 4.f, 6.f, 6.f}); + test_case.add_expected_output(Shape{3, 1, 2}, {2.f, 2.f, 4.f, 4.f, 6.f, 6.f}); test_case.run(); } @@ -234,7 +251,26 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_node_from_parent_scope) test_case.add_input({0.f, 0.f}); test_case.add_expected_output(Shape{1, 2}, {12.f, 12.f}); - test_case.add_expected_output(Shape{3, 2}, {4.f, 4.f, 8.f, 8.f, 12.f, 12.f}); + test_case.add_expected_output(Shape{3, 1, 2}, {4.f, 4.f, 8.f, 8.f, 12.f, 12.f}); + test_case.run(); +} + +NGRAPH_TEST(${BACKEND_NAME}, + onnx_controlflow_loop_add_node_from_parent_scope_used_in_parent_and_in_body) +{ + const auto function = onnx_import::import_onnx_model(file_util::path_join( + SERIALIZED_ZOO, + "onnx/loop/loop_add_node_from_parent_scope_used_in_parent_and_in_body.prototxt")); + + auto test_case = test::TestCase(function); + // a_init + test_case.add_input({0.f, 0.f}); + // parent_input + test_case.add_input({3.f}); + + test_case.add_expected_output(Shape{1, 2}, {18.f, 18.f}); + test_case.add_expected_output(Shape{3, 1, 2}, {6.f, 6.f, 12.f, 12.f, 18.f, 18.f}); + test_case.add_expected_output(Shape{1}, {9.f}); test_case.run(); } @@ -268,7 +304,23 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_value_the_same_node_from_ test_case.add_input({0.f, 0.f}); test_case.add_expected_output(Shape{1, 2}, {3.f, 3.f}); - test_case.add_expected_output(Shape{3, 2}, {1.f, 1.f, 2.f, 2.f, 3.f, 3.f}); + test_case.add_expected_output(Shape{3, 1, 2}, {1.f, 1.f, 2.f, 2.f, 3.f, 3.f}); + test_case.run(); +} + +NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_add_input_from_parent_graph) +{ + const auto function = onnx_import::import_onnx_model(file_util::path_join( + SERIALIZED_ZOO, "onnx/loop/loop_2d_add_input_from_parent_graph.prototxt")); + + auto test_case = test::TestCase(function); + // a_init + test_case.add_input({0.f, 0.f}); + // b input + test_case.add_input({1.f, 1.f}); + + test_case.add_expected_output(Shape{1, 2}, {3.f, 3.f}); + test_case.add_expected_output(Shape{3, 1, 2}, {1.f, 1.f, 2.f, 2.f, 3.f, 3.f}); test_case.run(); } @@ -321,7 +373,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_add_const_cond) test_case.add_input({0.f, 0.f}); test_case.add_expected_output(Shape{1, 2}, {3.f, 3.f}); - test_case.add_expected_output(Shape{3, 2}, {1.f, 1.f, 2.f, 2.f, 3.f, 3.f}); + test_case.add_expected_output(Shape{3, 1, 2}, {1.f, 1.f, 2.f, 2.f, 3.f, 3.f}); test_case.run(); } @@ -379,8 +431,9 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_controlflow_loop_2d_trip_count_and_cond_skippe EXPECT_TRUE(function->get_output_partial_shape(0).is_static()); EXPECT_EQ(function->get_output_shape(0), (Shape{1, 2})); EXPECT_EQ(function->get_output_element_type(1), ngraph::element::f32); - // scan_outputs shape is not know if trip_count and termination condition is not determined - EXPECT_TRUE(function->get_output_partial_shape(1).rank().is_dynamic()); + EXPECT_TRUE(function->get_output_partial_shape(1).rank().is_static()); + EXPECT_EQ(function->get_output_partial_shape(1).rank(), 3); + EXPECT_EQ(function->get_output_partial_shape(1), (PartialShape{Dimension::dynamic(), 1, 2})); } // infinitive loop execution diff --git a/ngraph/test/runtime/ie/unit_test.manifest b/ngraph/test/runtime/ie/unit_test.manifest index 706abec717d51b..9fbf986df28888 100644 --- a/ngraph/test/runtime/ie/unit_test.manifest +++ b/ngraph/test/runtime/ie/unit_test.manifest @@ -71,6 +71,7 @@ onnx_model_split_equal_parts_2d onnx_model_split_variable_parts_2d onnx_top_k_opset_10_const_k onnx_top_k_opset_11_const_k_smallest +onnx_top_k_opset_11_const_k_smallest_negative_axis split_1d split_2d_axis_0 split_2d_axis_1 @@ -1520,6 +1521,7 @@ IE_GPU.onnx_model_fake_quantize_nonconst_inputs_infer # Not supported dynamic shapes cases for Loop onnx_controlflow_loop_2d_no_identity_termination_cond onnx_controlflow_loop_2d_no_identity_termination_cond_false +onnx_controlflow_loop_2d_trip_count_max_int onnx_controlflow_loop_2d_const_no_identity_termination_cond onnx_controlflow_loop_2d_both_cond_and_trip_count_as_inputs onnx_controlflow_loop_no_variadic_inputs_and_outputs diff --git a/ngraph/test/type_prop/loop.cpp b/ngraph/test/type_prop/loop.cpp index f4dfe846d88ab0..fd1f4d912484ae 100644 --- a/ngraph/test/type_prop/loop.cpp +++ b/ngraph/test/type_prop/loop.cpp @@ -334,7 +334,7 @@ TEST(type_prop, loop_operation_for_and_condition_mode_dynamic_iter_static_shapes // trip_count = 10 // execution_condition = true // body_condition is not a Constant -// concat output will be dynamic, another outputs are static +// concat output has only dynamic rank, another outputs are static TEST(type_prop, loop_operation_for_and_condition_mode_dynamic_iter_dynamic_shapes) { // That which we iterate over @@ -397,7 +397,7 @@ TEST(type_prop, loop_operation_for_and_condition_mode_dynamic_iter_dynamic_shape // Output 0 is last Zo auto out0 = loop->get_iter_value(body_condition, -1); auto out1 = loop->get_iter_value(Zo, -1); - auto out2 = loop->get_concatenated_slices(Zo, 0, 1, 1, -1, 1); + auto out2 = loop->get_concatenated_slices(Zo, 0, 1, 1, -1, 0); // check output descriptors for (auto& desc : loop->get_output_descriptions()) @@ -422,9 +422,9 @@ TEST(type_prop, loop_operation_for_and_condition_mode_dynamic_iter_dynamic_shape auto result2 = make_shared(out2); Shape out0_shape{1}; Shape out1_shape{1}; - PartialShape out2_shape{PartialShape::dynamic()}; + PartialShape out2_shape{PartialShape::dynamic(1)}; - auto results = ResultVector{result0, result1}; + auto results = ResultVector{result0, result1, result2}; auto f = make_shared(results, ParameterVector{X, Y, M}); EXPECT_EQ(result0->get_output_shape(0), out0_shape); EXPECT_EQ(result1->get_output_shape(0), out1_shape); @@ -435,6 +435,176 @@ TEST(type_prop, loop_operation_for_and_condition_mode_dynamic_iter_dynamic_shape EXPECT_EQ(loop->get_output_partial_shape(2), out2_shape); } +// trip_count = 10 +// execution_condition = true +// body_condition is not a Constant +// inputs have partially known shape +// concat output has dynamic dimension on axis position, another outputs are static +TEST(type_prop, loop_operation_for_and_condition_mode_dynamic_iter_partially_dynamic_shapes) +{ + // That which we iterate over + auto X = + make_shared(element::f32, PartialShape{1, 2, 3, Dimension::dynamic()}); + auto Y = + make_shared(element::f32, PartialShape{1, 2, 3, Dimension::dynamic()}); + auto M = make_shared(element::f32, Shape{1}); + + // Set up the cell body, a function from (Xi, Yi) -> (Zo) + // Body parameters + auto current_iteration = make_shared(element::i64, Shape{1}); + auto Xi = make_shared(element::f32, PartialShape::dynamic()); + auto Yi = make_shared(element::f32, PartialShape::dynamic()); + auto M_body = make_shared(element::f32, PartialShape::dynamic()); + auto condition_const = + std::make_shared(ngraph::element::f32, ngraph::Shape{1}, 10); + auto body_condition = std::make_shared(M_body, condition_const); + + auto trip_count = + std::make_shared(ngraph::element::i64, ngraph::Shape{1}, 10); + auto exec_condition = std::make_shared( + ngraph::element::boolean, ngraph::Shape{1}, true); + // Body + auto sum = make_shared(Xi, Yi); + auto Zo = make_shared(sum, M_body); + auto body = make_shared(OutputVector{body_condition, Zo}, + ParameterVector{current_iteration, Xi, Yi, M_body}); + + auto loop = make_shared(trip_count, exec_condition); + loop->set_function(body); + loop->set_special_body_ports(ngraph::opset5::Loop::SpecialBodyPorts{-1, 0}); + + loop->set_invariant_input(Xi, X); + loop->set_invariant_input(Yi, Y); + loop->set_merged_input(M_body, M, Zo); + + // check input descriptors + for (auto& desc : loop->get_input_descriptions()) + { + auto type_info = desc->get_type_info(); + if (std::strcmp(type_info.name, "InvariantInputDescription") == 0) + { + auto input_desc = + as_type_ptr(desc); + EXPECT_NE(input_desc, nullptr); + } + else if (std::strcmp(type_info.name, "SliceInputDescription") == 0) + { + auto input_desc = + as_type_ptr(desc); + EXPECT_NE(input_desc, nullptr); + } + else if (std::strcmp(type_info.name, "MergedInputDescription") == 0) + { + auto input_desc = + as_type_ptr(desc); + EXPECT_NE(input_desc, nullptr); + } + } + + // Output 0 is last Zo + auto out0 = loop->get_iter_value(body_condition, -1); + auto out1 = loop->get_iter_value(Zo, -1); + // axis=1 so sliced output on this dimension will be dynamic + auto out2 = loop->get_concatenated_slices(Zo, 0, 1, 1, -1, 1); + + // check output descriptors + for (auto& desc : loop->get_output_descriptions()) + { + auto type_info = desc->get_type_info(); + if (std::strcmp(type_info.name, "ConcatOutputDescription") == 0) + { + auto output_desc = + as_type_ptr(desc); + EXPECT_NE(output_desc, nullptr); + } + else if (std::strcmp(type_info.name, "BodyOutputDescription") == 0) + { + auto output_desc = + as_type_ptr(desc); + EXPECT_NE(output_desc, nullptr); + } + } + + auto result0 = make_shared(out0); + auto result1 = make_shared(out1); + auto result2 = make_shared(out2); + Shape out0_shape{1}; + PartialShape out1_shape{1, 2, 3, Dimension::dynamic()}; + PartialShape out2_shape{1, Dimension::dynamic(), 3, Dimension::dynamic()}; + + auto results = ResultVector{result0, result1, result2}; + auto f = make_shared(results, ParameterVector{X, Y, M}); + EXPECT_EQ(result0->get_output_shape(0), out0_shape); + EXPECT_EQ(result1->get_output_partial_shape(0), out1_shape); + EXPECT_EQ(result2->get_output_partial_shape(0), out2_shape); + + EXPECT_EQ(loop->get_output_shape(0), out0_shape); + EXPECT_EQ(loop->get_output_partial_shape(1), out1_shape); + EXPECT_EQ(loop->get_output_partial_shape(2), out2_shape); +} + +// trip_count = 10 +// execution_condition = true +// body_condition is not a Constant +// inputs have partially known shape +// Axis of silced output is set as incorrect +TEST(type_prop, loop_operation_for_and_condition_mode_dynamic_iter_incorrect_sliced_output_axis) +{ + // That which we iterate over + auto X = + make_shared(element::f32, PartialShape{1, 2, 3, Dimension::dynamic()}); + auto Y = + make_shared(element::f32, PartialShape{1, 2, 3, Dimension::dynamic()}); + auto M = make_shared(element::f32, Shape{1}); + + // Set up the cell body, a function from (Xi, Yi) -> (Zo) + // Body parameters + auto current_iteration = make_shared(element::i64, Shape{1}); + auto Xi = make_shared(element::f32, PartialShape::dynamic()); + auto Yi = make_shared(element::f32, PartialShape::dynamic()); + auto M_body = make_shared(element::f32, PartialShape::dynamic()); + auto condition_const = + std::make_shared(ngraph::element::f32, ngraph::Shape{1}, 10); + auto body_condition = std::make_shared(M_body, condition_const); + + auto trip_count = + std::make_shared(ngraph::element::i64, ngraph::Shape{1}, 10); + auto exec_condition = std::make_shared( + ngraph::element::boolean, ngraph::Shape{1}, true); + // Body + auto sum = make_shared(Xi, Yi); + auto Zo = make_shared(sum, M_body); + auto body = make_shared(OutputVector{body_condition, Zo}, + ParameterVector{current_iteration, Xi, Yi, M_body}); + + auto loop = make_shared(trip_count, exec_condition); + loop->set_function(body); + loop->set_special_body_ports(ngraph::opset5::Loop::SpecialBodyPorts{-1, 0}); + + loop->set_invariant_input(Xi, X); + loop->set_invariant_input(Yi, Y); + loop->set_merged_input(M_body, M, Zo); + + const auto sliced_output_axis = 4; + auto out = loop->get_concatenated_slices(Zo, 0, 1, 1, -1, sliced_output_axis); + + auto result = make_shared(out); + try + { + auto f = make_shared(ResultVector{result}, ParameterVector{X, Y, M}); + FAIL() << "Loop was created with incorrect axis of concatenated slices output."; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING( + error.what(), std::string("Concatenation axis must be less than sliced output rank")); + } + catch (...) + { + FAIL() << "Construction loop operator failed for unexpected reason."; + } +} + // trip_count = -1 // execution_condition = true // body_condition = true @@ -527,7 +697,7 @@ TEST(type_prop, loop_operation_infinite_loop_mode_dynamic_iter_dynamic_shapes) auto result2 = make_shared(out2); Shape out0_shape{1}; Shape out1_shape{32, 1, 10}; - PartialShape out2_shape{PartialShape::dynamic()}; + PartialShape out2_shape{32, Dimension::dynamic(), 10}; auto results = ResultVector{result0, result1, result2}; auto f = make_shared(results, ParameterVector{X, Y, M}); From b2399ce0d978b5974a2e0f030aeddca29a0fbe73 Mon Sep 17 00:00:00 2001 From: Ilya Churaev Date: Mon, 21 Dec 2020 14:32:40 +0300 Subject: [PATCH 105/244] Enable Conditional Compilation for nGraph evaluate methods (#3666) * Added CC macro to nGraph * Add CC to evaluate methods * Fixed tests * Fixed comments * Add private evaluates * Fixed code style and names * Fixed code style * Fixed build --- ngraph/core/CMakeLists.txt | 2 +- ngraph/core/include/ngraph/op/broadcast.hpp | 4 + .../core/include/ngraph/op/depth_to_space.hpp | 4 + ngraph/core/include/ngraph/op/gather.hpp | 3 + ngraph/core/include/ngraph/op/interpolate.hpp | 2 + ngraph/core/include/ngraph/op/max_pool.hpp | 2 + ngraph/core/include/ngraph/op/pad.hpp | 2 + ngraph/core/include/ngraph/op/reshape.hpp | 2 + ngraph/core/include/ngraph/op/reverse.hpp | 4 + .../ngraph/op/scatter_elements_update.hpp | 4 + .../core/include/ngraph/op/scatter_update.hpp | 4 + .../include/ngraph/op/shuffle_channels.hpp | 2 + .../core/include/ngraph/op/space_to_batch.hpp | 4 + .../core/include/ngraph/op/space_to_depth.hpp | 4 + ngraph/core/include/ngraph/op/tile.hpp | 4 + ngraph/core/include/ngraph/op/topk.hpp | 4 + .../core/include/ngraph/op/variadic_split.hpp | 4 + ngraph/core/src/itt.hpp | 30 ++- ngraph/core/src/op/abs.cpp | 31 +-- ngraph/core/src/op/acos.cpp | 28 +- ngraph/core/src/op/acosh.cpp | 23 +- ngraph/core/src/op/add.cpp | 41 ++- ngraph/core/src/op/and.cpp | 27 +- ngraph/core/src/op/asin.cpp | 28 +- ngraph/core/src/op/asinh.cpp | 23 +- ngraph/core/src/op/atan.cpp | 28 +- ngraph/core/src/op/atanh.cpp | 23 +- ngraph/core/src/op/batch_to_space.cpp | 198 ++++++++------- ngraph/core/src/op/broadcast.cpp | 37 +-- ngraph/core/src/op/ceiling.cpp | 39 ++- ngraph/core/src/op/clamp.cpp | 8 +- ngraph/core/src/op/concat.cpp | 8 +- ngraph/core/src/op/constant.cpp | 8 +- ngraph/core/src/op/convert.cpp | 77 +++--- ngraph/core/src/op/cos.cpp | 27 +- ngraph/core/src/op/cosh.cpp | 27 +- ngraph/core/src/op/depth_to_space.cpp | 24 +- ngraph/core/src/op/divide.cpp | 27 +- ngraph/core/src/op/equal.cpp | 26 +- ngraph/core/src/op/erf.cpp | 27 +- ngraph/core/src/op/exp.cpp | 27 +- ngraph/core/src/op/floor.cpp | 39 ++- ngraph/core/src/op/floor_mod.cpp | 33 +-- ngraph/core/src/op/gather.cpp | 31 ++- ngraph/core/src/op/greater.cpp | 27 +- ngraph/core/src/op/greater_eq.cpp | 27 +- ngraph/core/src/op/hsigmoid.cpp | 15 +- ngraph/core/src/op/hswish.cpp | 15 +- ngraph/core/src/op/interpolate.cpp | 12 +- ngraph/core/src/op/less.cpp | 26 +- ngraph/core/src/op/less_eq.cpp | 27 +- ngraph/core/src/op/log.cpp | 27 +- ngraph/core/src/op/loop.cpp | 15 +- ngraph/core/src/op/matmul.cpp | 25 +- ngraph/core/src/op/max.cpp | 24 +- ngraph/core/src/op/max_pool.cpp | 36 +-- ngraph/core/src/op/maximum.cpp | 24 +- ngraph/core/src/op/min.cpp | 24 +- ngraph/core/src/op/minimum.cpp | 24 +- ngraph/core/src/op/mish.cpp | 12 +- ngraph/core/src/op/multiply.cpp | 33 ++- ngraph/core/src/op/negative.cpp | 27 +- ngraph/core/src/op/non_zero.cpp | 40 ++- ngraph/core/src/op/not.cpp | 27 +- ngraph/core/src/op/not_equal.cpp | 27 +- ngraph/core/src/op/one_hot.cpp | 59 +++-- ngraph/core/src/op/or.cpp | 26 +- ngraph/core/src/op/pad.cpp | 10 +- ngraph/core/src/op/power.cpp | 26 +- ngraph/core/src/op/prelu.cpp | 17 +- ngraph/core/src/op/prior_box.cpp | 34 +-- ngraph/core/src/op/prior_box_clustered.cpp | 34 +-- ngraph/core/src/op/range.cpp | 240 ++++++++---------- ngraph/core/src/op/reduce_l1.cpp | 21 +- ngraph/core/src/op/reduce_l2.cpp | 16 +- ngraph/core/src/op/reduce_logical_and.cpp | 25 +- ngraph/core/src/op/reduce_logical_or.cpp | 25 +- ngraph/core/src/op/reduce_mean.cpp | 24 +- ngraph/core/src/op/reduce_prod.cpp | 25 +- ngraph/core/src/op/reduce_sum.cpp | 24 +- ngraph/core/src/op/relu.cpp | 27 +- ngraph/core/src/op/reshape.cpp | 57 ++--- ngraph/core/src/op/result.cpp | 12 +- ngraph/core/src/op/reverse.cpp | 99 +++----- ngraph/core/src/op/roi_align.cpp | 133 +++++----- ngraph/core/src/op/round.cpp | 43 ++-- .../core/src/op/scatter_elements_update.cpp | 108 ++++---- ngraph/core/src/op/scatter_update.cpp | 97 +++---- ngraph/core/src/op/select.cpp | 43 ++-- ngraph/core/src/op/shape_of.cpp | 22 +- ngraph/core/src/op/shuffle_channels.cpp | 17 +- ngraph/core/src/op/sigmoid.cpp | 27 +- ngraph/core/src/op/sign.cpp | 27 +- ngraph/core/src/op/sin.cpp | 27 +- ngraph/core/src/op/sinh.cpp | 27 +- ngraph/core/src/op/softmax.cpp | 34 ++- ngraph/core/src/op/softplus.cpp | 15 +- ngraph/core/src/op/space_to_batch.cpp | 14 +- ngraph/core/src/op/space_to_depth.cpp | 17 +- ngraph/core/src/op/split.cpp | 8 +- ngraph/core/src/op/sqrt.cpp | 24 +- ngraph/core/src/op/squeeze.cpp | 23 +- ngraph/core/src/op/strided_slice.cpp | 24 +- ngraph/core/src/op/subtract.cpp | 27 +- ngraph/core/src/op/swish.cpp | 29 +-- ngraph/core/src/op/tan.cpp | 27 +- ngraph/core/src/op/tanh.cpp | 24 +- ngraph/core/src/op/tile.cpp | 10 +- ngraph/core/src/op/topk.cpp | 158 +++++++----- ngraph/core/src/op/transpose.cpp | 6 +- ngraph/core/src/op/unsqueeze.cpp | 23 +- ngraph/core/src/op/util/broadcast_base.cpp | 99 ++++---- ngraph/core/src/op/variadic_split.cpp | 85 +++---- ngraph/core/src/op/xor.cpp | 31 +-- 114 files changed, 1704 insertions(+), 1860 deletions(-) diff --git a/ngraph/core/CMakeLists.txt b/ngraph/core/CMakeLists.txt index 4d62f63fb34dd6..0356063585468e 100644 --- a/ngraph/core/CMakeLists.txt +++ b/ngraph/core/CMakeLists.txt @@ -58,7 +58,7 @@ set_target_properties(ngraph PROPERTIES C_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON) -target_link_libraries(ngraph PRIVATE openvino::itt ngraph::builder ngraph::reference) +target_link_libraries(ngraph PRIVATE openvino::conditional_compilation openvino::itt ngraph::builder ngraph::reference) find_package(Graphviz QUIET) if (GRAPHVIZ_FOUND) diff --git a/ngraph/core/include/ngraph/op/broadcast.hpp b/ngraph/core/include/ngraph/op/broadcast.hpp index 9e36849fe5cea8..e7a2c60fb90095 100644 --- a/ngraph/core/include/ngraph/op/broadcast.hpp +++ b/ngraph/core/include/ngraph/op/broadcast.hpp @@ -82,6 +82,10 @@ namespace ngraph std::pair get_broadcast_axes() const override; bool evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const override; + + private: + bool broadcast_evaluate(const HostTensorVector& outputs, + const HostTensorVector& inputs) const; }; } // namespace v3 diff --git a/ngraph/core/include/ngraph/op/depth_to_space.hpp b/ngraph/core/include/ngraph/op/depth_to_space.hpp index 19deb75df5f65d..905d8ff93865ef 100644 --- a/ngraph/core/include/ngraph/op/depth_to_space.hpp +++ b/ngraph/core/include/ngraph/op/depth_to_space.hpp @@ -79,6 +79,10 @@ namespace ngraph std::size_t m_blocksize; DepthToSpaceMode m_mode; DepthToSpaceMode mode_from_string(const std::string& mode) const; + + private: + bool evaluate_depth_to_space(const HostTensorVector& outputs, + const HostTensorVector& inputs) const; }; } using v0::DepthToSpace; diff --git a/ngraph/core/include/ngraph/op/gather.hpp b/ngraph/core/include/ngraph/op/gather.hpp index 9f7d77c548ea61..e158d24ac22d64 100644 --- a/ngraph/core/include/ngraph/op/gather.hpp +++ b/ngraph/core/include/ngraph/op/gather.hpp @@ -57,6 +57,9 @@ namespace ngraph static const int PARAMS; static const int INDICES; static const int AXIS; + + bool evaluate_gather(const HostTensorVector& outputs, + const HostTensorVector& inputs) const; }; } // namespace v1 } // namespace op diff --git a/ngraph/core/include/ngraph/op/interpolate.hpp b/ngraph/core/include/ngraph/op/interpolate.hpp index c5eff08436b0bc..41d26112cec3f8 100644 --- a/ngraph/core/include/ngraph/op/interpolate.hpp +++ b/ngraph/core/include/ngraph/op/interpolate.hpp @@ -234,6 +234,8 @@ namespace ngraph std::vector get_axes() const; private: + bool evaluate_interpolate(const HostTensorVector& outputs, + const HostTensorVector& inputs) const; InterpolateAttrs m_attrs; /// \brief Corrects pads_begin and pads_end attributes. diff --git a/ngraph/core/include/ngraph/op/max_pool.hpp b/ngraph/core/include/ngraph/op/max_pool.hpp index ebb624fd266f0c..b4491cb7fc2da3 100644 --- a/ngraph/core/include/ngraph/op/max_pool.hpp +++ b/ngraph/core/include/ngraph/op/max_pool.hpp @@ -98,6 +98,8 @@ namespace ngraph bool update_auto_padding(const PartialShape& in_shape, Shape& new_pads_end, Shape& new_pads_begin) const; + bool evaluate_maxpool(const HostTensorVector& outputs, + const HostTensorVector& inputs) const; }; } // namespace v1 } // namespace op diff --git a/ngraph/core/include/ngraph/op/pad.hpp b/ngraph/core/include/ngraph/op/pad.hpp index f7236d79442df0..41901b96ff8c3f 100644 --- a/ngraph/core/include/ngraph/op/pad.hpp +++ b/ngraph/core/include/ngraph/op/pad.hpp @@ -89,6 +89,8 @@ namespace ngraph private: PadMode m_pad_mode; + bool evaluate_pad(const HostTensorVector& outputs, + const HostTensorVector& inputs) const; }; } } diff --git a/ngraph/core/include/ngraph/op/reshape.hpp b/ngraph/core/include/ngraph/op/reshape.hpp index b24a8713f80f62..ff92ec742d044d 100644 --- a/ngraph/core/include/ngraph/op/reshape.hpp +++ b/ngraph/core/include/ngraph/op/reshape.hpp @@ -71,6 +71,8 @@ namespace ngraph protected: bool m_special_zero; + bool evaluate_reshape(const HostTensorVector& outputs, + const HostTensorVector& inputs) const; }; } } diff --git a/ngraph/core/include/ngraph/op/reverse.hpp b/ngraph/core/include/ngraph/op/reverse.hpp index 7e9539e3738d38..2b0c9b6714e377 100644 --- a/ngraph/core/include/ngraph/op/reverse.hpp +++ b/ngraph/core/include/ngraph/op/reverse.hpp @@ -73,6 +73,10 @@ namespace ngraph /// Alternatively it can contain a boolean mask that indicates which axes should be /// reversed. Mode m_mode; + + private: + bool evaluate_reverse(const HostTensorVector& outputs, + const HostTensorVector& inputs) const; }; } } diff --git a/ngraph/core/include/ngraph/op/scatter_elements_update.hpp b/ngraph/core/include/ngraph/op/scatter_elements_update.hpp index f64bd38dd4fdbd..6e55ed87bc3228 100644 --- a/ngraph/core/include/ngraph/op/scatter_elements_update.hpp +++ b/ngraph/core/include/ngraph/op/scatter_elements_update.hpp @@ -52,6 +52,10 @@ namespace ngraph clone_with_new_inputs(const OutputVector& inputs) const override; bool evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const override; + + private: + bool evaluate_scatter_element_update(const HostTensorVector& outputs, + const HostTensorVector& inputs) const; }; } using v3::ScatterElementsUpdate; diff --git a/ngraph/core/include/ngraph/op/scatter_update.hpp b/ngraph/core/include/ngraph/op/scatter_update.hpp index 25a4b94719e611..b5461b0bed4c8f 100644 --- a/ngraph/core/include/ngraph/op/scatter_update.hpp +++ b/ngraph/core/include/ngraph/op/scatter_update.hpp @@ -53,6 +53,10 @@ namespace ngraph bool evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const override; + + private: + bool evaluate_scatter_update(const HostTensorVector& outputs, + const HostTensorVector& inputs) const; }; } } diff --git a/ngraph/core/include/ngraph/op/shuffle_channels.hpp b/ngraph/core/include/ngraph/op/shuffle_channels.hpp index dae47013a5e120..2413dd7bab6a37 100644 --- a/ngraph/core/include/ngraph/op/shuffle_channels.hpp +++ b/ngraph/core/include/ngraph/op/shuffle_channels.hpp @@ -69,6 +69,8 @@ namespace ngraph /// \param data_shape - Shape of the original input data tensor /// \return A 4D tensor to be used to reshape the input data before shuffling it Shape get_pre_shuffle_shape(const Shape& data_shape) const; + bool evaluate_shuffle_channels(const HostTensorVector& outputs, + const HostTensorVector& inputs) const; int64_t m_axis; int64_t m_group; diff --git a/ngraph/core/include/ngraph/op/space_to_batch.hpp b/ngraph/core/include/ngraph/op/space_to_batch.hpp index 483a1a709fbb9c..7f00995c0c4991 100644 --- a/ngraph/core/include/ngraph/op/space_to_batch.hpp +++ b/ngraph/core/include/ngraph/op/space_to_batch.hpp @@ -63,6 +63,10 @@ namespace ngraph bool evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const override; + + private: + bool evaluate_space_to_batch(const HostTensorVector& outputs, + const HostTensorVector& inputs) const; }; } using v1::SpaceToBatch; diff --git a/ngraph/core/include/ngraph/op/space_to_depth.hpp b/ngraph/core/include/ngraph/op/space_to_depth.hpp index 3af3fbbb50cf61..2975948a0fb31f 100644 --- a/ngraph/core/include/ngraph/op/space_to_depth.hpp +++ b/ngraph/core/include/ngraph/op/space_to_depth.hpp @@ -76,6 +76,10 @@ namespace ngraph protected: std::size_t m_blocksize; SpaceToDepthMode m_mode; + + private: + bool evaluate_space_to_depth(const HostTensorVector& outputs, + const HostTensorVector& inputs) const; }; } using v0::SpaceToDepth; diff --git a/ngraph/core/include/ngraph/op/tile.hpp b/ngraph/core/include/ngraph/op/tile.hpp index 8b78792c6eb218..37d6c82d8e7e8e 100644 --- a/ngraph/core/include/ngraph/op/tile.hpp +++ b/ngraph/core/include/ngraph/op/tile.hpp @@ -47,6 +47,10 @@ namespace ngraph bool evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const override; + + private: + bool evaluate_tile(const HostTensorVector& outputs, + const HostTensorVector& inputs) const; }; } } diff --git a/ngraph/core/include/ngraph/op/topk.hpp b/ngraph/core/include/ngraph/op/topk.hpp index 8a6b13da13de96..731cf1708fb2a2 100644 --- a/ngraph/core/include/ngraph/op/topk.hpp +++ b/ngraph/core/include/ngraph/op/topk.hpp @@ -115,6 +115,10 @@ namespace ngraph const PartialShape input_partial_shape, const int64_t k) const; void set_axis(const Rank input_rank, const int64_t axis); + + private: + bool evaluate_topk(const HostTensorVector& outputs, + const HostTensorVector& inputs) const; }; } // namespace v1 diff --git a/ngraph/core/include/ngraph/op/variadic_split.hpp b/ngraph/core/include/ngraph/op/variadic_split.hpp index 4bcca43914c0eb..3b28a5e234f360 100644 --- a/ngraph/core/include/ngraph/op/variadic_split.hpp +++ b/ngraph/core/include/ngraph/op/variadic_split.hpp @@ -56,6 +56,10 @@ namespace ngraph size_t get_default_output_index() const override { return no_default_index(); } bool evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const override; + + private: + bool evaluate_variadic_split(const HostTensorVector& outputs, + const HostTensorVector& inputs) const; }; } // namespace v1 diff --git a/ngraph/core/src/itt.hpp b/ngraph/core/src/itt.hpp index d15783865af502..5b09bf9048a08a 100644 --- a/ngraph/core/src/itt.hpp +++ b/ngraph/core/src/itt.hpp @@ -21,6 +21,8 @@ #pragma once +#include +#include #include namespace ngraph @@ -31,7 +33,33 @@ namespace ngraph { OV_ITT_DOMAIN(nGraph); OV_ITT_DOMAIN(nGraphPass_LT); - OV_ITT_DOMAIN(nGraphOp, "nGraph::Op"); + OV_ITT_DOMAIN(ngraph_op, "nGraph::Op"); } } + OV_CC_DOMAINS(ngraph_op); } + +#if defined(SELECTIVE_BUILD) || defined(SELECTIVE_BUILD_ANALYZER) +#define NGRAPH_OP_SCOPE(region, ...) OV_SCOPE(ngraph_op, region, __VA_ARGS__) +#else +#define NGRAPH_OP_SCOPE(region, ...) \ + OV_ITT_SCOPED_TASK(itt::domains::ngraph_op, #region); \ + __VA_ARGS__ +#endif + +#define NGRAPH_TYPE_CASE(region, a, ...) \ + case element::Type_t::a: \ + { \ + OV_SCOPE( \ + ngraph_op, OV_CC_CAT3(region, _, a), rc = evaluate(__VA_ARGS__)); \ + } \ + break; + +#define NGRAPH_COPY_TENSOR(region, a, ...) \ + case element::Type_t::a: \ + { \ + OV_SCOPE(ngraph_op, \ + OV_CC_CAT3(region, _, a), \ + rc = copy_tensor(__VA_ARGS__)); \ + } \ + break; diff --git a/ngraph/core/src/op/abs.cpp b/ngraph/core/src/op/abs.cpp index d22a372c425480..5118690ec822a4 100644 --- a/ngraph/core/src/op/abs.cpp +++ b/ngraph/core/src/op/abs.cpp @@ -57,22 +57,14 @@ namespace absop switch (arg0->get_element_type()) { - TYPE_CASE(boolean)(arg0, out, count); - break; - TYPE_CASE(i32)(arg0, out, count); - break; - TYPE_CASE(i64)(arg0, out, count); - break; - TYPE_CASE(u32)(arg0, out, count); - break; - TYPE_CASE(u64)(arg0, out, count); - break; - TYPE_CASE(f16)(arg0, out, count); - break; - TYPE_CASE(f32)(arg0, out, count); - break; - TYPE_CASE(bf16)(arg0, out, count); - break; + NGRAPH_TYPE_CASE(evaluate_abs, boolean, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_abs, i32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_abs, i64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_abs, u32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_abs, u64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_abs, f16, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_abs, f32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_abs, bf16, arg0, out, count); default: rc = false; break; } return rc; @@ -81,6 +73,9 @@ namespace absop bool op::Abs::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::Abs::evaluate"); - return absop::evaluate_abs(inputs[0], outputs[0], shape_size(get_output_shape(0))); + bool rc = false; + NGRAPH_OP_SCOPE( + v0_Abs_evaluate, + rc = absop::evaluate_abs(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + return rc; } diff --git a/ngraph/core/src/op/acos.cpp b/ngraph/core/src/op/acos.cpp index f307ac7486229d..9a727794a0445b 100644 --- a/ngraph/core/src/op/acos.cpp +++ b/ngraph/core/src/op/acos.cpp @@ -66,20 +66,13 @@ namespace acosop switch (arg0->get_element_type()) { - TYPE_CASE(boolean)(arg0, out, count); - break; - TYPE_CASE(i32)(arg0, out, count); - break; - TYPE_CASE(i64)(arg0, out, count); - break; - TYPE_CASE(u32)(arg0, out, count); - break; - TYPE_CASE(u64)(arg0, out, count); - break; - TYPE_CASE(f16)(arg0, out, count); - break; - TYPE_CASE(f32)(arg0, out, count); - break; + NGRAPH_TYPE_CASE(evaluate_acos, boolean, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_acos, i32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_acos, i64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_acos, u32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_acos, u64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_acos, f16, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_acos, f32, arg0, out, count); default: rc = false; break; } return rc; @@ -88,6 +81,9 @@ namespace acosop bool op::Acos::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::Acos::evaluate"); - return acosop::evaluate_acos(inputs[0], outputs[0], shape_size(get_output_shape(0))); + bool rc = false; + NGRAPH_OP_SCOPE( + v0_Acos_evaluate, + rc = acosop::evaluate_acos(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + return rc; } diff --git a/ngraph/core/src/op/acosh.cpp b/ngraph/core/src/op/acosh.cpp index c3d5aa249f6416..5e7e3c4bf66adf 100644 --- a/ngraph/core/src/op/acosh.cpp +++ b/ngraph/core/src/op/acosh.cpp @@ -56,18 +56,12 @@ namespace acoshop out->set_unary(arg0); switch (arg0->get_element_type()) { - TYPE_CASE(i32)(arg0, out); - break; - TYPE_CASE(i64)(arg0, out); - break; - TYPE_CASE(u32)(arg0, out); - break; - TYPE_CASE(u64)(arg0, out); - break; - TYPE_CASE(f16)(arg0, out); - break; - TYPE_CASE(f32)(arg0, out); - break; + NGRAPH_TYPE_CASE(evaluate_acosh, i32, arg0, out); + NGRAPH_TYPE_CASE(evaluate_acosh, i64, arg0, out); + NGRAPH_TYPE_CASE(evaluate_acosh, u32, arg0, out); + NGRAPH_TYPE_CASE(evaluate_acosh, u64, arg0, out); + NGRAPH_TYPE_CASE(evaluate_acosh, f16, arg0, out); + NGRAPH_TYPE_CASE(evaluate_acosh, f32, arg0, out); default: rc = false; break; } return rc; @@ -76,6 +70,7 @@ namespace acoshop bool op::v3::Acosh::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v3::Acosh::evaluate"); - return acoshop::evaluate_acosh(inputs[0], outputs[0]); + bool rc = false; + NGRAPH_OP_SCOPE(v3_Acosh_evaluate, rc = acoshop::evaluate_acosh(inputs[0], outputs[0])); + return rc; } diff --git a/ngraph/core/src/op/add.cpp b/ngraph/core/src/op/add.cpp index 132686defe0072..85226797196cf5 100644 --- a/ngraph/core/src/op/add.cpp +++ b/ngraph/core/src/op/add.cpp @@ -50,28 +50,17 @@ namespace add out->set_broadcast(broadcast_spec, arg0, arg1); switch (arg0->get_element_type()) { - TYPE_CASE(i8)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(i16)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(i32)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(i64)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(u8)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(u16)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(u32)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(u64)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(bf16)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(f16)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(f32)(arg0, arg1, out, broadcast_spec); - break; + NGRAPH_TYPE_CASE(evaluate_add, i8, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_add, i16, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_add, i32, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_add, i64, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_add, u8, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_add, u16, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_add, u32, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_add, u64, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_add, bf16, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_add, f16, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_add, f32, arg0, arg1, out, broadcast_spec); default: rc = false; break; } return rc; @@ -104,6 +93,8 @@ shared_ptr op::v1::Add::clone_with_new_inputs(const OutputVector& new_args bool op::v1::Add::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::Add::evaluate"); - return add::evaluate_add(inputs[0], inputs[1], outputs[0], get_autob()); -} \ No newline at end of file + bool rc = false; + NGRAPH_OP_SCOPE(v1_Add_evaluate, + rc = add::evaluate_add(inputs[0], inputs[1], outputs[0], get_autob())); + return rc; +} diff --git a/ngraph/core/src/op/and.cpp b/ngraph/core/src/op/and.cpp index 37df0da19b7644..2e3baabdcc179b 100644 --- a/ngraph/core/src/op/and.cpp +++ b/ngraph/core/src/op/and.cpp @@ -70,20 +70,13 @@ namespace logand out->set_broadcast(broadcast_spec, arg0, arg1); switch (arg0->get_element_type()) { - TYPE_CASE(boolean)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(i32)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(i64)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(u32)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(u64)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(f16)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(f32)(arg0, arg1, out, broadcast_spec); - break; + NGRAPH_TYPE_CASE(evaluate_logand, boolean, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_logand, i32, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_logand, i64, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_logand, u32, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_logand, u64, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_logand, f16, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_logand, f32, arg0, arg1, out, broadcast_spec); default: rc = false; break; } return rc; @@ -93,6 +86,8 @@ namespace logand bool op::v1::LogicalAnd::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::LogicalAnd::evaluate"); - return logand::evaluate_logand(inputs[0], inputs[1], outputs[0], get_autob()); + bool rc = false; + NGRAPH_OP_SCOPE(v1_LogicalAnd_evaluate, + rc = logand::evaluate_logand(inputs[0], inputs[1], outputs[0], get_autob())); + return rc; } diff --git a/ngraph/core/src/op/asin.cpp b/ngraph/core/src/op/asin.cpp index e567cb60269836..6020233bffcb41 100644 --- a/ngraph/core/src/op/asin.cpp +++ b/ngraph/core/src/op/asin.cpp @@ -67,20 +67,13 @@ namespace asinop switch (arg0->get_element_type()) { - TYPE_CASE(boolean)(arg0, out, count); - break; - TYPE_CASE(i32)(arg0, out, count); - break; - TYPE_CASE(i64)(arg0, out, count); - break; - TYPE_CASE(u32)(arg0, out, count); - break; - TYPE_CASE(u64)(arg0, out, count); - break; - TYPE_CASE(f16)(arg0, out, count); - break; - TYPE_CASE(f32)(arg0, out, count); - break; + NGRAPH_TYPE_CASE(evaluate_asin, boolean, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_asin, i32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_asin, i64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_asin, u32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_asin, u64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_asin, f16, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_asin, f32, arg0, out, count); default: rc = false; break; } return rc; @@ -89,6 +82,9 @@ namespace asinop bool op::Asin::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::Asin::evaluate"); - return asinop::evaluate_asin(inputs[0], outputs[0], shape_size(get_output_shape(0))); + bool rc = false; + NGRAPH_OP_SCOPE( + v0_Asin_evaluate, + rc = asinop::evaluate_asin(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + return rc; } diff --git a/ngraph/core/src/op/asinh.cpp b/ngraph/core/src/op/asinh.cpp index dd3458288180ca..5cdee483546158 100644 --- a/ngraph/core/src/op/asinh.cpp +++ b/ngraph/core/src/op/asinh.cpp @@ -56,18 +56,12 @@ namespace asinhop out->set_unary(arg0); switch (arg0->get_element_type()) { - TYPE_CASE(i32)(arg0, out); - break; - TYPE_CASE(i64)(arg0, out); - break; - TYPE_CASE(u32)(arg0, out); - break; - TYPE_CASE(u64)(arg0, out); - break; - TYPE_CASE(f16)(arg0, out); - break; - TYPE_CASE(f32)(arg0, out); - break; + NGRAPH_TYPE_CASE(evaluate_asinh, i32, arg0, out); + NGRAPH_TYPE_CASE(evaluate_asinh, i64, arg0, out); + NGRAPH_TYPE_CASE(evaluate_asinh, u32, arg0, out); + NGRAPH_TYPE_CASE(evaluate_asinh, u64, arg0, out); + NGRAPH_TYPE_CASE(evaluate_asinh, f16, arg0, out); + NGRAPH_TYPE_CASE(evaluate_asinh, f32, arg0, out); default: rc = false; break; } return rc; @@ -76,6 +70,7 @@ namespace asinhop bool op::v3::Asinh::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v3::Asinh::evaluate"); - return asinhop::evaluate_asinh(inputs[0], outputs[0]); + bool rc = false; + NGRAPH_OP_SCOPE(v3_Asinh_evaluate, rc = asinhop::evaluate_asinh(inputs[0], outputs[0])); + return rc; } diff --git a/ngraph/core/src/op/atan.cpp b/ngraph/core/src/op/atan.cpp index 65a8053aca6a30..6d29bfa911af90 100644 --- a/ngraph/core/src/op/atan.cpp +++ b/ngraph/core/src/op/atan.cpp @@ -66,20 +66,13 @@ namespace atanop switch (arg0->get_element_type()) { - TYPE_CASE(boolean)(arg0, out, count); - break; - TYPE_CASE(i32)(arg0, out, count); - break; - TYPE_CASE(i64)(arg0, out, count); - break; - TYPE_CASE(u32)(arg0, out, count); - break; - TYPE_CASE(u64)(arg0, out, count); - break; - TYPE_CASE(f16)(arg0, out, count); - break; - TYPE_CASE(f32)(arg0, out, count); - break; + NGRAPH_TYPE_CASE(evaluate_atan, boolean, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_atan, i32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_atan, i64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_atan, u32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_atan, u64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_atan, f16, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_atan, f32, arg0, out, count); default: rc = false; break; } return rc; @@ -88,6 +81,9 @@ namespace atanop bool op::Atan::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::Atan::evaluate"); - return atanop::evaluate_atan(inputs[0], outputs[0], shape_size(get_output_shape(0))); + bool rc = false; + NGRAPH_OP_SCOPE( + v0_Atan_evaluate, + rc = atanop::evaluate_atan(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + return rc; } diff --git a/ngraph/core/src/op/atanh.cpp b/ngraph/core/src/op/atanh.cpp index 8907748bbf018c..3fa52e9a3d5720 100644 --- a/ngraph/core/src/op/atanh.cpp +++ b/ngraph/core/src/op/atanh.cpp @@ -56,18 +56,12 @@ namespace atanhop out->set_unary(arg0); switch (arg0->get_element_type()) { - TYPE_CASE(i32)(arg0, out); - break; - TYPE_CASE(i64)(arg0, out); - break; - TYPE_CASE(u32)(arg0, out); - break; - TYPE_CASE(u64)(arg0, out); - break; - TYPE_CASE(f16)(arg0, out); - break; - TYPE_CASE(f32)(arg0, out); - break; + NGRAPH_TYPE_CASE(evaluate_atanh, i32, arg0, out); + NGRAPH_TYPE_CASE(evaluate_atanh, i64, arg0, out); + NGRAPH_TYPE_CASE(evaluate_atanh, u32, arg0, out); + NGRAPH_TYPE_CASE(evaluate_atanh, u64, arg0, out); + NGRAPH_TYPE_CASE(evaluate_atanh, f16, arg0, out); + NGRAPH_TYPE_CASE(evaluate_atanh, f32, arg0, out); default: rc = false; break; } return rc; @@ -76,6 +70,7 @@ namespace atanhop bool op::v3::Atanh::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v3::Atanh::evaluate"); - return atanhop::evaluate_atanh(inputs[0], outputs[0]); + bool rc = false; + NGRAPH_OP_SCOPE(v3_Atanh_evaluate, rc = atanhop::evaluate_atanh(inputs[0], outputs[0])); + return rc; } diff --git a/ngraph/core/src/op/batch_to_space.cpp b/ngraph/core/src/op/batch_to_space.cpp index 142ec4628af6ad..4cb2111001a18d 100644 --- a/ngraph/core/src/op/batch_to_space.cpp +++ b/ngraph/core/src/op/batch_to_space.cpp @@ -18,6 +18,7 @@ #include #include #include +#include "itt.hpp" #include "ngraph/builder/make_constant.hpp" #include "ngraph/node.hpp" @@ -141,114 +142,123 @@ bool ngraph::op::v1::BatchToSpace::visit_attributes(ngraph::AttributeVisitor& vi return true; } -bool ngraph::op::v1::BatchToSpace::evaluate(const HostTensorVector& outputs, - const HostTensorVector& inputs) const +namespace { - auto data = inputs[0]; - size_t elem_size = data->get_element_type().size(); - - if (data->get_partial_shape().is_dynamic()) + bool batch_to_space_evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) { - return false; - } - auto data_shape = data->get_shape(); + auto data = inputs[0]; + size_t elem_size = data->get_element_type().size(); - if (!(data->get_shape().size() == 4 || data->get_shape().size() == 5)) - { - return false; - } - size_t block_values_size = shape_size(inputs[1]->get_shape()); - const auto* block_values = inputs[1]->get_data_ptr(); - const auto* crops_begin_values = inputs[2]->get_data_ptr(); - const auto* crops_end_values = inputs[3]->get_data_ptr(); - - Shape dispersed_shape(1); - dispersed_shape.insert(dispersed_shape.end(), data_shape.begin(), data_shape.end()); - std::vector axes_order(block_values_size + 1); - std::vector plain_axes_order(block_values_size + 1); - std::iota(plain_axes_order.begin(), plain_axes_order.end(), 0); - Shape squeezed_shape(data_shape.begin(), data_shape.end()); - if (squeezed_shape.size() > block_values_size) - { - return false; - } + if (data->get_partial_shape().is_dynamic()) + { + return false; + } + auto data_shape = data->get_shape(); - auto* flat_data = data->get_data_ptr(); - std::vector dispersed_data(shape_size(data_shape) * elem_size); + if (!(data->get_shape().size() == 4 || data->get_shape().size() == 5)) + { + return false; + } + size_t block_values_size = shape_size(inputs[1]->get_shape()); + const auto* block_values = inputs[1]->get_data_ptr(); + const auto* crops_begin_values = inputs[2]->get_data_ptr(); + const auto* crops_end_values = inputs[3]->get_data_ptr(); + + Shape dispersed_shape(1); + dispersed_shape.insert(dispersed_shape.end(), data_shape.begin(), data_shape.end()); + std::vector axes_order(block_values_size + 1); + std::vector plain_axes_order(block_values_size + 1); + std::iota(plain_axes_order.begin(), plain_axes_order.end(), 0); + Shape squeezed_shape(data_shape.begin(), data_shape.end()); + if (squeezed_shape.size() > block_values_size) + { + return false; + } - Shape post_transpose_shape(axes_order.size()); - std::vector post_transpose_data(shape_size(data_shape) * elem_size); + auto* flat_data = data->get_data_ptr(); + std::vector dispersed_data(shape_size(data_shape) * elem_size); - for (size_t block_idx = 1; block_idx < block_values_size; ++block_idx) - { - dispersed_shape[0] = block_values[block_idx]; - dispersed_shape[1] /= block_values[block_idx]; - runtime::opt_kernel::reshape(flat_data, - dispersed_data.data(), - data_shape, - plain_axes_order, - dispersed_shape, - elem_size); - - size_t val = 1; - for (size_t axis_idx = 0; axis_idx <= block_values_size; ++axis_idx) + Shape post_transpose_shape(axes_order.size()); + std::vector post_transpose_data(shape_size(data_shape) * elem_size); + + for (size_t block_idx = 1; block_idx < block_values_size; ++block_idx) { - if ((block_idx + 1) == axis_idx) + dispersed_shape[0] = block_values[block_idx]; + dispersed_shape[1] /= block_values[block_idx]; + runtime::opt_kernel::reshape(flat_data, + dispersed_data.data(), + data_shape, + plain_axes_order, + dispersed_shape, + elem_size); + + size_t val = 1; + for (size_t axis_idx = 0; axis_idx <= block_values_size; ++axis_idx) { - axes_order[axis_idx] = 0; + if ((block_idx + 1) == axis_idx) + { + axes_order[axis_idx] = 0; + } + else + { + axes_order[axis_idx] = val; + val++; + } } - else + for (size_t axis_idx = 0; axis_idx < axes_order.size(); ++axis_idx) { - axes_order[axis_idx] = val; - val++; + post_transpose_shape[axis_idx] = dispersed_shape[axes_order[axis_idx]]; } + + runtime::opt_kernel::reshape(dispersed_data.data(), + post_transpose_data.data(), + dispersed_shape, + axes_order, + post_transpose_shape, + elem_size); + squeezed_shape[0] = dispersed_shape[1]; + squeezed_shape[block_idx] *= block_values[block_idx]; + dispersed_shape[block_idx + 1] = squeezed_shape[block_idx]; + runtime::opt_kernel::reshape(post_transpose_data.data(), + flat_data, + post_transpose_shape, + plain_axes_order, + squeezed_shape, + elem_size); + data_shape = squeezed_shape; } - for (size_t axis_idx = 0; axis_idx < axes_order.size(); ++axis_idx) + + std::vector upperbounds_values(data_shape.size()); + for (size_t i = 0; i < data_shape.size(); ++i) { - post_transpose_shape[axis_idx] = dispersed_shape[axes_order[axis_idx]]; + upperbounds_values[i] = data_shape[i] - crops_end_values[i]; } - runtime::opt_kernel::reshape(dispersed_data.data(), - post_transpose_data.data(), - dispersed_shape, - axes_order, - post_transpose_shape, - elem_size); - squeezed_shape[0] = dispersed_shape[1]; - squeezed_shape[block_idx] *= block_values[block_idx]; - dispersed_shape[block_idx + 1] = squeezed_shape[block_idx]; - runtime::opt_kernel::reshape(post_transpose_data.data(), - flat_data, - post_transpose_shape, - plain_axes_order, - squeezed_shape, - elem_size); - data_shape = squeezed_shape; - } - - std::vector upperbounds_values(data_shape.size()); - for (size_t i = 0; i < data_shape.size(); ++i) - { - upperbounds_values[i] = data_shape[i] - crops_end_values[i]; + std::vector begin_mask(data_shape.size(), 0); + std::vector end_mask(data_shape.size(), 0); + + std::vector begins(shape_size(inputs[2]->get_shape())); + begins.assign(crops_begin_values, crops_begin_values + shape_size(inputs[2]->get_shape())); + + std::vector default_strides(begins.size(), 1); + SlicePlan slice_plan = make_slice_plan(data_shape, + begins, + upperbounds_values, + default_strides, + begin_mask, + end_mask, + AxisSet(), + AxisSet(), + AxisSet()); + runtime::reference::strided_slice( + flat_data, outputs[0]->get_data_ptr(), data_shape, slice_plan, elem_size); + return true; } +} - std::vector begin_mask(data_shape.size(), 0); - std::vector end_mask(data_shape.size(), 0); - - std::vector begins(shape_size(inputs[2]->get_shape())); - begins.assign(crops_begin_values, crops_begin_values + shape_size(inputs[2]->get_shape())); - - std::vector default_strides(begins.size(), 1); - SlicePlan slice_plan = make_slice_plan(data_shape, - begins, - upperbounds_values, - default_strides, - begin_mask, - end_mask, - AxisSet(), - AxisSet(), - AxisSet()); - runtime::reference::strided_slice( - flat_data, outputs[0]->get_data_ptr(), data_shape, slice_plan, elem_size); - return true; -} \ No newline at end of file +bool ngraph::op::v1::BatchToSpace::evaluate(const HostTensorVector& outputs, + const HostTensorVector& inputs) const +{ + NGRAPH_OP_SCOPE(v1_BatchToSpace, return batch_to_space_evaluate(outputs, inputs)); + return false; +} diff --git a/ngraph/core/src/op/broadcast.cpp b/ngraph/core/src/op/broadcast.cpp index a006797a568181..72316f3f52c7ea 100644 --- a/ngraph/core/src/op/broadcast.cpp +++ b/ngraph/core/src/op/broadcast.cpp @@ -142,6 +142,23 @@ namespace } } +bool op::v3::Broadcast::broadcast_evaluate(const HostTensorVector& outputs, + const HostTensorVector& inputs) const +{ + if (get_broadcast_spec().m_type == op::BroadcastType::BIDIRECTIONAL) + { + auto arg_shape = inputs[0]->get_shape(); + Shape target_shape = op::util::BroadcastBase::get_target_shape(inputs[1]); + PartialShape result_shape = + get_result_shape_bidirectional(this, PartialShape{arg_shape}, target_shape); + auto pair_broadcast_axes = + get_broadcast_axes_bidirectional(arg_shape, result_shape.to_shape()); + return op::util::BroadcastBase::evaluate_broadcast( + inputs[0], outputs[0], pair_broadcast_axes, result_shape.to_shape()); + } + return op::util::BroadcastBase::evaluate(outputs, inputs); +} + void op::v3::Broadcast::validate_and_infer_types() { if (m_mode.m_type == BroadcastType::NONE) @@ -211,19 +228,8 @@ bool op::v3::Broadcast::visit_attributes(AttributeVisitor& visitor) bool op::v3::Broadcast::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v3::Broadcast::evaluate"); - if (get_broadcast_spec().m_type == op::BroadcastType::BIDIRECTIONAL) - { - auto arg_shape = inputs[0]->get_shape(); - Shape target_shape = op::util::BroadcastBase::get_target_shape(inputs[1]); - PartialShape result_shape = - get_result_shape_bidirectional(this, PartialShape{arg_shape}, target_shape); - auto pair_broadcast_axes = - get_broadcast_axes_bidirectional(arg_shape, result_shape.to_shape()); - return op::util::BroadcastBase::evaluate_broadcast( - inputs[0], outputs[0], pair_broadcast_axes, result_shape.to_shape()); - } - return op::util::BroadcastBase::evaluate(outputs, inputs); + NGRAPH_OP_SCOPE(v3_Broadcast_evaluate, return broadcast_evaluate(outputs, inputs)); + return false; } namespace @@ -312,6 +318,7 @@ bool op::v1::Broadcast::visit_attributes(AttributeVisitor& visitor) bool op::v1::Broadcast::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::Broadcast::evaluate"); - return op::util::BroadcastBase::evaluate(outputs, inputs); + NGRAPH_OP_SCOPE(v1_Broadcast_evaluate, + return op::util::BroadcastBase::evaluate(outputs, inputs)); + return false; } diff --git a/ngraph/core/src/op/ceiling.cpp b/ngraph/core/src/op/ceiling.cpp index 7ea7b522aa0574..f2c4660858745e 100644 --- a/ngraph/core/src/op/ceiling.cpp +++ b/ngraph/core/src/op/ceiling.cpp @@ -64,28 +64,17 @@ namespace ceiling switch (arg0->get_element_type()) { - COPY_TENSOR(boolean)(arg0, out, count); - break; - COPY_TENSOR(i8)(arg0, out, count); - break; - COPY_TENSOR(i16)(arg0, out, count); - break; - COPY_TENSOR(i32)(arg0, out, count); - break; - COPY_TENSOR(i64)(arg0, out, count); - break; - COPY_TENSOR(u8)(arg0, out, count); - break; - COPY_TENSOR(u16)(arg0, out, count); - break; - COPY_TENSOR(u32)(arg0, out, count); - break; - COPY_TENSOR(u64)(arg0, out, count); - break; - TYPE_CASE(f16)(arg0, out, count); - break; - TYPE_CASE(f32)(arg0, out, count); - break; + NGRAPH_COPY_TENSOR(evaluate_ceiling, boolean, arg0, out, count); + NGRAPH_COPY_TENSOR(evaluate_ceiling, i8, arg0, out, count); + NGRAPH_COPY_TENSOR(evaluate_ceiling, i16, arg0, out, count); + NGRAPH_COPY_TENSOR(evaluate_ceiling, i32, arg0, out, count); + NGRAPH_COPY_TENSOR(evaluate_ceiling, i64, arg0, out, count); + NGRAPH_COPY_TENSOR(evaluate_ceiling, u8, arg0, out, count); + NGRAPH_COPY_TENSOR(evaluate_ceiling, u16, arg0, out, count); + NGRAPH_COPY_TENSOR(evaluate_ceiling, u32, arg0, out, count); + NGRAPH_COPY_TENSOR(evaluate_ceiling, u64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_ceiling, f16, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_ceiling, f32, arg0, out, count); default: rc = false; break; } return rc; @@ -94,6 +83,8 @@ namespace ceiling bool op::Ceiling::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::Ceiling::evaluate"); - return ceiling::evaluate_ceiling(inputs[0], outputs[0], shape_size(get_output_shape(0))); + NGRAPH_OP_SCOPE( + v0_Ceiling_evaluate, + return ceiling::evaluate_ceiling(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + return false; } diff --git a/ngraph/core/src/op/clamp.cpp b/ngraph/core/src/op/clamp.cpp index 91d26b5edde6fe..af7229fe96cdd8 100644 --- a/ngraph/core/src/op/clamp.cpp +++ b/ngraph/core/src/op/clamp.cpp @@ -86,9 +86,11 @@ namespace clamp bool op::v0::Clamp::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v0::Clamp::evaluate"); - return clamp::evaluate_clamp( - inputs[0], outputs[0], get_min(), get_max(), shape_size(get_input_shape(0))); + NGRAPH_OP_SCOPE( + v0_Clamp_evaluate, + return clamp::evaluate_clamp( + inputs[0], outputs[0], get_min(), get_max(), shape_size(get_input_shape(0)))); + return false; } NGRAPH_RTTI_DEFINITION(op::v0::Clamp, "Clamp", 0); diff --git a/ngraph/core/src/op/concat.cpp b/ngraph/core/src/op/concat.cpp index aa993f2377bb6c..10ad3ea66919da 100644 --- a/ngraph/core/src/op/concat.cpp +++ b/ngraph/core/src/op/concat.cpp @@ -144,7 +144,9 @@ namespace bool op::Concat::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::Concat::evaluate"); - auto concat_axis = get_axis() < 0 ? get_axis() + inputs[0]->get_shape().size() : get_axis(); - return evaluate_concat(inputs, outputs[0], concat_axis); + NGRAPH_OP_SCOPE(v0_Concat_evaluate, + auto concat_axis = + get_axis() < 0 ? get_axis() + inputs[0]->get_shape().size() : get_axis(); + return evaluate_concat(inputs, outputs[0], concat_axis)); + return false; } diff --git a/ngraph/core/src/op/constant.cpp b/ngraph/core/src/op/constant.cpp index b3026a388e5268..d3caf113efde44 100644 --- a/ngraph/core/src/op/constant.cpp +++ b/ngraph/core/src/op/constant.cpp @@ -638,10 +638,10 @@ bool op::v0::Constant::visit_attributes(AttributeVisitor& visitor) bool op::v0::Constant::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v0::Constant::evaluate"); - auto output = outputs[0]; - output->write(get_data_ptr(), output->get_size_in_bytes()); - return true; + NGRAPH_OP_SCOPE(v0_Constant_evaluate, auto output = outputs[0]; + output->write(get_data_ptr(), output->get_size_in_bytes()); + return true); + return false; } // diff --git a/ngraph/core/src/op/convert.cpp b/ngraph/core/src/op/convert.cpp index 6992b1611f5dfe..a7a981b34cc543 100644 --- a/ngraph/core/src/op/convert.cpp +++ b/ngraph/core/src/op/convert.cpp @@ -63,8 +63,13 @@ namespace convert true); } -#define TYPE_OUT_CASE(a) \ - case element::Type_t::a: rc = evaluate +#define TYPE_OUT_CASE(a, ...) \ + case element::Type_t::a: \ + { \ + NGRAPH_OP_SCOPE(OV_CC_CAT3(evaluate_covert_out, _, a), \ + rc = evaluate(__VA_ARGS__)); \ + } \ + break template bool evaluate(const HostTensorPtr& arg, const HostTensorPtr& out) @@ -73,30 +78,18 @@ namespace convert switch (out->get_element_type()) { - TYPE_OUT_CASE(i8)(arg, out); - break; - TYPE_OUT_CASE(i16)(arg, out); - break; - TYPE_OUT_CASE(i32)(arg, out); - break; - TYPE_OUT_CASE(i64)(arg, out); - break; - TYPE_OUT_CASE(u8)(arg, out); - break; - TYPE_OUT_CASE(u16)(arg, out); - break; - TYPE_OUT_CASE(u32)(arg, out); - break; - TYPE_OUT_CASE(u64)(arg, out); - break; - TYPE_OUT_CASE(bf16)(arg, out); - break; - TYPE_OUT_CASE(f16)(arg, out); - break; - TYPE_OUT_CASE(f32)(arg, out); - break; - TYPE_OUT_CASE(f64)(arg, out); - break; + TYPE_OUT_CASE(i8, arg, out); + TYPE_OUT_CASE(i16, arg, out); + TYPE_OUT_CASE(i32, arg, out); + TYPE_OUT_CASE(i64, arg, out); + TYPE_OUT_CASE(u8, arg, out); + TYPE_OUT_CASE(u16, arg, out); + TYPE_OUT_CASE(u32, arg, out); + TYPE_OUT_CASE(u64, arg, out); + TYPE_OUT_CASE(bf16, arg, out); + TYPE_OUT_CASE(f16, arg, out); + TYPE_OUT_CASE(f32, arg, out); + TYPE_OUT_CASE(f64, arg, out); default: rc = false; break; } return rc; @@ -107,24 +100,15 @@ namespace convert bool rc = true; switch (arg->get_element_type()) { - TYPE_CASE(u8)(arg, out); - break; - TYPE_CASE(i8)(arg, out); - break; - TYPE_CASE(i32)(arg, out); - break; - TYPE_CASE(i16)(arg, out); - break; - TYPE_CASE(i64)(arg, out); - break; - TYPE_CASE(u32)(arg, out); - break; - TYPE_CASE(u64)(arg, out); - break; - TYPE_CASE(f16)(arg, out); - break; - TYPE_CASE(f32)(arg, out); - break; + NGRAPH_TYPE_CASE(evaluate_convert, u8, arg, out); + NGRAPH_TYPE_CASE(evaluate_convert, i8, arg, out); + NGRAPH_TYPE_CASE(evaluate_convert, i32, arg, out); + NGRAPH_TYPE_CASE(evaluate_convert, i16, arg, out); + NGRAPH_TYPE_CASE(evaluate_convert, i64, arg, out); + NGRAPH_TYPE_CASE(evaluate_convert, u32, arg, out); + NGRAPH_TYPE_CASE(evaluate_convert, u64, arg, out); + NGRAPH_TYPE_CASE(evaluate_convert, f16, arg, out); + NGRAPH_TYPE_CASE(evaluate_convert, f32, arg, out); default: rc = false; break; } return rc; @@ -133,6 +117,7 @@ namespace convert bool op::v0::Convert::evaluate(const HostTensorVector& output_values, const HostTensorVector& input_values) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v0::Convert::evaluate"); - return convert::evaluate_convert(input_values[0], output_values[0]); + NGRAPH_OP_SCOPE(v0_Convert_evaluate, + return convert::evaluate_convert(input_values[0], output_values[0])); + return false; } diff --git a/ngraph/core/src/op/cos.cpp b/ngraph/core/src/op/cos.cpp index 728d13da598b36..04ff1f34bbd03f 100644 --- a/ngraph/core/src/op/cos.cpp +++ b/ngraph/core/src/op/cos.cpp @@ -63,20 +63,13 @@ namespace cosop switch (arg0->get_element_type()) { - TYPE_CASE(boolean)(arg0, out, count); - break; - TYPE_CASE(i32)(arg0, out, count); - break; - TYPE_CASE(i64)(arg0, out, count); - break; - TYPE_CASE(u32)(arg0, out, count); - break; - TYPE_CASE(u64)(arg0, out, count); - break; - TYPE_CASE(f16)(arg0, out, count); - break; - TYPE_CASE(f32)(arg0, out, count); - break; + NGRAPH_TYPE_CASE(evaluate_cos, boolean, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_cos, i32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_cos, i64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_cos, u32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_cos, u64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_cos, f16, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_cos, f32, arg0, out, count); default: rc = false; break; } return rc; @@ -85,6 +78,8 @@ namespace cosop bool op::Cos::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::Cos::evaluate"); - return cosop::evaluate_cos(inputs[0], outputs[0], shape_size(get_output_shape(0))); + NGRAPH_OP_SCOPE( + v0_Cos_evaluate, + return cosop::evaluate_cos(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + return false; } diff --git a/ngraph/core/src/op/cosh.cpp b/ngraph/core/src/op/cosh.cpp index e0b53cd20d0a4b..3d32acd73bc193 100644 --- a/ngraph/core/src/op/cosh.cpp +++ b/ngraph/core/src/op/cosh.cpp @@ -62,20 +62,13 @@ namespace coshop switch (arg0->get_element_type()) { - TYPE_CASE(boolean)(arg0, out, count); - break; - TYPE_CASE(i32)(arg0, out, count); - break; - TYPE_CASE(i64)(arg0, out, count); - break; - TYPE_CASE(u32)(arg0, out, count); - break; - TYPE_CASE(u64)(arg0, out, count); - break; - TYPE_CASE(f16)(arg0, out, count); - break; - TYPE_CASE(f32)(arg0, out, count); - break; + NGRAPH_TYPE_CASE(evaluate_cosh, boolean, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_cosh, i32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_cosh, i64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_cosh, u32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_cosh, u64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_cosh, f16, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_cosh, f32, arg0, out, count); default: rc = false; break; } return rc; @@ -84,6 +77,8 @@ namespace coshop bool op::Cosh::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::Cosh::evaluate"); - return coshop::evaluate_cosh(inputs[0], outputs[0], shape_size(get_output_shape(0))); + NGRAPH_OP_SCOPE( + v0_Cosh_evaluate, + return coshop::evaluate_cosh(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + return false; } diff --git a/ngraph/core/src/op/depth_to_space.cpp b/ngraph/core/src/op/depth_to_space.cpp index 5e0b5424e5e019..b0f7cebe45cd1c 100644 --- a/ngraph/core/src/op/depth_to_space.cpp +++ b/ngraph/core/src/op/depth_to_space.cpp @@ -19,6 +19,7 @@ #include #include #include +#include "itt.hpp" #include "depth_to_space.hpp" #include "ngraph/builder/reshape.hpp" @@ -112,8 +113,8 @@ void op::DepthToSpace::validate_and_infer_types() } } -bool op::DepthToSpace::evaluate(const HostTensorVector& outputs, - const HostTensorVector& inputs) const +bool op::DepthToSpace::evaluate_depth_to_space(const HostTensorVector& outputs, + const HostTensorVector& inputs) const { const auto& data = inputs[0]; const auto& out = outputs[0]; @@ -158,10 +159,12 @@ bool op::DepthToSpace::evaluate(const HostTensorVector& outputs, vector axes_order{0}; switch (m_mode) { - // x' = reshape(data, [N, C / (block_size ^ K), block_size, block_size, ..., block_size, D1, D2, + // x' = reshape(data, [N, C / (block_size ^ K), block_size, block_size, ..., block_size, + // D1, D2, // ..., DK]) // x'' = transpose(x', [0, 1, K + 2, 2, K + 3, 3, K + 4, 4, ..., K + (K + 1), K + 1]) - // y = reshape(x'', [N, C / (block_size ^ K), D1 * block_size, D2 * block_size, D3 * block_size, + // y = reshape(x'', [N, C / (block_size ^ K), D1 * block_size, D2 * block_size, D3 * + // block_size, // ..., DK * block_size]) case DepthToSpaceMode::DEPTH_FIRST: { @@ -175,10 +178,12 @@ bool op::DepthToSpace::evaluate(const HostTensorVector& outputs, break; } - // x' = reshape(data, [N, block_size, block_size, ..., block_size, C / (block_size ^ K), D1, D2, + // x' = reshape(data, [N, block_size, block_size, ..., block_size, C / (block_size ^ K), + // D1, D2, // ..., DK]) // x'' = transpose(x', [0, K + 1, K + 2, 1, K + 3, 2, K + 4, 3, ..., K + (K + 1), K]) - // y = reshape(x'', [N, C / (block_size ^ K), D1 * block_size, D2 * block_size, D3 * block_size, + // y = reshape(x'', [N, C / (block_size ^ K), D1 * block_size, D2 * block_size, D3 * + // block_size, // ..., DK * block_size]) case DepthToSpaceMode::BLOCKS_FIRST: default: @@ -234,6 +239,13 @@ bool op::DepthToSpace::evaluate(const HostTensorVector& outputs, elem_size); return true; } + +bool op::DepthToSpace::evaluate(const HostTensorVector& outputs, + const HostTensorVector& inputs) const +{ + NGRAPH_OP_SCOPE(v0_DepthToSpace_evaluate, return evaluate_depth_to_space(outputs, inputs)); + return false; +} namespace ngraph { template <> diff --git a/ngraph/core/src/op/divide.cpp b/ngraph/core/src/op/divide.cpp index 688c32709202d1..27cd13fcbca41a 100644 --- a/ngraph/core/src/op/divide.cpp +++ b/ngraph/core/src/op/divide.cpp @@ -55,20 +55,13 @@ namespace divide out->set_broadcast(broadcast_spec, arg0, arg1); switch (arg0->get_element_type()) { - TYPE_CASE(i32)(arg0, arg1, out, broadcast_spec, pythondiv); - break; - TYPE_CASE(i64)(arg0, arg1, out, broadcast_spec, pythondiv); - break; - TYPE_CASE(u32)(arg0, arg1, out, broadcast_spec, pythondiv); - break; - TYPE_CASE(u64)(arg0, arg1, out, broadcast_spec, pythondiv); - break; - TYPE_CASE(f16)(arg0, arg1, out, broadcast_spec, pythondiv); - break; - TYPE_CASE(f32)(arg0, arg1, out, broadcast_spec, pythondiv); - break; - TYPE_CASE(bf16)(arg0, arg1, out, broadcast_spec, pythondiv); - break; + NGRAPH_TYPE_CASE(evaluate_divide, i32, arg0, arg1, out, broadcast_spec, pythondiv); + NGRAPH_TYPE_CASE(evaluate_divide, i64, arg0, arg1, out, broadcast_spec, pythondiv); + NGRAPH_TYPE_CASE(evaluate_divide, u32, arg0, arg1, out, broadcast_spec, pythondiv); + NGRAPH_TYPE_CASE(evaluate_divide, u64, arg0, arg1, out, broadcast_spec, pythondiv); + NGRAPH_TYPE_CASE(evaluate_divide, f16, arg0, arg1, out, broadcast_spec, pythondiv); + NGRAPH_TYPE_CASE(evaluate_divide, f32, arg0, arg1, out, broadcast_spec, pythondiv); + NGRAPH_TYPE_CASE(evaluate_divide, bf16, arg0, arg1, out, broadcast_spec, pythondiv); default: rc = false; break; } return rc; @@ -113,6 +106,8 @@ shared_ptr op::v1::Divide::clone_with_new_inputs(const OutputVector& new_a bool op::v1::Divide::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::Divide::evaluate"); - return divide::evaluate_divide(inputs[0], inputs[1], outputs[0], get_autob(), is_pythondiv()); + NGRAPH_OP_SCOPE(v1_Divide_evaluate, + return divide::evaluate_divide( + inputs[0], inputs[1], outputs[0], get_autob(), is_pythondiv())); + return false; } diff --git a/ngraph/core/src/op/equal.cpp b/ngraph/core/src/op/equal.cpp index 87b96820df2953..f6f378de847e22 100644 --- a/ngraph/core/src/op/equal.cpp +++ b/ngraph/core/src/op/equal.cpp @@ -50,20 +50,13 @@ namespace equal out->set_broadcast(broadcast_spec, arg0, arg1, element::boolean); switch (arg0->get_element_type()) { - TYPE_CASE(boolean)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(i32)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(i64)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(u32)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(u64)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(f16)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(f32)(arg0, arg1, out, broadcast_spec); - break; + NGRAPH_TYPE_CASE(evaluate_equal, boolean, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_equal, i32, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_equal, i64, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_equal, u32, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_equal, u64, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_equal, f16, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_equal, f32, arg0, arg1, out, broadcast_spec); default: rc = false; break; } return rc; @@ -90,6 +83,7 @@ shared_ptr op::v1::Equal::clone_with_new_inputs(const OutputVector& new_ar bool op::v1::Equal::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::Equal::evaluate"); - return equal::evaluate_equal(inputs[0], inputs[1], outputs[0], get_autob()); + NGRAPH_OP_SCOPE(v1_Equal_evaluate, + return equal::evaluate_equal(inputs[0], inputs[1], outputs[0], get_autob())); + return false; } diff --git a/ngraph/core/src/op/erf.cpp b/ngraph/core/src/op/erf.cpp index 0975fd2e7852e5..476de5c1dd4c99 100644 --- a/ngraph/core/src/op/erf.cpp +++ b/ngraph/core/src/op/erf.cpp @@ -61,20 +61,13 @@ namespace erfop switch (arg0->get_element_type()) { - TYPE_CASE(boolean)(arg0, out, count); - break; - TYPE_CASE(i32)(arg0, out, count); - break; - TYPE_CASE(i64)(arg0, out, count); - break; - TYPE_CASE(u32)(arg0, out, count); - break; - TYPE_CASE(u64)(arg0, out, count); - break; - TYPE_CASE(f16)(arg0, out, count); - break; - TYPE_CASE(f32)(arg0, out, count); - break; + NGRAPH_TYPE_CASE(evaluate_erf, boolean, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_erf, i32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_erf, i64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_erf, u32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_erf, u64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_erf, f16, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_erf, f32, arg0, out, count); default: rc = false; break; } return rc; @@ -83,6 +76,8 @@ namespace erfop bool op::Erf::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::Erf::evaluate"); - return erfop::evaluate_erf(inputs[0], outputs[0], shape_size(get_output_shape(0))); + NGRAPH_OP_SCOPE( + v0_Erf_evaluate, + return erfop::evaluate_erf(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + return false; } diff --git a/ngraph/core/src/op/exp.cpp b/ngraph/core/src/op/exp.cpp index 4089dc0c7f93e8..fe1ae0488ccd90 100644 --- a/ngraph/core/src/op/exp.cpp +++ b/ngraph/core/src/op/exp.cpp @@ -61,20 +61,13 @@ namespace expop switch (arg0->get_element_type()) { - TYPE_CASE(boolean)(arg0, out, count); - break; - TYPE_CASE(i32)(arg0, out, count); - break; - TYPE_CASE(i64)(arg0, out, count); - break; - TYPE_CASE(u32)(arg0, out, count); - break; - TYPE_CASE(u64)(arg0, out, count); - break; - TYPE_CASE(f16)(arg0, out, count); - break; - TYPE_CASE(f32)(arg0, out, count); - break; + NGRAPH_TYPE_CASE(evaluate_exp, boolean, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_exp, i32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_exp, i64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_exp, u32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_exp, u64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_exp, f16, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_exp, f32, arg0, out, count); default: rc = false; break; } return rc; @@ -83,6 +76,8 @@ namespace expop bool op::Exp::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::Exp::evaluate"); - return expop::evaluate_exp(inputs[0], outputs[0], shape_size(get_output_shape(0))); + NGRAPH_OP_SCOPE( + v0_Exp_evaluate, + return expop::evaluate_exp(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + return false; } diff --git a/ngraph/core/src/op/floor.cpp b/ngraph/core/src/op/floor.cpp index 9b02b3028730c2..eb89b9c715af45 100644 --- a/ngraph/core/src/op/floor.cpp +++ b/ngraph/core/src/op/floor.cpp @@ -69,28 +69,17 @@ namespace floorop switch (arg0->get_element_type()) { - COPY_TENSOR(boolean)(arg0, out, count); - break; - COPY_TENSOR(i8)(arg0, out, count); - break; - COPY_TENSOR(i16)(arg0, out, count); - break; - COPY_TENSOR(i32)(arg0, out, count); - break; - COPY_TENSOR(i64)(arg0, out, count); - break; - COPY_TENSOR(u8)(arg0, out, count); - break; - COPY_TENSOR(u16)(arg0, out, count); - break; - COPY_TENSOR(u32)(arg0, out, count); - break; - COPY_TENSOR(u64)(arg0, out, count); - break; - TYPE_CASE(f16)(arg0, out, count); - break; - TYPE_CASE(f32)(arg0, out, count); - break; + NGRAPH_COPY_TENSOR(evaluate_floor, boolean, arg0, out, count); + NGRAPH_COPY_TENSOR(evaluate_floor, i8, arg0, out, count); + NGRAPH_COPY_TENSOR(evaluate_floor, i16, arg0, out, count); + NGRAPH_COPY_TENSOR(evaluate_floor, i32, arg0, out, count); + NGRAPH_COPY_TENSOR(evaluate_floor, i64, arg0, out, count); + NGRAPH_COPY_TENSOR(evaluate_floor, u8, arg0, out, count); + NGRAPH_COPY_TENSOR(evaluate_floor, u16, arg0, out, count); + NGRAPH_COPY_TENSOR(evaluate_floor, u32, arg0, out, count); + NGRAPH_COPY_TENSOR(evaluate_floor, u64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_floor, f16, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_floor, f32, arg0, out, count); default: rc = false; break; } return rc; @@ -99,6 +88,8 @@ namespace floorop bool op::Floor::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::Floor::evaluate"); - return floorop::evaluate_floor(inputs[0], outputs[0], shape_size(get_output_shape(0))); + NGRAPH_OP_SCOPE( + v0_Floor_evaluate, + return floorop::evaluate_floor(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + return false; } diff --git a/ngraph/core/src/op/floor_mod.cpp b/ngraph/core/src/op/floor_mod.cpp index 450b880feeea29..69fd4c6a7abb94 100644 --- a/ngraph/core/src/op/floor_mod.cpp +++ b/ngraph/core/src/op/floor_mod.cpp @@ -64,24 +64,15 @@ namespace floor_mod out->set_broadcast(broadcast_spec, arg0, arg1); switch (arg0->get_element_type()) { - TYPE_CASE(i8)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(i32)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(i64)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(u8)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(u32)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(u64)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(bf16)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(f16)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(f32)(arg0, arg1, out, broadcast_spec); - break; + NGRAPH_TYPE_CASE(evaluate_floor_mod, i8, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_floor_mod, i32, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_floor_mod, i64, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_floor_mod, u8, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_floor_mod, u32, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_floor_mod, u64, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_floor_mod, bf16, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_floor_mod, f16, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_floor_mod, f32, arg0, arg1, out, broadcast_spec); default: rc = false; break; } return rc; @@ -91,8 +82,10 @@ namespace floor_mod bool op::v1::FloorMod::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::FloorMod::evaluate"); - return floor_mod::evaluate_floor_mod(inputs[0], inputs[1], outputs[0], get_autob()); + NGRAPH_OP_SCOPE( + v1_FloorMod_evaluate, + return floor_mod::evaluate_floor_mod(inputs[0], inputs[1], outputs[0], get_autob())); + return false; } bool op::v1::FloorMod::visit_attributes(AttributeVisitor& visitor) diff --git a/ngraph/core/src/op/gather.cpp b/ngraph/core/src/op/gather.cpp index 45c971797bfb0e..4cd8791d4e2aca 100644 --- a/ngraph/core/src/op/gather.cpp +++ b/ngraph/core/src/op/gather.cpp @@ -204,20 +204,13 @@ namespace gather switch (out->get_element_type()) { - TYPE_CASE(i32)(arg0, arg1, out, axis); - break; - TYPE_CASE(i64)(arg0, arg1, out, axis); - break; - TYPE_CASE(u32)(arg0, arg1, out, axis); - break; - TYPE_CASE(u64)(arg0, arg1, out, axis); - break; - TYPE_CASE(f16)(arg0, arg1, out, axis); - break; - TYPE_CASE(f32)(arg0, arg1, out, axis); - break; - TYPE_CASE(boolean)(arg0, arg1, out, axis); - break; + NGRAPH_TYPE_CASE(evaluate_gather, i32, arg0, arg1, out, axis); + NGRAPH_TYPE_CASE(evaluate_gather, i64, arg0, arg1, out, axis); + NGRAPH_TYPE_CASE(evaluate_gather, u32, arg0, arg1, out, axis); + NGRAPH_TYPE_CASE(evaluate_gather, u64, arg0, arg1, out, axis); + NGRAPH_TYPE_CASE(evaluate_gather, f16, arg0, arg1, out, axis); + NGRAPH_TYPE_CASE(evaluate_gather, f32, arg0, arg1, out, axis); + NGRAPH_TYPE_CASE(evaluate_gather, boolean, arg0, arg1, out, axis); default: rc = false; break; } return rc; @@ -290,9 +283,9 @@ namespace gather } } // namespace gather -bool op::v1::Gather::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const +bool op::v1::Gather::evaluate_gather(const HostTensorVector& outputs, + const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::Gather::evaluate"); int64_t axis = 0; switch (inputs[2]->get_element_type()) { @@ -318,6 +311,12 @@ bool op::v1::Gather::evaluate(const HostTensorVector& outputs, const HostTensorV return gather::evaluate_gather(inputs[0], inputs[1], outputs[0], axis); } +bool op::v1::Gather::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const +{ + NGRAPH_OP_SCOPE(v1_Gather_evaluate, return evaluate_gather(outputs, inputs)); + return false; +} + bool op::v1::Gather::constant_fold(OutputVector& output_values, const OutputVector& input_values) { // try the regular constant folding just for the Gather node diff --git a/ngraph/core/src/op/greater.cpp b/ngraph/core/src/op/greater.cpp index dfdb00a4154f4c..5a5cdd293d0bf6 100644 --- a/ngraph/core/src/op/greater.cpp +++ b/ngraph/core/src/op/greater.cpp @@ -50,20 +50,13 @@ namespace greaterop out->set_broadcast(broadcast_spec, arg0, arg1, element::boolean); switch (arg0->get_element_type()) { - TYPE_CASE(boolean)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(i32)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(i64)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(u32)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(u64)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(f16)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(f32)(arg0, arg1, out, broadcast_spec); - break; + NGRAPH_TYPE_CASE(evaluate_greater, boolean, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_greater, i32, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_greater, i64, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_greater, u32, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_greater, u64, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_greater, f16, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_greater, f32, arg0, arg1, out, broadcast_spec); default: rc = false; break; } return rc; @@ -91,6 +84,8 @@ shared_ptr op::v1::Greater::clone_with_new_inputs(const OutputVector& new_ bool op::v1::Greater::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::Greater::evaluate"); - return greaterop::evaluate_greater(inputs[0], inputs[1], outputs[0], get_autob()); + NGRAPH_OP_SCOPE( + v1_Greater_evaluate, + return greaterop::evaluate_greater(inputs[0], inputs[1], outputs[0], get_autob())); + return false; } diff --git a/ngraph/core/src/op/greater_eq.cpp b/ngraph/core/src/op/greater_eq.cpp index c3838fa16f7007..f5d99000df0a49 100644 --- a/ngraph/core/src/op/greater_eq.cpp +++ b/ngraph/core/src/op/greater_eq.cpp @@ -50,20 +50,13 @@ namespace greater_equalop out->set_broadcast(broadcast_spec, arg0, arg1, element::boolean); switch (arg0->get_element_type()) { - TYPE_CASE(boolean)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(i32)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(i64)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(u32)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(u64)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(f16)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(f32)(arg0, arg1, out, broadcast_spec); - break; + NGRAPH_TYPE_CASE(evaluate_greater_equal, boolean, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_greater_equal, i32, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_greater_equal, i64, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_greater_equal, u32, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_greater_equal, u64, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_greater_equal, f16, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_greater_equal, f32, arg0, arg1, out, broadcast_spec); default: rc = false; break; } return rc; @@ -91,6 +84,8 @@ shared_ptr op::v1::GreaterEqual::clone_with_new_inputs(const OutputVector& bool op::v1::GreaterEqual::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::GreaterEqual::evaluate"); - return greater_equalop::evaluate_greater_equal(inputs[0], inputs[1], outputs[0], get_autob()); + NGRAPH_OP_SCOPE(v1_GreaterEqual_evaluate, + return greater_equalop::evaluate_greater_equal( + inputs[0], inputs[1], outputs[0], get_autob())); + return false; } diff --git a/ngraph/core/src/op/hsigmoid.cpp b/ngraph/core/src/op/hsigmoid.cpp index 0854fe35fcb566..50715d62c836c2 100644 --- a/ngraph/core/src/op/hsigmoid.cpp +++ b/ngraph/core/src/op/hsigmoid.cpp @@ -15,6 +15,7 @@ //***************************************************************************** #include "ngraph/op/hsigmoid.hpp" +#include "itt.hpp" #include "ngraph/attribute_visitor.hpp" #include "ngraph/op/constant.hpp" @@ -60,12 +61,9 @@ namespace switch (arg->get_element_type()) { - TYPE_CASE(bf16)(arg, out, count); - break; - TYPE_CASE(f16)(arg, out, count); - break; - TYPE_CASE(f32)(arg, out, count); - break; + NGRAPH_TYPE_CASE(evaluate_hsigmoid, bf16, arg, out, count); + NGRAPH_TYPE_CASE(evaluate_hsigmoid, f16, arg, out, count); + NGRAPH_TYPE_CASE(evaluate_hsigmoid, f32, arg, out, count); default: rc = false; break; } return rc; @@ -75,5 +73,8 @@ namespace bool op::v5::HSigmoid::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - return evaluate_hsigmoid(inputs[0], outputs[0], shape_size(get_output_shape(0))); + NGRAPH_OP_SCOPE( + v5_HSigmoid_evaluate, + return evaluate_hsigmoid(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + return false; } diff --git a/ngraph/core/src/op/hswish.cpp b/ngraph/core/src/op/hswish.cpp index 1d6e0982025c29..118048aad7752a 100644 --- a/ngraph/core/src/op/hswish.cpp +++ b/ngraph/core/src/op/hswish.cpp @@ -15,6 +15,7 @@ //***************************************************************************** #include "ngraph/op/hswish.hpp" +#include "itt.hpp" #include "ngraph/attribute_visitor.hpp" #include "ngraph/op/constant.hpp" @@ -60,12 +61,9 @@ namespace hswish switch (arg->get_element_type()) { - TYPE_CASE(bf16)(arg, out, count); - break; - TYPE_CASE(f16)(arg, out, count); - break; - TYPE_CASE(f32)(arg, out, count); - break; + NGRAPH_TYPE_CASE(evaluate_hswish, bf16, arg, out, count); + NGRAPH_TYPE_CASE(evaluate_hswish, f16, arg, out, count); + NGRAPH_TYPE_CASE(evaluate_hswish, f32, arg, out, count); default: rc = false; break; } return rc; @@ -74,5 +72,8 @@ namespace hswish bool op::v4::HSwish::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - return hswish::evaluate_hswish(inputs[0], outputs[0], shape_size(get_output_shape(0))); + NGRAPH_OP_SCOPE( + v4_HSwish_evaluate, + return hswish::evaluate_hswish(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + return false; } diff --git a/ngraph/core/src/op/interpolate.cpp b/ngraph/core/src/op/interpolate.cpp index 785a7ab5b390d0..50190ecb448142 100644 --- a/ngraph/core/src/op/interpolate.cpp +++ b/ngraph/core/src/op/interpolate.cpp @@ -19,6 +19,7 @@ #include #include #include +#include "itt.hpp" #include "ngraph/op/constant.hpp" #include "ngraph/runtime/reference/interpolate.hpp" @@ -417,8 +418,8 @@ static void pad_input_data(const uint8_t* data_ptr, } } -bool op::v4::Interpolate::evaluate(const HostTensorVector& outputs, - const HostTensorVector& inputs) const +bool op::v4::Interpolate::evaluate_interpolate(const HostTensorVector& outputs, + const HostTensorVector& inputs) const { element::Type input_et = get_input_element_type(0); size_t type_size = input_et.size(); @@ -493,6 +494,13 @@ bool op::v4::Interpolate::evaluate(const HostTensorVector& outputs, return true; } +bool op::v4::Interpolate::evaluate(const HostTensorVector& outputs, + const HostTensorVector& inputs) const +{ + NGRAPH_OP_SCOPE(v4_Interpolate_evaluate, return evaluate_interpolate(outputs, inputs)); + return false; +} + namespace ngraph { template <> diff --git a/ngraph/core/src/op/less.cpp b/ngraph/core/src/op/less.cpp index 02e3b06c616252..06ea7922a9cfc4 100644 --- a/ngraph/core/src/op/less.cpp +++ b/ngraph/core/src/op/less.cpp @@ -50,20 +50,13 @@ namespace lessop out->set_broadcast(broadcast_spec, arg0, arg1, element::boolean); switch (arg0->get_element_type()) { - TYPE_CASE(boolean)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(i32)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(i64)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(u32)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(u64)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(f16)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(f32)(arg0, arg1, out, broadcast_spec); - break; + NGRAPH_TYPE_CASE(evaluate_less, boolean, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_less, i32, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_less, i64, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_less, u32, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_less, u64, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_less, f16, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_less, f32, arg0, arg1, out, broadcast_spec); default: rc = false; break; } return rc; @@ -90,6 +83,7 @@ shared_ptr op::v1::Less::clone_with_new_inputs(const OutputVector& new_arg bool op::v1::Less::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::Less::evaluate"); - return lessop::evaluate_less(inputs[0], inputs[1], outputs[0], get_autob()); + NGRAPH_OP_SCOPE(v1_Less_evaluate, + return lessop::evaluate_less(inputs[0], inputs[1], outputs[0], get_autob())); + return false; } diff --git a/ngraph/core/src/op/less_eq.cpp b/ngraph/core/src/op/less_eq.cpp index bc6a53079a2f89..58703b37a13f32 100644 --- a/ngraph/core/src/op/less_eq.cpp +++ b/ngraph/core/src/op/less_eq.cpp @@ -68,20 +68,13 @@ namespace less_equalop out->set_broadcast(broadcast_spec, arg0, arg1, element::boolean); switch (arg0->get_element_type()) { - TYPE_CASE(boolean)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(i32)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(i64)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(u32)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(u64)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(f16)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(f32)(arg0, arg1, out, broadcast_spec); - break; + NGRAPH_TYPE_CASE(evaluate_less_equal, boolean, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_less_equal, i32, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_less_equal, i64, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_less_equal, u32, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_less_equal, u64, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_less_equal, f16, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_less_equal, f32, arg0, arg1, out, broadcast_spec); default: rc = false; break; } return rc; @@ -91,6 +84,8 @@ namespace less_equalop bool op::v1::LessEqual::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::LessEqual::evaluate"); - return less_equalop::evaluate_less_equal(inputs[0], inputs[1], outputs[0], get_autob()); + NGRAPH_OP_SCOPE( + v1_LessEqual_evaluate, + return less_equalop::evaluate_less_equal(inputs[0], inputs[1], outputs[0], get_autob())); + return false; } diff --git a/ngraph/core/src/op/log.cpp b/ngraph/core/src/op/log.cpp index 2a68eb522a7e25..04e17227aa22b6 100644 --- a/ngraph/core/src/op/log.cpp +++ b/ngraph/core/src/op/log.cpp @@ -61,20 +61,13 @@ namespace logop switch (arg0->get_element_type()) { - TYPE_CASE(boolean)(arg0, out, count); - break; - TYPE_CASE(i32)(arg0, out, count); - break; - TYPE_CASE(i64)(arg0, out, count); - break; - TYPE_CASE(u32)(arg0, out, count); - break; - TYPE_CASE(u64)(arg0, out, count); - break; - TYPE_CASE(f16)(arg0, out, count); - break; - TYPE_CASE(f32)(arg0, out, count); - break; + NGRAPH_TYPE_CASE(evaluate_log, boolean, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_log, i32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_log, i64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_log, u32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_log, u64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_log, f16, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_log, f32, arg0, out, count); default: rc = false; break; } return rc; @@ -83,6 +76,8 @@ namespace logop bool op::Log::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::Log::evaluate"); - return logop::evaluate_log(inputs[0], outputs[0], shape_size(get_output_shape(0))); + NGRAPH_OP_SCOPE( + v0_Log_evaluate, + return logop::evaluate_log(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + return false; } diff --git a/ngraph/core/src/op/loop.cpp b/ngraph/core/src/op/loop.cpp index 65892380db821a..d57cccf87a1810 100644 --- a/ngraph/core/src/op/loop.cpp +++ b/ngraph/core/src/op/loop.cpp @@ -404,8 +404,13 @@ Output op::v5::Loop::get_concatenated_slices(const Output& value, bool op::v5::Loop::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v5::Loop::evaluate"); - runtime::reference::loop( - m_body, m_output_descriptions, m_input_descriptions, m_special_body_ports, outputs, inputs); - return true; -} \ No newline at end of file + NGRAPH_OP_SCOPE(v5_Loop_evaluate, + runtime::reference::loop(m_body, + m_output_descriptions, + m_input_descriptions, + m_special_body_ports, + outputs, + inputs); + return true); + return false; +} diff --git a/ngraph/core/src/op/matmul.cpp b/ngraph/core/src/op/matmul.cpp index eefda079e88ba6..7583e86b6928fb 100644 --- a/ngraph/core/src/op/matmul.cpp +++ b/ngraph/core/src/op/matmul.cpp @@ -245,18 +245,12 @@ namespace matmul switch (arg0->get_element_type()) { - TYPE_CASE(i32)(arg0, arg1, output, transpose_a, transpose_b); - break; - TYPE_CASE(i64)(arg0, arg1, output, transpose_a, transpose_b); - break; - TYPE_CASE(u32)(arg0, arg1, output, transpose_a, transpose_b); - break; - TYPE_CASE(u64)(arg0, arg1, output, transpose_a, transpose_b); - break; - TYPE_CASE(f16)(arg0, arg1, output, transpose_a, transpose_b); - break; - TYPE_CASE(f32)(arg0, arg1, output, transpose_a, transpose_b); - break; + NGRAPH_TYPE_CASE(evaluate_matmul, i32, arg0, arg1, output, transpose_a, transpose_b); + NGRAPH_TYPE_CASE(evaluate_matmul, i64, arg0, arg1, output, transpose_a, transpose_b); + NGRAPH_TYPE_CASE(evaluate_matmul, u32, arg0, arg1, output, transpose_a, transpose_b); + NGRAPH_TYPE_CASE(evaluate_matmul, u64, arg0, arg1, output, transpose_a, transpose_b); + NGRAPH_TYPE_CASE(evaluate_matmul, f16, arg0, arg1, output, transpose_a, transpose_b); + NGRAPH_TYPE_CASE(evaluate_matmul, f32, arg0, arg1, output, transpose_a, transpose_b); default: rc = false; break; } return rc; @@ -265,9 +259,10 @@ namespace matmul bool op::MatMul::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::MatMul::evaluate"); - return matmul::evaluate_matmul( - inputs[0], inputs[1], outputs[0], get_transpose_a(), get_transpose_b()); + NGRAPH_OP_SCOPE(v0_MatMul_evaluate, + return matmul::evaluate_matmul( + inputs[0], inputs[1], outputs[0], get_transpose_a(), get_transpose_b())); + return false; } void ngraph::op::v0::MatMul::validate_and_infer_types() diff --git a/ngraph/core/src/op/max.cpp b/ngraph/core/src/op/max.cpp index e7da24650ae668..9ce88c0d97da1c 100644 --- a/ngraph/core/src/op/max.cpp +++ b/ngraph/core/src/op/max.cpp @@ -46,18 +46,12 @@ namespace maxop bool rc = true; switch (arg->get_element_type()) { - TYPE_CASE(i32)(arg, out, axes, keep_dims); - break; - TYPE_CASE(i64)(arg, out, axes, keep_dims); - break; - TYPE_CASE(u32)(arg, out, axes, keep_dims); - break; - TYPE_CASE(u64)(arg, out, axes, keep_dims); - break; - TYPE_CASE(f16)(arg, out, axes, keep_dims); - break; - TYPE_CASE(f32)(arg, out, axes, keep_dims); - break; + NGRAPH_TYPE_CASE(evaluate_max, i32, arg, out, axes, keep_dims); + NGRAPH_TYPE_CASE(evaluate_max, i64, arg, out, axes, keep_dims); + NGRAPH_TYPE_CASE(evaluate_max, u32, arg, out, axes, keep_dims); + NGRAPH_TYPE_CASE(evaluate_max, u64, arg, out, axes, keep_dims); + NGRAPH_TYPE_CASE(evaluate_max, f16, arg, out, axes, keep_dims); + NGRAPH_TYPE_CASE(evaluate_max, f32, arg, out, axes, keep_dims); default: rc = false; break; } return rc; @@ -83,6 +77,8 @@ shared_ptr op::v1::ReduceMax::clone_with_new_inputs(const OutputVector& ne bool op::v1::ReduceMax::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::ReduceMax::evaluate"); - return maxop::evaluate_max(inputs[0], outputs[0], get_reduction_axes(), get_keep_dims()); + NGRAPH_OP_SCOPE( + v1_ReduceMax_evaluate, + return maxop::evaluate_max(inputs[0], outputs[0], get_reduction_axes(), get_keep_dims())); + return false; } diff --git a/ngraph/core/src/op/max_pool.cpp b/ngraph/core/src/op/max_pool.cpp index c1b34159f9c02a..4ba862d013fdeb 100644 --- a/ngraph/core/src/op/max_pool.cpp +++ b/ngraph/core/src/op/max_pool.cpp @@ -182,29 +182,27 @@ namespace maxpool switch (out->get_element_type()) { - TYPE_CASE(i32)(arg, out, out_shape, kernel, strides, pad_begin, pad_end); - break; - TYPE_CASE(i64)(arg, out, out_shape, kernel, strides, pad_begin, pad_end); - break; - TYPE_CASE(u32)(arg, out, out_shape, kernel, strides, pad_begin, pad_end); - break; - TYPE_CASE(u64)(arg, out, out_shape, kernel, strides, pad_begin, pad_end); - break; - TYPE_CASE(f16)(arg, out, out_shape, kernel, strides, pad_begin, pad_end); - break; - TYPE_CASE(f32)(arg, out, out_shape, kernel, strides, pad_begin, pad_end); - break; + NGRAPH_TYPE_CASE( + evaluate_maxpool, i32, arg, out, out_shape, kernel, strides, pad_begin, pad_end); + NGRAPH_TYPE_CASE( + evaluate_maxpool, i64, arg, out, out_shape, kernel, strides, pad_begin, pad_end); + NGRAPH_TYPE_CASE( + evaluate_maxpool, u32, arg, out, out_shape, kernel, strides, pad_begin, pad_end); + NGRAPH_TYPE_CASE( + evaluate_maxpool, u64, arg, out, out_shape, kernel, strides, pad_begin, pad_end); + NGRAPH_TYPE_CASE( + evaluate_maxpool, f16, arg, out, out_shape, kernel, strides, pad_begin, pad_end); + NGRAPH_TYPE_CASE( + evaluate_maxpool, f32, arg, out, out_shape, kernel, strides, pad_begin, pad_end); default: rc = false; break; } return rc; } } // namespace -bool op::v1::MaxPool::evaluate(const HostTensorVector& outputs, - const HostTensorVector& inputs) const +bool op::v1::MaxPool::evaluate_maxpool(const HostTensorVector& outputs, + const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::MaxPool::evaluate"); - auto arg_shape = inputs[0]->get_partial_shape(); auto pads_begin_s = get_pads_begin(); auto pads_end_s = get_pads_end(); @@ -228,3 +226,9 @@ bool op::v1::MaxPool::evaluate(const HostTensorVector& outputs, get_pads_begin(), get_pads_end()); } +bool op::v1::MaxPool::evaluate(const HostTensorVector& outputs, + const HostTensorVector& inputs) const +{ + NGRAPH_OP_SCOPE(v1_MaxPool_evaluate, return evaluate_maxpool(outputs, inputs)); + return false; +} diff --git a/ngraph/core/src/op/maximum.cpp b/ngraph/core/src/op/maximum.cpp index 604d527807ee50..8ccc7a24d185d0 100644 --- a/ngraph/core/src/op/maximum.cpp +++ b/ngraph/core/src/op/maximum.cpp @@ -58,18 +58,12 @@ namespace maximumop out->set_broadcast(broadcast_spec, arg0, arg1); switch (arg0->get_element_type()) { - TYPE_CASE(i32)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(i64)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(u32)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(u64)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(f16)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(f32)(arg0, arg1, out, broadcast_spec); - break; + NGRAPH_TYPE_CASE(evaluate_maximum, i32, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_maximum, i64, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_maximum, u32, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_maximum, u64, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_maximum, f16, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_maximum, f32, arg0, arg1, out, broadcast_spec); default: rc = false; break; } return rc; @@ -97,6 +91,8 @@ shared_ptr op::v1::Maximum::clone_with_new_inputs(const OutputVector& new_ bool op::v1::Maximum::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::Maximum::evaluate"); - return maximumop::evaluate_maximum(inputs[0], inputs[1], outputs[0], get_autob()); + NGRAPH_OP_SCOPE( + v1_Maximum_evaluate, + return maximumop::evaluate_maximum(inputs[0], inputs[1], outputs[0], get_autob())); + return false; } diff --git a/ngraph/core/src/op/min.cpp b/ngraph/core/src/op/min.cpp index 1c12d491e23206..ae62558c07bd61 100644 --- a/ngraph/core/src/op/min.cpp +++ b/ngraph/core/src/op/min.cpp @@ -48,18 +48,12 @@ namespace minop bool rc = true; switch (arg->get_element_type()) { - TYPE_CASE(i32)(arg, out, axes, keep_dims); - break; - TYPE_CASE(i64)(arg, out, axes, keep_dims); - break; - TYPE_CASE(u32)(arg, out, axes, keep_dims); - break; - TYPE_CASE(u64)(arg, out, axes, keep_dims); - break; - TYPE_CASE(f16)(arg, out, axes, keep_dims); - break; - TYPE_CASE(f32)(arg, out, axes, keep_dims); - break; + NGRAPH_TYPE_CASE(evaluate_min, i32, arg, out, axes, keep_dims); + NGRAPH_TYPE_CASE(evaluate_min, i64, arg, out, axes, keep_dims); + NGRAPH_TYPE_CASE(evaluate_min, u32, arg, out, axes, keep_dims); + NGRAPH_TYPE_CASE(evaluate_min, u64, arg, out, axes, keep_dims); + NGRAPH_TYPE_CASE(evaluate_min, f16, arg, out, axes, keep_dims); + NGRAPH_TYPE_CASE(evaluate_min, f32, arg, out, axes, keep_dims); default: rc = false; break; } return rc; @@ -85,6 +79,8 @@ shared_ptr op::v1::ReduceMin::clone_with_new_inputs(const OutputVector& ne bool op::v1::ReduceMin::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::ReduceMin::evaluate"); - return minop::evaluate_min(inputs[0], outputs[0], get_reduction_axes(), get_keep_dims()); + NGRAPH_OP_SCOPE( + v1_ReduceMin_evaluate, + return minop::evaluate_min(inputs[0], outputs[0], get_reduction_axes(), get_keep_dims())); + return false; } diff --git a/ngraph/core/src/op/minimum.cpp b/ngraph/core/src/op/minimum.cpp index 8e3a89919633ad..e71be9dd454925 100644 --- a/ngraph/core/src/op/minimum.cpp +++ b/ngraph/core/src/op/minimum.cpp @@ -56,18 +56,12 @@ namespace minimumop out->set_broadcast(broadcast_spec, arg0, arg1); switch (arg0->get_element_type()) { - TYPE_CASE(i32)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(i64)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(u32)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(u64)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(f16)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(f32)(arg0, arg1, out, broadcast_spec); - break; + NGRAPH_TYPE_CASE(evaluate_minimum, i32, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_minimum, i64, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_minimum, u32, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_minimum, u64, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_minimum, f16, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_minimum, f32, arg0, arg1, out, broadcast_spec); default: rc = false; break; } return rc; @@ -95,6 +89,8 @@ shared_ptr op::v1::Minimum::clone_with_new_inputs(const OutputVector& new_ bool op::v1::Minimum::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::Minimum::evaluate"); - return minimumop::evaluate_minimum(inputs[0], inputs[1], outputs[0], get_autob()); + NGRAPH_OP_SCOPE( + v1_Minimum_evaluate, + return minimumop::evaluate_minimum(inputs[0], inputs[1], outputs[0], get_autob())); + return false; } diff --git a/ngraph/core/src/op/mish.cpp b/ngraph/core/src/op/mish.cpp index ed278b30a7c408..53864e9e1a1811 100644 --- a/ngraph/core/src/op/mish.cpp +++ b/ngraph/core/src/op/mish.cpp @@ -67,10 +67,8 @@ namespace mish switch (arg0->get_element_type()) { - TYPE_CASE(f16)(arg0, out, count); - break; - TYPE_CASE(f32)(arg0, out, count); - break; + NGRAPH_TYPE_CASE(evaluate_mish, f16, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_mish, f32, arg0, out, count); default: rc = false; break; } return rc; @@ -79,6 +77,8 @@ namespace mish bool op::v4::Mish::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v4::Mish::evaluate"); - return mish::evaluate_mish(inputs[0], outputs[0], shape_size(get_output_shape(0))); + NGRAPH_OP_SCOPE( + v4_Mish_evaluate, + return mish::evaluate_mish(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + return false; } diff --git a/ngraph/core/src/op/multiply.cpp b/ngraph/core/src/op/multiply.cpp index ea2edf4c69e238..00c967a5affe05 100644 --- a/ngraph/core/src/op/multiply.cpp +++ b/ngraph/core/src/op/multiply.cpp @@ -50,20 +50,13 @@ namespace multiplyop out->set_broadcast(broadcast_spec, arg0, arg1); switch (arg0->get_element_type()) { - TYPE_CASE(i32)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(i64)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(u32)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(u64)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(f16)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(f32)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(bf16)(arg0, arg1, out, broadcast_spec); - break; + NGRAPH_TYPE_CASE(evaluate_multiply, i32, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_multiply, i64, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_multiply, u32, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_multiply, u64, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_multiply, f16, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_multiply, f32, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_multiply, bf16, arg0, arg1, out, broadcast_spec); default: rc = false; break; } return rc; @@ -91,8 +84,10 @@ shared_ptr op::v0::Multiply::clone_with_new_inputs(const OutputVector& new bool op::v0::Multiply::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v0::Multiply::evaluate"); - return multiplyop::evaluate_multiply(inputs[0], inputs[1], outputs[0], get_autob()); + NGRAPH_OP_SCOPE( + v0_Multiply_evaluate, + return multiplyop::evaluate_multiply(inputs[0], inputs[1], outputs[0], get_autob())); + return false; } // ------------------------------------ v1 ------------------------------------- @@ -116,6 +111,8 @@ shared_ptr op::v1::Multiply::clone_with_new_inputs(const OutputVector& new bool op::v1::Multiply::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::Multiply::evaluate"); - return multiplyop::evaluate_multiply(inputs[0], inputs[1], outputs[0], get_autob()); + NGRAPH_OP_SCOPE( + v1_Multiply_evaluate, + return multiplyop::evaluate_multiply(inputs[0], inputs[1], outputs[0], get_autob())); + return false; } diff --git a/ngraph/core/src/op/negative.cpp b/ngraph/core/src/op/negative.cpp index bd25a90ad68aeb..7c6159d84427b7 100644 --- a/ngraph/core/src/op/negative.cpp +++ b/ngraph/core/src/op/negative.cpp @@ -58,20 +58,13 @@ namespace negativeop switch (arg0->get_element_type()) { - TYPE_CASE(boolean)(arg0, out, count); - break; - TYPE_CASE(i32)(arg0, out, count); - break; - TYPE_CASE(i64)(arg0, out, count); - break; - TYPE_CASE(u32)(arg0, out, count); - break; - TYPE_CASE(u64)(arg0, out, count); - break; - TYPE_CASE(f16)(arg0, out, count); - break; - TYPE_CASE(f32)(arg0, out, count); - break; + NGRAPH_TYPE_CASE(evaluate_negative, boolean, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_negative, i32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_negative, i64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_negative, u32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_negative, u64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_negative, f16, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_negative, f32, arg0, out, count); default: rc = false; break; } return rc; @@ -80,8 +73,10 @@ namespace negativeop bool op::Negative::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::Negative::evaluate"); - return negativeop::evaluate_negative(inputs[0], outputs[0], shape_size(get_output_shape(0))); + NGRAPH_OP_SCOPE(v0_Negative_evaluate, + return negativeop::evaluate_negative( + inputs[0], outputs[0], shape_size(get_output_shape(0)))); + return false; } shared_ptr ngraph::operator-(const Output& arg0) diff --git a/ngraph/core/src/op/non_zero.cpp b/ngraph/core/src/op/non_zero.cpp index 9e544abc0136ba..dd8ef9bc3bf4d1 100644 --- a/ngraph/core/src/op/non_zero.cpp +++ b/ngraph/core/src/op/non_zero.cpp @@ -115,18 +115,21 @@ namespace nonzero return true; } +#define TYPE_OUT_CASE(a, ...) \ + case element::Type_t::a: \ + { \ + NGRAPH_OP_SCOPE(OV_CC_CAT3(evaluate_nonzero_out, _, a), \ + rc = evaluate_nonzero_execute(__VA_ARGS__)); \ + } \ + break; template bool evaluate(const HostTensorPtr& input, const HostTensorPtr& output) { bool rc = true; switch (output->get_element_type()) { - case element::Type_t::i64: - rc = evaluate_nonzero_execute(input, output); - break; - case element::Type_t::i32: - rc = evaluate_nonzero_execute(input, output); - break; + TYPE_OUT_CASE(i64, input, output); + TYPE_OUT_CASE(i32, input, output); default: rc = false; break; } @@ -139,20 +142,13 @@ namespace nonzero switch (input->get_element_type()) { - TYPE_CASE(i32)(input, output); - break; - TYPE_CASE(i64)(input, output); - break; - TYPE_CASE(u8)(input, output); - break; - TYPE_CASE(u32)(input, output); - break; - TYPE_CASE(u64)(input, output); - break; - TYPE_CASE(f16)(input, output); - break; - TYPE_CASE(f32)(input, output); - break; + NGRAPH_TYPE_CASE(evaluate_nonzero, i32, input, output); + NGRAPH_TYPE_CASE(evaluate_nonzero, i64, input, output); + NGRAPH_TYPE_CASE(evaluate_nonzero, u8, input, output); + NGRAPH_TYPE_CASE(evaluate_nonzero, u32, input, output); + NGRAPH_TYPE_CASE(evaluate_nonzero, u64, input, output); + NGRAPH_TYPE_CASE(evaluate_nonzero, f16, input, output); + NGRAPH_TYPE_CASE(evaluate_nonzero, f32, input, output); default: rc = false; break; } return rc; @@ -162,6 +158,6 @@ namespace nonzero bool op::v3::NonZero::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v3::NonZero::evaluate"); - return nonzero::evaluate_nonzero(inputs[0], outputs[0]); + NGRAPH_OP_SCOPE(v3_NonZero_evaluate, return nonzero::evaluate_nonzero(inputs[0], outputs[0])); + return false; } diff --git a/ngraph/core/src/op/not.cpp b/ngraph/core/src/op/not.cpp index 5deb3dbeb1a2a9..6b2fa28c14e52c 100644 --- a/ngraph/core/src/op/not.cpp +++ b/ngraph/core/src/op/not.cpp @@ -75,20 +75,13 @@ namespace notop switch (arg0->get_element_type()) { - TYPE_CASE(boolean)(arg0, out, count); - break; - TYPE_CASE(i32)(arg0, out, count); - break; - TYPE_CASE(i64)(arg0, out, count); - break; - TYPE_CASE(u32)(arg0, out, count); - break; - TYPE_CASE(u64)(arg0, out, count); - break; - TYPE_CASE(f16)(arg0, out, count); - break; - TYPE_CASE(f32)(arg0, out, count); - break; + NGRAPH_TYPE_CASE(evaluate_not, boolean, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_not, i32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_not, i64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_not, u32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_not, u64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_not, f16, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_not, f32, arg0, out, count); default: rc = false; break; } return rc; @@ -98,6 +91,8 @@ namespace notop bool op::v1::LogicalNot::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::LogicalNot::evaluate"); - return notop::evaluate_not(inputs[0], outputs[0], shape_size(get_output_shape(0))); + NGRAPH_OP_SCOPE( + v1_LogicalNot_evaluate, + return notop::evaluate_not(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + return false; } diff --git a/ngraph/core/src/op/not_equal.cpp b/ngraph/core/src/op/not_equal.cpp index 6dd5d2dcb09916..4958a45491287d 100644 --- a/ngraph/core/src/op/not_equal.cpp +++ b/ngraph/core/src/op/not_equal.cpp @@ -50,20 +50,13 @@ namespace not_equalop out->set_broadcast(broadcast_spec, arg0, arg1, element::boolean); switch (arg0->get_element_type()) { - TYPE_CASE(boolean)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(i32)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(i64)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(u32)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(u64)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(f16)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(f32)(arg0, arg1, out, broadcast_spec); - break; + NGRAPH_TYPE_CASE(evaluate_not_equal, boolean, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_not_equal, i32, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_not_equal, i64, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_not_equal, u32, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_not_equal, u64, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_not_equal, f16, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_not_equal, f32, arg0, arg1, out, broadcast_spec); default: rc = false; break; } return rc; @@ -91,8 +84,10 @@ shared_ptr op::v1::NotEqual::clone_with_new_inputs(const OutputVector& new bool op::v1::NotEqual::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::NotEqual::evaluate"); - return not_equalop::evaluate_not_equal(inputs[0], inputs[1], outputs[0], get_autob()); + NGRAPH_OP_SCOPE( + v1_NotEqual_evaluate, + return not_equalop::evaluate_not_equal(inputs[0], inputs[1], outputs[0], get_autob())); + return false; } bool op::v1::NotEqual::visit_attributes(AttributeVisitor& visitor) diff --git a/ngraph/core/src/op/one_hot.cpp b/ngraph/core/src/op/one_hot.cpp index 66ede2116a3e31..e92f6bc5c3aa1a 100644 --- a/ngraph/core/src/op/one_hot.cpp +++ b/ngraph/core/src/op/one_hot.cpp @@ -15,6 +15,7 @@ //***************************************************************************** #include "ngraph/op/one_hot.hpp" +#include "itt.hpp" #include "ngraph/attribute_visitor.hpp" #include "ngraph/op/util/op_types.hpp" #include "ngraph/runtime/reference/one_hot.hpp" @@ -134,7 +135,7 @@ shared_ptr op::v1::OneHot::clone_with_new_inputs(const OutputVector& new_a namespace detail { template - void evaluate(const HostTensorVector& output_values, + bool evaluate(const HostTensorVector& output_values, const HostTensorVector& input_values, const int64_t axis) { @@ -152,27 +153,35 @@ namespace detail axis, on_value->get_data_ptr()[0], off_value->get_data_ptr()[0]); + return true; } - template - bool dispatch_by_output_type(const HostTensorVector& output_values, - const HostTensorVector& input_values, - const int64_t axis) +#define TYPE_OUT_CASE(a, ...) \ + case element::Type_t::a: \ + { \ + NGRAPH_OP_SCOPE(OV_CC_CAT3(evaluate_one_hot_out, _, a), \ + using IT = typename element_type_traits::value_type; \ + using OT = typename element_type_traits::value_type; \ + rc = evaluate(__VA_ARGS__)); \ + } \ + break; + + template + bool evaluate(const HostTensorVector& output_values, + const HostTensorVector& input_values, + const int64_t axis) { const auto& indices = input_values[0]; + bool rc = true; switch (indices->get_element_type()) { - case element::Type_t::i32: - evaluate(output_values, input_values, axis); - break; - case element::Type_t::i64: - evaluate(output_values, input_values, axis); - break; - default: return false; break; + TYPE_OUT_CASE(i32, output_values, input_values, axis); + TYPE_OUT_CASE(i64, output_values, input_values, axis); + default: rc = false; break; } - return true; + return rc; } bool evaluate_onehot(const HostTensorVector& output_values, @@ -181,27 +190,23 @@ namespace detail { const auto& on_value = input_values[2]; + bool rc = false; switch (on_value->get_element_type()) { - case element::Type_t::boolean: - return dispatch_by_output_type(output_values, input_values, axis); - break; - case element::Type_t::f32: - return dispatch_by_output_type(output_values, input_values, axis); - break; - case element::Type_t::i32: - return dispatch_by_output_type(output_values, input_values, axis); - break; - case element::Type_t::i64: - return dispatch_by_output_type(output_values, input_values, axis); - break; - default: return false; + NGRAPH_TYPE_CASE(evaluate_onehot, boolean, output_values, input_values, axis); + NGRAPH_TYPE_CASE(evaluate_onehot, f32, output_values, input_values, axis); + NGRAPH_TYPE_CASE(evaluate_onehot, i32, output_values, input_values, axis); + NGRAPH_TYPE_CASE(evaluate_onehot, i64, output_values, input_values, axis); + default: rc = false; } + return rc; } } // namespace detail bool op::v1::OneHot::evaluate(const HostTensorVector& output_values, const HostTensorVector& input_values) const { - return detail::evaluate_onehot(output_values, input_values, get_axis()); + NGRAPH_OP_SCOPE(v1_OneHot_evaluate, + return detail::evaluate_onehot(output_values, input_values, get_axis());); + return false; } diff --git a/ngraph/core/src/op/or.cpp b/ngraph/core/src/op/or.cpp index 2bac5e7a46d785..6a97427951f084 100644 --- a/ngraph/core/src/op/or.cpp +++ b/ngraph/core/src/op/or.cpp @@ -66,20 +66,13 @@ namespace logor out->set_broadcast(broadcast_spec, arg0, arg1); switch (arg0->get_element_type()) { - TYPE_CASE(boolean)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(i32)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(i64)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(u32)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(u64)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(f16)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(f32)(arg0, arg1, out, broadcast_spec); - break; + NGRAPH_TYPE_CASE(evaluate_logor, boolean, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_logor, i32, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_logor, i64, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_logor, u32, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_logor, u64, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_logor, f16, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_logor, f32, arg0, arg1, out, broadcast_spec); default: rc = false; break; } return rc; @@ -89,6 +82,7 @@ namespace logor bool op::v1::LogicalOr::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::LogicalOr::evaluate"); - return logor::evaluate_logor(inputs[0], inputs[1], outputs[0], get_autob()); + NGRAPH_OP_SCOPE(v1_LogicalOr_evaluate, + return logor::evaluate_logor(inputs[0], inputs[1], outputs[0], get_autob())); + return false; } diff --git a/ngraph/core/src/op/pad.cpp b/ngraph/core/src/op/pad.cpp index bb248d2598d4ff..8b8a93e491bcab 100644 --- a/ngraph/core/src/op/pad.cpp +++ b/ngraph/core/src/op/pad.cpp @@ -15,6 +15,7 @@ //***************************************************************************** #include "ngraph/op/pad.hpp" +#include "itt.hpp" #include "ngraph/attribute_visitor.hpp" #include "ngraph/except.hpp" #include "ngraph/op/broadcast.hpp" @@ -209,7 +210,8 @@ shared_ptr op::v1::Pad::clone_with_new_inputs(const OutputVector& new_args } } -bool op::v1::Pad::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const +bool op::v1::Pad::evaluate_pad(const HostTensorVector& outputs, + const HostTensorVector& inputs) const { const auto& data = inputs[0]; const auto elem_size = data->get_element_type().size(); @@ -238,3 +240,9 @@ bool op::v1::Pad::evaluate(const HostTensorVector& outputs, const HostTensorVect return true; } + +bool op::v1::Pad::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const +{ + NGRAPH_OP_SCOPE(v1_Pad_evaluate, return evaluate_pad(outputs, inputs)); + return false; +} diff --git a/ngraph/core/src/op/power.cpp b/ngraph/core/src/op/power.cpp index ff1cb9dd91b276..573b31c80aa69e 100644 --- a/ngraph/core/src/op/power.cpp +++ b/ngraph/core/src/op/power.cpp @@ -53,20 +53,13 @@ namespace power out->set_broadcast(broadcast_spec, arg0, arg1); switch (arg0->get_element_type()) { - TYPE_CASE(i32)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(i64)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(u32)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(u64)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(f16)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(f32)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(bf16)(arg0, arg1, out, broadcast_spec); - break; + NGRAPH_TYPE_CASE(evaluate_power, i32, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_power, i64, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_power, u32, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_power, u64, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_power, f16, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_power, f32, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_power, bf16, arg0, arg1, out, broadcast_spec); default: rc = false; break; } return rc; @@ -93,6 +86,7 @@ shared_ptr op::v1::Power::clone_with_new_inputs(const OutputVector& new_ar bool op::v1::Power::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::Power::evaluate"); - return power::evaluate_power(inputs[0], inputs[1], outputs[0], get_autob()); + NGRAPH_OP_SCOPE(v1_Power_evaluate, + return power::evaluate_power(inputs[0], inputs[1], outputs[0], get_autob())); + return false; } diff --git a/ngraph/core/src/op/prelu.cpp b/ngraph/core/src/op/prelu.cpp index 2b29c67dae4f23..83e9accb118c3a 100644 --- a/ngraph/core/src/op/prelu.cpp +++ b/ngraph/core/src/op/prelu.cpp @@ -115,14 +115,10 @@ namespace prelu bool rc = true; switch (arg->get_element_type()) { - TYPE_CASE(i8)(arg, slope, out); - break; - TYPE_CASE(bf16)(arg, slope, out); - break; - TYPE_CASE(f16)(arg, slope, out); - break; - TYPE_CASE(f32)(arg, slope, out); - break; + NGRAPH_TYPE_CASE(evaluate_prelu, i8, arg, slope, out); + NGRAPH_TYPE_CASE(evaluate_prelu, bf16, arg, slope, out); + NGRAPH_TYPE_CASE(evaluate_prelu, f16, arg, slope, out); + NGRAPH_TYPE_CASE(evaluate_prelu, f32, arg, slope, out); default: rc = false; break; } return rc; @@ -131,6 +127,7 @@ namespace prelu bool op::PRelu::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::PRelu::evaluate"); - return prelu::evaluate_prelu(inputs[0], inputs[1], outputs[0]); + NGRAPH_OP_SCOPE(v0_PRelu_evaluate, + return prelu::evaluate_prelu(inputs[0], inputs[1], outputs[0]);); + return false; } diff --git a/ngraph/core/src/op/prior_box.cpp b/ngraph/core/src/op/prior_box.cpp index 437678880c9d33..66ef769d3c8244 100644 --- a/ngraph/core/src/op/prior_box.cpp +++ b/ngraph/core/src/op/prior_box.cpp @@ -175,22 +175,14 @@ namespace prior_box bool rc = true; switch (arg0->get_element_type()) { - TYPE_CASE(i8)(arg0, arg1, out, attrs); - break; - TYPE_CASE(i16)(arg0, arg1, out, attrs); - break; - TYPE_CASE(i32)(arg0, arg1, out, attrs); - break; - TYPE_CASE(i64)(arg0, arg1, out, attrs); - break; - TYPE_CASE(u8)(arg0, arg1, out, attrs); - break; - TYPE_CASE(u16)(arg0, arg1, out, attrs); - break; - TYPE_CASE(u32)(arg0, arg1, out, attrs); - break; - TYPE_CASE(u64)(arg0, arg1, out, attrs); - break; + NGRAPH_TYPE_CASE(evaluate_prior_box, i8, arg0, arg1, out, attrs); + NGRAPH_TYPE_CASE(evaluate_prior_box, i16, arg0, arg1, out, attrs); + NGRAPH_TYPE_CASE(evaluate_prior_box, i32, arg0, arg1, out, attrs); + NGRAPH_TYPE_CASE(evaluate_prior_box, i64, arg0, arg1, out, attrs); + NGRAPH_TYPE_CASE(evaluate_prior_box, u8, arg0, arg1, out, attrs); + NGRAPH_TYPE_CASE(evaluate_prior_box, u16, arg0, arg1, out, attrs); + NGRAPH_TYPE_CASE(evaluate_prior_box, u32, arg0, arg1, out, attrs); + NGRAPH_TYPE_CASE(evaluate_prior_box, u64, arg0, arg1, out, attrs); default: rc = false; break; } return rc; @@ -200,9 +192,11 @@ namespace prior_box bool op::v0::PriorBox::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v0::PriorBox::evaluate"); + NGRAPH_OP_SCOPE(v0_PriorBox_evaluate, + // Todo (itikhono): enable the use of the reference implementation after + // supporting constants as + // outputs in plugins + // return evaluate_prior_box(inputs[0], inputs[1], outputs[0], get_attrs()); + return false); return false; - // Todo (itikhono): enable the use of the reference implementation after supporting constants as - // outputs in plugins - // return evaluate_prior_box(inputs[0], inputs[1], outputs[0], get_attrs()); } diff --git a/ngraph/core/src/op/prior_box_clustered.cpp b/ngraph/core/src/op/prior_box_clustered.cpp index d0ad2773c436c7..3919a833dccf4d 100644 --- a/ngraph/core/src/op/prior_box_clustered.cpp +++ b/ngraph/core/src/op/prior_box_clustered.cpp @@ -148,22 +148,14 @@ namespace prior_box_clustered bool rc = true; switch (arg0->get_element_type()) { - TYPE_CASE(i8)(arg0, arg1, out, attrs); - break; - TYPE_CASE(i16)(arg0, arg1, out, attrs); - break; - TYPE_CASE(i32)(arg0, arg1, out, attrs); - break; - TYPE_CASE(i64)(arg0, arg1, out, attrs); - break; - TYPE_CASE(u8)(arg0, arg1, out, attrs); - break; - TYPE_CASE(u16)(arg0, arg1, out, attrs); - break; - TYPE_CASE(u32)(arg0, arg1, out, attrs); - break; - TYPE_CASE(u64)(arg0, arg1, out, attrs); - break; + NGRAPH_TYPE_CASE(evaluate_prior_box, i8, arg0, arg1, out, attrs); + NGRAPH_TYPE_CASE(evaluate_prior_box, i16, arg0, arg1, out, attrs); + NGRAPH_TYPE_CASE(evaluate_prior_box, i32, arg0, arg1, out, attrs); + NGRAPH_TYPE_CASE(evaluate_prior_box, i64, arg0, arg1, out, attrs); + NGRAPH_TYPE_CASE(evaluate_prior_box, u8, arg0, arg1, out, attrs); + NGRAPH_TYPE_CASE(evaluate_prior_box, u16, arg0, arg1, out, attrs); + NGRAPH_TYPE_CASE(evaluate_prior_box, u32, arg0, arg1, out, attrs); + NGRAPH_TYPE_CASE(evaluate_prior_box, u64, arg0, arg1, out, attrs); default: rc = false; break; } return rc; @@ -173,9 +165,11 @@ namespace prior_box_clustered bool op::v0::PriorBoxClustered::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v0::PriorBoxClustered::evaluate"); + NGRAPH_OP_SCOPE(v0_PriorBoxClustered_evaluate, + // Todo (itikhono): enable the use of the reference implementation after + // supporting constants as + // outputs in plugins + // return evaluate_prior_box(inputs[0], inputs[1], outputs[0], get_attrs()); + return false); return false; - // Todo (itikhono): enable the use of the reference implementation after supporting constants as - // outputs in plugins - // return evaluate_prior_box(inputs[0], inputs[1], outputs[0], get_attrs()); } diff --git a/ngraph/core/src/op/range.cpp b/ngraph/core/src/op/range.cpp index c214410925da44..a8bf316b84a276 100644 --- a/ngraph/core/src/op/range.cpp +++ b/ngraph/core/src/op/range.cpp @@ -26,6 +26,36 @@ using namespace std; using namespace ngraph; +// +// The code in the following three functions is a bit awkward, to work around some compiler +// warnings and the need to support our custom float16/bfloat16 type: +// +// (1) We can't use STL things like isnan, because our custom float16/bfloat16 types don't always +// support them. +// (2) We check whether (x - x) == (x - x) to check for "is_finite". +// (3) We have to break (x - x) out into a temporary because otherwise the compiler throws a +// warning about == on floats. +// (4) We check <0 || >0 to check for != 0, because otherwise the compiler throws a warning about +// == on floats. +// +template +static typename std::enable_if::value, bool>::type check_value(T value) +{ + // Nothing to check for integral types. + return true; +} + +template +static + typename std::enable_if::value || std::is_same::value || + std::is_same::value, + bool>::type + check_value(T value) +{ + T value_minus_value = value - value; + return value == value && value_minus_value == value_minus_value; +} + NGRAPH_RTTI_DEFINITION(op::v4::Range, "Range", 4); op::v4::Range::Range(const Output& start, @@ -193,62 +223,89 @@ bool get_casted_value(const HostTensorPtr& tensor, T* val) return true; } -template -bool evaluate_v4_range(const HostTensorPtr& out, - const HostTensorPtr& start, - const HostTensorPtr& stop, - const HostTensorPtr& step) +namespace rangeop { - using T = typename element_type_traits::value_type; - T start_val; - T stop_val; - T step_val; - if (!(get_casted_value(start, &start_val) && get_casted_value(stop, &stop_val) && - get_casted_value(step, &step_val))) + template + bool evaluate(const HostTensorPtr& out, + const HostTensorPtr& start, + const HostTensorPtr& stop, + const HostTensorPtr& step, + int version) { - return false; - } + using T = typename element_type_traits::value_type; + T start_val; + T stop_val; + T step_val; + if (version < 4) + { + start_val = *start->get_data_ptr(); + stop_val = *stop->get_data_ptr(); + step_val = *step->get_data_ptr(); + if (!(check_value(start_val) && check_value(stop_val) && check_value(step_val) && + (step_val != static_cast(0)))) + { + return false; + } + } + else + { + if (!(get_casted_value(start, &start_val) && get_casted_value(stop, &stop_val) && + get_casted_value(step, &step_val))) + { + return false; + } + } - int64_t out_size = 0; + int64_t out_size = 0; - int64_t steps = static_cast(std::ceil(double(stop_val - start_val) / step_val)); - if (steps > 0) + int64_t steps = static_cast(std::ceil(double(stop_val - start_val) / step_val)); + if (steps > 0) + { + out_size = steps; + } + Shape out_shape = Shape({static_cast(out_size)}); + out->set_shape(out_shape); + runtime::reference::range( + &start_val, &step_val, shape_size(out_shape), out->get_data_ptr()); + return true; + } + + bool evaluate_power(const HostTensorPtr& out, + const HostTensorPtr& start, + const HostTensorPtr& stop, + const HostTensorPtr& step, + const element::Type& output_type, + int version) { - out_size = steps; + bool rc = true; + switch (output_type) + { + NGRAPH_TYPE_CASE(evaluate_range, bf16, out, start, stop, step, version); + NGRAPH_TYPE_CASE(evaluate_range, f16, out, start, stop, step, version); + NGRAPH_TYPE_CASE(evaluate_range, f32, out, start, stop, step, version); + NGRAPH_TYPE_CASE(evaluate_range, f64, out, start, stop, step, version); + NGRAPH_TYPE_CASE(evaluate_range, i8, out, start, stop, step, version); + NGRAPH_TYPE_CASE(evaluate_range, i16, out, start, stop, step, version); + NGRAPH_TYPE_CASE(evaluate_range, i32, out, start, stop, step, version); + NGRAPH_TYPE_CASE(evaluate_range, i64, out, start, stop, step, version); + NGRAPH_TYPE_CASE(evaluate_range, u8, out, start, stop, step, version); + NGRAPH_TYPE_CASE(evaluate_range, u16, out, start, stop, step, version); + NGRAPH_TYPE_CASE(evaluate_range, u32, out, start, stop, step, version); + NGRAPH_TYPE_CASE(evaluate_range, u64, out, start, stop, step, version); + default: rc = false; break; + } + return rc; } - Shape out_shape = Shape({static_cast(out_size)}); - out->set_shape(out_shape); - runtime::reference::range( - &start_val, &step_val, shape_size(out_shape), out->get_data_ptr()); - return true; } bool op::v4::Range::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - HostTensorPtr out = outputs[0]; - HostTensorPtr start = inputs[0]; - HostTensorPtr stop = inputs[1]; - HostTensorPtr step = inputs[2]; - switch (m_output_type) - { - case element::Type_t::bf16: - return evaluate_v4_range(out, start, stop, step); - case element::Type_t::f16: - return evaluate_v4_range(out, start, stop, step); - case element::Type_t::f32: - return evaluate_v4_range(out, start, stop, step); - case element::Type_t::i8: return evaluate_v4_range(out, start, stop, step); - case element::Type_t::i32: - return evaluate_v4_range(out, start, stop, step); - case element::Type_t::i64: - return evaluate_v4_range(out, start, stop, step); - case element::Type_t::u8: return evaluate_v4_range(out, start, stop, step); - case element::Type_t::u32: - return evaluate_v4_range(out, start, stop, step); - case element::Type_t::u64: - return evaluate_v4_range(out, start, stop, step); - default: return false; - } + NGRAPH_OP_SCOPE(v4_Range_evaluate, HostTensorPtr out = outputs[0]; + HostTensorPtr start = inputs[0]; + HostTensorPtr stop = inputs[1]; + HostTensorPtr step = inputs[2]; + return rangeop::evaluate_power(out, start, stop, step, m_output_type, 4)); + return false; } constexpr NodeTypeInfo op::v0::Range::type_info; @@ -259,36 +316,6 @@ op::v0::Range::Range(const Output& start, const Output& stop, const constructor_validate_and_infer_types(); } -// -// The code in the following three functions is a bit awkward, to work around some compiler -// warnings and the need to support our custom float16/bfloat16 type: -// -// (1) We can't use STL things like isnan, because our custom float16/bfloat16 types don't always -// support them. -// (2) We check whether (x - x) == (x - x) to check for "is_finite". -// (3) We have to break (x - x) out into a temporary because otherwise the compiler throws a -// warning about == on floats. -// (4) We check <0 || >0 to check for != 0, because otherwise the compiler throws a warning about -// == on floats. -// -template -static typename std::enable_if::value, bool>::type check_value(T value) -{ - // Nothing to check for integral types. - return true; -} - -template -static - typename std::enable_if::value || std::is_same::value || - std::is_same::value, - bool>::type - check_value(T value) -{ - T value_minus_value = value - value; - return value == value && value_minus_value == value_minus_value; -} - template static void check_start(const op::v0::Range* node, T start) { @@ -467,61 +494,12 @@ void positive_range(T start_val, T stop_val, T step_val) { } -template -bool try_evaluate_range(const HostTensorPtr& out, - const HostTensorPtr& start, - const HostTensorPtr& stop, - const HostTensorPtr& step) -{ - using T = typename element_type_traits::value_type; - if (ET == start->get_element_type()) - { - T start_val = *start->get_data_ptr(); - T stop_val = *stop->get_data_ptr(); - T step_val = *step->get_data_ptr(); - if (!(check_value(start_val) && check_value(stop_val) && check_value(step_val) && - (step_val != static_cast(0)))) - { - return false; - } - - int64_t out_size = 0; - - int64_t steps = static_cast(std::ceil(double(stop_val - start_val) / step_val)); - if (steps > 0) - { - out_size = steps; - } - Shape out_shape = Shape({static_cast(out_size)}); - out->set_shape(out_shape); - runtime::reference::range( - &start_val, &step_val, shape_size(out_shape), out->get_data_ptr()); - return true; - } - else - { - return false; - } -} - bool op::v0::Range::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v0::Range::evaluate"); - - HostTensorPtr out = outputs[0]; - HostTensorPtr start = inputs[0]; - HostTensorPtr stop = inputs[1]; - HostTensorPtr step = inputs[2]; - return try_evaluate_range(out, start, stop, step) || - try_evaluate_range(out, start, stop, step) || - try_evaluate_range(out, start, stop, step) || - try_evaluate_range(out, start, stop, step) || - try_evaluate_range(out, start, stop, step) || - try_evaluate_range(out, start, stop, step) || - try_evaluate_range(out, start, stop, step) || - try_evaluate_range(out, start, stop, step) || - try_evaluate_range(out, start, stop, step) || - try_evaluate_range(out, start, stop, step) || - try_evaluate_range(out, start, stop, step) || - try_evaluate_range(out, start, stop, step); + NGRAPH_OP_SCOPE( + op_v0_Range_evaluate, HostTensorPtr out = outputs[0]; HostTensorPtr start = inputs[0]; + HostTensorPtr stop = inputs[1]; + HostTensorPtr step = inputs[2]; + return rangeop::evaluate_power(out, start, stop, step, start->get_element_type(), 0)); + return false; } diff --git a/ngraph/core/src/op/reduce_l1.cpp b/ngraph/core/src/op/reduce_l1.cpp index b0a1b0f3f59d8d..acc381f4690ff2 100644 --- a/ngraph/core/src/op/reduce_l1.cpp +++ b/ngraph/core/src/op/reduce_l1.cpp @@ -67,16 +67,11 @@ namespace reduce_l1 bool rc = true; switch (arg->get_element_type()) { - TYPE_CASE(i32)(arg, out, axes, keep_dims); - break; - TYPE_CASE(i64)(arg, out, axes, keep_dims); - break; - TYPE_CASE(bf16)(arg, out, axes, keep_dims); - break; - TYPE_CASE(f16)(arg, out, axes, keep_dims); - break; - TYPE_CASE(f32)(arg, out, axes, keep_dims); - break; + NGRAPH_TYPE_CASE(evaluate_reducel1_sum, i32, arg, out, axes, keep_dims); + NGRAPH_TYPE_CASE(evaluate_reducel1_sum, i64, arg, out, axes, keep_dims); + NGRAPH_TYPE_CASE(evaluate_reducel1_sum, bf16, arg, out, axes, keep_dims); + NGRAPH_TYPE_CASE(evaluate_reducel1_sum, f16, arg, out, axes, keep_dims); + NGRAPH_TYPE_CASE(evaluate_reducel1_sum, f32, arg, out, axes, keep_dims); default: rc = false; break; } return rc; @@ -86,6 +81,8 @@ namespace reduce_l1 bool op::v4::ReduceL1::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v4::ReduceL1::evaluate"); - return reduce_l1::evaluate_sum(inputs[0], outputs[0], get_reduction_axes(), get_keep_dims()); + NGRAPH_OP_SCOPE(v4_ReduceL1_evaluate, + return reduce_l1::evaluate_sum( + inputs[0], outputs[0], get_reduction_axes(), get_keep_dims())); + return false; } diff --git a/ngraph/core/src/op/reduce_l2.cpp b/ngraph/core/src/op/reduce_l2.cpp index 066f72e90d1e3e..ff7971fa9ad110 100644 --- a/ngraph/core/src/op/reduce_l2.cpp +++ b/ngraph/core/src/op/reduce_l2.cpp @@ -67,12 +67,9 @@ namespace reduce_l2 bool rc = true; switch (arg->get_element_type()) { - TYPE_CASE(bf16)(arg, out, axes, keep_dims); - break; - TYPE_CASE(f16)(arg, out, axes, keep_dims); - break; - TYPE_CASE(f32)(arg, out, axes, keep_dims); - break; + NGRAPH_TYPE_CASE(evaluate_reduce_l2, bf16, arg, out, axes, keep_dims); + NGRAPH_TYPE_CASE(evaluate_reduce_l2, f16, arg, out, axes, keep_dims); + NGRAPH_TYPE_CASE(evaluate_reduce_l2, f32, arg, out, axes, keep_dims); default: rc = false; break; } return rc; @@ -82,7 +79,8 @@ namespace reduce_l2 bool op::v4::ReduceL2::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v4::ReduceL2::evaluate"); - return reduce_l2::evaluate_reduce_l2( - inputs[0], outputs[0], get_reduction_axes(), get_keep_dims()); + NGRAPH_OP_SCOPE(v4_ReduceL2_evaluate, + return reduce_l2::evaluate_reduce_l2( + inputs[0], outputs[0], get_reduction_axes(), get_keep_dims())); + return false; } diff --git a/ngraph/core/src/op/reduce_logical_and.cpp b/ngraph/core/src/op/reduce_logical_and.cpp index a83d94200bb3b1..68d1089b26c65d 100644 --- a/ngraph/core/src/op/reduce_logical_and.cpp +++ b/ngraph/core/src/op/reduce_logical_and.cpp @@ -47,6 +47,11 @@ namespace const HostTensorPtr& out, bool keep_dims) { + if (data->get_element_type() != element::boolean || + !axes->get_element_type().is_integral_number()) + { + return false; + } try { const AxisSet reduction_axes = eval::extract_reduction_axes(axes, "ReduceLogicalAnd"); @@ -70,19 +75,9 @@ namespace bool op::v1::ReduceLogicalAnd::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::ReduceLogicalAnd::evaluate"); - - const auto& data = inputs[0]; - const auto& axes = inputs[1]; - const auto& out = outputs[0]; - - if (data->get_element_type() != element::boolean || - !axes->get_element_type().is_integral_number()) - { - return false; - } - else - { - return evaluate_reduce_logical_and(data, axes, out, get_keep_dims()); - } + NGRAPH_OP_SCOPE(v1_ReduceLogicalAnd_evaluate, const auto& data = inputs[0]; + const auto& axes = inputs[1]; + const auto& out = outputs[0]; + return evaluate_reduce_logical_and(data, axes, out, get_keep_dims())); + return false; } diff --git a/ngraph/core/src/op/reduce_logical_or.cpp b/ngraph/core/src/op/reduce_logical_or.cpp index ba3efba782f0a1..27282b2732377e 100644 --- a/ngraph/core/src/op/reduce_logical_or.cpp +++ b/ngraph/core/src/op/reduce_logical_or.cpp @@ -47,6 +47,11 @@ namespace const HostTensorPtr& out, bool keep_dims) { + if (data->get_element_type() != element::boolean || + !axes->get_element_type().is_integral_number()) + { + return false; + } try { const AxisSet reduction_axes = eval::extract_reduction_axes(axes, "ReduceLogicalOr"); @@ -70,19 +75,9 @@ namespace bool op::v1::ReduceLogicalOr::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::ReduceLogicalOr::evaluate"); - - const auto& data = inputs[0]; - const auto& axes = inputs[1]; - const auto& out = outputs[0]; - - if (data->get_element_type() != element::boolean || - !axes->get_element_type().is_integral_number()) - { - return false; - } - else - { - return evaluate_reduce_logical_or(data, axes, out, get_keep_dims()); - } + NGRAPH_OP_SCOPE(v1_ReduceLogicalOr_evaluate, const auto& data = inputs[0]; + const auto& axes = inputs[1]; + const auto& out = outputs[0]; + return evaluate_reduce_logical_or(data, axes, out, get_keep_dims())); + return false; } diff --git a/ngraph/core/src/op/reduce_mean.cpp b/ngraph/core/src/op/reduce_mean.cpp index 8758bff3b88cfa..10148ead18651e 100644 --- a/ngraph/core/src/op/reduce_mean.cpp +++ b/ngraph/core/src/op/reduce_mean.cpp @@ -63,18 +63,12 @@ namespace mean bool rc = true; switch (arg->get_element_type()) { - TYPE_CASE(i32)(arg, out, axes, keep_dims); - break; - TYPE_CASE(i64)(arg, out, axes, keep_dims); - break; - TYPE_CASE(u32)(arg, out, axes, keep_dims); - break; - TYPE_CASE(u64)(arg, out, axes, keep_dims); - break; - TYPE_CASE(f16)(arg, out, axes, keep_dims); - break; - TYPE_CASE(f32)(arg, out, axes, keep_dims); - break; + NGRAPH_TYPE_CASE(evaluate_mean, i32, arg, out, axes, keep_dims); + NGRAPH_TYPE_CASE(evaluate_mean, i64, arg, out, axes, keep_dims); + NGRAPH_TYPE_CASE(evaluate_mean, u32, arg, out, axes, keep_dims); + NGRAPH_TYPE_CASE(evaluate_mean, u64, arg, out, axes, keep_dims); + NGRAPH_TYPE_CASE(evaluate_mean, f16, arg, out, axes, keep_dims); + NGRAPH_TYPE_CASE(evaluate_mean, f32, arg, out, axes, keep_dims); default: rc = false; break; } return rc; @@ -84,6 +78,8 @@ namespace mean bool op::v1::ReduceMean::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::ReduceMean::evaluate"); - return mean::evaluate_mean(inputs[0], outputs[0], get_reduction_axes(), get_keep_dims()); + NGRAPH_OP_SCOPE( + v1_ReduceMean_evaluate, + return mean::evaluate_mean(inputs[0], outputs[0], get_reduction_axes(), get_keep_dims())); + return false; } diff --git a/ngraph/core/src/op/reduce_prod.cpp b/ngraph/core/src/op/reduce_prod.cpp index f6a5a67b3ebd79..b1f9f6d3e8998a 100644 --- a/ngraph/core/src/op/reduce_prod.cpp +++ b/ngraph/core/src/op/reduce_prod.cpp @@ -67,18 +67,12 @@ namespace reduce_prod bool rc = true; switch (arg->get_element_type()) { - TYPE_CASE(i32)(arg, out, axes, keep_dims); - break; - TYPE_CASE(i64)(arg, out, axes, keep_dims); - break; - TYPE_CASE(u32)(arg, out, axes, keep_dims); - break; - TYPE_CASE(u64)(arg, out, axes, keep_dims); - break; - TYPE_CASE(f16)(arg, out, axes, keep_dims); - break; - TYPE_CASE(f32)(arg, out, axes, keep_dims); - break; + NGRAPH_TYPE_CASE(evaluate_product, i32, arg, out, axes, keep_dims); + NGRAPH_TYPE_CASE(evaluate_product, i64, arg, out, axes, keep_dims); + NGRAPH_TYPE_CASE(evaluate_product, u32, arg, out, axes, keep_dims); + NGRAPH_TYPE_CASE(evaluate_product, u64, arg, out, axes, keep_dims); + NGRAPH_TYPE_CASE(evaluate_product, f16, arg, out, axes, keep_dims); + NGRAPH_TYPE_CASE(evaluate_product, f32, arg, out, axes, keep_dims); default: rc = false; break; } return rc; @@ -88,7 +82,8 @@ namespace reduce_prod bool op::v1::ReduceProd::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::ReduceProd::evaluate"); - return reduce_prod::evaluate_product( - inputs[0], outputs[0], get_reduction_axes(), get_keep_dims()); + NGRAPH_OP_SCOPE(v1_ReduceProd_evaluate, + return reduce_prod::evaluate_product( + inputs[0], outputs[0], get_reduction_axes(), get_keep_dims())); + return false; } diff --git a/ngraph/core/src/op/reduce_sum.cpp b/ngraph/core/src/op/reduce_sum.cpp index 9e306347d8431e..782f078ac19787 100644 --- a/ngraph/core/src/op/reduce_sum.cpp +++ b/ngraph/core/src/op/reduce_sum.cpp @@ -68,18 +68,12 @@ namespace reduce_sum bool rc = true; switch (arg->get_element_type()) { - TYPE_CASE(i32)(arg, out, axes, keep_dims); - break; - TYPE_CASE(i64)(arg, out, axes, keep_dims); - break; - TYPE_CASE(u32)(arg, out, axes, keep_dims); - break; - TYPE_CASE(u64)(arg, out, axes, keep_dims); - break; - TYPE_CASE(f16)(arg, out, axes, keep_dims); - break; - TYPE_CASE(f32)(arg, out, axes, keep_dims); - break; + NGRAPH_TYPE_CASE(evaluate_reduce_sum, i32, arg, out, axes, keep_dims); + NGRAPH_TYPE_CASE(evaluate_reduce_sum, i64, arg, out, axes, keep_dims); + NGRAPH_TYPE_CASE(evaluate_reduce_sum, u32, arg, out, axes, keep_dims); + NGRAPH_TYPE_CASE(evaluate_reduce_sum, u64, arg, out, axes, keep_dims); + NGRAPH_TYPE_CASE(evaluate_reduce_sum, f16, arg, out, axes, keep_dims); + NGRAPH_TYPE_CASE(evaluate_reduce_sum, f32, arg, out, axes, keep_dims); default: rc = false; break; } return rc; @@ -89,6 +83,8 @@ namespace reduce_sum bool op::v1::ReduceSum::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::ReduceSum::evaluate"); - return reduce_sum::evaluate_sum(inputs[0], outputs[0], get_reduction_axes(), get_keep_dims()); + NGRAPH_OP_SCOPE(v1_ReduceSum_evaluate, + return reduce_sum::evaluate_sum( + inputs[0], outputs[0], get_reduction_axes(), get_keep_dims())); + return false; } diff --git a/ngraph/core/src/op/relu.cpp b/ngraph/core/src/op/relu.cpp index 253db2653adc9e..6cc7d086419e0c 100644 --- a/ngraph/core/src/op/relu.cpp +++ b/ngraph/core/src/op/relu.cpp @@ -56,20 +56,13 @@ namespace relu switch (arg0->get_element_type()) { - TYPE_CASE(boolean)(arg0, out, count); - break; - TYPE_CASE(i32)(arg0, out, count); - break; - TYPE_CASE(i64)(arg0, out, count); - break; - TYPE_CASE(u32)(arg0, out, count); - break; - TYPE_CASE(u64)(arg0, out, count); - break; - TYPE_CASE(f16)(arg0, out, count); - break; - TYPE_CASE(f32)(arg0, out, count); - break; + NGRAPH_TYPE_CASE(evaluate_relu, boolean, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_relu, i32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_relu, i64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_relu, u32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_relu, u64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_relu, f16, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_relu, f32, arg0, out, count); default: rc = false; break; } return rc; @@ -78,8 +71,10 @@ namespace relu bool op::Relu::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::Relu::evaluate"); - return relu::evaluate_relu(inputs[0], outputs[0], shape_size(get_output_shape(0))); + NGRAPH_OP_SCOPE( + v0_Relu_evaluate, + return relu::evaluate_relu(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + return false; } bool op::Relu::visit_attributes(AttributeVisitor& visitor) diff --git a/ngraph/core/src/op/reshape.cpp b/ngraph/core/src/op/reshape.cpp index ff8e580c98bb73..e243557bcc2be6 100644 --- a/ngraph/core/src/op/reshape.cpp +++ b/ngraph/core/src/op/reshape.cpp @@ -27,7 +27,7 @@ using namespace std; using namespace ngraph; -namespace +namespace reshapeop { bool evaluate_reshape(const HostTensorPtr& arg0, const HostTensorPtr& out, @@ -227,11 +227,17 @@ shared_ptr op::v1::Reshape::clone_with_new_inputs(const OutputVector& new_ return make_shared(new_args.at(0), new_args.at(1), m_special_zero); } -bool op::v1::Reshape::evaluate(const HostTensorVector& outputs, - const HostTensorVector& inputs) const -{ - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::Reshape::evaluate"); +#define COMPUTE_OUT_SHAPE_CASE(a, ...) \ + case element::Type_t::a: \ + { \ + NGRAPH_OP_SCOPE(OV_CC_CAT3(compute_reshape_out_shape, _, a), \ + reshapeop::compute_output_shape(__VA_ARGS__)); \ + } \ + break; +bool op::v1::Reshape::evaluate_reshape(const HostTensorVector& outputs, + const HostTensorVector& inputs) const +{ // infer and set output shape if the output shape contain -1 // and zero value dimension size_t output_rank = inputs[1]->get_shape()[0]; @@ -239,30 +245,14 @@ bool op::v1::Reshape::evaluate(const HostTensorVector& outputs, switch (inputs[1]->get_element_type()) { - case element::Type_t::i8: - compute_output_shape(inputs[1], out_shape_val); - break; - case element::Type_t::i16: - compute_output_shape(inputs[1], out_shape_val); - break; - case element::Type_t::i32: - compute_output_shape(inputs[1], out_shape_val); - break; - case element::Type_t::i64: - compute_output_shape(inputs[1], out_shape_val); - break; - case element::Type_t::u8: - compute_output_shape(inputs[1], out_shape_val); - break; - case element::Type_t::u16: - compute_output_shape(inputs[1], out_shape_val); - break; - case element::Type_t::u32: - compute_output_shape(inputs[1], out_shape_val); - break; - case element::Type_t::u64: - compute_output_shape(inputs[1], out_shape_val); - break; + COMPUTE_OUT_SHAPE_CASE(i8, inputs[1], out_shape_val); + COMPUTE_OUT_SHAPE_CASE(i16, inputs[1], out_shape_val); + COMPUTE_OUT_SHAPE_CASE(i32, inputs[1], out_shape_val); + COMPUTE_OUT_SHAPE_CASE(i64, inputs[1], out_shape_val); + COMPUTE_OUT_SHAPE_CASE(u8, inputs[1], out_shape_val); + COMPUTE_OUT_SHAPE_CASE(u16, inputs[1], out_shape_val); + COMPUTE_OUT_SHAPE_CASE(u32, inputs[1], out_shape_val); + COMPUTE_OUT_SHAPE_CASE(u64, inputs[1], out_shape_val); default: throw ngraph_error("shape_pattern element type is not integral data type"); } @@ -347,7 +337,14 @@ bool op::v1::Reshape::evaluate(const HostTensorVector& outputs, outputs[0]->set_shape(output_shape); } const AxisVector order = get_default_order(inputs[0]->get_shape()); - return evaluate_reshape(inputs[0], outputs[0], order); + return reshapeop::evaluate_reshape(inputs[0], outputs[0], order); +} + +bool op::v1::Reshape::evaluate(const HostTensorVector& outputs, + const HostTensorVector& inputs) const +{ + NGRAPH_OP_SCOPE(v1_Reshape_evaluate, return evaluate_reshape(outputs, inputs)); + return false; } bool op::v1::Reshape::constant_fold(OutputVector& output_values, const OutputVector& inputs_values) diff --git a/ngraph/core/src/op/result.cpp b/ngraph/core/src/op/result.cpp index 7c1d56d8ac2134..384377b4bfa30c 100644 --- a/ngraph/core/src/op/result.cpp +++ b/ngraph/core/src/op/result.cpp @@ -58,12 +58,12 @@ shared_ptr op::Result::clone_with_new_inputs(const OutputVector& new_args) bool op::Result::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::Result::evaluate"); - outputs[0]->set_unary(inputs[0]); - void* output = outputs[0]->get_data_ptr(); - void* input = inputs[0]->get_data_ptr(); - memcpy(output, input, outputs[0]->get_size_in_bytes()); - return true; + NGRAPH_OP_SCOPE(Result_evaluate, outputs[0]->set_unary(inputs[0]); + void* output = outputs[0]->get_data_ptr(); + void* input = inputs[0]->get_data_ptr(); + memcpy(output, input, outputs[0]->get_size_in_bytes()); + return true); + return false; } bool op::Result::constant_fold(OutputVector& output_values, const OutputVector& inputs_values) diff --git a/ngraph/core/src/op/reverse.cpp b/ngraph/core/src/op/reverse.cpp index fe929235617550..fb851c824cf85a 100644 --- a/ngraph/core/src/op/reverse.cpp +++ b/ngraph/core/src/op/reverse.cpp @@ -17,6 +17,7 @@ #include #include #include +#include "itt.hpp" #include "ngraph/attribute_visitor.hpp" #include "ngraph/function.hpp" @@ -148,8 +149,27 @@ op::v1::Reverse::Mode op::v1::Reverse::mode_from_string(const std::string& mode) return allowed_values.at(mode); } -bool op::v1::Reverse::evaluate(const HostTensorVector& outputs, - const HostTensorVector& inputs) const +namespace reverseop +{ + template + void get_axes(AxisSet& axes, const HostTensorPtr& in) + { + auto axes_indices = in->get_data_ptr(); + size_t axes_rank = in->get_element_count(); + std::copy(axes_indices, axes_indices + axes_rank, std::inserter(axes, axes.end())); + } +} + +#define GET_AXES(a, ...) \ + case element::Type_t::a: \ + { \ + NGRAPH_OP_SCOPE(OV_CC_CAT3(get_reverse_axes, _, a), \ + reverseop::get_axes(__VA_ARGS__)); \ + } \ + break; + +bool op::v1::Reverse::evaluate_reverse(const HostTensorVector& outputs, + const HostTensorVector& inputs) const { AxisSet axes{}; size_t axes_rank = inputs[1]->get_element_count(); @@ -157,65 +177,15 @@ bool op::v1::Reverse::evaluate(const HostTensorVector& outputs, { switch (inputs[1]->get_element_type()) { - case element::Type_t::i8: - { - auto axes_indices = inputs[1]->get_data_ptr(); - std::copy(axes_indices, axes_indices + axes_rank, std::inserter(axes, axes.end())); - break; - } - case element::Type_t::u8: - { - auto axes_indices = inputs[1]->get_data_ptr(); - std::copy(axes_indices, axes_indices + axes_rank, std::inserter(axes, axes.end())); - break; - } - case element::Type_t::i16: - { - auto axes_indices = inputs[1]->get_data_ptr(); - std::copy(axes_indices, axes_indices + axes_rank, std::inserter(axes, axes.end())); - break; - } - case element::Type_t::u16: - { - auto axes_indices = inputs[1]->get_data_ptr(); - std::copy(axes_indices, axes_indices + axes_rank, std::inserter(axes, axes.end())); - break; - } - case element::Type_t::i32: - { - auto axes_indices = inputs[1]->get_data_ptr(); - std::copy(axes_indices, axes_indices + axes_rank, std::inserter(axes, axes.end())); - break; - } - case element::Type_t::u32: - { - auto axes_indices = inputs[1]->get_data_ptr(); - std::copy(axes_indices, axes_indices + axes_rank, std::inserter(axes, axes.end())); - break; - } - case element::Type_t::i64: - { - auto axes_indices = inputs[1]->get_data_ptr(); - std::copy(axes_indices, axes_indices + axes_rank, std::inserter(axes, axes.end())); - break; - } - case element::Type_t::u64: - { - auto axes_indices = inputs[1]->get_data_ptr(); - std::copy(axes_indices, axes_indices + axes_rank, std::inserter(axes, axes.end())); - break; - } - case element::Type_t::undefined: - case element::Type_t::dynamic: - case element::Type_t::boolean: - case element::Type_t::bf16: - case element::Type_t::f16: - case element::Type_t::f32: - case element::Type_t::f64: - case element::Type_t::u1: - default: - NGRAPH_CHECK(false, "Not supported axes type", inputs[1]->get_element_type()); - break; + GET_AXES(i8, axes, inputs[1]); + GET_AXES(i16, axes, inputs[1]); + GET_AXES(i32, axes, inputs[1]); + GET_AXES(i64, axes, inputs[1]); + GET_AXES(u8, axes, inputs[1]); + GET_AXES(u16, axes, inputs[1]); + GET_AXES(u32, axes, inputs[1]); + GET_AXES(u64, axes, inputs[1]); + default: NGRAPH_CHECK(false, "Not supported axes type", inputs[1]->get_element_type()); } } else // Mode::MASK @@ -238,6 +208,13 @@ bool op::v1::Reverse::evaluate(const HostTensorVector& outputs, return true; } +bool op::v1::Reverse::evaluate(const HostTensorVector& outputs, + const HostTensorVector& inputs) const +{ + NGRAPH_OP_SCOPE(v1_Reverse_evaluate, return evaluate_reverse(outputs, inputs)); + return false; +} + namespace ngraph { template <> diff --git a/ngraph/core/src/op/roi_align.cpp b/ngraph/core/src/op/roi_align.cpp index dc5ed6606758eb..6203559fec7151 100644 --- a/ngraph/core/src/op/roi_align.cpp +++ b/ngraph/core/src/op/roi_align.cpp @@ -15,6 +15,7 @@ //***************************************************************************** #include "roi_align.hpp" +#include "itt.hpp" #include "ngraph/runtime/host_tensor.hpp" #include "ngraph/runtime/reference/roi_align.hpp" @@ -203,8 +204,38 @@ namespace ngraph return s << as_string(type); } } // namespace ngraph -namespace + +namespace roi_alinop { + template + bool evaluate(const HostTensorPtr& feature_maps, + const HostTensorPtr& rois, + const std::vector& batch_indices_vec_scaled_up, + const HostTensorPtr& out, + const int pooled_height, + const int pooled_width, + const int sampling_ratio, + const float spatial_scale, + const op::v3::ROIAlign::PoolingMode& pooling_mode, + const Shape& batch_indices_shape) + { + using T = typename element_type_traits::value_type; + runtime::reference::roi_align(feature_maps->get_data_ptr(), + rois->get_data_ptr(), + batch_indices_vec_scaled_up.data(), + out->get_data_ptr(), + feature_maps->get_shape(), + rois->get_shape(), + batch_indices_shape, + out->get_shape(), + pooled_height, + pooled_width, + sampling_ratio, + spatial_scale, + pooling_mode); + return true; + } + bool evaluate_roi_align(const HostTensorVector& args, const HostTensorPtr& out, const int pooled_height, @@ -216,73 +247,61 @@ namespace auto feature_maps = args[0]; auto rois = args[1]; auto batch_indices = args[2]; - std::vector batch_indices_vec_scaled_up = host_tensor_2_vector(batch_indices); + bool rc = true; switch (feature_maps->get_element_type()) { - case element::Type_t::bf16: - { - runtime::reference::roi_align(feature_maps->get_data_ptr(), - rois->get_data_ptr(), - batch_indices_vec_scaled_up.data(), - out->get_data_ptr(), - feature_maps->get_shape(), - rois->get_shape(), - batch_indices->get_shape(), - out->get_shape(), - pooled_height, - pooled_width, - sampling_ratio, - spatial_scale, - pooling_mode); - break; - } - case element::Type_t::f16: - { - runtime::reference::roi_align(feature_maps->get_data_ptr(), - rois->get_data_ptr(), - batch_indices_vec_scaled_up.data(), - out->get_data_ptr(), - feature_maps->get_shape(), - rois->get_shape(), - batch_indices->get_shape(), - out->get_shape(), - pooled_height, - pooled_width, - sampling_ratio, - spatial_scale, - pooling_mode); - break; - } - case element::Type_t::f32: - { - runtime::reference::roi_align(feature_maps->get_data_ptr(), - rois->get_data_ptr(), - batch_indices_vec_scaled_up.data(), - out->get_data_ptr(), - feature_maps->get_shape(), - rois->get_shape(), - batch_indices->get_shape(), - out->get_shape(), - pooled_height, - pooled_width, - sampling_ratio, - spatial_scale, - pooling_mode); - break; - } - default: NGRAPH_UNREACHABLE("unsupported input type for roi_align"); + NGRAPH_TYPE_CASE(evaluate_roi_align, + bf16, + feature_maps, + rois, + batch_indices_vec_scaled_up, + out, + pooled_height, + pooled_width, + sampling_ratio, + spatial_scale, + pooling_mode, + batch_indices->get_shape()); + NGRAPH_TYPE_CASE(evaluate_roi_align, + f16, + feature_maps, + rois, + batch_indices_vec_scaled_up, + out, + pooled_height, + pooled_width, + sampling_ratio, + spatial_scale, + pooling_mode, + batch_indices->get_shape()); + NGRAPH_TYPE_CASE(evaluate_roi_align, + f32, + feature_maps, + rois, + batch_indices_vec_scaled_up, + out, + pooled_height, + pooled_width, + sampling_ratio, + spatial_scale, + pooling_mode, + batch_indices->get_shape()); + default: rc = false; break; } - return true; + return rc; } } // namespace bool op::v3::ROIAlign::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - return evaluate_roi_align( - inputs, outputs[0], m_pooled_h, m_pooled_w, m_sampling_ratio, m_spatial_scale, m_mode); + NGRAPH_OP_SCOPE( + v3_ROIAlign_evaluate, + return roi_alinop::evaluate_roi_align( + inputs, outputs[0], m_pooled_h, m_pooled_w, m_sampling_ratio, m_spatial_scale, m_mode)); + return false; } diff --git a/ngraph/core/src/op/round.cpp b/ngraph/core/src/op/round.cpp index c5e09101e8de9e..7881df718a2911 100644 --- a/ngraph/core/src/op/round.cpp +++ b/ngraph/core/src/op/round.cpp @@ -58,30 +58,18 @@ namespace roundop switch (arg0->get_element_type()) { - COPY_TENSOR(boolean)(arg0, out, count); - break; - COPY_TENSOR(i8)(arg0, out, count); - break; - COPY_TENSOR(i16)(arg0, out, count); - break; - COPY_TENSOR(i32)(arg0, out, count); - break; - COPY_TENSOR(i64)(arg0, out, count); - break; - COPY_TENSOR(u8)(arg0, out, count); - break; - COPY_TENSOR(u16)(arg0, out, count); - break; - COPY_TENSOR(u32)(arg0, out, count); - break; - COPY_TENSOR(u64)(arg0, out, count); - break; - TYPE_CASE(f16)(arg0, out, count, mode); - break; - TYPE_CASE(f32)(arg0, out, count, mode); - break; - TYPE_CASE(bf16)(arg0, out, count, mode); - break; + NGRAPH_COPY_TENSOR(evaluate_round, boolean, arg0, out, count); + NGRAPH_COPY_TENSOR(evaluate_round, i8, arg0, out, count); + NGRAPH_COPY_TENSOR(evaluate_round, i16, arg0, out, count); + NGRAPH_COPY_TENSOR(evaluate_round, i32, arg0, out, count); + NGRAPH_COPY_TENSOR(evaluate_round, i64, arg0, out, count); + NGRAPH_COPY_TENSOR(evaluate_round, u8, arg0, out, count); + NGRAPH_COPY_TENSOR(evaluate_round, u16, arg0, out, count); + NGRAPH_COPY_TENSOR(evaluate_round, u32, arg0, out, count); + NGRAPH_COPY_TENSOR(evaluate_round, u64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_round, f16, arg0, out, count, mode); + NGRAPH_TYPE_CASE(evaluate_round, f32, arg0, out, count, mode); + NGRAPH_TYPE_CASE(evaluate_round, bf16, arg0, out, count, mode); default: rc = false; break; } return rc; @@ -117,9 +105,10 @@ shared_ptr op::v5::Round::clone_with_new_inputs(const OutputVector& new_ar bool op::v5::Round::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v5::Round::evaluate"); - return roundop::evaluate_round( - inputs[0], outputs[0], shape_size(get_output_shape(0)), get_mode()); + NGRAPH_OP_SCOPE(v5_Round_evaluate, + return roundop::evaluate_round( + inputs[0], outputs[0], shape_size(get_output_shape(0)), get_mode())); + return false; } namespace ngraph diff --git a/ngraph/core/src/op/scatter_elements_update.cpp b/ngraph/core/src/op/scatter_elements_update.cpp index 597176eeddd69d..0e40cb2cbf5031 100644 --- a/ngraph/core/src/op/scatter_elements_update.cpp +++ b/ngraph/core/src/op/scatter_elements_update.cpp @@ -162,8 +162,13 @@ namespace scatter_element_update return true; } -#define TYPE_AXS_CASE(a) \ - case element::Type_t::a: rc = evaluate +#define TYPE_AXS_CASE(a, ...) \ + case element::Type_t::a: \ + { \ + NGRAPH_OP_SCOPE(OV_CC_CAT3(scatter_element_update_axs, _, a), \ + rc = evaluate(__VA_ARGS__)); \ + } \ + break; template bool evaluate(const HostTensorPtr& arg0, @@ -180,29 +185,26 @@ namespace scatter_element_update switch (axis_type) { - TYPE_AXS_CASE(i8)(arg0, arg1, arg2, arg3, out, normalized_axis); - break; - TYPE_AXS_CASE(i16)(arg0, arg1, arg2, arg3, out, normalized_axis); - break; - TYPE_AXS_CASE(i32)(arg0, arg1, arg2, arg3, out, normalized_axis); - break; - TYPE_AXS_CASE(i64)(arg0, arg1, arg2, arg3, out, normalized_axis); - break; - TYPE_AXS_CASE(u8)(arg0, arg1, arg2, arg3, out, normalized_axis); - break; - TYPE_AXS_CASE(u16)(arg0, arg1, arg2, arg3, out, normalized_axis); - break; - TYPE_AXS_CASE(u32)(arg0, arg1, arg2, arg3, out, normalized_axis); - break; - TYPE_AXS_CASE(u64)(arg0, arg1, arg2, arg3, out, normalized_axis); - break; + TYPE_AXS_CASE(i8, arg0, arg1, arg2, arg3, out, normalized_axis); + TYPE_AXS_CASE(i16, arg0, arg1, arg2, arg3, out, normalized_axis); + TYPE_AXS_CASE(i32, arg0, arg1, arg2, arg3, out, normalized_axis); + TYPE_AXS_CASE(i64, arg0, arg1, arg2, arg3, out, normalized_axis); + TYPE_AXS_CASE(u8, arg0, arg1, arg2, arg3, out, normalized_axis); + TYPE_AXS_CASE(u16, arg0, arg1, arg2, arg3, out, normalized_axis); + TYPE_AXS_CASE(u32, arg0, arg1, arg2, arg3, out, normalized_axis); + TYPE_AXS_CASE(u64, arg0, arg1, arg2, arg3, out, normalized_axis); default: rc = false; break; } return rc; } -#define TYPE_IND_CASE(a) \ - case element::Type_t::a: rc = evaluate +#define TYPE_IND_CASE(a, ...) \ + case element::Type_t::a: \ + { \ + NGRAPH_OP_SCOPE(OV_CC_CAT3(scatter_element_update_ind, _, a), \ + rc = evaluate(__VA_ARGS__)); \ + } \ + break; template bool evaluate(const HostTensorPtr& arg0, @@ -219,22 +221,14 @@ namespace scatter_element_update switch (indices_type) { - TYPE_IND_CASE(i8)(arg0, arg1, arg2, arg3, out, normalized_axis); - break; - TYPE_IND_CASE(i16)(arg0, arg1, arg2, arg3, out, normalized_axis); - break; - TYPE_IND_CASE(i32)(arg0, arg1, arg2, arg3, out, normalized_axis); - break; - TYPE_IND_CASE(i64)(arg0, arg1, arg2, arg3, out, normalized_axis); - break; - TYPE_IND_CASE(u8)(arg0, arg1, arg2, arg3, out, normalized_axis); - break; - TYPE_IND_CASE(u16)(arg0, arg1, arg2, arg3, out, normalized_axis); - break; - TYPE_IND_CASE(u32)(arg0, arg1, arg2, arg3, out, normalized_axis); - break; - TYPE_IND_CASE(u64)(arg0, arg1, arg2, arg3, out, normalized_axis); - break; + TYPE_IND_CASE(i8, arg0, arg1, arg2, arg3, out, normalized_axis); + TYPE_IND_CASE(i16, arg0, arg1, arg2, arg3, out, normalized_axis); + TYPE_IND_CASE(i32, arg0, arg1, arg2, arg3, out, normalized_axis); + TYPE_IND_CASE(i64, arg0, arg1, arg2, arg3, out, normalized_axis); + TYPE_IND_CASE(u8, arg0, arg1, arg2, arg3, out, normalized_axis); + TYPE_IND_CASE(u16, arg0, arg1, arg2, arg3, out, normalized_axis); + TYPE_IND_CASE(u32, arg0, arg1, arg2, arg3, out, normalized_axis); + TYPE_IND_CASE(u64, arg0, arg1, arg2, arg3, out, normalized_axis); default: rc = false; break; } return rc; @@ -251,31 +245,29 @@ namespace scatter_element_update switch (out->get_element_type()) { - TYPE_CASE(i16)(arg0, arg1, arg2, arg3, out, normalized_axis); - break; - TYPE_CASE(i32)(arg0, arg1, arg2, arg3, out, normalized_axis); - break; - TYPE_CASE(i64)(arg0, arg1, arg2, arg3, out, normalized_axis); - break; - TYPE_CASE(u32)(arg0, arg1, arg2, arg3, out, normalized_axis); - break; - TYPE_CASE(u64)(arg0, arg1, arg2, arg3, out, normalized_axis); - break; - TYPE_CASE(f16)(arg0, arg1, arg2, arg3, out, normalized_axis); - break; - TYPE_CASE(f32)(arg0, arg1, arg2, arg3, out, normalized_axis); - break; + NGRAPH_TYPE_CASE( + evaluate_scatter_element_update, i16, arg0, arg1, arg2, arg3, out, normalized_axis); + NGRAPH_TYPE_CASE( + evaluate_scatter_element_update, i32, arg0, arg1, arg2, arg3, out, normalized_axis); + NGRAPH_TYPE_CASE( + evaluate_scatter_element_update, i64, arg0, arg1, arg2, arg3, out, normalized_axis); + NGRAPH_TYPE_CASE( + evaluate_scatter_element_update, u32, arg0, arg1, arg2, arg3, out, normalized_axis); + NGRAPH_TYPE_CASE( + evaluate_scatter_element_update, u64, arg0, arg1, arg2, arg3, out, normalized_axis); + NGRAPH_TYPE_CASE( + evaluate_scatter_element_update, f16, arg0, arg1, arg2, arg3, out, normalized_axis); + NGRAPH_TYPE_CASE( + evaluate_scatter_element_update, f32, arg0, arg1, arg2, arg3, out, normalized_axis); default: rc = false; break; } return rc; } } -bool op::v3::ScatterElementsUpdate::evaluate(const HostTensorVector& outputs, - const HostTensorVector& inputs) const +bool op::v3::ScatterElementsUpdate::evaluate_scatter_element_update( + const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v3::ScatterElementsUpdate::evaluate"); - NGRAPH_CHECK(inputs[3]->get_element_type().is_integral_number(), "axis element type is not integral data type"); @@ -299,3 +291,11 @@ bool op::v3::ScatterElementsUpdate::evaluate(const HostTensorVector& outputs, return scatter_element_update::evaluate_scatter_element_update( inputs[0], inputs[1], inputs[2], inputs[3], outputs[0], normalized_axis); } + +bool op::v3::ScatterElementsUpdate::evaluate(const HostTensorVector& outputs, + const HostTensorVector& inputs) const +{ + NGRAPH_OP_SCOPE(v3_ScatterElementsUpdate_evaluate, + return evaluate_scatter_element_update(outputs, inputs)); + return false; +} diff --git a/ngraph/core/src/op/scatter_update.cpp b/ngraph/core/src/op/scatter_update.cpp index 6aef517d32aa36..c86d9b35fb4cf2 100644 --- a/ngraph/core/src/op/scatter_update.cpp +++ b/ngraph/core/src/op/scatter_update.cpp @@ -15,6 +15,7 @@ //***************************************************************************** #include "ngraph/op/scatter_update.hpp" +#include "itt.hpp" #include "ngraph/runtime/reference/scatter_update.hpp" #include "ngraph/shape.hpp" #include "ngraph/type/element_type.hpp" @@ -41,8 +42,27 @@ shared_ptr op::v3::ScatterUpdate::clone_with_new_inputs(const OutputVector new_args.at(0), new_args.at(1), new_args.at(2), new_args.at(3)); } -bool op::v3::ScatterUpdate::evaluate(const HostTensorVector& outputs, - const HostTensorVector& inputs) const +namespace scatter_update +{ + template + std::vector get_indices(const HostTensorPtr& in) + { + auto data_ptr = in->get_data_ptr(); + return std::vector(data_ptr, data_ptr + in->get_element_count()); + } +} + +#define GET_INDICES(a, ...) \ + case element::Type_t::a: \ + { \ + NGRAPH_OP_SCOPE(OV_CC_CAT3(get_scatter_update_indices, _, a), \ + indices_casted_vector = \ + scatter_update::get_indices(__VA_ARGS__)); \ + } \ + break; + +bool op::v3::ScatterUpdate::evaluate_scatter_update(const HostTensorVector& outputs, + const HostTensorVector& inputs) const { const auto& data = inputs[0]; const auto& indices = inputs[1]; @@ -66,63 +86,15 @@ bool op::v3::ScatterUpdate::evaluate(const HostTensorVector& outputs, std::vector indices_casted_vector; switch (indices->get_element_type()) { - case element::Type_t::i8: - { - auto indices_ptr = indices->get_data_ptr(); - indices_casted_vector = - std::vector(indices_ptr, indices_ptr + indices->get_element_count()); - break; - } - case element::Type_t::i16: - { - auto indices_ptr = indices->get_data_ptr(); - indices_casted_vector = - std::vector(indices_ptr, indices_ptr + indices->get_element_count()); - break; - } - case element::Type_t::i32: - { - auto indices_ptr = indices->get_data_ptr(); - indices_casted_vector = - std::vector(indices_ptr, indices_ptr + indices->get_element_count()); - break; - } - case element::Type_t::i64: - { - auto indices_ptr = indices->get_data_ptr(); - indices_casted_vector = - std::vector(indices_ptr, indices_ptr + indices->get_element_count()); - break; - } - case element::Type_t::u8: - { - auto indices_ptr = indices->get_data_ptr(); - indices_casted_vector = - std::vector(indices_ptr, indices_ptr + indices->get_element_count()); - break; - } - case element::Type_t::u16: - { - auto indices_ptr = indices->get_data_ptr(); - indices_casted_vector = - std::vector(indices_ptr, indices_ptr + indices->get_element_count()); - break; - } - case element::Type_t::u32: - { - auto indices_ptr = indices->get_data_ptr(); - indices_casted_vector = - std::vector(indices_ptr, indices_ptr + indices->get_element_count()); - break; - } - case element::Type_t::u64: - { - auto indices_ptr = indices->get_data_ptr(); - indices_casted_vector = - std::vector(indices_ptr, indices_ptr + indices->get_element_count()); - break; - } - default: throw ngraph_error("indices element type is not integral data type"); + GET_INDICES(i8, indices); + GET_INDICES(i16, indices); + GET_INDICES(i32, indices); + GET_INDICES(i64, indices); + GET_INDICES(u8, indices); + GET_INDICES(u16, indices); + GET_INDICES(u32, indices); + GET_INDICES(u64, indices); + default: return false; } runtime::reference::scatter_update(data->get_data_ptr(), @@ -137,3 +109,10 @@ bool op::v3::ScatterUpdate::evaluate(const HostTensorVector& outputs, return true; } + +bool op::v3::ScatterUpdate::evaluate(const HostTensorVector& outputs, + const HostTensorVector& inputs) const +{ + NGRAPH_OP_SCOPE(v3_ScatterUpdate_evaluate, return evaluate_scatter_update(outputs, inputs)); + return false; +} diff --git a/ngraph/core/src/op/select.cpp b/ngraph/core/src/op/select.cpp index 2dd1bbf076dd6a..6f600baeb9c83e 100644 --- a/ngraph/core/src/op/select.cpp +++ b/ngraph/core/src/op/select.cpp @@ -16,6 +16,7 @@ #include +#include "itt.hpp" #include "ngraph/attribute_visitor.hpp" #include "ngraph/log.hpp" #include "ngraph/op/convert.hpp" @@ -133,30 +134,18 @@ namespace detail switch (et) { - TYPE_CASE(i8)(output_values, input_values, autob); - break; - TYPE_CASE(i16)(output_values, input_values, autob); - break; - TYPE_CASE(i32)(output_values, input_values, autob); - break; - TYPE_CASE(i64)(output_values, input_values, autob); - break; - TYPE_CASE(u8)(output_values, input_values, autob); - break; - TYPE_CASE(u16)(output_values, input_values, autob); - break; - TYPE_CASE(u32)(output_values, input_values, autob); - break; - TYPE_CASE(u64)(output_values, input_values, autob); - break; - TYPE_CASE(bf16)(output_values, input_values, autob); - break; - TYPE_CASE(f32)(output_values, input_values, autob); - break; - TYPE_CASE(f64)(output_values, input_values, autob); - break; - TYPE_CASE(boolean)(output_values, input_values, autob); - break; + NGRAPH_TYPE_CASE(evaluate_select, i8, output_values, input_values, autob); + NGRAPH_TYPE_CASE(evaluate_select, i16, output_values, input_values, autob); + NGRAPH_TYPE_CASE(evaluate_select, i32, output_values, input_values, autob); + NGRAPH_TYPE_CASE(evaluate_select, i64, output_values, input_values, autob); + NGRAPH_TYPE_CASE(evaluate_select, u8, output_values, input_values, autob); + NGRAPH_TYPE_CASE(evaluate_select, u16, output_values, input_values, autob); + NGRAPH_TYPE_CASE(evaluate_select, u32, output_values, input_values, autob); + NGRAPH_TYPE_CASE(evaluate_select, u64, output_values, input_values, autob); + NGRAPH_TYPE_CASE(evaluate_select, bf16, output_values, input_values, autob); + NGRAPH_TYPE_CASE(evaluate_select, f32, output_values, input_values, autob); + NGRAPH_TYPE_CASE(evaluate_select, f64, output_values, input_values, autob); + NGRAPH_TYPE_CASE(evaluate_select, boolean, output_values, input_values, autob); default: rc = false; break; } @@ -167,7 +156,9 @@ namespace detail bool op::v1::Select::evaluate(const HostTensorVector& output_values, const HostTensorVector& input_values) const { - const auto autob = get_auto_broadcast(); + NGRAPH_OP_SCOPE(v1_Select_evaluate, const auto autob = get_auto_broadcast(); - return detail::evaluate_select(output_values, input_values, autob, get_output_element_type(0)); + return detail::evaluate_select( + output_values, input_values, autob, get_output_element_type(0))); + return false; } diff --git a/ngraph/core/src/op/shape_of.cpp b/ngraph/core/src/op/shape_of.cpp index 78923352831d98..9324ff70af6ec2 100644 --- a/ngraph/core/src/op/shape_of.cpp +++ b/ngraph/core/src/op/shape_of.cpp @@ -78,14 +78,10 @@ namespace shape_of output_value->set_shape(Shape{shape.size()}); switch (output_value->get_element_type()) { - TYPE_CASE(i32)(shape, output_value); - break; - TYPE_CASE(i64)(shape, output_value); - break; - TYPE_CASE(u32)(shape, output_value); - break; - TYPE_CASE(u64)(shape, output_value); - break; + NGRAPH_TYPE_CASE(evaluate_shape_of, i32, shape, output_value); + NGRAPH_TYPE_CASE(evaluate_shape_of, i64, shape, output_value); + NGRAPH_TYPE_CASE(evaluate_shape_of, u32, shape, output_value); + NGRAPH_TYPE_CASE(evaluate_shape_of, u64, shape, output_value); default: rc = false; break; } return rc; @@ -158,8 +154,9 @@ namespace shape_of bool op::v3::ShapeOf::evaluate(const HostTensorVector& output_values, const HostTensorVector& input_values) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v3::ShapeOf::evaluate"); - return shape_of::evaluate_shape_of(output_values[0], input_values[0]); + NGRAPH_OP_SCOPE(v3_ShapeOf_evaluate, + return shape_of::evaluate_shape_of(output_values[0], input_values[0]);); + return false; } bool op::v3::ShapeOf::constant_fold(OutputVector& output_values, const OutputVector& input_values) @@ -207,8 +204,9 @@ shared_ptr op::v0::ShapeOf::clone_with_new_inputs(const OutputVector& new_ bool op::v0::ShapeOf::evaluate(const HostTensorVector& output_values, const HostTensorVector& input_values) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v0::ShapeOf::evaluate"); - return shape_of::evaluate_shape_of(output_values[0], input_values[0]); + NGRAPH_OP_SCOPE(v0_ShapeOf_evaluate, + return shape_of::evaluate_shape_of(output_values[0], input_values[0])); + return false; } bool op::v0::ShapeOf::constant_fold(OutputVector& output_values, const OutputVector& input_values) diff --git a/ngraph/core/src/op/shuffle_channels.cpp b/ngraph/core/src/op/shuffle_channels.cpp index 5f7bc350cb8457..f39a5eb44be9bc 100644 --- a/ngraph/core/src/op/shuffle_channels.cpp +++ b/ngraph/core/src/op/shuffle_channels.cpp @@ -15,6 +15,7 @@ //***************************************************************************** #include +#include "itt.hpp" #include "ngraph/attribute_visitor.hpp" #include "ngraph/builder/reshape.hpp" #include "ngraph/op/shuffle_channels.hpp" @@ -139,8 +140,8 @@ Shape op::ShuffleChannels::get_pre_shuffle_shape(const Shape& data_shape) const return res; } -bool op::ShuffleChannels::evaluate(const HostTensorVector& outputs, - const HostTensorVector& inputs) const +bool op::ShuffleChannels::evaluate_shuffle_channels(const HostTensorVector& outputs, + const HostTensorVector& inputs) const { const auto arg = inputs[0]->get_data_ptr(); auto out = outputs[0]->get_data_ptr(); @@ -164,7 +165,8 @@ bool op::ShuffleChannels::evaluate(const HostTensorVector& outputs, } size_t data_size = shape_size(data_shape) * elem_size; - // first reshape from data_shape to reshaped_out_shape is skipped since it doesn't affect out + // first reshape from data_shape to reshaped_out_shape is skipped since it doesn't affect + // out // data Shape transpose_axes_order = {0, 2, 1, 3}; @@ -178,6 +180,13 @@ bool op::ShuffleChannels::evaluate(const HostTensorVector& outputs, runtime::opt_kernel::reshape( arg, out, reshaped_out_shape, axis_vector, transposed_shape, elem_size); - // last reshape from transposed_shape to data_shape is skipped since it doesn't affect out data + // last reshape from transposed_shape to data_shape is skipped since it doesn't affect out + // data return true; } +bool op::ShuffleChannels::evaluate(const HostTensorVector& outputs, + const HostTensorVector& inputs) const +{ + NGRAPH_OP_SCOPE(ShuffleChannels_evaluate, return evaluate_shuffle_channels(outputs, inputs)); + return false; +} diff --git a/ngraph/core/src/op/sigmoid.cpp b/ngraph/core/src/op/sigmoid.cpp index b27cab0d11d0b0..701e010505ce7c 100644 --- a/ngraph/core/src/op/sigmoid.cpp +++ b/ngraph/core/src/op/sigmoid.cpp @@ -57,20 +57,13 @@ namespace sigmoid switch (arg0->get_element_type()) { - TYPE_CASE(boolean)(arg0, out, count); - break; - TYPE_CASE(i32)(arg0, out, count); - break; - TYPE_CASE(i64)(arg0, out, count); - break; - TYPE_CASE(u32)(arg0, out, count); - break; - TYPE_CASE(u64)(arg0, out, count); - break; - TYPE_CASE(f16)(arg0, out, count); - break; - TYPE_CASE(f32)(arg0, out, count); - break; + NGRAPH_TYPE_CASE(evaluate_sigmoid, boolean, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_sigmoid, i32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_sigmoid, i64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_sigmoid, u32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_sigmoid, u64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_sigmoid, f16, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_sigmoid, f32, arg0, out, count); default: rc = false; break; } return rc; @@ -79,6 +72,8 @@ namespace sigmoid bool op::Sigmoid::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::Sigmoid::evaluate"); - return sigmoid::evaluate_sigmoid(inputs[0], outputs[0], shape_size(get_output_shape(0))); + NGRAPH_OP_SCOPE( + v0_Sigmoid_evaluate, + return sigmoid::evaluate_sigmoid(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + return false; } diff --git a/ngraph/core/src/op/sign.cpp b/ngraph/core/src/op/sign.cpp index 07a82970df6630..f3cbd83647b643 100644 --- a/ngraph/core/src/op/sign.cpp +++ b/ngraph/core/src/op/sign.cpp @@ -60,20 +60,13 @@ namespace signop switch (arg0->get_element_type()) { - TYPE_CASE(boolean)(arg0, out, count); - break; - TYPE_CASE(i32)(arg0, out, count); - break; - TYPE_CASE(i64)(arg0, out, count); - break; - TYPE_CASE(u32)(arg0, out, count); - break; - TYPE_CASE(u64)(arg0, out, count); - break; - TYPE_CASE(f16)(arg0, out, count); - break; - TYPE_CASE(f32)(arg0, out, count); - break; + NGRAPH_TYPE_CASE(evaluate_sign, boolean, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_sign, i32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_sign, i64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_sign, u32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_sign, u64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_sign, f16, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_sign, f32, arg0, out, count); default: rc = false; break; } return rc; @@ -82,6 +75,8 @@ namespace signop bool op::Sign::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::Sign::evaluate"); - return signop::evaluate_sign(inputs[0], outputs[0], shape_size(get_output_shape(0))); + NGRAPH_OP_SCOPE( + v0_Sign_evaluate, + return signop::evaluate_sign(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + return false; } diff --git a/ngraph/core/src/op/sin.cpp b/ngraph/core/src/op/sin.cpp index 6d6e4a511a331f..0b2c5a323382c9 100644 --- a/ngraph/core/src/op/sin.cpp +++ b/ngraph/core/src/op/sin.cpp @@ -62,20 +62,13 @@ namespace sinop switch (arg0->get_element_type()) { - TYPE_CASE(boolean)(arg0, out, count); - break; - TYPE_CASE(i32)(arg0, out, count); - break; - TYPE_CASE(i64)(arg0, out, count); - break; - TYPE_CASE(u32)(arg0, out, count); - break; - TYPE_CASE(u64)(arg0, out, count); - break; - TYPE_CASE(f16)(arg0, out, count); - break; - TYPE_CASE(f32)(arg0, out, count); - break; + NGRAPH_TYPE_CASE(evaluate_sin, boolean, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_sin, i32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_sin, i64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_sin, u32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_sin, u64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_sin, f16, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_sin, f32, arg0, out, count); default: rc = false; break; } return rc; @@ -84,6 +77,8 @@ namespace sinop bool op::Sin::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::Sin::evaluate"); - return sinop::evaluate_sin(inputs[0], outputs[0], shape_size(get_output_shape(0))); + NGRAPH_OP_SCOPE( + v0_Sin_evaluate, + return sinop::evaluate_sin(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + return false; } diff --git a/ngraph/core/src/op/sinh.cpp b/ngraph/core/src/op/sinh.cpp index 6c646f14f6b9a7..4b570949fb6fb6 100644 --- a/ngraph/core/src/op/sinh.cpp +++ b/ngraph/core/src/op/sinh.cpp @@ -62,20 +62,13 @@ namespace sinhop switch (arg0->get_element_type()) { - TYPE_CASE(boolean)(arg0, out, count); - break; - TYPE_CASE(i32)(arg0, out, count); - break; - TYPE_CASE(i64)(arg0, out, count); - break; - TYPE_CASE(u32)(arg0, out, count); - break; - TYPE_CASE(u64)(arg0, out, count); - break; - TYPE_CASE(f16)(arg0, out, count); - break; - TYPE_CASE(f32)(arg0, out, count); - break; + NGRAPH_TYPE_CASE(evaluate_sinh, boolean, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_sinh, i32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_sinh, i64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_sinh, u32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_sinh, u64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_sinh, f16, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_sinh, f32, arg0, out, count); default: rc = false; break; } return rc; @@ -84,6 +77,8 @@ namespace sinhop bool op::Sinh::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::Sinh::evaluate"); - return sinhop::evaluate_sinh(inputs[0], outputs[0], shape_size(get_output_shape(0))); + NGRAPH_OP_SCOPE( + v0_Sinh_evaluate, + return sinhop::evaluate_sinh(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + return false; } diff --git a/ngraph/core/src/op/softmax.cpp b/ngraph/core/src/op/softmax.cpp index 44213ba6187190..5dcde929c1c671 100644 --- a/ngraph/core/src/op/softmax.cpp +++ b/ngraph/core/src/op/softmax.cpp @@ -35,23 +35,29 @@ using namespace ngraph; namespace { template - inline bool try_evaluate_softmax(const HostTensorPtr& arg, - const HostTensorPtr& out, - const Shape& shape, - const AxisSet& axes) + inline bool evaluate(const HostTensorPtr& arg, + const HostTensorPtr& out, + const Shape& shape, + const AxisSet& axes) { - return (ET == arg->get_element_type()) && - (runtime::reference::softmax( - arg->get_data_ptr(), out->get_data_ptr(), shape, axes), - true); + runtime::reference::softmax(arg->get_data_ptr(), out->get_data_ptr(), shape, axes); + return true; } bool evaluate_softmax(const HostTensorPtr& arg, const HostTensorPtr& out, const AxisSet& axes) { auto shape = out->get_shape(); - return try_evaluate_softmax(arg, out, shape, axes) || - try_evaluate_softmax(arg, out, shape, axes) || - try_evaluate_softmax(arg, out, shape, axes); + bool rc = true; + + switch (arg->get_element_type()) + { + NGRAPH_TYPE_CASE(evaluate_softmax, bf16, arg, out, shape, axes); + NGRAPH_TYPE_CASE(evaluate_softmax, f16, arg, out, shape, axes); + NGRAPH_TYPE_CASE(evaluate_softmax, f32, arg, out, shape, axes); + NGRAPH_TYPE_CASE(evaluate_softmax, f64, arg, out, shape, axes); + default: rc = false; break; + } + return rc; } } @@ -95,7 +101,7 @@ shared_ptr op::v1::Softmax::clone_with_new_inputs(const OutputVector& new_ bool op::v1::Softmax::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::Softmax::evaluate"); - outputs[0]->set_unary(inputs[0]); - return evaluate_softmax(inputs[0], outputs[0], AxisSet{m_axis}); + NGRAPH_OP_SCOPE(v1_Softmax_evaluate, outputs[0]->set_unary(inputs[0]); + return evaluate_softmax(inputs[0], outputs[0], AxisSet{m_axis})); + return false; } diff --git a/ngraph/core/src/op/softplus.cpp b/ngraph/core/src/op/softplus.cpp index e8362f88198190..33deba5f81629a 100644 --- a/ngraph/core/src/op/softplus.cpp +++ b/ngraph/core/src/op/softplus.cpp @@ -65,12 +65,9 @@ namespace softplus switch (arg->get_element_type()) { - TYPE_CASE(bf16)(arg, out, count); - break; - TYPE_CASE(f16)(arg, out, count); - break; - TYPE_CASE(f32)(arg, out, count); - break; + NGRAPH_TYPE_CASE(evaluate_softplus, bf16, arg, out, count); + NGRAPH_TYPE_CASE(evaluate_softplus, f16, arg, out, count); + NGRAPH_TYPE_CASE(evaluate_softplus, f32, arg, out, count); default: rc = false; break; } return rc; @@ -80,6 +77,8 @@ namespace softplus bool op::v4::SoftPlus::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::SoftPlus::evaluate"); - return softplus::evaluate_softplus(inputs[0], outputs[0], shape_size(get_output_shape(0))); + NGRAPH_OP_SCOPE( + v4_SoftPlus_evaluate, + return softplus::evaluate_softplus(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + return false; } diff --git a/ngraph/core/src/op/space_to_batch.cpp b/ngraph/core/src/op/space_to_batch.cpp index c5aa1c583ac754..a3d63cd5642279 100644 --- a/ngraph/core/src/op/space_to_batch.cpp +++ b/ngraph/core/src/op/space_to_batch.cpp @@ -17,6 +17,7 @@ #include #include #include +#include "itt.hpp" #include "ngraph/builder/make_constant.hpp" #include "ngraph/node.hpp" @@ -140,8 +141,8 @@ bool ngraph::op::v1::SpaceToBatch::visit_attributes(ngraph::AttributeVisitor& vi return true; } -bool ngraph::op::v1::SpaceToBatch::evaluate(const HostTensorVector& outputs, - const HostTensorVector& inputs) const +bool ngraph::op::v1::SpaceToBatch::evaluate_space_to_batch(const HostTensorVector& outputs, + const HostTensorVector& inputs) const { const auto& data = inputs[0]; const auto& out = outputs[0]; @@ -267,4 +268,11 @@ bool ngraph::op::v1::SpaceToBatch::evaluate(const HostTensorVector& outputs, out->write(flat_data.data(), elem_size * shape_size(out->get_shape())); return true; -} \ No newline at end of file +} + +bool ngraph::op::v1::SpaceToBatch::evaluate(const HostTensorVector& outputs, + const HostTensorVector& inputs) const +{ + NGRAPH_OP_SCOPE(v1_SpaceToBatch, return evaluate_space_to_batch(outputs, inputs)); + return false; +} diff --git a/ngraph/core/src/op/space_to_depth.cpp b/ngraph/core/src/op/space_to_depth.cpp index 8ef7dc5d9ca4a8..460041daab3ee6 100644 --- a/ngraph/core/src/op/space_to_depth.cpp +++ b/ngraph/core/src/op/space_to_depth.cpp @@ -18,6 +18,7 @@ #include #include +#include "itt.hpp" #include "ngraph/attribute_visitor.hpp" #include "ngraph/builder/reshape.hpp" #include "ngraph/op/space_to_depth.hpp" @@ -109,8 +110,8 @@ void ngraph::op::v0::SpaceToDepth::validate_and_infer_types() } } -bool ngraph::op::v0::SpaceToDepth::evaluate(const HostTensorVector& outputs, - const HostTensorVector& inputs) const +bool ngraph::op::v0::SpaceToDepth::evaluate_space_to_depth(const HostTensorVector& outputs, + const HostTensorVector& inputs) const { const auto& data = inputs[0]; const auto& out = outputs[0]; @@ -174,7 +175,8 @@ bool ngraph::op::v0::SpaceToDepth::evaluate(const HostTensorVector& outputs, // x' = reshape(data, [N, C, D1/block_size, block_size, D2/block_size, block_size, ..., // DK/block_size, block_size]) // x'' = transpose(x', [0, 1, 3, 5, ..., K + (K + 1), 2, 4, ..., K + K]) - // y = reshape(x'', [N, C * (block_size ^ K), D1 / block_size, D2 / block_size, ..., DK / + // y = reshape(x'', [N, C * (block_size ^ K), D1 / block_size, D2 / block_size, ..., DK + // / // block_size]) case SpaceToDepthMode::DEPTH_FIRST: { @@ -184,7 +186,8 @@ bool ngraph::op::v0::SpaceToDepth::evaluate(const HostTensorVector& outputs, // x' = reshape(data, [N, C, D1/block_size, block_size, D2/block_size, block_size, ... , // DK/block_size, block_size]) // x'' = transpose(x', [0, 3, 5, ..., K + (K + 1), 1, 2, 4, ..., K + K]) - // y = reshape(x'', [N, C * (block_size ^ K), D1 / block_size, D2 / block_size, ..., DK / + // y = reshape(x'', [N, C * (block_size ^ K), D1 / block_size, D2 / block_size, ..., DK + // / // block_size]) case SpaceToDepthMode::BLOCKS_FIRST: default: { axes_order.insert(axes_order.begin() + spatial_dims + 1, 1); @@ -222,6 +225,12 @@ bool ngraph::op::v0::SpaceToDepth::evaluate(const HostTensorVector& outputs, elem_size); return true; } +bool ngraph::op::v0::SpaceToDepth::evaluate(const HostTensorVector& outputs, + const HostTensorVector& inputs) const +{ + NGRAPH_OP_SCOPE(v0_SpaceToDepth_evaluate, return evaluate_space_to_depth(outputs, inputs)); + return false; +} namespace ngraph { diff --git a/ngraph/core/src/op/split.cpp b/ngraph/core/src/op/split.cpp index e191bd9ba6b22f..603da1792780ae 100644 --- a/ngraph/core/src/op/split.cpp +++ b/ngraph/core/src/op/split.cpp @@ -15,6 +15,7 @@ //***************************************************************************** #include "ngraph/runtime/reference/split.hpp" #include +#include "itt.hpp" #include "ngraph/attribute_visitor.hpp" #include "ngraph/builder/split.hpp" #include "ngraph/op/constant.hpp" @@ -148,8 +149,7 @@ namespace split bool op::v1::Split::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - const auto& data = inputs[0]; - const auto& axis = inputs[1]; - - return split::evaluate_split(data, axis, outputs, m_num_splits, this); + NGRAPH_OP_SCOPE(v1_Split_evaluate, const auto& data = inputs[0]; const auto& axis = inputs[1]; + return split::evaluate_split(data, axis, outputs, m_num_splits, this)); + return false; } diff --git a/ngraph/core/src/op/sqrt.cpp b/ngraph/core/src/op/sqrt.cpp index 2cb1507ea6d5e4..cb6a8074af50b0 100644 --- a/ngraph/core/src/op/sqrt.cpp +++ b/ngraph/core/src/op/sqrt.cpp @@ -61,18 +61,12 @@ namespace sqrtop out->set_unary(arg0); switch (arg0->get_element_type()) { - TYPE_CASE(i32)(arg0, out, count); - break; - TYPE_CASE(i64)(arg0, out, count); - break; - TYPE_CASE(u32)(arg0, out, count); - break; - TYPE_CASE(u64)(arg0, out, count); - break; - TYPE_CASE(f16)(arg0, out, count); - break; - TYPE_CASE(f32)(arg0, out, count); - break; + NGRAPH_TYPE_CASE(evaluate_sqrt, i32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_sqrt, i64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_sqrt, u32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_sqrt, u64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_sqrt, f16, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_sqrt, f32, arg0, out, count); default: rc = false; break; } return rc; @@ -81,6 +75,8 @@ namespace sqrtop bool op::Sqrt::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::Sqrt::evaluate"); - return sqrtop::evaluate_sqrt(inputs[0], outputs[0], shape_size(get_output_shape(0))); + NGRAPH_OP_SCOPE( + v0_Sqrt_evaluate, + return sqrtop::evaluate_sqrt(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + return false; } diff --git a/ngraph/core/src/op/squeeze.cpp b/ngraph/core/src/op/squeeze.cpp index b3276ececfd6e1..a473efac7923b4 100644 --- a/ngraph/core/src/op/squeeze.cpp +++ b/ngraph/core/src/op/squeeze.cpp @@ -158,18 +158,12 @@ namespace squeeze bool rc = true; switch (element_type) { - TYPE_CASE(i32)(arg0, out); - break; - TYPE_CASE(i64)(arg0, out); - break; - TYPE_CASE(u32)(arg0, out); - break; - TYPE_CASE(u64)(arg0, out); - break; - TYPE_CASE(f16)(arg0, out); - break; - TYPE_CASE(f32)(arg0, out); - break; + NGRAPH_TYPE_CASE(evaluate_squeeze, i32, arg0, out); + NGRAPH_TYPE_CASE(evaluate_squeeze, i64, arg0, out); + NGRAPH_TYPE_CASE(evaluate_squeeze, u32, arg0, out); + NGRAPH_TYPE_CASE(evaluate_squeeze, u64, arg0, out); + NGRAPH_TYPE_CASE(evaluate_squeeze, f16, arg0, out); + NGRAPH_TYPE_CASE(evaluate_squeeze, f32, arg0, out); default: rc = false; break; } return rc; @@ -179,8 +173,9 @@ namespace squeeze bool op::v0::Squeeze::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v0::Squeeze::evaluate"); - return squeeze::evaluate_squeeze(inputs[0], inputs[1], outputs[0]); + NGRAPH_OP_SCOPE(v0_Squeeze_evaluate, + return squeeze::evaluate_squeeze(inputs[0], inputs[1], outputs[0])); + return false; } bool op::v0::Squeeze::constant_fold(OutputVector& output_values, const OutputVector& inputs_values) diff --git a/ngraph/core/src/op/strided_slice.cpp b/ngraph/core/src/op/strided_slice.cpp index 6823acfb09d095..8c3dbc79b46f89 100644 --- a/ngraph/core/src/op/strided_slice.cpp +++ b/ngraph/core/src/op/strided_slice.cpp @@ -281,15 +281,17 @@ namespace strided_slice bool op::v1::StridedSlice::evaluate(const HostTensorVector& output_values, const HostTensorVector& input_values) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::StridedSlice::evaluate"); - return strided_slice::evaluate_strided_slice(input_values[0], - input_values[1], - input_values[2], - input_values[3], - convert_mask_to_axis_set(get_begin_mask()), - convert_mask_to_axis_set(get_end_mask()), - convert_mask_to_axis_set(get_new_axis_mask()), - convert_mask_to_axis_set(get_shrink_axis_mask()), - convert_mask_to_axis_set(get_ellipsis_mask()), - output_values[0]); + NGRAPH_OP_SCOPE(v1_StridedSlice_evaluate, + return strided_slice::evaluate_strided_slice( + input_values[0], + input_values[1], + input_values[2], + input_values[3], + convert_mask_to_axis_set(get_begin_mask()), + convert_mask_to_axis_set(get_end_mask()), + convert_mask_to_axis_set(get_new_axis_mask()), + convert_mask_to_axis_set(get_shrink_axis_mask()), + convert_mask_to_axis_set(get_ellipsis_mask()), + output_values[0])); + return false; } diff --git a/ngraph/core/src/op/subtract.cpp b/ngraph/core/src/op/subtract.cpp index 39e2e46dbb5c3f..40d77e5590d671 100644 --- a/ngraph/core/src/op/subtract.cpp +++ b/ngraph/core/src/op/subtract.cpp @@ -49,20 +49,13 @@ namespace subtract out->set_broadcast(broadcast_spec, arg0, arg1); switch (arg0->get_element_type()) { - TYPE_CASE(i32)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(i64)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(u32)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(u64)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(f16)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(f32)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(bf16)(arg0, arg1, out, broadcast_spec); - break; + NGRAPH_TYPE_CASE(evaluate_subtract, i32, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_subtract, i64, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_subtract, u32, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_subtract, u64, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_subtract, f16, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_subtract, f32, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_subtract, bf16, arg0, arg1, out, broadcast_spec); default: rc = false; break; } return rc; @@ -90,6 +83,8 @@ shared_ptr op::v1::Subtract::clone_with_new_inputs(const OutputVector& new bool op::v1::Subtract::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::Subtract::evaluate"); - return subtract::evaluate_subtract(inputs[0], inputs[1], outputs[0], get_autob()); + NGRAPH_OP_SCOPE( + v1_Subtract_evaluate, + return subtract::evaluate_subtract(inputs[0], inputs[1], outputs[0], get_autob())); + return false; } diff --git a/ngraph/core/src/op/swish.cpp b/ngraph/core/src/op/swish.cpp index 5dba649c83273c..94f97a3198dd9d 100644 --- a/ngraph/core/src/op/swish.cpp +++ b/ngraph/core/src/op/swish.cpp @@ -15,6 +15,7 @@ //***************************************************************************** #include "ngraph/op/swish.hpp" +#include "itt.hpp" #include "ngraph/attribute_visitor.hpp" #include "ngraph/op/constant.hpp" @@ -107,20 +108,18 @@ namespace swish return true; } - bool evaluate_swish(const HostTensorPtr& arg0, - const HostTensorPtr& arg1, - const HostTensorPtr& out, - const size_t count) + bool + evaluate_swish(const HostTensorVector& inputs, const HostTensorPtr& out, const size_t count) { bool rc = true; + const HostTensorPtr arg0 = inputs[0]; + const HostTensorPtr arg1 = inputs.size() == 2 ? inputs[1] : nullptr; out->set_unary(arg0); switch (arg0->get_element_type()) { - TYPE_CASE(f16)(arg0, arg1, out, count); - break; - TYPE_CASE(f32)(arg0, arg1, out, count); - break; + NGRAPH_TYPE_CASE(evaluate_swish, f16, arg0, arg1, out, count); + NGRAPH_TYPE_CASE(evaluate_swish, f32, arg0, arg1, out, count); default: rc = false; break; } return rc; @@ -129,14 +128,8 @@ namespace swish bool op::v4::Swish::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - if (inputs.size() == 2) - { - return swish::evaluate_swish( - inputs[0], inputs[1], outputs[0], shape_size(get_output_shape(0))); - } - else - { - return swish::evaluate_swish( - inputs[0], nullptr, outputs[0], shape_size(get_output_shape(0))); - } + NGRAPH_OP_SCOPE( + v4_Swish_evaluate, + return swish::evaluate_swish(inputs, outputs[0], shape_size(get_output_shape(0)));); + return false; } diff --git a/ngraph/core/src/op/tan.cpp b/ngraph/core/src/op/tan.cpp index 455adb26b7cfd1..bc1f54f0d67121 100644 --- a/ngraph/core/src/op/tan.cpp +++ b/ngraph/core/src/op/tan.cpp @@ -63,20 +63,13 @@ namespace tanop switch (arg0->get_element_type()) { - TYPE_CASE(boolean)(arg0, out, count); - break; - TYPE_CASE(i32)(arg0, out, count); - break; - TYPE_CASE(i64)(arg0, out, count); - break; - TYPE_CASE(u32)(arg0, out, count); - break; - TYPE_CASE(u64)(arg0, out, count); - break; - TYPE_CASE(f16)(arg0, out, count); - break; - TYPE_CASE(f32)(arg0, out, count); - break; + NGRAPH_TYPE_CASE(evaluate_tan, boolean, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_tan, i32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_tan, i64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_tan, u32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_tan, u64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_tan, f16, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_tan, f32, arg0, out, count); default: rc = false; break; } return rc; @@ -85,6 +78,8 @@ namespace tanop bool op::Tan::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::Tan::evaluate"); - return tanop::evaluate_tan(inputs[0], outputs[0], shape_size(get_output_shape(0))); + NGRAPH_OP_SCOPE( + v0_Tan_evaluate, + return tanop::evaluate_tan(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + return false; } diff --git a/ngraph/core/src/op/tanh.cpp b/ngraph/core/src/op/tanh.cpp index ac7534b2689257..6ea3b7802aea4c 100644 --- a/ngraph/core/src/op/tanh.cpp +++ b/ngraph/core/src/op/tanh.cpp @@ -62,18 +62,12 @@ namespace tanhop switch (arg0->get_element_type()) { - TYPE_CASE(i32)(arg0, out, count); - break; - TYPE_CASE(i64)(arg0, out, count); - break; - TYPE_CASE(u32)(arg0, out, count); - break; - TYPE_CASE(u64)(arg0, out, count); - break; - TYPE_CASE(f16)(arg0, out, count); - break; - TYPE_CASE(f32)(arg0, out, count); - break; + NGRAPH_TYPE_CASE(evaluate_tanh, i32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_tanh, i64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_tanh, u32, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_tanh, u64, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_tanh, f16, arg0, out, count); + NGRAPH_TYPE_CASE(evaluate_tanh, f32, arg0, out, count); default: rc = false; break; } return rc; @@ -82,6 +76,8 @@ namespace tanhop bool op::Tanh::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::Tanh::evaluate"); - return tanhop::evaluate_tanh(inputs[0], outputs[0], shape_size(get_output_shape(0))); + NGRAPH_OP_SCOPE( + v0_Tanh_evaluate, + return tanhop::evaluate_tanh(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + return false; } diff --git a/ngraph/core/src/op/tile.cpp b/ngraph/core/src/op/tile.cpp index 7b8a67b7af50ef..2cdd47ddaef212 100644 --- a/ngraph/core/src/op/tile.cpp +++ b/ngraph/core/src/op/tile.cpp @@ -16,6 +16,7 @@ #include "ngraph/op/tile.hpp" +#include "itt.hpp" #include "ngraph/op/constant.hpp" #include "ngraph/runtime/reference/tile.hpp" @@ -95,7 +96,8 @@ shared_ptr op::v0::Tile::clone_with_new_inputs(const OutputVector& new_arg return make_shared(new_args.at(0), new_args.at(1)); } -bool op::v0::Tile::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const +bool op::v0::Tile::evaluate_tile(const HostTensorVector& outputs, + const HostTensorVector& inputs) const { const auto& data = inputs[0]; const auto& axis = inputs[1]; @@ -130,3 +132,9 @@ bool op::v0::Tile::evaluate(const HostTensorVector& outputs, const HostTensorVec return true; } + +bool op::v0::Tile::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const +{ + NGRAPH_OP_SCOPE(v0_Tile_evaluate, return evaluate_tile(outputs, inputs)); + return false; +} diff --git a/ngraph/core/src/op/topk.cpp b/ngraph/core/src/op/topk.cpp index 9a47674e57d31f..97163edca93c94 100644 --- a/ngraph/core/src/op/topk.cpp +++ b/ngraph/core/src/op/topk.cpp @@ -64,6 +64,14 @@ namespace topk return true; } +#define EXECUTE_EVALUATE_TOPK(a, ...) \ + case element::Type_t::a: \ + { \ + NGRAPH_OP_SCOPE(OV_CC_CAT3(exec_topk_eval, _, a), \ + rc = evaluate_execute(__VA_ARGS__)); \ + } \ + break + template bool evaluate(const HostTensorPtr& arg, const HostTensorPtr& out_indices, @@ -78,14 +86,8 @@ namespace topk bool rc = true; switch (index_et) { - case element::Type_t::i64: - evaluate_execute( - arg, out_indices, out_values, out_shape, axis, k, max, sort); - break; - case element::Type_t::i32: - evaluate_execute( - arg, out_indices, out_values, out_shape, axis, k, max, sort); - break; + EXECUTE_EVALUATE_TOPK(i32, arg, out_indices, out_values, out_shape, axis, k, max, sort); + EXECUTE_EVALUATE_TOPK(i64, arg, out_indices, out_values, out_shape, axis, k, max, sort); default: rc = false; break; } return rc; @@ -104,18 +106,72 @@ namespace topk bool rc = true; switch (arg->get_element_type()) { - TYPE_CASE(i32)(arg, out_indices, out_values, out_shape, axis, k, max, sort, index_et); - break; - TYPE_CASE(i64)(arg, out_indices, out_values, out_shape, axis, k, max, sort, index_et); - break; - TYPE_CASE(u32)(arg, out_indices, out_values, out_shape, axis, k, max, sort, index_et); - break; - TYPE_CASE(u64)(arg, out_indices, out_values, out_shape, axis, k, max, sort, index_et); - break; - TYPE_CASE(f16)(arg, out_indices, out_values, out_shape, axis, k, max, sort, index_et); - break; - TYPE_CASE(f32)(arg, out_indices, out_values, out_shape, axis, k, max, sort, index_et); - break; + NGRAPH_TYPE_CASE(evaluate_topk, + i32, + arg, + out_indices, + out_values, + out_shape, + axis, + k, + max, + sort, + index_et); + NGRAPH_TYPE_CASE(evaluate_topk, + i64, + arg, + out_indices, + out_values, + out_shape, + axis, + k, + max, + sort, + index_et); + NGRAPH_TYPE_CASE(evaluate_topk, + u32, + arg, + out_indices, + out_values, + out_shape, + axis, + k, + max, + sort, + index_et); + NGRAPH_TYPE_CASE(evaluate_topk, + u64, + arg, + out_indices, + out_values, + out_shape, + axis, + k, + max, + sort, + index_et); + NGRAPH_TYPE_CASE(evaluate_topk, + f16, + arg, + out_indices, + out_values, + out_shape, + axis, + k, + max, + sort, + index_et); + NGRAPH_TYPE_CASE(evaluate_topk, + f32, + arg, + out_indices, + out_values, + out_shape, + axis, + k, + max, + sort, + index_et); default: rc = false; break; } return rc; @@ -130,30 +186,27 @@ namespace topk return k; } -#define CASE_GET_K(a) \ - case element::Type_t::a: k = get_k_from_hosttensor +#define CASE_GET_K(a, ...) \ + case element::Type_t::a: \ + { \ + NGRAPH_OP_SCOPE(OV_CC_CAT3(topk_get_k, _, a), \ + k = get_k_from_hosttensor(__VA_ARGS__)); \ + } \ + break size_t read_k_from_host_tensor(const HostTensorPtr& arg_k) { size_t k = 0; switch (arg_k->get_element_type()) { - CASE_GET_K(i8)(arg_k); - break; - CASE_GET_K(i16)(arg_k); - break; - CASE_GET_K(i32)(arg_k); - break; - CASE_GET_K(i64)(arg_k); - break; - CASE_GET_K(u8)(arg_k); - break; - CASE_GET_K(u16)(arg_k); - break; - CASE_GET_K(u32)(arg_k); - break; - CASE_GET_K(u64)(arg_k); - break; + CASE_GET_K(i8, arg_k); + CASE_GET_K(i16, arg_k); + CASE_GET_K(i32, arg_k); + CASE_GET_K(i64, arg_k); + CASE_GET_K(u8, arg_k); + CASE_GET_K(u16, arg_k); + CASE_GET_K(u32, arg_k); + CASE_GET_K(u64, arg_k); default: // other types are not supported and would have thrown in ctor ngraph_error("read_k_from_host_tensor: type is not integral\n"); @@ -330,10 +383,6 @@ size_t op::v1::TopK::read_k_from_constant_node(const shared_ptr& node, size_t k = 0; -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wswitch-enum" -#endif switch (static_cast(k_element_type)) { case element::Type_t::i8: k = validate_and_get_k(k_constant); break; @@ -341,9 +390,6 @@ size_t op::v1::TopK::read_k_from_constant_node(const shared_ptr& node, case element::Type_t::i64: k = validate_and_get_k(k_constant); break; default: break; } -#if defined(__clang__) -#pragma clang diagnostic pop -#endif return k; } @@ -403,10 +449,9 @@ void op::v1::TopK::set_k(size_t k) op::Constant::create(element::i64, Shape{}, {k})->output(0)); } -bool op::v1::TopK::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const +bool op::v1::TopK::evaluate_topk(const HostTensorVector& outputs, + const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::TopK::evaluate"); - Shape arg_shape = inputs[0]->get_shape(); // 1. get axis, mode ( max/min), sort_type size_t axis = ngraph::normalize_axis(this, m_axis, arg_shape.size()); @@ -447,6 +492,12 @@ bool op::v1::TopK::evaluate(const HostTensorVector& outputs, const HostTensorVec get_index_element_type()); } +bool op::v1::TopK::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const +{ + NGRAPH_OP_SCOPE(v1_TopK_evaluate, return evaluate_topk(outputs, inputs)); + return false; +} + // v3 version starts constexpr NodeTypeInfo op::v3::TopK::type_info; @@ -497,10 +548,6 @@ size_t op::v3::TopK::read_k_from_constant_node(const shared_ptr& node, size_t k = 0; -#if defined(__clang__) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wswitch-enum" -#endif switch (static_cast(k_element_type)) { case element::Type_t::i8: k = validate_and_get_k(k_constant); break; @@ -513,9 +560,6 @@ size_t op::v3::TopK::read_k_from_constant_node(const shared_ptr& node, case element::Type_t::u64: k = validate_and_get_k(k_constant); break; default: break; } -#if defined(__clang__) -#pragma clang diagnostic pop -#endif return k; } @@ -533,6 +577,6 @@ shared_ptr op::v3::TopK::clone_with_new_inputs(const OutputVector& new_arg bool op::v3::TopK::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v3::TopK::evaluate"); - return op::v1::TopK::evaluate(outputs, inputs); + NGRAPH_OP_SCOPE(v3_TopK_evaluate, return op::v1::TopK::evaluate(outputs, inputs)); + return false; } diff --git a/ngraph/core/src/op/transpose.cpp b/ngraph/core/src/op/transpose.cpp index 70c9675de2dc01..c0f1441138fea4 100644 --- a/ngraph/core/src/op/transpose.cpp +++ b/ngraph/core/src/op/transpose.cpp @@ -144,6 +144,8 @@ namespace transpose bool op::v1::Transpose::evaluate(const HostTensorVector& output_values, const HostTensorVector& input_values) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::Transpose::evaluate"); - return transpose::evaluate_transpose(input_values[0], input_values[1], output_values[0]); + NGRAPH_OP_SCOPE( + v1_Transpose_evaluate, + return transpose::evaluate_transpose(input_values[0], input_values[1], output_values[0])); + return false; } diff --git a/ngraph/core/src/op/unsqueeze.cpp b/ngraph/core/src/op/unsqueeze.cpp index bb2fb3aa51ffef..c98647e4cdd333 100644 --- a/ngraph/core/src/op/unsqueeze.cpp +++ b/ngraph/core/src/op/unsqueeze.cpp @@ -135,18 +135,12 @@ namespace unsqueeze bool rc = true; switch (element_type) { - TYPE_CASE(i32)(arg0, out); - break; - TYPE_CASE(i64)(arg0, out); - break; - TYPE_CASE(u32)(arg0, out); - break; - TYPE_CASE(u64)(arg0, out); - break; - TYPE_CASE(f16)(arg0, out); - break; - TYPE_CASE(f32)(arg0, out); - break; + NGRAPH_TYPE_CASE(evaluate_unsqueeze, i32, arg0, out); + NGRAPH_TYPE_CASE(evaluate_unsqueeze, i64, arg0, out); + NGRAPH_TYPE_CASE(evaluate_unsqueeze, u32, arg0, out); + NGRAPH_TYPE_CASE(evaluate_unsqueeze, u64, arg0, out); + NGRAPH_TYPE_CASE(evaluate_unsqueeze, f16, arg0, out); + NGRAPH_TYPE_CASE(evaluate_unsqueeze, f32, arg0, out); default: rc = false; break; } return rc; @@ -156,8 +150,9 @@ namespace unsqueeze bool op::v0::Unsqueeze::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v0::Unsqueeze::evaluate"); - return unsqueeze::evaluate_unsqueeze(inputs[0], inputs[1], outputs[0]); + NGRAPH_OP_SCOPE(v0_Unsqueeze_evaluate, + return unsqueeze::evaluate_unsqueeze(inputs[0], inputs[1], outputs[0])); + return false; } bool op::v0::Unsqueeze::constant_fold(OutputVector& output_values, diff --git a/ngraph/core/src/op/util/broadcast_base.cpp b/ngraph/core/src/op/util/broadcast_base.cpp index c42f5b145012cd..77c6136d4b9de1 100644 --- a/ngraph/core/src/op/util/broadcast_base.cpp +++ b/ngraph/core/src/op/util/broadcast_base.cpp @@ -361,14 +361,15 @@ bool op::util::BroadcastBase::evaluate(const HostTensorPtr& arg0, const HostTensorPtr& out, const AxisSet& broadcast_axes) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::util::BroadcastBase::evaluate"); - runtime::reference::broadcast(arg0->get_data_ptr(), - out->get_data_ptr(), - arg0->get_shape(), - out->get_shape(), - broadcast_axes, - arg0->get_element_type().size()); - return true; + NGRAPH_OP_SCOPE(util_BroadcastBase_evaluate_axes, + runtime::reference::broadcast(arg0->get_data_ptr(), + out->get_data_ptr(), + arg0->get_shape(), + out->get_shape(), + broadcast_axes, + arg0->get_element_type().size()); + return true); + return false; } namespace @@ -499,49 +500,41 @@ Shape op::util::BroadcastBase::get_target_shape(const HostTensorPtr& input1) con bool op::util::BroadcastBase::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::util::BroadcastBase::evaluate"); - - Shape target_shape = get_target_shape(inputs[1]); - - PartialShape result_shape; - std::pair pair_broadcast_axes; - auto arg_shape = inputs[0]->get_shape(); - - if (m_mode.m_type == BroadcastType::NONE) - { - AxisVector axes_mapping_val; - const auto axes_mapping_constant = - as_type_ptr(input_value(2).get_node_shared_ptr()); - if (axes_mapping_constant) - { - axes_mapping_val = axes_mapping_constant->get_axis_vector_val(); - } - else - { - // read from HT and save as AxisVector - get_axis_vector_from_ht(inputs[2], axes_mapping_val, arg_shape); - } - pair_broadcast_axes = get_broadcast_axes_none(axes_mapping_val, target_shape.size()); - validate_target_shape_none(inputs[0]->get_shape(), axes_mapping_val, target_shape); - result_shape = target_shape; - } - else if (m_mode.m_type == BroadcastType::PDPD) - { - result_shape = get_result_shape_pdpd(arg_shape, target_shape, m_mode); - pair_broadcast_axes = - get_broadcast_axes_numpy_pdpd(arg_shape, result_shape.to_shape(), m_mode); - } - else if (m_mode.m_type == BroadcastType::NUMPY) - { - result_shape = target_shape; - validate_target_shape_numpy(arg_shape, target_shape); - pair_broadcast_axes = - get_broadcast_axes_numpy_pdpd(arg_shape, result_shape.to_shape(), m_mode); - } - else - { - ngraph_error("Unsupported BroadcastType "); - } - - return evaluate_broadcast(inputs[0], outputs[0], pair_broadcast_axes, result_shape.to_shape()); + NGRAPH_OP_SCOPE( + util_BroadcastBase_evaluate, Shape target_shape = get_target_shape(inputs[1]); + + PartialShape result_shape; + std::pair pair_broadcast_axes; + auto arg_shape = inputs[0]->get_shape(); + + if (m_mode.m_type == BroadcastType::NONE) { + AxisVector axes_mapping_val; + const auto axes_mapping_constant = + as_type_ptr(input_value(2).get_node_shared_ptr()); + if (axes_mapping_constant) + { + axes_mapping_val = axes_mapping_constant->get_axis_vector_val(); + } + else + { + // read from HT and save as AxisVector + get_axis_vector_from_ht(inputs[2], axes_mapping_val, arg_shape); + } + pair_broadcast_axes = get_broadcast_axes_none(axes_mapping_val, target_shape.size()); + validate_target_shape_none(inputs[0]->get_shape(), axes_mapping_val, target_shape); + result_shape = target_shape; + } else if (m_mode.m_type == BroadcastType::PDPD) { + result_shape = get_result_shape_pdpd(arg_shape, target_shape, m_mode); + pair_broadcast_axes = + get_broadcast_axes_numpy_pdpd(arg_shape, result_shape.to_shape(), m_mode); + } else if (m_mode.m_type == BroadcastType::NUMPY) { + result_shape = target_shape; + validate_target_shape_numpy(arg_shape, target_shape); + pair_broadcast_axes = + get_broadcast_axes_numpy_pdpd(arg_shape, result_shape.to_shape(), m_mode); + } else { ngraph_error("Unsupported BroadcastType "); } + + return evaluate_broadcast( + inputs[0], outputs[0], pair_broadcast_axes, result_shape.to_shape())); + return false; } diff --git a/ngraph/core/src/op/variadic_split.cpp b/ngraph/core/src/op/variadic_split.cpp index d97522567ca9fa..d7c99acedc634a 100644 --- a/ngraph/core/src/op/variadic_split.cpp +++ b/ngraph/core/src/op/variadic_split.cpp @@ -16,6 +16,7 @@ #include +#include "itt.hpp" #include "ngraph/op/constant.hpp" #include "ngraph/op/util/op_types.hpp" #include "ngraph/op/variadic_split.hpp" @@ -164,61 +165,57 @@ namespace variadic_split return true; } +} - bool evaluate_variadic_split(const HostTensorPtr& data_tensor, - const HostTensorPtr& axis_tensor, - const HostTensorPtr& split_lengths_tensor, - const HostTensorVector& outputs, - const Node* split_node) - { - NGRAPH_CHECK(axis_tensor->get_element_type().is_integral_number(), - "axis element type is not integral data type"); - - int64_t axis = host_tensor_2_vector(axis_tensor)[0]; +bool op::v1::VariadicSplit::evaluate_variadic_split(const HostTensorVector& inputs, + const HostTensorVector& outputs) const +{ + const auto& data_tensor = inputs[0]; + const auto& axis_tensor = inputs[1]; + const auto& split_lengths_tensor = inputs[2]; + NGRAPH_CHECK(axis_tensor->get_element_type().is_integral_number(), + "axis element type is not integral data type"); - axis = ngraph::normalize_axis(split_node, axis, data_tensor->get_partial_shape().rank()); + int64_t axis = host_tensor_2_vector(axis_tensor)[0]; - NGRAPH_CHECK(split_lengths_tensor->get_element_type().is_integral_number(), - "axis element type is not integral data type"); + axis = ngraph::normalize_axis(this, axis, data_tensor->get_partial_shape().rank()); - std::vector split_lengths = host_tensor_2_vector(split_lengths_tensor); + NGRAPH_CHECK(split_lengths_tensor->get_element_type().is_integral_number(), + "axis element type is not integral data type"); - const auto data_shape = data_tensor->get_shape(); - const auto neg_one = std::find(std::begin(split_lengths), std::end(split_lengths), -1); - if (neg_one != std::end(split_lengths)) // negative length set - { - const auto sum_of_known_splits = - std::accumulate(std::begin(split_lengths), std::end(split_lengths), 0) + 1; - split_lengths[std::distance(std::begin(split_lengths), neg_one)] = - data_shape[axis] - sum_of_known_splits; - } + std::vector split_lengths = host_tensor_2_vector(split_lengths_tensor); - Shape output_shape = data_shape; - std::vector lower_bounds(data_shape.size(), 0); - std::vector upper_bounds = data_shape; - upper_bounds.at(axis) = split_lengths[0]; + const auto data_shape = data_tensor->get_shape(); + const auto neg_one = std::find(std::begin(split_lengths), std::end(split_lengths), -1); + if (neg_one != std::end(split_lengths)) // negative length set + { + const auto sum_of_known_splits = + std::accumulate(std::begin(split_lengths), std::end(split_lengths), 0) + 1; + split_lengths[std::distance(std::begin(split_lengths), neg_one)] = + data_shape[axis] - sum_of_known_splits; + } - int64_t split_pos = 0; - for (const auto& output : outputs) - { - output_shape.at(axis) = split_lengths[split_pos++]; - output->set_shape(output_shape); - evaluate(data_tensor, output, lower_bounds, upper_bounds); - lower_bounds.at(axis) = upper_bounds.at(axis); - if (split_pos < split_lengths.size()) - upper_bounds.at(axis) += split_lengths[split_pos]; - } + Shape output_shape = data_shape; + std::vector lower_bounds(data_shape.size(), 0); + std::vector upper_bounds = data_shape; + upper_bounds.at(axis) = split_lengths[0]; - return true; + int64_t split_pos = 0; + for (const auto& output : outputs) + { + output_shape.at(axis) = split_lengths[split_pos++]; + output->set_shape(output_shape); + variadic_split::evaluate(data_tensor, output, lower_bounds, upper_bounds); + lower_bounds.at(axis) = upper_bounds.at(axis); + if (split_pos < split_lengths.size()) + upper_bounds.at(axis) += split_lengths[split_pos]; } -} + return true; +} bool op::v1::VariadicSplit::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - const auto& data = inputs[0]; - const auto& axis = inputs[1]; - const auto& split_lengths = inputs[2]; - - return variadic_split::evaluate_variadic_split(data, axis, split_lengths, outputs, this); + NGRAPH_OP_SCOPE(v1_VariadicSplit_evaluate, return evaluate_variadic_split(inputs, outputs)); + return false; } diff --git a/ngraph/core/src/op/xor.cpp b/ngraph/core/src/op/xor.cpp index cafc230bbf0323..bbf660d6735834 100644 --- a/ngraph/core/src/op/xor.cpp +++ b/ngraph/core/src/op/xor.cpp @@ -70,20 +70,13 @@ namespace logxor out->set_broadcast(broadcast_spec, arg0, arg1); switch (arg0->get_element_type()) { - TYPE_CASE(boolean)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(i32)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(i64)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(u32)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(u64)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(f16)(arg0, arg1, out, broadcast_spec); - break; - TYPE_CASE(f32)(arg0, arg1, out, broadcast_spec); - break; + NGRAPH_TYPE_CASE(evaluate_logxor, boolean, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_logxor, i32, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_logxor, i64, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_logxor, u32, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_logxor, u64, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_logxor, f16, arg0, arg1, out, broadcast_spec); + NGRAPH_TYPE_CASE(evaluate_logxor, f32, arg0, arg1, out, broadcast_spec); default: rc = false; break; } return rc; @@ -93,8 +86,9 @@ namespace logxor bool op::v1::LogicalXor::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v1::LogicalXor::evaluate"); - return logxor::evaluate_logxor(inputs[0], inputs[1], outputs[0], get_autob()); + NGRAPH_OP_SCOPE(v1_LogicalXor_evaluate, + return logxor::evaluate_logxor(inputs[0], inputs[1], outputs[0], get_autob())); + return false; } constexpr NodeTypeInfo op::v0::Xor::type_info; @@ -115,6 +109,7 @@ shared_ptr op::v0::Xor::clone_with_new_inputs(const OutputVector& new_args bool op::v0::Xor::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - OV_ITT_SCOPED_TASK(itt::domains::nGraphOp, "op::v0::Xor::evaluate"); - return logxor::evaluate_logxor(inputs[0], inputs[1], outputs[0], get_autob()); + NGRAPH_OP_SCOPE(v0_Xor_evaluate, + return logxor::evaluate_logxor(inputs[0], inputs[1], outputs[0], get_autob())); + return false; } From 935549035e61da951f451c4035bc22e7a592d437 Mon Sep 17 00:00:00 2001 From: George Zlobin Date: Mon, 21 Dec 2020 15:21:19 +0300 Subject: [PATCH 106/244] [IE][VPU]: Shape compression (#3500) * This change prevents saving the same shapes in a blob. If more than one data have the same shapes, only one will be saved in the blob. --- .../include/vpu/middleend/allocator/allocator.hpp | 2 ++ .../include/vpu/model/data_desc.hpp | 4 ++-- .../src/middleend/allocator/allocator.cpp | 14 ++++++++++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/inference-engine/src/vpu/graph_transformer/include/vpu/middleend/allocator/allocator.hpp b/inference-engine/src/vpu/graph_transformer/include/vpu/middleend/allocator/allocator.hpp index 359ea80e248034..0b4afd90ee6502 100644 --- a/inference-engine/src/vpu/graph_transformer/include/vpu/middleend/allocator/allocator.hpp +++ b/inference-engine/src/vpu/graph_transformer/include/vpu/middleend/allocator/allocator.hpp @@ -126,6 +126,8 @@ class Allocator final { DataMap _memChunksPerData; + std::map, int> _staticShapeOffsets; + int _blobMemOffset = 0; int _inputMemOffset = 0; int _outputMemOffset = 0; diff --git a/inference-engine/src/vpu/graph_transformer/include/vpu/model/data_desc.hpp b/inference-engine/src/vpu/graph_transformer/include/vpu/model/data_desc.hpp index f200a16d73ef16..f713faecb0c73f 100644 --- a/inference-engine/src/vpu/graph_transformer/include/vpu/model/data_desc.hpp +++ b/inference-engine/src/vpu/graph_transformer/include/vpu/model/data_desc.hpp @@ -338,8 +338,8 @@ class DimValues_ final { if (_flags[ind] != other._flags[ind]) { return !_flags[ind]; } - if (_flags[ind] && _values[ind].second < other._values[ind].second) { - return true; + if (_flags[ind] && _values[ind].second != other._values[ind].second) { + return _values[ind].second < other._values[ind].second; } } return false; diff --git a/inference-engine/src/vpu/graph_transformer/src/middleend/allocator/allocator.cpp b/inference-engine/src/vpu/graph_transformer/src/middleend/allocator/allocator.cpp index 4ac2a762c8a131..12f86885665f5e 100644 --- a/inference-engine/src/vpu/graph_transformer/src/middleend/allocator/allocator.cpp +++ b/inference-engine/src/vpu/graph_transformer/src/middleend/allocator/allocator.cpp @@ -316,8 +316,18 @@ ShapeLocation Allocator::allocateShape(const Data& data) { } else { // Static allocation shapeLocation.dimsLocation = Location::Blob; - shapeLocation.dimsOffset = _blobMemOffset; - _blobMemOffset += dimsByteSize; + + // Prevent allocation of same shapes multiple times + auto dimOrder = data->desc().dimsOrder().toPermutation(); + auto dimValues = data->desc().dims(); + auto itr = _staticShapeOffsets.find({dimOrder, dimValues}); + if (itr != _staticShapeOffsets.end()) { + shapeLocation.dimsOffset = itr->second; + } else { + shapeLocation.dimsOffset = _blobMemOffset; + _blobMemOffset += dimsByteSize; + _staticShapeOffsets.insert({{dimOrder, dimValues}, shapeLocation.dimsOffset}); + } } From d2a23680f227aefd4f14f693bf9a759166535441 Mon Sep 17 00:00:00 2001 From: Pavel Esir Date: Mon, 21 Dec 2020 15:45:15 +0300 Subject: [PATCH 107/244] nGraph 'shell' implementation for GatherElements-6 and MO 'shell' implementation (#3467) * Initial support of GatherElements in MO and nGraph * apply_style * added lost extractor for GatherElements * Corrected GatherElements::validate_and_infer_types * updated package_BOM.txt * Type_t added * started to implement ngraph shape_type_infer unit-tests * finally implemented all ngraph shape_inference unit-tests * updated Supported_Frameworks_Layers.md * added correct handling of dynamic shapes in nGraph, added unit-tests for dynamic cases, fixed dump typos in MO, replaced axis type from int -> int64_t * implemented shape infer for dynamic shapes with intervals * finalized MO implementation * applied comment from review * style-apply * spec correction * removed conflict * fixed typos * removed obsolete comments form type_prop * significant corrections in validate_and_infer_types * style-apply * data_rank check for axis --- .../Supported_Frameworks_Layers.md | 1 + docs/ops/movement/GatherElements_6.md | 76 ++--- model-optimizer/automation/package_BOM.txt | 2 + .../front/onnx/gatherelements_ext.py | 32 ++ .../extensions/ops/gatherelements.py | 75 ++++ .../extensions/ops/gatherelements_test.py | 115 +++++++ .../include/ngraph/op/gather_elements.hpp | 55 +++ ngraph/core/include/ngraph/ops.hpp | 1 + .../core/include/ngraph/opsets/opset6_tbl.hpp | 1 + ngraph/core/src/op/gather_elements.cpp | 131 +++++++ ngraph/test/CMakeLists.txt | 1 + ngraph/test/type_prop/gather_elements.cpp | 320 ++++++++++++++++++ 12 files changed, 772 insertions(+), 38 deletions(-) create mode 100644 model-optimizer/extensions/front/onnx/gatherelements_ext.py create mode 100644 model-optimizer/extensions/ops/gatherelements.py create mode 100644 model-optimizer/extensions/ops/gatherelements_test.py create mode 100644 ngraph/core/include/ngraph/op/gather_elements.hpp create mode 100644 ngraph/core/src/op/gather_elements.cpp create mode 100644 ngraph/test/type_prop/gather_elements.cpp diff --git a/docs/MO_DG/prepare_model/Supported_Frameworks_Layers.md b/docs/MO_DG/prepare_model/Supported_Frameworks_Layers.md index c5c6402eaf0bed..2811f1c2586540 100644 --- a/docs/MO_DG/prepare_model/Supported_Frameworks_Layers.md +++ b/docs/MO_DG/prepare_model/Supported_Frameworks_Layers.md @@ -338,6 +338,7 @@ Standard ONNX\* operators: | Floor | No | | GRU | No | | Gather | No | +| GatherElements | Doesn't work with negative indices | | GatherND | No | | GatherTree | No | | Gemm | No | diff --git a/docs/ops/movement/GatherElements_6.md b/docs/ops/movement/GatherElements_6.md index 129f20f7b234b2..eb8ddd2a067a19 100644 --- a/docs/ops/movement/GatherElements_6.md +++ b/docs/ops/movement/GatherElements_6.md @@ -20,53 +20,53 @@ For instance, in the 3D case (`r = 3`), the output is determined by the followin ``` Example 1 with concrete values: ``` - data = [ - [1, 2], - [3, 4], - ] - indices = [ - [0, 1], - [0, 0], - ] - axis = 0 - output = [ - [1, 4], - [1, 2], - ] +data = [ + [1, 2], + [3, 4], +] +indices = [ + [0, 1], + [0, 0], +] +axis = 0 +output = [ + [1, 4], + [1, 2], +] ``` Example 2 with `axis` = 1 and `indices` having greater (than `data`) shape: ``` data = [ - [1, 7], - [4, 3], - ] - indices = [ - [1, 1, 0], - [1, 0, 1], - ] - axis = 1 - output = [ - [7, 7, 1], - [3, 4, 3], - ] + [1, 7], + [4, 3], +] +indices = [ + [1, 1, 0], + [1, 0, 1], +] +axis = 1 +output = [ + [7, 7, 1], + [3, 4, 3], +] ``` Example 3 `indices` has lesser (than `data`) shape: ``` data = [ - [1, 2, 3], - [4, 5, 6], - [7, 8, 9], - ] - indices = [ - [1, 0, 1], - [1, 2, 0], - ] - axis = 0 - output = [ - [4, 2, 6], - [4, 8, 3], - ] + [1, 2, 3], + [4, 5, 6], + [7, 8, 9], +] +indices = [ + [1, 0, 1], + [1, 2, 0], +] +axis = 0 +output = [ + [4, 2, 6], + [4, 8, 3], +] ``` **Attributes**: diff --git a/model-optimizer/automation/package_BOM.txt b/model-optimizer/automation/package_BOM.txt index 01b755e3c2be9f..081e719a8c6870 100644 --- a/model-optimizer/automation/package_BOM.txt +++ b/model-optimizer/automation/package_BOM.txt @@ -263,6 +263,7 @@ extensions/front/onnx/flatten_ext.py extensions/front/onnx/flattenONNX_to_reshape.py extensions/front/onnx/fused_bn_ext.py extensions/front/onnx/gather_ext.py +extensions/front/onnx/gatherelements_ext.py extensions/front/onnx/gathernd_ext.py extensions/front/onnx/gemm_ext.py extensions/front/onnx/group_norm_ext.py @@ -635,6 +636,7 @@ extensions/ops/ExtractImagePatches.py extensions/ops/fake_output.py extensions/ops/fakequantize.py extensions/ops/gather.py +extensions/ops/gatherelements.py extensions/ops/gathernd.py extensions/ops/GatherTree.py extensions/ops/gelu.py diff --git a/model-optimizer/extensions/front/onnx/gatherelements_ext.py b/model-optimizer/extensions/front/onnx/gatherelements_ext.py new file mode 100644 index 00000000000000..32f705f331a751 --- /dev/null +++ b/model-optimizer/extensions/front/onnx/gatherelements_ext.py @@ -0,0 +1,32 @@ +""" + Copyright (C) 2017-2020 Intel Corporation + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + +from extensions.ops.gatherelements import GatherElements +from mo.front.extractor import FrontExtractorOp +from mo.front.onnx.extractors.utils import onnx_attr + + +class GatherElementsFrontExtractor(FrontExtractorOp): + op = 'GatherElements' + enabled = True + + @classmethod + def extract(cls, node): + attrs = { + 'axis': onnx_attr(node, 'axis', 'i', default=0) + } + GatherElements.update_node_stat(node, attrs) + return cls.enabled diff --git a/model-optimizer/extensions/ops/gatherelements.py b/model-optimizer/extensions/ops/gatherelements.py new file mode 100644 index 00000000000000..116977e9e0626a --- /dev/null +++ b/model-optimizer/extensions/ops/gatherelements.py @@ -0,0 +1,75 @@ +""" + Copyright (C) 2017-2020 Intel Corporation + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + +import numpy as np + +from mo.graph.graph import Node, Graph +from mo.ops.op import Op, PermuteAttrs + + +class GatherElements(Op): + op = 'GatherElements' + + def __init__(self, graph: Graph, attrs: dict): + super().__init__(graph, { + 'op': self.op, + 'type': self.op, + 'version': 'opset6', + 'infer': self.infer, + 'in_ports_count': 2, + 'out_ports_count': 1, + 'axis': 0, + }, attrs) + + def backend_attrs(self): + return ['axis'] + + @staticmethod + def infer(node: Node): + data_shape = node.in_port(0).data.get_shape() + indices_shape = node.in_port(1).data.get_shape() + axis = node.axis + data_rank = len(data_shape) + + assert data_rank >= 1, 'data_rank must be >= 1' + assert data_rank == len(indices_shape), 'data and indices inputs for node {} must be of the ' \ + 'same rank. Instead got {} and {}'.\ + format(node.name, data_rank, len(indices_shape)) + assert -data_rank <= axis < data_rank, 'axis for node {0} must be within interval ' \ + '[-{1}}, {1} - 1]. Instead got: axis={2}'.\ + format(node.name, data_rank, axis) + if axis < 0: + axis += data_rank + + for idx, (data_sz, ind_sz) in enumerate(zip(data_shape, indices_shape)): + if idx != axis and data_sz != ind_sz: + raise ValueError('Sizes along axis {} for node {} do not match. data and indices must have ' + 'equal size along all axes except for axis {}'.format(idx, node.name, axis)) + + data = node.in_port(0).data.get_value() + indices = node.in_port(1).data.get_value() + + if data is not None and indices is not None: + out_value = np.empty(indices_shape, dtype=data.dtype) + for idx in np.ndindex(*indices_shape): + data_idx = list(idx) + data_idx[node.axis] = indices[idx] + out_value[idx] = data[tuple(data_idx)] + node.out_port(0).data.set_value(out_value) + else: + node.out_port(0).data.set_shape(indices_shape) + + PermuteAttrs.create_permute_attrs(node, attrs=[('axis', 'input:0')]) diff --git a/model-optimizer/extensions/ops/gatherelements_test.py b/model-optimizer/extensions/ops/gatherelements_test.py new file mode 100644 index 00000000000000..51c6de0a10ba6e --- /dev/null +++ b/model-optimizer/extensions/ops/gatherelements_test.py @@ -0,0 +1,115 @@ +""" + Copyright (C) 2017-2020 Intel Corporation + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +""" + +import unittest + +import numpy as np +from generator import generator, generate + +from extensions.ops.gatherelements import GatherElements +from mo.front.common.partial_infer.utils import int64_array +from mo.graph.graph import Node +from mo.utils.unittest.graph import build_graph, regular_op_with_empty_data, result, connect, \ + valued_const_with_data + + +@generator +class GatherElementsInferTest(unittest.TestCase): + @generate(*[ + ([[1, 2], + [3, 4]], + [[0, 1], + [0, 0]], + 0, # axis + [[1, 4], # ref_res + [1, 2]]), + + ([[1, 2], + [3, 4]], + [[0, 1], + [0, 0]], + 1, # axis + [[1, 2], # ref_res + [3, 3]]), + + ([[1, 2, 3], + [4, 5, 6], + [7, 8, 9]], + [[1, 2, 0], + [2, 0, 0]], + 0, # axis + [[4, 8, 3], # ref_res + [7, 2, 3]]), + + ([[1, 2], + [3, 4]], + [[0, 1], + [0, 0]], + -1, # axis + [[1, 2], # ref_res + [3, 3]]), + + ([ # 3D case + [[1, 2], + [3, 4]], + [[5, 6], + [7, 8]], + [[9, 10], + [11, 12]] + ], + [ + [[1, 0], + [0, 1]], + [[1, 1], + [1, 0]], + [[0, 0], + [1, 1]] + ], + -1, # axis + [ + [[2, 1], + [3, 4]], + [[6, 6], + [8, 7]], + [[9, 9], + [12, 12]] + ]), + ]) + + def test_gatherelements_value_infer(self, data, indices, axis, ref_res): + nodes = { + **valued_const_with_data('data', int64_array(data)), + **valued_const_with_data('indices', int64_array(indices)), + **regular_op_with_empty_data('gather_elements', {'op': 'GatherElements', 'axis': axis}), + **result() + } + + graph = build_graph(nodes_attrs=nodes, edges=[ + *connect('data', '0:gather_elements'), + *connect('indices', '1:gather_elements'), + *connect('gather_elements', 'output') + ], nodes_with_edges_only=True) + graph.stage = 'middle' + + gather_el_node = Node(graph, 'gather_elements') + GatherElements.infer(gather_el_node) + + res_output_shape = gather_el_node.out_node().shape + self.assertTrue(np.array_equal(int64_array(ref_res).shape, res_output_shape)) + + res_output_value = gather_el_node.out_node().value + if res_output_value is not None: + self.assertTrue(np.array_equal(int64_array(ref_res), res_output_value)) diff --git a/ngraph/core/include/ngraph/op/gather_elements.hpp b/ngraph/core/include/ngraph/op/gather_elements.hpp new file mode 100644 index 00000000000000..aa3813813342c9 --- /dev/null +++ b/ngraph/core/include/ngraph/op/gather_elements.hpp @@ -0,0 +1,55 @@ +//***************************************************************************** +// Copyright 2017-2020 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//***************************************************************************** + +#pragma once + +#include "ngraph/op/op.hpp" + +namespace ngraph +{ + namespace op + { + namespace v6 + { + /// \brief GatherElements operation + /// + class NGRAPH_API GatherElements : public Op + { + public: + NGRAPH_RTTI_DECLARATION; + GatherElements() = default; + + /// \brief Constructs a GatherElements operation. + /// + /// \param data Node producing data that are gathered + /// \param indices Node producing indices by which the operation gathers elements + /// \param axis specifies axis along which indices are specified + GatherElements(const Output& data, + const Output& indices, + const int64_t axis); + + void validate_and_infer_types() override; + bool visit_attributes(AttributeVisitor& visitor) override; + std::shared_ptr + clone_with_new_inputs(const OutputVector& new_args) const override; + + int64_t get_axis() const { return m_axis; } + private: + int64_t m_axis; + }; + } + } +} diff --git a/ngraph/core/include/ngraph/ops.hpp b/ngraph/core/include/ngraph/ops.hpp index 4294a52782466e..0d71179e13cbea 100644 --- a/ngraph/core/include/ngraph/ops.hpp +++ b/ngraph/core/include/ngraph/ops.hpp @@ -63,6 +63,7 @@ #include "ngraph/op/floor.hpp" #include "ngraph/op/floor_mod.hpp" #include "ngraph/op/gather.hpp" +#include "ngraph/op/gather_elements.hpp" #include "ngraph/op/gather_nd.hpp" #include "ngraph/op/gather_tree.hpp" #include "ngraph/op/gelu.hpp" diff --git a/ngraph/core/include/ngraph/opsets/opset6_tbl.hpp b/ngraph/core/include/ngraph/opsets/opset6_tbl.hpp index 44363624de3c55..280271ba1b48dd 100644 --- a/ngraph/core/include/ngraph/opsets/opset6_tbl.hpp +++ b/ngraph/core/include/ngraph/opsets/opset6_tbl.hpp @@ -174,3 +174,4 @@ NGRAPH_OP(Round, ngraph::op::v5) // New operations added in opset6 NGRAPH_OP(MVN, ngraph::op::v6) +NGRAPH_OP(GatherElements, ngraph::op::v6) diff --git a/ngraph/core/src/op/gather_elements.cpp b/ngraph/core/src/op/gather_elements.cpp new file mode 100644 index 00000000000000..894a5a139d6cb7 --- /dev/null +++ b/ngraph/core/src/op/gather_elements.cpp @@ -0,0 +1,131 @@ +//***************************************************************************** +// Copyright 2017-2020 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//***************************************************************************** + +#include "ngraph/op/gather_elements.hpp" +#include "ngraph/shape.hpp" + +using namespace std; +using namespace ngraph; + +// ------------------------------ V6 ------------------------------ + +NGRAPH_RTTI_DEFINITION(op::v6::GatherElements, "GatherElements", 6); + +op::v6::GatherElements::GatherElements(const Output& data, + const Output& indices, + const int64_t axis) + : Op({data, indices}) + , m_axis(axis) +{ + constructor_validate_and_infer_types(); +} + +void op::v6::GatherElements::validate_and_infer_types() +{ + const auto& data_type = get_input_element_type(0); + const auto& indices_type = get_input_element_type(1); + + NODE_VALIDATION_CHECK(this, + indices_type == element::Type_t::i32 || + indices_type == element::Type_t::i64, + "indices must be of int32 or int64 type. But instead got: ", + indices_type); + + const auto& data_pshape = get_input_partial_shape(0); + const auto& indices_pshape = get_input_partial_shape(1); + auto data_rank = data_pshape.rank(); + auto indices_rank = indices_pshape.rank(); + + int64_t axis = m_axis; + if (m_axis < 0 && data_rank.is_static()) + axis += data_rank.get_length(); + + set_output_type(0, data_type, indices_pshape); + + NODE_VALIDATION_CHECK( + this, data_rank.is_dynamic() || data_rank.get_length() >= 1, "data rank must be >= 1."); + + NODE_VALIDATION_CHECK( + this, + data_rank.is_dynamic() || + ((-data_rank.get_length() <= m_axis) && (m_axis < data_rank.get_length())), + "axis must be within interval (-data.rank, data.rank - 1). But instead Got: ", + m_axis); + + NODE_VALIDATION_CHECK(this, + indices_rank.is_dynamic() || indices_rank.get_length() >= 1, + "indices rank must be >= 1."); + + if (data_rank.is_static() && indices_rank.is_dynamic()) + { + PartialShape out_shape_info(data_pshape); + out_shape_info[axis] = Dimension::dynamic(); + set_output_type(0, data_type, out_shape_info); + return; + } + + if (data_rank.is_dynamic()) + { + if (indices_rank.is_dynamic()) + set_output_type(0, data_type, PartialShape::dynamic()); + return; + } + + // left only case when data_rank.is_static() && indices_rank.is_static() + NODE_VALIDATION_CHECK(this, + data_rank.get_length() == indices_rank.get_length(), + "data and indices rank must be equal. But instead got: ", + data_rank.get_length(), + " and ", + indices_rank.get_length()); + + PartialShape output_pshape(indices_pshape); + for (int i = 0; i < indices_rank.get_length(); i++) + { + if (i != axis) + { + // if size of the current axis of indices is unknown it will retrieve it from data + // e.g., if data_shape = {4, 4, ?} indices_shape = {1, ?, 5} and axis = 0 + // (and if intervals intersect) then output_pshape will be {1, 4, 5} + Dimension curr_dim = data_pshape[i] & indices_pshape[i]; + + NODE_VALIDATION_CHECK(this, + !curr_dim.get_interval().empty(), + "Shapes ", + data_pshape, + " and ", + indices_pshape, + " are not consistent. data and indices must have equal or " + "intersecting sizes, except for axis ", + m_axis); + + output_pshape[i] = curr_dim; + } + } + set_output_type(0, data_type, output_pshape); +} + +bool op::v6::GatherElements::visit_attributes(AttributeVisitor& visitor) +{ + visitor.on_attribute("axis", m_axis); + return true; +} + +shared_ptr op::v6::GatherElements::clone_with_new_inputs(const OutputVector& new_args) const +{ + check_new_args_count(this, new_args); + return make_shared(new_args.at(0), new_args.at(1), m_axis); +} diff --git a/ngraph/test/CMakeLists.txt b/ngraph/test/CMakeLists.txt index 43d79f9bc571cf..266d9ea3fc12be 100644 --- a/ngraph/test/CMakeLists.txt +++ b/ngraph/test/CMakeLists.txt @@ -128,6 +128,7 @@ set(SRC type_prop/embedding_segments_sum.cpp type_prop/fake_quantize.cpp type_prop/gather.cpp + type_prop/gather_elements.cpp type_prop/gather_nd.cpp type_prop/gather_tree.cpp type_prop/grn.cpp diff --git a/ngraph/test/type_prop/gather_elements.cpp b/ngraph/test/type_prop/gather_elements.cpp new file mode 100644 index 00000000000000..ddbbeb66f07f75 --- /dev/null +++ b/ngraph/test/type_prop/gather_elements.cpp @@ -0,0 +1,320 @@ +//***************************************************************************** +// Copyright 2017-2020 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//***************************************************************************** + +#include "gtest/gtest.h" +#include "ngraph/ngraph.hpp" +#include "util/type_prop.hpp" + +using namespace std; +using namespace ngraph; + +// ------------------------------ V6 ------------------------------ + +TEST(type_prop, gather_elements_2D_axis_0) +{ + Shape data_shape{3, 3}; + Shape indices_shape{2, 3}; + int axis = 0; + auto D = make_shared(element::Type_t::f32, data_shape); + auto I = make_shared(element::Type_t::i32, indices_shape); + auto GE = make_shared(D, I, axis); + ASSERT_EQ(GE->get_element_type(), element::Type_t::f32); + ASSERT_EQ(GE->get_shape(), indices_shape); +} + +TEST(type_prop, gather_elements_2D_axis_1) +{ + Shape data_shape{3, 3}; + Shape indices_shape{3, 1}; + int axis = 1; + auto D = make_shared(element::Type_t::f32, data_shape); + auto I = make_shared(element::Type_t::i32, indices_shape); + auto GE = make_shared(D, I, axis); + ASSERT_EQ(GE->get_element_type(), element::Type_t::f32); + ASSERT_EQ(GE->get_shape(), indices_shape); +} + +TEST(type_prop, gather_elements_3D_axis_0) +{ + Shape data_shape{3, 3, 10000}; + Shape indices_shape{300, 3, 10000}; + int64_t axis = 0; + auto D = make_shared(element::Type_t::f32, data_shape); + auto I = make_shared(element::Type_t::i32, indices_shape); + auto GE = make_shared(D, I, axis); + ASSERT_EQ(GE->get_element_type(), element::Type_t::f32); + ASSERT_EQ(GE->get_shape(), indices_shape); +} + +TEST(type_prop, gather_elements_3D_axis_2) +{ + Shape data_shape{300, 3, 10}; + Shape indices_shape{300, 3, 10000}; + int64_t axis = 2; + auto D = make_shared(element::Type_t::f32, data_shape); + auto I = make_shared(element::Type_t::i32, indices_shape); + auto GE = make_shared(D, I, axis); + ASSERT_EQ(GE->get_element_type(), element::Type_t::f32); + ASSERT_EQ(GE->get_shape(), indices_shape); +} + +TEST(type_prop, gather_elements_4D_axis_minus_1) +{ + Shape data_shape{300, 3, 10, 1}; + Shape indices_shape{300, 3, 10, 33333}; + int64_t axis = -1; + auto D = make_shared(element::Type_t::f32, data_shape); + auto I = make_shared(element::Type_t::i32, indices_shape); + auto GE = make_shared(D, I, axis); + ASSERT_EQ(GE->get_element_type(), element::Type_t::f32); + ASSERT_EQ(GE->get_shape(), indices_shape); +} + +TEST(type_prop, gather_elements_nonfloat_data_type_int64_indices) +{ + Shape data_shape{300, 3, 10, 1}; + Shape indices_shape{300, 3, 10, 33333}; + int64_t axis = -1; + auto D = make_shared(element::Type_t::i8, data_shape); + auto I = make_shared(element::Type_t::i64, indices_shape); + auto GE = make_shared(D, I, axis); + ASSERT_EQ(GE->get_element_type(), element::Type_t::i8); + ASSERT_EQ(GE->get_shape(), indices_shape); +} + +TEST(type_prop, gather_elements_dynamic_consistent_shapes) +{ + PartialShape data_shape{4, 4, Dimension::dynamic()}; + PartialShape indices_shape{1, Dimension::dynamic(), 5}; + int64_t axis = 0; + auto D = make_shared(element::Type_t::i8, data_shape); + auto I = make_shared(element::Type_t::i64, indices_shape); + auto GE = make_shared(D, I, axis); + ASSERT_EQ(GE->get_element_type(), element::Type_t::i8); + ASSERT_EQ(GE->get_shape(), Shape({1, 4, 5})); +} + +TEST(type_prop, gather_elements_dynamic_out_shape) +{ + PartialShape data_shape{4, 4, Dimension::dynamic()}; + PartialShape indices_shape{1, Dimension::dynamic(), Dimension::dynamic()}; + int64_t axis = 0; + auto D = make_shared(element::Type_t::i8, data_shape); + auto I = make_shared(element::Type_t::i64, indices_shape); + auto GE = make_shared(D, I, axis); + ASSERT_EQ(GE->get_element_type(), element::Type_t::i8); + ASSERT_EQ(GE->get_output_partial_shape(0), PartialShape({1, 4, Dimension::dynamic()})); +} + +TEST(type_prop, gather_elements_interval_shapes) +{ + PartialShape data_shape{4, Dimension(1, 7), 5}; + PartialShape indices_shape{1, Dimension(5, 10), 5}; + int64_t axis = 0; + auto D = make_shared(element::Type_t::i8, data_shape); + auto I = make_shared(element::Type_t::i64, indices_shape); + auto GE = make_shared(D, I, axis); + ASSERT_EQ(GE->get_element_type(), element::Type_t::i8); + ASSERT_EQ(GE->get_output_partial_shape(0), PartialShape({1, Dimension(5, 7), 5})); +} + +TEST(type_prop, gather_elements_data_rank_dynamic_indices_rank_static) +{ + PartialShape data_shape = PartialShape::dynamic(); + PartialShape indices_shape{4, 7, 5}; + int64_t axis = 0; + auto D = make_shared(element::Type_t::i8, data_shape); + auto I = make_shared(element::Type_t::i64, indices_shape); + auto GE = make_shared(D, I, axis); + ASSERT_EQ(GE->get_element_type(), element::Type_t::i8); + ASSERT_EQ(GE->get_output_partial_shape(0), PartialShape({4, 7, 5})); +} + +TEST(type_prop, gather_elements_data_rank_static_indices_rank_dynamic) +{ + PartialShape data_shape{4, Dimension(1, 7), 5}; + PartialShape indices_shape = PartialShape::dynamic(); + int64_t axis = 0; + auto D = make_shared(element::Type_t::i8, data_shape); + auto I = make_shared(element::Type_t::i64, indices_shape); + auto GE = make_shared(D, I, axis); + ASSERT_EQ(GE->get_element_type(), element::Type_t::i8); + ASSERT_EQ(GE->get_output_partial_shape(0), + PartialShape({Dimension::dynamic(), Dimension(1, 7), 5})); +} + +TEST(type_prop, gather_elements_data_pshape_static_indices_rank_dynamic) +{ + PartialShape data_shape{4, 7, 5}; + PartialShape indices_shape = PartialShape::dynamic(); + int64_t axis = 0; + auto D = make_shared(element::Type_t::i8, data_shape); + auto I = make_shared(element::Type_t::i64, indices_shape); + auto GE = make_shared(D, I, axis); + ASSERT_EQ(GE->get_element_type(), element::Type_t::i8); + ASSERT_EQ(GE->get_output_partial_shape(0), PartialShape({Dimension::dynamic(), 7, 5})); +} +// --------------------- Negative tests ------------------------------ + +TEST(type_prop, gather_elements_type_inconsistency) +{ + Shape data_shape{3, 3}; + Shape indices_shape{2, 1}; + int64_t axis = 1; + auto D = make_shared(element::Type_t::f32, data_shape); + auto I = make_shared(element::Type_t::u32, indices_shape); + + try + { + auto GE = make_shared(D, I, axis); + // Should have thrown, so fail if it didn't + FAIL() << "the indices tensor type check failed"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING( + error.what(), std::string("indices must be of int32 or int64 type. But instead got")); + } + catch (...) + { + FAIL() << "type check failed for unexpected reason"; + } +} + +TEST(type_prop, gather_elements_out_of_bounds_axis) +{ + Shape data_shape{3, 3}; + Shape indices_shape{2, 1}; + int64_t axis = -33; + auto D = make_shared(element::Type_t::f32, data_shape); + auto I = make_shared(element::Type_t::i32, indices_shape); + + try + { + auto GE = make_shared(D, I, axis); + // Should have thrown, so fail if it didn't + FAIL() << "axis out of bounds check failed"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING(error.what(), std::string("axis must be within interval")); + } + catch (...) + { + FAIL() << "axis out of bounds check failed for unexpected reason"; + } +} + +TEST(type_prop, gather_elements_rank_consistency_check) +{ + Shape data_shape{3, 3}; + Shape indices_shape{2, 3, 3333}; + int64_t axis = 0; + auto D = make_shared(element::Type_t::f32, data_shape); + auto I = make_shared(element::Type_t::i32, indices_shape); + + try + { + auto GE = make_shared(D, I, axis); + // Should have thrown, so fail if it didn't + FAIL() << "rank consistency check failed"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING(error.what(), std::string("data and indices rank must be equal")); + } + catch (...) + { + FAIL() << "rank consistency check failed for unexpected reason"; + } +} + +TEST(type_prop, gather_elements_shape_inconsistency) +{ + Shape data_shape{3, 3}; + Shape indices_shape{2, 1}; + int64_t axis = 1; + auto D = make_shared(element::Type_t::f32, data_shape); + auto I = make_shared(element::Type_t::i32, indices_shape); + + try + { + auto GE = make_shared(D, I, axis); + // Should have thrown, so fail if it didn't + FAIL() << "Shape inconsistency check failed"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING( + error.what(), + std::string("data and indices must have equal or intersecting sizes, except for axis")); + } + catch (...) + { + FAIL() << "Shape inconsistency check failed for unexpected reason"; + } +} + +TEST(type_prop, gather_elements_dynamic_inconsistent_shapes) +{ + PartialShape data_shape{4, 2, 4, Dimension::dynamic()}; + PartialShape indices_shape{1, 3, Dimension::dynamic(), 5}; + int64_t axis = 0; + auto D = make_shared(element::Type_t::i8, data_shape); + auto I = make_shared(element::Type_t::i64, indices_shape); + + try + { + auto GE = make_shared(D, I, axis); + // Should have thrown, so fail if it didn't + FAIL() << "Shape inconsistency check for dynamic PartialShape failed"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING( + error.what(), + std::string("data and indices must have equal or intersecting sizes, except for axis")); + } + catch (...) + { + FAIL() << "Shape inconsistency check for dynamic PartialShape failed for unexpected reason"; + } +} + +TEST(type_prop, gather_elements_incosistent_interval_shapes) +{ + PartialShape data_shape{4, 4, 5}; + PartialShape indices_shape{1, Dimension(5, 10), 5}; + int64_t axis = 0; + auto D = make_shared(element::Type_t::i8, data_shape); + auto I = make_shared(element::Type_t::i64, indices_shape); + try + { + auto GE = make_shared(D, I, axis); + // Should have thrown, so fail if it didn't + FAIL() << "Shape inconsistency check for dynamic PartialShape failed"; + } + catch (const NodeValidationFailure& error) + { + EXPECT_HAS_SUBSTRING( + error.what(), + std::string("data and indices must have equal or intersecting sizes, except for axis")); + } + catch (...) + { + FAIL() << "Shape inconsistency check for dynamic PartialShape failed for unexpected reason"; + } +} From a497153dcd457c024407830239659d93a2d01692 Mon Sep 17 00:00:00 2001 From: Krzysztof Bruniecki Date: Mon, 21 Dec 2020 14:10:05 +0100 Subject: [PATCH 108/244] Gna fix mt with iterations (#3297) * Enable CoreThreadingTestsWithIterations tests for GNA Sync rest of GNA Lib API, Sync Config for MT tests Change models in CoreThreadingTestsWithIterations to be compat with GNA * Use parameter for model set selection * Fix style * Disable HETERO CoreThreadingTestsWithIterations tests and create issue 45658 --- .../src/gna_plugin/gna_device.cpp | 18 +++++- .../src/gna_plugin/gna_plugin_config.cpp | 35 ++++++----- .../src/gna_plugin/gna_plugin_config.hpp | 19 +++++- .../src/gna_plugin/gna_plugin_internal.hpp | 6 +- .../behavior/core_threading_tests.cpp | 6 +- .../behavior/core_threading_tests.cpp | 13 ++-- .../behavior/core_threading_tests.cpp | 3 +- .../behavior/core_threading_tests.cpp | 3 +- .../include/behavior/core_threading_tests.hpp | 60 +++++++++++-------- .../tests/unit/gna/gna_plugin_config_test.cpp | 2 +- 10 files changed, 106 insertions(+), 59 deletions(-) diff --git a/inference-engine/src/gna_plugin/gna_device.cpp b/inference-engine/src/gna_plugin/gna_device.cpp index 809388a66c3f29..37885950436705 100644 --- a/inference-engine/src/gna_plugin/gna_device.cpp +++ b/inference-engine/src/gna_plugin/gna_device.cpp @@ -29,6 +29,7 @@ std::mutex GNADeviceHelper::acrossPluginsSync{}; uint8_t* GNADeviceHelper::alloc(uint32_t size_requested, uint32_t *size_granted) { + std::unique_lock lockGnaCalls{ acrossPluginsSync }; void * memPtr = nullptr; #if GNA_LIB_VER == 1 memPtr = GNAAlloc(nGNAHandle, size_requested, size_granted); @@ -45,6 +46,7 @@ uint8_t* GNADeviceHelper::alloc(uint32_t size_requested, uint32_t *size_granted) } void GNADeviceHelper::free(void * ptr) { + std::unique_lock lockGnaCalls{ acrossPluginsSync }; #if GNA_LIB_VER == 1 GNAFree(nGNAHandle); #else @@ -58,6 +60,7 @@ uint32_t GNADeviceHelper::propagate(const intel_nnet_type_t *pNeuralNetwork, const uint32_t *pActiveIndices, uint32_t nActiveIndices, intel_gna_proc_t nGNAProcType) { + std::unique_lock lockGnaCalls{ acrossPluginsSync }; uint32_t reqId; nGNAStatus = GNAPropagateForward(nGNAHandle, pNeuralNetwork, @@ -68,6 +71,7 @@ uint32_t GNADeviceHelper::propagate(const intel_nnet_type_t *pNeuralNetwork, #else void GNADeviceHelper::setUpActiveList(const uint32_t requestConfigId, uint32_t layerIndex, uint32_t* ptr_active_indices, uint32_t num_active_indices) { + std::unique_lock lockGnaCalls{ acrossPluginsSync }; const auto status = Gna2RequestConfigEnableActiveList(requestConfigId, layerIndex, num_active_indices, ptr_active_indices); checkGna2Status(status, "Gna2RequestConfigEnableActiveList"); } @@ -76,6 +80,7 @@ void GNADeviceHelper::propagateSync(const uint32_t requestConfigId, Gna2Accelera } uint32_t GNADeviceHelper::propagate(const uint32_t requestConfigId, Gna2AccelerationMode gna2AccelerationMode) { + std::unique_lock lockGnaCalls{ acrossPluginsSync }; uint32_t reqId{}; if (gna2AccelerationMode == Gna2AccelerationModeHardware && detectedGnaDevVersion == Gna2DeviceVersionSoftwareEmulation) { @@ -116,6 +121,7 @@ std::string GNADeviceHelper::getGnaLibraryVersion() { } uint32_t GNADeviceHelper::createModel(Gna2Model& gnaModel) const { + std::unique_lock lockGnaCalls{ acrossPluginsSync }; uint32_t modelId; if (isUpTo20GnaDevice()) { enforceLegacyCnns(gnaModel); @@ -127,11 +133,13 @@ uint32_t GNADeviceHelper::createModel(Gna2Model& gnaModel) const { } void GNADeviceHelper::releaseModel(const uint32_t model_id) { + std::unique_lock lockGnaCalls{ acrossPluginsSync }; const auto status = Gna2ModelRelease(model_id); checkGna2Status(status, "Gna2ModelRelease"); } uint32_t GNADeviceHelper::createRequestConfig(const uint32_t model_id) { + std::unique_lock lockGnaCalls{ acrossPluginsSync }; uint32_t reqConfId; auto status = Gna2RequestConfigCreate(model_id, &reqConfId); checkGna2Status(status, "Gna2RequestConfigCreate"); @@ -327,6 +335,7 @@ const std::map , const std::string> #endif GnaWaitStatus GNADeviceHelper::wait(uint32_t reqId, int64_t millisTimeout) { + std::unique_lock lockGnaCalls{ acrossPluginsSync }; #if GNA_LIB_VER == 2 const auto status = Gna2RequestWait(reqId, millisTimeout); if (status == Gna2StatusWarningDeviceBusy) { @@ -434,8 +443,8 @@ void GNADeviceHelper::open(uint8_t n_threads) { } void GNADeviceHelper::close() { - std::unique_lock lockGnaCalls{ acrossPluginsSync }; #if GNA_LIB_VER == 1 + std::unique_lock lockGnaCalls{ acrossPluginsSync }; GNADeviceClose(nGNAHandle); nGNAHandle = 0; #else @@ -447,8 +456,11 @@ void GNADeviceHelper::close() { gnawarn() << "Request with Id " << requestId << " was not awaited successfully"; } } - const auto status = Gna2DeviceClose(nGnaDeviceIndex); - checkGna2Status(status, "Gna2DeviceClose"); + { + std::unique_lock lockGnaCalls{ acrossPluginsSync }; + const auto status = Gna2DeviceClose(nGnaDeviceIndex); + checkGna2Status(status, "Gna2DeviceClose"); + } #endif deviceOpened = false; } diff --git a/inference-engine/src/gna_plugin/gna_plugin_config.cpp b/inference-engine/src/gna_plugin/gna_plugin_config.cpp index b49604cdaea11e..60d4d8542142dc 100644 --- a/inference-engine/src/gna_plugin/gna_plugin_config.cpp +++ b/inference-engine/src/gna_plugin/gna_plugin_config.cpp @@ -210,18 +210,19 @@ void Config::UpdateFromMap(const std::map& config) { } void Config::AdjustKeyMapValues() { - key_config_map.clear(); + std::lock_guard lockGuard{ mtx4keyConfigMap }; + keyConfigMap.clear(); if (inputScaleFactors.empty()) { inputScaleFactors.push_back(1.0); } - key_config_map[GNA_CONFIG_KEY(SCALE_FACTOR)] = std::to_string(inputScaleFactors[0]); + keyConfigMap[GNA_CONFIG_KEY(SCALE_FACTOR)] = std::to_string(inputScaleFactors[0]); for (int n = 0; n < inputScaleFactors.size(); n++) { - key_config_map[GNA_CONFIG_KEY(SCALE_FACTOR) + std::string("_") + std::to_string(n)] = + keyConfigMap[GNA_CONFIG_KEY(SCALE_FACTOR) + std::string("_") + std::to_string(n)] = std::to_string(inputScaleFactors[n]); } - key_config_map[GNA_CONFIG_KEY(FIRMWARE_MODEL_IMAGE)] = dumpXNNPath; - key_config_map[GNA_CONFIG_KEY(FIRMWARE_MODEL_IMAGE_GENERATION)] = dumpXNNGeneration; + keyConfigMap[GNA_CONFIG_KEY(FIRMWARE_MODEL_IMAGE)] = dumpXNNPath; + keyConfigMap[GNA_CONFIG_KEY(FIRMWARE_MODEL_IMAGE_GENERATION)] = dumpXNNGeneration; std::string device_mode; if (gnaFlags.sw_fp32) { @@ -243,32 +244,34 @@ void Config::AdjustKeyMapValues() { } } IE_ASSERT(!device_mode.empty()); - key_config_map[GNA_CONFIG_KEY(DEVICE_MODE)] = device_mode; - key_config_map[GNA_CONFIG_KEY(COMPACT_MODE)] = + keyConfigMap[GNA_CONFIG_KEY(DEVICE_MODE)] = device_mode; + keyConfigMap[GNA_CONFIG_KEY(COMPACT_MODE)] = gnaFlags.compact_mode ? PluginConfigParams::YES: PluginConfigParams::NO; - key_config_map[CONFIG_KEY(EXCLUSIVE_ASYNC_REQUESTS)] = + keyConfigMap[CONFIG_KEY(EXCLUSIVE_ASYNC_REQUESTS)] = gnaFlags.exclusive_async_requests ? PluginConfigParams::YES: PluginConfigParams::NO; - key_config_map[GNA_CONFIG_KEY(PRECISION)] = gnaPrecision.name(); - key_config_map[GNA_CONFIG_KEY(PWL_UNIFORM_DESIGN)] = + keyConfigMap[GNA_CONFIG_KEY(PRECISION)] = gnaPrecision.name(); + keyConfigMap[GNA_CONFIG_KEY(PWL_UNIFORM_DESIGN)] = gnaFlags.uniformPwlDesign ? PluginConfigParams::YES: PluginConfigParams::NO; - key_config_map[CONFIG_KEY(PERF_COUNT)] = + keyConfigMap[CONFIG_KEY(PERF_COUNT)] = gnaFlags.performance_counting ? PluginConfigParams::YES: PluginConfigParams::NO; - key_config_map[GNA_CONFIG_KEY(LIB_N_THREADS)] = std::to_string(gnaFlags.gna_lib_async_threads_num); - key_config_map[CONFIG_KEY(SINGLE_THREAD)] = + keyConfigMap[GNA_CONFIG_KEY(LIB_N_THREADS)] = std::to_string(gnaFlags.gna_lib_async_threads_num); + keyConfigMap[CONFIG_KEY(SINGLE_THREAD)] = gnaFlags.gna_openmp_multithreading ? PluginConfigParams::NO: PluginConfigParams::YES; } std::string Config::GetParameter(const std::string& name) const { - auto result = key_config_map.find(name); - if (result == key_config_map.end()) { + std::lock_guard lockGuard{ mtx4keyConfigMap }; + auto result = keyConfigMap.find(name); + if (result == keyConfigMap.end()) { THROW_GNA_EXCEPTION << "Unsupported config key: " << name; } return result->second; } std::vector Config::GetSupportedKeys() const { + std::lock_guard lockGuard{ mtx4keyConfigMap }; std::vector result; - for (auto&& configOption : key_config_map) { + for (auto&& configOption : keyConfigMap) { result.push_back(configOption.first); } return result; diff --git a/inference-engine/src/gna_plugin/gna_plugin_config.hpp b/inference-engine/src/gna_plugin/gna_plugin_config.hpp index 4bc24bd5c465f3..c9f8b0d676a620 100644 --- a/inference-engine/src/gna_plugin/gna_plugin_config.hpp +++ b/inference-engine/src/gna_plugin/gna_plugin_config.hpp @@ -14,6 +14,7 @@ #include "descriptions/gna_flags.hpp" #include #include +#include namespace GNAPluginNS { @@ -21,6 +22,21 @@ struct Config { Config() { AdjustKeyMapValues(); } + Config(const Config& r) { + gnaPrecision = r.gnaPrecision; + dumpXNNPath = r.dumpXNNPath; + dumpXNNGeneration = r.dumpXNNGeneration; +#if GNA_LIB_VER == 1 + gna_proc_type = r.gna_proc_type; +#else + pluginGna2AccMode = r.pluginGna2AccMode; + pluginGna2DeviceConsistent = r.pluginGna2DeviceConsistent; +#endif + inputScaleFactors = r.inputScaleFactors; + gnaFlags = r.gnaFlags; + std::lock_guard(r.mtx4keyConfigMap); + keyConfigMap = r.keyConfigMap; + } void UpdateFromMap(const std::map& configMap); void AdjustKeyMapValues(); std::string GetParameter(const std::string& name) const; @@ -42,7 +58,8 @@ struct Config { std::vector inputScaleFactors; GNAFlags gnaFlags; - std::map key_config_map; + mutable std::mutex mtx4keyConfigMap; + std::map keyConfigMap; }; } // namespace GNAPluginNS diff --git a/inference-engine/src/gna_plugin/gna_plugin_internal.hpp b/inference-engine/src/gna_plugin/gna_plugin_internal.hpp index 08f1efb8bae809..5917e28128fe83 100644 --- a/inference-engine/src/gna_plugin/gna_plugin_internal.hpp +++ b/inference-engine/src/gna_plugin/gna_plugin_internal.hpp @@ -34,7 +34,7 @@ class GNAPluginInternal : public InferenceEngine::InferencePluginInternal { const std::map &config) override { Config updated_config(defaultConfig); updated_config.UpdateFromMap(config); - auto plg = std::make_shared(updated_config.key_config_map); + auto plg = std::make_shared(updated_config.keyConfigMap); plgPtr = plg; InferenceEngine::CNNNetwork clonedNetwork(InferenceEngine::cloneNetwork(network)); return std::make_shared(clonedNetwork, plg); @@ -49,7 +49,7 @@ class GNAPluginInternal : public InferenceEngine::InferencePluginInternal { const std::map &config) override { Config updated_config(defaultConfig); updated_config.UpdateFromMap(config); - auto plg = std::make_shared(updated_config.key_config_map); + auto plg = std::make_shared(updated_config.keyConfigMap); plgPtr = plg; return make_executable_network(std::make_shared(modelFileName, plg)); @@ -59,7 +59,7 @@ class GNAPluginInternal : public InferenceEngine::InferencePluginInternal { const std::map& config) override { Config updated_config(defaultConfig); updated_config.UpdateFromMap(config); - auto plg = std::make_shared(updated_config.key_config_map); + auto plg = std::make_shared(updated_config.keyConfigMap); plgPtr = plg; return make_executable_network(std::make_shared(networkModel, plg)); } diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/core_threading_tests.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/core_threading_tests.cpp index dd283c4446ed03..778316b1ccd698 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/core_threading_tests.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/core_threading_tests.cpp @@ -22,11 +22,13 @@ INSTANTIATE_TEST_CASE_P(CPU, CoreThreadingTests, testing::ValuesIn(params), Core INSTANTIATE_TEST_CASE_P(CPU, CoreThreadingTestsWithIterations, testing::Combine(testing::ValuesIn(params), testing::Values(4), - testing::Values(50)), + testing::Values(50), + testing::Values(ModelClass::Default)), CoreThreadingTestsWithIterations::getTestCaseName); INSTANTIATE_TEST_CASE_P(CPU_Streams, CoreThreadingTestsWithIterations, testing::Combine(testing::ValuesIn(paramsStreams), testing::Values(4), - testing::Values(10)), + testing::Values(50), + testing::Values(ModelClass::Default)), CoreThreadingTestsWithIterations::getTestCaseName); diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/core_threading_tests.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/core_threading_tests.cpp index 139bd9f512c4c7..1a6bd93d8293ec 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/core_threading_tests.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/core_threading_tests.cpp @@ -5,19 +5,20 @@ #include namespace { - Params params[] = { std::tuple{ CommonTestUtils::DEVICE_GNA, {{ CONFIG_KEY(PERF_COUNT), CONFIG_VALUE(YES) }}}, std::tuple{ CommonTestUtils::DEVICE_HETERO, {{ "TARGET_FALLBACK", CommonTestUtils::DEVICE_GNA }}}, std::tuple{ CommonTestUtils::DEVICE_MULTI, {{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES), CommonTestUtils::DEVICE_GNA }}}, }; - +// TODO: Consider to append params[1] after issue *-45658 resolved +std::vector< std::tuple > paramsWithIterations{ params[0], params[2] }; } // namespace INSTANTIATE_TEST_CASE_P(GNA, CoreThreadingTests, testing::ValuesIn(params), CoreThreadingTests::getTestCaseName); -INSTANTIATE_TEST_CASE_P(DISABLED_GNA, CoreThreadingTestsWithIterations, - testing::Combine(testing::ValuesIn(params), - testing::Values(2), - testing::Values(2)), +INSTANTIATE_TEST_CASE_P(GNA, CoreThreadingTestsWithIterations, + testing::Combine(testing::ValuesIn(paramsWithIterations), + testing::Values(3), + testing::Values(4), + testing::Values(ModelClass::ConvPoolRelu)), CoreThreadingTestsWithIterations::getTestCaseName); diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/core_threading_tests.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/core_threading_tests.cpp index 5886a2998a0536..54b1199f23d727 100644 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/core_threading_tests.cpp +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/core_threading_tests.cpp @@ -52,5 +52,6 @@ INSTANTIATE_TEST_CASE_P(smoke_GPU, CoreThreadingTests, testing::ValuesIn(params) INSTANTIATE_TEST_CASE_P(smoke_GPU, CoreThreadingTestsWithIterations, testing::Combine(testing::ValuesIn(params), testing::Values(4), - testing::Values(20)), + testing::Values(20), + testing::Values(ModelClass::Default)), CoreThreadingTestsWithIterations::getTestCaseName); diff --git a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/core_threading_tests.cpp b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/core_threading_tests.cpp index 579146cfe08047..9142caa7ef3df1 100644 --- a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/core_threading_tests.cpp +++ b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/behavior/core_threading_tests.cpp @@ -19,5 +19,6 @@ INSTANTIATE_TEST_CASE_P(MYRIAD, CoreThreadingTests, testing::ValuesIn(params), C INSTANTIATE_TEST_CASE_P(DISABLED_MYRIAD, CoreThreadingTestsWithIterations, testing::Combine(testing::ValuesIn(params), testing::Values(2), - testing::Values(2)), + testing::Values(2), + testing::Values(ModelClass::Default)), CoreThreadingTestsWithIterations::getTestCaseName); diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/core_threading_tests.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/core_threading_tests.hpp index b56b93324e7646..12efb80d2209c0 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/core_threading_tests.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/core_threading_tests.hpp @@ -17,6 +17,8 @@ #include #include #include +#include +#include #include #include @@ -182,24 +184,31 @@ TEST_P(CoreThreadingTests, smoke_QueryNetwork) { using Threads = unsigned int; using Iterations = unsigned int; -using CoreThreadingParams = std::tuple; + +enum struct ModelClass : unsigned { + Default, + ConvPoolRelu +}; + +using CoreThreadingParams = std::tuple; class CoreThreadingTestsWithIterations : public ::testing::TestWithParam, - public CoreThreadingTestsBase { + public CoreThreadingTestsBase { public: void SetUp() override { std::tie(deviceName, config) = std::get<0>(GetParam()); - numThreads = std::get<1>(GetParam()); - numIterations = std::get<2>(GetParam()); + numThreads = std::get<1>(GetParam()); + numIterations = std::get<2>(GetParam()); + modelClass = std::get<3>(GetParam()); } - static std::string getTestCaseName(testing::TestParamInfo> obj) { + static std::string getTestCaseName(testing::TestParamInfo obj) { unsigned int numThreads, numIterations; std::string deviceName; Config config; std::tie(deviceName, config) = std::get<0>(obj.param); - numThreads = std::get<1>(obj.param); - numIterations = std::get<2>(obj.param); + numThreads = std::get<1>(obj.param); + numIterations = std::get<2>(obj.param); char separator('_'); std::ostringstream result; result << "targetDevice=" << deviceName << separator; @@ -212,8 +221,24 @@ class CoreThreadingTestsWithIterations : public ::testing::TestWithParam networks; + void SetupNetworks() { + if (modelClass == ModelClass::ConvPoolRelu) { + for (unsigned i = 0; i < numThreads; i++) { + networks.emplace_back(InferenceEngine::CNNNetwork(ngraph::builder::subgraph::makeConvPoolRelu())); + } + } else { + networks.emplace_back(InferenceEngine::CNNNetwork(ngraph::builder::subgraph::make2InputSubtract())); + networks.emplace_back(InferenceEngine::CNNNetwork(ngraph::builder::subgraph::makeMultiSingleConv())); + networks.emplace_back(InferenceEngine::CNNNetwork(ngraph::builder::subgraph::makeSingleConv())); + networks.emplace_back(InferenceEngine::CNNNetwork(ngraph::builder::subgraph::makeSplitConvConcat())); + networks.emplace_back(InferenceEngine::CNNNetwork(ngraph::builder::subgraph::makeSplitMultiConvConcat())); + } + } }; // tested function: LoadNetwork, AddExtension @@ -223,12 +248,7 @@ TEST_P(CoreThreadingTestsWithIterations, smoke_LoadNetwork) { InferenceEngine::Core ie; std::atomic counter{0u}; - std::vector networks; - networks.emplace_back(InferenceEngine::CNNNetwork(ngraph::builder::subgraph::make2InputSubtract())); - networks.emplace_back(InferenceEngine::CNNNetwork(ngraph::builder::subgraph::makeMultiSingleConv())); - networks.emplace_back(InferenceEngine::CNNNetwork(ngraph::builder::subgraph::makeSingleConv())); - networks.emplace_back(InferenceEngine::CNNNetwork(ngraph::builder::subgraph::makeSplitConvConcat())); - networks.emplace_back(InferenceEngine::CNNNetwork(ngraph::builder::subgraph::makeSplitMultiConvConcat())); + SetupNetworks(); ie.SetConfig(config, deviceName); runParallel([&] () { @@ -244,12 +264,7 @@ TEST_P(CoreThreadingTestsWithIterations, smoke_LoadNetworkAccuracy) { InferenceEngine::Core ie; std::atomic counter{0u}; - std::vector networks; - networks.emplace_back(InferenceEngine::CNNNetwork(ngraph::builder::subgraph::make2InputSubtract())); - networks.emplace_back(InferenceEngine::CNNNetwork(ngraph::builder::subgraph::makeMultiSingleConv())); - networks.emplace_back(InferenceEngine::CNNNetwork(ngraph::builder::subgraph::makeSingleConv())); - networks.emplace_back(InferenceEngine::CNNNetwork(ngraph::builder::subgraph::makeSplitConvConcat())); - networks.emplace_back(InferenceEngine::CNNNetwork(ngraph::builder::subgraph::makeSplitMultiConvConcat())); + SetupNetworks(); ie.SetConfig(config, deviceName); runParallel([&] () { @@ -297,12 +312,7 @@ TEST_P(CoreThreadingTestsWithIterations, smoke_LoadNetwork_MultipleIECores) { std::atomic counter{0u}; - std::vector networks; - networks.emplace_back(InferenceEngine::CNNNetwork(ngraph::builder::subgraph::make2InputSubtract())); - networks.emplace_back(InferenceEngine::CNNNetwork(ngraph::builder::subgraph::makeMultiSingleConv())); - networks.emplace_back(InferenceEngine::CNNNetwork(ngraph::builder::subgraph::makeSingleConv())); - networks.emplace_back(InferenceEngine::CNNNetwork(ngraph::builder::subgraph::makeSplitConvConcat())); - networks.emplace_back(InferenceEngine::CNNNetwork(ngraph::builder::subgraph::makeSplitMultiConvConcat())); + SetupNetworks(); runParallel([&] () { auto value = counter++; diff --git a/inference-engine/tests/unit/gna/gna_plugin_config_test.cpp b/inference-engine/tests/unit/gna/gna_plugin_config_test.cpp index d07f4d63282666..394504414b3c80 100644 --- a/inference-engine/tests/unit/gna/gna_plugin_config_test.cpp +++ b/inference-engine/tests/unit/gna/gna_plugin_config_test.cpp @@ -51,7 +51,7 @@ class GNAPluginConfigTest : public ::testing::Test { }; TEST_F(GNAPluginConfigTest, GnaConfigDefaultConfigIsExpected) { - ASSERT_EQ(config.key_config_map, supportedConfigKeysWithDefaults); + ASSERT_EQ(config.keyConfigMap, supportedConfigKeysWithDefaults); } TEST_F(GNAPluginConfigTest, GnaConfigScaleFactorTest) { From e490dfc161539935ec0aa9ea833bd1d8f3622ce8 Mon Sep 17 00:00:00 2001 From: George Zlobin Date: Mon, 21 Dec 2020 17:39:19 +0300 Subject: [PATCH 109/244] [IE][VPU][GT] Add pass to reshape convolution by parameter from IR (#3038) --- .../src/readers/ir_reader/ie_ir_parser.cpp | 4 + .../include/vpu/graph_transformer.hpp | 1 + .../include/vpu/middleend/pass_manager.hpp | 2 + .../include/vpu/private_plugin_config.hpp | 7 ++ .../src/middleend/pass_manager.cpp | 12 ++ .../src/middleend/passes/reshape_conv.cpp | 107 ++++++++++++++++++ .../graph_transformer/src/parsed_config.cpp | 2 + 7 files changed, 135 insertions(+) create mode 100644 inference-engine/src/vpu/graph_transformer/src/middleend/passes/reshape_conv.cpp diff --git a/inference-engine/src/readers/ir_reader/ie_ir_parser.cpp b/inference-engine/src/readers/ir_reader/ie_ir_parser.cpp index 4a970130fbf77a..e7df22a4122167 100644 --- a/inference-engine/src/readers/ir_reader/ie_ir_parser.cpp +++ b/inference-engine/src/readers/ir_reader/ie_ir_parser.cpp @@ -547,6 +547,10 @@ std::shared_ptr V10Parser::createNode(const std::vector >(pr_data.value()); } + const auto aw_data = dn.attribute("alt_width"); + if (aw_data) { + rtInfo["alt_width"] = std::make_shared<::ngraph::VariantWrapper >(aw_data.value()); + } } ngraphNode->set_friendly_name(params.name); diff --git a/inference-engine/src/vpu/graph_transformer/include/vpu/graph_transformer.hpp b/inference-engine/src/vpu/graph_transformer/include/vpu/graph_transformer.hpp index c26813c9728043..a9601d1777e645 100644 --- a/inference-engine/src/vpu/graph_transformer/include/vpu/graph_transformer.hpp +++ b/inference-engine/src/vpu/graph_transformer/include/vpu/graph_transformer.hpp @@ -112,6 +112,7 @@ struct CompilationConfig final { bool forcePureTensorIterator = false; bool enableMemoryTypesAnnotation = false; bool enableWeightsAnalysis = true; + bool enableCustomReshapeParam = false; // // Deprecated options diff --git a/inference-engine/src/vpu/graph_transformer/include/vpu/middleend/pass_manager.hpp b/inference-engine/src/vpu/graph_transformer/include/vpu/middleend/pass_manager.hpp index c6468c2c2a92f9..788acee5b36d65 100644 --- a/inference-engine/src/vpu/graph_transformer/include/vpu/middleend/pass_manager.hpp +++ b/inference-engine/src/vpu/graph_transformer/include/vpu/middleend/pass_manager.hpp @@ -249,6 +249,8 @@ class PassManager final { Pass::Ptr annotateMemoryTypes(); + Pass::Ptr reshapeBeforeConvTiling(); + protected: StageBuilder::Ptr _stageBuilder; BackEnd::Ptr _backEnd; diff --git a/inference-engine/src/vpu/graph_transformer/include/vpu/private_plugin_config.hpp b/inference-engine/src/vpu/graph_transformer/include/vpu/private_plugin_config.hpp index d52ee8bba3ee6b..8fca076c6b3950 100644 --- a/inference-engine/src/vpu/graph_transformer/include/vpu/private_plugin_config.hpp +++ b/inference-engine/src/vpu/graph_transformer/include/vpu/private_plugin_config.hpp @@ -44,6 +44,13 @@ DECLARE_VPU_CONFIG(MYRIAD_ENABLE_EARLY_ELTWISE_RELU_FUSION); */ DECLARE_VPU_CONFIG(MYRIAD_ENABLE_WEIGHTS_ANALYSIS); +/** + * @brief Used to enable reshapeBeforeConvTiling pass in cases where + * user have reshape parameter "alt_width" in IR. + * Default is "NO". + */ +DECLARE_VPU_CONFIG(MYRIAD_ENABLE_CUSTOM_RESHAPE_PARAM); + // // Debug options // diff --git a/inference-engine/src/vpu/graph_transformer/src/middleend/pass_manager.cpp b/inference-engine/src/vpu/graph_transformer/src/middleend/pass_manager.cpp index f6a9291a9efc6c..dafd1c4ebfee18 100644 --- a/inference-engine/src/vpu/graph_transformer/src/middleend/pass_manager.cpp +++ b/inference-engine/src/vpu/graph_transformer/src/middleend/pass_manager.cpp @@ -166,6 +166,18 @@ PassSet::Ptr PassManager::buildMiddleEnd() { ADD_DUMP_PASS("reshapeDilationConv"); } + // + // "reshapeBeforeConvTiling" pass changes geometry of convolution stages in order + // to get more efficient HW tiling (pass "hwConvTiling") using reshape stages. + // + // Pass should be located before "adjustDataBatch" because "adjustDataBatch" specifies "origConvOutput" attribute + // for convolution in order to provide that information to "hwConvTiling" pass. + // Otherwise, "hwConvTiling" will see incorrect values in "origConvOutput" attribute. + if (env.config.enableCustomReshapeParam) { + ADD_PASS(reshapeBeforeConvTiling); + ADD_DUMP_PASS("reshapeBeforeConvTiling"); + } + ADD_PASS(upliftActivationStages); ADD_DUMP_PASS("upliftActivationStages"); diff --git a/inference-engine/src/vpu/graph_transformer/src/middleend/passes/reshape_conv.cpp b/inference-engine/src/vpu/graph_transformer/src/middleend/passes/reshape_conv.cpp new file mode 100644 index 00000000000000..4da3f487d20046 --- /dev/null +++ b/inference-engine/src/vpu/graph_transformer/src/middleend/passes/reshape_conv.cpp @@ -0,0 +1,107 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +// This pass changes geometry of convolution stages in order +// to get more efficient HW tiling (pass "hwConvTiling") using reshape stages. + +#include + +namespace vpu { + +namespace { + +class PassImpl final : public Pass { +public: + explicit PassImpl(const StageBuilder::Ptr& stageBuilder) : _stageBuilder(stageBuilder) {} + + void run(const Model& model) override; + +private: + StageBuilder::Ptr _stageBuilder; +}; + +void PassImpl::run(const Model& model) { + VPU_PROFILE(reshapeBeforeConvTiling); + + for (const auto& stage : model->getStages()) { + if (stage->type() != StageType::StubConv) { + continue; + } + + const auto tryHW = stage->attrs().getOrDefault("tryHW", false); + if (!tryHW) { + continue; + } + + const auto input = stage->input(0); + const auto output = stage->output(0); + + const auto& inputDesc = input->desc(); + const auto& outputDesc = output->desc(); + + if ((inputDesc.dimsOrder() != DimsOrder::NCHW) || + (outputDesc.dimsOrder() != DimsOrder::NCHW)) { + continue; + } + + if (stage->attrs().get("kernelSizeX") != 1 || + stage->attrs().get("kernelSizeY") != 1) + continue; + + int dimH = inputDesc.dim(Dim::H); + int dimW = inputDesc.dim(Dim::W); + int resultH = 0; + int resultW = 0; + + if (stage->origLayer()->params.count("alt_width")) { + const auto alt_width = stage->origLayer()->params.at("alt_width"); + if (!alt_width.empty() && + std::find_if(alt_width.begin(), alt_width.end(), + [](unsigned char c) { return !std::isdigit(c); }) == alt_width.end()) { + resultW = std::stoul(alt_width); + } + } + + if (resultW == 0) { + continue; + } + + resultH = dimH * dimW / resultW; + + IE_ASSERT(dimH * dimW == resultH * resultW); + + auto inputNewDesc = inputDesc; + inputNewDesc.setDim(Dim::W, resultW); + inputNewDesc.setDim(Dim::H, resultH); + + auto outputNewDesc = outputDesc; + outputNewDesc.setDim(Dim::W, resultW); + outputNewDesc.setDim(Dim::H, resultH); + + auto newInput = model->duplicateData(input, "@input-data-after-reshape", + inputNewDesc); + + auto newOutput = model->duplicateData(output, "@output-data-before-reshape", + outputNewDesc); + + model->replaceStageInput(stage->inputEdge(0), newInput); + model->replaceStageOutput(stage->outputEdge(0), newOutput); + + _stageBuilder->addReshapeStage(model, + stage->name() + "@copy-reinterpret-input-data", + nullptr, input, newInput); + + _stageBuilder->addReshapeStage(model, + stage->name() + "@copy-reinterpret-output-data", + nullptr, newOutput, output); + } +} + +} // namespace + +Pass::Ptr PassManager::reshapeBeforeConvTiling() { + return std::make_shared(_stageBuilder); +} + +} // namespace vpu diff --git a/inference-engine/src/vpu/graph_transformer/src/parsed_config.cpp b/inference-engine/src/vpu/graph_transformer/src/parsed_config.cpp index 1f29bbe1cc9350..d68a21f1aeb89c 100644 --- a/inference-engine/src/vpu/graph_transformer/src/parsed_config.cpp +++ b/inference-engine/src/vpu/graph_transformer/src/parsed_config.cpp @@ -69,6 +69,7 @@ IE_SUPPRESS_DEPRECATED_START ie::MYRIAD_DISABLE_CONVERT_STAGES, ie::MYRIAD_ENABLE_WEIGHTS_ANALYSIS, ie::MYRIAD_ENABLE_EARLY_ELTWISE_RELU_FUSION, + ie::MYRIAD_ENABLE_CUSTOM_RESHAPE_PARAM, // // Debug options @@ -186,6 +187,7 @@ void ParsedConfig::parse(const std::map& config) { setOption(_compileConfig.disableConvertStages, switches, config, ie::MYRIAD_DISABLE_CONVERT_STAGES); setOption(_compileConfig.enableWeightsAnalysis, switches, config, ie::MYRIAD_ENABLE_WEIGHTS_ANALYSIS); setOption(_compileConfig.enableEarlyEltwiseReLUFusion, switches, config, ie::MYRIAD_ENABLE_EARLY_ELTWISE_RELU_FUSION); + setOption(_compileConfig.enableCustomReshapeParam, switches, config, ie::MYRIAD_ENABLE_CUSTOM_RESHAPE_PARAM); setOption(_compileConfig.irWithVpuScalesDir, config, ie::MYRIAD_IR_WITH_SCALES_DIRECTORY); setOption(_compileConfig.noneLayers, config, ie::MYRIAD_NONE_LAYERS, parseStringSet); From 977c3dda237df5b9530a825a799277ca2e513a51 Mon Sep 17 00:00:00 2001 From: Anton Potapov Date: Tue, 22 Dec 2020 07:52:04 +0300 Subject: [PATCH 110/244] [PP] Removed old (non GAPI) preprocessing code (#3664) --- .../ie_preprocess_data_sse42.cpp | 682 --------------- .../ie_preprocess_data_sse42.hpp | 17 - .../src/preprocessing/ie_preprocess_data.cpp | 828 +----------------- .../src/preprocessing/ie_preprocess_data.hpp | 38 - .../src/preprocessing/ie_preprocess_gapi.cpp | 19 +- .../src/preprocessing/ie_preprocess_gapi.hpp | 5 +- 6 files changed, 6 insertions(+), 1583 deletions(-) delete mode 100644 inference-engine/src/preprocessing/cpu_x86_sse42/ie_preprocess_data_sse42.cpp delete mode 100644 inference-engine/src/preprocessing/cpu_x86_sse42/ie_preprocess_data_sse42.hpp diff --git a/inference-engine/src/preprocessing/cpu_x86_sse42/ie_preprocess_data_sse42.cpp b/inference-engine/src/preprocessing/cpu_x86_sse42/ie_preprocess_data_sse42.cpp deleted file mode 100644 index 0e8ca77d5fee5a..00000000000000 --- a/inference-engine/src/preprocessing/cpu_x86_sse42/ie_preprocess_data_sse42.cpp +++ /dev/null @@ -1,682 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "ie_preprocess_data.hpp" -#include "ie_preprocess_data_sse42.hpp" - -#include // SSE 4.2 - -#include - -namespace InferenceEngine { -namespace Resize { - -static inline int ceil(double value) { - __m128d t = _mm_set_sd(value); - int i = _mm_cvtsd_si32(t); - return i + _mm_movemask_pd(_mm_cmplt_sd(_mm_cvtsi32_sd(t, i), t)); -} - - -static inline int floor(double value) { - __m128d t = _mm_set_sd(value); - int i = _mm_cvtsd_si32(t); - return i - _mm_movemask_pd(_mm_cmplt_sd(t, _mm_cvtsi32_sd(t, i))); -} - -static inline int16_t mulq15(int16_t a, int16_t b) { - return static_cast(((1 << 14) + (int32_t)a * (int32_t)b) >> 15); -} - -static inline uint16_t mulq16(uint16_t a, uint16_t b) { - return static_cast(((uint32_t)a * (uint32_t)b) >> 16); -} - -void resize_bilinear_u8(const Blob::Ptr inBlob, Blob::Ptr outBlob, uint8_t* buffer) { - Border border = {BORDER_REPLICATE, 0}; - - auto dstDims = outBlob->getTensorDesc().getDims(); - auto srcDims = inBlob->getTensorDesc().getDims(); - - auto dwidth = static_cast(dstDims[3]); - auto dheight = static_cast(dstDims[2]); - auto swidth = static_cast(srcDims[3]); - auto channels = static_cast(srcDims[1]); - - auto src_strides = inBlob->getTensorDesc().getBlockingDesc().getStrides(); - auto dst_strides = outBlob->getTensorDesc().getBlockingDesc().getStrides(); - auto origSrcW = src_strides[2]; - auto origSrcH = src_strides[1] / src_strides[2]; - auto origDstW = dst_strides[2]; - auto origDstH = dst_strides[1] / dst_strides[2]; - - const int src_go_x = 0; - const int src_go_y = 0; - const int dst_go_x = 0; - const int dst_go_y = 0; - auto src_full_width = static_cast(srcDims[3]); - auto src_full_height = static_cast(srcDims[2]); - auto dst_full_width = static_cast(dstDims[3]); - auto dst_full_height = static_cast(dstDims[2]); - - const uint8_t *sptr = static_cast(inBlob->buffer()) + - inBlob->getTensorDesc().getBlockingDesc().getOffsetPadding(); - uint8_t *dptr = static_cast(outBlob->buffer()) + - outBlob->getTensorDesc().getBlockingDesc().getOffsetPadding(); - - auto sstep = static_cast(inBlob->getTensorDesc().getBlockingDesc().getStrides()[2]); - auto dstep = static_cast(outBlob->getTensorDesc().getBlockingDesc().getStrides()[2]); - auto scale_x = static_cast(src_full_width) / dst_full_width; - auto scale_y = static_cast(src_full_height) / dst_full_height; - - const int BITS = 15; - const int SCALE = (1 << BITS); - const int alpha_clones_num = 4; - const int cols_block_size = 8; - const int kRowsBlockSize = 4; - - auto *pxofs1 = reinterpret_cast(buffer); - auto *alpha = reinterpret_cast(pxofs1 + dwidth); - auto *yofs = reinterpret_cast(alpha + dwidth * alpha_clones_num); - auto *beta = reinterpret_cast(yofs + dheight); - auto *tptr = reinterpret_cast(beta + dheight); - - auto tptr_ = tptr; - - tptr_[0] = (uint8_t) border.value; - tptr_[1] = (uint8_t) border.value; - tptr_[2] = (uint8_t) border.value; - tptr_[3] = (uint8_t) border.value; - tptr_[swidth + 0 + 4] = (uint8_t) border.value; - tptr_[swidth + 1 + 4] = (uint8_t) border.value; - tptr_[swidth + 2 + 4] = (uint8_t) border.value; - tptr_[swidth + 3 + 4] = (uint8_t) border.value; - tptr_[swidth * kRowsBlockSize + 0 + 4] = (uint8_t) border.value; - tptr_[swidth * kRowsBlockSize + 1 + 4] = (uint8_t) border.value; - tptr_[swidth * kRowsBlockSize + 2 + 4] = (uint8_t) border.value; - tptr_[swidth * kRowsBlockSize + 3 + 4] = (uint8_t) border.value; - - for (int dx = dst_go_x; dx < dst_go_x + dwidth; dx++) { - auto fx = static_cast((dx + 0.5) * scale_x - 0.5); - int32_t sx = floor(fx); - fx -= sx; - - int32_t sx0 = sx; - if (sx < 0 && border.type == BORDER_REPLICATE) { - fx = 0; - sx0 = 0; - } - - fx = fx * SCALE; - - if (sx >= src_full_width - 1 && border.type == BORDER_REPLICATE) { - fx = 1.f * SCALE - 1; - sx0 = (std::max)(src_full_width - 2, 0); - } - - pxofs1[dx - dst_go_x] = kRowsBlockSize * (sx0 - src_go_x); - for (int i = 0; i < alpha_clones_num; i++) { - alpha[(dx - dst_go_x) * alpha_clones_num + i] = (int16_t) fx; - } - } - - for (int dy = dst_go_y; dy < dst_go_y + dheight; dy++) { - float fy = static_cast((dy + 0.5) * scale_y - 0.5); - int32_t sy = floor(fy); - fy -= sy; - - int32_t sy0 = sy; - if (sy < 0 && border.type == BORDER_REPLICATE) { - fy = 0; - sy0 = 0; - } - - fy = fy * SCALE; - - if (sy >= src_full_height - 1 && border.type == BORDER_REPLICATE) { - fy = 1.f * SCALE - 1; - sy0 = (std::max)(src_full_height - 2, 0); - } - - yofs[dy - dst_go_y] = (sy0 - src_go_y) * sstep; - beta[dy - dst_go_y] = (int16_t) fy; - } - - if (swidth < cols_block_size || dwidth < cols_block_size || dheight < kRowsBlockSize) { - auto full_pass = [&](int c, int y) { - auto sptr_ = sptr + c * origSrcW * origSrcH; - auto dptr_ = dptr + c * origDstW * origDstH; - auto tptr_ = tptr; - - for (int x = 0; x < swidth; x++) { - int val0 = (yofs[y] < 0) ? border.value : sptr_[yofs[y] + x + 0]; - int val1 = (yofs[y] / sstep + 1 >= src_full_height - src_go_y) ? border.value : sptr_[yofs[y] + x + - sstep]; - - int res = val0 + mulq15(beta[y], (int16_t) (val1 - val0)); - tptr_[x + 4] = (uint8_t) res; - } - - for (int x = 0; x < dwidth; x++) { - int val0 = tptr_[pxofs1[x] / kRowsBlockSize + 0 + 4]; - int val1 = tptr_[pxofs1[x] / kRowsBlockSize + 1 + 4]; - - int res = val0 + mulq15(alpha[x * alpha_clones_num], (int16_t) (val1 - val0)); - dptr_[y * dstep + x] = (uint8_t) res; - } - }; - - for (int c = 0; c < channels; c++) { - for (int y = 0; y < dheight; y++) { - full_pass(c, y); - } - } - - return; - } - - auto full_pass_vec = [&](const uint8_t* sptr_, uint8_t* dptr_, uint8_t* tptr_, int y) { - int32_t filtered_rows_id[4]; - for (int i = 0; i < 4; i++) { - filtered_rows_id[i] = (yofs[y + i] < 0) ? 0 : - (yofs[y + i] / sstep >= src_full_height - src_go_y - 1) ? 0 : yofs[y + i]; - } - - __m128i b0 = _mm_set1_epi16(beta[y + 0]); - __m128i b1 = _mm_set1_epi16(beta[y + 1]); - __m128i b2 = _mm_set1_epi16(beta[y + 2]); - __m128i b3 = _mm_set1_epi16(beta[y + 3]); - - int x = 0; - vertical_pass: - for (; x <= swidth - cols_block_size; x += cols_block_size) { - __m128i val0lo = _mm_insert_epi64(_mm_loadl_epi64(reinterpret_cast(sptr_ + x + filtered_rows_id[0])), - *(reinterpret_cast(sptr_ + x + filtered_rows_id[1])), 1); - __m128i val0hi = _mm_insert_epi64(_mm_loadl_epi64(reinterpret_cast(sptr_ + x + filtered_rows_id[2])), - *(reinterpret_cast(sptr_ + x + filtered_rows_id[3])), 1); - __m128i val1lo = _mm_insert_epi64(_mm_loadl_epi64(reinterpret_cast(sptr_ + x + filtered_rows_id[0] + sstep)), - *(reinterpret_cast(sptr_ + x + filtered_rows_id[1] + sstep)), 1); - __m128i val1hi = _mm_insert_epi64(_mm_loadl_epi64(reinterpret_cast(sptr_ + x + filtered_rows_id[2] + sstep)), - *(reinterpret_cast(sptr_ + x + filtered_rows_id[3] + sstep)), 1); - - __m128i val0_0 = _mm_unpacklo_epi8(val0lo, _mm_setzero_si128()); - __m128i val0_1 = _mm_unpackhi_epi8(val0lo, _mm_setzero_si128()); - __m128i val0_2 = _mm_unpacklo_epi8(val0hi, _mm_setzero_si128()); - __m128i val0_3 = _mm_unpackhi_epi8(val0hi, _mm_setzero_si128()); - - __m128i val1_0 = _mm_unpacklo_epi8(val1lo, _mm_setzero_si128()); - __m128i val1_1 = _mm_unpackhi_epi8(val1lo, _mm_setzero_si128()); - __m128i val1_2 = _mm_unpacklo_epi8(val1hi, _mm_setzero_si128()); - __m128i val1_3 = _mm_unpackhi_epi8(val1hi, _mm_setzero_si128()); - - __m128i s0_0 = _mm_sub_epi16(val1_0, val0_0); - __m128i s0_1 = _mm_sub_epi16(val1_1, val0_1); - __m128i s0_2 = _mm_sub_epi16(val1_2, val0_2); - __m128i s0_3 = _mm_sub_epi16(val1_3, val0_3); - - __m128i t0 = _mm_mulhrs_epi16(s0_0, b0); - __m128i t1 = _mm_mulhrs_epi16(s0_1, b1); - __m128i t2 = _mm_mulhrs_epi16(s0_2, b2); - __m128i t3 = _mm_mulhrs_epi16(s0_3, b3); - - __m128i r0 = _mm_add_epi16(val0_0, t0); - __m128i r1 = _mm_add_epi16(val0_1, t1); - __m128i r2 = _mm_add_epi16(val0_2, t2); - __m128i r3 = _mm_add_epi16(val0_3, t3); - - __m128i q0 = _mm_packus_epi16(r0, r1); - __m128i q1 = _mm_packus_epi16(r2, r3); - - __m128i q2 = _mm_blend_epi16(q0, _mm_slli_si128(q1, 4), 0xCC /*0b11001100*/); - __m128i q3 = _mm_blend_epi16(_mm_srli_si128(q0, 4), q1, 0xCC /*0b11001100*/); - - __m128i q4 = _mm_shuffle_epi8(q2, _mm_setr_epi8(0, 8, 4, 12, 1, 9, 5, 13, 2, 10, 6, 14, 3, 11, 7, 15)); - __m128i q5 = _mm_shuffle_epi8(q3, _mm_setr_epi8(0, 8, 4, 12, 1, 9, 5, 13, 2, 10, 6, 14, 3, 11, 7, 15)); - - _mm_storeu_si128(reinterpret_cast<__m128i *>(tptr_ + (x + 0) * kRowsBlockSize + 4), q4); - _mm_storeu_si128(reinterpret_cast<__m128i *>(tptr_ + (x + 4) * kRowsBlockSize + 4), q5); - } - - if (x < swidth) { - x = swidth - cols_block_size; - goto vertical_pass; - } - - if (border.type == BORDER_CONSTANT) { - for (int i = 0; i < kRowsBlockSize; i++) { - if (yofs[y + i] < 0) { - for (x = 0; x < swidth; x++) { - int val0 = border.value; - int val1 = sptr_[yofs[y + i] + x + sstep]; - - int res = val0 + mulq15(beta[y + i], (int16_t) (val1 - val0)); - tptr_[x * 4 + i + 4] = (uint8_t) res; - } - } - - if (yofs[y + i] / sstep >= src_full_height - src_go_y - 1) { - for (x = 0; x < swidth; x++) { - int val0 = sptr_[yofs[y + i] + x]; - int val1 = border.value; - - int res = val0 + mulq15(beta[y + i], (int16_t) (val1 - val0)); - tptr_[x * 4 + i + 4] = (uint8_t) res; - } - } - } - } - - x = 0; - horizontal_pass: - for (; x <= dwidth - cols_block_size; x += cols_block_size) { - __m128i a10 = _mm_loadu_si128(reinterpret_cast(alpha + (x + 0) * alpha_clones_num)); - __m128i a32 = _mm_loadu_si128(reinterpret_cast(alpha + (x + 2) * alpha_clones_num)); - __m128i a54 = _mm_loadu_si128(reinterpret_cast(alpha + (x + 4) * alpha_clones_num)); - __m128i a76 = _mm_loadu_si128(reinterpret_cast(alpha + (x + 6) * alpha_clones_num)); - - __m128i val_0 = _mm_insert_epi64(_mm_loadl_epi64(reinterpret_cast(tptr_ + pxofs1[x + 0] + 4)), - *(reinterpret_cast(tptr_ + pxofs1[x + 1] + 4)), 1); - __m128i val_1 = _mm_insert_epi64(_mm_loadl_epi64(reinterpret_cast(tptr_ + pxofs1[x + 2] + 4)), - *(reinterpret_cast(tptr_ + pxofs1[x + 3] + 4)), 1); - __m128i val_2 = _mm_insert_epi64(_mm_loadl_epi64(reinterpret_cast(tptr_ + pxofs1[x + 4] + 4)), - *(reinterpret_cast(tptr_ + pxofs1[x + 5] + 4)), 1); - __m128i val_3 = _mm_insert_epi64(_mm_loadl_epi64(reinterpret_cast(tptr_ + pxofs1[x + 6] + 4)), - *(reinterpret_cast(tptr_ + pxofs1[x + 7] + 4)), 1); - - val_0 = _mm_shuffle_epi32(val_0, _MM_SHUFFLE(3, 1, 2, 0)); - val_1 = _mm_shuffle_epi32(val_1, _MM_SHUFFLE(3, 1, 2, 0)); - val_2 = _mm_shuffle_epi32(val_2, _MM_SHUFFLE(3, 1, 2, 0)); - val_3 = _mm_shuffle_epi32(val_3, _MM_SHUFFLE(3, 1, 2, 0)); - - __m128i val0_0 = _mm_unpacklo_epi8(val_0, _mm_setzero_si128()); - __m128i val0_1 = _mm_unpacklo_epi8(val_1, _mm_setzero_si128()); - __m128i val0_2 = _mm_unpacklo_epi8(val_2, _mm_setzero_si128()); - __m128i val0_3 = _mm_unpacklo_epi8(val_3, _mm_setzero_si128()); - - __m128i val1_0 = _mm_unpackhi_epi8(val_0, _mm_setzero_si128()); - __m128i val1_1 = _mm_unpackhi_epi8(val_1, _mm_setzero_si128()); - __m128i val1_2 = _mm_unpackhi_epi8(val_2, _mm_setzero_si128()); - __m128i val1_3 = _mm_unpackhi_epi8(val_3, _mm_setzero_si128()); - - val1_0 = _mm_sub_epi16(val1_0, val0_0); - val1_1 = _mm_sub_epi16(val1_1, val0_1); - val1_2 = _mm_sub_epi16(val1_2, val0_2); - val1_3 = _mm_sub_epi16(val1_3, val0_3); - - __m128i t0 = _mm_mulhrs_epi16(val1_0, a10); - __m128i t1 = _mm_mulhrs_epi16(val1_1, a32); - __m128i t2 = _mm_mulhrs_epi16(val1_2, a54); - __m128i t3 = _mm_mulhrs_epi16(val1_3, a76); - - __m128i r0 = _mm_add_epi16(val0_0, t0); - __m128i r1 = _mm_add_epi16(val0_1, t1); - __m128i r2 = _mm_add_epi16(val0_2, t2); - __m128i r3 = _mm_add_epi16(val0_3, t3); - - __m128i q0 = _mm_packus_epi16(r0, r1); - __m128i q1 = _mm_packus_epi16(r2, r3); - - __m128i q2 = _mm_shuffle_epi8(q0, _mm_setr_epi8(0, 4, 8, 12, 2, 6, 10, 14, 1, 5, 9, 13, 3, 7, 11, 15)); - __m128i q3 = _mm_shuffle_epi8(q1, _mm_setr_epi8(0, 4, 8, 12, 2, 6, 10, 14, 1, 5, 9, 13, 3, 7, 11, 15)); - - __m128i q4 = _mm_blend_epi16(q2, _mm_slli_si128(q3, 4), 0xCC /*0b11001100*/); - __m128i q5 = _mm_blend_epi16(_mm_srli_si128(q2, 4), q3, 0xCC /*0b11001100*/); - - _mm_storel_epi64(reinterpret_cast<__m128i *>(dptr_ + (y + 0) * dstep + x), q4); - _mm_storel_epi64(reinterpret_cast<__m128i *>(dptr_ + (y + 1) * dstep + x), _mm_srli_si128(q4, 8)); - _mm_storel_epi64(reinterpret_cast<__m128i *>(dptr_ + (y + 2) * dstep + x), q5); - _mm_storel_epi64(reinterpret_cast<__m128i *>(dptr_ + (y + 3) * dstep + x), _mm_srli_si128(q5, 8)); - } - - if (x < dwidth) { - x = dwidth - cols_block_size; - goto horizontal_pass; - } - }; - - for (int c = 0; c < channels; c++) { - for (int y = 0; y <= dheight - kRowsBlockSize; y += kRowsBlockSize) { - auto sptr_ = sptr + c * origSrcW * origSrcH; - auto dptr_ = dptr + c * origDstW * origDstH; - auto tptr_ = tptr; - - full_pass_vec(sptr_, dptr_, tptr_, y); - - if (y + kRowsBlockSize > dheight - kRowsBlockSize) - full_pass_vec(sptr_, dptr_, tptr_, dheight - kRowsBlockSize); - } - } -} - -void resize_area_u8_downscale(const Blob::Ptr inBlob, Blob::Ptr outBlob, uint8_t* buffer) { - auto dstDims = outBlob->getTensorDesc().getDims(); - auto srcDims = inBlob->getTensorDesc().getDims(); - - auto dwidth = static_cast(dstDims[3]); - auto dheight = static_cast(dstDims[2]); - auto swidth = static_cast(srcDims[3]); - auto sheight = static_cast(srcDims[2]); - auto channels = static_cast(srcDims[1]); - - auto src_strides = inBlob->getTensorDesc().getBlockingDesc().getStrides(); - auto dst_strides = outBlob->getTensorDesc().getBlockingDesc().getStrides(); - auto origSrcW = src_strides[2]; - auto origSrcH = src_strides[1] / src_strides[2]; - auto origDstW = dst_strides[2]; - auto origDstH = dst_strides[1] / dst_strides[2]; - - const int src_go_x = 0; - const int src_go_y = 0; - const int dst_go_x = 0; - const int dst_go_y = 0; - - auto src_full_width = static_cast(srcDims[3]); - auto src_full_height = static_cast(srcDims[2]); - auto dst_full_width = static_cast(dstDims[3]); - auto dst_full_height = static_cast(dstDims[2]); - - auto sptr = static_cast(inBlob->buffer()) + inBlob->getTensorDesc().getBlockingDesc().getOffsetPadding(); - auto dptr = static_cast(outBlob->buffer()) + outBlob->getTensorDesc().getBlockingDesc().getOffsetPadding(); - auto sstep = static_cast(inBlob->getTensorDesc().getBlockingDesc().getStrides()[2]); - auto dstep = static_cast(outBlob->getTensorDesc().getBlockingDesc().getStrides()[2]); - - float scale_x = static_cast(src_full_width) / dst_full_width; - float scale_y = static_cast(src_full_height) / dst_full_height; - - int x_max_count = getResizeAreaTabSize(dst_go_x, src_full_width, dwidth, scale_x); - int y_max_count = getResizeAreaTabSize(dst_go_y, src_full_height, dheight, scale_y); - - auto* xsi = reinterpret_cast(buffer); - auto* ysi = xsi + dwidth; - auto* xalpha = ysi + dheight; - auto* yalpha = xalpha + dwidth*x_max_count + 8*16; - - computeResizeAreaTab(src_go_x, dst_go_x, src_full_width, dwidth, scale_x, xsi, xalpha, x_max_count); - computeResizeAreaTab(src_go_y, dst_go_y, src_full_height, dheight, scale_y, ysi, yalpha, y_max_count); - - int vest_sum_size = 2*swidth; - uint16_t* vert_sum = yalpha + dheight*y_max_count; - uint16_t* alpha0 = vert_sum + vest_sum_size; - uint16_t* alpha1 = alpha0 + dwidth; - uint16_t* alpha2 = alpha1 + dwidth; - uint16_t* alpha3 = alpha2 + dwidth; - uint16_t* sxid0 = alpha3 + dwidth; - uint16_t* sxid1 = sxid0 + 4*dwidth; - uint16_t* sxid2 = sxid1 + 4*dwidth; - uint16_t* sxid3 = sxid2 + 4*dwidth; - - uint16_t* alpha[] = {alpha0, alpha1, alpha2, alpha3}; - uint16_t* sxid[] = {sxid0, sxid1, sxid2, sxid3}; - generate_alpha_and_id_arrays(x_max_count, dwidth, xalpha, xsi, alpha, sxid); - - auto full_pass = [&](int c, int y) { - uint8_t* pdst_row = dptr + (y * dstep) + c * origDstW * origDstH; - uint16_t* vert_sum_ = vert_sum; - - int ysi_row = ysi[y]; - - memset(vert_sum_, 0, swidth * sizeof(uint16_t)); - - for (int dy = 0; dy < y_max_count; dy++) { - uint16_t yalpha_dy = yalpha[y * y_max_count + dy]; - const uint8_t *sptr_dy = sptr + ((ysi_row + dy) * sstep) + c * origSrcW * origSrcH; - if (ysi_row + dy >= sheight) break; - - int x = 0; - - __m128i yalpha_dy_sse = _mm_set1_epi16(yalpha_dy); - for (; x <= swidth - 16; x += 16) { - __m128i sval = _mm_loadu_si128(reinterpret_cast(sptr_dy + x)); - - // sptr_dy[x] << 8 - __m128i sval_Q16_lo = _mm_unpacklo_epi8(_mm_setzero_si128(), sval); - __m128i sval_Q16_hi = _mm_unpackhi_epi8(_mm_setzero_si128(), sval); - - __m128i vert_sum_lo = _mm_loadu_si128(reinterpret_cast(vert_sum_ + x + 0)); - __m128i vert_sum_hi = _mm_loadu_si128(reinterpret_cast(vert_sum_ + x + 8)); - - vert_sum_lo = _mm_add_epi16(vert_sum_lo, _mm_mulhi_epu16(yalpha_dy_sse, sval_Q16_lo)); - vert_sum_hi = _mm_add_epi16(vert_sum_hi, _mm_mulhi_epu16(yalpha_dy_sse, sval_Q16_hi)); - - _mm_storeu_si128(reinterpret_cast<__m128i*>(vert_sum_ + x + 0), vert_sum_lo); - _mm_storeu_si128(reinterpret_cast<__m128i*>(vert_sum_ + x + 8), vert_sum_hi); - } - - for (; x < swidth; x++) { - vert_sum_[x] += mulq16(yalpha_dy, static_cast(sptr_dy[x] << 8)); - } - } - - if (x_max_count == 2) { - int x = 0; - for (; x <= dwidth - 8; x += 8) { - __m128i res = _mm_set1_epi16(1 << (8 - 1)); - - int id0 = xsi[x]; - - __m128i chunk0 = _mm_loadu_si128(reinterpret_cast(vert_sum_ + id0)); - __m128i chunk1 = _mm_loadu_si128(reinterpret_cast(vert_sum_ + id0 + 8)); - - __m128i sx0_id0 = _mm_loadu_si128(reinterpret_cast(sxid0 + x * 2)); - __m128i sx0_id1 = _mm_loadu_si128(reinterpret_cast(sxid0 + x * 2 + 8)); - - __m128i sx1_id0 = _mm_loadu_si128(reinterpret_cast(sxid1 + x * 2)); - __m128i sx1_id1 = _mm_loadu_si128(reinterpret_cast(sxid1 + x * 2 + 8)); - - __m128i vert_sum0 = _mm_or_si128(_mm_shuffle_epi8(chunk0, sx0_id0), - _mm_shuffle_epi8(chunk1, sx0_id1)); - __m128i vert_sum1 = _mm_or_si128(_mm_shuffle_epi8(chunk0, sx1_id0), - _mm_shuffle_epi8(chunk1, sx1_id1)); - - res = _mm_add_epi16(res, _mm_mulhi_epu16(_mm_loadu_si128(reinterpret_cast(alpha0 + x)), vert_sum0)); - res = _mm_add_epi16(res, _mm_mulhi_epu16(_mm_loadu_si128(reinterpret_cast(alpha1 + x)), vert_sum1)); - - res = _mm_srli_epi16(res, 8); - res = _mm_packus_epi16(res, res); - _mm_storel_epi64(reinterpret_cast<__m128i*>(pdst_row + x), res); - } - - for (; x < dwidth; x++) { - uint16_t res = 1 << (8 - 1); - int id = xsi[x]; - res += mulq16(alpha0[x], vert_sum_[id + 0]); - res += mulq16(alpha1[x], vert_sum_[id + 1]); - pdst_row[x] = saturateU32toU8(res >> 8); - } - } else if (x_max_count == 3) { - int x = 0; - for (; x <= dwidth - 8; x += 8) { - __m128i res = _mm_set1_epi16(1 << (8 - 1)); - - int id0 = xsi[x]; - - __m128i chunk0 = _mm_loadu_si128(reinterpret_cast(vert_sum_ + id0)); - __m128i chunk1 = _mm_loadu_si128(reinterpret_cast(vert_sum_ + id0 + 8)); - __m128i chunk2 = _mm_loadu_si128(reinterpret_cast(vert_sum_ + id0 + 16)); - - __m128i sx0_id0 = _mm_loadu_si128(reinterpret_cast(sxid0 + x * 3)); - __m128i sx0_id1 = _mm_loadu_si128(reinterpret_cast(sxid0 + x * 3 + 8)); - __m128i sx0_id2 = _mm_loadu_si128(reinterpret_cast(sxid0 + x * 3 + 16)); - - __m128i sx1_id0 = _mm_loadu_si128(reinterpret_cast(sxid1 + x * 3)); - __m128i sx1_id1 = _mm_loadu_si128(reinterpret_cast(sxid1 + x * 3 + 8)); - __m128i sx1_id2 = _mm_loadu_si128(reinterpret_cast(sxid1 + x * 3 + 16)); - - __m128i sx2_id0 = _mm_loadu_si128(reinterpret_cast(sxid2 + x * 3)); - __m128i sx2_id1 = _mm_loadu_si128(reinterpret_cast(sxid2 + x * 3 + 8)); - __m128i sx2_id2 = _mm_loadu_si128(reinterpret_cast(sxid2 + x * 3 + 16)); - - __m128i vert_sum0 = _mm_or_si128(_mm_or_si128(_mm_shuffle_epi8(chunk0, sx0_id0), - _mm_shuffle_epi8(chunk1, sx0_id1)), - _mm_shuffle_epi8(chunk2, sx0_id2)); - __m128i vert_sum1 = _mm_or_si128(_mm_or_si128(_mm_shuffle_epi8(chunk0, sx1_id0), - _mm_shuffle_epi8(chunk1, sx1_id1)), - _mm_shuffle_epi8(chunk2, sx1_id2)); - __m128i vert_sum2 = _mm_or_si128(_mm_or_si128(_mm_shuffle_epi8(chunk0, sx2_id0), - _mm_shuffle_epi8(chunk1, sx2_id1)), - _mm_shuffle_epi8(chunk2, sx2_id2)); - - res = _mm_add_epi16(res, _mm_mulhi_epu16(_mm_loadu_si128(reinterpret_cast(alpha0 + x)), vert_sum0)); - res = _mm_add_epi16(res, _mm_mulhi_epu16(_mm_loadu_si128(reinterpret_cast(alpha1 + x)), vert_sum1)); - res = _mm_add_epi16(res, _mm_mulhi_epu16(_mm_loadu_si128(reinterpret_cast(alpha2 + x)), vert_sum2)); - - res = _mm_srli_epi16(res, 8); - res = _mm_packus_epi16(res, res); - _mm_storel_epi64(reinterpret_cast<__m128i*>(pdst_row + x), res); - } - - for (; x < dwidth; x++) { - uint16_t res = 1 << (8 - 1); - int id = xsi[x]; - res += mulq16(alpha0[x], vert_sum_[id + 0]); - res += mulq16(alpha1[x], vert_sum_[id + 1]); - res += mulq16(alpha2[x], vert_sum_[id + 2]); - pdst_row[x] = saturateU32toU8(res >> 8); - } - } else if (x_max_count == 4) { - int x = 0; - for (; x <= dwidth - 8; x += 8) { - __m128i res = _mm_set1_epi16(1 << (8 - 1)); - - int id0 = xsi[x]; - - __m128i chunk0 = _mm_loadu_si128(reinterpret_cast(vert_sum_ + id0)); - __m128i chunk1 = _mm_loadu_si128(reinterpret_cast(vert_sum_ + id0 + 8)); - __m128i chunk2 = _mm_loadu_si128(reinterpret_cast(vert_sum_ + id0 + 16)); - __m128i chunk3 = _mm_loadu_si128(reinterpret_cast(vert_sum_ + id0 + 24)); - - __m128i sx0_id0 = _mm_loadu_si128(reinterpret_cast(sxid0 + x * 4)); - __m128i sx0_id1 = _mm_loadu_si128(reinterpret_cast(sxid0 + x * 4 + 8)); - __m128i sx0_id2 = _mm_loadu_si128(reinterpret_cast(sxid0 + x * 4 + 16)); - __m128i sx0_id3 = _mm_loadu_si128(reinterpret_cast(sxid0 + x * 4 + 24)); - - __m128i sx1_id0 = _mm_loadu_si128(reinterpret_cast(sxid1 + x * 4)); - __m128i sx1_id1 = _mm_loadu_si128(reinterpret_cast(sxid1 + x * 4 + 8)); - __m128i sx1_id2 = _mm_loadu_si128(reinterpret_cast(sxid1 + x * 4 + 16)); - __m128i sx1_id3 = _mm_loadu_si128(reinterpret_cast(sxid1 + x * 4 + 24)); - - __m128i sx2_id0 = _mm_loadu_si128(reinterpret_cast(sxid2 + x * 4)); - __m128i sx2_id1 = _mm_loadu_si128(reinterpret_cast(sxid2 + x * 4 + 8)); - __m128i sx2_id2 = _mm_loadu_si128(reinterpret_cast(sxid2 + x * 4 + 16)); - __m128i sx2_id3 = _mm_loadu_si128(reinterpret_cast(sxid2 + x * 4 + 24)); - - __m128i sx3_id0 = _mm_loadu_si128(reinterpret_cast(sxid3 + x * 4)); - __m128i sx3_id1 = _mm_loadu_si128(reinterpret_cast(sxid3 + x * 4 + 8)); - __m128i sx3_id2 = _mm_loadu_si128(reinterpret_cast(sxid3 + x * 4 + 16)); - __m128i sx3_id3 = _mm_loadu_si128(reinterpret_cast(sxid3 + x * 4 + 24)); - - __m128i vert_sum0 = _mm_or_si128(_mm_or_si128(_mm_shuffle_epi8(chunk0, sx0_id0), - _mm_shuffle_epi8(chunk1, sx0_id1)), - _mm_or_si128(_mm_shuffle_epi8(chunk2, sx0_id2), - _mm_shuffle_epi8(chunk3, sx0_id3))); - __m128i vert_sum1 = _mm_or_si128(_mm_or_si128(_mm_shuffle_epi8(chunk0, sx1_id0), - _mm_shuffle_epi8(chunk1, sx1_id1)), - _mm_or_si128(_mm_shuffle_epi8(chunk2, sx1_id2), - _mm_shuffle_epi8(chunk3, sx1_id3))); - __m128i vert_sum2 = _mm_or_si128(_mm_or_si128(_mm_shuffle_epi8(chunk0, sx2_id0), - _mm_shuffle_epi8(chunk1, sx2_id1)), - _mm_or_si128(_mm_shuffle_epi8(chunk2, sx2_id2), - _mm_shuffle_epi8(chunk3, sx2_id3))); - __m128i vert_sum3 = _mm_or_si128(_mm_or_si128(_mm_shuffle_epi8(chunk0, sx3_id0), - _mm_shuffle_epi8(chunk1, sx3_id1)), - _mm_or_si128(_mm_shuffle_epi8(chunk2, sx3_id2), - _mm_shuffle_epi8(chunk3, sx3_id3))); - - res = _mm_add_epi16(res, _mm_mulhi_epu16(_mm_loadu_si128(reinterpret_cast(alpha0 + x)), vert_sum0)); - res = _mm_add_epi16(res, _mm_mulhi_epu16(_mm_loadu_si128(reinterpret_cast(alpha1 + x)), vert_sum1)); - res = _mm_add_epi16(res, _mm_mulhi_epu16(_mm_loadu_si128(reinterpret_cast(alpha2 + x)), vert_sum2)); - res = _mm_add_epi16(res, _mm_mulhi_epu16(_mm_loadu_si128(reinterpret_cast(alpha3 + x)), vert_sum3)); - - res = _mm_srli_epi16(res, 8); - res = _mm_packus_epi16(res, res); - _mm_storel_epi64(reinterpret_cast<__m128i*>(pdst_row + x), res); - } - - for (; x < dwidth; x++) { - uint16_t res = 1 << (8 - 1); - int id = xsi[x]; - res += mulq16(alpha0[x], vert_sum_[id + 0]); - res += mulq16(alpha1[x], vert_sum_[id + 1]); - res += mulq16(alpha2[x], vert_sum_[id + 2]); - res += mulq16(alpha3[x], vert_sum_[id + 3]); - pdst_row[x] = saturateU32toU8(res >> 8); - } - } else if (x_max_count <= 7) { - int x = 0; - for (; x <= dwidth - 8; x += 8) { - __m128i res = _mm_set1_epi16(1 << (16 - 8 - 1)); - for (int i = 0; i < x_max_count; i++) { - __m128i valpha = _mm_setr_epi16(xalpha[x * x_max_count + x_max_count * 0 + i], - xalpha[x * x_max_count + x_max_count * 1 + i], - xalpha[x * x_max_count + x_max_count * 2 + i], - xalpha[x * x_max_count + x_max_count * 3 + i], - xalpha[x * x_max_count + x_max_count * 4 + i], - xalpha[x * x_max_count + x_max_count * 5 + i], - xalpha[x * x_max_count + x_max_count * 6 + i], - xalpha[x * x_max_count + x_max_count * 7 + i]); - __m128i vvert_sum = _mm_setr_epi16(vert_sum_[xsi[x + 0] + i], - vert_sum_[xsi[x + 1] + i], - vert_sum_[xsi[x + 2] + i], - vert_sum_[xsi[x + 3] + i], - vert_sum_[xsi[x + 4] + i], - vert_sum_[xsi[x + 5] + i], - vert_sum_[xsi[x + 6] + i], - vert_sum_[xsi[x + 7] + i]); - - res = _mm_add_epi16(res, _mm_mulhi_epu16(valpha, vvert_sum)); - } - res = _mm_srli_epi16(res, 8); - res = _mm_packus_epi16(res, res); - _mm_storel_epi64(reinterpret_cast<__m128i*>(pdst_row + x), res); - } - - for (; x < dwidth; x++) { - uint16_t res = 1 << (8 - 1); - for (int i = 0; i < x_max_count; i++) { - uint16_t a = xalpha[x * x_max_count + i]; - int sx = xsi[x] + i; - - res += mulq16(a, vert_sum_[sx]); - } - pdst_row[x] = saturateU32toU8(res >> 8); - } - } else { - for (int x = 0; x < dwidth; x++) { - uint16_t res = 1 << (8 - 1); - __m128i vres = _mm_setzero_si128(); - int id = xsi[x]; - - int i = 0; - for (; i <= x_max_count - 8; i += 8) { - __m128i a = _mm_loadu_si128(reinterpret_cast(xalpha + x * x_max_count + i)); - __m128i s = _mm_loadu_si128(reinterpret_cast(vert_sum_ + id + i)); - - vres = _mm_add_epi16(vres, _mm_mulhi_epu16(a, s)); - } - vres = _mm_add_epi16(vres, _mm_slli_si128(vres, 2)); - vres = _mm_add_epi16(vres, _mm_slli_si128(vres, 4)); - vres = _mm_add_epi16(vres, _mm_slli_si128(vres, 8)); - res += static_cast(_mm_extract_epi16(vres, 7)); - - for (; i < x_max_count; i++) { - uint16_t a = xalpha[x * x_max_count + i]; - uint16_t s = vert_sum_[id + i]; - - res += mulq16(a, s); - } - - pdst_row[x] = saturateU32toU8(res >> 8); - } - } - }; - - for (int c = 0; c < channels; c++) { - for (int y = 0; y < dheight; y++) { - full_pass(c, y); - } - } -} - -} // namespace Resize -} // namespace InferenceEngine diff --git a/inference-engine/src/preprocessing/cpu_x86_sse42/ie_preprocess_data_sse42.hpp b/inference-engine/src/preprocessing/cpu_x86_sse42/ie_preprocess_data_sse42.hpp deleted file mode 100644 index 92f5d9348ec6ba..00000000000000 --- a/inference-engine/src/preprocessing/cpu_x86_sse42/ie_preprocess_data_sse42.hpp +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#pragma once - -#include "ie_blob.h" - -#include - -namespace InferenceEngine { - -void resize_bilinear_u8(const Blob::Ptr inBlob, Blob::Ptr outBlob, uint8_t* buffer); - -void resize_area_u8_downscale(const Blob::Ptr inBlob, Blob::Ptr outBlob, uint8_t* buffer); - -} diff --git a/inference-engine/src/preprocessing/ie_preprocess_data.cpp b/inference-engine/src/preprocessing/ie_preprocess_data.cpp index 660dc350bd8d45..e8bb20d2f8a9cd 100644 --- a/inference-engine/src/preprocessing/ie_preprocess_data.cpp +++ b/inference-engine/src/preprocessing/ie_preprocess_data.cpp @@ -4,753 +4,16 @@ #include "ie_preprocess_gapi.hpp" #include "ie_system_conf.h" -#include "blob_transform.hpp" #include "ie_preprocess_data.hpp" #include "ie_preprocess_itt.hpp" -#ifdef HAVE_SSE -# include "cpu_x86_sse42/ie_preprocess_data_sse42.hpp" -#endif - #include "debug.h" -#include "ie_compound_blob.h" #include #include -#include namespace InferenceEngine { - -namespace Resize { - -template static inline data_t saturate_cast(float res); - -template<> inline float saturate_cast(float res) { - return res; -} - -template<> inline uint8_t saturate_cast(float res) { - int ires = static_cast((std::round)(res)); - return static_cast((std::max)(0, (std::min)(255, ires))); -} - -template -void resize_bilinear(const Blob::Ptr inBlob, Blob::Ptr outBlob, uint8_t* buffer) { - Border border = {BORDER_REPLICATE, 0}; - - auto dstDims = outBlob->getTensorDesc().getDims(); - auto srcDims = inBlob->getTensorDesc().getDims(); - - auto dwidth = static_cast(dstDims[3]); - auto dheight = static_cast(dstDims[2]); - auto swidth = static_cast(srcDims[3]); - auto channels = static_cast(srcDims[1]); - - auto src_strides = inBlob->getTensorDesc().getBlockingDesc().getStrides(); - auto dst_strides = outBlob->getTensorDesc().getBlockingDesc().getStrides(); - auto origSrcW = src_strides[2]; - auto origSrcH = src_strides[1] / src_strides[2]; - auto origDstW = dst_strides[2]; - auto origDstH = dst_strides[1] / dst_strides[2]; - - const int src_go_x = 0; - const int src_go_y = 0; - const int dst_go_x = 0; - const int dst_go_y = 0; - auto src_full_width = static_cast(srcDims[3]); - auto src_full_height = static_cast(srcDims[2]); - auto dst_full_width = static_cast(dstDims[3]); - auto dst_full_height = static_cast(dstDims[2]); - - auto *sptr = static_cast(inBlob->buffer()) + inBlob->getTensorDesc().getBlockingDesc().getOffsetPadding(); - auto *dptr = static_cast(outBlob->buffer()) + outBlob->getTensorDesc().getBlockingDesc().getOffsetPadding(); - auto sstep = static_cast(inBlob->getTensorDesc().getBlockingDesc().getStrides()[2]); - auto dstep = static_cast(outBlob->getTensorDesc().getBlockingDesc().getStrides()[2]); - auto scale_x = static_cast(src_full_width) / dst_full_width; - auto scale_y = static_cast(src_full_height) / dst_full_height; - - auto* xofs = reinterpret_cast(buffer); - auto* yofs = xofs + dwidth; - auto* alpha = reinterpret_cast(yofs + dheight); - auto* beta = alpha + dwidth; - auto* tptr = beta + dheight; - - for (int dx = dst_go_x; dx < dst_go_x + dwidth; dx++) { - auto fx = static_cast((dx + 0.5) * scale_x - 0.5); - int32_t sx = static_cast(floor(fx)); - fx -= sx; - - int32_t sx0 = sx; - if (sx < 0 && border.type == BORDER_REPLICATE) { - fx = 0; - sx0 = 0; - } - - if (sx >= src_full_width - 1 && border.type == BORDER_REPLICATE) { - fx = 1.f; - sx0 = (std::max)(src_full_width - 2, 0); - } - - xofs[dx - dst_go_x] = sx0 - src_go_x; - alpha[dx - dst_go_x] = fx; - } - - for (int dy = dst_go_y; dy < dst_go_y + dheight; dy++) { - auto fy = static_cast((dy + 0.5) * scale_y - 0.5); - int32_t sy = static_cast(floor(fy)); - fy -= sy; - - int32_t sy0 = sy; - if (sy < 0 && border.type == BORDER_REPLICATE) { - fy = 0; - sy0 = 0; - } - - if (sy >= src_full_height - 1 && border.type == BORDER_REPLICATE) { - fy = 1.f; - sy0 = (std::max)(src_full_height - 2, 0); - } - - yofs[dy - dst_go_y] = sy0 - src_go_y; - beta[dy - dst_go_y] = fy; - } - - auto full_pass = [&](int c, int y) { - auto sptr_ = sptr + c * origSrcW * origSrcH; - auto dptr_ = dptr + c * origDstW * origDstH; - auto tptr_ = tptr; - - for (int x = 0; x < swidth; x++) { - bool use_constant0 = yofs[y] + 0 < 0 || yofs[y] + 0 >= src_full_height; - bool use_constant1 = yofs[y] + 1 < 0 || yofs[y] + 1 >= src_full_height; - float val0 = static_cast(use_constant0 ? border.value : sptr_[(yofs[y] + 0) * sstep + x]); - float val1 = static_cast(use_constant1 ? border.value : sptr_[(yofs[y] + 1) * sstep + x]); - - float res = val0 + beta[y] * (val1 - val0); - tptr_[x] = res; - } - - for (int x = 0; x < dwidth; x++) { - bool use_constant0 = xofs[x] + 0 < 0 || xofs[x] + 0 >= src_full_width; - bool use_constant1 = xofs[x] + 1 < 0 || xofs[x] + 1 >= src_full_width; - float val0 = use_constant0 ? border.value : tptr_[xofs[x] + 0]; - float val1 = use_constant1 ? border.value : tptr_[xofs[x] + 1]; - - float res = val0 + alpha[x] * (val1 - val0); - dptr_[y * dstep + x] = saturate_cast(res); - } - }; - - for (int c = 0; c < channels; c++) { - for (int y = 0; y < dheight; y++) { - full_pass(c, y); - } - } -} - -int getResizeAreaTabSize(int dst_go, int ssize, int dsize, float scale) { - static const float threshold = 1e-3f; - int max_count = 0; - - for (int col = dst_go; col < dst_go + dsize; col++) { - int count = 0; - - float fsx1 = col * scale; - float fsx2 = fsx1 + scale; - - int sx1 = static_cast(ceil(fsx1)); - int sx2 = static_cast(floor(fsx2)); - - sx2 = (std::min)(sx2, ssize - 1); - sx1 = (std::min)(sx1, sx2); - - if (sx1 - fsx1 > threshold) { - count++; - } - - for (int sx = sx1; sx < sx2; sx++) { - count++; - } - - if (fsx2 - sx2 > threshold) { - count++; - } - max_count = (std::max)(max_count, count); - } - - return max_count; -} - -void computeResizeAreaTab(int src_go, int dst_go, int ssize, int dsize, float scale, - uint16_t* si, uint16_t* alpha, int max_count) { - static const float threshold = 1e-3f; - int k = 0; - - for (int col = dst_go; col < dst_go + dsize; col++) { - int count = 0; - - float fsx1 = col * scale; - float fsx2 = fsx1 + scale; - float cellWidth = (std::min)(scale, ssize - fsx1); - - int sx1 = static_cast(ceil(fsx1)); - int sx2 = static_cast(floor(fsx2)); - - sx2 = (std::min)(sx2, ssize - 1); - sx1 = (std::min)(sx1, sx2); - - si[col - dst_go] = (uint16_t)(sx1 - src_go); - - if (sx1 - fsx1 > threshold) { - si[col - dst_go] = (uint16_t)(sx1 - src_go - 1); - alpha[k++] = (uint16_t)((1 << 16) * ((sx1 - fsx1) / cellWidth)); - count++; - } - - for (int sx = sx1; sx < sx2; sx++) { - alpha[k++] = (uint16_t)((1 << 16) * (1.0f / cellWidth)); - count++; - } - - if (fsx2 - sx2 > threshold) { - alpha[k++] = (uint16_t)((1 << 16) * ((std::min)((std::min)(fsx2 - sx2, 1.f), cellWidth) / cellWidth)); - count++; - } - - if (count != max_count) { - alpha[k++] = 0; - } - } -} - -void generate_alpha_and_id_arrays(int x_max_count, int dcols, const uint16_t* xalpha, uint16_t* xsi, - uint16_t** alpha, uint16_t** sxid) { - if (x_max_count <= 4) { - for (int col = 0; col < dcols; col++) { - for (int x = 0; x < x_max_count; x++) { - alpha[x][col] = xalpha[col*x_max_count + x]; - } - } - } - if (x_max_count <= 4) { - for (int col = 0; col <= dcols - 8; col += 8) { - for (int chunk_num_h = 0; chunk_num_h < x_max_count; chunk_num_h++) { - for (int i = 0; i < 128 / 16; i++) { - int id_diff = xsi[col + i] - xsi[col]; - - for (int chunk_num_v = 0; chunk_num_v < x_max_count; chunk_num_v++) { - uint16_t* sxidp = sxid[chunk_num_v] + col * x_max_count + chunk_num_h * 8; - - int id0 = (id_diff + chunk_num_v) * 2 + 0; - int id1 = (id_diff + chunk_num_v) * 2 + 1; - - (reinterpret_cast(sxidp + i))[0] = static_cast(id0 >= (chunk_num_h * 16) && id0 < (chunk_num_h + 1) * 16 ? id0 : -1); - (reinterpret_cast(sxidp + i))[1] = static_cast(id1 >= (chunk_num_h * 16) && id1 < (chunk_num_h + 1) * 16 ? id1 : -1); - } - } - } - } - } -} - -int computeResizeAreaTabFP32(int src_go, int dst_go, int ssize, int dsize, float scale, uint16_t* si, uint16_t* di, float* alpha) { - static const float threshold = 1e-3f; - int k = 0; - - for (int col = dst_go; col < dst_go + dsize; col++) { - float fsx1 = col * scale; - float fsx2 = fsx1 + scale; - float cellWidth = (std::min)(scale, ssize - fsx1); - - int sx1 = static_cast(ceil(fsx1)); - int sx2 = static_cast(floor(fsx2)); - - sx2 = (std::min)(sx2, ssize - 1); - sx1 = (std::min)(sx1, sx2); - - if (sx1 - fsx1 > threshold) { - di[k] = (uint16_t)(col - dst_go); - si[k] = (uint16_t)(sx1 - src_go - 1); - alpha[k++] = (sx1 - fsx1) / cellWidth; - } - - for (int sx = sx1; sx < sx2; sx++) { - di[k] = (uint16_t)(col - dst_go); - si[k] = (uint16_t)(sx - src_go); - alpha[k++] = 1.0f / cellWidth; - } - - if (fsx2 - sx2 > threshold) { - di[k] = (uint16_t)(col - dst_go); - si[k] = (uint16_t)(sx2 - src_go); - alpha[k++] = (std::min)((std::min)(fsx2 - sx2, 1.f), cellWidth) / cellWidth; - } - } - return k; -} - -template -void resize_area_downscale(const Blob::Ptr inBlob, Blob::Ptr outBlob, uint8_t* buffer) { - auto dstDims = outBlob->getTensorDesc().getDims(); - auto srcDims = inBlob->getTensorDesc().getDims(); - - auto src_strides = inBlob->getTensorDesc().getBlockingDesc().getStrides(); - auto dst_strides = outBlob->getTensorDesc().getBlockingDesc().getStrides(); - auto origSrcW = src_strides[2]; - auto origSrcH = src_strides[1] / src_strides[2]; - auto origDstW = dst_strides[2]; - auto origDstH = dst_strides[1] / dst_strides[2]; - - auto dwidth = static_cast(dstDims[3]); - auto dheight = static_cast(dstDims[2]); - auto swidth = static_cast(srcDims[3]); - auto sheight = static_cast(srcDims[2]); - auto channels = static_cast(srcDims[1]); - - const int src_go_x = 0; - const int src_go_y = 0; - const int dst_go_x = 0; - const int dst_go_y = 0; - - auto src_full_width = static_cast(srcDims[3]); - auto src_full_height = static_cast(srcDims[2]); - auto dst_full_width = static_cast(dstDims[3]); - auto dst_full_height = static_cast(dstDims[2]); - - auto* sptr = static_cast(inBlob->buffer()) + inBlob->getTensorDesc().getBlockingDesc().getOffsetPadding(); - auto* dptr = static_cast(outBlob->buffer()) + outBlob->getTensorDesc().getBlockingDesc().getOffsetPadding(); - - auto sstep = static_cast(src_strides[2]); - auto dstep = static_cast(dst_strides[2]); - - float scale_x = static_cast(src_full_width) / dst_full_width; - float scale_y = static_cast(src_full_height) / dst_full_height; - - int vert_sum_size = swidth; - int tabofs_size = (std::max)(2*swidth, 2*dwidth); - int xsi_size = (std::max)(2*swidth, 2*dwidth); - int xdi_size = (std::max)(2*swidth, 2*dwidth); - int ysi_size = (std::max)(2*sheight, 2*dheight); - int ydi_size = (std::max)(2*sheight, 2*dheight); - int xalpha_size = (std::max)(2*swidth, 2*dwidth); - - auto vert_sum = reinterpret_cast(buffer); - auto tabofs = reinterpret_cast(vert_sum + vert_sum_size); - auto xsi = reinterpret_cast(tabofs + tabofs_size + 1); - auto xdi = xsi + xsi_size; - auto ysi = xdi + xdi_size; - auto ydi = ysi + ysi_size; - auto xalpha = reinterpret_cast(ydi + ydi_size); - auto yalpha = xalpha + xalpha_size; - - int ytab_size = computeResizeAreaTabFP32(src_go_y, dst_go_y, src_full_height, dheight, scale_y, ysi, ydi, yalpha); - int xtab_size = computeResizeAreaTabFP32(src_go_x, dst_go_x, src_full_width, dwidth, scale_x, xsi, xdi, xalpha); - - int dy_ = 0; - for (int i = 0; i < ytab_size && dy_ < dwidth*2; i++) { - if (i == 0 || ydi[i] != ydi[i-1]) { - tabofs[dy_++] = i; - } - } - tabofs[dy_] = ytab_size; - - auto full_pass = [&](const data_t* sptr_, data_t* dptr_, int y) { - auto vert_sum_ = vert_sum; - - memset(vert_sum_, 0, swidth * sizeof(float)); - - data_t *pdst = dptr_ + y * dstep; - - for (int dy = tabofs[y]; dy < tabofs[y + 1] && dy < ytab_size; dy++) { - float beta = yalpha[dy]; - int sy = ysi[dy]; - - const data_t *psrc = sptr_ + sy * sstep; - for (int x = 0; x < swidth; x++) { - vert_sum_[x] += beta * psrc[x]; - } - } - - int xtab_ind = 0; - for (int x = 0; x < dwidth; x++) { - float res = 0.f; - int dx = 0; - for (; x == xdi[xtab_ind + dx] && xtab_ind + dx < xtab_size; dx++) { - float alpha = xalpha[xtab_ind + dx]; - int sx = xsi[xtab_ind + dx]; - - res += alpha * vert_sum_[sx]; - } - - pdst[x] = saturate_cast(res); - xtab_ind += dx; - } - }; - - for (int ch = 0; ch < channels; ch++) { - for (int y = 0; y < dheight; y++) { - auto sptr_ = sptr + ch * origSrcH * origSrcW; - auto dptr_ = dptr + ch * origDstH * origDstW; - - full_pass(sptr_, dptr_, y); - } - } -} - -inline int clip(int x, int a, int b) { - return x >= a ? (x < b ? x : b-1) : a; -} - -const int MAX_ESIZE = 16; - -template -void HResizeLinear(const data_t** src, float** dst, int count, const int* xofs, const float* alpha, - int swidth, int dwidth, int cn, int xmin, int xmax ) { - int dx, k; - int dx0 = 0; - - for (k = 0; k <= count - 2; k++) { - const data_t *S0 = src[k], *S1 = src[k+1]; - float *D0 = dst[k], *D1 = dst[k+1]; - for (dx = dx0; dx < xmax; dx++) { - int sx = xofs[dx]; - float a0 = alpha[dx*2], a1 = alpha[dx*2+1]; - float t0 = static_cast(S0[sx])*a0 + static_cast(S0[sx + cn])*a1; - float t1 = static_cast(S1[sx])*a0 + static_cast(S1[sx + cn])*a1; - D0[dx] = t0; D1[dx] = t1; - } - - for (; dx < dwidth; dx++) { - int sx = xofs[dx]; - D0[dx] = static_cast(S0[sx]); D1[dx] = static_cast(S1[sx]); - } - } - - for (; k < count; k++) { - const data_t *S = src[k]; - float *D = dst[k]; - for (dx = 0; dx < xmax; dx++) { - int sx = xofs[dx]; - D[dx] = static_cast(S[sx])*alpha[dx*2] + static_cast(S[sx+cn])*alpha[dx*2+1]; - } - - for (; dx < dwidth; dx++) - D[dx] = static_cast(S[xofs[dx]]); - } -} - -template -void VResizeLinear(float** src, data_t* dst, const float* beta, int width) { - float b0 = beta[0], b1 = beta[1]; - const float *S0 = src[0], *S1 = src[1]; - - if (sizeof(data_t) == 4) { - for (int x = 0; x < width; x++) - dst[x] = static_cast(S0[x] * b0 + S1[x] * b1); - } else { - for (int x = 0; x < width; x++) - dst[x] = saturateU32toU8(static_cast(S0[x] * b0 + S1[x] * b1)); - } -} - -template -static void resize_area_upscale(const Blob::Ptr inBlob, Blob::Ptr outBlob, uint8_t* buffer) { - auto dstDims = outBlob->getTensorDesc().getDims(); - auto srcDims = inBlob->getTensorDesc().getDims(); - - auto src_strides = inBlob->getTensorDesc().getBlockingDesc().getStrides(); - auto dst_strides = outBlob->getTensorDesc().getBlockingDesc().getStrides(); - auto origSrcW = src_strides[2]; - auto origSrcH = src_strides[1] / src_strides[2]; - auto origDstW = dst_strides[2]; - auto origDstH = dst_strides[1] / dst_strides[2]; - - auto dwidth = static_cast(dstDims[3]); - auto dheight = static_cast(dstDims[2]); - auto swidth = static_cast(srcDims[3]); - auto sheight = static_cast(srcDims[2]); - auto channels = static_cast(srcDims[1]); - - auto src_full_width = static_cast(srcDims[3]); - auto src_full_height = static_cast(srcDims[2]); - auto dst_full_width = static_cast(dstDims[3]); - auto dst_full_height = static_cast(dstDims[2]); - - auto sptr = static_cast(inBlob->buffer()) + inBlob->getTensorDesc().getBlockingDesc().getOffsetPadding(); - auto dptr = static_cast(outBlob->buffer()) + outBlob->getTensorDesc().getBlockingDesc().getOffsetPadding(); - - auto sstep = static_cast(src_strides[2]); - auto dstep = static_cast(dst_strides[2]); - - float scale_x = static_cast(src_full_width) / dst_full_width; - float scale_y = static_cast(src_full_height) / dst_full_height; - float inv_scale_x = static_cast(dst_full_width) / src_full_width; - float inv_scale_y = static_cast(dst_full_height) / src_full_height; - - int xmin = 0, xmax = dwidth, width = dwidth; - int ksize = 2; - int ksize2 = ksize/2; - - auto xofs = reinterpret_cast(buffer); - auto yofs = xofs + width; - auto alpha = reinterpret_cast(yofs + dheight); - auto beta = alpha + width*ksize; - float cbuf[2] = {0}; - - for (int dx = 0; dx < dwidth; dx++) { - int sx = static_cast(floor(dx*scale_x)); - float fx = (dx+1) - (sx+1)*inv_scale_x; - fx = fx <= 0 ? 0.f : fx - floor(fx); - - if (sx < ksize2-1) { - xmin = dx+1; - if (sx < 0) - fx = 0, sx = 0; - } - - if (sx + ksize2 >= swidth) { - xmax = (std::min)(xmax, dx); - if (sx >= swidth-1) - fx = 0, sx = swidth-1; - } - - xofs[dx] = sx; - - cbuf[0] = 1.f - fx; - cbuf[1] = fx; - - for (int k = 0; k < ksize; k++) - alpha[dx*ksize + k] = cbuf[k]; - } - - for (int dy = 0; dy < dheight; dy++) { - int sy = static_cast(floor(dy*scale_y)); - float fy = (dy+1) - (sy+1)*inv_scale_y; - fy = fy <= 0 ? 0.f : fy - floor(fy); - - yofs[dy] = sy; - cbuf[0] = 1.f - fy; - cbuf[1] = fy; - - for (int k = 0; k < ksize; k++) - beta[dy*ksize + k] = cbuf[k]; - } - - auto full_pass = [&](const data_t* sptr_, data_t* dptr_, int dy) { - int bufstep = dwidth; - const data_t* srows[MAX_ESIZE]={0}; - float* rows[MAX_ESIZE]={0}; - int prev_sy[MAX_ESIZE]; - - for (int k = 0; k < ksize; k++) { - prev_sy[k] = -1; - rows[k] = reinterpret_cast(buffer + (width + dheight)*(sizeof(int) + sizeof(float)*ksize)) - + k*bufstep; - } - - int sy0 = yofs[dy], k0 = ksize, k1 = 0; - - for (int k = 0; k < ksize; k++) { - int sy = clip(sy0 - ksize2 + 1 + k, 0, sheight); - for (k1 = (std::max)(k1, k); k1 < ksize; k1++) { - if (k1 < MAX_ESIZE && sy == prev_sy[k1]) { - if (k1 > k) - memcpy(rows[k], rows[k1], bufstep*sizeof(rows[0][0])); - break; - } - } - - if (k1 == ksize) - k0 = (std::min)(k0, k); - srows[k] = sptr_ + sy * sstep; - prev_sy[k] = sy; - } - - if (k0 < ksize) - HResizeLinear(srows + k0, reinterpret_cast(rows + k0), ksize - k0, xofs, - reinterpret_cast(alpha), swidth, dwidth, 1, xmin, xmax); - - VResizeLinear(reinterpret_cast(rows), dptr_ + dstep*dy, beta + dy*ksize, dwidth); - }; - - for (int ch = 0; ch < channels; ch++) { - for (int dy = 0; dy < dheight; dy++) { - auto sptr_ = sptr + ch * origSrcH * origSrcW; - auto dptr_ = dptr + ch * origDstH * origDstW; - - full_pass(sptr_, dptr_, dy); - } - } -} - -size_t resize_get_buffer_size(Blob::Ptr inBlob, Blob::Ptr outBlob, const ResizeAlgorithm &algorithm) { - auto dstDims = outBlob->getTensorDesc().getDims(); - auto srcDims = inBlob->getTensorDesc().getDims(); - - SizeVector strides = inBlob->getTensorDesc().getBlockingDesc().getStrides(); - size_t origW = strides[2]; - size_t origH = strides[1] / strides[2]; - - const int src_full_width = static_cast(origW); - const int src_full_height = static_cast(origH); - const int dst_full_width = static_cast(dstDims[3]); - const int dst_full_height = static_cast(dstDims[2]); - - float scale_x = static_cast(dstDims[3]) / srcDims[3]; - float scale_y = static_cast(dstDims[2]) / srcDims[2]; - - auto resize_bilinear_u8_buffer_size = [&]() { - size_t buffer_size = (sizeof(int16_t) * 4 + sizeof(uint8_t *)) * dstDims[3] + - (sizeof(int32_t) + sizeof(int16_t)) * dstDims[2] + - sizeof(uint32_t) * dstDims[3] + - (((srcDims[3] + 7) / 8) * 8 * 8) + - sizeof(uint8_t) * 12; - - return buffer_size; - }; - - auto resize_bilinear_fp32_buffer_size = [&]() { - size_t buffer_size = (sizeof(float) + sizeof(float *)) * dstDims[3] + - (sizeof(int32_t) + sizeof(float)) * dstDims[2] + - (((srcDims[3] + 1) / 2) * 2 * 2) * sizeof(float); - - return buffer_size; - }; - - auto resize_area_u8_downscale_sse_buffer_size = [&]() { - const int dwidth = static_cast(dstDims[3]); - const int dheight = static_cast(dstDims[2]); - const int swidth = static_cast(srcDims[3]); - - const int dst_go_x = 0; - const int dst_go_y = 0; - - int x_max_count = getResizeAreaTabSize(dst_go_x, src_full_width, dwidth, static_cast(src_full_width) / dst_full_width) + 1; - int y_max_count = getResizeAreaTabSize(dst_go_y, src_full_height, dheight, static_cast(src_full_height) / dst_full_height) + 1; - - size_t si_buf_size = sizeof(uint16_t) * dwidth + sizeof(uint16_t) * dheight; - size_t alpha_buf_size = - sizeof(uint16_t) * (dwidth * x_max_count + 8 * 16) + sizeof(uint16_t) * dheight * y_max_count; - size_t vert_sum_buf_size = sizeof(uint16_t) * (swidth * 2); - size_t alpha_array_buf_size = sizeof(uint16_t) * 4 * dwidth; - size_t sxid_array_buf_size = sizeof(uint16_t) * 4 * 4 * dwidth; - - size_t buffer_size = si_buf_size + - alpha_buf_size + - vert_sum_buf_size + - alpha_array_buf_size + - sxid_array_buf_size; - - return buffer_size; - }; - - auto resize_area_downscale_buffer_size = [&]() { - size_t buffer_size = sizeof(float) * (srcDims[3]) + - sizeof(uint32_t) * (dstDims[3] * 2 + 1) + - sizeof(float) * ((srcDims[3] + srcDims[2]) * 4) + - sizeof(float) * ((srcDims[3] + srcDims[2]) * 2); - - return buffer_size; - }; - - auto resize_area_upscale_buffer_size = [&]() { - size_t buffer_size = (dstDims[3] + dstDims[2])*(sizeof(int) + sizeof(float)*2) + 2*dstDims[3] * sizeof(float); - - return buffer_size; - }; - - if (algorithm == RESIZE_BILINEAR) { - if (inBlob->getTensorDesc().getPrecision() == Precision::U8) { - return resize_bilinear_u8_buffer_size(); - } else { - return resize_bilinear_fp32_buffer_size(); - } - } else if (algorithm == RESIZE_AREA) { - if (inBlob->getTensorDesc().getPrecision() == Precision::U8) { - if (scale_x <= 1 && scale_y <= 1) { -#ifdef HAVE_SSE - if (with_cpu_x86_sse42() && scale_x < 1 && scale_y < 1) - return resize_area_u8_downscale_sse_buffer_size(); - else -#endif - return resize_area_downscale_buffer_size(); - } else { - return resize_area_upscale_buffer_size(); - } - } else { - if (scale_x <= 1 && scale_y <= 1) - return resize_area_downscale_buffer_size(); - else - return resize_area_upscale_buffer_size(); - } - } - - return 0; -} - -void resize(Blob::Ptr inBlob, Blob::Ptr outBlob, const ResizeAlgorithm &algorithm) { - if (inBlob->getTensorDesc().getLayout() != NCHW || outBlob->getTensorDesc().getLayout() != NCHW) - THROW_IE_EXCEPTION << "Resize supports only NCHW layout"; - - if (!((inBlob->getTensorDesc().getPrecision() == Precision::U8 && outBlob->getTensorDesc().getPrecision() == Precision::U8) || - (inBlob->getTensorDesc().getPrecision() == Precision::FP32 && outBlob->getTensorDesc().getPrecision() == Precision::FP32))) - THROW_IE_EXCEPTION << "Resize supports only U8 and FP32 precisions"; - - if (algorithm != RESIZE_BILINEAR && algorithm != RESIZE_AREA) - THROW_IE_EXCEPTION << "Unsupported resize algorithm type"; - - size_t buffer_size = resize_get_buffer_size(inBlob, outBlob, algorithm); - auto* buffer = static_cast(malloc(buffer_size)); - if (buffer == nullptr) { - THROW_IE_EXCEPTION << "Could not allocate memory for blob"; - } - - auto dstDims = outBlob->getTensorDesc().getDims(); - auto srcDims = inBlob->getTensorDesc().getDims(); - float scale_x = static_cast(dstDims[3]) / srcDims[3]; - float scale_y = static_cast(dstDims[2]) / srcDims[2]; - - if (algorithm == RESIZE_BILINEAR) { - if (inBlob->getTensorDesc().getPrecision() == Precision::U8) { -#ifdef HAVE_SSE - if (with_cpu_x86_sse42()) - Resize::resize_bilinear_u8(inBlob, outBlob, buffer); - else -#endif - resize_bilinear(inBlob, outBlob, buffer); - } else { - resize_bilinear(inBlob, outBlob, buffer); - } - } else if (algorithm == RESIZE_AREA) { - if (inBlob->getTensorDesc().getPrecision() == Precision::U8) { - if (scale_x <= 1 && scale_y <= 1) { -#ifdef HAVE_SSE - if (with_cpu_x86_sse42() && scale_x < 1 && scale_y < 1) - Resize::resize_area_u8_downscale(inBlob, outBlob, buffer); - else -#endif - resize_area_downscale(inBlob, outBlob, buffer); - } else { - resize_area_upscale(inBlob, outBlob, buffer); - } - } else { - if (scale_x <= 1 && scale_y <= 1) - resize_area_downscale(inBlob, outBlob, buffer); - else - resize_area_upscale(inBlob, outBlob, buffer); - } - } - - free(buffer); -} - -} // namespace Resize - -//---------------------------------------------------------------------- - -using namespace Resize; - /** * @brief This class stores pre-process information for exact input */ @@ -759,8 +22,6 @@ class PreProcessData : public IPreProcessData { * @brief ROI blob. */ Blob::Ptr _userBlob = nullptr; - Blob::Ptr _tmp1 = nullptr; - Blob::Ptr _tmp2 = nullptr; /** * @brief Pointer-to-implementation (PIMPL) hiding preprocessing implementation details. @@ -814,97 +75,12 @@ void PreProcessData::execute(Blob::Ptr &preprocessedBlob, const PreProcessInfo & _preproc.reset(new PreprocEngine); } - if (_preproc->preprocessWithGAPI(_userBlob, preprocessedBlob, algorithm, fmt, serial, batchSize)) { - return; - } - - if (algorithm == NO_RESIZE) { - THROW_IE_EXCEPTION << "Input pre-processing is called without the pre-processing info set: " - "there's nothing to be done"; - } - - if (batchSize > 1) { - THROW_IE_EXCEPTION << "Batch pre-processing is unsupported in this mode. " - "Use default pre-processing instead to process batches."; - } - - if (fmt != ColorFormat::RAW) { - THROW_IE_EXCEPTION << "Non-default (not ColorFormat::RAW) color formats are unsupported " - "in this mode. Use default pre-processing instead to process color " - "formats."; - } - - Blob::Ptr res_in, res_out; - if (_userBlob->getTensorDesc().getLayout() == NHWC) { - if (!_tmp1 || _tmp1->size() != _userBlob->size()) { - if (_userBlob->getTensorDesc().getPrecision() == Precision::FP32) { - _tmp1 = make_shared_blob({Precision::FP32, _userBlob->getTensorDesc().getDims(), Layout::NCHW}); - } else { - _tmp1 = make_shared_blob({Precision::U8, _userBlob->getTensorDesc().getDims(), Layout::NCHW}); - } - _tmp1->allocate(); - } - - { - OV_ITT_SCOPED_TASK(itt::domains::IEPreproc, "Reorder before"); - blob_copy(_userBlob, _tmp1); - } - res_in = _tmp1; - } else { - res_in = _userBlob; - } - - if (preprocessedBlob->getTensorDesc().getLayout() == NHWC) { - if (!_tmp2 || _tmp2->size() != preprocessedBlob->size()) { - if (preprocessedBlob->getTensorDesc().getPrecision() == Precision::FP32) { - _tmp2 = make_shared_blob({Precision::FP32, preprocessedBlob->getTensorDesc().getDims(), Layout::NCHW}); - } else { - _tmp2 = make_shared_blob({Precision::U8, preprocessedBlob->getTensorDesc().getDims(), Layout::NCHW}); - } - _tmp2->allocate(); - } - res_out = _tmp2; - } else { - res_out = preprocessedBlob; - } - - { - OV_ITT_SCOPED_TASK(itt::domains::IEPreproc, "Resize"); - resize(res_in, res_out, algorithm); - } - - if (res_out == _tmp2) { - OV_ITT_SCOPED_TASK(itt::domains::IEPreproc, "Reorder after"); - blob_copy(_tmp2, preprocessedBlob); - } + _preproc->preprocessWithGAPI(_userBlob, preprocessedBlob, algorithm, fmt, serial, batchSize); } void PreProcessData::isApplicable(const Blob::Ptr &src, const Blob::Ptr &dst) { - // if G-API pre-processing is used, let it check that pre-processing is applicable - if (PreprocEngine::useGAPI()) { - PreprocEngine::checkApplicabilityGAPI(src, dst); - return; - } - - if (!src->is() || !dst->is()) { - THROW_IE_EXCEPTION << "Preprocessing is not applicable. Source and destination blobs must " - "be memory blobs"; - } - - auto &src_dims = src->getTensorDesc().getDims(); - auto &dst_dims = dst->getTensorDesc().getDims(); - - if (src_dims.size() != dst_dims.size()) - THROW_IE_EXCEPTION << "Preprocessing is not applicable. Source and destination blobs have different " - "number of dimensions"; - - if (src_dims.size() != 4) - THROW_IE_EXCEPTION << "Preprocessing is not applicable. Only 4D tensors are supported."; - if (src_dims[0] != dst_dims[0] || src_dims[1] != dst_dims[1]) - THROW_IE_EXCEPTION << "Preprocessing is not applicable. Wrong shape. Network expected 4D input tensor with " - "shape [" << dst_dims[0] << "," << dst_dims[1] <<",H,W] but provided tensor has " - "shape " << details::dumpVec(src_dims) << "."; + PreprocEngine::checkApplicabilityGAPI(src, dst); } } // namespace InferenceEngine diff --git a/inference-engine/src/preprocessing/ie_preprocess_data.hpp b/inference-engine/src/preprocessing/ie_preprocess_data.hpp index 35f418d5aa2b82..df8bdd354c6b13 100644 --- a/inference-engine/src/preprocessing/ie_preprocess_data.hpp +++ b/inference-engine/src/preprocessing/ie_preprocess_data.hpp @@ -97,42 +97,4 @@ inline PreProcessDataPtr CreatePreprocDataHelper() { return PreProcessDataPtr(preprocLibraryPath); } -//---------------------------------------------------------------------- -// -// Implementation-internal types and functions and macros -// -//---------------------------------------------------------------------- - -namespace Resize { - -static inline uint8_t saturateU32toU8(uint32_t v) { - return static_cast(v > UINT8_MAX ? UINT8_MAX : v); -} - -void resize_bilinear_u8(const Blob::Ptr inBlob, Blob::Ptr outBlob, uint8_t* buffer); - -void resize_area_u8_downscale(const Blob::Ptr inBlob, Blob::Ptr outBlob, uint8_t* buffer); - -int getResizeAreaTabSize(int dst_go, int ssize, int dsize, float scale); - -void computeResizeAreaTab(int src_go, int dst_go, int ssize, int dsize, float scale, - uint16_t* si, uint16_t* alpha, int max_count); - -void generate_alpha_and_id_arrays(int x_max_count, int dcols, const uint16_t* xalpha, uint16_t* xsi, - uint16_t** alpha, uint16_t** sxid); - -enum BorderType { - BORDER_CONSTANT = 0, - BORDER_REPLICATE = 1, -}; - -struct Border { - BorderType type; - int32_t value; -}; - -} // namespace Resize - -//---------------------------------------------------------------------- - } // namespace InferenceEngine diff --git a/inference-engine/src/preprocessing/ie_preprocess_gapi.cpp b/inference-engine/src/preprocessing/ie_preprocess_gapi.cpp index 5f62483fff6fd2..fbdf18e9ca712f 100644 --- a/inference-engine/src/preprocessing/ie_preprocess_gapi.cpp +++ b/inference-engine/src/preprocessing/ie_preprocess_gapi.cpp @@ -757,15 +757,6 @@ PreprocEngine::Update PreprocEngine::needUpdate(const CallDesc &newCallOrig) con return Update::NOTHING; } -bool PreprocEngine::useGAPI() { - static const bool NO_GAPI = [](const char *str) -> bool { - std::string var(str ? str : ""); - return var == "N" || var == "NO" || var == "OFF" || var == "0"; - } (getenv("USE_GAPI")); - - return !NO_GAPI; -} - void PreprocEngine::checkApplicabilityGAPI(const Blob::Ptr &src, const Blob::Ptr &dst) { // Note: src blob is the ROI blob, dst blob is the network's input blob @@ -904,7 +895,7 @@ void PreprocEngine::executeGraph(Opt& lastComputation, } template -bool PreprocEngine::preprocessBlob(const BlobTypePtr &inBlob, MemoryBlob::Ptr &outBlob, +void PreprocEngine::preprocessBlob(const BlobTypePtr &inBlob, MemoryBlob::Ptr &outBlob, ResizeAlgorithm algorithm, ColorFormat in_fmt, ColorFormat out_fmt, bool omp_serial, int batch_size) { @@ -953,7 +944,6 @@ bool PreprocEngine::preprocessBlob(const BlobTypePtr &inBlob, MemoryBlob::Ptr &o if (algorithm == NO_RESIZE && std::get<0>(thisCall) == std::get<1>(thisCall)) { //if requested output parameters match input blob no need to do anything THROW_IE_EXCEPTION << "No job to do in the PreProcessing ?"; - return true; } const Update update = needUpdate(thisCall); @@ -983,15 +973,10 @@ bool PreprocEngine::preprocessBlob(const BlobTypePtr &inBlob, MemoryBlob::Ptr &o executeGraph(_lastComputation, batched_input_plane_mats, batched_output_plane_mats, batch_size, omp_serial, update); - - return true; } -bool PreprocEngine::preprocessWithGAPI(const Blob::Ptr &inBlob, Blob::Ptr &outBlob, +void PreprocEngine::preprocessWithGAPI(const Blob::Ptr &inBlob, Blob::Ptr &outBlob, const ResizeAlgorithm& algorithm, ColorFormat in_fmt, bool omp_serial, int batch_size) { - if (!useGAPI()) { - return false; - } const auto out_fmt = (in_fmt == ColorFormat::RAW) ? ColorFormat::RAW : ColorFormat::BGR; // FIXME: get expected color format from network diff --git a/inference-engine/src/preprocessing/ie_preprocess_gapi.hpp b/inference-engine/src/preprocessing/ie_preprocess_gapi.hpp index 418047a4258991..de953f46c4ff51 100644 --- a/inference-engine/src/preprocessing/ie_preprocess_gapi.hpp +++ b/inference-engine/src/preprocessing/ie_preprocess_gapi.hpp @@ -45,16 +45,15 @@ class PreprocEngine { Update update); template - bool preprocessBlob(const BlobTypePtr &inBlob, MemoryBlob::Ptr &outBlob, + void preprocessBlob(const BlobTypePtr &inBlob, MemoryBlob::Ptr &outBlob, ResizeAlgorithm algorithm, ColorFormat in_fmt, ColorFormat out_fmt, bool omp_serial, int batch_size); public: PreprocEngine(); - static bool useGAPI(); static void checkApplicabilityGAPI(const Blob::Ptr &src, const Blob::Ptr &dst); static int getCorrectBatchSize(int batch_size, const Blob::Ptr& roiBlob); - bool preprocessWithGAPI(const Blob::Ptr &inBlob, Blob::Ptr &outBlob, const ResizeAlgorithm &algorithm, + void preprocessWithGAPI(const Blob::Ptr &inBlob, Blob::Ptr &outBlob, const ResizeAlgorithm &algorithm, ColorFormat in_fmt, bool omp_serial, int batch_size = -1); }; From 4f14e842c14b5465f8c320d9679197862cd96eb4 Mon Sep 17 00:00:00 2001 From: Mateusz Tabaka Date: Tue, 22 Dec 2020 06:04:32 +0100 Subject: [PATCH 111/244] Update ONNX models to latest master (#3658) * Update ONNX models to 00d95ba9e5758fd0bc5e6978033fabc4f2a95e61 That version fixes yolov4 and roberta models * remove yolov4 post processing * remove model directory before unpacking --- ngraph/python/tests/__init__.py | 8 -------- .../python/tests/test_onnx/model_zoo_preprocess.sh | 13 ++----------- ngraph/python/tests/test_onnx/test_zoo_models.py | 7 ++----- 3 files changed, 4 insertions(+), 24 deletions(-) diff --git a/ngraph/python/tests/__init__.py b/ngraph/python/tests/__init__.py index 3ae971b31573d5..a76d0d3c7de1dc 100644 --- a/ngraph/python/tests/__init__.py +++ b/ngraph/python/tests/__init__.py @@ -184,14 +184,6 @@ def xfail_test(reason="Mark the test as expected to fail", strict=True): xfail_issue_44976 = xfail_test(reason="E RuntimeError: Quantize layer with name:" "FakeQuantize_xxx has non const input on 1 port") - -# Model ONNX Zoo issues: -xfail_issue_39684 = xfail_test(reason="ngraph.exceptions.UserInputError:" - "('Expected %s parameters, received %s.', 1, 3)") -xfail_issue_39685 = xfail_test(reason="RuntimeError: While validating node 'v1::Transpose 315," - "Constant_9353 -> (f32{?,?,?,?})' with friendly_name '315':" - "Input order must have shape [n], where n is the rank of arg.") - # Model MSFT issues: xfail_issue_37957 = xfail_test(reason="RuntimeError: nGraph does not support the following ONNX operations:" "com.microsoft.CropAndResize, com.microsoft.GatherND," diff --git a/ngraph/python/tests/test_onnx/model_zoo_preprocess.sh b/ngraph/python/tests/test_onnx/model_zoo_preprocess.sh index 17b369a04ff304..0c582ea63dd1a2 100755 --- a/ngraph/python/tests/test_onnx/model_zoo_preprocess.sh +++ b/ngraph/python/tests/test_onnx/model_zoo_preprocess.sh @@ -2,7 +2,7 @@ set -e # provide ONNX Model Zoo commit hash ID to update: -ONNX_SHA=5c9f64f470c825ccbe1bbaa8d460c0463ff6efec +ONNX_SHA=00d95ba9e5758fd0bc5e6978033fabc4f2a95e61 MODELS_DIR="$HOME/.onnx/model_zoo" ENABLE_MSFT=false @@ -62,18 +62,9 @@ function pull_and_postprocess_onnx_model_zoo() { find "$ONNX_MODELS_DIR" -name "*.onnx" | while read filename; do rm "$filename"; done; printf "Extracting tar.gz archives into %s\n" "$ONNX_MODELS_DIR" - find "$ONNX_MODELS_DIR" -name '*.tar.gz' -execdir sh -c 'BASEDIR=$(basename "{}" .tar.gz) && mkdir -p $BASEDIR' \; -execdir sh -c 'BASEDIR=$(basename "{}" .tar.gz) && tar --warning=no-unknown-keyword -xzf "{}" -C $BASEDIR' \; + find "$ONNX_MODELS_DIR" -name '*.tar.gz' -execdir sh -c 'BASEDIR=$(basename "{}" .tar.gz) && rm -rf $BASEDIR && mkdir -p $BASEDIR' \; -execdir sh -c 'BASEDIR=$(basename "{}" .tar.gz) && tar --warning=no-unknown-keyword -xzf "{}" -C $BASEDIR' \; echo "Postprocessing of ONNX Model Zoo models:" - echo "Fix yolo v4 model" - cd "$ONNX_MODELS_DIR/vision/object_detection_segmentation/yolov4/model/yolov4/yolov4/test_data_set" - - mv input0.pb input_0.pb - mv input1.pb input_1.pb - mv input2.pb input_2.pb - mv output0.pb output_0.pb - mv output1.pb output_1.pb - mv output2.pb output_2.pb echo "Fix roberta model" cd "$ONNX_MODELS_DIR/text/machine_comprehension/roberta/model/roberta-sequence-classification-9/roberta-sequence-classification-9" diff --git a/ngraph/python/tests/test_onnx/test_zoo_models.py b/ngraph/python/tests/test_onnx/test_zoo_models.py index 11c55c2ecf91ef..c4667d28a0edd5 100644 --- a/ngraph/python/tests/test_onnx/test_zoo_models.py +++ b/ngraph/python/tests/test_onnx/test_zoo_models.py @@ -30,9 +30,7 @@ xfail_issue_43742, xfail_issue_43380, xfail_issue_45457, - xfail_issue_39684, xfail_issue_40957, - xfail_issue_39685, xfail_issue_37957, xfail_issue_38084, xfail_issue_39669, @@ -114,7 +112,8 @@ def yolov3_post_processing(outputs : Sequence[Any]) -> Sequence[Any]: "test_tiny_yolov2": {"atol": 1e-05, "rtol": 0.001}, "test_resnet152v2": {"atol": 1e-04, "rtol": 0.001}, "test_mobilenetv2-1": {"atol": 1e-04, "rtol": 0.001}, - "yolov3": {"atol": 0.001, "rtol": 0.001} + "yolov3": {"atol": 0.001, "rtol": 0.001}, + "yolov4": {"atol": 1e-04, "rtol": 0.001}, } zoo_models = [] @@ -166,13 +165,11 @@ def yolov3_post_processing(outputs : Sequence[Any]) -> Sequence[Any]: # ONNX Model Zoo (xfail_issue_39704, "test_onnx_model_zoo_vision_object_detection_segmentation_duc_model_ResNet101_DUC_7_ResNet101_DUC_HDC_ResNet101_DUC_HDC_cpu"), (xfail_issue_43213, "test_onnx_model_zoo_vision_object_detection_segmentation_retinanet_model_retinanet_9_test_retinanet_resnet101_retinanet_9_cpu"), - (xfail_issue_39684, "test_onnx_model_zoo_vision_object_detection_segmentation_yolov4_model_yolov4_yolov4_yolov4_cpu"), (xfail_issue_43208, "test_onnx_model_zoo_text_machine_comprehension_gpt_2_model_gpt2_10_GPT2_model_cpu"), (xfail_issue_43209, "test_onnx_model_zoo_text_machine_comprehension_gpt_2_model_gpt2_lm_head_10_GPT_2_LM_HEAD_model_cpu"), (xfail_issue_40957, "test_onnx_model_zoo_text_machine_comprehension_bert_squad_model_bertsquad_10_download_sample_10_bertsquad10_cpu"), (xfail_issue_40957, "test_onnx_model_zoo_text_machine_comprehension_roberta_model_roberta_base_11_roberta_base_11_roberta_base_11_cpu"), (xfail_issue_40957, "test_onnx_model_zoo_text_machine_comprehension_bert_squad_model_bertsquad_8_download_sample_8_bertsquad8_cpu"), - (xfail_issue_39685, "test_onnx_model_zoo_text_machine_comprehension_roberta_model_roberta_sequence_classification_9_roberta_sequence_classification_9_roberta_sequence_classification_9_cpu"), (xfail_issue_39669, "test_onnx_model_zoo_text_machine_comprehension_t5_model_t5_encoder_12_t5_encoder_cpu"), (xfail_issue_38084, "test_onnx_model_zoo_vision_object_detection_segmentation_mask_rcnn_model_MaskRCNN_10_mask_rcnn_R_50_FPN_1x_cpu"), (xfail_issue_38084, "test_onnx_model_zoo_vision_object_detection_segmentation_faster_rcnn_model_FasterRCNN_10_faster_rcnn_R_50_FPN_1x_cpu"), From 3fd011492588416021d26bf6cfec25fa2ad30c96 Mon Sep 17 00:00:00 2001 From: Anastasiya Ageeva Date: Tue, 22 Dec 2020 11:33:23 +0300 Subject: [PATCH 112/244] Added workaround instructions to fix the issue described in CVS-35873 (#3657) --- .../convert_model/tf_specific/Convert_YOLO_From_Tensorflow.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/MO_DG/prepare_model/convert_model/tf_specific/Convert_YOLO_From_Tensorflow.md b/docs/MO_DG/prepare_model/convert_model/tf_specific/Convert_YOLO_From_Tensorflow.md index b7288322441692..0073ac2f5490ca 100644 --- a/docs/MO_DG/prepare_model/convert_model/tf_specific/Convert_YOLO_From_Tensorflow.md +++ b/docs/MO_DG/prepare_model/convert_model/tf_specific/Convert_YOLO_From_Tensorflow.md @@ -45,6 +45,10 @@ python3 convert_weights_pb.py --class_names coco.names --data_format NHWC --weig ```sh python3 convert_weights_pb.py --class_names coco.names --data_format NHWC --weights_file yolov3-tiny.weights --tiny ``` +At this step, you may receive a warning like `WARNING:tensorflow:Entity <...> could not be transformed and will be executed as-is.`. To workaround this issue, switch to gast 0.2.2 with the following command: +```sh +pip3 install --user gast==0.2.2 +``` If you have YOLOv3 weights trained for an input image with the size different from 416 (320, 608 or your own), please provide the `--size` key with the size of your image specified while running the converter. For example, run the following command for an image with size 608: ```sh From b6bba5d37793c72818ffd26fe88e7b99e637ab7e Mon Sep 17 00:00:00 2001 From: Anastasiya Ageeva Date: Tue, 22 Dec 2020 11:34:11 +0300 Subject: [PATCH 113/244] Avladimi/cherry pick cvs 36087 (#3655) * Fixed CVS-36087 * Fixed link to the installation package * Fixed links, fixed formatting in bulleted lists --- .../installing-openvino-raspbian.md | 93 ++++++++----------- 1 file changed, 39 insertions(+), 54 deletions(-) diff --git a/docs/install_guides/installing-openvino-raspbian.md b/docs/install_guides/installing-openvino-raspbian.md index 4037e765dc96c5..eade02a472d497 100644 --- a/docs/install_guides/installing-openvino-raspbian.md +++ b/docs/install_guides/installing-openvino-raspbian.md @@ -32,7 +32,7 @@ The OpenVINO toolkit for Raspbian OS is an archive with pre-installed header fil - Raspberry Pi\* board with ARM* ARMv7-A CPU architecture. Check that `uname -m` returns `armv7l`. - One of Intel® Movidius™ Visual Processing Units (VPU): - - Intel® Neural Compute Stick 2 +- Intel® Neural Compute Stick 2 > **NOTE**: With OpenVINO™ 2020.4 release, Intel® Movidius™ Neural Compute Stick is no longer supported. @@ -60,27 +60,24 @@ This guide provides step-by-step instructions on how to install the OpenVINO™ ## Install the OpenVINO™ Toolkit for Raspbian* OS Package -The guide assumes you downloaded the OpenVINO toolkit for Raspbian* OS. If you do not have a copy of the toolkit package file `l_openvino_toolkit_runtime_raspbian_p_.tgz`, download the latest version from the [Intel® Open Source Technology Center](https://download.01.org/opencv/2020/openvinotoolkit/) and then return to this guide to proceed with the installation. +The guide assumes you downloaded the OpenVINO toolkit for Raspbian* OS. If you do not have a copy of the toolkit package file `l_openvino_toolkit_runtime_raspbian_p_.tgz`, download the latest version from the [OpenVINO™ Toolkit packages storage](https://storage.openvinotoolkit.org/repositories/openvino/packages/) and then return to this guide to proceed with the installation. > **NOTE**: The OpenVINO toolkit for Raspbian OS is distributed without installer, so you need to perform extra steps comparing to the [Intel® Distribution of OpenVINO™ toolkit for Linux* OS](installing-openvino-linux.md). 1. Open the Terminal\* or your preferred console application. - 2. Go to the directory in which you downloaded the OpenVINO toolkit. This document assumes this is your `~/Downloads` directory. If not, replace `~/Downloads` with the directory where the file is located. -```sh -cd ~/Downloads/ -``` -By default, the package file is saved as `l_openvino_toolkit_runtime_raspbian_p_.tgz`. - + ```sh + cd ~/Downloads/ + ``` + By default, the package file is saved as `l_openvino_toolkit_runtime_raspbian_p_.tgz`. 3. Create an installation folder. -```sh -sudo mkdir -p /opt/intel/openvino -``` - + ```sh + sudo mkdir -p /opt/intel/openvino + ``` 4. Unpack the archive: -```sh -sudo tar -xf l_openvino_toolkit_runtime_raspbian_p_.tgz --strip 1 -C /opt/intel/openvino -``` + ```sh + sudo tar -xf l_openvino_toolkit_runtime_raspbian_p_.tgz --strip 1 -C /opt/intel/openvino + ``` Now the OpenVINO toolkit components are installed. Additional configuration steps are still required. Continue to the next sections to install External Software Dependencies, configure the environment and set up USB rules. @@ -115,20 +112,18 @@ Continue to the next section to add USB rules for Intel® Neural Compute Stick 2 ## Add USB Rules 1. Add the current Linux user to the `users` group: -```sh -sudo usermod -a -G users "$(whoami)" -``` -Log out and log in for it to take effect. - + ```sh + sudo usermod -a -G users "$(whoami)" + ``` + Log out and log in for it to take effect. 2. If you didn't modify `.bashrc` to permanently set the environment variables, run `setupvars.sh` again after logging in: -```sh -source /opt/intel/openvino/bin/setupvars.sh -``` - + ```sh + source /opt/intel/openvino/bin/setupvars.sh + ``` 3. To perform inference on the Intel® Neural Compute Stick 2, install the USB rules running the `install_NCS_udev_rules.sh` script: -```sh -sh /opt/intel/openvino/install_dependencies/install_NCS_udev_rules.sh -``` + ```sh + sh /opt/intel/openvino/install_dependencies/install_NCS_udev_rules.sh + ``` 4. Plug in your Intel® Neural Compute Stick 2. You are ready to compile and run the Object Detection sample to verify the Inference Engine installation. @@ -138,35 +133,29 @@ You are ready to compile and run the Object Detection sample to verify the Infer Follow the next steps to run pre-trained Face Detection network using Inference Engine samples from the OpenVINO toolkit. 1. Navigate to a directory that you have write access to and create a samples build directory. This example uses a directory named `build`: -```sh -mkdir build && cd build -``` - + ```sh + mkdir build && cd build + ``` 2. Build the Object Detection Sample: -```sh -cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-march=armv7-a" /opt/intel/openvino/deployment_tools/inference_engine/samples/cpp -``` -```sh -make -j2 object_detection_sample_ssd -``` - -3. Download the pre-trained Face Detection model or copy it from the host machine: - - - To download the `.bin` file with weights: ```sh - wget --no-check-certificate https://download.01.org/opencv/2020/openvinotoolkit/2020.1/open_model_zoo/models_bin/1/face-detection-adas-0001/FP16/face-detection-adas-0001.bin + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-march=armv7-a" /opt/intel/openvino/deployment_tools/inference_engine/samples/cpp ``` - - To download the `.xml` file with the network topology: ```sh - wget --no-check-certificate https://download.01.org/opencv/2020/openvinotoolkit/2020.1/open_model_zoo/models_bin/1/face-detection-adas-0001/FP16/face-detection-adas-0001.xml + make -j2 object_detection_sample_ssd + ``` +3. Download the pre-trained Face Detection model with the Model Downloader or copy it from the host machine: + ```sh + git clone --depth 1 https://github.com/openvinotoolkit/open_model_zoo + cd open_model_zoo/tools/downloader + python3 -m pip install -r requirements.in + python3 downloader.py --name face-detection-adas-0001 ``` - 4. Run the sample with specifying the model and a path to the input image: -```sh -./armv7l/Release/object_detection_sample_ssd -m face-detection-adas-0001.xml -d MYRIAD -i -``` -The application outputs an image (`out_0.bmp`) with detected faced enclosed in rectangles. + ```sh + ./armv7l/Release/object_detection_sample_ssd -m face-detection-adas-0001.xml -d MYRIAD -i + ``` + The application outputs an image (`out_0.bmp`) with detected faced enclosed in rectangles. Congratulations, you have finished the OpenVINO™ toolkit for Raspbian* OS installation. You have completed all required installation, configuration and build steps in this guide. @@ -176,11 +165,7 @@ Read the next topic if you want to learn more about OpenVINO workflow for Raspbe If you want to use your model for inference, the model must be converted to the .bin and .xml Intermediate Representation (IR) files that are used as input by Inference Engine. OpenVINO™ toolkit support on Raspberry Pi only includes the Inference Engine module of the Intel® Distribution of OpenVINO™ toolkit. The Model Optimizer is not supported on this platform. To get the optimized models you can use one of the following options: -* Download a set of ready-to-use pre-trained models for the appropriate version of OpenVINO from the Intel® Open Source Technology Center: - - * Models for the 2020.1 release of OpenVINO are available at [https://download.01.org/opencv/2020/openvinotoolkit/2020.1/open_model_zoo/](https://download.01.org/opencv/2020/openvinotoolkit/2020.1/open_model_zoo/). - * Models for the 2019 R1 release of OpenVINO are available at [https://download.01.org/opencv/2019/open_model_zoo/R1/](https://download.01.org/opencv/2019/open_model_zoo/R1/). - * Models for the 2018 R5 release of OpenVINO are available at [https://download.01.org/openvinotoolkit/2018_R5/open_model_zoo/](https://download.01.org/openvinotoolkit/2018_R5/open_model_zoo/). +* Download public and Intel's pre-trained models from the [Open Model Zoo](https://github.com/opencv/open_model_zoo) using [Model Downloader tool](@ref omz_tools_downloader_README). For more information on pre-trained models, see [Pre-Trained Models Documentation](@ref omz_models_intel_index) From b17e0d47b1fb897a92992b8d6954d2d602f43914 Mon Sep 17 00:00:00 2001 From: iliya mironov Date: Tue, 22 Dec 2020 12:58:37 +0300 Subject: [PATCH 114/244] Remove broadcasting (#3574) * Remove broadcusting * Refactoring some code * Add unit tests * Update description * Refactoring transformation * Add is_broadcastable_shapes checks * Update is_eliminate_broadcast func * Add unit tests * Update unit tests * Add unit tests * Add unit tests * Remove unused include * Add dynemic tests * Update unit tests * Fix code style * Fix unit tests code style * Fix code style * Add one more case for elumenate broadcast * Fix according to review * Refactoring transformation code --- .../broadcast_elementwise_fusion.hpp | 31 ++ .../broadcast_elementwise_fusion.cpp | 74 +++++ .../common_optimizations.cpp | 2 + .../broadcast_elementwise_fusion_test.cpp | 268 ++++++++++++++++++ .../op/util/binary_elementwise_arithmetic.hpp | 4 +- 5 files changed, 377 insertions(+), 2 deletions(-) create mode 100644 inference-engine/src/transformations/include/transformations/common_optimizations/broadcast_elementwise_fusion.hpp create mode 100644 inference-engine/src/transformations/src/transformations/common_optimizations/broadcast_elementwise_fusion.cpp create mode 100644 inference-engine/tests/functional/inference_engine/transformations/broadcast_elementwise_fusion_test.cpp diff --git a/inference-engine/src/transformations/include/transformations/common_optimizations/broadcast_elementwise_fusion.hpp b/inference-engine/src/transformations/include/transformations/common_optimizations/broadcast_elementwise_fusion.hpp new file mode 100644 index 00000000000000..5c0c3f5b1cdc9a --- /dev/null +++ b/inference-engine/src/transformations/include/transformations/common_optimizations/broadcast_elementwise_fusion.hpp @@ -0,0 +1,31 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include + +#include +#include +#include "ngraph/pattern/matcher.hpp" + +namespace ngraph { +namespace pass { + +class TRANSFORMATIONS_API BroadcastElementwiseFusion; + +} // namespace pass +} // namespace ngraph + +/** + * @ingroup ie_transformation_common_api + * @brief Removing Broadcast OP before ElementWise if output shape of Broadcast + * are equal neighboring input shape of ElementWise. + */ + +class ngraph::pass::BroadcastElementwiseFusion: public ngraph::pass::MatcherPass { +public: + NGRAPH_RTTI_DECLARATION; + BroadcastElementwiseFusion(); +}; diff --git a/inference-engine/src/transformations/src/transformations/common_optimizations/broadcast_elementwise_fusion.cpp b/inference-engine/src/transformations/src/transformations/common_optimizations/broadcast_elementwise_fusion.cpp new file mode 100644 index 00000000000000..62adcca0675b23 --- /dev/null +++ b/inference-engine/src/transformations/src/transformations/common_optimizations/broadcast_elementwise_fusion.cpp @@ -0,0 +1,74 @@ +// Copyright (C) 2018-2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "transformations/common_optimizations/broadcast_elementwise_fusion.hpp" + +#include +#include + +NGRAPH_RTTI_DEFINITION(ngraph::pass::BroadcastElementwiseFusion, "BroadcastElementwiseFusion", 0); + +bool is_eliminate_broadcast(const ngraph::PartialShape & input_shape, const ngraph::PartialShape & broadcast_shape) { + if (input_shape.rank().is_dynamic() || broadcast_shape.rank().is_dynamic()) { + return false; + } + + const int64_t & input_shape_rank = input_shape.rank().get_length(); + const int64_t & broadcast_shape_rank = broadcast_shape.rank().get_length(); + if (broadcast_shape_rank > input_shape_rank) { + //We can not eliminate broadcast op because + //in the case input_shape will be broadcasted + return false; + } + for (int64_t i_dim = input_shape_rank - 1, b_dim = broadcast_shape_rank - 1; i_dim >= 0 && b_dim >=0; --i_dim, --b_dim) { + if (input_shape[i_dim].is_static() && broadcast_shape[b_dim].is_static()) { + const auto &input_shape_dim = input_shape[i_dim].get_length(); + const auto &broadcast_shape_dim = broadcast_shape[b_dim].get_length(); + if (input_shape_dim != broadcast_shape_dim && broadcast_shape_dim != 1) { + //We can not eliminate broadcast op because + //input_shape will be broadcast + return false; + } + } else if (input_shape[i_dim].is_dynamic() && broadcast_shape[i_dim].is_static() && + broadcast_shape[i_dim].get_length() != 1) { + return false; + } else if (broadcast_shape[i_dim].is_dynamic() && input_shape[i_dim].is_static() && + input_shape[i_dim].get_length() == 1) { + return false; + } else if (broadcast_shape[i_dim].is_dynamic() && input_shape[i_dim].is_dynamic()) { + return false; + } + } + return true; +} + +ngraph::pass::BroadcastElementwiseFusion::BroadcastElementwiseFusion() { + auto broadcast_input = pattern::any_input(); + auto broadcast = pattern::wrap_type({broadcast_input, pattern::any_input()}); + auto eltwise_input = pattern::any_input(); + auto eltwise = pattern::wrap_type({eltwise_input, broadcast}); + + ngraph::matcher_pass_callback callback = [=](ngraph::pattern::Matcher& m) { + auto & pattern_value = m.get_pattern_value_map(); + + const auto & m_eltwise_input = pattern_value.at(eltwise_input); + const auto & m_eltwise = pattern_value.at(eltwise_input); + + const auto & m_broadcast_input = pattern_value.at(broadcast_input); + auto & m_broadcast = pattern_value.at(broadcast); + + if (!is_eliminate_broadcast(m_eltwise_input.get_partial_shape(), + m_broadcast.get_partial_shape())) { + return false; + } + + copy_runtime_info(m_broadcast.get_node_shared_ptr(), m_eltwise.get_node_shared_ptr()); + m_broadcast.replace(m_broadcast_input); + + return false; + }; + + auto m = std::make_shared(eltwise, "BroadcastElementwiseFusion"); + register_matcher(m, callback); +} diff --git a/inference-engine/src/transformations/src/transformations/common_optimizations/common_optimizations.cpp b/inference-engine/src/transformations/src/transformations/common_optimizations/common_optimizations.cpp index 5d637d3a89fcc5..10f37907c5997b 100644 --- a/inference-engine/src/transformations/src/transformations/common_optimizations/common_optimizations.cpp +++ b/inference-engine/src/transformations/src/transformations/common_optimizations/common_optimizations.cpp @@ -7,6 +7,7 @@ #include "transformations/init_node_info.hpp" #include "transformations/itt.hpp" #include "transformations/common_optimizations/algebraic_simplification.hpp" +#include "transformations/common_optimizations/broadcast_elementwise_fusion.hpp" #include "transformations/common_optimizations/nop_elimination.hpp" #include "transformations/common_optimizations/common_optimizations.hpp" #include "transformations/common_optimizations/conv_mul_fusion.hpp" @@ -62,6 +63,7 @@ bool ngraph::pass::CommonOptimizations::run_on_function(std::shared_ptr(); manager.register_pass(); // depends on CF manager.register_pass(); // may introduce fake dynamism + manager.register_pass(); manager.register_pass(); // may introduce fake dynamism manager.register_pass(); manager.register_pass(); // partially depends on CF diff --git a/inference-engine/tests/functional/inference_engine/transformations/broadcast_elementwise_fusion_test.cpp b/inference-engine/tests/functional/inference_engine/transformations/broadcast_elementwise_fusion_test.cpp new file mode 100644 index 00000000000000..29ed7a740c54c0 --- /dev/null +++ b/inference-engine/tests/functional/inference_engine/transformations/broadcast_elementwise_fusion_test.cpp @@ -0,0 +1,268 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 + +#include + +#include "common_test_utils/test_common.hpp" +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "common_test_utils/ngraph_test_utils.hpp" + +using namespace testing; +using namespace ngraph; + +using InputShape = PartialShape; +using TargetShape = Shape; + +void eliminate_broadcast_test(std::shared_ptr f, std::shared_ptr f_ref) { + pass::Manager manager; + manager.register_pass(); + manager.run_passes(f); + auto res = compare_functions(f, f_ref); + ASSERT_TRUE(res.first) << res.second; +} + +class EliminateBroadcastTest: public CommonTestUtils::TestsCommon, + public testing::WithParamInterface> { +public: + std::shared_ptr f, f_ref; + + void SetUp() override { + const auto& input_shape = std::get<0>(GetParam()); + const auto& broadcast_input_shape = std::get<1>(GetParam()); + const auto& broadcast_shape = std::get<2>(GetParam()); + + f = get_initial_function(input_shape, broadcast_input_shape, broadcast_shape); + f_ref = get_reference(input_shape, broadcast_shape); + } + + std::shared_ptr get_initial_function(const InputShape & input_shape, + const InputShape & broadcast_input_shape, + const TargetShape & broadcast_shape) { + auto input1 = std::make_shared(ngraph::element::f32, input_shape); + auto input2 = std::make_shared(ngraph::element::f32, broadcast_input_shape); + auto input_shape_node = ngraph::opset5::Constant::create(ngraph::element::i64, ngraph::Shape{broadcast_shape.size()}, broadcast_shape); + auto broadcast = std::make_shared(input2, input_shape_node); + auto elementwise = std::make_shared(input1, broadcast); + return std::make_shared(ngraph::NodeVector{elementwise}, ngraph::ParameterVector{input1, input2}); + } + + std::shared_ptr get_reference(const InputShape & input_shape, + const InputShape & broadcast_output_shape) { + auto ref_input1 = std::make_shared(ngraph::element::f32, input_shape); + auto ref_input2 = std::make_shared(ngraph::element::f32, broadcast_output_shape); + auto ref_elementwise = std::make_shared(ref_input1, ref_input2); + + return std::make_shared(ngraph::NodeVector{ref_elementwise}, ngraph::ParameterVector{ref_input1, ref_input2}); + } +}; + +class EliminateBroadcastSwapInputsTest: public CommonTestUtils::TestsCommon, + public testing::WithParamInterface> { +public: + std::shared_ptr f, f_ref; + + void SetUp() override { + const auto& input_shape = std::get<0>(GetParam()); + const auto& broadcast_input_shape = std::get<1>(GetParam()); + const auto& broadcast_shape = std::get<2>(GetParam()); + + f = get_initial_function(input_shape, broadcast_input_shape, broadcast_shape); + f_ref = get_reference(input_shape, broadcast_shape); + } + + std::shared_ptr get_initial_function(const InputShape & input_shape, + const InputShape & broadcast_input_shape, + const TargetShape & broadcast_shape) { + auto input1 = std::make_shared(ngraph::element::f32, input_shape); + auto input2 = std::make_shared(ngraph::element::f32, broadcast_input_shape); + auto input_shape_node = ngraph::opset5::Constant::create(ngraph::element::i64, ngraph::Shape{broadcast_shape.size()}, broadcast_shape); + auto broadcast = std::make_shared(input2, input_shape_node); + auto elementwise = std::make_shared(broadcast, input1); + return std::make_shared(ngraph::NodeVector{elementwise}, ngraph::ParameterVector{input1, input2}); + } + + std::shared_ptr get_reference(const InputShape & input_shape, + const InputShape & broadcast_output_shape) { + auto ref_input1 = std::make_shared(ngraph::element::f32, input_shape); + auto ref_input2 = std::make_shared(ngraph::element::f32, broadcast_output_shape); + auto ref_elementwise = std::make_shared(ref_input2, ref_input1); + + return std::make_shared(ngraph::NodeVector{ref_elementwise}, ngraph::ParameterVector{ref_input1, ref_input2}); + } +}; + +class NoEliminateBroadcastTest: public CommonTestUtils::TestsCommon, + public testing::WithParamInterface> { +public: + std::shared_ptr f, f_ref; + + void SetUp() override { + const auto& input_shape = std::get<0>(GetParam()); + const auto& broadcast_input_shape = std::get<1>(GetParam()); + const auto& broadcast_shape = std::get<2>(GetParam()); + + f = get_initial_function(input_shape, broadcast_input_shape, broadcast_shape); + f_ref = get_reference(input_shape, broadcast_input_shape, broadcast_shape); + } + + std::shared_ptr get_initial_function(const InputShape & input_shape, + const InputShape & broadcast_input_shape, + const TargetShape & broadcast_shape) { + auto input1 = std::make_shared(ngraph::element::f32, input_shape); + auto input2 = std::make_shared(ngraph::element::f32, broadcast_input_shape); + auto input_shape_node = ngraph::opset5::Constant::create(ngraph::element::i64, ngraph::Shape{broadcast_shape.size()}, broadcast_shape); + auto broadcast = std::make_shared(input2, input_shape_node); + auto elementwise = std::make_shared(input1, broadcast); + return std::make_shared(ngraph::NodeVector{elementwise}, ngraph::ParameterVector{input1, input2}); + } + + std::shared_ptr get_reference(const InputShape & input_shape, + const InputShape & broadcast_input_shape, + const TargetShape & broadcast_shape) { + auto ref_input1 = std::make_shared(ngraph::element::f32, input_shape); + auto ref_input2 = std::make_shared(ngraph::element::f32, broadcast_input_shape); + auto ref_input_shape_node = ngraph::opset5::Constant::create(ngraph::element::i64, ngraph::Shape{broadcast_shape.size()}, broadcast_shape); + auto ref_broadcast = std::make_shared(ref_input2, ref_input_shape_node); + auto ref_elementwise = std::make_shared(ref_input1, ref_broadcast); + + return std::make_shared(ngraph::NodeVector{ref_elementwise}, ngraph::ParameterVector{ref_input1, ref_input2}); + } +}; + +class EliminateDynamicBroadcastTest: public CommonTestUtils::TestsCommon, + public testing::WithParamInterface> { +public: + std::shared_ptr f, f_ref; + + void SetUp() override { + const auto& input_shape = std::get<0>(GetParam()); + const auto& broadcast_input_shape = std::get<1>(GetParam()); + const auto& broadcast_shape = std::get<2>(GetParam()); + const auto& broadcast_output_shape = std::get<3>(GetParam()); + + f = get_initial_function(input_shape, broadcast_input_shape, broadcast_shape); + f_ref = get_reference(input_shape, broadcast_output_shape); + } + + std::shared_ptr get_initial_function(const InputShape & input_shape, + const InputShape & broadcast_input_shape, + const InputShape & broadcast_shape) { + auto input1 = std::make_shared(ngraph::element::f32, input_shape); + auto input2 = std::make_shared(ngraph::element::f32, broadcast_input_shape); + auto input_shape_node = std::make_shared(ngraph::element::i64, + ngraph::Shape{(size_t)(broadcast_shape.rank().get_length())}); + auto broadcast = std::make_shared(input2, input_shape_node); + auto elementwise = std::make_shared(input1, broadcast); + return std::make_shared(ngraph::NodeVector{elementwise}, ngraph::ParameterVector{input1, input2, input_shape_node}); + } + + std::shared_ptr get_reference(const InputShape & input_shape, + const InputShape & broadcast_output_shape) { + auto ref_input1 = std::make_shared(ngraph::element::f32, input_shape); + auto ref_input2 = std::make_shared(ngraph::element::f32, broadcast_output_shape); + auto ref_elementwise = std::make_shared(ref_input1, ref_input2); + + return std::make_shared(ngraph::NodeVector{ref_elementwise}, ngraph::ParameterVector{ref_input1, ref_input2}); + } +}; + +class NoEliminateDynamicBroadcastTest: public CommonTestUtils::TestsCommon, + public testing::WithParamInterface> { +public: + std::shared_ptr f, f_ref; + + void SetUp() override { + const auto& input_shape = std::get<0>(GetParam()); + const auto& broadcast_input_shape = std::get<1>(GetParam()); + const auto& broadcast_shape = std::get<2>(GetParam()); + + f = get_initial_function(input_shape, broadcast_input_shape, broadcast_shape); + f_ref = get_reference(input_shape, broadcast_input_shape, broadcast_shape); + } + + std::shared_ptr get_initial_function(const InputShape & input_shape, + const InputShape & broadcast_input_shape, + const InputShape & broadcast_shape) { + auto input1 = std::make_shared(ngraph::element::f32, input_shape); + auto input2 = std::make_shared(ngraph::element::f32, broadcast_input_shape); + auto input_shape_node = std::make_shared(ngraph::element::i64, + ngraph::Shape{(size_t)(broadcast_shape.rank().get_length())}); + auto broadcast = std::make_shared(input2, input_shape_node); + auto elementwise = std::make_shared(input1, broadcast); + return std::make_shared(ngraph::NodeVector{elementwise}, ngraph::ParameterVector{input1, input2, input_shape_node}); + } + + std::shared_ptr get_reference(const InputShape & input_shape, + const InputShape & broadcast_input_shape, + const InputShape & broadcast_shape) { + auto ref_input1 = std::make_shared(ngraph::element::f32, input_shape); + auto ref_input2 = std::make_shared(ngraph::element::f32, broadcast_input_shape); + auto ref_input_shape_node = std::make_shared(ngraph::element::i64, + ngraph::Shape{(size_t)(broadcast_shape.rank().get_length())}); + auto ref_broadcast = std::make_shared(ref_input2, ref_input_shape_node); + auto ref_elementwise = std::make_shared(ref_input1, ref_broadcast); + + return std::make_shared(ngraph::NodeVector{ref_elementwise}, + ngraph::ParameterVector{ref_input1, ref_input2, ref_input_shape_node}); + } +}; + +TEST_P(EliminateBroadcastTest, CompareFunctions) { + eliminate_broadcast_test(f, f_ref); +} + +TEST_P(EliminateBroadcastSwapInputsTest, CompareFunctions) { + eliminate_broadcast_test(f, f_ref); +} + +TEST_P(NoEliminateBroadcastTest, CompareFunctions) { + eliminate_broadcast_test(f, f_ref); +} + +TEST_P(EliminateDynamicBroadcastTest, CompareFunctions) { + eliminate_broadcast_test(f, f_ref); +} + +TEST_P(NoEliminateDynamicBroadcastTest, CompareFunctions) { + eliminate_broadcast_test(f, f_ref); +} + +INSTANTIATE_TEST_CASE_P(EliminateBroadcast, EliminateBroadcastTest, + testing::Values(std::make_tuple(InputShape{1, 2, 3}, InputShape{1, 2, 3}, TargetShape{1, 2, 3}), + std::make_tuple(InputShape{DYN, 2, 3}, InputShape{1, 2, 3}, TargetShape{1, 2, 3}), + std::make_tuple(InputShape{DYN, DYN, DYN}, InputShape{1, 1, 1}, TargetShape{1, 1, 1}), + std::make_tuple(InputShape{1, 2, 3}, InputShape{2, 3}, TargetShape{2, 3}), + std::make_tuple(InputShape{1, 2, 1}, InputShape{1}, TargetShape{1}))); + +INSTANTIATE_TEST_CASE_P(EliminateBroadcastSwapInputs, EliminateBroadcastSwapInputsTest, + testing::Values(std::make_tuple(InputShape{1, 2, 3}, InputShape{1, 2, 3}, TargetShape{1, 2, 3}), + std::make_tuple(InputShape{DYN, 2, 3}, InputShape{1, 2, 3}, TargetShape{1, 2, 3}), + std::make_tuple(InputShape{DYN, DYN, DYN}, InputShape{1, 1, 1}, TargetShape{1, 1, 1}), + std::make_tuple(InputShape{1, 2, 3}, InputShape{2, 3}, TargetShape{2, 3}), + std::make_tuple(InputShape{1, 2, 1}, InputShape{1}, TargetShape{1}))); + +INSTANTIATE_TEST_CASE_P(NoEliminateBroadcast, NoEliminateBroadcastTest, + testing::Values(std::make_tuple(InputShape{1, 2, 1}, InputShape{3}, TargetShape{3}), + std::make_tuple(InputShape{DYN, 2, 3}, InputShape{3, 2, 3}, TargetShape{3, 2, 3}), + std::make_tuple(InputShape{DYN, DYN, DYN}, InputShape{3, 2, 1}, TargetShape{3, 2, 1}), + std::make_tuple(ngraph::PartialShape::dynamic(), InputShape{1, 2, 3}, TargetShape{1, 2, 3}), + std::make_tuple(ngraph::PartialShape::dynamic(), ngraph::PartialShape::dynamic(), TargetShape{1, 2, 3}))); + +INSTANTIATE_TEST_CASE_P(EliminateDynamicBroadcast, EliminateDynamicBroadcastTest, + testing::Values(std::make_tuple(InputShape{2, 2, 4}, InputShape{2, DYN, 4}, InputShape{2, DYN, 4}, InputShape{2, DYN, 4}), + std::make_tuple(InputShape{2, 2, 4}, InputShape{DYN, DYN, DYN}, InputShape{DYN, DYN, DYN}, InputShape{DYN, DYN, DYN}), + std::make_tuple(InputShape{2, 2, 4}, InputShape{2, 2, 4}, InputShape{2, DYN, 4}, InputShape{2, 2, 4}))); + +INSTANTIATE_TEST_CASE_P(NoEliminateDynamicBroadcast, NoEliminateDynamicBroadcastTest, + testing::Values(std::make_tuple(InputShape{2, 1, 4}, InputShape{2, DYN, 4}, InputShape{2, DYN, 4}), + std::make_tuple(InputShape{2, DYN, 4}, InputShape{2, DYN, 4}, InputShape{2, DYN, 4}))); diff --git a/ngraph/core/include/ngraph/op/util/binary_elementwise_arithmetic.hpp b/ngraph/core/include/ngraph/op/util/binary_elementwise_arithmetic.hpp index 25d4fd4b4f294f..28163bfc7e785a 100644 --- a/ngraph/core/include/ngraph/op/util/binary_elementwise_arithmetic.hpp +++ b/ngraph/core/include/ngraph/op/util/binary_elementwise_arithmetic.hpp @@ -54,8 +54,6 @@ namespace ngraph class NGRAPH_API BinaryElementwiseArithmetic : public Op { protected: - NGRAPH_RTTI_DECLARATION; - BinaryElementwiseArithmetic(const AutoBroadcastSpec& autob); /// \brief Constructs a binary elementwise arithmetic operation. @@ -67,6 +65,8 @@ namespace ngraph const AutoBroadcastSpec& autob); public: + NGRAPH_RTTI_DECLARATION; + void validate_and_infer_types() override; const AutoBroadcastSpec& get_autob() const override { return m_autob; } From e9b89b0bc5b3620b4e2537f3fb56ba6a8f0ff495 Mon Sep 17 00:00:00 2001 From: Mateusz Tabaka Date: Tue, 22 Dec 2020 11:03:59 +0100 Subject: [PATCH 115/244] [ONNX] remove hardcoded shape in GroupNorm operator (#3682) --- .../src/op/org.openvinotoolkit/group_norm.cpp | 26 +------------------ ngraph/test/onnx/onnx_import.in.cpp | 2 +- 2 files changed, 2 insertions(+), 26 deletions(-) diff --git a/ngraph/frontend/onnx_import/src/op/org.openvinotoolkit/group_norm.cpp b/ngraph/frontend/onnx_import/src/op/org.openvinotoolkit/group_norm.cpp index bdc0294d92fa86..25367f4025e0bc 100644 --- a/ngraph/frontend/onnx_import/src/op/org.openvinotoolkit/group_norm.cpp +++ b/ngraph/frontend/onnx_import/src/op/org.openvinotoolkit/group_norm.cpp @@ -45,19 +45,6 @@ namespace ngraph size_t rank_size = pshape.rank().get_length(); NGRAPH_CHECK(rank_size >= 3, "3-D and above tensors supported only"); - if (pshape.is_static()) - { - const auto& shape = pshape.to_shape(); - std::vector new_shape{ - shape[0], num_groups, shape[1] / num_groups}; - for (size_t i = 2; i < rank_size; i++) - { - new_shape.push_back(shape[i]); - } - return default_opset::Constant::create( - element::i64, Shape{new_shape.size()}, new_shape); - } - auto shape = std::make_shared(data); auto splits = builder::opset1::split(shape, rank_size); auto num_groups_const = @@ -92,18 +79,7 @@ namespace ngraph static_cast(node.get_attribute_value("num_groups")); float eps = node.get_attribute_value("eps", 1e-5); - auto data_pshape = data.get_partial_shape(); - std::shared_ptr data_shape_node; - if (data_pshape.is_static()) - { - auto shape = data_pshape.to_shape(); - data_shape_node = default_opset::Constant::create( - element::u64, Shape{shape.size()}, shape); - } - else - { - data_shape_node = std::make_shared(data); - } + auto data_shape_node = std::make_shared(data); auto data_reshaped = std::make_shared( data, detail::create_group_norm_shape(data, num_groups), true); diff --git a/ngraph/test/onnx/onnx_import.in.cpp b/ngraph/test/onnx/onnx_import.in.cpp index e33db62054604c..56827d6f7c6358 100644 --- a/ngraph/test/onnx/onnx_import.in.cpp +++ b/ngraph/test/onnx/onnx_import.in.cpp @@ -3213,7 +3213,7 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_group_norm) { const auto function = onnx_import::import_onnx_model( file_util::path_join(SERIALIZED_ZOO, "onnx/group_norm.prototxt")); - auto test_case = test::TestCase(function); + auto test_case = test::TestCase(function); Shape shape{2, 8, 2, 2}; int size = shape_size(shape); std::vector data(size); From 2ffa6f47642d9977bd4b8941f040fcae7d48429e Mon Sep 17 00:00:00 2001 From: "Gladilov, Gleb" Date: Tue, 22 Dec 2020 17:19:27 +0300 Subject: [PATCH 116/244] [IE][nGraph]: Fixes Loop shape inference (#3641) Previously Loop shape inference function produced dynamic shapes for body parameters and loop outputs if iteration count is unknown (dynamic) or loop input data is dynamic. At the same, time some dimensions of input/outputs of body/loop could be inferred under this circumstances which could critical for model enablement (ex. Myriad-X could support convolutions with dynamic batch, but could not support convolutions with dynamic spatial dimensions) Signed-off-by: Gladilov, Gleb --- ngraph/core/src/op/loop.cpp | 58 +++----- ngraph/test/type_prop/loop.cpp | 236 ++++++++++++++++++++++++++++++++- 2 files changed, 255 insertions(+), 39 deletions(-) diff --git a/ngraph/core/src/op/loop.cpp b/ngraph/core/src/op/loop.cpp index d57cccf87a1810..6403884c7f8a07 100644 --- a/ngraph/core/src/op/loop.cpp +++ b/ngraph/core/src/op/loop.cpp @@ -15,6 +15,7 @@ //***************************************************************************** #include "ngraph/op/loop.hpp" +#include #include "itt.hpp" #include "ngraph/factory.hpp" #include "ngraph/graph_util.hpp" @@ -184,18 +185,19 @@ void op::v5::Loop::validate_and_infer_types() { auto body_parameter = m_body->get_parameters().at(slice_input_description->m_body_parameter_index); - auto input_partial_shape = inputs().at(index).get_source_output().get_partial_shape(); - if (input_partial_shape.is_static()) + const auto& input_partial_shape = + inputs().at(index).get_source_output().get_partial_shape(); + if (input_partial_shape.rank().is_dynamic()) { - // infer type for m_body_parameter - Shape out_shape{input_partial_shape.to_shape()}; - out_shape[slice_input_description->m_axis] = slice_input_description->m_part_size; - body_parameter->set_partial_shape(out_shape); + body_parameter->set_partial_shape(PartialShape::dynamic()); } else { - body_parameter->set_partial_shape( - PartialShape::dynamic(input_partial_shape.rank())); + auto out_shape = input_partial_shape; + const auto axis = ngraph::normalize_axis( + this, slice_input_description->m_axis, input_partial_shape.rank()); + out_shape[axis] = slice_input_description->m_part_size; + body_parameter->set_partial_shape(out_shape); } } else if (auto merged_input_description = @@ -247,47 +249,31 @@ void op::v5::Loop::validate_and_infer_types() as_type_ptr(output_description)) { const auto& body_value_partial_shape = body_value.get_partial_shape(); - if (body_value_partial_shape.rank().is_dynamic()) + auto out_shape = body_value_partial_shape; + if (zero_number_of_iter) { - set_output_type(index, body_value.get_element_type(), PartialShape::dynamic()); + out_shape = PartialShape{0}; } - else + else if (out_shape.rank().is_static()) { - auto axis = concat_output_description->m_axis; - - NODE_VALIDATION_CHECK(this, - axis < body_value_partial_shape.rank().get_length(), - "Concatenation axis must be less than sliced output rank"); - - PartialShape out_shape{body_value_partial_shape}; - - if (body_value_partial_shape.is_static() && - ngraph::is_scalar(body_value_partial_shape.to_shape())) + const auto axis = ngraph::normalize_axis( + this, concat_output_description->m_axis, out_shape.rank()); + const auto rank = out_shape.rank().get_length(); + if (rank == 0) { - NODE_VALIDATION_CHECK( - this, - axis == 0, - "Axis must be equal to 0 if concatenated output tensor slices are scalars. " - "Loop output index: ", - index); - out_shape = Shape(1); + out_shape = PartialShape{1}; } - if (m_num_iterations != -1 && body_value_partial_shape[axis].is_static()) + if (out_shape[axis].is_static() && m_num_iterations != -1) { - out_shape[axis] = - m_num_iterations * body_value_partial_shape[axis].get_length(); - if (zero_number_of_iter) - { - out_shape[0] = 0; - } + out_shape[axis] = Dimension{out_shape[axis].get_length() * m_num_iterations}; } else { out_shape[axis] = Dimension::dynamic(); } - set_output_type(index, body_value.get_element_type(), out_shape); } + set_output_type(index, body_value.get_element_type(), out_shape); } else if (auto body_output_description = diff --git a/ngraph/test/type_prop/loop.cpp b/ngraph/test/type_prop/loop.cpp index fd1f4d912484ae..4259cf7cc5694a 100644 --- a/ngraph/test/type_prop/loop.cpp +++ b/ngraph/test/type_prop/loop.cpp @@ -594,10 +594,9 @@ TEST(type_prop, loop_operation_for_and_condition_mode_dynamic_iter_incorrect_sli auto f = make_shared(ResultVector{result}, ParameterVector{X, Y, M}); FAIL() << "Loop was created with incorrect axis of concatenated slices output."; } - catch (const NodeValidationFailure& error) + catch (const std::exception& error) { - EXPECT_HAS_SUBSTRING( - error.what(), std::string("Concatenation axis must be less than sliced output rank")); + EXPECT_HAS_SUBSTRING(error.what(), std::string("out of the tensor rank range")); } catch (...) { @@ -1032,3 +1031,234 @@ TEST(type_prop, loop_operation_10_iter_static_shapes_sliced_inputs) EXPECT_EQ(loop->get_output_shape(2), out2_shape); EXPECT_EQ(loop->get_output_shape(3), out3_shape); } + +// SliceInputs testing +// trip_count = dynamic +// execution_condition = true +// body_condition = true +// input and output shapes has one dynamic dimension, other shapes are static, unknown iterations +// count will be executed +TEST(type_prop, loop_operation_dynamic_iter_dynamic_batch_shapes_sliced_inputs_concatenated_outputs) +{ + // That which we iterate over + auto X = + make_shared(element::f32, PartialShape{Dimension::dynamic(), 1, 10}); + auto Y = + make_shared(element::f32, PartialShape{32, Dimension::dynamic(), 10}); + auto M = make_shared(element::f32, PartialShape{32, 1, 10}); + auto T = make_shared(element::i64, Shape{}); + + // Set up the cell body, a function from (Xi, Yi) -> (Zo) + // Body parameters + auto current_iteration = make_shared(element::i64, Shape{}); + auto Xi = make_shared(element::f32, PartialShape::dynamic()); + auto Yi = make_shared(element::f32, PartialShape::dynamic()); + auto M_body = make_shared(element::f32, PartialShape::dynamic()); + + auto body_condition = make_shared(element::boolean, Shape{}, true); + auto exec_condition = make_shared(element::boolean, Shape{}, true); + + // Body + auto sum = make_shared(Xi, Yi); + auto Zo = make_shared(sum, M_body); + auto body = make_shared(OutputVector{Zo, body_condition, sum}, + ParameterVector{Xi, Yi, current_iteration, M_body}); + + auto loop = make_shared(T, exec_condition); + loop->set_function(body); + loop->set_special_body_ports(opset5::Loop::SpecialBodyPorts{2, 1}); + + loop->set_sliced_input(Xi, X, 0, 1, 1, -1, 0); + loop->set_sliced_input(Yi, Y, -1, -1, 1, 0, 1); + loop->set_merged_input(M_body, M, Zo); + + // check input descriptors + for (auto& desc : loop->get_input_descriptions()) + { + auto type_info = desc->get_type_info(); + if (std::strcmp(type_info.name, "InvariantInputDescription") == 0) + { + auto input_desc = + as_type_ptr(desc); + EXPECT_NE(input_desc, nullptr); + } + else if (std::strcmp(type_info.name, "SliceInputDescription") == 0) + { + auto input_desc = + as_type_ptr(desc); + EXPECT_NE(input_desc, nullptr); + } + else if (std::strcmp(type_info.name, "MergedInputDescription") == 0) + { + auto input_desc = + as_type_ptr(desc); + EXPECT_NE(input_desc, nullptr); + } + } + + // Output 0 is last Zo + auto out0 = loop->get_iter_value(body_condition, -1); + auto out1 = loop->get_iter_value(Zo, -1); + // Output 1 is concat of Zos + // start=0, stride=1, part_size=1, end=-1, axis=1 + auto out2 = loop->get_concatenated_slices(Zo, 0, 1, 1, -1, 1); + auto out3 = loop->get_iter_value(sum, -1); + + // check output descriptors + for (auto& desc : loop->get_output_descriptions()) + { + auto type_info = desc->get_type_info(); + if (std::strcmp(type_info.name, "ConcatOutputDescription") == 0) + { + auto output_desc = + as_type_ptr(desc); + EXPECT_NE(output_desc, nullptr); + } + else if (std::strcmp(type_info.name, "BodyOutputDescription") == 0) + { + auto output_desc = + as_type_ptr(desc); + EXPECT_NE(output_desc, nullptr); + } + } + + auto result0 = make_shared(out0); + auto result1 = make_shared(out1); + auto result2 = make_shared(out2); + auto result3 = make_shared(out3); + Shape out0_shape{}; + Shape out1_shape{32, 1, 10}; + PartialShape out2_shape{32, Dimension::dynamic(), 10}; + Shape out3_shape{32, 1, 10}; + + auto results = ResultVector{result0, result1, result2, result3}; + auto f = make_shared(results, ParameterVector{X, Y, T, M}); + EXPECT_EQ(f->get_output_size(), 4); + EXPECT_EQ(result0->get_output_shape(0), out0_shape); + EXPECT_EQ(result1->get_output_shape(0), out1_shape); + EXPECT_EQ(result2->get_output_partial_shape(0), out2_shape); + EXPECT_EQ(result3->get_output_shape(0), out3_shape); + + const auto inp0_shape = Shape{1, 1, 10}; + const auto inp1_shape = Shape{32, 1, 10}; + const auto inp2_shape = Shape{}; + const auto inp3_shape = Shape{32, 1, 10}; + EXPECT_EQ(body->get_parameters().size(), 4); + EXPECT_EQ(body->get_parameters().at(0)->get_shape(), inp0_shape); + EXPECT_EQ(body->get_parameters().at(1)->get_shape(), inp1_shape); + EXPECT_EQ(body->get_parameters().at(2)->get_shape(), inp2_shape); + EXPECT_EQ(body->get_parameters().at(3)->get_shape(), inp3_shape); + + EXPECT_EQ(loop->get_output_size(), 4); + EXPECT_EQ(loop->get_output_shape(0), out0_shape); + EXPECT_EQ(loop->get_output_shape(1), out1_shape); + EXPECT_EQ(loop->get_output_partial_shape(2), out2_shape); + EXPECT_EQ(loop->get_output_shape(3), out3_shape); +} + +// SliceInputs testing +// trip_count = dynamic +// execution_condition = true +// body_condition = true +// input and output shapes has one dynamic dimension, other shapes are static, unknown iterations +// count will be executed +TEST(type_prop, loop_operation_dynamic_iter_dynamic_shapes_sliced_inputs_concatenated_outputs) +{ + // That which we iterate over + auto X = make_shared( + element::f32, PartialShape{Dimension::dynamic(), Dimension::dynamic(), 10}); + auto T = make_shared(element::i64, Shape{}); + + // Set up the cell body, a function from (Xi, Yi) -> (Zo) + // Body parameters + auto current_iteration = make_shared(element::i64, Shape{}); + auto Xi = make_shared(element::f32, PartialShape::dynamic()); + + auto body_condition = make_shared(element::boolean, Shape{}, true); + auto exec_condition = make_shared(element::boolean, Shape{}, true); + + // Body + auto Zo = make_shared(Xi, Xi); + auto body = make_shared(OutputVector{Zo, body_condition}, + ParameterVector{Xi, current_iteration}); + + auto loop = make_shared(T, exec_condition); + loop->set_function(body); + loop->set_special_body_ports(opset5::Loop::SpecialBodyPorts{1, 1}); + + loop->set_sliced_input(Xi, X, 0, 1, 1, -1, 0); + + // check input descriptors + for (auto& desc : loop->get_input_descriptions()) + { + auto type_info = desc->get_type_info(); + if (std::strcmp(type_info.name, "InvariantInputDescription") == 0) + { + auto input_desc = + as_type_ptr(desc); + EXPECT_NE(input_desc, nullptr); + } + else if (std::strcmp(type_info.name, "SliceInputDescription") == 0) + { + auto input_desc = + as_type_ptr(desc); + EXPECT_NE(input_desc, nullptr); + } + else if (std::strcmp(type_info.name, "MergedInputDescription") == 0) + { + auto input_desc = + as_type_ptr(desc); + EXPECT_NE(input_desc, nullptr); + } + } + + // Output 0 is last Zo + auto out0 = loop->get_iter_value(body_condition, -1); + auto out1 = loop->get_iter_value(Zo, -1); + // Output 1 is concat of Zos + // start=0, stride=1, part_size=1, end=-1, axis=1 + auto out2 = loop->get_concatenated_slices(Zo, 0, 1, 1, -1, 0); + + // check output descriptors + for (auto& desc : loop->get_output_descriptions()) + { + auto type_info = desc->get_type_info(); + if (std::strcmp(type_info.name, "ConcatOutputDescription") == 0) + { + auto output_desc = + as_type_ptr(desc); + EXPECT_NE(output_desc, nullptr); + } + else if (std::strcmp(type_info.name, "BodyOutputDescription") == 0) + { + auto output_desc = + as_type_ptr(desc); + EXPECT_NE(output_desc, nullptr); + } + } + + auto result0 = make_shared(out0); + auto result1 = make_shared(out1); + auto result2 = make_shared(out2); + Shape out0_shape{}; + PartialShape out1_shape{1, Dimension::dynamic(), 10}; + PartialShape out2_shape{Dimension::dynamic(), Dimension::dynamic(), 10}; + + auto results = ResultVector{result0, result1, result2}; + auto f = make_shared(results, ParameterVector{X, T}); + EXPECT_EQ(f->get_output_size(), 3); + EXPECT_EQ(result0->get_output_shape(0), out0_shape); + EXPECT_EQ(result1->get_output_partial_shape(0), out1_shape); + EXPECT_EQ(result2->get_output_partial_shape(0), out2_shape); + + const auto inp0_shape = PartialShape{1, Dimension::dynamic(), 10}; + const auto inp1_shape = Shape{}; + EXPECT_EQ(body->get_parameters().size(), 2); + EXPECT_EQ(body->get_parameters().at(0)->get_partial_shape(), inp0_shape); + EXPECT_EQ(body->get_parameters().at(1)->get_shape(), inp1_shape); + + EXPECT_EQ(loop->get_output_size(), 3); + EXPECT_EQ(loop->get_output_shape(0), out0_shape); + EXPECT_EQ(loop->get_output_partial_shape(1), out1_shape); + EXPECT_EQ(loop->get_output_partial_shape(2), out2_shape); +} From 967c040e196db554be4312ff50d042872d46134c Mon Sep 17 00:00:00 2001 From: Jozef Daniecki Date: Tue, 22 Dec 2020 16:29:07 +0100 Subject: [PATCH 117/244] Regenerate MO models with current MO version. (#3668) Constant port numbering was changed in MO serialization, needed to regenerate models for serialization functional tests to reflect current MO IR. --- .../ir_serialization/models/add_abc.xml | 2 +- .../models/add_abc_initializers.xml | 12 ++++++------ .../ir_serialization/models/addmul_abc.xml | 2 +- .../models/split_equal_parts_2d.xml | 14 +++++++------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/inference-engine/tests/functional/inference_engine/ir_serialization/models/add_abc.xml b/inference-engine/tests/functional/inference_engine/ir_serialization/models/add_abc.xml index 5fc69fbdadd29d..b606808d9bf9b6 100644 --- a/inference-engine/tests/functional/inference_engine/ir_serialization/models/add_abc.xml +++ b/inference-engine/tests/functional/inference_engine/ir_serialization/models/add_abc.xml @@ -71,7 +71,7 @@ - + diff --git a/inference-engine/tests/functional/inference_engine/ir_serialization/models/add_abc_initializers.xml b/inference-engine/tests/functional/inference_engine/ir_serialization/models/add_abc_initializers.xml index 78d971447a7eb5..cfaebc7d2f9f3c 100644 --- a/inference-engine/tests/functional/inference_engine/ir_serialization/models/add_abc_initializers.xml +++ b/inference-engine/tests/functional/inference_engine/ir_serialization/models/add_abc_initializers.xml @@ -1,10 +1,10 @@ - + - + 2 2 @@ -47,12 +47,12 @@ - + - + @@ -67,7 +67,7 @@ - + @@ -75,7 +75,7 @@ - + diff --git a/inference-engine/tests/functional/inference_engine/ir_serialization/models/addmul_abc.xml b/inference-engine/tests/functional/inference_engine/ir_serialization/models/addmul_abc.xml index 6e6cfd8336bbc0..120c56b1b7a6b7 100644 --- a/inference-engine/tests/functional/inference_engine/ir_serialization/models/addmul_abc.xml +++ b/inference-engine/tests/functional/inference_engine/ir_serialization/models/addmul_abc.xml @@ -122,7 +122,7 @@ - + diff --git a/inference-engine/tests/functional/inference_engine/ir_serialization/models/split_equal_parts_2d.xml b/inference-engine/tests/functional/inference_engine/ir_serialization/models/split_equal_parts_2d.xml index b6cc5fc0d9379c..71404f103f0572 100644 --- a/inference-engine/tests/functional/inference_engine/ir_serialization/models/split_equal_parts_2d.xml +++ b/inference-engine/tests/functional/inference_engine/ir_serialization/models/split_equal_parts_2d.xml @@ -13,7 +13,7 @@ - + @@ -39,7 +39,7 @@ - + @@ -68,7 +68,7 @@ - + @@ -97,16 +97,16 @@ - + - + - + - + From 1926179b6535943da730c438e186e20c83954bbe Mon Sep 17 00:00:00 2001 From: Ilya Churaev Date: Tue, 22 Dec 2020 18:29:41 +0300 Subject: [PATCH 118/244] Changed OV_SCOPE semantic (#3692) * Added if DEFINE construction * Changed OV_SCOPE semantic * Fixed the code style * Fixed redundant lines --- .../selective_build.cpp | 7 +- .../selective_build_analyzer.cpp | 6 +- ngraph/core/include/ngraph/op/topk.hpp | 4 - ngraph/core/src/itt.hpp | 23 ++--- ngraph/core/src/op/abs.cpp | 7 +- ngraph/core/src/op/acos.cpp | 7 +- ngraph/core/src/op/acosh.cpp | 2 +- ngraph/core/src/op/add.cpp | 6 +- ngraph/core/src/op/and.cpp | 6 +- ngraph/core/src/op/asin.cpp | 7 +- ngraph/core/src/op/asinh.cpp | 2 +- ngraph/core/src/op/atan.cpp | 7 +- ngraph/core/src/op/atanh.cpp | 2 +- ngraph/core/src/op/batch_to_space.cpp | 2 +- ngraph/core/src/op/broadcast.cpp | 8 +- ngraph/core/src/op/ceiling.cpp | 7 +- ngraph/core/src/op/clamp.cpp | 7 +- ngraph/core/src/op/concat.cpp | 9 +- ngraph/core/src/op/constant.cpp | 9 +- ngraph/core/src/op/convert.cpp | 12 ++- ngraph/core/src/op/cos.cpp | 7 +- ngraph/core/src/op/cosh.cpp | 7 +- ngraph/core/src/op/depth_to_space.cpp | 2 +- ngraph/core/src/op/divide.cpp | 8 +- ngraph/core/src/op/equal.cpp | 6 +- ngraph/core/src/op/erf.cpp | 7 +- ngraph/core/src/op/exp.cpp | 7 +- ngraph/core/src/op/floor.cpp | 7 +- ngraph/core/src/op/floor_mod.cpp | 7 +- ngraph/core/src/op/gather.cpp | 2 +- ngraph/core/src/op/greater.cpp | 7 +- ngraph/core/src/op/greater_eq.cpp | 8 +- ngraph/core/src/op/hsigmoid.cpp | 7 +- ngraph/core/src/op/hswish.cpp | 7 +- ngraph/core/src/op/interpolate.cpp | 2 +- ngraph/core/src/op/less.cpp | 6 +- ngraph/core/src/op/less_eq.cpp | 7 +- ngraph/core/src/op/log.cpp | 7 +- ngraph/core/src/op/loop.cpp | 18 ++-- ngraph/core/src/op/matmul.cpp | 8 +- ngraph/core/src/op/max.cpp | 7 +- ngraph/core/src/op/max_pool.cpp | 2 +- ngraph/core/src/op/maximum.cpp | 7 +- ngraph/core/src/op/min.cpp | 7 +- ngraph/core/src/op/minimum.cpp | 7 +- ngraph/core/src/op/mish.cpp | 7 +- ngraph/core/src/op/multiply.cpp | 14 +-- ngraph/core/src/op/negative.cpp | 8 +- ngraph/core/src/op/non_zero.cpp | 14 ++- ngraph/core/src/op/not.cpp | 7 +- ngraph/core/src/op/not_equal.cpp | 7 +- ngraph/core/src/op/one_hot.cpp | 18 ++-- ngraph/core/src/op/or.cpp | 6 +- ngraph/core/src/op/pad.cpp | 2 +- ngraph/core/src/op/power.cpp | 6 +- ngraph/core/src/op/prelu.cpp | 6 +- ngraph/core/src/op/prior_box.cpp | 14 +-- ngraph/core/src/op/prior_box_clustered.cpp | 14 +-- ngraph/core/src/op/range.cpp | 22 +++-- ngraph/core/src/op/reduce_l1.cpp | 8 +- ngraph/core/src/op/reduce_l2.cpp | 8 +- ngraph/core/src/op/reduce_logical_and.cpp | 11 ++- ngraph/core/src/op/reduce_logical_or.cpp | 11 ++- ngraph/core/src/op/reduce_mean.cpp | 7 +- ngraph/core/src/op/reduce_prod.cpp | 8 +- ngraph/core/src/op/reduce_sum.cpp | 8 +- ngraph/core/src/op/relu.cpp | 7 +- ngraph/core/src/op/reshape.cpp | 8 +- ngraph/core/src/op/result.cpp | 13 ++- ngraph/core/src/op/reverse.cpp | 8 +- ngraph/core/src/op/roi_align.cpp | 7 +- ngraph/core/src/op/round.cpp | 8 +- .../core/src/op/scatter_elements_update.cpp | 18 ++-- ngraph/core/src/op/scatter_update.cpp | 9 +- ngraph/core/src/op/select.cpp | 10 +- ngraph/core/src/op/shape_of.cpp | 12 ++- ngraph/core/src/op/shuffle_channels.cpp | 2 +- ngraph/core/src/op/sigmoid.cpp | 7 +- ngraph/core/src/op/sign.cpp | 7 +- ngraph/core/src/op/sin.cpp | 7 +- ngraph/core/src/op/sinh.cpp | 7 +- ngraph/core/src/op/softmax.cpp | 7 +- ngraph/core/src/op/softplus.cpp | 7 +- ngraph/core/src/op/space_to_batch.cpp | 2 +- ngraph/core/src/op/space_to_depth.cpp | 2 +- ngraph/core/src/op/split.cpp | 8 +- ngraph/core/src/op/sqrt.cpp | 7 +- ngraph/core/src/op/squeeze.cpp | 6 +- ngraph/core/src/op/strided_slice.cpp | 26 +++--- ngraph/core/src/op/subtract.cpp | 7 +- ngraph/core/src/op/swish.cpp | 7 +- ngraph/core/src/op/tan.cpp | 7 +- ngraph/core/src/op/tanh.cpp | 7 +- ngraph/core/src/op/tile.cpp | 2 +- ngraph/core/src/op/topk.cpp | 91 ++++++++++--------- ngraph/core/src/op/transpose.cpp | 7 +- ngraph/core/src/op/unsqueeze.cpp | 6 +- ngraph/core/src/op/util/broadcast_base.cpp | 43 ++++++--- ngraph/core/src/op/variadic_split.cpp | 2 +- ngraph/core/src/op/xor.cpp | 12 ++- .../include/openvino/cc/selective_build.h | 21 ++--- 101 files changed, 537 insertions(+), 383 deletions(-) diff --git a/inference-engine/tests/functional/inference_engine/conditional_compilation/selective_build.cpp b/inference-engine/tests/functional/inference_engine/conditional_compilation/selective_build.cpp index 386d74794811f0..2c4321f44ad6fd 100644 --- a/inference-engine/tests/functional/inference_engine/conditional_compilation/selective_build.cpp +++ b/inference-engine/tests/functional/inference_engine/conditional_compilation/selective_build.cpp @@ -62,15 +62,16 @@ struct TestNode : public TestNodeBase { TEST(ConditionalCompilationTests, SimpleScope) { #define CCTests_Scope0 1 - int n = 0; // Simple scope is enabled - OV_SCOPE(CCTests, Scope0, n = 42;); + OV_SCOPE(CCTests, Scope0) { + n = 42; + } EXPECT_EQ(n, 42); // Simple scope is disabled - OV_SCOPE(CCTests, Scope1, n = 0;); + OV_SCOPE(CCTests, Scope1) n = 43; EXPECT_EQ(n, 42); #undef CCTests_Scope0 diff --git a/inference-engine/tests/functional/inference_engine/conditional_compilation/selective_build_analyzer.cpp b/inference-engine/tests/functional/inference_engine/conditional_compilation/selective_build_analyzer.cpp index 888978c8442341..a274b6b6bad0af 100644 --- a/inference-engine/tests/functional/inference_engine/conditional_compilation/selective_build_analyzer.cpp +++ b/inference-engine/tests/functional/inference_engine/conditional_compilation/selective_build_analyzer.cpp @@ -63,10 +63,12 @@ struct TestNode : public TestNodeBase { TEST(ConditionalCompilationTests, SimpleScopeAnalysys) { int n = 0; - OV_SCOPE(CCTests, Scope0, n = 42;); + OV_SCOPE(CCTests, Scope0) n = 42; EXPECT_EQ(n, 42); - OV_SCOPE(CCTests, Scope1, n = 43;); + OV_SCOPE(CCTests, Scope1) { + n = 43; + } EXPECT_EQ(n, 43); } diff --git a/ngraph/core/include/ngraph/op/topk.hpp b/ngraph/core/include/ngraph/op/topk.hpp index 731cf1708fb2a2..8a6b13da13de96 100644 --- a/ngraph/core/include/ngraph/op/topk.hpp +++ b/ngraph/core/include/ngraph/op/topk.hpp @@ -115,10 +115,6 @@ namespace ngraph const PartialShape input_partial_shape, const int64_t k) const; void set_axis(const Rank input_rank, const int64_t axis); - - private: - bool evaluate_topk(const HostTensorVector& outputs, - const HostTensorVector& inputs) const; }; } // namespace v1 diff --git a/ngraph/core/src/itt.hpp b/ngraph/core/src/itt.hpp index 5b09bf9048a08a..eb49bf07eb9de2 100644 --- a/ngraph/core/src/itt.hpp +++ b/ngraph/core/src/itt.hpp @@ -40,26 +40,27 @@ namespace ngraph } #if defined(SELECTIVE_BUILD) || defined(SELECTIVE_BUILD_ANALYZER) -#define NGRAPH_OP_SCOPE(region, ...) OV_SCOPE(ngraph_op, region, __VA_ARGS__) +#define NGRAPH_OP_SCOPE(region) OV_SCOPE(ngraph_op, region) #else -#define NGRAPH_OP_SCOPE(region, ...) \ - OV_ITT_SCOPED_TASK(itt::domains::ngraph_op, #region); \ - __VA_ARGS__ +#define NGRAPH_OP_SCOPE(region) OV_ITT_SCOPED_TASK(itt::domains::ngraph_op, #region); #endif #define NGRAPH_TYPE_CASE(region, a, ...) \ case element::Type_t::a: \ { \ - OV_SCOPE( \ - ngraph_op, OV_CC_CAT3(region, _, a), rc = evaluate(__VA_ARGS__)); \ + OV_SCOPE(ngraph_op, OV_CC_CAT3(region, _, a)) \ + { \ + rc = evaluate(__VA_ARGS__); \ + } \ } \ - break; + break #define NGRAPH_COPY_TENSOR(region, a, ...) \ case element::Type_t::a: \ { \ - OV_SCOPE(ngraph_op, \ - OV_CC_CAT3(region, _, a), \ - rc = copy_tensor(__VA_ARGS__)); \ + OV_SCOPE(ngraph_op, OV_CC_CAT3(region, _, a)) \ + { \ + rc = copy_tensor(__VA_ARGS__); \ + } \ } \ - break; + break diff --git a/ngraph/core/src/op/abs.cpp b/ngraph/core/src/op/abs.cpp index 5118690ec822a4..1c66c5fe4c9ba6 100644 --- a/ngraph/core/src/op/abs.cpp +++ b/ngraph/core/src/op/abs.cpp @@ -74,8 +74,9 @@ namespace absop bool op::Abs::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { bool rc = false; - NGRAPH_OP_SCOPE( - v0_Abs_evaluate, - rc = absop::evaluate_abs(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + NGRAPH_OP_SCOPE(v0_Abs_evaluate) + { + rc = absop::evaluate_abs(inputs[0], outputs[0], shape_size(get_output_shape(0))); + } return rc; } diff --git a/ngraph/core/src/op/acos.cpp b/ngraph/core/src/op/acos.cpp index 9a727794a0445b..d8de50d27f9b4d 100644 --- a/ngraph/core/src/op/acos.cpp +++ b/ngraph/core/src/op/acos.cpp @@ -82,8 +82,9 @@ namespace acosop bool op::Acos::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { bool rc = false; - NGRAPH_OP_SCOPE( - v0_Acos_evaluate, - rc = acosop::evaluate_acos(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + NGRAPH_OP_SCOPE(v0_Acos_evaluate) + { + rc = acosop::evaluate_acos(inputs[0], outputs[0], shape_size(get_output_shape(0))); + } return rc; } diff --git a/ngraph/core/src/op/acosh.cpp b/ngraph/core/src/op/acosh.cpp index 5e7e3c4bf66adf..b1168dfb1d313f 100644 --- a/ngraph/core/src/op/acosh.cpp +++ b/ngraph/core/src/op/acosh.cpp @@ -71,6 +71,6 @@ namespace acoshop bool op::v3::Acosh::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { bool rc = false; - NGRAPH_OP_SCOPE(v3_Acosh_evaluate, rc = acoshop::evaluate_acosh(inputs[0], outputs[0])); + NGRAPH_OP_SCOPE(v3_Acosh_evaluate) { rc = acoshop::evaluate_acosh(inputs[0], outputs[0]); } return rc; } diff --git a/ngraph/core/src/op/add.cpp b/ngraph/core/src/op/add.cpp index 85226797196cf5..b6eb9d5bb3a913 100644 --- a/ngraph/core/src/op/add.cpp +++ b/ngraph/core/src/op/add.cpp @@ -94,7 +94,9 @@ shared_ptr op::v1::Add::clone_with_new_inputs(const OutputVector& new_args bool op::v1::Add::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { bool rc = false; - NGRAPH_OP_SCOPE(v1_Add_evaluate, - rc = add::evaluate_add(inputs[0], inputs[1], outputs[0], get_autob())); + NGRAPH_OP_SCOPE(v1_Add_evaluate) + { + rc = add::evaluate_add(inputs[0], inputs[1], outputs[0], get_autob()); + } return rc; } diff --git a/ngraph/core/src/op/and.cpp b/ngraph/core/src/op/and.cpp index 2e3baabdcc179b..70efe6beb10b6c 100644 --- a/ngraph/core/src/op/and.cpp +++ b/ngraph/core/src/op/and.cpp @@ -87,7 +87,9 @@ bool op::v1::LogicalAnd::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { bool rc = false; - NGRAPH_OP_SCOPE(v1_LogicalAnd_evaluate, - rc = logand::evaluate_logand(inputs[0], inputs[1], outputs[0], get_autob())); + NGRAPH_OP_SCOPE(v1_LogicalAnd_evaluate) + { + rc = logand::evaluate_logand(inputs[0], inputs[1], outputs[0], get_autob()); + } return rc; } diff --git a/ngraph/core/src/op/asin.cpp b/ngraph/core/src/op/asin.cpp index 6020233bffcb41..ce913916ca7157 100644 --- a/ngraph/core/src/op/asin.cpp +++ b/ngraph/core/src/op/asin.cpp @@ -83,8 +83,9 @@ namespace asinop bool op::Asin::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { bool rc = false; - NGRAPH_OP_SCOPE( - v0_Asin_evaluate, - rc = asinop::evaluate_asin(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + NGRAPH_OP_SCOPE(v0_Asin_evaluate) + { + rc = asinop::evaluate_asin(inputs[0], outputs[0], shape_size(get_output_shape(0))); + } return rc; } diff --git a/ngraph/core/src/op/asinh.cpp b/ngraph/core/src/op/asinh.cpp index 5cdee483546158..7b3afbad488421 100644 --- a/ngraph/core/src/op/asinh.cpp +++ b/ngraph/core/src/op/asinh.cpp @@ -71,6 +71,6 @@ namespace asinhop bool op::v3::Asinh::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { bool rc = false; - NGRAPH_OP_SCOPE(v3_Asinh_evaluate, rc = asinhop::evaluate_asinh(inputs[0], outputs[0])); + NGRAPH_OP_SCOPE(v3_Asinh_evaluate) { rc = asinhop::evaluate_asinh(inputs[0], outputs[0]); } return rc; } diff --git a/ngraph/core/src/op/atan.cpp b/ngraph/core/src/op/atan.cpp index 6d29bfa911af90..41a11d67a46bcb 100644 --- a/ngraph/core/src/op/atan.cpp +++ b/ngraph/core/src/op/atan.cpp @@ -82,8 +82,9 @@ namespace atanop bool op::Atan::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { bool rc = false; - NGRAPH_OP_SCOPE( - v0_Atan_evaluate, - rc = atanop::evaluate_atan(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + NGRAPH_OP_SCOPE(v0_Atan_evaluate) + { + rc = atanop::evaluate_atan(inputs[0], outputs[0], shape_size(get_output_shape(0))); + } return rc; } diff --git a/ngraph/core/src/op/atanh.cpp b/ngraph/core/src/op/atanh.cpp index 3fa52e9a3d5720..ca2eb9d1df5e17 100644 --- a/ngraph/core/src/op/atanh.cpp +++ b/ngraph/core/src/op/atanh.cpp @@ -71,6 +71,6 @@ namespace atanhop bool op::v3::Atanh::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { bool rc = false; - NGRAPH_OP_SCOPE(v3_Atanh_evaluate, rc = atanhop::evaluate_atanh(inputs[0], outputs[0])); + NGRAPH_OP_SCOPE(v3_Atanh_evaluate) { rc = atanhop::evaluate_atanh(inputs[0], outputs[0]); } return rc; } diff --git a/ngraph/core/src/op/batch_to_space.cpp b/ngraph/core/src/op/batch_to_space.cpp index 4cb2111001a18d..20dbd8c0b7ed79 100644 --- a/ngraph/core/src/op/batch_to_space.cpp +++ b/ngraph/core/src/op/batch_to_space.cpp @@ -259,6 +259,6 @@ namespace bool ngraph::op::v1::BatchToSpace::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v1_BatchToSpace, return batch_to_space_evaluate(outputs, inputs)); + NGRAPH_OP_SCOPE(v1_BatchToSpace) { return batch_to_space_evaluate(outputs, inputs); } return false; } diff --git a/ngraph/core/src/op/broadcast.cpp b/ngraph/core/src/op/broadcast.cpp index 72316f3f52c7ea..93cba402c78015 100644 --- a/ngraph/core/src/op/broadcast.cpp +++ b/ngraph/core/src/op/broadcast.cpp @@ -228,7 +228,7 @@ bool op::v3::Broadcast::visit_attributes(AttributeVisitor& visitor) bool op::v3::Broadcast::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v3_Broadcast_evaluate, return broadcast_evaluate(outputs, inputs)); + NGRAPH_OP_SCOPE(v3_Broadcast_evaluate) { return broadcast_evaluate(outputs, inputs); } return false; } @@ -318,7 +318,9 @@ bool op::v1::Broadcast::visit_attributes(AttributeVisitor& visitor) bool op::v1::Broadcast::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v1_Broadcast_evaluate, - return op::util::BroadcastBase::evaluate(outputs, inputs)); + NGRAPH_OP_SCOPE(v1_Broadcast_evaluate) + { + return op::util::BroadcastBase::evaluate(outputs, inputs); + } return false; } diff --git a/ngraph/core/src/op/ceiling.cpp b/ngraph/core/src/op/ceiling.cpp index f2c4660858745e..5e6a627750d0fb 100644 --- a/ngraph/core/src/op/ceiling.cpp +++ b/ngraph/core/src/op/ceiling.cpp @@ -83,8 +83,9 @@ namespace ceiling bool op::Ceiling::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - v0_Ceiling_evaluate, - return ceiling::evaluate_ceiling(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + NGRAPH_OP_SCOPE(v0_Ceiling_evaluate) + { + return ceiling::evaluate_ceiling(inputs[0], outputs[0], shape_size(get_output_shape(0))); + } return false; } diff --git a/ngraph/core/src/op/clamp.cpp b/ngraph/core/src/op/clamp.cpp index af7229fe96cdd8..179ee2886b758d 100644 --- a/ngraph/core/src/op/clamp.cpp +++ b/ngraph/core/src/op/clamp.cpp @@ -86,10 +86,11 @@ namespace clamp bool op::v0::Clamp::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - v0_Clamp_evaluate, + NGRAPH_OP_SCOPE(v0_Clamp_evaluate) + { return clamp::evaluate_clamp( - inputs[0], outputs[0], get_min(), get_max(), shape_size(get_input_shape(0)))); + inputs[0], outputs[0], get_min(), get_max(), shape_size(get_input_shape(0))); + } return false; } diff --git a/ngraph/core/src/op/concat.cpp b/ngraph/core/src/op/concat.cpp index 10ad3ea66919da..cc3cce010c6a93 100644 --- a/ngraph/core/src/op/concat.cpp +++ b/ngraph/core/src/op/concat.cpp @@ -144,9 +144,10 @@ namespace bool op::Concat::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v0_Concat_evaluate, - auto concat_axis = - get_axis() < 0 ? get_axis() + inputs[0]->get_shape().size() : get_axis(); - return evaluate_concat(inputs, outputs[0], concat_axis)); + NGRAPH_OP_SCOPE(v0_Concat_evaluate) + { + auto concat_axis = get_axis() < 0 ? get_axis() + inputs[0]->get_shape().size() : get_axis(); + return evaluate_concat(inputs, outputs[0], concat_axis); + } return false; } diff --git a/ngraph/core/src/op/constant.cpp b/ngraph/core/src/op/constant.cpp index d3caf113efde44..14f836f8d244d0 100644 --- a/ngraph/core/src/op/constant.cpp +++ b/ngraph/core/src/op/constant.cpp @@ -638,9 +638,12 @@ bool op::v0::Constant::visit_attributes(AttributeVisitor& visitor) bool op::v0::Constant::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v0_Constant_evaluate, auto output = outputs[0]; - output->write(get_data_ptr(), output->get_size_in_bytes()); - return true); + NGRAPH_OP_SCOPE(v0_Constant_evaluate) + { + auto output = outputs[0]; + output->write(get_data_ptr(), output->get_size_in_bytes()); + return true; + } return false; } diff --git a/ngraph/core/src/op/convert.cpp b/ngraph/core/src/op/convert.cpp index a7a981b34cc543..94fdaae85f5935 100644 --- a/ngraph/core/src/op/convert.cpp +++ b/ngraph/core/src/op/convert.cpp @@ -66,8 +66,10 @@ namespace convert #define TYPE_OUT_CASE(a, ...) \ case element::Type_t::a: \ { \ - NGRAPH_OP_SCOPE(OV_CC_CAT3(evaluate_covert_out, _, a), \ - rc = evaluate(__VA_ARGS__)); \ + NGRAPH_OP_SCOPE(OV_CC_CAT3(evaluate_covert_out, _, a)) \ + { \ + rc = evaluate(__VA_ARGS__); \ + } \ } \ break @@ -117,7 +119,9 @@ namespace convert bool op::v0::Convert::evaluate(const HostTensorVector& output_values, const HostTensorVector& input_values) const { - NGRAPH_OP_SCOPE(v0_Convert_evaluate, - return convert::evaluate_convert(input_values[0], output_values[0])); + NGRAPH_OP_SCOPE(v0_Convert_evaluate) + { + return convert::evaluate_convert(input_values[0], output_values[0]); + } return false; } diff --git a/ngraph/core/src/op/cos.cpp b/ngraph/core/src/op/cos.cpp index 04ff1f34bbd03f..ad9020f223d7f0 100644 --- a/ngraph/core/src/op/cos.cpp +++ b/ngraph/core/src/op/cos.cpp @@ -78,8 +78,9 @@ namespace cosop bool op::Cos::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - v0_Cos_evaluate, - return cosop::evaluate_cos(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + NGRAPH_OP_SCOPE(v0_Cos_evaluate) + { + return cosop::evaluate_cos(inputs[0], outputs[0], shape_size(get_output_shape(0))); + } return false; } diff --git a/ngraph/core/src/op/cosh.cpp b/ngraph/core/src/op/cosh.cpp index 3d32acd73bc193..f1701321d67fcb 100644 --- a/ngraph/core/src/op/cosh.cpp +++ b/ngraph/core/src/op/cosh.cpp @@ -77,8 +77,9 @@ namespace coshop bool op::Cosh::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - v0_Cosh_evaluate, - return coshop::evaluate_cosh(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + NGRAPH_OP_SCOPE(v0_Cosh_evaluate) + { + return coshop::evaluate_cosh(inputs[0], outputs[0], shape_size(get_output_shape(0))); + } return false; } diff --git a/ngraph/core/src/op/depth_to_space.cpp b/ngraph/core/src/op/depth_to_space.cpp index b0f7cebe45cd1c..616d3620af7cc1 100644 --- a/ngraph/core/src/op/depth_to_space.cpp +++ b/ngraph/core/src/op/depth_to_space.cpp @@ -243,7 +243,7 @@ bool op::DepthToSpace::evaluate_depth_to_space(const HostTensorVector& outputs, bool op::DepthToSpace::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v0_DepthToSpace_evaluate, return evaluate_depth_to_space(outputs, inputs)); + NGRAPH_OP_SCOPE(v0_DepthToSpace_evaluate) { return evaluate_depth_to_space(outputs, inputs); } return false; } namespace ngraph diff --git a/ngraph/core/src/op/divide.cpp b/ngraph/core/src/op/divide.cpp index 27cd13fcbca41a..03625897db582c 100644 --- a/ngraph/core/src/op/divide.cpp +++ b/ngraph/core/src/op/divide.cpp @@ -106,8 +106,10 @@ shared_ptr op::v1::Divide::clone_with_new_inputs(const OutputVector& new_a bool op::v1::Divide::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v1_Divide_evaluate, - return divide::evaluate_divide( - inputs[0], inputs[1], outputs[0], get_autob(), is_pythondiv())); + NGRAPH_OP_SCOPE(v1_Divide_evaluate) + { + return divide::evaluate_divide( + inputs[0], inputs[1], outputs[0], get_autob(), is_pythondiv()); + } return false; } diff --git a/ngraph/core/src/op/equal.cpp b/ngraph/core/src/op/equal.cpp index f6f378de847e22..9ddd14c9e81844 100644 --- a/ngraph/core/src/op/equal.cpp +++ b/ngraph/core/src/op/equal.cpp @@ -83,7 +83,9 @@ shared_ptr op::v1::Equal::clone_with_new_inputs(const OutputVector& new_ar bool op::v1::Equal::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v1_Equal_evaluate, - return equal::evaluate_equal(inputs[0], inputs[1], outputs[0], get_autob())); + NGRAPH_OP_SCOPE(v1_Equal_evaluate) + { + return equal::evaluate_equal(inputs[0], inputs[1], outputs[0], get_autob()); + } return false; } diff --git a/ngraph/core/src/op/erf.cpp b/ngraph/core/src/op/erf.cpp index 476de5c1dd4c99..96a168adbf759f 100644 --- a/ngraph/core/src/op/erf.cpp +++ b/ngraph/core/src/op/erf.cpp @@ -76,8 +76,9 @@ namespace erfop bool op::Erf::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - v0_Erf_evaluate, - return erfop::evaluate_erf(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + NGRAPH_OP_SCOPE(v0_Erf_evaluate) + { + return erfop::evaluate_erf(inputs[0], outputs[0], shape_size(get_output_shape(0))); + } return false; } diff --git a/ngraph/core/src/op/exp.cpp b/ngraph/core/src/op/exp.cpp index fe1ae0488ccd90..f63626e96e28e3 100644 --- a/ngraph/core/src/op/exp.cpp +++ b/ngraph/core/src/op/exp.cpp @@ -76,8 +76,9 @@ namespace expop bool op::Exp::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - v0_Exp_evaluate, - return expop::evaluate_exp(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + NGRAPH_OP_SCOPE(v0_Exp_evaluate) + { + return expop::evaluate_exp(inputs[0], outputs[0], shape_size(get_output_shape(0))); + } return false; } diff --git a/ngraph/core/src/op/floor.cpp b/ngraph/core/src/op/floor.cpp index eb89b9c715af45..ed8e44c83affcd 100644 --- a/ngraph/core/src/op/floor.cpp +++ b/ngraph/core/src/op/floor.cpp @@ -88,8 +88,9 @@ namespace floorop bool op::Floor::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - v0_Floor_evaluate, - return floorop::evaluate_floor(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + NGRAPH_OP_SCOPE(v0_Floor_evaluate) + { + return floorop::evaluate_floor(inputs[0], outputs[0], shape_size(get_output_shape(0))); + } return false; } diff --git a/ngraph/core/src/op/floor_mod.cpp b/ngraph/core/src/op/floor_mod.cpp index 69fd4c6a7abb94..8795ac359366f9 100644 --- a/ngraph/core/src/op/floor_mod.cpp +++ b/ngraph/core/src/op/floor_mod.cpp @@ -82,9 +82,10 @@ namespace floor_mod bool op::v1::FloorMod::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - v1_FloorMod_evaluate, - return floor_mod::evaluate_floor_mod(inputs[0], inputs[1], outputs[0], get_autob())); + NGRAPH_OP_SCOPE(v1_FloorMod_evaluate) + { + return floor_mod::evaluate_floor_mod(inputs[0], inputs[1], outputs[0], get_autob()); + } return false; } diff --git a/ngraph/core/src/op/gather.cpp b/ngraph/core/src/op/gather.cpp index 4cd8791d4e2aca..97cad74c101878 100644 --- a/ngraph/core/src/op/gather.cpp +++ b/ngraph/core/src/op/gather.cpp @@ -313,7 +313,7 @@ bool op::v1::Gather::evaluate_gather(const HostTensorVector& outputs, bool op::v1::Gather::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v1_Gather_evaluate, return evaluate_gather(outputs, inputs)); + NGRAPH_OP_SCOPE(v1_Gather_evaluate) { return evaluate_gather(outputs, inputs); } return false; } diff --git a/ngraph/core/src/op/greater.cpp b/ngraph/core/src/op/greater.cpp index 5a5cdd293d0bf6..b8b1cf36cd5179 100644 --- a/ngraph/core/src/op/greater.cpp +++ b/ngraph/core/src/op/greater.cpp @@ -84,8 +84,9 @@ shared_ptr op::v1::Greater::clone_with_new_inputs(const OutputVector& new_ bool op::v1::Greater::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - v1_Greater_evaluate, - return greaterop::evaluate_greater(inputs[0], inputs[1], outputs[0], get_autob())); + NGRAPH_OP_SCOPE(v1_Greater_evaluate) + { + return greaterop::evaluate_greater(inputs[0], inputs[1], outputs[0], get_autob()); + } return false; } diff --git a/ngraph/core/src/op/greater_eq.cpp b/ngraph/core/src/op/greater_eq.cpp index f5d99000df0a49..6767802e1bd448 100644 --- a/ngraph/core/src/op/greater_eq.cpp +++ b/ngraph/core/src/op/greater_eq.cpp @@ -84,8 +84,10 @@ shared_ptr op::v1::GreaterEqual::clone_with_new_inputs(const OutputVector& bool op::v1::GreaterEqual::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v1_GreaterEqual_evaluate, - return greater_equalop::evaluate_greater_equal( - inputs[0], inputs[1], outputs[0], get_autob())); + NGRAPH_OP_SCOPE(v1_GreaterEqual_evaluate) + { + return greater_equalop::evaluate_greater_equal( + inputs[0], inputs[1], outputs[0], get_autob()); + } return false; } diff --git a/ngraph/core/src/op/hsigmoid.cpp b/ngraph/core/src/op/hsigmoid.cpp index 50715d62c836c2..8ea589979bc8b6 100644 --- a/ngraph/core/src/op/hsigmoid.cpp +++ b/ngraph/core/src/op/hsigmoid.cpp @@ -73,8 +73,9 @@ namespace bool op::v5::HSigmoid::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - v5_HSigmoid_evaluate, - return evaluate_hsigmoid(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + NGRAPH_OP_SCOPE(v5_HSigmoid_evaluate) + { + return evaluate_hsigmoid(inputs[0], outputs[0], shape_size(get_output_shape(0))); + } return false; } diff --git a/ngraph/core/src/op/hswish.cpp b/ngraph/core/src/op/hswish.cpp index 118048aad7752a..566043bec61014 100644 --- a/ngraph/core/src/op/hswish.cpp +++ b/ngraph/core/src/op/hswish.cpp @@ -72,8 +72,9 @@ namespace hswish bool op::v4::HSwish::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - v4_HSwish_evaluate, - return hswish::evaluate_hswish(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + NGRAPH_OP_SCOPE(v4_HSwish_evaluate) + { + return hswish::evaluate_hswish(inputs[0], outputs[0], shape_size(get_output_shape(0))); + } return false; } diff --git a/ngraph/core/src/op/interpolate.cpp b/ngraph/core/src/op/interpolate.cpp index 50190ecb448142..cda5142bc90419 100644 --- a/ngraph/core/src/op/interpolate.cpp +++ b/ngraph/core/src/op/interpolate.cpp @@ -497,7 +497,7 @@ bool op::v4::Interpolate::evaluate_interpolate(const HostTensorVector& outputs, bool op::v4::Interpolate::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v4_Interpolate_evaluate, return evaluate_interpolate(outputs, inputs)); + NGRAPH_OP_SCOPE(v4_Interpolate_evaluate) { return evaluate_interpolate(outputs, inputs); } return false; } diff --git a/ngraph/core/src/op/less.cpp b/ngraph/core/src/op/less.cpp index 06ea7922a9cfc4..09513d6b97fdf9 100644 --- a/ngraph/core/src/op/less.cpp +++ b/ngraph/core/src/op/less.cpp @@ -83,7 +83,9 @@ shared_ptr op::v1::Less::clone_with_new_inputs(const OutputVector& new_arg bool op::v1::Less::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v1_Less_evaluate, - return lessop::evaluate_less(inputs[0], inputs[1], outputs[0], get_autob())); + NGRAPH_OP_SCOPE(v1_Less_evaluate) + { + return lessop::evaluate_less(inputs[0], inputs[1], outputs[0], get_autob()); + } return false; } diff --git a/ngraph/core/src/op/less_eq.cpp b/ngraph/core/src/op/less_eq.cpp index 58703b37a13f32..8d886c88fe2517 100644 --- a/ngraph/core/src/op/less_eq.cpp +++ b/ngraph/core/src/op/less_eq.cpp @@ -84,8 +84,9 @@ namespace less_equalop bool op::v1::LessEqual::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - v1_LessEqual_evaluate, - return less_equalop::evaluate_less_equal(inputs[0], inputs[1], outputs[0], get_autob())); + NGRAPH_OP_SCOPE(v1_LessEqual_evaluate) + { + return less_equalop::evaluate_less_equal(inputs[0], inputs[1], outputs[0], get_autob()); + } return false; } diff --git a/ngraph/core/src/op/log.cpp b/ngraph/core/src/op/log.cpp index 04e17227aa22b6..4923977c8104da 100644 --- a/ngraph/core/src/op/log.cpp +++ b/ngraph/core/src/op/log.cpp @@ -76,8 +76,9 @@ namespace logop bool op::Log::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - v0_Log_evaluate, - return logop::evaluate_log(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + NGRAPH_OP_SCOPE(v0_Log_evaluate) + { + return logop::evaluate_log(inputs[0], outputs[0], shape_size(get_output_shape(0))); + } return false; } diff --git a/ngraph/core/src/op/loop.cpp b/ngraph/core/src/op/loop.cpp index 6403884c7f8a07..91468214a9425e 100644 --- a/ngraph/core/src/op/loop.cpp +++ b/ngraph/core/src/op/loop.cpp @@ -390,13 +390,15 @@ Output op::v5::Loop::get_concatenated_slices(const Output& value, bool op::v5::Loop::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v5_Loop_evaluate, - runtime::reference::loop(m_body, - m_output_descriptions, - m_input_descriptions, - m_special_body_ports, - outputs, - inputs); - return true); + NGRAPH_OP_SCOPE(v5_Loop_evaluate) + { + runtime::reference::loop(m_body, + m_output_descriptions, + m_input_descriptions, + m_special_body_ports, + outputs, + inputs); + return true; + } return false; } diff --git a/ngraph/core/src/op/matmul.cpp b/ngraph/core/src/op/matmul.cpp index 7583e86b6928fb..70dab5cbaa9827 100644 --- a/ngraph/core/src/op/matmul.cpp +++ b/ngraph/core/src/op/matmul.cpp @@ -259,9 +259,11 @@ namespace matmul bool op::MatMul::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v0_MatMul_evaluate, - return matmul::evaluate_matmul( - inputs[0], inputs[1], outputs[0], get_transpose_a(), get_transpose_b())); + NGRAPH_OP_SCOPE(v0_MatMul_evaluate) + { + return matmul::evaluate_matmul( + inputs[0], inputs[1], outputs[0], get_transpose_a(), get_transpose_b()); + } return false; } diff --git a/ngraph/core/src/op/max.cpp b/ngraph/core/src/op/max.cpp index 9ce88c0d97da1c..3c06ac54e1d322 100644 --- a/ngraph/core/src/op/max.cpp +++ b/ngraph/core/src/op/max.cpp @@ -77,8 +77,9 @@ shared_ptr op::v1::ReduceMax::clone_with_new_inputs(const OutputVector& ne bool op::v1::ReduceMax::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - v1_ReduceMax_evaluate, - return maxop::evaluate_max(inputs[0], outputs[0], get_reduction_axes(), get_keep_dims())); + NGRAPH_OP_SCOPE(v1_ReduceMax_evaluate) + { + return maxop::evaluate_max(inputs[0], outputs[0], get_reduction_axes(), get_keep_dims()); + } return false; } diff --git a/ngraph/core/src/op/max_pool.cpp b/ngraph/core/src/op/max_pool.cpp index 4ba862d013fdeb..fa273305ad341a 100644 --- a/ngraph/core/src/op/max_pool.cpp +++ b/ngraph/core/src/op/max_pool.cpp @@ -229,6 +229,6 @@ bool op::v1::MaxPool::evaluate_maxpool(const HostTensorVector& outputs, bool op::v1::MaxPool::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v1_MaxPool_evaluate, return evaluate_maxpool(outputs, inputs)); + NGRAPH_OP_SCOPE(v1_MaxPool_evaluate) { return evaluate_maxpool(outputs, inputs); } return false; } diff --git a/ngraph/core/src/op/maximum.cpp b/ngraph/core/src/op/maximum.cpp index 8ccc7a24d185d0..f5846c4ab0a248 100644 --- a/ngraph/core/src/op/maximum.cpp +++ b/ngraph/core/src/op/maximum.cpp @@ -91,8 +91,9 @@ shared_ptr op::v1::Maximum::clone_with_new_inputs(const OutputVector& new_ bool op::v1::Maximum::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - v1_Maximum_evaluate, - return maximumop::evaluate_maximum(inputs[0], inputs[1], outputs[0], get_autob())); + NGRAPH_OP_SCOPE(v1_Maximum_evaluate) + { + return maximumop::evaluate_maximum(inputs[0], inputs[1], outputs[0], get_autob()); + } return false; } diff --git a/ngraph/core/src/op/min.cpp b/ngraph/core/src/op/min.cpp index ae62558c07bd61..2a06b6e882194b 100644 --- a/ngraph/core/src/op/min.cpp +++ b/ngraph/core/src/op/min.cpp @@ -79,8 +79,9 @@ shared_ptr op::v1::ReduceMin::clone_with_new_inputs(const OutputVector& ne bool op::v1::ReduceMin::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - v1_ReduceMin_evaluate, - return minop::evaluate_min(inputs[0], outputs[0], get_reduction_axes(), get_keep_dims())); + NGRAPH_OP_SCOPE(v1_ReduceMin_evaluate) + { + return minop::evaluate_min(inputs[0], outputs[0], get_reduction_axes(), get_keep_dims()); + } return false; } diff --git a/ngraph/core/src/op/minimum.cpp b/ngraph/core/src/op/minimum.cpp index e71be9dd454925..cc120a5f257fca 100644 --- a/ngraph/core/src/op/minimum.cpp +++ b/ngraph/core/src/op/minimum.cpp @@ -89,8 +89,9 @@ shared_ptr op::v1::Minimum::clone_with_new_inputs(const OutputVector& new_ bool op::v1::Minimum::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - v1_Minimum_evaluate, - return minimumop::evaluate_minimum(inputs[0], inputs[1], outputs[0], get_autob())); + NGRAPH_OP_SCOPE(v1_Minimum_evaluate) + { + return minimumop::evaluate_minimum(inputs[0], inputs[1], outputs[0], get_autob()); + } return false; } diff --git a/ngraph/core/src/op/mish.cpp b/ngraph/core/src/op/mish.cpp index 53864e9e1a1811..831a4412f30029 100644 --- a/ngraph/core/src/op/mish.cpp +++ b/ngraph/core/src/op/mish.cpp @@ -77,8 +77,9 @@ namespace mish bool op::v4::Mish::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - v4_Mish_evaluate, - return mish::evaluate_mish(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + NGRAPH_OP_SCOPE(v4_Mish_evaluate) + { + return mish::evaluate_mish(inputs[0], outputs[0], shape_size(get_output_shape(0))); + } return false; } diff --git a/ngraph/core/src/op/multiply.cpp b/ngraph/core/src/op/multiply.cpp index 00c967a5affe05..ea65cd028a650a 100644 --- a/ngraph/core/src/op/multiply.cpp +++ b/ngraph/core/src/op/multiply.cpp @@ -84,9 +84,10 @@ shared_ptr op::v0::Multiply::clone_with_new_inputs(const OutputVector& new bool op::v0::Multiply::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - v0_Multiply_evaluate, - return multiplyop::evaluate_multiply(inputs[0], inputs[1], outputs[0], get_autob())); + NGRAPH_OP_SCOPE(v0_Multiply_evaluate) + { + return multiplyop::evaluate_multiply(inputs[0], inputs[1], outputs[0], get_autob()); + } return false; } @@ -111,8 +112,9 @@ shared_ptr op::v1::Multiply::clone_with_new_inputs(const OutputVector& new bool op::v1::Multiply::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - v1_Multiply_evaluate, - return multiplyop::evaluate_multiply(inputs[0], inputs[1], outputs[0], get_autob())); + NGRAPH_OP_SCOPE(v1_Multiply_evaluate) + { + return multiplyop::evaluate_multiply(inputs[0], inputs[1], outputs[0], get_autob()); + } return false; } diff --git a/ngraph/core/src/op/negative.cpp b/ngraph/core/src/op/negative.cpp index 7c6159d84427b7..0664b8bd1e01f5 100644 --- a/ngraph/core/src/op/negative.cpp +++ b/ngraph/core/src/op/negative.cpp @@ -73,9 +73,11 @@ namespace negativeop bool op::Negative::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v0_Negative_evaluate, - return negativeop::evaluate_negative( - inputs[0], outputs[0], shape_size(get_output_shape(0)))); + NGRAPH_OP_SCOPE(v0_Negative_evaluate) + { + return negativeop::evaluate_negative( + inputs[0], outputs[0], shape_size(get_output_shape(0))); + } return false; } diff --git a/ngraph/core/src/op/non_zero.cpp b/ngraph/core/src/op/non_zero.cpp index dd8ef9bc3bf4d1..c51506f955e0a7 100644 --- a/ngraph/core/src/op/non_zero.cpp +++ b/ngraph/core/src/op/non_zero.cpp @@ -118,10 +118,13 @@ namespace nonzero #define TYPE_OUT_CASE(a, ...) \ case element::Type_t::a: \ { \ - NGRAPH_OP_SCOPE(OV_CC_CAT3(evaluate_nonzero_out, _, a), \ - rc = evaluate_nonzero_execute(__VA_ARGS__)); \ + NGRAPH_OP_SCOPE(OV_CC_CAT3(evaluate_nonzero_out, _, a)) \ + { \ + rc = evaluate_nonzero_execute(__VA_ARGS__); \ + } \ } \ - break; + break + template bool evaluate(const HostTensorPtr& input, const HostTensorPtr& output) { @@ -158,6 +161,9 @@ namespace nonzero bool op::v3::NonZero::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v3_NonZero_evaluate, return nonzero::evaluate_nonzero(inputs[0], outputs[0])); + NGRAPH_OP_SCOPE(v3_NonZero_evaluate) + { + return nonzero::evaluate_nonzero(inputs[0], outputs[0]); + } return false; } diff --git a/ngraph/core/src/op/not.cpp b/ngraph/core/src/op/not.cpp index 6b2fa28c14e52c..d6d403c90ca92a 100644 --- a/ngraph/core/src/op/not.cpp +++ b/ngraph/core/src/op/not.cpp @@ -91,8 +91,9 @@ namespace notop bool op::v1::LogicalNot::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - v1_LogicalNot_evaluate, - return notop::evaluate_not(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + NGRAPH_OP_SCOPE(v1_LogicalNot_evaluate) + { + return notop::evaluate_not(inputs[0], outputs[0], shape_size(get_output_shape(0))); + } return false; } diff --git a/ngraph/core/src/op/not_equal.cpp b/ngraph/core/src/op/not_equal.cpp index 4958a45491287d..74453fe47949be 100644 --- a/ngraph/core/src/op/not_equal.cpp +++ b/ngraph/core/src/op/not_equal.cpp @@ -84,9 +84,10 @@ shared_ptr op::v1::NotEqual::clone_with_new_inputs(const OutputVector& new bool op::v1::NotEqual::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - v1_NotEqual_evaluate, - return not_equalop::evaluate_not_equal(inputs[0], inputs[1], outputs[0], get_autob())); + NGRAPH_OP_SCOPE(v1_NotEqual_evaluate) + { + return not_equalop::evaluate_not_equal(inputs[0], inputs[1], outputs[0], get_autob()); + } return false; } diff --git a/ngraph/core/src/op/one_hot.cpp b/ngraph/core/src/op/one_hot.cpp index e92f6bc5c3aa1a..6c5d2d8ecaada3 100644 --- a/ngraph/core/src/op/one_hot.cpp +++ b/ngraph/core/src/op/one_hot.cpp @@ -159,12 +159,14 @@ namespace detail #define TYPE_OUT_CASE(a, ...) \ case element::Type_t::a: \ { \ - NGRAPH_OP_SCOPE(OV_CC_CAT3(evaluate_one_hot_out, _, a), \ - using IT = typename element_type_traits::value_type; \ - using OT = typename element_type_traits::value_type; \ - rc = evaluate(__VA_ARGS__)); \ + NGRAPH_OP_SCOPE(OV_CC_CAT3(evaluate_one_hot_out, _, a)) \ + { \ + using IT = typename element_type_traits::value_type; \ + using OT = typename element_type_traits::value_type; \ + rc = evaluate(__VA_ARGS__); \ + } \ } \ - break; + break template bool evaluate(const HostTensorVector& output_values, @@ -206,7 +208,9 @@ namespace detail bool op::v1::OneHot::evaluate(const HostTensorVector& output_values, const HostTensorVector& input_values) const { - NGRAPH_OP_SCOPE(v1_OneHot_evaluate, - return detail::evaluate_onehot(output_values, input_values, get_axis());); + NGRAPH_OP_SCOPE(v1_OneHot_evaluate) + { + return detail::evaluate_onehot(output_values, input_values, get_axis()); + } return false; } diff --git a/ngraph/core/src/op/or.cpp b/ngraph/core/src/op/or.cpp index 6a97427951f084..3ac03a90750b59 100644 --- a/ngraph/core/src/op/or.cpp +++ b/ngraph/core/src/op/or.cpp @@ -82,7 +82,9 @@ namespace logor bool op::v1::LogicalOr::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v1_LogicalOr_evaluate, - return logor::evaluate_logor(inputs[0], inputs[1], outputs[0], get_autob())); + NGRAPH_OP_SCOPE(v1_LogicalOr_evaluate) + { + return logor::evaluate_logor(inputs[0], inputs[1], outputs[0], get_autob()); + } return false; } diff --git a/ngraph/core/src/op/pad.cpp b/ngraph/core/src/op/pad.cpp index 8b8a93e491bcab..95d2c6ad793fd4 100644 --- a/ngraph/core/src/op/pad.cpp +++ b/ngraph/core/src/op/pad.cpp @@ -243,6 +243,6 @@ bool op::v1::Pad::evaluate_pad(const HostTensorVector& outputs, bool op::v1::Pad::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v1_Pad_evaluate, return evaluate_pad(outputs, inputs)); + NGRAPH_OP_SCOPE(v1_Pad_evaluate) { return evaluate_pad(outputs, inputs); } return false; } diff --git a/ngraph/core/src/op/power.cpp b/ngraph/core/src/op/power.cpp index 573b31c80aa69e..ad73b69aa799df 100644 --- a/ngraph/core/src/op/power.cpp +++ b/ngraph/core/src/op/power.cpp @@ -86,7 +86,9 @@ shared_ptr op::v1::Power::clone_with_new_inputs(const OutputVector& new_ar bool op::v1::Power::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v1_Power_evaluate, - return power::evaluate_power(inputs[0], inputs[1], outputs[0], get_autob())); + NGRAPH_OP_SCOPE(v1_Power_evaluate) + { + return power::evaluate_power(inputs[0], inputs[1], outputs[0], get_autob()); + } return false; } diff --git a/ngraph/core/src/op/prelu.cpp b/ngraph/core/src/op/prelu.cpp index 83e9accb118c3a..4dbf9c0cd60ca5 100644 --- a/ngraph/core/src/op/prelu.cpp +++ b/ngraph/core/src/op/prelu.cpp @@ -127,7 +127,9 @@ namespace prelu bool op::PRelu::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v0_PRelu_evaluate, - return prelu::evaluate_prelu(inputs[0], inputs[1], outputs[0]);); + NGRAPH_OP_SCOPE(v0_PRelu_evaluate) + { + return prelu::evaluate_prelu(inputs[0], inputs[1], outputs[0]); + } return false; } diff --git a/ngraph/core/src/op/prior_box.cpp b/ngraph/core/src/op/prior_box.cpp index 66ef769d3c8244..53fc78b51c1e6e 100644 --- a/ngraph/core/src/op/prior_box.cpp +++ b/ngraph/core/src/op/prior_box.cpp @@ -192,11 +192,13 @@ namespace prior_box bool op::v0::PriorBox::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v0_PriorBox_evaluate, - // Todo (itikhono): enable the use of the reference implementation after - // supporting constants as - // outputs in plugins - // return evaluate_prior_box(inputs[0], inputs[1], outputs[0], get_attrs()); - return false); + NGRAPH_OP_SCOPE(v0_PriorBox_evaluate) + { + // Todo (itikhono): enable the use of the reference implementation after + // supporting constants as + // outputs in plugins + // return evaluate_prior_box(inputs[0], inputs[1], outputs[0], get_attrs()); + return false; + } return false; } diff --git a/ngraph/core/src/op/prior_box_clustered.cpp b/ngraph/core/src/op/prior_box_clustered.cpp index 3919a833dccf4d..eb1eeb25519d95 100644 --- a/ngraph/core/src/op/prior_box_clustered.cpp +++ b/ngraph/core/src/op/prior_box_clustered.cpp @@ -165,11 +165,13 @@ namespace prior_box_clustered bool op::v0::PriorBoxClustered::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v0_PriorBoxClustered_evaluate, - // Todo (itikhono): enable the use of the reference implementation after - // supporting constants as - // outputs in plugins - // return evaluate_prior_box(inputs[0], inputs[1], outputs[0], get_attrs()); - return false); + NGRAPH_OP_SCOPE(v0_PriorBoxClustered_evaluate) + { + // Todo (itikhono): enable the use of the reference implementation after + // supporting constants as + // outputs in plugins + // return evaluate_prior_box(inputs[0], inputs[1], outputs[0], get_attrs()); + return false; + } return false; } diff --git a/ngraph/core/src/op/range.cpp b/ngraph/core/src/op/range.cpp index a8bf316b84a276..0abaf448d8ccf3 100644 --- a/ngraph/core/src/op/range.cpp +++ b/ngraph/core/src/op/range.cpp @@ -300,11 +300,14 @@ namespace rangeop bool op::v4::Range::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v4_Range_evaluate, HostTensorPtr out = outputs[0]; - HostTensorPtr start = inputs[0]; - HostTensorPtr stop = inputs[1]; - HostTensorPtr step = inputs[2]; - return rangeop::evaluate_power(out, start, stop, step, m_output_type, 4)); + NGRAPH_OP_SCOPE(v4_Range_evaluate) + { + HostTensorPtr out = outputs[0]; + HostTensorPtr start = inputs[0]; + HostTensorPtr stop = inputs[1]; + HostTensorPtr step = inputs[2]; + return rangeop::evaluate_power(out, start, stop, step, m_output_type, 4); + } return false; } @@ -496,10 +499,13 @@ void positive_range(T start_val, T stop_val, T step_val) bool op::v0::Range::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - op_v0_Range_evaluate, HostTensorPtr out = outputs[0]; HostTensorPtr start = inputs[0]; + NGRAPH_OP_SCOPE(op_v0_Range_evaluate) + { + HostTensorPtr out = outputs[0]; + HostTensorPtr start = inputs[0]; HostTensorPtr stop = inputs[1]; HostTensorPtr step = inputs[2]; - return rangeop::evaluate_power(out, start, stop, step, start->get_element_type(), 0)); + return rangeop::evaluate_power(out, start, stop, step, start->get_element_type(), 0); + } return false; } diff --git a/ngraph/core/src/op/reduce_l1.cpp b/ngraph/core/src/op/reduce_l1.cpp index acc381f4690ff2..3a43774b666132 100644 --- a/ngraph/core/src/op/reduce_l1.cpp +++ b/ngraph/core/src/op/reduce_l1.cpp @@ -81,8 +81,10 @@ namespace reduce_l1 bool op::v4::ReduceL1::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v4_ReduceL1_evaluate, - return reduce_l1::evaluate_sum( - inputs[0], outputs[0], get_reduction_axes(), get_keep_dims())); + NGRAPH_OP_SCOPE(v4_ReduceL1_evaluate) + { + return reduce_l1::evaluate_sum( + inputs[0], outputs[0], get_reduction_axes(), get_keep_dims()); + } return false; } diff --git a/ngraph/core/src/op/reduce_l2.cpp b/ngraph/core/src/op/reduce_l2.cpp index ff7971fa9ad110..442c3aecd962ce 100644 --- a/ngraph/core/src/op/reduce_l2.cpp +++ b/ngraph/core/src/op/reduce_l2.cpp @@ -79,8 +79,10 @@ namespace reduce_l2 bool op::v4::ReduceL2::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v4_ReduceL2_evaluate, - return reduce_l2::evaluate_reduce_l2( - inputs[0], outputs[0], get_reduction_axes(), get_keep_dims())); + NGRAPH_OP_SCOPE(v4_ReduceL2_evaluate) + { + return reduce_l2::evaluate_reduce_l2( + inputs[0], outputs[0], get_reduction_axes(), get_keep_dims()); + } return false; } diff --git a/ngraph/core/src/op/reduce_logical_and.cpp b/ngraph/core/src/op/reduce_logical_and.cpp index 68d1089b26c65d..c7b2695e29e85a 100644 --- a/ngraph/core/src/op/reduce_logical_and.cpp +++ b/ngraph/core/src/op/reduce_logical_and.cpp @@ -75,9 +75,12 @@ namespace bool op::v1::ReduceLogicalAnd::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v1_ReduceLogicalAnd_evaluate, const auto& data = inputs[0]; - const auto& axes = inputs[1]; - const auto& out = outputs[0]; - return evaluate_reduce_logical_and(data, axes, out, get_keep_dims())); + NGRAPH_OP_SCOPE(v1_ReduceLogicalAnd_evaluate) + { + const auto& data = inputs[0]; + const auto& axes = inputs[1]; + const auto& out = outputs[0]; + return evaluate_reduce_logical_and(data, axes, out, get_keep_dims()); + } return false; } diff --git a/ngraph/core/src/op/reduce_logical_or.cpp b/ngraph/core/src/op/reduce_logical_or.cpp index 27282b2732377e..602fe18d094318 100644 --- a/ngraph/core/src/op/reduce_logical_or.cpp +++ b/ngraph/core/src/op/reduce_logical_or.cpp @@ -75,9 +75,12 @@ namespace bool op::v1::ReduceLogicalOr::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v1_ReduceLogicalOr_evaluate, const auto& data = inputs[0]; - const auto& axes = inputs[1]; - const auto& out = outputs[0]; - return evaluate_reduce_logical_or(data, axes, out, get_keep_dims())); + NGRAPH_OP_SCOPE(v1_ReduceLogicalOr_evaluate) + { + const auto& data = inputs[0]; + const auto& axes = inputs[1]; + const auto& out = outputs[0]; + return evaluate_reduce_logical_or(data, axes, out, get_keep_dims()); + } return false; } diff --git a/ngraph/core/src/op/reduce_mean.cpp b/ngraph/core/src/op/reduce_mean.cpp index 10148ead18651e..d92e0881219723 100644 --- a/ngraph/core/src/op/reduce_mean.cpp +++ b/ngraph/core/src/op/reduce_mean.cpp @@ -78,8 +78,9 @@ namespace mean bool op::v1::ReduceMean::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - v1_ReduceMean_evaluate, - return mean::evaluate_mean(inputs[0], outputs[0], get_reduction_axes(), get_keep_dims())); + NGRAPH_OP_SCOPE(v1_ReduceMean_evaluate) + { + return mean::evaluate_mean(inputs[0], outputs[0], get_reduction_axes(), get_keep_dims()); + } return false; } diff --git a/ngraph/core/src/op/reduce_prod.cpp b/ngraph/core/src/op/reduce_prod.cpp index b1f9f6d3e8998a..3b78b20d2e4ed3 100644 --- a/ngraph/core/src/op/reduce_prod.cpp +++ b/ngraph/core/src/op/reduce_prod.cpp @@ -82,8 +82,10 @@ namespace reduce_prod bool op::v1::ReduceProd::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v1_ReduceProd_evaluate, - return reduce_prod::evaluate_product( - inputs[0], outputs[0], get_reduction_axes(), get_keep_dims())); + NGRAPH_OP_SCOPE(v1_ReduceProd_evaluate) + { + return reduce_prod::evaluate_product( + inputs[0], outputs[0], get_reduction_axes(), get_keep_dims()); + } return false; } diff --git a/ngraph/core/src/op/reduce_sum.cpp b/ngraph/core/src/op/reduce_sum.cpp index 782f078ac19787..b878b00fdf1c71 100644 --- a/ngraph/core/src/op/reduce_sum.cpp +++ b/ngraph/core/src/op/reduce_sum.cpp @@ -83,8 +83,10 @@ namespace reduce_sum bool op::v1::ReduceSum::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v1_ReduceSum_evaluate, - return reduce_sum::evaluate_sum( - inputs[0], outputs[0], get_reduction_axes(), get_keep_dims())); + NGRAPH_OP_SCOPE(v1_ReduceSum_evaluate) + { + return reduce_sum::evaluate_sum( + inputs[0], outputs[0], get_reduction_axes(), get_keep_dims()); + } return false; } diff --git a/ngraph/core/src/op/relu.cpp b/ngraph/core/src/op/relu.cpp index 6cc7d086419e0c..71912929975ed9 100644 --- a/ngraph/core/src/op/relu.cpp +++ b/ngraph/core/src/op/relu.cpp @@ -71,9 +71,10 @@ namespace relu bool op::Relu::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - v0_Relu_evaluate, - return relu::evaluate_relu(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + NGRAPH_OP_SCOPE(v0_Relu_evaluate) + { + return relu::evaluate_relu(inputs[0], outputs[0], shape_size(get_output_shape(0))); + } return false; } diff --git a/ngraph/core/src/op/reshape.cpp b/ngraph/core/src/op/reshape.cpp index e243557bcc2be6..30e8c1fbbb364a 100644 --- a/ngraph/core/src/op/reshape.cpp +++ b/ngraph/core/src/op/reshape.cpp @@ -230,8 +230,10 @@ shared_ptr op::v1::Reshape::clone_with_new_inputs(const OutputVector& new_ #define COMPUTE_OUT_SHAPE_CASE(a, ...) \ case element::Type_t::a: \ { \ - NGRAPH_OP_SCOPE(OV_CC_CAT3(compute_reshape_out_shape, _, a), \ - reshapeop::compute_output_shape(__VA_ARGS__)); \ + NGRAPH_OP_SCOPE(OV_CC_CAT3(compute_reshape_out_shape, _, a)) \ + { \ + reshapeop::compute_output_shape(__VA_ARGS__); \ + } \ } \ break; @@ -343,7 +345,7 @@ bool op::v1::Reshape::evaluate_reshape(const HostTensorVector& outputs, bool op::v1::Reshape::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v1_Reshape_evaluate, return evaluate_reshape(outputs, inputs)); + NGRAPH_OP_SCOPE(v1_Reshape_evaluate) { return evaluate_reshape(outputs, inputs); } return false; } diff --git a/ngraph/core/src/op/result.cpp b/ngraph/core/src/op/result.cpp index 384377b4bfa30c..51c29b0bdebe3f 100644 --- a/ngraph/core/src/op/result.cpp +++ b/ngraph/core/src/op/result.cpp @@ -58,11 +58,14 @@ shared_ptr op::Result::clone_with_new_inputs(const OutputVector& new_args) bool op::Result::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(Result_evaluate, outputs[0]->set_unary(inputs[0]); - void* output = outputs[0]->get_data_ptr(); - void* input = inputs[0]->get_data_ptr(); - memcpy(output, input, outputs[0]->get_size_in_bytes()); - return true); + NGRAPH_OP_SCOPE(Result_evaluate) + { + outputs[0]->set_unary(inputs[0]); + void* output = outputs[0]->get_data_ptr(); + void* input = inputs[0]->get_data_ptr(); + memcpy(output, input, outputs[0]->get_size_in_bytes()); + return true; + } return false; } diff --git a/ngraph/core/src/op/reverse.cpp b/ngraph/core/src/op/reverse.cpp index fb851c824cf85a..10e1264b82e537 100644 --- a/ngraph/core/src/op/reverse.cpp +++ b/ngraph/core/src/op/reverse.cpp @@ -163,8 +163,10 @@ namespace reverseop #define GET_AXES(a, ...) \ case element::Type_t::a: \ { \ - NGRAPH_OP_SCOPE(OV_CC_CAT3(get_reverse_axes, _, a), \ - reverseop::get_axes(__VA_ARGS__)); \ + NGRAPH_OP_SCOPE(OV_CC_CAT3(get_reverse_axes, _, a)) \ + { \ + reverseop::get_axes(__VA_ARGS__); \ + } \ } \ break; @@ -211,7 +213,7 @@ bool op::v1::Reverse::evaluate_reverse(const HostTensorVector& outputs, bool op::v1::Reverse::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v1_Reverse_evaluate, return evaluate_reverse(outputs, inputs)); + NGRAPH_OP_SCOPE(v1_Reverse_evaluate) { return evaluate_reverse(outputs, inputs); } return false; } diff --git a/ngraph/core/src/op/roi_align.cpp b/ngraph/core/src/op/roi_align.cpp index 6203559fec7151..62abaf26bbac5f 100644 --- a/ngraph/core/src/op/roi_align.cpp +++ b/ngraph/core/src/op/roi_align.cpp @@ -299,9 +299,10 @@ namespace roi_alinop bool op::v3::ROIAlign::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - v3_ROIAlign_evaluate, + NGRAPH_OP_SCOPE(v3_ROIAlign_evaluate) + { return roi_alinop::evaluate_roi_align( - inputs, outputs[0], m_pooled_h, m_pooled_w, m_sampling_ratio, m_spatial_scale, m_mode)); + inputs, outputs[0], m_pooled_h, m_pooled_w, m_sampling_ratio, m_spatial_scale, m_mode); + } return false; } diff --git a/ngraph/core/src/op/round.cpp b/ngraph/core/src/op/round.cpp index 7881df718a2911..00b1001bf01955 100644 --- a/ngraph/core/src/op/round.cpp +++ b/ngraph/core/src/op/round.cpp @@ -105,9 +105,11 @@ shared_ptr op::v5::Round::clone_with_new_inputs(const OutputVector& new_ar bool op::v5::Round::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v5_Round_evaluate, - return roundop::evaluate_round( - inputs[0], outputs[0], shape_size(get_output_shape(0)), get_mode())); + NGRAPH_OP_SCOPE(v5_Round_evaluate) + { + return roundop::evaluate_round( + inputs[0], outputs[0], shape_size(get_output_shape(0)), get_mode()); + } return false; } diff --git a/ngraph/core/src/op/scatter_elements_update.cpp b/ngraph/core/src/op/scatter_elements_update.cpp index 0e40cb2cbf5031..a27ce2fb5bcb80 100644 --- a/ngraph/core/src/op/scatter_elements_update.cpp +++ b/ngraph/core/src/op/scatter_elements_update.cpp @@ -165,8 +165,10 @@ namespace scatter_element_update #define TYPE_AXS_CASE(a, ...) \ case element::Type_t::a: \ { \ - NGRAPH_OP_SCOPE(OV_CC_CAT3(scatter_element_update_axs, _, a), \ - rc = evaluate(__VA_ARGS__)); \ + NGRAPH_OP_SCOPE(OV_CC_CAT3(scatter_element_update_axs, _, a)) \ + { \ + rc = evaluate(__VA_ARGS__); \ + } \ } \ break; @@ -201,8 +203,10 @@ namespace scatter_element_update #define TYPE_IND_CASE(a, ...) \ case element::Type_t::a: \ { \ - NGRAPH_OP_SCOPE(OV_CC_CAT3(scatter_element_update_ind, _, a), \ - rc = evaluate(__VA_ARGS__)); \ + NGRAPH_OP_SCOPE(OV_CC_CAT3(scatter_element_update_ind, _, a)) \ + { \ + rc = evaluate(__VA_ARGS__); \ + } \ } \ break; @@ -295,7 +299,9 @@ bool op::v3::ScatterElementsUpdate::evaluate_scatter_element_update( bool op::v3::ScatterElementsUpdate::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v3_ScatterElementsUpdate_evaluate, - return evaluate_scatter_element_update(outputs, inputs)); + NGRAPH_OP_SCOPE(v3_ScatterElementsUpdate_evaluate) + { + return evaluate_scatter_element_update(outputs, inputs); + } return false; } diff --git a/ngraph/core/src/op/scatter_update.cpp b/ngraph/core/src/op/scatter_update.cpp index c86d9b35fb4cf2..5201e81eefcfbd 100644 --- a/ngraph/core/src/op/scatter_update.cpp +++ b/ngraph/core/src/op/scatter_update.cpp @@ -55,9 +55,10 @@ namespace scatter_update #define GET_INDICES(a, ...) \ case element::Type_t::a: \ { \ - NGRAPH_OP_SCOPE(OV_CC_CAT3(get_scatter_update_indices, _, a), \ - indices_casted_vector = \ - scatter_update::get_indices(__VA_ARGS__)); \ + NGRAPH_OP_SCOPE(OV_CC_CAT3(get_scatter_update_indices, _, a)) \ + { \ + indices_casted_vector = scatter_update::get_indices(__VA_ARGS__); \ + } \ } \ break; @@ -113,6 +114,6 @@ bool op::v3::ScatterUpdate::evaluate_scatter_update(const HostTensorVector& outp bool op::v3::ScatterUpdate::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v3_ScatterUpdate_evaluate, return evaluate_scatter_update(outputs, inputs)); + NGRAPH_OP_SCOPE(v3_ScatterUpdate_evaluate) { return evaluate_scatter_update(outputs, inputs); } return false; } diff --git a/ngraph/core/src/op/select.cpp b/ngraph/core/src/op/select.cpp index 6f600baeb9c83e..f9b2077b79638e 100644 --- a/ngraph/core/src/op/select.cpp +++ b/ngraph/core/src/op/select.cpp @@ -156,9 +156,11 @@ namespace detail bool op::v1::Select::evaluate(const HostTensorVector& output_values, const HostTensorVector& input_values) const { - NGRAPH_OP_SCOPE(v1_Select_evaluate, const auto autob = get_auto_broadcast(); - - return detail::evaluate_select( - output_values, input_values, autob, get_output_element_type(0))); + NGRAPH_OP_SCOPE(v1_Select_evaluate) + { + const auto autob = get_auto_broadcast(); + return detail::evaluate_select( + output_values, input_values, autob, get_output_element_type(0)); + } return false; } diff --git a/ngraph/core/src/op/shape_of.cpp b/ngraph/core/src/op/shape_of.cpp index 9324ff70af6ec2..4bd475fbcc9c97 100644 --- a/ngraph/core/src/op/shape_of.cpp +++ b/ngraph/core/src/op/shape_of.cpp @@ -154,8 +154,10 @@ namespace shape_of bool op::v3::ShapeOf::evaluate(const HostTensorVector& output_values, const HostTensorVector& input_values) const { - NGRAPH_OP_SCOPE(v3_ShapeOf_evaluate, - return shape_of::evaluate_shape_of(output_values[0], input_values[0]);); + NGRAPH_OP_SCOPE(v3_ShapeOf_evaluate) + { + return shape_of::evaluate_shape_of(output_values[0], input_values[0]); + } return false; } @@ -204,8 +206,10 @@ shared_ptr op::v0::ShapeOf::clone_with_new_inputs(const OutputVector& new_ bool op::v0::ShapeOf::evaluate(const HostTensorVector& output_values, const HostTensorVector& input_values) const { - NGRAPH_OP_SCOPE(v0_ShapeOf_evaluate, - return shape_of::evaluate_shape_of(output_values[0], input_values[0])); + NGRAPH_OP_SCOPE(v0_ShapeOf_evaluate) + { + return shape_of::evaluate_shape_of(output_values[0], input_values[0]); + } return false; } diff --git a/ngraph/core/src/op/shuffle_channels.cpp b/ngraph/core/src/op/shuffle_channels.cpp index f39a5eb44be9bc..2bca88d5508673 100644 --- a/ngraph/core/src/op/shuffle_channels.cpp +++ b/ngraph/core/src/op/shuffle_channels.cpp @@ -187,6 +187,6 @@ bool op::ShuffleChannels::evaluate_shuffle_channels(const HostTensorVector& outp bool op::ShuffleChannels::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(ShuffleChannels_evaluate, return evaluate_shuffle_channels(outputs, inputs)); + NGRAPH_OP_SCOPE(ShuffleChannels_evaluate) { return evaluate_shuffle_channels(outputs, inputs); } return false; } diff --git a/ngraph/core/src/op/sigmoid.cpp b/ngraph/core/src/op/sigmoid.cpp index 701e010505ce7c..f32c22323ce812 100644 --- a/ngraph/core/src/op/sigmoid.cpp +++ b/ngraph/core/src/op/sigmoid.cpp @@ -72,8 +72,9 @@ namespace sigmoid bool op::Sigmoid::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - v0_Sigmoid_evaluate, - return sigmoid::evaluate_sigmoid(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + NGRAPH_OP_SCOPE(v0_Sigmoid_evaluate) + { + return sigmoid::evaluate_sigmoid(inputs[0], outputs[0], shape_size(get_output_shape(0))); + } return false; } diff --git a/ngraph/core/src/op/sign.cpp b/ngraph/core/src/op/sign.cpp index f3cbd83647b643..d917734f1fc107 100644 --- a/ngraph/core/src/op/sign.cpp +++ b/ngraph/core/src/op/sign.cpp @@ -75,8 +75,9 @@ namespace signop bool op::Sign::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - v0_Sign_evaluate, - return signop::evaluate_sign(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + NGRAPH_OP_SCOPE(v0_Sign_evaluate) + { + return signop::evaluate_sign(inputs[0], outputs[0], shape_size(get_output_shape(0))); + } return false; } diff --git a/ngraph/core/src/op/sin.cpp b/ngraph/core/src/op/sin.cpp index 0b2c5a323382c9..373d968b4fc92d 100644 --- a/ngraph/core/src/op/sin.cpp +++ b/ngraph/core/src/op/sin.cpp @@ -77,8 +77,9 @@ namespace sinop bool op::Sin::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - v0_Sin_evaluate, - return sinop::evaluate_sin(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + NGRAPH_OP_SCOPE(v0_Sin_evaluate) + { + return sinop::evaluate_sin(inputs[0], outputs[0], shape_size(get_output_shape(0))); + } return false; } diff --git a/ngraph/core/src/op/sinh.cpp b/ngraph/core/src/op/sinh.cpp index 4b570949fb6fb6..e7267a0bd66c23 100644 --- a/ngraph/core/src/op/sinh.cpp +++ b/ngraph/core/src/op/sinh.cpp @@ -77,8 +77,9 @@ namespace sinhop bool op::Sinh::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - v0_Sinh_evaluate, - return sinhop::evaluate_sinh(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + NGRAPH_OP_SCOPE(v0_Sinh_evaluate) + { + return sinhop::evaluate_sinh(inputs[0], outputs[0], shape_size(get_output_shape(0))); + } return false; } diff --git a/ngraph/core/src/op/softmax.cpp b/ngraph/core/src/op/softmax.cpp index 5dcde929c1c671..da57b2891a60b2 100644 --- a/ngraph/core/src/op/softmax.cpp +++ b/ngraph/core/src/op/softmax.cpp @@ -101,7 +101,10 @@ shared_ptr op::v1::Softmax::clone_with_new_inputs(const OutputVector& new_ bool op::v1::Softmax::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v1_Softmax_evaluate, outputs[0]->set_unary(inputs[0]); - return evaluate_softmax(inputs[0], outputs[0], AxisSet{m_axis})); + NGRAPH_OP_SCOPE(v1_Softmax_evaluate) + { + outputs[0]->set_unary(inputs[0]); + return evaluate_softmax(inputs[0], outputs[0], AxisSet{m_axis}); + } return false; } diff --git a/ngraph/core/src/op/softplus.cpp b/ngraph/core/src/op/softplus.cpp index 33deba5f81629a..f87f94c358d83d 100644 --- a/ngraph/core/src/op/softplus.cpp +++ b/ngraph/core/src/op/softplus.cpp @@ -77,8 +77,9 @@ namespace softplus bool op::v4::SoftPlus::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - v4_SoftPlus_evaluate, - return softplus::evaluate_softplus(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + NGRAPH_OP_SCOPE(v4_SoftPlus_evaluate) + { + return softplus::evaluate_softplus(inputs[0], outputs[0], shape_size(get_output_shape(0))); + } return false; } diff --git a/ngraph/core/src/op/space_to_batch.cpp b/ngraph/core/src/op/space_to_batch.cpp index a3d63cd5642279..c8e67b2c193017 100644 --- a/ngraph/core/src/op/space_to_batch.cpp +++ b/ngraph/core/src/op/space_to_batch.cpp @@ -273,6 +273,6 @@ bool ngraph::op::v1::SpaceToBatch::evaluate_space_to_batch(const HostTensorVecto bool ngraph::op::v1::SpaceToBatch::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v1_SpaceToBatch, return evaluate_space_to_batch(outputs, inputs)); + NGRAPH_OP_SCOPE(v1_SpaceToBatch) { return evaluate_space_to_batch(outputs, inputs); } return false; } diff --git a/ngraph/core/src/op/space_to_depth.cpp b/ngraph/core/src/op/space_to_depth.cpp index 460041daab3ee6..683d97b64c9fa8 100644 --- a/ngraph/core/src/op/space_to_depth.cpp +++ b/ngraph/core/src/op/space_to_depth.cpp @@ -228,7 +228,7 @@ bool ngraph::op::v0::SpaceToDepth::evaluate_space_to_depth(const HostTensorVecto bool ngraph::op::v0::SpaceToDepth::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v0_SpaceToDepth_evaluate, return evaluate_space_to_depth(outputs, inputs)); + NGRAPH_OP_SCOPE(v0_SpaceToDepth_evaluate) { return evaluate_space_to_depth(outputs, inputs); } return false; } diff --git a/ngraph/core/src/op/split.cpp b/ngraph/core/src/op/split.cpp index 603da1792780ae..83a13332b6bc2b 100644 --- a/ngraph/core/src/op/split.cpp +++ b/ngraph/core/src/op/split.cpp @@ -149,7 +149,11 @@ namespace split bool op::v1::Split::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v1_Split_evaluate, const auto& data = inputs[0]; const auto& axis = inputs[1]; - return split::evaluate_split(data, axis, outputs, m_num_splits, this)); + NGRAPH_OP_SCOPE(v1_Split_evaluate) + { + const auto& data = inputs[0]; + const auto& axis = inputs[1]; + return split::evaluate_split(data, axis, outputs, m_num_splits, this); + } return false; } diff --git a/ngraph/core/src/op/sqrt.cpp b/ngraph/core/src/op/sqrt.cpp index cb6a8074af50b0..ba64e442222e90 100644 --- a/ngraph/core/src/op/sqrt.cpp +++ b/ngraph/core/src/op/sqrt.cpp @@ -75,8 +75,9 @@ namespace sqrtop bool op::Sqrt::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - v0_Sqrt_evaluate, - return sqrtop::evaluate_sqrt(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + NGRAPH_OP_SCOPE(v0_Sqrt_evaluate) + { + return sqrtop::evaluate_sqrt(inputs[0], outputs[0], shape_size(get_output_shape(0))); + } return false; } diff --git a/ngraph/core/src/op/squeeze.cpp b/ngraph/core/src/op/squeeze.cpp index a473efac7923b4..40a4c749047802 100644 --- a/ngraph/core/src/op/squeeze.cpp +++ b/ngraph/core/src/op/squeeze.cpp @@ -173,8 +173,10 @@ namespace squeeze bool op::v0::Squeeze::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v0_Squeeze_evaluate, - return squeeze::evaluate_squeeze(inputs[0], inputs[1], outputs[0])); + NGRAPH_OP_SCOPE(v0_Squeeze_evaluate) + { + return squeeze::evaluate_squeeze(inputs[0], inputs[1], outputs[0]); + } return false; } diff --git a/ngraph/core/src/op/strided_slice.cpp b/ngraph/core/src/op/strided_slice.cpp index 8c3dbc79b46f89..3085e0e96bca1b 100644 --- a/ngraph/core/src/op/strided_slice.cpp +++ b/ngraph/core/src/op/strided_slice.cpp @@ -281,17 +281,19 @@ namespace strided_slice bool op::v1::StridedSlice::evaluate(const HostTensorVector& output_values, const HostTensorVector& input_values) const { - NGRAPH_OP_SCOPE(v1_StridedSlice_evaluate, - return strided_slice::evaluate_strided_slice( - input_values[0], - input_values[1], - input_values[2], - input_values[3], - convert_mask_to_axis_set(get_begin_mask()), - convert_mask_to_axis_set(get_end_mask()), - convert_mask_to_axis_set(get_new_axis_mask()), - convert_mask_to_axis_set(get_shrink_axis_mask()), - convert_mask_to_axis_set(get_ellipsis_mask()), - output_values[0])); + NGRAPH_OP_SCOPE(v1_StridedSlice_evaluate) + { + return strided_slice::evaluate_strided_slice( + input_values[0], + input_values[1], + input_values[2], + input_values[3], + convert_mask_to_axis_set(get_begin_mask()), + convert_mask_to_axis_set(get_end_mask()), + convert_mask_to_axis_set(get_new_axis_mask()), + convert_mask_to_axis_set(get_shrink_axis_mask()), + convert_mask_to_axis_set(get_ellipsis_mask()), + output_values[0]); + } return false; } diff --git a/ngraph/core/src/op/subtract.cpp b/ngraph/core/src/op/subtract.cpp index 40d77e5590d671..791a9f514ff199 100644 --- a/ngraph/core/src/op/subtract.cpp +++ b/ngraph/core/src/op/subtract.cpp @@ -83,8 +83,9 @@ shared_ptr op::v1::Subtract::clone_with_new_inputs(const OutputVector& new bool op::v1::Subtract::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - v1_Subtract_evaluate, - return subtract::evaluate_subtract(inputs[0], inputs[1], outputs[0], get_autob())); + NGRAPH_OP_SCOPE(v1_Subtract_evaluate) + { + return subtract::evaluate_subtract(inputs[0], inputs[1], outputs[0], get_autob()); + } return false; } diff --git a/ngraph/core/src/op/swish.cpp b/ngraph/core/src/op/swish.cpp index 94f97a3198dd9d..ab008eba8665bf 100644 --- a/ngraph/core/src/op/swish.cpp +++ b/ngraph/core/src/op/swish.cpp @@ -128,8 +128,9 @@ namespace swish bool op::v4::Swish::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - v4_Swish_evaluate, - return swish::evaluate_swish(inputs, outputs[0], shape_size(get_output_shape(0)));); + NGRAPH_OP_SCOPE(v4_Swish_evaluate) + { + return swish::evaluate_swish(inputs, outputs[0], shape_size(get_output_shape(0))); + } return false; } diff --git a/ngraph/core/src/op/tan.cpp b/ngraph/core/src/op/tan.cpp index bc1f54f0d67121..66c605da13e959 100644 --- a/ngraph/core/src/op/tan.cpp +++ b/ngraph/core/src/op/tan.cpp @@ -78,8 +78,9 @@ namespace tanop bool op::Tan::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - v0_Tan_evaluate, - return tanop::evaluate_tan(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + NGRAPH_OP_SCOPE(v0_Tan_evaluate) + { + return tanop::evaluate_tan(inputs[0], outputs[0], shape_size(get_output_shape(0))); + } return false; } diff --git a/ngraph/core/src/op/tanh.cpp b/ngraph/core/src/op/tanh.cpp index 6ea3b7802aea4c..12227975f14169 100644 --- a/ngraph/core/src/op/tanh.cpp +++ b/ngraph/core/src/op/tanh.cpp @@ -76,8 +76,9 @@ namespace tanhop bool op::Tanh::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - v0_Tanh_evaluate, - return tanhop::evaluate_tanh(inputs[0], outputs[0], shape_size(get_output_shape(0)))); + NGRAPH_OP_SCOPE(v0_Tanh_evaluate) + { + return tanhop::evaluate_tanh(inputs[0], outputs[0], shape_size(get_output_shape(0))); + } return false; } diff --git a/ngraph/core/src/op/tile.cpp b/ngraph/core/src/op/tile.cpp index 2cdd47ddaef212..529535da349fff 100644 --- a/ngraph/core/src/op/tile.cpp +++ b/ngraph/core/src/op/tile.cpp @@ -135,6 +135,6 @@ bool op::v0::Tile::evaluate_tile(const HostTensorVector& outputs, bool op::v0::Tile::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v0_Tile_evaluate, return evaluate_tile(outputs, inputs)); + NGRAPH_OP_SCOPE(v0_Tile_evaluate) { return evaluate_tile(outputs, inputs); } return false; } diff --git a/ngraph/core/src/op/topk.cpp b/ngraph/core/src/op/topk.cpp index 97163edca93c94..6db156671382c6 100644 --- a/ngraph/core/src/op/topk.cpp +++ b/ngraph/core/src/op/topk.cpp @@ -67,8 +67,10 @@ namespace topk #define EXECUTE_EVALUATE_TOPK(a, ...) \ case element::Type_t::a: \ { \ - NGRAPH_OP_SCOPE(OV_CC_CAT3(exec_topk_eval, _, a), \ - rc = evaluate_execute(__VA_ARGS__)); \ + NGRAPH_OP_SCOPE(OV_CC_CAT3(exec_topk_eval, _, a)) \ + { \ + rc = evaluate_execute(__VA_ARGS__); \ + } \ } \ break @@ -189,8 +191,10 @@ namespace topk #define CASE_GET_K(a, ...) \ case element::Type_t::a: \ { \ - NGRAPH_OP_SCOPE(OV_CC_CAT3(topk_get_k, _, a), \ - k = get_k_from_hosttensor(__VA_ARGS__)); \ + NGRAPH_OP_SCOPE(OV_CC_CAT3(topk_get_k, _, a)) \ + { \ + k = get_k_from_hosttensor(__VA_ARGS__); \ + } \ } \ break @@ -449,52 +453,49 @@ void op::v1::TopK::set_k(size_t k) op::Constant::create(element::i64, Shape{}, {k})->output(0)); } -bool op::v1::TopK::evaluate_topk(const HostTensorVector& outputs, - const HostTensorVector& inputs) const +bool op::v1::TopK::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - Shape arg_shape = inputs[0]->get_shape(); - // 1. get axis, mode ( max/min), sort_type - size_t axis = ngraph::normalize_axis(this, m_axis, arg_shape.size()); - bool compute_max = get_mode() == TopKMode::MAX ? true : false; - SortType sort_type = get_sort_type(); - - // 2. get value of k - from constant node or from HT - size_t k = 0; - if (op::is_constant(input_value(1).get_node())) - { - k = read_k_from_constant_node(input_value(1).get_node_shared_ptr(), - get_input_element_type(1)); - NGRAPH_CHECK(k <= arg_shape[axis], "'K' exceeds the dimension of top_k_axis"); - } - else + NGRAPH_OP_SCOPE(v1_TopK_evaluate) { - k = topk::read_k_from_host_tensor(inputs[1]); - } + Shape arg_shape = inputs[0]->get_shape(); + // 1. get axis, mode ( max/min), sort_type + size_t axis = ngraph::normalize_axis(this, m_axis, arg_shape.size()); + bool compute_max = get_mode() == TopKMode::MAX ? true : false; + SortType sort_type = get_sort_type(); - // 3. Compute output_shape - auto output_shape = compute_output_shape(this->description(), inputs[0]->get_shape(), k); + // 2. get value of k - from constant node or from HT + size_t k = 0; + if (op::is_constant(input_value(1).get_node())) + { + k = read_k_from_constant_node(input_value(1).get_node_shared_ptr(), + get_input_element_type(1)); + NGRAPH_CHECK(k <= arg_shape[axis], "'K' exceeds the dimension of top_k_axis"); + } + else + { + k = topk::read_k_from_host_tensor(inputs[1]); + } - // do this after compute_output_shape - if (k == 0) - { - // the kernel can't handle k = 0, but output_shape[axis] = arg_shape[axis] - k = arg_shape[axis]; - } + // 3. Compute output_shape + auto output_shape = compute_output_shape(this->description(), inputs[0]->get_shape(), k); - return topk::evaluate_topk(inputs[0], - outputs[1], - outputs[0], - output_shape, - axis, - k, - compute_max, - sort_type, - get_index_element_type()); -} + // do this after compute_output_shape + if (k == 0) + { + // the kernel can't handle k = 0, but output_shape[axis] = arg_shape[axis] + k = arg_shape[axis]; + } -bool op::v1::TopK::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const -{ - NGRAPH_OP_SCOPE(v1_TopK_evaluate, return evaluate_topk(outputs, inputs)); + return topk::evaluate_topk(inputs[0], + outputs[1], + outputs[0], + output_shape, + axis, + k, + compute_max, + sort_type, + get_index_element_type()); + } return false; } @@ -577,6 +578,6 @@ shared_ptr op::v3::TopK::clone_with_new_inputs(const OutputVector& new_arg bool op::v3::TopK::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v3_TopK_evaluate, return op::v1::TopK::evaluate(outputs, inputs)); + NGRAPH_OP_SCOPE(v3_TopK_evaluate) { return op::v1::TopK::evaluate(outputs, inputs); } return false; } diff --git a/ngraph/core/src/op/transpose.cpp b/ngraph/core/src/op/transpose.cpp index c0f1441138fea4..db59e54be329a8 100644 --- a/ngraph/core/src/op/transpose.cpp +++ b/ngraph/core/src/op/transpose.cpp @@ -144,8 +144,9 @@ namespace transpose bool op::v1::Transpose::evaluate(const HostTensorVector& output_values, const HostTensorVector& input_values) const { - NGRAPH_OP_SCOPE( - v1_Transpose_evaluate, - return transpose::evaluate_transpose(input_values[0], input_values[1], output_values[0])); + NGRAPH_OP_SCOPE(v1_Transpose_evaluate) + { + return transpose::evaluate_transpose(input_values[0], input_values[1], output_values[0]); + } return false; } diff --git a/ngraph/core/src/op/unsqueeze.cpp b/ngraph/core/src/op/unsqueeze.cpp index c98647e4cdd333..059ff32b6ecccf 100644 --- a/ngraph/core/src/op/unsqueeze.cpp +++ b/ngraph/core/src/op/unsqueeze.cpp @@ -150,8 +150,10 @@ namespace unsqueeze bool op::v0::Unsqueeze::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v0_Unsqueeze_evaluate, - return unsqueeze::evaluate_unsqueeze(inputs[0], inputs[1], outputs[0])); + NGRAPH_OP_SCOPE(v0_Unsqueeze_evaluate) + { + return unsqueeze::evaluate_unsqueeze(inputs[0], inputs[1], outputs[0]); + } return false; } diff --git a/ngraph/core/src/op/util/broadcast_base.cpp b/ngraph/core/src/op/util/broadcast_base.cpp index 77c6136d4b9de1..50d371aaefeeee 100644 --- a/ngraph/core/src/op/util/broadcast_base.cpp +++ b/ngraph/core/src/op/util/broadcast_base.cpp @@ -361,14 +361,16 @@ bool op::util::BroadcastBase::evaluate(const HostTensorPtr& arg0, const HostTensorPtr& out, const AxisSet& broadcast_axes) const { - NGRAPH_OP_SCOPE(util_BroadcastBase_evaluate_axes, - runtime::reference::broadcast(arg0->get_data_ptr(), - out->get_data_ptr(), - arg0->get_shape(), - out->get_shape(), - broadcast_axes, - arg0->get_element_type().size()); - return true); + NGRAPH_OP_SCOPE(util_BroadcastBase_evaluate_axes) + { + runtime::reference::broadcast(arg0->get_data_ptr(), + out->get_data_ptr(), + arg0->get_shape(), + out->get_shape(), + broadcast_axes, + arg0->get_element_type().size()); + return true; + } return false; } @@ -500,14 +502,16 @@ Shape op::util::BroadcastBase::get_target_shape(const HostTensorPtr& input1) con bool op::util::BroadcastBase::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE( - util_BroadcastBase_evaluate, Shape target_shape = get_target_shape(inputs[1]); + NGRAPH_OP_SCOPE(util_BroadcastBase_evaluate) + { + Shape target_shape = get_target_shape(inputs[1]); PartialShape result_shape; std::pair pair_broadcast_axes; auto arg_shape = inputs[0]->get_shape(); - if (m_mode.m_type == BroadcastType::NONE) { + if (m_mode.m_type == BroadcastType::NONE) + { AxisVector axes_mapping_val; const auto axes_mapping_constant = as_type_ptr(input_value(2).get_node_shared_ptr()); @@ -523,18 +527,27 @@ bool op::util::BroadcastBase::evaluate(const HostTensorVector& outputs, pair_broadcast_axes = get_broadcast_axes_none(axes_mapping_val, target_shape.size()); validate_target_shape_none(inputs[0]->get_shape(), axes_mapping_val, target_shape); result_shape = target_shape; - } else if (m_mode.m_type == BroadcastType::PDPD) { + } + else if (m_mode.m_type == BroadcastType::PDPD) + { result_shape = get_result_shape_pdpd(arg_shape, target_shape, m_mode); pair_broadcast_axes = get_broadcast_axes_numpy_pdpd(arg_shape, result_shape.to_shape(), m_mode); - } else if (m_mode.m_type == BroadcastType::NUMPY) { + } + else if (m_mode.m_type == BroadcastType::NUMPY) + { result_shape = target_shape; validate_target_shape_numpy(arg_shape, target_shape); pair_broadcast_axes = get_broadcast_axes_numpy_pdpd(arg_shape, result_shape.to_shape(), m_mode); - } else { ngraph_error("Unsupported BroadcastType "); } + } + else + { + ngraph_error("Unsupported BroadcastType "); + } return evaluate_broadcast( - inputs[0], outputs[0], pair_broadcast_axes, result_shape.to_shape())); + inputs[0], outputs[0], pair_broadcast_axes, result_shape.to_shape()); + } return false; } diff --git a/ngraph/core/src/op/variadic_split.cpp b/ngraph/core/src/op/variadic_split.cpp index d7c99acedc634a..b49b5f4929678d 100644 --- a/ngraph/core/src/op/variadic_split.cpp +++ b/ngraph/core/src/op/variadic_split.cpp @@ -216,6 +216,6 @@ bool op::v1::VariadicSplit::evaluate_variadic_split(const HostTensorVector& inpu bool op::v1::VariadicSplit::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v1_VariadicSplit_evaluate, return evaluate_variadic_split(inputs, outputs)); + NGRAPH_OP_SCOPE(v1_VariadicSplit_evaluate) { return evaluate_variadic_split(inputs, outputs); } return false; } diff --git a/ngraph/core/src/op/xor.cpp b/ngraph/core/src/op/xor.cpp index bbf660d6735834..fd6dcd0382af12 100644 --- a/ngraph/core/src/op/xor.cpp +++ b/ngraph/core/src/op/xor.cpp @@ -86,8 +86,10 @@ namespace logxor bool op::v1::LogicalXor::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v1_LogicalXor_evaluate, - return logxor::evaluate_logxor(inputs[0], inputs[1], outputs[0], get_autob())); + NGRAPH_OP_SCOPE(v1_LogicalXor_evaluate) + { + return logxor::evaluate_logxor(inputs[0], inputs[1], outputs[0], get_autob()); + } return false; } @@ -109,7 +111,9 @@ shared_ptr op::v0::Xor::clone_with_new_inputs(const OutputVector& new_args bool op::v0::Xor::evaluate(const HostTensorVector& outputs, const HostTensorVector& inputs) const { - NGRAPH_OP_SCOPE(v0_Xor_evaluate, - return logxor::evaluate_logxor(inputs[0], inputs[1], outputs[0], get_autob())); + NGRAPH_OP_SCOPE(v0_Xor_evaluate) + { + return logxor::evaluate_logxor(inputs[0], inputs[1], outputs[0], get_autob()); + } return false; } diff --git a/openvino/conditional_compilation/include/openvino/cc/selective_build.h b/openvino/conditional_compilation/include/openvino/cc/selective_build.h index 0994a86419c789..05196f8928dabe 100644 --- a/openvino/conditional_compilation/include/openvino/cc/selective_build.h +++ b/openvino/conditional_compilation/include/openvino/cc/selective_build.h @@ -40,10 +40,10 @@ * An example of using annotation: * * I. Any C++ code block: - * OV_SCOPE(MyModule, ScopeName, + * OV_SCOPE(MyModule, ScopeName) { * // Any C++ code. * cout << "Hello world!"; - * ); + * } * * II. Template class instantiation using switch-case: * @@ -187,9 +187,8 @@ bool match(char const *region, Ctx && ctx, T && val, Case && cs, Cases&&... case } // namespace internal -#define OV_SCOPE(Module, region, ...) \ - OV_ITT_SCOPED_TASK(OV_CC_CAT(SIMPLE_, Module), OV_CC_TOSTRING(region)); \ - __VA_ARGS__ +#define OV_SCOPE(Module, region) \ + OV_ITT_SCOPED_TASK(OV_CC_CAT(SIMPLE_, Module), OV_CC_TOSTRING(region)); #define OV_SWITCH(Module, fn, ctx, val, ...) \ openvino::cc::internal::match \ @@ -227,14 +226,8 @@ bool match(char const *region, Ctx && ctx, T && val, Case && cs, Cases&&... case // Return second argument from possible sequences {1, 0}, {0, 1, 0} #define OV_CC_SCOPE_IS_ENABLED2(arg1_or_junk) OV_CC_SCOPE_SECOND_ARG(arg1_or_junk 1, 0) -// Scope is disabled -#define OV_CC_SCOPE_0(...) - -// Scope is enabled -#define OV_CC_SCOPE_1(...) __VA_ARGS__ - -#define OV_SCOPE(Module, region, ...) \ - OV_CC_EXPAND(OV_CC_CAT(OV_CC_SCOPE_, OV_CC_SCOPE_IS_ENABLED(OV_CC_CAT3(Module, _, region)))(__VA_ARGS__)) +#define OV_SCOPE(Module, region) \ + if (OV_CC_SCOPE_IS_ENABLED(OV_CC_CAT3(Module, _, region))) // Switch is disabled #define OV_CC_SWITCH_0(Module, fn, ctx, val) @@ -253,7 +246,7 @@ bool match(char const *region, Ctx && ctx, T && val, Case && cs, Cases&&... case #define OV_CC_DOMAINS(Module) -#define OV_SCOPE(Module, region, ...) __VA_ARGS__ +#define OV_SCOPE(Module, region) #define OV_SWITCH(Module, fn, ctx, val, ...) \ openvino::cc::internal::match(ctx, val, __VA_ARGS__); From 9465073f582d137e0be7607efbcf2ac89e6a11dc Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Tue, 22 Dec 2020 18:44:59 +0300 Subject: [PATCH 119/244] Introduce IEDevScripts package (#3661) * Refactored developer package * Added fuzzing for CMAKE_MODULE_LINKER_FLAGS as well * Added options for developer package * More improvements * Further improvements * Removed global CMAKE_MODULE_PATH population * Fixes * Final fixes * Fixed python build * Fix for TBB * Fixed Find TBB * Fixed install * Fixes for OV features * Split developer targets per component * Fixed IE build tree config * Fixed ITT * Fixed review comments * Clean export dependencies * Fixed export of pugixml * Added IEDevScripts_DIR for Android * Fixed Android #2 * Fixed Android #3 * Fixed python cc * Disabled Core threading tests on GNA --- .ci/azure/linux_ngraph_onnx.yml | 2 +- .ci/openvino-onnx/Dockerfile | 2 - CMakeLists.txt | 50 +++-- cmake/check_features.cmake | 35 ---- cmake/dependencies.cmake | 2 - .../developer_package}/FindTBB.cmake | 5 +- .../IEDevScriptsConfig.cmake} | 174 +++++++----------- .../developer_package}/add_ie_target.cmake | 10 +- .../api_validator/api_validator.cmake | 2 +- .../api_validator/api_validator_run.cmake | 0 .../clang_format/clang_format.cmake | 8 +- .../clang_format/clang_format_check.cmake | 0 .../clang_format/clang_format_fix.cmake | 0 .../compile_flags}/os_flags.cmake | 0 .../compile_flags}/sanitizer.cmake | 0 .../compile_flags}/sdl.cmake | 0 .../coverage/coverage.cmake | 2 +- .../coverage/coverage_clean.cmake | 0 .../coverage/coverage_merge.cmake | 0 .../cpplint/cpplint.cmake | 76 +------- .../cpplint/cpplint.py | 0 .../cpplint/cpplint_html.cmake | 0 .../cpplint/cpplint_merge.cmake | 0 .../cpplint/cpplint_run.cmake | 0 .../cpplint/cpplint_to_cppcheck_xml.cmake | 0 .../cross_compiled_disp_gen.cmake | 0 .../cross_compiled_disp_gen_options.in | 0 .../cross_compile/cross_compiled_func.cmake | 0 cmake/{ => developer_package}/debug.cmake | 0 .../download/dependency_solver.cmake | 2 +- .../download/download.cmake | 4 +- .../download/download_and_apply.cmake | 0 .../download/download_and_check.cmake | 0 .../download/download_and_extract.cmake | 4 +- .../download/extract.cmake | 0 .../faster_build.cmake | 0 cmake/developer_package/features.cmake | 74 ++++++++ cmake/{ => developer_package}/fuzzing.cmake | 3 +- .../developer_package}/linux_name.cmake | 5 +- .../developer_package}/models.cmake | 0 cmake/{ => developer_package}/options.cmake | 5 +- cmake/developer_package/packaging.cmake | 58 ++++++ .../plugins/create_plugin_file.cmake | 0 .../developer_package}/plugins/plugins.cmake | 6 +- .../plugins/register_plugin_cmake.cmake | 0 .../plugins/unregister_plugin_cmake.cmake | 0 .../shellcheck/shellcheck.cmake | 2 +- .../shellcheck/shellcheck_process.cmake | 0 .../target_flags.cmake | 0 .../tbb/lnx/TBBConfig.cmake | 0 .../tbb/mac/TBBConfig.cmake | 0 .../tbb/win/TBBConfig.cmake | 0 cmake/{ => developer_package}/version.cmake | 10 +- .../vs_version/vs_version.cmake | 2 +- .../vs_version/vs_version.rc.in | 0 .../whole_archive.cmake | 0 cmake/features.cmake | 52 +----- .../onecoreuap.toolchain.cmake | 0 cmake/{ => toolchains}/uwp.toolchain.cmake | 0 docs/CMakeLists.txt | 1 + inference-engine/CMakeLists.txt | 67 ++----- .../cmake/check_features_ie.cmake | 39 ---- .../{coverage_ie.cmake => coverage.cmake} | 0 inference-engine/cmake/dependencies.cmake | 29 +-- .../cmake/developer_package_ie.cmake | 8 - .../{features_ie.cmake => features.cmake} | 48 ++++- .../{FindlibGNA.cmake => libGNAConfig.cmake} | 0 .../InferenceEngineConfig-build.cmake.in} | 2 +- .../InferenceEngineConfig-version.cmake.in | 0 .../InferenceEngineConfig.cmake.in | 0 ...enceEngineDeveloperPackageConfig.cmake.in} | 34 ++-- inference-engine/cmake/vpu_dependencies.cmake | 11 +- .../ie_bridges/c/src/CMakeLists.txt | 3 +- .../ie_bridges/python/CMakeLists.txt | 5 +- .../{FindCython.cmake => CythonConfig.cmake} | 0 .../ie_bridges/python/cmake/UseCython.cmake | 5 +- .../src/gna_plugin/CMakeLists.txt | 4 +- .../src/inference_engine/CMakeLists.txt | 44 +++-- .../src/legacy_api/CMakeLists.txt | 4 - .../mkldnn_plugin/nodes/mkldnn_split_node.cpp | 2 +- .../src/vpu/common/CMakeLists.txt | 2 +- .../src/vpu/graph_transformer/CMakeLists.txt | 2 +- inference-engine/tests/CMakeLists.txt | 3 - .../behavior/core_threading_tests.cpp | 2 +- .../functional/plugin/shared/CMakeLists.txt | 1 + .../shared_test_classes/CMakeLists.txt | 1 + .../common_test_utils/CMakeLists.txt | 17 +- .../functional_test_utils/CMakeLists.txt | 7 +- .../unit_test_utils/CMakeLists.txt | 1 + .../lpt_ngraph_functions/CMakeLists.txt | 5 +- .../ngraph_functions/CMakeLists.txt | 9 +- .../behavior/shared_tests/CMakeLists.txt | 2 +- .../functional/ie_tests/CMakeLists.txt | 3 +- .../functional/shared_tests/CMakeLists.txt | 2 +- .../functional/vpu/CMakeLists.txt | 9 +- inference-engine/thirdparty/CMakeLists.txt | 6 +- ngraph/CMakeLists.txt | 8 +- ngraph/core/builder/CMakeLists.txt | 4 +- ngraph/core/reference/CMakeLists.txt | 2 +- openvino/CMakeLists.txt | 2 +- openvino/itt/CMakeLists.txt | 8 +- .../cmake/{FindITT.cmake => ITTConfig.cmake} | 0 tests/fuzz/CMakeLists.txt | 4 +- 103 files changed, 466 insertions(+), 535 deletions(-) delete mode 100644 cmake/check_features.cmake rename {inference-engine/cmake => cmake/developer_package}/FindTBB.cmake (93%) rename cmake/{developer_package.cmake => developer_package/IEDevScriptsConfig.cmake} (64%) rename {inference-engine/cmake => cmake/developer_package}/add_ie_target.cmake (96%) rename cmake/{ => developer_package}/api_validator/api_validator.cmake (97%) rename cmake/{ => developer_package}/api_validator/api_validator_run.cmake (100%) rename cmake/{ => developer_package}/clang_format/clang_format.cmake (92%) rename cmake/{ => developer_package}/clang_format/clang_format_check.cmake (100%) rename cmake/{ => developer_package}/clang_format/clang_format_fix.cmake (100%) rename cmake/{ => developer_package/compile_flags}/os_flags.cmake (100%) rename cmake/{ => developer_package/compile_flags}/sanitizer.cmake (100%) rename cmake/{ => developer_package/compile_flags}/sdl.cmake (100%) rename cmake/{ => developer_package}/coverage/coverage.cmake (99%) rename cmake/{ => developer_package}/coverage/coverage_clean.cmake (100%) rename cmake/{ => developer_package}/coverage/coverage_merge.cmake (100%) rename cmake/{ => developer_package}/cpplint/cpplint.cmake (52%) rename cmake/{ => developer_package}/cpplint/cpplint.py (100%) rename cmake/{ => developer_package}/cpplint/cpplint_html.cmake (100%) rename cmake/{ => developer_package}/cpplint/cpplint_merge.cmake (100%) rename cmake/{ => developer_package}/cpplint/cpplint_run.cmake (100%) rename cmake/{ => developer_package}/cpplint/cpplint_to_cppcheck_xml.cmake (100%) rename cmake/{ => developer_package}/cross_compile/cross_compiled_disp_gen.cmake (100%) rename cmake/{ => developer_package}/cross_compile/cross_compiled_disp_gen_options.in (100%) rename cmake/{ => developer_package}/cross_compile/cross_compiled_func.cmake (100%) rename cmake/{ => developer_package}/debug.cmake (100%) rename cmake/{ => developer_package}/download/dependency_solver.cmake (99%) rename cmake/{ => developer_package}/download/download.cmake (87%) rename cmake/{ => developer_package}/download/download_and_apply.cmake (100%) rename cmake/{ => developer_package}/download/download_and_check.cmake (100%) rename cmake/{ => developer_package}/download/download_and_extract.cmake (99%) rename cmake/{ => developer_package}/download/extract.cmake (100%) rename cmake/{ => developer_package}/faster_build.cmake (100%) create mode 100644 cmake/developer_package/features.cmake rename cmake/{ => developer_package}/fuzzing.cmake (89%) rename {inference-engine/cmake => cmake/developer_package}/linux_name.cmake (93%) rename {inference-engine/cmake => cmake/developer_package}/models.cmake (100%) rename cmake/{ => developer_package}/options.cmake (92%) create mode 100644 cmake/developer_package/packaging.cmake rename {inference-engine/cmake => cmake/developer_package}/plugins/create_plugin_file.cmake (100%) rename {inference-engine/cmake => cmake/developer_package}/plugins/plugins.cmake (96%) rename {inference-engine/cmake => cmake/developer_package}/plugins/register_plugin_cmake.cmake (100%) rename {inference-engine/cmake => cmake/developer_package}/plugins/unregister_plugin_cmake.cmake (100%) rename cmake/{ => developer_package}/shellcheck/shellcheck.cmake (94%) rename cmake/{ => developer_package}/shellcheck/shellcheck_process.cmake (100%) rename cmake/{ => developer_package}/target_flags.cmake (100%) rename {inference-engine/cmake => cmake/developer_package}/tbb/lnx/TBBConfig.cmake (100%) rename {inference-engine/cmake => cmake/developer_package}/tbb/mac/TBBConfig.cmake (100%) rename {inference-engine/cmake => cmake/developer_package}/tbb/win/TBBConfig.cmake (100%) rename cmake/{ => developer_package}/version.cmake (80%) rename cmake/{ => developer_package}/vs_version/vs_version.cmake (96%) rename cmake/{ => developer_package}/vs_version/vs_version.rc.in (100%) rename cmake/{ => developer_package}/whole_archive.cmake (100%) rename cmake/{ => toolchains}/onecoreuap.toolchain.cmake (100%) rename cmake/{ => toolchains}/uwp.toolchain.cmake (100%) delete mode 100644 inference-engine/cmake/check_features_ie.cmake rename inference-engine/cmake/{coverage_ie.cmake => coverage.cmake} (100%) delete mode 100644 inference-engine/cmake/developer_package_ie.cmake rename inference-engine/cmake/{features_ie.cmake => features.cmake} (83%) rename inference-engine/cmake/{FindlibGNA.cmake => libGNAConfig.cmake} (100%) rename inference-engine/cmake/{config.cmake.in => templates/InferenceEngineConfig-build.cmake.in} (96%) rename inference-engine/cmake/{share => templates}/InferenceEngineConfig-version.cmake.in (100%) rename inference-engine/cmake/{share => templates}/InferenceEngineConfig.cmake.in (100%) rename inference-engine/cmake/{developer_package_config.cmake.in => templates/InferenceEngineDeveloperPackageConfig.cmake.in} (59%) rename inference-engine/ie_bridges/python/cmake/{FindCython.cmake => CythonConfig.cmake} (100%) rename openvino/itt/cmake/{FindITT.cmake => ITTConfig.cmake} (100%) diff --git a/.ci/azure/linux_ngraph_onnx.yml b/.ci/azure/linux_ngraph_onnx.yml index f993670f98c95b..c6e363d7c99f19 100644 --- a/.ci/azure/linux_ngraph_onnx.yml +++ b/.ci/azure/linux_ngraph_onnx.yml @@ -64,7 +64,7 @@ jobs: - task: CMake@1 inputs: # CMake must get Python 3.x version by default - cmakeArgs: -GNinja -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_VPU=OFF -DENABLE_GNA=OFF -DENABLE_OPENCV=OFF -DENABLE_CPPLINT=OFF -DENABLE_TESTS=OFF -DENABLE_BEH_TESTS=OFF -DENABLE_FUNCTIONAL_TESTS=OFF -DENABLE_MKL_DNN=ON -DENABLE_CLDNN=OFF -DENABLE_PROFILING_ITT=OFF -DENABLE_SAMPLES=OFF -DENABLE_SPEECH_DEMO=OFF -DENABLE_PYTHON=ON -DPYTHON_EXECUTABLE=/usr/bin/python3.6 -DNGRAPH_ONNX_IMPORT_ENABLE=ON -DNGRAPH_INTERPRETER_ENABLE=ON -DNGRAPH_DEBUG_ENABLE=OFF -DNGRAPH_DYNAMIC_COMPONENTS_ENABLE=ON -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) $(REPO_DIR) + cmakeArgs: -GNinja -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_VPU=OFF -DENABLE_GNA=OFF -DENABLE_OPENCV=OFF -DENABLE_CPPLINT=OFF -DENABLE_TESTS=OFF -DENABLE_MKL_DNN=ON -DENABLE_CLDNN=OFF -DENABLE_PROFILING_ITT=OFF -DENABLE_SAMPLES=OFF -DENABLE_SPEECH_DEMO=OFF -DENABLE_PYTHON=ON -DPYTHON_EXECUTABLE=/usr/bin/python3.6 -DNGRAPH_ONNX_IMPORT_ENABLE=ON -DNGRAPH_INTERPRETER_ENABLE=ON -DNGRAPH_DEBUG_ENABLE=OFF -DNGRAPH_DYNAMIC_COMPONENTS_ENABLE=ON -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) $(REPO_DIR) workingDirectory: $(BUILD_DIR) enabled: false diff --git a/.ci/openvino-onnx/Dockerfile b/.ci/openvino-onnx/Dockerfile index 954b1634ed2a23..5fe36e46219061 100644 --- a/.ci/openvino-onnx/Dockerfile +++ b/.ci/openvino-onnx/Dockerfile @@ -57,8 +57,6 @@ RUN cmake .. \ -DENABLE_OPENCV=OFF \ -DENABLE_CPPLINT=OFF \ -DENABLE_TESTS=OFF \ - -DENABLE_BEH_TESTS=OFF \ - -DENABLE_FUNCTIONAL_TESTS=OFF \ -DENABLE_MKL_DNN=ON \ -DENABLE_CLDNN=OFF \ -DENABLE_PROFILING_ITT=OFF \ diff --git a/CMakeLists.txt b/CMakeLists.txt index ff0a58f05c21d2..80249ccccedfdd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,17 +8,17 @@ project(OpenVINO) set(OpenVINO_MAIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(IE_MAIN_SOURCE_DIR ${OpenVINO_MAIN_SOURCE_DIR}/inference-engine) -list(APPEND CMAKE_MODULE_PATH "${OpenVINO_MAIN_SOURCE_DIR}/cmake") -include(CTest) -include(features) +find_package(IEDevScripts REQUIRED + PATHS "${OpenVINO_MAIN_SOURCE_DIR}/cmake/developer_package" + NO_CMAKE_FIND_ROOT_PATH + NO_DEFAULT_PATH) -# include developer package -include(developer_package) +include(CTest) +include(cmake/features.cmake) # These options are shared with 3rdparty plugins by means of developer package -include(check_features) -include(dependencies) +include(cmake/dependencies.cmake) # resolving dependencies for the project message (STATUS "PROJECT ............................... " ${PROJECT_NAME}) @@ -30,8 +30,11 @@ message (STATUS "CMAKE_C_COMPILER_ID ................... " ${CMAKE_C_COMPILER_ID message (STATUS "CMAKE_BUILD_TYPE ...................... " ${CMAKE_BUILD_TYPE}) # remove file with exported developer targets to force its regeneration -file(REMOVE "${CMAKE_BINARY_DIR}/targets_developer.cmake") -file(REMOVE "${CMAKE_BINARY_DIR}/targets.cmake") +file(REMOVE "${CMAKE_BINARY_DIR}/inference_engine_targets.cmake") +foreach(component IN LISTS openvino_export_components) + file(REMOVE "${CMAKE_BINARY_DIR}/${component}_dev_targets.cmake") + unset(${component} CACHE) +endforeach() # # Build @@ -45,7 +48,6 @@ function(build_ngraph) endfunction() set(NGRAPH_BUILD_DIR ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} CACHE STRING "" FORCE) - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${OpenVINO_MAIN_SOURCE_DIR}/ngraph/cmake/Modules/") if (ENABLE_SANITIZER) ngraph_set(NGRAPH_ADDRESS_SANITIZER TRUE) @@ -119,28 +121,36 @@ function(build_ngraph) set(NGRAPH_LIBRARIES ngraph PARENT_SCOPE) endfunction() -file(REMOVE "${CMAKE_BINARY_DIR}/openvino_targets_developer.cmake") -unset(OpenVINODeveloperPackageTargets CACHE) - function(openvino_developer_export_targets) - set(OpenVINODeveloperPackageTargets "${OpenVINODeveloperPackageTargets};${ARGV}") + cmake_parse_arguments(EXPORT "" "COMPONENT" "TARGETS" ${ARGN}) + + if(EXPORT_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "openvino_developer_export_targets has unparsed arguments: ${EXPORT_UNPARSED_ARGUMENTS}") + endif() + + set(${EXPORT_COMPONENT} "${${EXPORT_COMPONENT}};${EXPORT_TARGETS}") # to allow exporting of aliased targets with the original names - foreach(target_name ${OpenVINODeveloperPackageTargets}) + foreach(target_name IN LISTS ${EXPORT_COMPONENT}) if(TARGET "${target_name}") get_target_property(original_name ${target_name} ALIASED_TARGET) if(TARGET "${original_name}") message(STATUS "The name ${target_name} is an ALIAS for ${original_name}. " "It will be exported to the InferenceEngineDeveloperPackage with the original name.") - list(REMOVE_ITEM OpenVINODeveloperPackageTargets ${target_name}) - list(APPEND OpenVINODeveloperPackageTargets ${original_name}) + list(REMOVE_ITEM ${EXPORT_COMPONENT} ${target_name}) + list(APPEND ${EXPORT_COMPONENT} ${original_name}) endif() endif() endforeach() - list(REMOVE_DUPLICATES OpenVINODeveloperPackageTargets) - set(OpenVINODeveloperPackageTargets "${OpenVINODeveloperPackageTargets}" CACHE INTERNAL - "Paths to extra Inference Engine plugins" FORCE) + list(REMOVE_DUPLICATES ${EXPORT_COMPONENT}) + set(${EXPORT_COMPONENT} "${${EXPORT_COMPONENT}}" CACHE INTERNAL + "A list of OpenVINO ${EXPORT_COMPONENT} exported targets" FORCE) + + list(APPEND openvino_export_components ${EXPORT_COMPONENT}) + list(REMOVE_DUPLICATES openvino_export_components) + set(openvino_export_components "${openvino_export_components}" CACHE INTERNAL + "A list of OpenVINO exported components" FORCE) endfunction() add_subdirectory(openvino) diff --git a/cmake/check_features.cmake b/cmake/check_features.cmake deleted file mode 100644 index 693227097eaa52..00000000000000 --- a/cmake/check_features.cmake +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (C) 2018-2020 Intel Corporation -# SPDX-License-Identifier: Apache-2.0 -# - -if (VERBOSE_BUILD) - set(CMAKE_VERBOSE_MAKEFILE ON CACHE BOOL "" FORCE) -endif() - -#64 bits platform -if (CMAKE_SIZEOF_VOID_P EQUAL 8) - message(STATUS "Detected 64 bit architecture") - SET(ARCH_64 ON) -else() - message(STATUS "Detected 32 bit architecture") - SET(ARCH_64 OFF) -endif() - -if(ENABLE_AVX512F) - if ((CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") AND (MSVC_VERSION VERSION_LESS 1920)) - # 1920 version of MSVC 2019. In MSVC 2017 AVX512F not work - set(ENABLE_AVX512F OFF CACHE BOOL "" FORCE) - endif() - if ((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6)) - set(ENABLE_AVX512F OFF CACHE BOOL "" FORCE) - endif() - if ((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10)) - # TBD: clarify which AppleClang version supports avx512 - set(ENABLE_AVX512F OFF CACHE BOOL "" FORCE) - endif() - if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)) - set(ENABLE_AVX512F OFF CACHE BOOL "" FORCE) - endif() -endif() - -print_enabled_features() diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake index 56f935789c0491..aed76147342d02 100644 --- a/cmake/dependencies.cmake +++ b/cmake/dependencies.cmake @@ -4,8 +4,6 @@ set_temp_directory(TEMP "${IE_MAIN_SOURCE_DIR}") -include(dependency_solver) - if(CMAKE_CROSSCOMPILING AND CMAKE_HOST_SYSTEM_NAME MATCHES Linux AND CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*") set(protoc_version "3.7.1") diff --git a/inference-engine/cmake/FindTBB.cmake b/cmake/developer_package/FindTBB.cmake similarity index 93% rename from inference-engine/cmake/FindTBB.cmake rename to cmake/developer_package/FindTBB.cmake index 688e6fb46dc3ca..765b12e69eb3bb 100644 --- a/inference-engine/cmake/FindTBB.cmake +++ b/cmake/developer_package/FindTBB.cmake @@ -25,8 +25,9 @@ endif() find_package(TBB CONFIG - NO_DEFAULT_PATH PATHS ${TBBROOT}/cmake - ${CMAKE_CURRENT_LIST_DIR}/${IE_OWN_TBB_CONFIG} + ${IEDevScripts_DIR}/${IE_OWN_TBB_CONFIG} + NO_DEFAULT_PATH ) + find_package_handle_standard_args(TBB CONFIG_MODE) diff --git a/cmake/developer_package.cmake b/cmake/developer_package/IEDevScriptsConfig.cmake similarity index 64% rename from cmake/developer_package.cmake rename to cmake/developer_package/IEDevScriptsConfig.cmake index b9ea3e3d3b78fd..df40b2a984d597 100644 --- a/cmake/developer_package.cmake +++ b/cmake/developer_package/IEDevScriptsConfig.cmake @@ -4,7 +4,27 @@ cmake_minimum_required(VERSION 3.13) +if(NOT DEFINED IEDevScripts_DIR) + message(FATAL_ERROR "IEDevScripts_DIR is not defined") +endif() + +set(OLD_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}) +set(CMAKE_MODULE_PATH "${IEDevScripts_DIR}") + +function(set_ci_build_number) + set(repo_root "${CMAKE_SOURCE_DIR}") + include(version) + set(CI_BUILD_NUMBER "${CI_BUILD_NUMBER}" PARENT_SCOPE) +endfunction() + +set_ci_build_number() + +include(features) + +# # Detect target +# + include(target_flags) string(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} ARCH_FOLDER) @@ -18,84 +38,10 @@ elseif(MSVC AND AARCH64) set(ARCH_FOLDER arm64) endif() -list(APPEND CMAKE_MODULE_PATH - "${OpenVINO_MAIN_SOURCE_DIR}/cmake/download" - "${OpenVINO_MAIN_SOURCE_DIR}/cmake/cross_compile") - -# -# CPack -# - -include(CPackComponent) -unset(IE_CPACK_COMPONENTS_ALL CACHE) - -set(IE_CPACK_IE_DIR deployment_tools/inference_engine) - -# Search packages for the host system instead of packages for the target system -# in case of cross compilation these macros should be defined by the toolchain file -if(NOT COMMAND find_host_package) - macro(find_host_package) - find_package(${ARGN}) - endmacro() -endif() -if(NOT COMMAND find_host_program) - macro(find_host_program) - find_program(${ARGN}) - endmacro() -endif() - -# -# ie_cpack_set_library_dir() # -# Set library directory for cpack +# Prepare temporary folder # -function(ie_cpack_set_library_dir) - if(WIN32) - set(IE_CPACK_LIBRARY_PATH ${IE_CPACK_IE_DIR}/lib/${ARCH_FOLDER}/${CMAKE_BUILD_TYPE} PARENT_SCOPE) - set(IE_CPACK_RUNTIME_PATH ${IE_CPACK_IE_DIR}/bin/${ARCH_FOLDER}/${CMAKE_BUILD_TYPE} PARENT_SCOPE) - set(IE_CPACK_ARCHIVE_PATH ${IE_CPACK_IE_DIR}/lib/${ARCH_FOLDER}/${CMAKE_BUILD_TYPE} PARENT_SCOPE) - else() - set(IE_CPACK_LIBRARY_PATH ${IE_CPACK_IE_DIR}/lib/${ARCH_FOLDER} PARENT_SCOPE) - set(IE_CPACK_RUNTIME_PATH ${IE_CPACK_IE_DIR}/lib/${ARCH_FOLDER} PARENT_SCOPE) - set(IE_CPACK_ARCHIVE_PATH ${IE_CPACK_IE_DIR}/lib/${ARCH_FOLDER} PARENT_SCOPE) - endif() -endfunction() - -ie_cpack_set_library_dir() -# -# ie_cpack_add_component(NAME ...) -# -# Wraps original `cpack_add_component` and adds component to internal IE list -# -macro(ie_cpack_add_component NAME) - list(APPEND IE_CPACK_COMPONENTS_ALL ${NAME}) - set(IE_CPACK_COMPONENTS_ALL "${IE_CPACK_COMPONENTS_ALL}" CACHE STRING "" FORCE) - cpack_add_component(${NAME} ${ARGN}) -endmacro() - -macro(ie_cpack) - set(CPACK_GENERATOR "TGZ") - string(REPLACE "/" "_" CPACK_PACKAGE_VERSION "${CI_BUILD_NUMBER}") - if(WIN32) - set(CPACK_PACKAGE_NAME inference-engine_${CMAKE_BUILD_TYPE}) - else() - set(CPACK_PACKAGE_NAME inference-engine) - endif() - set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF) - set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) - set(CPACK_PACKAGE_VENDOR "Intel") - set(CPACK_COMPONENTS_ALL ${ARGN}) - set(CPACK_STRIP_FILES ON) - - if(OS_FOLDER) - set(CPACK_SYSTEM_NAME "${OS_FOLDER}") - endif() - - include(CPack) -endmacro() - -# prepare temporary folder function(set_temp_directory temp_variable source_tree_dir) if (DEFINED ENV{DL_SDK_TEMP} AND NOT $ENV{DL_SDK_TEMP} STREQUAL "") message(STATUS "DL_SDK_TEMP environment is set : $ENV{DL_SDK_TEMP}") @@ -119,22 +65,37 @@ function(set_temp_directory temp_variable source_tree_dir) endif() endfunction() +# +# For cross-compilation +# + +# Search packages for the host system instead of packages for the target system +# in case of cross compilation these macros should be defined by the toolchain file +if(NOT COMMAND find_host_package) + macro(find_host_package) + find_package(${ARGN}) + endmacro() +endif() +if(NOT COMMAND find_host_program) + macro(find_host_program) + find_program(${ARGN}) + endmacro() +endif() + # # Common scripts # +include(packaging) include(coverage/coverage) include(shellcheck/shellcheck) -# External dependencies -find_package(Threads) - # printing debug messages include(debug) if(OS_FOLDER) message ("**** OS FOLDER IS: [${OS_FOLDER}]") - if("${OS_FOLDER}" STREQUAL "ON") + if(OS_FOLDER STREQUAL "ON") message ("**** USING OS FOLDER: [${CMAKE_SYSTEM_NAME}]") set(BIN_FOLDER "bin/${CMAKE_SYSTEM_NAME}/${ARCH_FOLDER}") else() @@ -144,13 +105,16 @@ else() set(BIN_FOLDER "bin/${ARCH_FOLDER}") endif() -if("${CMAKE_BUILD_TYPE}" STREQUAL "") - debug_message(STATUS "CMAKE_BUILD_TYPE not defined, 'Release' will be used") +if(NOT DEFINED CMAKE_BUILD_TYPE) + message(STATUS "CMAKE_BUILD_TYPE not defined, 'Release' will be used") set(CMAKE_BUILD_TYPE "Release") endif() # allow to override default OUTPUT_ROOT root if(NOT DEFINED OUTPUT_ROOT) + if(NOT DEFINED OpenVINO_MAIN_SOURCE_DIR) + message(FATAL_ERROR "OpenVINO_MAIN_SOURCE_DIR is not defined") + endif() set(OUTPUT_ROOT ${OpenVINO_MAIN_SOURCE_DIR}) endif() @@ -176,16 +140,17 @@ endif() set(CMAKE_DEBUG_POSTFIX ${IE_DEBUG_POSTFIX}) set(CMAKE_RELEASE_POSTFIX ${IE_RELEASE_POSTFIX}) -if (WIN32 OR CMAKE_GENERATOR STREQUAL "Xcode") +if (MSVC OR CMAKE_GENERATOR STREQUAL "Xcode") # Support CMake multiconfiguration for Visual Studio or Xcode build set(IE_BUILD_POSTFIX $<$:${IE_DEBUG_POSTFIX}>$<$:${IE_RELEASE_POSTFIX}>) else () - if (${CMAKE_BUILD_TYPE} STREQUAL "Debug" ) + if (CMAKE_BUILD_TYPE STREQUAL "Debug" ) set(IE_BUILD_POSTFIX ${IE_DEBUG_POSTFIX}) else() set(IE_BUILD_POSTFIX ${IE_RELEASE_POSTFIX}) endif() endif() + message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") add_definitions(-DIE_BUILD_POSTFIX=\"${IE_BUILD_POSTFIX}\") @@ -205,11 +170,11 @@ else() endif() if(APPLE) + set(CMAKE_MACOSX_RPATH ON) # WA for Xcode generator + object libraries issue: # https://gitlab.kitware.com/cmake/cmake/issues/20260 # http://cmake.3232098.n2.nabble.com/XCODE-DEPEND-HELPER-make-Deletes-Targets-Before-and-While-They-re-Built-td7598277.html set(CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY ON) - set(CMAKE_MACOSX_RPATH ON) endif() # Use solution folders @@ -219,38 +184,41 @@ set(CMAKE_POLICY_DEFAULT_CMP0054 NEW) # LTO -set(CMAKE_POLICY_DEFAULT_CMP0069 NEW) -include(CheckIPOSupported) +if(ENABLE_LTO) + set(CMAKE_POLICY_DEFAULT_CMP0069 NEW) + include(CheckIPOSupported) -check_ipo_supported(RESULT IPO_SUPPORTED - OUTPUT OUTPUT_MESSAGE - LANGUAGES C CXX) + check_ipo_supported(RESULT IPO_SUPPORTED + OUTPUT OUTPUT_MESSAGE + LANGUAGES C CXX) -if(NOT IPO_SUPPORTED) - set(ENABLE_LTO "OFF" CACHE STRING "Enable Link Time Optmization" FORCE) - message(WARNING "IPO / LTO is not supported: ${OUTPUT_MESSAGE}") + if(NOT IPO_SUPPORTED) + set(ENABLE_LTO "OFF" CACHE STRING "Enable Link Time Optmization" FORCE) + message(WARNING "IPO / LTO is not supported: ${OUTPUT_MESSAGE}") + endif() endif() # General flags -include(sdl) -include(os_flags) -include(sanitizer) -include(cross_compiled_func) +include(compile_flags/sdl) +include(compile_flags/os_flags) +include(compile_flags/sanitizer) +include(download/dependency_solver) +include(cross_compile/cross_compiled_func) include(faster_build) include(whole_archive) +include(linux_name) +include(models) include(api_validator/api_validator) -function(set_ci_build_number) - set(OpenVINO_MAIN_SOURCE_DIR "${CMAKE_SOURCE_DIR}") - include(version) - set(CI_BUILD_NUMBER "${CI_BUILD_NUMBER}" PARENT_SCOPE) -endfunction() -set_ci_build_number() - include(vs_version/vs_version) +include(plugins/plugins) +include(add_ie_target) # Code style utils include(cpplint/cpplint) include(clang_format/clang_format) + +# Restore state +set(CMAKE_MODULE_PATH ${OLD_CMAKE_MODULE_PATH}) diff --git a/inference-engine/cmake/add_ie_target.cmake b/cmake/developer_package/add_ie_target.cmake similarity index 96% rename from inference-engine/cmake/add_ie_target.cmake rename to cmake/developer_package/add_ie_target.cmake index f6d4dd19ca6a5f..b081a69459da1d 100644 --- a/inference-engine/cmake/add_ie_target.cmake +++ b/cmake/developer_package/add_ie_target.cmake @@ -8,7 +8,7 @@ Example: addIeTarget( NAME core_lib ADD_CPPLINT - DEVELOPER_PACKAGE + DEVELOPER_PACKAGE TYPE ROOT ${CMAKE_CURRENT_SOURCE_DIR} ADDITIONAL_SOURCE_DIRS @@ -31,7 +31,6 @@ addIeTarget( function(addIeTarget) set(options ADD_CPPLINT # Enables code style checks for the target - DEVELOPER_PACKAGE # Enables exporting of the target through the developer package ) set(oneValueRequiredArgs TYPE # type of target, SHARED|STATIC|EXECUTABLE. SHARED and STATIC correspond to add_library, EXECUTABLE to add_executable @@ -39,6 +38,7 @@ function(addIeTarget) ROOT # root directory to be used for recursive search of source files ) set(oneValueOptionalArgs + DEVELOPER_PACKAGE # Enables exporting of the target through the developer package ) set(multiValueArgs INCLUDES # Extra include directories @@ -121,10 +121,8 @@ function(addIeTarget) endif() if (ARG_DEVELOPER_PACKAGE) # developer package - ie_developer_export_targets(${ARG_NAME}) - if (ARG_EXPORT_DEPENDENCIES) - ie_developer_export_targets(${ARG_NAME} ${ARG_EXPORT_DEPENDENCIES}) - endif() + openvino_developer_export_targets(COMPONENT ${ARG_DEVELOPER_PACKAGE} + TARGETS ${ARG_NAME} ${ARG_EXPORT_DEPENDENCIES}) endif() if(WIN32) # Provide default compile pdb name equal to target name diff --git a/cmake/api_validator/api_validator.cmake b/cmake/developer_package/api_validator/api_validator.cmake similarity index 97% rename from cmake/api_validator/api_validator.cmake rename to cmake/developer_package/api_validator/api_validator.cmake index d165256d3e4183..6b0222a03d1f0d 100644 --- a/cmake/api_validator/api_validator.cmake +++ b/cmake/developer_package/api_validator/api_validator.cmake @@ -108,7 +108,7 @@ function(_ie_add_api_validator_post_build_step) -D UWP_API_VALIDATOR_EXCLUSION=${UWP_API_VALIDATOR_EXCLUSION} -D UWP_API_VALIDATOR_OUTPUT=${output_file} -D CMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} - -P "${OpenVINO_MAIN_SOURCE_DIR}/cmake/api_validator/api_validator_run.cmake" + -P "${IEDevScripts_DIR}/api_validator/api_validator_run.cmake" BYPRODUCTS ${output_file} COMMENT "[apiValidator] Check ${target_name} for OneCore compliance" VERBATIM) diff --git a/cmake/api_validator/api_validator_run.cmake b/cmake/developer_package/api_validator/api_validator_run.cmake similarity index 100% rename from cmake/api_validator/api_validator_run.cmake rename to cmake/developer_package/api_validator/api_validator_run.cmake diff --git a/cmake/clang_format/clang_format.cmake b/cmake/developer_package/clang_format/clang_format.cmake similarity index 92% rename from cmake/clang_format/clang_format.cmake rename to cmake/developer_package/clang_format/clang_format.cmake index ae37ae134e3f4f..6e35f387c72c10 100644 --- a/cmake/clang_format/clang_format.cmake +++ b/cmake/developer_package/clang_format/clang_format.cmake @@ -76,10 +76,10 @@ function(add_clang_format_target TARGET_NAME) -D "CLANG_FORMAT=${CLANG_FORMAT}" -D "INPUT_FILE=${source_file}" -D "OUTPUT_FILE=${output_file}" - -P "${OpenVINO_MAIN_SOURCE_DIR}/cmake/clang_format/clang_format_check.cmake" + -P "${IEDevScripts_DIR}/clang_format/clang_format_check.cmake" DEPENDS "${source_file}" - "${OpenVINO_MAIN_SOURCE_DIR}/cmake/clang_format/clang_format_check.cmake" + "${IEDevScripts_DIR}/clang_format/clang_format_check.cmake" COMMENT "[clang-format] ${source_file}" VERBATIM) @@ -102,10 +102,10 @@ function(add_clang_format_target TARGET_NAME) -D "CLANG_FORMAT=${CLANG_FORMAT}" -D "INPUT_FILES=${CLANG_FORMAT_FOR_SOURCES}" -D "EXCLUDE_PATTERNS=${CLANG_FORMAT_EXCLUDE_PATTERNS}" - -P "${OpenVINO_MAIN_SOURCE_DIR}/cmake/clang_format/clang_format_fix.cmake" + -P "${IEDevScripts_DIR}/clang_format/clang_format_fix.cmake" DEPENDS "${CLANG_FORMAT_FOR_SOURCES}" - "${OpenVINO_MAIN_SOURCE_DIR}/cmake/clang_format/clang_format_fix.cmake" + "${IEDevScripts_DIR}/clang_format/clang_format_fix.cmake" COMMENT "[clang-format] ${TARGET_NAME}_fix" VERBATIM) diff --git a/cmake/clang_format/clang_format_check.cmake b/cmake/developer_package/clang_format/clang_format_check.cmake similarity index 100% rename from cmake/clang_format/clang_format_check.cmake rename to cmake/developer_package/clang_format/clang_format_check.cmake diff --git a/cmake/clang_format/clang_format_fix.cmake b/cmake/developer_package/clang_format/clang_format_fix.cmake similarity index 100% rename from cmake/clang_format/clang_format_fix.cmake rename to cmake/developer_package/clang_format/clang_format_fix.cmake diff --git a/cmake/os_flags.cmake b/cmake/developer_package/compile_flags/os_flags.cmake similarity index 100% rename from cmake/os_flags.cmake rename to cmake/developer_package/compile_flags/os_flags.cmake diff --git a/cmake/sanitizer.cmake b/cmake/developer_package/compile_flags/sanitizer.cmake similarity index 100% rename from cmake/sanitizer.cmake rename to cmake/developer_package/compile_flags/sanitizer.cmake diff --git a/cmake/sdl.cmake b/cmake/developer_package/compile_flags/sdl.cmake similarity index 100% rename from cmake/sdl.cmake rename to cmake/developer_package/compile_flags/sdl.cmake diff --git a/cmake/coverage/coverage.cmake b/cmake/developer_package/coverage/coverage.cmake similarity index 99% rename from cmake/coverage/coverage.cmake rename to cmake/developer_package/coverage/coverage.cmake index e2fa3b57edee79..71c24fcd9ddab3 100644 --- a/cmake/coverage/coverage.cmake +++ b/cmake/developer_package/coverage/coverage.cmake @@ -18,7 +18,7 @@ if(NOT TARGET ie_coverage) endif() set(IE_COVERAGE_REPORTS "${CMAKE_BINARY_DIR}/coverage") -set(IE_COVERAGE_SCRIPT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake/coverage") +set(IE_COVERAGE_SCRIPT_DIR "${IEDevScripts_DIR}/coverage") include(CMakeParseArguments) diff --git a/cmake/coverage/coverage_clean.cmake b/cmake/developer_package/coverage/coverage_clean.cmake similarity index 100% rename from cmake/coverage/coverage_clean.cmake rename to cmake/developer_package/coverage/coverage_clean.cmake diff --git a/cmake/coverage/coverage_merge.cmake b/cmake/developer_package/coverage/coverage_merge.cmake similarity index 100% rename from cmake/coverage/coverage_merge.cmake rename to cmake/developer_package/coverage/coverage_merge.cmake diff --git a/cmake/cpplint/cpplint.cmake b/cmake/developer_package/cpplint/cpplint.cmake similarity index 52% rename from cmake/cpplint/cpplint.cmake rename to cmake/developer_package/cpplint/cpplint.cmake index 23e022d6a514ad..ccd97f8df8c8bd 100644 --- a/cmake/cpplint/cpplint.cmake +++ b/cmake/developer_package/cpplint/cpplint.cmake @@ -68,17 +68,17 @@ function(add_cpplint_target TARGET_NAME) "${output_file}" COMMAND "${CMAKE_COMMAND}" - -D "CPPLINT_SCRIPT=${OpenVINO_MAIN_SOURCE_DIR}/cmake/cpplint/cpplint.py" + -D "CPPLINT_SCRIPT=${IEDevScripts_DIR}/cpplint/cpplint.py" -D "INPUT_FILE=${source_file}" -D "OUTPUT_FILE=${output_file}" -D "WORKING_DIRECTORY=${CMAKE_CURRENT_SOURCE_DIR}" -D "SKIP_RETURN_CODE=${ENABLE_CPPLINT_REPORT}" -D "CUSTOM_FILTER=${custom_filter}" - -P "${OpenVINO_MAIN_SOURCE_DIR}/cmake/cpplint/cpplint_run.cmake" + -P "${IEDevScripts_DIR}/cpplint/cpplint_run.cmake" DEPENDS "${source_file}" - "${OpenVINO_MAIN_SOURCE_DIR}/cmake/cpplint/cpplint.py" - "${OpenVINO_MAIN_SOURCE_DIR}/cmake/cpplint/cpplint_run.cmake" + "${IEDevScripts_DIR}/cpplint/cpplint.py" + "${IEDevScripts_DIR}/cpplint/cpplint_run.cmake" COMMENT "[cpplint] ${source_file}" VERBATIM) @@ -104,71 +104,3 @@ function(add_cpplint_target TARGET_NAME) add_dependencies(cpplint_all ${TARGET_NAME}) endfunction() - -function(add_cpplint_report_target) - if(NOT ENABLE_CPPLINT OR NOT ENABLE_CPPLINT_REPORT) - return() - endif() - - set(cpplint_output_file "${CMAKE_BINARY_DIR}/cpplint/final_output.cpplint") - add_custom_command( - OUTPUT - "${cpplint_output_file}" - COMMAND - "${CMAKE_COMMAND}" - -D "FINAL_OUTPUT_FILE=${cpplint_output_file}" - -D "OUTPUT_FILES=${CPPLINT_ALL_OUTPUT_FILES}" - -P "${OpenVINO_MAIN_SOURCE_DIR}/cmake/cpplint/cpplint_merge.cmake" - DEPENDS - ${CPPLINT_ALL_OUTPUT_FILES} - "${OpenVINO_MAIN_SOURCE_DIR}/cmake/cpplint/cpplint_merge.cmake" - COMMENT - "[cpplint] Merge all output files" - VERBATIM) - - set(cppcheck_output_file "${CMAKE_BINARY_DIR}/cpplint/cpplint-cppcheck-result.xml") - add_custom_command( - OUTPUT - "${cppcheck_output_file}" - COMMAND - "${CMAKE_COMMAND}" - -D "PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" - -D "CONVERT_SCRIPT=${OpenVINO_MAIN_SOURCE_DIR}/scripts/cpplint_to_cppcheckxml.py" - -D "INPUT_FILE=${cpplint_output_file}" - -D "OUTPUT_FILE=${cppcheck_output_file}" - -P "${OpenVINO_MAIN_SOURCE_DIR}/cmake/cpplint/cpplint_to_cppcheck_xml.cmake" - DEPENDS - "${cpplint_output_file}" - "${OpenVINO_MAIN_SOURCE_DIR}/scripts/cpplint_to_cppcheckxml.py" - "${OpenVINO_MAIN_SOURCE_DIR}/cmake/cpplint/cpplint_to_cppcheck_xml.cmake" - COMMENT - "[cpplint] Convert to cppcheck XML format" - VERBATIM) - - set(report_dir "${OpenVINO_MAIN_SOURCE_DIR}/report/cpplint") - set(html_output_file "${report_dir}/index.html") - add_custom_command( - OUTPUT - "${html_output_file}" - COMMAND - "${CMAKE_COMMAND}" - -D "PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}" - -D "CONVERT_SCRIPT=${OpenVINO_MAIN_SOURCE_DIR}/scripts/cppcheck-htmlreport.py" - -D "INPUT_FILE=${cppcheck_output_file}" - -D "REPORT_DIR=${report_dir}" - -D "SOURCE_DIR=${OpenVINO_MAIN_SOURCE_DIR}" - -D "TITLE=${CMAKE_PROJECT_NAME}" - -P "${OpenVINO_MAIN_SOURCE_DIR}/cmake/cpplint/cpplint_html.cmake" - DEPENDS - "${cppcheck_output_file}" - "${OpenVINO_MAIN_SOURCE_DIR}/scripts/cppcheck-htmlreport.py" - "${OpenVINO_MAIN_SOURCE_DIR}/cmake/cpplint/cpplint_html.cmake" - COMMENT - "[cpplint] Generate HTML report" - VERBATIM) - - add_custom_target(cpplint_report - DEPENDS "${html_output_file}" - COMMENT "[cpplint] Generate report") - set_target_properties(cpplint_report PROPERTIES FOLDER cpplint) -endfunction() diff --git a/cmake/cpplint/cpplint.py b/cmake/developer_package/cpplint/cpplint.py similarity index 100% rename from cmake/cpplint/cpplint.py rename to cmake/developer_package/cpplint/cpplint.py diff --git a/cmake/cpplint/cpplint_html.cmake b/cmake/developer_package/cpplint/cpplint_html.cmake similarity index 100% rename from cmake/cpplint/cpplint_html.cmake rename to cmake/developer_package/cpplint/cpplint_html.cmake diff --git a/cmake/cpplint/cpplint_merge.cmake b/cmake/developer_package/cpplint/cpplint_merge.cmake similarity index 100% rename from cmake/cpplint/cpplint_merge.cmake rename to cmake/developer_package/cpplint/cpplint_merge.cmake diff --git a/cmake/cpplint/cpplint_run.cmake b/cmake/developer_package/cpplint/cpplint_run.cmake similarity index 100% rename from cmake/cpplint/cpplint_run.cmake rename to cmake/developer_package/cpplint/cpplint_run.cmake diff --git a/cmake/cpplint/cpplint_to_cppcheck_xml.cmake b/cmake/developer_package/cpplint/cpplint_to_cppcheck_xml.cmake similarity index 100% rename from cmake/cpplint/cpplint_to_cppcheck_xml.cmake rename to cmake/developer_package/cpplint/cpplint_to_cppcheck_xml.cmake diff --git a/cmake/cross_compile/cross_compiled_disp_gen.cmake b/cmake/developer_package/cross_compile/cross_compiled_disp_gen.cmake similarity index 100% rename from cmake/cross_compile/cross_compiled_disp_gen.cmake rename to cmake/developer_package/cross_compile/cross_compiled_disp_gen.cmake diff --git a/cmake/cross_compile/cross_compiled_disp_gen_options.in b/cmake/developer_package/cross_compile/cross_compiled_disp_gen_options.in similarity index 100% rename from cmake/cross_compile/cross_compiled_disp_gen_options.in rename to cmake/developer_package/cross_compile/cross_compiled_disp_gen_options.in diff --git a/cmake/cross_compile/cross_compiled_func.cmake b/cmake/developer_package/cross_compile/cross_compiled_func.cmake similarity index 100% rename from cmake/cross_compile/cross_compiled_func.cmake rename to cmake/developer_package/cross_compile/cross_compiled_func.cmake diff --git a/cmake/debug.cmake b/cmake/developer_package/debug.cmake similarity index 100% rename from cmake/debug.cmake rename to cmake/developer_package/debug.cmake diff --git a/cmake/download/dependency_solver.cmake b/cmake/developer_package/download/dependency_solver.cmake similarity index 99% rename from cmake/download/dependency_solver.cmake rename to cmake/developer_package/download/dependency_solver.cmake index a089fd80b626bd..3d181a45b21a29 100644 --- a/cmake/download/dependency_solver.cmake +++ b/cmake/developer_package/download/dependency_solver.cmake @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 # -include ("download") +include (download/download) function (resolve_archive_dependency VAR COMPONENT ARCHIVE ARCHIVE_UNIFIED ARCHIVE_WIN ARCHIVE_LIN ARCHIVE_MAC ARCHIVE_ANDROID TARGET_PATH FOLDER ENVIRONMENT SHA256) if (ENVIRONMENT AND (DEFINED ${ENVIRONMENT} OR DEFINED ENV{${ENVIRONMENT}})) diff --git a/cmake/download/download.cmake b/cmake/developer_package/download/download.cmake similarity index 87% rename from cmake/download/download.cmake rename to cmake/developer_package/download/download.cmake index 80d3d24f05b571..566109cb6fa93e 100644 --- a/cmake/download/download.cmake +++ b/cmake/developer_package/download/download.cmake @@ -21,5 +21,5 @@ function (Download from to fatal result output sha256) endfunction(Download) -include ("download_and_apply") -include ("download_and_extract") +include(download/download_and_apply) +include(download/download_and_extract) diff --git a/cmake/download/download_and_apply.cmake b/cmake/developer_package/download/download_and_apply.cmake similarity index 100% rename from cmake/download/download_and_apply.cmake rename to cmake/developer_package/download/download_and_apply.cmake diff --git a/cmake/download/download_and_check.cmake b/cmake/developer_package/download/download_and_check.cmake similarity index 100% rename from cmake/download/download_and_check.cmake rename to cmake/developer_package/download/download_and_check.cmake diff --git a/cmake/download/download_and_extract.cmake b/cmake/developer_package/download/download_and_extract.cmake similarity index 99% rename from cmake/download/download_and_extract.cmake rename to cmake/developer_package/download/download_and_extract.cmake index cd51c9b263d01b..cf4da01b743fa2 100644 --- a/cmake/download/download_and_extract.cmake +++ b/cmake/developer_package/download/download_and_extract.cmake @@ -2,8 +2,8 @@ # SPDX-License-Identifier: Apache-2.0 # -include ("extract") -include ("download_and_check") +include(download/extract) +include(download/download_and_check) function (GetNameAndUrlToDownload name url archive_name_unified archive_name_win archive_name_lin archive_name_mac archive_name_android) if (archive_name_unified) diff --git a/cmake/download/extract.cmake b/cmake/developer_package/download/extract.cmake similarity index 100% rename from cmake/download/extract.cmake rename to cmake/developer_package/download/extract.cmake diff --git a/cmake/faster_build.cmake b/cmake/developer_package/faster_build.cmake similarity index 100% rename from cmake/faster_build.cmake rename to cmake/developer_package/faster_build.cmake diff --git a/cmake/developer_package/features.cmake b/cmake/developer_package/features.cmake new file mode 100644 index 00000000000000..a5400b33c00d2a --- /dev/null +++ b/cmake/developer_package/features.cmake @@ -0,0 +1,74 @@ +# Copyright (C) 2018-2020 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 +# + +include(options) +include(target_flags) + +# FIXME: there are compiler failures with LTO and Cross-Compile toolchains. Disabling for now, but +# this must be addressed in a proper way +ie_dependent_option (ENABLE_LTO "Enable Link Time Optimization" OFF "LINUX;NOT CMAKE_CROSSCOMPILING; CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9" OFF) + +ie_option (OS_FOLDER "create OS dedicated folder in output" OFF) + +# FIXME: ARM cross-compiler generates several "false positive" warnings regarding __builtin_memcpy buffer overflow +ie_dependent_option (TREAT_WARNING_AS_ERROR "Treat build warnings as errors" ON "X86 OR X86_64" OFF) + +ie_option (ENABLE_INTEGRITYCHECK "build DLLs with /INTEGRITYCHECK flag" OFF) + +ie_option (ENABLE_SANITIZER "enable checking memory errors via AddressSanitizer" OFF) + +ie_option (ENABLE_THREAD_SANITIZER "enable checking data races via ThreadSanitizer" OFF) + +ie_dependent_option (COVERAGE "enable code coverage" OFF "CMAKE_CXX_COMPILER_ID STREQUAL GNU" OFF) + +# Defines CPU capabilities + +ie_dependent_option (ENABLE_SSE42 "Enable SSE4.2 optimizations" ON "X86_64 OR X86" OFF) + +ie_dependent_option (ENABLE_AVX2 "Enable AVX2 optimizations" ON "X86_64 OR X86" OFF) + +ie_dependent_option (ENABLE_AVX512F "Enable AVX512 optimizations" ON "X86_64 OR X86" OFF) + +# Type of build, we add this as an explicit option to default it to ON +# FIXME: Ah this moment setting this to OFF will only build ngraph a static library +ie_option (BUILD_SHARED_LIBS "Build as a shared library" ON) + +ie_dependent_option (ENABLE_FASTER_BUILD "Enable build features (PCH, UNITY) to speed up build time" OFF "CMAKE_VERSION VERSION_GREATER_EQUAL 3.16" OFF) + +ie_dependent_option (ENABLE_CPPLINT "Enable cpplint checks during the build" ON "UNIX;NOT ANDROID" OFF) + +ie_dependent_option (ENABLE_CPPLINT_REPORT "Build cpplint report instead of failing the build" OFF "ENABLE_CPPLINT" OFF) + +ie_option (ENABLE_CLANG_FORMAT "Enable clang-format checks during the build" ON) + +ie_option (VERBOSE_BUILD "shows extra information about build" OFF) + +ie_option (ENABLE_UNSAFE_LOCATIONS "skip check for MD5 for dependency" OFF) + +ie_option (ENABLE_ALTERNATIVE_TEMP "in case of dependency conflict, to avoid modification in master, use local copy of dependency" ON) + +# +# Check features +# + +if(ENABLE_AVX512F) + if ((CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") AND (MSVC_VERSION VERSION_LESS 1920)) + # 1920 version of MSVC 2019. In MSVC 2017 AVX512F not work + set(ENABLE_AVX512F OFF CACHE BOOL "" FORCE) + endif() + if ((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6)) + set(ENABLE_AVX512F OFF CACHE BOOL "" FORCE) + endif() + if ((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10)) + # TBD: clarify which AppleClang version supports avx512 + set(ENABLE_AVX512F OFF CACHE BOOL "" FORCE) + endif() + if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)) + set(ENABLE_AVX512F OFF CACHE BOOL "" FORCE) + endif() +endif() + +if (VERBOSE_BUILD) + set(CMAKE_VERBOSE_MAKEFILE ON CACHE BOOL "" FORCE) +endif() diff --git a/cmake/fuzzing.cmake b/cmake/developer_package/fuzzing.cmake similarity index 89% rename from cmake/fuzzing.cmake rename to cmake/developer_package/fuzzing.cmake index 4e62429f9a604a..50ca1c1b6ae478 100644 --- a/cmake/fuzzing.cmake +++ b/cmake/developer_package/fuzzing.cmake @@ -15,7 +15,8 @@ function(enable_fuzzing) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${FUZZING_COMPILER_FLAGS}" PARENT_SCOPE) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FUZZING_COMPILER_FLAGS}" PARENT_SCOPE) - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${FUZZING_LINKER_FLAGS}" PARENT_SCOPE) + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${FUZZING_LINKER_FLAGS}" PARENT_SCOPE) + set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${FUZZING_LINKER_FLAGS}" PARENT_SCOPE) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${FUZZING_LINKER_FLAGS}") endif() endfunction(enable_fuzzing) diff --git a/inference-engine/cmake/linux_name.cmake b/cmake/developer_package/linux_name.cmake similarity index 93% rename from inference-engine/cmake/linux_name.cmake rename to cmake/developer_package/linux_name.cmake index e87a61ba1dd53b..28afd53746a454 100644 --- a/inference-engine/cmake/linux_name.cmake +++ b/cmake/developer_package/linux_name.cmake @@ -2,6 +2,8 @@ # SPDX-License-Identifier: Apache-2.0 # +include(target_flags) + if (LINUX) function(get_linux_name res_var) if (NOT EXISTS "/etc/lsb-release") @@ -11,7 +13,7 @@ if (LINUX) set(name_regex "NAME=\"([^ \"\n]*).*\"\n") set(version_regex "VERSION=\"([0-9]+(\\.[0-9]+)?)[^\n]*\"") else () - #linux version detection using cat /etc/lsb-release + # linux version detection using cat /etc/lsb-release file(READ "/etc/lsb-release" release_data) set(name_regex "DISTRIB_ID=([^ \n]*)\n") set(version_regex "DISTRIB_RELEASE=([0-9]+(\\.[0-9]+)?)") @@ -28,6 +30,5 @@ if (LINUX) else () set(${res_var} NOTFOUND PARENT_SCOPE) endif () - endfunction() endif () diff --git a/inference-engine/cmake/models.cmake b/cmake/developer_package/models.cmake similarity index 100% rename from inference-engine/cmake/models.cmake rename to cmake/developer_package/models.cmake diff --git a/cmake/options.cmake b/cmake/developer_package/options.cmake similarity index 92% rename from cmake/options.cmake rename to cmake/developer_package/options.cmake index b4bb86b1d6e23f..cedbd099962029 100644 --- a/cmake/options.cmake +++ b/cmake/developer_package/options.cmake @@ -4,7 +4,6 @@ # Usage: ie_option( "description" [IF ]) include (CMakeDependentOption) -include (version) macro (ie_option variable description value) option(${variable} "${description}" ${value}) @@ -32,6 +31,10 @@ macro (ie_option_enum variable description value) endmacro() function (print_enabled_features) + if(NOT COMMAND set_ci_build_number) + message(FATAL_ERROR "CI_BUILD_NUMBER is not set yet") + endif() + message(STATUS "Inference Engine enabled features: ") message(STATUS "") message(STATUS " CI_BUILD_NUMBER: ${CI_BUILD_NUMBER}") diff --git a/cmake/developer_package/packaging.cmake b/cmake/developer_package/packaging.cmake new file mode 100644 index 00000000000000..b846bf732dcb1a --- /dev/null +++ b/cmake/developer_package/packaging.cmake @@ -0,0 +1,58 @@ +# Copyright (C) 2018-2020 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +include(CPackComponent) +unset(IE_CPACK_COMPONENTS_ALL CACHE) + +set(IE_CPACK_IE_DIR deployment_tools/inference_engine) + +# +# ie_cpack_set_library_dir() +# +# Set library directory for cpack +# +function(ie_cpack_set_library_dir) + if(WIN32) + set(IE_CPACK_LIBRARY_PATH ${IE_CPACK_IE_DIR}/lib/${ARCH_FOLDER}/${CMAKE_BUILD_TYPE} PARENT_SCOPE) + set(IE_CPACK_RUNTIME_PATH ${IE_CPACK_IE_DIR}/bin/${ARCH_FOLDER}/${CMAKE_BUILD_TYPE} PARENT_SCOPE) + set(IE_CPACK_ARCHIVE_PATH ${IE_CPACK_IE_DIR}/lib/${ARCH_FOLDER}/${CMAKE_BUILD_TYPE} PARENT_SCOPE) + else() + set(IE_CPACK_LIBRARY_PATH ${IE_CPACK_IE_DIR}/lib/${ARCH_FOLDER} PARENT_SCOPE) + set(IE_CPACK_RUNTIME_PATH ${IE_CPACK_IE_DIR}/lib/${ARCH_FOLDER} PARENT_SCOPE) + set(IE_CPACK_ARCHIVE_PATH ${IE_CPACK_IE_DIR}/lib/${ARCH_FOLDER} PARENT_SCOPE) + endif() +endfunction() + +ie_cpack_set_library_dir() + +# +# ie_cpack_add_component(NAME ...) +# +# Wraps original `cpack_add_component` and adds component to internal IE list +# +macro(ie_cpack_add_component NAME) + list(APPEND IE_CPACK_COMPONENTS_ALL ${NAME}) + set(IE_CPACK_COMPONENTS_ALL "${IE_CPACK_COMPONENTS_ALL}" CACHE STRING "" FORCE) + cpack_add_component(${NAME} ${ARGN}) +endmacro() + +macro(ie_cpack) + set(CPACK_GENERATOR "TGZ") + string(REPLACE "/" "_" CPACK_PACKAGE_VERSION "${CI_BUILD_NUMBER}") + if(WIN32) + set(CPACK_PACKAGE_NAME inference-engine_${CMAKE_BUILD_TYPE}) + else() + set(CPACK_PACKAGE_NAME inference-engine) + endif() + set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF) + set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) + set(CPACK_PACKAGE_VENDOR "Intel") + set(CPACK_COMPONENTS_ALL ${ARGN}) + set(CPACK_STRIP_FILES ON) + + if(OS_FOLDER) + set(CPACK_SYSTEM_NAME "${OS_FOLDER}") + endif() + + include(CPack) +endmacro() diff --git a/inference-engine/cmake/plugins/create_plugin_file.cmake b/cmake/developer_package/plugins/create_plugin_file.cmake similarity index 100% rename from inference-engine/cmake/plugins/create_plugin_file.cmake rename to cmake/developer_package/plugins/create_plugin_file.cmake diff --git a/inference-engine/cmake/plugins/plugins.cmake b/cmake/developer_package/plugins/plugins.cmake similarity index 96% rename from inference-engine/cmake/plugins/plugins.cmake rename to cmake/developer_package/plugins/plugins.cmake index 683f02ff0a8fe4..0a59797475f7e4 100644 --- a/inference-engine/cmake/plugins/plugins.cmake +++ b/cmake/developer_package/plugins/plugins.cmake @@ -135,7 +135,7 @@ macro(ie_register_plugins) -D "IE_CONFIG_OUTPUT_FILE=${config_output_file}" -D "IE_PLUGIN_NAME=${plugin}" -D "IE_CONFIGS_DIR=${CMAKE_BINARY_DIR}/plugins" - -P "${IE_MAIN_SOURCE_DIR}/cmake/plugins/unregister_plugin_cmake.cmake" + -P "${IEDevScripts_DIR}/plugins/unregister_plugin_cmake.cmake" COMMENT "Remove ${plugin} from the plugins.xml file" VERBATIM) @@ -160,7 +160,7 @@ macro(ie_register_plugins) -D "IE_CONFIG_OUTPUT_FILE=${config_file_name}" -D "IE_DEVICE_NAME=${device_name}" -D "IE_PLUGIN_LIBRARY_NAME=${library_name}" - -P "${IE_MAIN_SOURCE_DIR}/cmake/plugins/create_plugin_file.cmake" + -P "${IEDevScripts_DIR}/plugins/create_plugin_file.cmake" COMMENT "Register ${name} plugin" VERBATIM) @@ -173,7 +173,7 @@ macro(ie_register_plugins) -D "CMAKE_SHARED_LIBRARY_PREFIX=${CMAKE_SHARED_LIBRARY_PREFIX}" -D "IE_CONFIG_OUTPUT_FILE=${config_output_file}" -D "IE_CONFIGS_DIR=${CMAKE_BINARY_DIR}/plugins" - -P "${IE_MAIN_SOURCE_DIR}/cmake/plugins/register_plugin_cmake.cmake" + -P "${IEDevScripts_DIR}/plugins/register_plugin_cmake.cmake" COMMENT "Registering plugins to plugins.xml config file" VERBATIM) diff --git a/inference-engine/cmake/plugins/register_plugin_cmake.cmake b/cmake/developer_package/plugins/register_plugin_cmake.cmake similarity index 100% rename from inference-engine/cmake/plugins/register_plugin_cmake.cmake rename to cmake/developer_package/plugins/register_plugin_cmake.cmake diff --git a/inference-engine/cmake/plugins/unregister_plugin_cmake.cmake b/cmake/developer_package/plugins/unregister_plugin_cmake.cmake similarity index 100% rename from inference-engine/cmake/plugins/unregister_plugin_cmake.cmake rename to cmake/developer_package/plugins/unregister_plugin_cmake.cmake diff --git a/cmake/shellcheck/shellcheck.cmake b/cmake/developer_package/shellcheck/shellcheck.cmake similarity index 94% rename from cmake/shellcheck/shellcheck.cmake rename to cmake/developer_package/shellcheck/shellcheck.cmake index c2e1186d1b122b..df7a310792ba37 100644 --- a/cmake/shellcheck/shellcheck.cmake +++ b/cmake/developer_package/shellcheck/shellcheck.cmake @@ -14,7 +14,7 @@ function(ie_shellcheck_process) cmake_parse_arguments(IE_SHELLCHECK "" "DIRECTORY" "SKIP" ${ARGN}) - set(IE_SHELLCHECK_SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/cmake/shellcheck/shellcheck_process.cmake") + set(IE_SHELLCHECK_SCRIPT "${IEDevScripts_DIR}/shellcheck/shellcheck_process.cmake") file(GLOB_RECURSE scripts "${IE_SHELLCHECK_DIRECTORY}/*.sh") foreach(script IN LISTS scripts) # check if we need to skip scripts diff --git a/cmake/shellcheck/shellcheck_process.cmake b/cmake/developer_package/shellcheck/shellcheck_process.cmake similarity index 100% rename from cmake/shellcheck/shellcheck_process.cmake rename to cmake/developer_package/shellcheck/shellcheck_process.cmake diff --git a/cmake/target_flags.cmake b/cmake/developer_package/target_flags.cmake similarity index 100% rename from cmake/target_flags.cmake rename to cmake/developer_package/target_flags.cmake diff --git a/inference-engine/cmake/tbb/lnx/TBBConfig.cmake b/cmake/developer_package/tbb/lnx/TBBConfig.cmake similarity index 100% rename from inference-engine/cmake/tbb/lnx/TBBConfig.cmake rename to cmake/developer_package/tbb/lnx/TBBConfig.cmake diff --git a/inference-engine/cmake/tbb/mac/TBBConfig.cmake b/cmake/developer_package/tbb/mac/TBBConfig.cmake similarity index 100% rename from inference-engine/cmake/tbb/mac/TBBConfig.cmake rename to cmake/developer_package/tbb/mac/TBBConfig.cmake diff --git a/inference-engine/cmake/tbb/win/TBBConfig.cmake b/cmake/developer_package/tbb/win/TBBConfig.cmake similarity index 100% rename from inference-engine/cmake/tbb/win/TBBConfig.cmake rename to cmake/developer_package/tbb/win/TBBConfig.cmake diff --git a/cmake/version.cmake b/cmake/developer_package/version.cmake similarity index 80% rename from cmake/version.cmake rename to cmake/developer_package/version.cmake index db0fe2bb79da7e..9dd1ecbc923780 100644 --- a/cmake/version.cmake +++ b/cmake/developer_package/version.cmake @@ -3,18 +3,24 @@ # function (branchName VAR) + if(NOT DEFINED repo_root) + message(FATAL_ERROR "repo_root is not defined") + endif() execute_process( COMMAND git rev-parse --abbrev-ref HEAD - WORKING_DIRECTORY ${OpenVINO_MAIN_SOURCE_DIR} + WORKING_DIRECTORY ${repo_root} OUTPUT_VARIABLE GIT_BRANCH OUTPUT_STRIP_TRAILING_WHITESPACE) set (${VAR} ${GIT_BRANCH} PARENT_SCOPE) endfunction() function (commitHash VAR) + if(NOT DEFINED repo_root) + message(FATAL_ERROR "repo_root is not defined") + endif() execute_process( COMMAND git rev-parse HEAD - WORKING_DIRECTORY ${OpenVINO_MAIN_SOURCE_DIR} + WORKING_DIRECTORY ${repo_root} OUTPUT_VARIABLE GIT_COMMIT_HASH OUTPUT_STRIP_TRAILING_WHITESPACE) set (${VAR} ${GIT_COMMIT_HASH} PARENT_SCOPE) diff --git a/cmake/vs_version/vs_version.cmake b/cmake/developer_package/vs_version/vs_version.cmake similarity index 96% rename from cmake/vs_version/vs_version.cmake rename to cmake/developer_package/vs_version/vs_version.cmake index d857e2e4bcc4db..9972fdce1338d3 100644 --- a/cmake/vs_version/vs_version.cmake +++ b/cmake/developer_package/vs_version/vs_version.cmake @@ -80,7 +80,7 @@ function(ie_add_vs_version_file) set(IE_VS_VER_INTERNALNAME_STR ${VS_VER_NAME}) set(vs_version_output "${CMAKE_CURRENT_BINARY_DIR}/vs_version.rc") - configure_file("${OpenVINO_MAIN_SOURCE_DIR}/cmake/vs_version/vs_version.rc.in" "${vs_version_output}" @ONLY) + configure_file("${IEDevScripts_DIR}/vs_version/vs_version.rc.in" "${vs_version_output}" @ONLY) source_group("src" FILES ${vs_version_output}) target_sources(${VS_VER_NAME} PRIVATE ${vs_version_output}) diff --git a/cmake/vs_version/vs_version.rc.in b/cmake/developer_package/vs_version/vs_version.rc.in similarity index 100% rename from cmake/vs_version/vs_version.rc.in rename to cmake/developer_package/vs_version/vs_version.rc.in diff --git a/cmake/whole_archive.cmake b/cmake/developer_package/whole_archive.cmake similarity index 100% rename from cmake/whole_archive.cmake rename to cmake/developer_package/whole_archive.cmake diff --git a/cmake/features.cmake b/cmake/features.cmake index e0a8d7ee40f7f6..8c63bd77b72408 100644 --- a/cmake/features.cmake +++ b/cmake/features.cmake @@ -2,69 +2,31 @@ # SPDX-License-Identifier: Apache-2.0 # -include (target_flags) -include (options) - -# these options are aimed to optimize build time on development system - if(X86_64) set(ENABLE_MKL_DNN_DEFAULT ON) else() set(ENABLE_MKL_DNN_DEFAULT OFF) endif() -ie_option (ENABLE_TESTS "unit, behavior and functional tests" OFF) - ie_option (ENABLE_MKL_DNN "MKL-DNN plugin for inference engine" ${ENABLE_MKL_DNN_DEFAULT}) -ie_dependent_option (ENABLE_CLDNN "clDnn based plugin for inference engine" ON "X86_64;NOT APPLE;NOT MINGW;NOT WINDOWS_STORE;NOT WINDOWS_PHONE" OFF) - -# FIXME: there are compiler failures with LTO and Cross-Compile toolchains. Disabling for now, but -# this must be addressed in a proper way -ie_dependent_option (ENABLE_LTO "Enable Link Time Optimization" OFF "LINUX;NOT CMAKE_CROSSCOMPILING; CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9" OFF) - -ie_option (OS_FOLDER "create OS dedicated folder in output" OFF) - -# FIXME: ARM cross-compiler generates several "false positive" warnings regarding __builtin_memcpy buffer overflow -ie_dependent_option (TREAT_WARNING_AS_ERROR "Treat build warnings as errors" ON "X86 OR X86_64" OFF) - -ie_option (ENABLE_INTEGRITYCHECK "build DLLs with /INTEGRITYCHECK flag" OFF) - -ie_option (ENABLE_SANITIZER "enable checking memory errors via AddressSanitizer" OFF) - -ie_option (ENABLE_THREAD_SANITIZER "enable checking data races via ThreadSanitizer" OFF) - -ie_dependent_option (COVERAGE "enable code coverage" OFF "CMAKE_CXX_COMPILER_ID STREQUAL GNU" OFF) - -# Define CPU capabilities - -ie_dependent_option (ENABLE_SSE42 "Enable SSE4.2 optimizations" ON "X86_64 OR X86" OFF) - -ie_dependent_option (ENABLE_AVX2 "Enable AVX2 optimizations" ON "X86_64 OR X86" OFF) +ie_option (ENABLE_TESTS "unit, behavior and functional tests" OFF) -ie_dependent_option (ENABLE_AVX512F "Enable AVX512 optimizations" ON "X86_64 OR X86" OFF) +ie_dependent_option (ENABLE_CLDNN "clDnn based plugin for inference engine" ON "X86_64;NOT APPLE;NOT MINGW;NOT WINDOWS_STORE;NOT WINDOWS_PHONE" OFF) ie_option (ENABLE_PROFILING_ITT "Build with ITT tracing. Optionally configure pre-built ittnotify library though INTEL_VTUNE_DIR variable." OFF) ie_option (ENABLE_DOCS "Build docs using Doxygen" OFF) -ie_dependent_option (ENABLE_FASTER_BUILD "Enable build features (PCH, UNITY) to speed up build time" OFF "CMAKE_VERSION VERSION_GREATER_EQUAL 3.16" OFF) - -# Type of build, we add this as an explicit option to default it to ON -# FIXME: Ah this moment setting this to OFF will only build ngraph a static library -ie_option (BUILD_SHARED_LIBS "Build as a shared library" ON) - -ie_dependent_option(ENABLE_CPPLINT "Enable cpplint checks during the build" ON "UNIX;NOT ANDROID" OFF) - -ie_dependent_option(ENABLE_CPPLINT_REPORT "Build cpplint report instead of failing the build" OFF "ENABLE_CPPLINT" OFF) - ie_option(ENABLE_TEMPLATE_PLUGIN "Register template plugin into plugins.xml" OFF) -ie_option(ENABLE_CLANG_FORMAT "Enable clang-format checks during the build" ON) - ie_option_enum(SELECTIVE_BUILD "Enable OpenVINO conditional compilation or statistics collection. \ In case SELECTIVE_BUILD is enabled, the SELECTIVE_BUILD_STAT variable should contain the path to the collected InelSEAPI statistics. \ Usage: -DSELECTIVE_BUILD=ON -DSELECTIVE_BUILD_STAT=/path/*.csv" OFF ALLOWED_VALUES ON OFF COLLECT) -set(LINKCHECKER_PY "" CACHE FILEPATH "Path to linkchecker.py for documentation check") +# +# Process options +# + +print_enabled_features() diff --git a/cmake/onecoreuap.toolchain.cmake b/cmake/toolchains/onecoreuap.toolchain.cmake similarity index 100% rename from cmake/onecoreuap.toolchain.cmake rename to cmake/toolchains/onecoreuap.toolchain.cmake diff --git a/cmake/uwp.toolchain.cmake b/cmake/toolchains/uwp.toolchain.cmake similarity index 100% rename from cmake/uwp.toolchain.cmake rename to cmake/toolchains/uwp.toolchain.cmake diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index be94c8c9185b4a..0ac309e1c426ca 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -40,6 +40,7 @@ if(NOT ENABLE_DOCKER) endforeach() endif() +set(LINKCHECKER_PY "" CACHE FILEPATH "Path to linkchecker.py for documentation check") set(OMZ_DOCS_DIR "" CACHE PATH "Path to open_model_zoo documentation") set(WORKBENCH_DOCS_DIR "" CACHE PATH "Path to workbench documentation") set(POT_DOCS_DIR "" CACHE PATH "Path to post-training-compression-tool documentation") diff --git a/inference-engine/CMakeLists.txt b/inference-engine/CMakeLists.txt index e8b50063529944..3f44e176cf88e9 100644 --- a/inference-engine/CMakeLists.txt +++ b/inference-engine/CMakeLists.txt @@ -3,21 +3,10 @@ # project(InferenceEngine) -set(CMAKE_MODULE_PATH "${IE_MAIN_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) - -include(features_ie) - -# include developer package -include(developer_package_ie) - -# These options are shared with 3rdparty plugins by means of developer package -include(check_features_ie) +include(cmake/features.cmake) # resolving dependencies for the project -include(dependencies) - -# Fuzz tests also building without ENABLE_FUZZING -include(fuzzing) +include(cmake/dependencies.cmake) if (ENABLE_FUZZING) enable_fuzzing() @@ -25,38 +14,20 @@ endif() find_package(Threads REQUIRED) -unset(IEDeveloperPackageTargets CACHE) function(ie_developer_export_targets) - set(IEDeveloperPackageTargets "${IEDeveloperPackageTargets};${ARGV}") - - # to allow exporting of aliased targets with the original names - foreach(target_name ${IEDeveloperPackageTargets}) - if(TARGET "${target_name}") - get_target_property(original_name ${target_name} ALIASED_TARGET) - if(TARGET "${original_name}") - message(STATUS "The name ${target_name} is an ALIAS for ${original_name}. " - "It will be exported to the InferenceEngineDeveloperPackage with the original name.") - list(REMOVE_ITEM IEDeveloperPackageTargets ${target_name}) - list(APPEND IEDeveloperPackageTargets ${original_name}) - endif() - endif() - endforeach() - - list(REMOVE_DUPLICATES IEDeveloperPackageTargets) - set(IEDeveloperPackageTargets "${IEDeveloperPackageTargets}" CACHE INTERNAL - "Paths to extra Inference Engine plugins" FORCE) + openvino_developer_export_targets(COMPONENT inference_engine TARGETS ${ARGN}) endfunction() function(ie_developer_export) - export(TARGETS ${OpenVINODeveloperPackageTargets} NAMESPACE IE:: - APPEND FILE "${CMAKE_BINARY_DIR}/targets_developer.cmake") - - export(TARGETS ${IEDeveloperPackageTargets} NAMESPACE IE:: - APPEND FILE "${CMAKE_BINARY_DIR}/targets_developer.cmake") + set(all_dev_targets gflags inference_engine_ir_reader inference_engine_ir_v7_reader) + foreach(component IN LISTS openvino_export_components) + export(TARGETS ${${component}} NAMESPACE IE:: + APPEND FILE "${CMAKE_BINARY_DIR}/${component}_dev_targets.cmake") + list(APPEND all_dev_targets ${${component}}) + endforeach() # Custom target to build only Inference Engine Developer Package targets - add_custom_target(ie_dev_targets ALL DEPENDS ${OpenVINODeveloperPackageTargets} ${IEDeveloperPackageTargets} gflags - inference_engine_ir_reader inference_engine_ir_v7_reader) + add_custom_target(ie_dev_targets ALL DEPENDS ${all_dev_targets}) endfunction() add_subdirectory(thirdparty) @@ -81,7 +52,7 @@ function(ie_build_samples) MINGW64 CMAKE_BUILD_TYPE CMAKE_MACOSX_RPATH) unset(${var}) endforeach() - include(sanitizer) + include("${IEDevScripts_DIR}/compile_flags/sanitizer.cmake") add_subdirectory(samples) endfunction() @@ -95,8 +66,6 @@ endif() add_subdirectory(ie_bridges/c) -add_cpplint_report_target() - # # Install # @@ -169,23 +138,23 @@ endif() # Developer package # -ie_developer_export_targets(format_reader) -ie_developer_export_targets(${NGRAPH_LIBRARIES}) +openvino_developer_export_targets(COMPONENT openvino_common TARGETS format_reader) +openvino_developer_export_targets(COMPONENT ngraph TARGETS ${NGRAPH_LIBRARIES}) # for Template plugin if(NGRAPH_INTERPRETER_ENABLE) - ie_developer_export_targets(ngraph_backend interpreter_backend) + openvino_developer_export_targets(COMPONENT ngraph TARGETS ngraph_backend interpreter_backend) endif() ie_developer_export() configure_file( - "${IE_MAIN_SOURCE_DIR}/cmake/developer_package_config.cmake.in" + "${IE_MAIN_SOURCE_DIR}/cmake/templates/InferenceEngineDeveloperPackageConfig.cmake.in" "${CMAKE_BINARY_DIR}/InferenceEngineDeveloperPackageConfig.cmake" @ONLY) configure_file( - "${IE_MAIN_SOURCE_DIR}/cmake/share/InferenceEngineConfig-version.cmake.in" + "${IE_MAIN_SOURCE_DIR}/cmake/templates/InferenceEngineConfig-version.cmake.in" "${CMAKE_BINARY_DIR}/InferenceEngineDeveloperPackageConfig-version.cmake" COPYONLY) @@ -194,7 +163,7 @@ configure_file( # if(ENABLE_COVERAGE) - include(coverage_ie) + include(cmake/coverage.cmake) endif() # @@ -211,7 +180,7 @@ function(register_extra_modules) file(WRITE "${iedevconfig_file}" "\# !! AUTOGENERATED: DON'T EDIT !!\n\n") file(APPEND "${iedevconfig_file}" "ie_deprecated_no_errors()\n") - foreach(target IN LISTS OpenVINODeveloperPackageTargets IEDeveloperPackageTargets) + foreach(target IN LISTS ${openvino_export_components}) if(target) file(APPEND "${iedevconfig_file}" "add_library(IE::${target} ALIAS ${target})\n") endif() diff --git a/inference-engine/cmake/check_features_ie.cmake b/inference-engine/cmake/check_features_ie.cmake deleted file mode 100644 index 9eccd8518f534e..00000000000000 --- a/inference-engine/cmake/check_features_ie.cmake +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (C) 2018-2020 Intel Corporation -# SPDX-License-Identifier: Apache-2.0 -# - -#next section set defines to be accesible in c++/c code for certain feature -if (ENABLE_PROFILING_RAW) - add_definitions(-DENABLE_PROFILING_RAW=1) -endif() - -if (ENABLE_MYRIAD) - add_definitions(-DENABLE_MYRIAD=1) -endif() - -if (ENABLE_MYRIAD_NO_BOOT AND ENABLE_MYRIAD ) - add_definitions(-DENABLE_MYRIAD_NO_BOOT=1) -endif() - -if (ENABLE_CLDNN) - add_definitions(-DENABLE_CLDNN=1) -endif() - -if (ENABLE_MKL_DNN) - add_definitions(-DENABLE_MKL_DNN=1) -endif() - -if (ENABLE_GNA) - add_definitions(-DENABLE_GNA) - - if (UNIX AND NOT APPLE AND CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.4) - message(WARNING "${GNA_LIBRARY_VERSION} is not supported on GCC version ${CMAKE_CXX_COMPILER_VERSION}. Fallback to GNA1") - set(GNA_LIBRARY_VERSION GNA1) - endif() -endif() - -if (ENABLE_SPEECH_DEMO) - add_definitions(-DENABLE_SPEECH_DEMO) -endif() - -print_enabled_features() diff --git a/inference-engine/cmake/coverage_ie.cmake b/inference-engine/cmake/coverage.cmake similarity index 100% rename from inference-engine/cmake/coverage_ie.cmake rename to inference-engine/cmake/coverage.cmake diff --git a/inference-engine/cmake/dependencies.cmake b/inference-engine/cmake/dependencies.cmake index 86822bbbfd2946..988b158eaf3525 100644 --- a/inference-engine/cmake/dependencies.cmake +++ b/inference-engine/cmake/dependencies.cmake @@ -4,10 +4,7 @@ cmake_policy(SET CMP0054 NEW) -include(models) - -#we have number of dependencies stored on ftp -include(dependency_solver) +# we have number of dependencies stored on ftp if (CMAKE_CROSSCOMPILING) set(CMAKE_STAGING_PREFIX "${TEMP}") @@ -32,7 +29,6 @@ message(STATUS "MODELS_PATH=" ${MODELS_PATH}) fetch_models_and_validation_set() -include(linux_name) if(COMMAND get_linux_name) get_linux_name(LINUX_OS_NAME) endif() @@ -40,7 +36,7 @@ endif() include(CMakeParseArguments) if (ENABLE_MYRIAD) - include(vpu_dependencies) + include(cmake/vpu_dependencies.cmake) endif() ## enable cblas_gemm from OpenBLAS package @@ -286,9 +282,13 @@ if (ENABLE_OPENCV) log_rpath_from_dir(OPENCV "${OpenCV_DIR}/../lib") endif() debug_message(STATUS "opencv=" ${OPENCV}) +else() + reset_deps_cache(OpenCV_DIR) endif() -include(ie_parallel) +# TODO: remove global CMAKE_MODULE_PATH +list(APPEND CMAKE_MODULE_PATH "${IEDevScripts_DIR}") +include(cmake/ie_parallel.cmake) if (ENABLE_GNA) reset_deps_cache( @@ -363,18 +363,3 @@ if (ENABLE_SPEECH_DEMO) endif() update_deps_cache(SPEECH_LIBS_AND_DEMOS "${SPEECH_LIBS_AND_DEMOS}" "Path to SPEECH_LIBS_AND_DEMOS root folder") endif() - -configure_file( - "${IE_MAIN_SOURCE_DIR}/cmake/share/InferenceEngineConfig.cmake.in" - "${CMAKE_BINARY_DIR}/share/InferenceEngineConfig.cmake" - @ONLY) - -configure_file( - "${IE_MAIN_SOURCE_DIR}/cmake/share/InferenceEngineConfig-version.cmake.in" - "${CMAKE_BINARY_DIR}/share/InferenceEngineConfig-version.cmake" - COPYONLY) - -configure_file( - "${IE_MAIN_SOURCE_DIR}/cmake/ie_parallel.cmake" - "${CMAKE_BINARY_DIR}/share/ie_parallel.cmake" - COPYONLY) diff --git a/inference-engine/cmake/developer_package_ie.cmake b/inference-engine/cmake/developer_package_ie.cmake deleted file mode 100644 index 86e9b111774b3c..00000000000000 --- a/inference-engine/cmake/developer_package_ie.cmake +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (C) 2018-2020 Intel Corporation -# SPDX-License-Identifier: Apache-2.0 -# - -set(TBB_FIND_RELEASE_ONLY ${ENABLE_TBB_RELEASE_ONLY}) - -include(plugins/plugins) -include(add_ie_target) diff --git a/inference-engine/cmake/features_ie.cmake b/inference-engine/cmake/features.cmake similarity index 83% rename from inference-engine/cmake/features_ie.cmake rename to inference-engine/cmake/features.cmake index 1f65b910867f9f..1c8c26339c922a 100644 --- a/inference-engine/cmake/features_ie.cmake +++ b/inference-engine/cmake/features.cmake @@ -2,9 +2,6 @@ # SPDX-License-Identifier: Apache-2.0 # -include (target_flags) -include (options) - #these options are aimed to optimize build time on development system ie_dependent_option (ENABLE_GNA "GNA support for inference engine" ON "NOT APPLE;NOT ANDROID;X86 OR X86_64" OFF) @@ -86,12 +83,6 @@ ie_dependent_option (ENABLE_SPEECH_DEMO "enable speech demo integration" ON "NOT ie_option (ENABLE_FUZZING "instrument build for fuzzing" OFF) -ie_option (VERBOSE_BUILD "shows extra information about build" OFF) - -ie_option (ENABLE_UNSAFE_LOCATIONS "skip check for MD5 for dependency" OFF) - -ie_option (ENABLE_ALTERNATIVE_TEMP "in case of dependency conflict, to avoid modification in master, use local copy of dependency" ON) - ie_option (ENABLE_OPENCV "enables OpenCV" ON) ie_option (ENABLE_PYTHON "enables ie python bridge build" OFF) @@ -103,3 +94,42 @@ set(IE_EXTRA_MODULES "" CACHE STRING "Extra paths for extra modules to include i ie_dependent_option(ENABLE_TBB_RELEASE_ONLY "Only Release TBB libraries are linked to the Inference Engine binaries" ON "THREADING MATCHES TBB;LINUX" OFF) ie_option (USE_SYSTEM_PUGIXML "use the system copy of pugixml" OFF) + +# +# Process featues +# + +if (ENABLE_PROFILING_RAW) + add_definitions(-DENABLE_PROFILING_RAW=1) +endif() + +if (ENABLE_MYRIAD) + add_definitions(-DENABLE_MYRIAD=1) +endif() + +if (ENABLE_MYRIAD_NO_BOOT AND ENABLE_MYRIAD ) + add_definitions(-DENABLE_MYRIAD_NO_BOOT=1) +endif() + +if (ENABLE_CLDNN) + add_definitions(-DENABLE_CLDNN=1) +endif() + +if (ENABLE_MKL_DNN) + add_definitions(-DENABLE_MKL_DNN=1) +endif() + +if (ENABLE_GNA) + add_definitions(-DENABLE_GNA) + + if (UNIX AND NOT APPLE AND CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.4) + message(WARNING "${GNA_LIBRARY_VERSION} is not supported on GCC version ${CMAKE_CXX_COMPILER_VERSION}. Fallback to GNA1") + set(GNA_LIBRARY_VERSION GNA1) + endif() +endif() + +if (ENABLE_SPEECH_DEMO) + add_definitions(-DENABLE_SPEECH_DEMO) +endif() + +print_enabled_features() diff --git a/inference-engine/cmake/FindlibGNA.cmake b/inference-engine/cmake/libGNAConfig.cmake similarity index 100% rename from inference-engine/cmake/FindlibGNA.cmake rename to inference-engine/cmake/libGNAConfig.cmake diff --git a/inference-engine/cmake/config.cmake.in b/inference-engine/cmake/templates/InferenceEngineConfig-build.cmake.in similarity index 96% rename from inference-engine/cmake/config.cmake.in rename to inference-engine/cmake/templates/InferenceEngineConfig-build.cmake.in index fd015955e34e56..723d6f8cf85114 100644 --- a/inference-engine/cmake/config.cmake.in +++ b/inference-engine/cmake/templates/InferenceEngineConfig-build.cmake.in @@ -11,7 +11,7 @@ if(DEFINED IE_MAIN_SOURCE_DIR AND TARGET inference_engine) add_library(IE::inference_engine_c_api ALIAS inference_engine_c_api) endif() else() - include("${CMAKE_CURRENT_LIST_DIR}/targets.cmake") + include("${CMAKE_CURRENT_LIST_DIR}/inference_engine_targets.cmake") if(NOT MSVC) set_target_properties(IE::inference_engine PROPERTIES INTERFACE_COMPILE_OPTIONS "-Wno-error=deprecated-declarations") endif() diff --git a/inference-engine/cmake/share/InferenceEngineConfig-version.cmake.in b/inference-engine/cmake/templates/InferenceEngineConfig-version.cmake.in similarity index 100% rename from inference-engine/cmake/share/InferenceEngineConfig-version.cmake.in rename to inference-engine/cmake/templates/InferenceEngineConfig-version.cmake.in diff --git a/inference-engine/cmake/share/InferenceEngineConfig.cmake.in b/inference-engine/cmake/templates/InferenceEngineConfig.cmake.in similarity index 100% rename from inference-engine/cmake/share/InferenceEngineConfig.cmake.in rename to inference-engine/cmake/templates/InferenceEngineConfig.cmake.in diff --git a/inference-engine/cmake/developer_package_config.cmake.in b/inference-engine/cmake/templates/InferenceEngineDeveloperPackageConfig.cmake.in similarity index 59% rename from inference-engine/cmake/developer_package_config.cmake.in rename to inference-engine/cmake/templates/InferenceEngineDeveloperPackageConfig.cmake.in index 4f7bfbb317a3fb..4772b299d0a131 100644 --- a/inference-engine/cmake/developer_package_config.cmake.in +++ b/inference-engine/cmake/templates/InferenceEngineDeveloperPackageConfig.cmake.in @@ -2,14 +2,14 @@ # SPDX-License-Identifier: Apache-2.0 # -set(OpenVINO_MAIN_SOURCE_DIR "@OpenVINO_SOURCE_DIR@") -set(IE_MAIN_SOURCE_DIR "@InferenceEngine_SOURCE_DIR@") - -file(TO_CMAKE_PATH "${CMAKE_CURRENT_LIST_DIR}" cache_path) +# TODO: remove after changing [private plugins] +set(OpenVINO_MAIN_SOURCE_DIR "@OpenVINO_MAIN_SOURCE_DIR@") # KMB, HDDL +set(IE_MAIN_SOURCE_DIR "@IE_MAIN_SOURCE_DIR@") # KMB, HDDL # Variables to export in plugin's projects set(ie_options "@IE_OPTIONS@;CMAKE_BUILD_TYPE;CMAKE_SKIP_RPATH") +file(TO_CMAKE_PATH "${CMAKE_CURRENT_LIST_DIR}" cache_path) foreach(option IN LISTS ie_options) if(NOT DEFINED "${option}") @@ -25,15 +25,20 @@ endforeach() message("") set(gflags_DIR "@gflags_BINARY_DIR@") + # GNA lib dir set(GNA "@GNA@") # Targets -include("${CMAKE_CURRENT_LIST_DIR}/targets_developer.cmake") +if(USE_SYSTEM_PUGIXML) + find_package(PugiXML REQUIRED) + set_property(TARGET pugixml PROPERTY IMPORTED_GLOBAL TRUE) +endif() -# to allow too create ALIAS for IE::inference_engine in 3rd-party projects -set_property(TARGET IE::inference_engine PROPERTY IMPORTED_GLOBAL TRUE) +foreach(component @openvino_export_components@) + include("${CMAKE_CURRENT_LIST_DIR}/${component}_dev_targets.cmake") +endforeach() get_target_property(InferenceEngine_INCLUDE_DIRS IE::inference_engine INTERFACE_INCLUDE_DIRECTORIES) set(InferenceEngine_LIBRARIES IE::inference_engine) @@ -42,12 +47,17 @@ set(InferenceEngine_LIBRARIES IE::inference_engine) # Common cmake includes # -list(APPEND CMAKE_MODULE_PATH "${OpenVINO_MAIN_SOURCE_DIR}/cmake") -list(APPEND CMAKE_MODULE_PATH "${IE_MAIN_SOURCE_DIR}/cmake") +# TODO: remove after private plugin change +list(APPEND CMAKE_MODULE_PATH "@OpenVINO_MAIN_SOURCE_DIR@/cmake/developer_package" # KMB + "@OpenVINO_MAIN_SOURCE_DIR@/cmake/developer_package/download" # KMB, HDDL + "@IE_MAIN_SOURCE_DIR@/cmake") # HDDL + +# Inference Engine Developer Scripts package -# generic stuff from developer package -include(developer_package NO_POLICY_SCOPE) -include(developer_package_ie) +find_package(IEDevScripts REQUIRED + PATHS "@OpenVINO_MAIN_SOURCE_DIR@/cmake/developer_package" + NO_CMAKE_FIND_ROOT_PATH + NO_DEFAULT_PATH) # Don't threat deprecated API warnings as errors in 3rd party apps ie_deprecated_no_errors() diff --git a/inference-engine/cmake/vpu_dependencies.cmake b/inference-engine/cmake/vpu_dependencies.cmake index 39f0b630bf608c..ee718952dd9ab6 100644 --- a/inference-engine/cmake/vpu_dependencies.cmake +++ b/inference-engine/cmake/vpu_dependencies.cmake @@ -2,16 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 # -if(CMAKE_VERSION VERSION_GREATER 3.9.6) - include_guard(GLOBAL) -else() - if(__CURRENT_FILE_VAR__) - return() - endif() - set(__CURRENT_FILE_VAR__ TRUE) -endif() - -include(dependency_solver) +include_guard(GLOBAL) set(VPU_SUPPORTED_FIRMWARES usb-ma2x8x pcie-ma2x8x) set(VPU_SUPPORTED_FIRMWARES_HASH diff --git a/inference-engine/ie_bridges/c/src/CMakeLists.txt b/inference-engine/ie_bridges/c/src/CMakeLists.txt index 223b635a72dd43..586f3e216772a8 100644 --- a/inference-engine/ie_bridges/c/src/CMakeLists.txt +++ b/inference-engine/ie_bridges/c/src/CMakeLists.txt @@ -24,7 +24,8 @@ ie_add_vs_version_file(NAME ${TARGET_NAME} # export -export(TARGETS ${TARGET_NAME} NAMESPACE IE:: APPEND FILE "${CMAKE_BINARY_DIR}/targets.cmake") +export(TARGETS ${TARGET_NAME} NAMESPACE IE:: + APPEND FILE "${CMAKE_BINARY_DIR}/inference_engine_targets.cmake") # install diff --git a/inference-engine/ie_bridges/python/CMakeLists.txt b/inference-engine/ie_bridges/python/CMakeLists.txt index 8e70e5ac2941e4..c56af0abde0051 100644 --- a/inference-engine/ie_bridges/python/CMakeLists.txt +++ b/inference-engine/ie_bridges/python/CMakeLists.txt @@ -6,7 +6,6 @@ cmake_minimum_required (VERSION 3.13) # Set the project name project (ie_python_api) -set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}/cmake") option(ENABLE_CONDA_FOLDER "Create output folder with conda python bindings" OFF) @@ -30,7 +29,7 @@ if(UNIX) set(CMAKE_C_VISIBILITY_PRESET default) endif() -include (UseCython) +include (cmake/UseCython.cmake) if(PYTHONINTERP_FOUND) set(PYTHON_VERSION python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}) @@ -56,7 +55,7 @@ set (PYTHON_BRIDGE_SRC_ROOT ${CMAKE_CURRENT_SOURCE_DIR}) add_subdirectory (src/openvino/inference_engine) # Check Cython version -if("${CYTHON_VERSION}" VERSION_LESS "0.29") +if(CYTHON_VERSION VERSION_LESS "0.29") message(FATAL_ERROR "OpenVINO Python API needs at least Cython version 0.29, found version ${CYTHON_VERSION}") else() message(STATUS "Found Cython version ${CYTHON_VERSION}") diff --git a/inference-engine/ie_bridges/python/cmake/FindCython.cmake b/inference-engine/ie_bridges/python/cmake/CythonConfig.cmake similarity index 100% rename from inference-engine/ie_bridges/python/cmake/FindCython.cmake rename to inference-engine/ie_bridges/python/cmake/CythonConfig.cmake diff --git a/inference-engine/ie_bridges/python/cmake/UseCython.cmake b/inference-engine/ie_bridges/python/cmake/UseCython.cmake index 04dfaf6c034151..a71e38d136a07c 100644 --- a/inference-engine/ie_bridges/python/cmake/UseCython.cmake +++ b/inference-engine/ie_bridges/python/cmake/UseCython.cmake @@ -88,7 +88,10 @@ set( CYTHON_FLAGS "" CACHE STRING "Extra flags to the cython compiler." ) mark_as_advanced( CYTHON_ANNOTATE CYTHON_NO_DOCSTRINGS CYTHON_FLAGS ) -find_package( Cython REQUIRED ) +find_package( Cython REQUIRED + PATHS "${CMAKE_CURRENT_SOURCE_DIR}/cmake" + NO_CMAKE_FIND_ROOT_PATH + NO_DEFAULT_PATH ) find_package( PythonLibs REQUIRED ) set( CYTHON_CXX_EXTENSION "cxx" ) diff --git a/inference-engine/src/gna_plugin/CMakeLists.txt b/inference-engine/src/gna_plugin/CMakeLists.txt index 17f6201caaec90..49d96301b28c72 100644 --- a/inference-engine/src/gna_plugin/CMakeLists.txt +++ b/inference-engine/src/gna_plugin/CMakeLists.txt @@ -12,7 +12,9 @@ file(GLOB_RECURSE HEADERS addVersionDefines(gna_plugin_entry_points.cpp CI_BUILD_NUMBER) -find_package(libGNA) +find_package(libGNA REQUIRED + PATHS "${IE_MAIN_SOURCE_DIR}/cmake" + NO_DEFAULT_PATH) if(GNA_LIBRARY_VERSION STREQUAL "GNA2") set(GNA_LIBRARY_VERSION_NUMBER 2) diff --git a/inference-engine/src/inference_engine/CMakeLists.txt b/inference-engine/src/inference_engine/CMakeLists.txt index c877a7e86d806d..52b087dcdabb8c 100644 --- a/inference-engine/src/inference_engine/CMakeLists.txt +++ b/inference-engine/src/inference_engine/CMakeLists.txt @@ -174,8 +174,7 @@ if(WIN32) endif() target_link_libraries(${TARGET_NAME}_s PRIVATE openvino::itt openvino::conditional_compilation ${CMAKE_DL_LIBS} ${NGRAPH_LIBRARIES} - inference_engine_transformations - PUBLIC pugixml) + inference_engine_transformations pugixml) target_compile_definitions(${TARGET_NAME}_s PUBLIC USE_STATIC_IE) @@ -186,28 +185,41 @@ set_target_properties(${TARGET_NAME}_s PROPERTIES EXCLUDE_FROM_ALL ON) set_target_properties(${TARGET_NAME} ${TARGET_NAME}_obj ${TARGET_NAME}_s PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO}) -# export targets +# InferenceEngineConfig.cmake for install tree -export(TARGETS ${TARGET_NAME} NAMESPACE IE:: APPEND FILE "${CMAKE_BINARY_DIR}/targets.cmake") +configure_file("${IE_MAIN_SOURCE_DIR}/cmake/templates/InferenceEngineConfig.cmake.in" + "${CMAKE_BINARY_DIR}/share/InferenceEngineConfig.cmake" @ONLY) -configure_file( - "${IE_MAIN_SOURCE_DIR}/cmake/config.cmake.in" - "${CMAKE_BINARY_DIR}/InferenceEngineConfig.cmake" - COPYONLY) +configure_file("${IE_MAIN_SOURCE_DIR}/cmake/templates/InferenceEngineConfig-version.cmake.in" + "${CMAKE_BINARY_DIR}/share/InferenceEngineConfig-version.cmake" + COPYONLY) -configure_file( - "${IE_MAIN_SOURCE_DIR}/cmake/share/InferenceEngineConfig-version.cmake.in" - "${CMAKE_BINARY_DIR}/InferenceEngineConfig-version.cmake" - COPYONLY) +configure_file("${IE_MAIN_SOURCE_DIR}/cmake/ie_parallel.cmake" + "${CMAKE_BINARY_DIR}/share/ie_parallel.cmake" + COPYONLY) -# developer package +# Export Inference Engine targets + +export(TARGETS ${TARGET_NAME} NAMESPACE IE:: + APPEND FILE "${CMAKE_BINARY_DIR}/inference_engine_targets.cmake") + +configure_file("${IE_MAIN_SOURCE_DIR}/cmake/templates/InferenceEngineConfig-build.cmake.in" + "${CMAKE_BINARY_DIR}/InferenceEngineConfig.cmake" + COPYONLY) + +configure_file("${IE_MAIN_SOURCE_DIR}/cmake/templates/InferenceEngineConfig-version.cmake.in" + "${CMAKE_BINARY_DIR}/InferenceEngineConfig-version.cmake" + COPYONLY) + +# Export for developer package add_library(xbyak INTERFACE) target_include_directories(xbyak INTERFACE ${IE_MAIN_SOURCE_DIR}/thirdparty/mkl-dnn/src/cpu/xbyak) -ie_developer_export_targets(${TARGET_NAME} ${TARGET_NAME}_plugin_api xbyak) +openvino_developer_export_targets(COMPONENT openvino_common TARGETS xbyak) +ie_developer_export_targets(${TARGET_NAME} ${TARGET_NAME}_plugin_api) -# install +# install TBB list(APPEND core_components ngraph) @@ -235,6 +247,8 @@ if((THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO") AND TBBROOT MATCH COMPONENT tbb) endif() +# Install Inference Engine + ie_cpack_add_component(core REQUIRED DEPENDS ${core_components}) install(DIRECTORY "${IE_MAIN_SOURCE_DIR}/include" DESTINATION ${IE_CPACK_IE_DIR} diff --git a/inference-engine/src/legacy_api/CMakeLists.txt b/inference-engine/src/legacy_api/CMakeLists.txt index 0b40fd9e71d373..fb41567217acf3 100644 --- a/inference-engine/src/legacy_api/CMakeLists.txt +++ b/inference-engine/src/legacy_api/CMakeLists.txt @@ -75,10 +75,6 @@ ie_add_api_validator_post_build_step(TARGET ${TARGET_NAME}) set_target_properties(${TARGET_NAME} ${TARGET_NAME}_obj PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO}) -# export targets - -export(TARGETS ${TARGET_NAME} NAMESPACE IE:: APPEND FILE "${CMAKE_BINARY_DIR}/targets.cmake") - # developer package ie_developer_export_targets(${TARGET_NAME}) diff --git a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_split_node.cpp b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_split_node.cpp index bac3366f98dd19..671223e813ba03 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_split_node.cpp +++ b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_split_node.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #define THROW_ERROR THROW_IE_EXCEPTION << "Split layer with name '" << getName() <<"' " diff --git a/inference-engine/src/vpu/common/CMakeLists.txt b/inference-engine/src/vpu/common/CMakeLists.txt index 5b8267bbb87609..ad900610d16f74 100644 --- a/inference-engine/src/vpu/common/CMakeLists.txt +++ b/inference-engine/src/vpu/common/CMakeLists.txt @@ -49,7 +49,7 @@ function(add_common_target TARGET_NAME STATIC_IE) set_target_properties(${TARGET_NAME} PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO}) - ie_developer_export_targets(${TARGET_NAME}) + openvino_developer_export_targets(COMPONENT inference_engine_vpu TARGETS ${TARGET_NAME}) target_link_libraries(${TARGET_NAME} PUBLIC ${NGRAPH_LIBRARIES} inference_engine_transformations PRIVATE openvino::itt) diff --git a/inference-engine/src/vpu/graph_transformer/CMakeLists.txt b/inference-engine/src/vpu/graph_transformer/CMakeLists.txt index ec799a6ac54694..8bcdad0d6048dd 100644 --- a/inference-engine/src/vpu/graph_transformer/CMakeLists.txt +++ b/inference-engine/src/vpu/graph_transformer/CMakeLists.txt @@ -54,7 +54,7 @@ function(add_graph_transformer_target TARGET_NAME STATIC_IE) if(NOT STATIC_IE) add_cpplint_target(${TARGET_NAME}_cpplint FOR_TARGETS ${TARGET_NAME} CUSTOM_FILTERS "+runtime/explicit") - ie_developer_export_targets(${TARGET_NAME}) + openvino_developer_export_targets(COMPONENT inference_engine_vpu TARGETS ${TARGET_NAME}) endif() set_target_properties(${TARGET_NAME} PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO}) diff --git a/inference-engine/tests/CMakeLists.txt b/inference-engine/tests/CMakeLists.txt index 6b63763c2f45d7..132f4083351507 100644 --- a/inference-engine/tests/CMakeLists.txt +++ b/inference-engine/tests/CMakeLists.txt @@ -11,8 +11,5 @@ add_subdirectory(unit) if(ENABLE_FUNCTIONAL_TESTS) add_subdirectory(ie_test_utils) -endif() - -if (ENABLE_FUNCTIONAL_TESTS) add_subdirectory(functional) endif() \ No newline at end of file diff --git a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/core_threading_tests.cpp b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/core_threading_tests.cpp index 1a6bd93d8293ec..1adbd58045b832 100644 --- a/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/core_threading_tests.cpp +++ b/inference-engine/tests/functional/plugin/gna/shared_tests_instances/behavior/core_threading_tests.cpp @@ -16,7 +16,7 @@ std::vector< std::tuple > paramsWithIterations{ params[0], param INSTANTIATE_TEST_CASE_P(GNA, CoreThreadingTests, testing::ValuesIn(params), CoreThreadingTests::getTestCaseName); -INSTANTIATE_TEST_CASE_P(GNA, CoreThreadingTestsWithIterations, +INSTANTIATE_TEST_CASE_P(DISABLED_GNA, CoreThreadingTestsWithIterations, testing::Combine(testing::ValuesIn(paramsWithIterations), testing::Values(3), testing::Values(4), diff --git a/inference-engine/tests/functional/plugin/shared/CMakeLists.txt b/inference-engine/tests/functional/plugin/shared/CMakeLists.txt index d80bb2ba6e7eee..05fa0e4d2e32d6 100644 --- a/inference-engine/tests/functional/plugin/shared/CMakeLists.txt +++ b/inference-engine/tests/functional/plugin/shared/CMakeLists.txt @@ -22,6 +22,7 @@ addIeTarget( ${CMAKE_CURRENT_SOURCE_DIR}/src ADD_CPPLINT DEVELOPER_PACKAGE + inference_engine_tests INCLUDES PUBLIC ${PUBLIC_HEADERS_DIR} diff --git a/inference-engine/tests/functional/shared_test_classes/CMakeLists.txt b/inference-engine/tests/functional/shared_test_classes/CMakeLists.txt index b0a95b09709e18..092cb2b440827e 100644 --- a/inference-engine/tests/functional/shared_test_classes/CMakeLists.txt +++ b/inference-engine/tests/functional/shared_test_classes/CMakeLists.txt @@ -15,6 +15,7 @@ addIeTarget( ROOT "${CMAKE_CURRENT_SOURCE_DIR}/include" ADD_CPPLINT DEVELOPER_PACKAGE + inference_engine_tests INCLUDES PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" diff --git a/inference-engine/tests/ie_test_utils/common_test_utils/CMakeLists.txt b/inference-engine/tests/ie_test_utils/common_test_utils/CMakeLists.txt index 6dee3f11890b38..4b19b4190ed256 100644 --- a/inference-engine/tests/ie_test_utils/common_test_utils/CMakeLists.txt +++ b/inference-engine/tests/ie_test_utils/common_test_utils/CMakeLists.txt @@ -52,8 +52,6 @@ else () endif () list(APPEND EXPORT_DEPENDENCIES - ${PUGI} - ${NGRAPH_LIBRARIES} gtest gtest_main ) @@ -70,8 +68,13 @@ function(add_common_utils ADD_TARGET_NAME) ${CMAKE_CURRENT_SOURCE_DIR}/gtest ADD_CPPLINT DEVELOPER_PACKAGE + inference_engine_tests EXPORT_DEPENDENCIES ${EXPORT_DEPENDENCIES} + LINK_LIBRARIES + PUBLIC + ${PUGI} + ${NGRAPH_LIBRARIES} ) ie_faster_build(${ADD_TARGET_NAME} @@ -96,21 +99,21 @@ function(add_common_utils ADD_TARGET_NAME) endif () target_include_directories(${ADD_TARGET_NAME} - PUBLIC + PUBLIC ${IE_TESTS_ROOT}/ie_test_utils $ $ $ - PRIVATE + PRIVATE $ - ) + ) target_compile_definitions(${ADD_TARGET_NAME} PUBLIC ${ARGN}) target_link_libraries(${ADD_TARGET_NAME} - PUBLIC + PUBLIC ${EXPORT_DEPENDENCIES} - ) + ) endfunction() add_common_utils(${TARGET_NAME}) diff --git a/inference-engine/tests/ie_test_utils/functional_test_utils/CMakeLists.txt b/inference-engine/tests/ie_test_utils/functional_test_utils/CMakeLists.txt index 623648e691d29a..d7e8862c9b4190 100644 --- a/inference-engine/tests/ie_test_utils/functional_test_utils/CMakeLists.txt +++ b/inference-engine/tests/ie_test_utils/functional_test_utils/CMakeLists.txt @@ -5,10 +5,7 @@ set(TARGET_NAME funcTestUtils) list(APPEND EXPORT_DEPENDENCIES - inference_engine_lp_transformations commonTestUtils - inference_engine - inference_engine_legacy ) addIeTarget( @@ -17,6 +14,7 @@ addIeTarget( ROOT "${CMAKE_CURRENT_SOURCE_DIR}/include" ADD_CPPLINT DEVELOPER_PACKAGE + inference_engine_tests INCLUDES PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" @@ -26,6 +24,9 @@ addIeTarget( PUBLIC ${EXPORT_DEPENDENCIES} inference_engine_transformations + inference_engine_lp_transformations + inference_engine + inference_engine_legacy INCLUDES PUBLIC $ diff --git a/inference-engine/tests/ie_test_utils/unit_test_utils/CMakeLists.txt b/inference-engine/tests/ie_test_utils/unit_test_utils/CMakeLists.txt index 5413d1389522b1..ab956218aabd08 100644 --- a/inference-engine/tests/ie_test_utils/unit_test_utils/CMakeLists.txt +++ b/inference-engine/tests/ie_test_utils/unit_test_utils/CMakeLists.txt @@ -17,6 +17,7 @@ addIeTarget( ROOT ${CMAKE_CURRENT_SOURCE_DIR} ADD_CPPLINT DEVELOPER_PACKAGE + inference_engine_tests EXPORT_DEPENDENCIES ${EXPORT_DEPENDENCIES} ) diff --git a/inference-engine/tests/ngraph_helpers/lpt_ngraph_functions/CMakeLists.txt b/inference-engine/tests/ngraph_helpers/lpt_ngraph_functions/CMakeLists.txt index 32a0f871ff0854..9b9f82ae56ece3 100644 --- a/inference-engine/tests/ngraph_helpers/lpt_ngraph_functions/CMakeLists.txt +++ b/inference-engine/tests/ngraph_helpers/lpt_ngraph_functions/CMakeLists.txt @@ -6,8 +6,6 @@ set(TARGET_NAME lptNgraphFunctions) list(APPEND EXPORT_DEPENDENCIES ngraphFunctions - inference_engine_lp_transformations - inference_engine_legacy ) set(PUBLIC_HEADERS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include") @@ -24,10 +22,13 @@ addIeTarget( LINK_LIBRARIES PRIVATE ${EXPORT_DEPENDENCIES} + inference_engine_lp_transformations + inference_engine_legacy ADD_CPPLINT DEPENDENCIES ngraphFunctions DEVELOPER_PACKAGE + inference_engine_tests EXPORT_DEPENDENCIES ${EXPORT_DEPENDENCIES} ) diff --git a/inference-engine/tests/ngraph_helpers/ngraph_functions/CMakeLists.txt b/inference-engine/tests/ngraph_helpers/ngraph_functions/CMakeLists.txt index a7514816390cc4..260aaa213bfdd3 100644 --- a/inference-engine/tests/ngraph_helpers/ngraph_functions/CMakeLists.txt +++ b/inference-engine/tests/ngraph_helpers/ngraph_functions/CMakeLists.txt @@ -22,12 +22,13 @@ addIeTarget( ADDITIONAL_SOURCE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src LINK_LIBRARIES - PUBLIC - ${EXPORT_DEPENDENCIES} + PUBLIC + ${NGRAPH_LIBRARIES} + ngraph_backend + interpreter_backend ADD_CPPLINT DEVELOPER_PACKAGE - EXPORT_DEPENDENCIES - ${EXPORT_DEPENDENCIES} + inference_engine_tests ) ie_faster_build(${TARGET_NAME} diff --git a/inference-engine/tests_deprecated/behavior/shared_tests/CMakeLists.txt b/inference-engine/tests_deprecated/behavior/shared_tests/CMakeLists.txt index ac558570ef058a..d18283e4b25b06 100644 --- a/inference-engine/tests_deprecated/behavior/shared_tests/CMakeLists.txt +++ b/inference-engine/tests_deprecated/behavior/shared_tests/CMakeLists.txt @@ -33,4 +33,4 @@ target_include_directories(${TARGET_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/plugin_tests) # developer package -ie_developer_export_targets(${TARGET_NAME}) +openvino_developer_export_targets(COMPONENT inference_engine_tests TARGETS ${TARGET_NAME}) diff --git a/inference-engine/tests_deprecated/functional/ie_tests/CMakeLists.txt b/inference-engine/tests_deprecated/functional/ie_tests/CMakeLists.txt index 697411c550c9dc..c3ba343e659abb 100644 --- a/inference-engine/tests_deprecated/functional/ie_tests/CMakeLists.txt +++ b/inference-engine/tests_deprecated/functional/ie_tests/CMakeLists.txt @@ -32,4 +32,5 @@ target_link_libraries(${TARGET_NAME} PUBLIC # developer package -ie_developer_export_targets(${TARGET_NAME} ${EXPORT_DEPENDENCIES} ieTestHelpers_s) +openvino_developer_export_targets(COMPONENT inference_engine_tests + TARGETS ${TARGET_NAME} ${EXPORT_DEPENDENCIES} ieTestHelpers_s) diff --git a/inference-engine/tests_deprecated/functional/shared_tests/CMakeLists.txt b/inference-engine/tests_deprecated/functional/shared_tests/CMakeLists.txt index c426ac28298ab5..65289c7c788c7e 100644 --- a/inference-engine/tests_deprecated/functional/shared_tests/CMakeLists.txt +++ b/inference-engine/tests_deprecated/functional/shared_tests/CMakeLists.txt @@ -62,4 +62,4 @@ add_dependencies(${TARGET_NAME} HeteroPlugin) # developer package -ie_developer_export_targets(${TARGET_NAME}) +openvino_developer_export_targets(COMPONENT inference_engine_tests TARGETS ${TARGET_NAME}) diff --git a/inference-engine/tests_deprecated/functional/vpu/CMakeLists.txt b/inference-engine/tests_deprecated/functional/vpu/CMakeLists.txt index d9007d5994c862..1ee7e078f4f114 100644 --- a/inference-engine/tests_deprecated/functional/vpu/CMakeLists.txt +++ b/inference-engine/tests_deprecated/functional/vpu/CMakeLists.txt @@ -14,7 +14,7 @@ endif() addIeTarget( NAME myriadTestData - DEVELOPER_PACKAGE + DEVELOPER_PACKAGE inference_engine_tests TYPE STATIC ROOT ${CMAKE_CURRENT_SOURCE_DIR}/test_data LINK_LIBRARIES @@ -27,7 +27,7 @@ addIeTarget( addIeTarget( NAME VPUCommonTests - DEVELOPER_PACKAGE + DEVELOPER_PACKAGE inference_engine_tests TYPE STATIC ROOT ${CMAKE_CURRENT_SOURCE_DIR}/common ADDITIONAL_SOURCE_DIRS @@ -40,8 +40,6 @@ addIeTarget( IESharedTests vpu_graph_transformer vpu_custom_kernels - EXPORT_DEPENDENCIES - vpu_custom_kernels ) target_include_directories(VPUCommonTests INTERFACE @@ -50,7 +48,8 @@ target_include_directories(VPUCommonTests INTERFACE $ ) -ie_developer_export_targets(vpu_custom_kernels) +openvino_developer_export_targets(COMPONENT inference_engine_vpu TARGETS vpu_custom_kernels) + addIeTargetTest( NAME MyriadFunctionalTests ROOT ${CMAKE_CURRENT_SOURCE_DIR}/myriad_tests diff --git a/inference-engine/thirdparty/CMakeLists.txt b/inference-engine/thirdparty/CMakeLists.txt index cd35228121fd1d..283bbbabb8f4a1 100644 --- a/inference-engine/thirdparty/CMakeLists.txt +++ b/inference-engine/thirdparty/CMakeLists.txt @@ -70,13 +70,13 @@ set_target_properties(ade fluid stb_image PROPERTIES FOLDER thirdparty) # developer package -ie_developer_export_targets(ade fluid) +openvino_developer_export_targets(COMPONENT openvino_common TARGETS ade fluid) if (NOT USE_SYSTEM_PUGIXML) set_target_properties(pugixml PROPERTIES FOLDER thirdparty) - ie_developer_export_targets(pugixml) + openvino_developer_export_targets(COMPONENT openvino_common TARGETS pugixml) if(TARGET pugixml_mt) - ie_developer_export_targets(pugixml_mt) + openvino_developer_export_targets(COMPONENT openvino_common TARGETS pugixml_mt) set_target_properties(pugixml_mt PROPERTIES FOLDER thirdparty) endif() endif() diff --git a/ngraph/CMakeLists.txt b/ngraph/CMakeLists.txt index 587cffdf019b99..e9db9d565bc295 100644 --- a/ngraph/CMakeLists.txt +++ b/ngraph/CMakeLists.txt @@ -15,11 +15,7 @@ # ****************************************************************************** # set directory where the custom finders live -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") - -if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") - message(FATAL_ERROR "In-source builds are not allowed.") -endif() +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/") if (CMAKE_BUILD_TYPE) set(RELEASE_TYPES Debug Release RelWithDebInfo MinSizeRel) @@ -415,7 +411,7 @@ if(NGRAPH_DEPRECATED_ENABLE) add_definitions(-DNGRAPH_DEPRECATED_ENABLE) endif() -add_definitions(-DPROJECT_ROOT_DIR="${CMAKE_SOURCE_DIR}") +add_definitions(-DPROJECT_ROOT_DIR="${CMAKE_CURRENT_SOURCE_DIR}") #----------------------------------------------------------------------------------------------- # Print Global Options diff --git a/ngraph/core/builder/CMakeLists.txt b/ngraph/core/builder/CMakeLists.txt index 4c5a4766d84fb7..9cf04ceca0d256 100644 --- a/ngraph/core/builder/CMakeLists.txt +++ b/ngraph/core/builder/CMakeLists.txt @@ -43,9 +43,9 @@ target_include_directories(${TARGET_NAME} PRIVATE ${NGRAPH_INCLUDE_PATH} ${BUILDER_INCLUDE_DIR}/ngraph/ ${BUILDER_INCLUDE_DIR}/ngraph/builder) -#Add an alias so that library can be used inside the build tree, e.g. when testing +# Add an alias so that library can be used inside the build tree, e.g. when testing add_library(ngraph::builder ALIAS ${TARGET_NAME}) # developer package -openvino_developer_export_targets(ngraph::builder) +openvino_developer_export_targets(COMPONENT ngraph TARGETS ngraph::builder) diff --git a/ngraph/core/reference/CMakeLists.txt b/ngraph/core/reference/CMakeLists.txt index 2fa49195b34022..5b0705f9baf4a0 100644 --- a/ngraph/core/reference/CMakeLists.txt +++ b/ngraph/core/reference/CMakeLists.txt @@ -47,4 +47,4 @@ add_library(ngraph::reference ALIAS ${TARGET_NAME}) # developer package -openvino_developer_export_targets(ngraph::reference) +openvino_developer_export_targets(COMPONENT ngraph TARGETS ngraph::reference) diff --git a/openvino/CMakeLists.txt b/openvino/CMakeLists.txt index 2d6ebf915f2933..cf548389b360a3 100644 --- a/openvino/CMakeLists.txt +++ b/openvino/CMakeLists.txt @@ -17,4 +17,4 @@ add_subdirectory(itt) add_subdirectory(conditional_compilation) -openvino_developer_export_targets(openvino::itt openvino::conditional_compilation) +openvino_developer_export_targets(COMPONENT openvino_common TARGETS openvino::itt openvino::conditional_compilation) diff --git a/openvino/itt/CMakeLists.txt b/openvino/itt/CMakeLists.txt index c67a68d53cc509..22b287164fb552 100644 --- a/openvino/itt/CMakeLists.txt +++ b/openvino/itt/CMakeLists.txt @@ -16,13 +16,13 @@ set(TARGET_NAME itt) -list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") - file(GLOB_RECURSE SOURCES "src/*.cpp" "src/*.hpp") if(ENABLE_PROFILING_ITT) if(DEFINED INTEL_VTUNE_DIR OR DEFINED ENV{INTEL_VTUNE_DIR}) - find_package(ITT) + find_package(ITT + PATHS "${CMAKE_CURRENT_SOURCE_DIR}/cmake" + NO_DEFAULT_PATH) if(NOT ITT_FOUND) message(WARNING "Profiling option enabled, but no ITT library was found under INTEL_VTUNE_DIR") endif() @@ -45,7 +45,7 @@ if(ENABLE_PROFILING_ITT) target_compile_options(ittnotify PRIVATE -Wno-undef) endif() - openvino_developer_export_targets(ittnotify) + openvino_developer_export_targets(COMPONENT openvino_common TARGETS ittnotify) endif() endif() diff --git a/openvino/itt/cmake/FindITT.cmake b/openvino/itt/cmake/ITTConfig.cmake similarity index 100% rename from openvino/itt/cmake/FindITT.cmake rename to openvino/itt/cmake/ITTConfig.cmake diff --git a/tests/fuzz/CMakeLists.txt b/tests/fuzz/CMakeLists.txt index f5946e24e52813..285d813fd8d6b7 100644 --- a/tests/fuzz/CMakeLists.txt +++ b/tests/fuzz/CMakeLists.txt @@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.13 FATAL_ERROR) set(OpenVINO_MAIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../..) -set(CMAKE_MODULE_PATH "${OpenVINO_MAIN_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) +set(CMAKE_MODULE_PATH "${OpenVINO_MAIN_SOURCE_DIR}/cmake/developer_package" ${CMAKE_MODULE_PATH}) if (CMAKE_BUILD_TYPE STREQUAL "") message(STATUS "CMAKE_BUILD_TYPE not defined, 'Release' will be used") @@ -16,7 +16,7 @@ if (NOT TARGET IE::inference_engine) find_package(InferenceEngineDeveloperPackage REQUIRED) endif() -include(sanitizer) +include(compile_flags/sanitizer) include(fuzzing) if (NOT ENABLE_FUZZING) From 00181d5179e3f239b2537b49c05c6499a43f03ed Mon Sep 17 00:00:00 2001 From: Mateusz Bencer Date: Tue, 22 Dec 2020 16:55:25 +0100 Subject: [PATCH 120/244] Disable tests which read prototxt files if protobuf-lite is used (#3691) * Disable tests which read prototxt if protobuf lite is used * added missing line * cmake flags refactor --- .../inference_engine/CMakeLists.txt | 4 +-- .../unit/frontends/onnx_import/CMakeLists.txt | 34 ++++++++++--------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/inference-engine/tests/functional/inference_engine/CMakeLists.txt b/inference-engine/tests/functional/inference_engine/CMakeLists.txt index 854c2d74814460..b4d3fc4ef0d913 100644 --- a/inference-engine/tests/functional/inference_engine/CMakeLists.txt +++ b/inference-engine/tests/functional/inference_engine/CMakeLists.txt @@ -25,7 +25,7 @@ set(DEPENDENCIES sharedTestClasses ) -if (NGRAPH_ONNX_IMPORT_ENABLE) +if (NGRAPH_ONNX_IMPORT_ENABLE AND NOT NGRAPH_USE_PROTOBUF_LITE) list(APPEND INCLUDES "${OpenVINO_MAIN_SOURCE_DIR}/docs/onnx_custom_op") list(APPEND LINK_LIBRARIES onnx_custom_op) list(APPEND DEPENDENCIES onnx_custom_op) @@ -33,7 +33,7 @@ else() set(EXCLUDED_SOURCE_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/onnx_reader") endif() -if (NOT NGRAPH_ONNX_IMPORT_ENABLE OR NOT ENABLE_MKL_DNN) +if (NOT NGRAPH_ONNX_IMPORT_ENABLE OR NOT ENABLE_MKL_DNN OR NGRAPH_USE_PROTOBUF_LITE) set(EXCLUDED_SOURCE_PATHS ${EXCLUDED_SOURCE_PATHS} "${CMAKE_CURRENT_SOURCE_DIR}/extension.cpp") endif() diff --git a/inference-engine/tests/unit/frontends/onnx_import/CMakeLists.txt b/inference-engine/tests/unit/frontends/onnx_import/CMakeLists.txt index d676464386e045..35ef8a7bf146c2 100644 --- a/inference-engine/tests/unit/frontends/onnx_import/CMakeLists.txt +++ b/inference-engine/tests/unit/frontends/onnx_import/CMakeLists.txt @@ -2,20 +2,22 @@ # SPDX-License-Identifier: Apache-2.0 # -set(TARGET_NAME onnxImporterUnitTests) +if (NGRAPH_ONNX_IMPORT_ENABLE AND NOT NGRAPH_USE_PROTOBUF_LITE) + set(TARGET_NAME onnxImporterUnitTests) -addIeTargetTest( - NAME ${TARGET_NAME} - ROOT ${CMAKE_CURRENT_SOURCE_DIR} - DEPENDENCIES - ngraph - onnx_importer - LINK_LIBRARIES - unitTestUtils - onnx_importer - DEFINES - ONNX_MODELS_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}/models\" - ADD_CPPLINT - LABELS - ONNX -) \ No newline at end of file + addIeTargetTest( + NAME ${TARGET_NAME} + ROOT ${CMAKE_CURRENT_SOURCE_DIR} + DEPENDENCIES + ngraph + onnx_importer + LINK_LIBRARIES + unitTestUtils + onnx_importer + DEFINES + ONNX_MODELS_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}/models\" + ADD_CPPLINT + LABELS + ONNX + ) +endif() From f224c52f38b9b1f5d2235f48645345ff1f47d672 Mon Sep 17 00:00:00 2001 From: Mikhail Ryzhov Date: Tue, 22 Dec 2020 21:02:05 +0300 Subject: [PATCH 121/244] [IE CORE] enable plugins & dependent libs loading using absolute path (#3639) * [IE CORE] enable plugins & dependent libs loading using absolute path urrently this allowed to use plugins.xml file to specify full path to specific plugin with it's all dependency, not to be persisted in CWD or in PATH * Code review fixes --- .../os/win/win_shared_object_loader.cpp | 131 +++++++++++++++--- 1 file changed, 112 insertions(+), 19 deletions(-) diff --git a/inference-engine/src/inference_engine/os/win/win_shared_object_loader.cpp b/inference-engine/src/inference_engine/os/win/win_shared_object_loader.cpp index 95e1b160844bfe..45e89852d26cea 100644 --- a/inference-engine/src/inference_engine/os/win/win_shared_object_loader.cpp +++ b/inference-engine/src/inference_engine/os/win/win_shared_object_loader.cpp @@ -1,7 +1,7 @@ // Copyright (C) 2018-2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // - + #include "details/ie_exception.hpp" #include "details/ie_so_loader.h" #include "file_utils.h" @@ -67,15 +67,18 @@ namespace InferenceEngine { namespace details { -class SharedObjectLoader::Impl { -private: - HMODULE shared_object; +typedef DWORD(*GetDllDirectoryA_Fnc)(DWORD, LPSTR); +typedef DWORD(*GetDllDirectoryW_Fnc)(DWORD, LPWSTR); - typedef DWORD(* GetDllDirectoryA_Fnc)(DWORD, LPSTR); - typedef DWORD(* GetDllDirectoryW_Fnc)(DWORD, LPWSTR); +static GetDllDirectoryA_Fnc IEGetDllDirectoryA; +static GetDllDirectoryW_Fnc IEGetDllDirectoryW; - static GetDllDirectoryA_Fnc IEGetDllDirectoryA; - static GetDllDirectoryW_Fnc IEGetDllDirectoryW; +/** + * @brief WINAPI based implementation for loading a shared object + */ +class SharedObjectLoader::Impl { + private: + HMODULE shared_object; void LoadSymbols() { static std::once_flag loadFlag; @@ -94,7 +97,7 @@ class SharedObjectLoader::Impl { // path was set to "" or NULL so reset it to "" to keep // application safe. void ExcludeCurrentDirectoryA() { -#ifndef WINAPI_FAMILY +#if !WINAPI_PARTITION_SYSTEM LoadSymbols(); if (IEGetDllDirectoryA && IEGetDllDirectoryA(0, NULL) <= 1) { SetDllDirectoryA(""); @@ -104,7 +107,7 @@ class SharedObjectLoader::Impl { #ifdef ENABLE_UNICODE_PATH_SUPPORT void ExcludeCurrentDirectoryW() { -#ifndef WINAPI_FAMILY +#if !WINAPI_PARTITION_SYSTEM LoadSymbols(); if (IEGetDllDirectoryW && IEGetDllDirectoryW(0, NULL) <= 1) { SetDllDirectoryW(L""); @@ -113,12 +116,93 @@ class SharedObjectLoader::Impl { } #endif -public: + static const char kPathSeparator = '\\'; + + static const char* FindLastPathSeparator(LPCSTR path) { + const char* const last_sep = strchr(path, kPathSeparator); + return last_sep; + } + + static std::string GetDirname(LPCSTR path) { + auto pos = FindLastPathSeparator(path); + if (pos == nullptr) { + return path; + } + std::string original(path); + original[pos - path] = 0; + return original; + } + +#ifdef ENABLE_UNICODE_PATH_SUPPORT + static const wchar_t* FindLastPathSeparator(LPCWSTR path) { + const wchar_t* const last_sep = wcsrchr(path, kPathSeparator); + return last_sep; + } + + static std::wstring GetDirname(LPCWSTR path) { + auto pos = FindLastPathSeparator(path); + if (pos == nullptr) { + return path; + } + std::wstring original(path); + original[pos - path] = 0; + return original; + } + + void LoadPluginFromDirectoryW(LPCWSTR path) { +#if !WINAPI_PARTITION_SYSTEM + LoadSymbols(); + if (IEGetDllDirectoryW) { + DWORD nBufferLength = IEGetDllDirectoryW(0, NULL); + std::vector lpBuffer(nBufferLength); + IEGetDllDirectoryW(nBufferLength, &lpBuffer.front()); + + auto dirname = GetDirname(path); + SetDllDirectoryW(dirname.c_str()); + shared_object = LoadLibraryW(path); + + SetDllDirectoryW(&lpBuffer.front()); + } +#endif + } +#endif + void LoadPluginFromDirectoryA(LPCSTR path) { +#if !WINAPI_PARTITION_SYSTEM + LoadSymbols(); + if (IEGetDllDirectoryA) { + DWORD nBufferLength = IEGetDllDirectoryA(0, NULL); + std::vector lpBuffer(nBufferLength); + IEGetDllDirectoryA(nBufferLength, &lpBuffer.front()); + + auto dirname = GetDirname(path); + SetDllDirectoryA(dirname.c_str()); + shared_object = LoadLibraryA(path); + + SetDllDirectoryA(&lpBuffer.front()); + } +#endif + } + + public: + /** + * @brief A shared pointer to SharedObjectLoader + */ + using Ptr = std::shared_ptr; + #ifdef ENABLE_UNICODE_PATH_SUPPORT + /** + * @brief Loads a library with the name specified. The library is loaded according to the + * WinAPI LoadLibrary rules + * @param pluginName Full or relative path to the plugin library + */ explicit Impl(const wchar_t* pluginName) { ExcludeCurrentDirectoryW(); + LoadPluginFromDirectoryW(pluginName); + + if(!shared_object) { + shared_object = LoadLibraryW(pluginName); + } - shared_object = LoadLibraryW(pluginName); if (!shared_object) { char cwd[1024]; THROW_IE_EXCEPTION << "Cannot load library '" << FileUtils::wStringtoMBCSstringChar(std::wstring(pluginName)) << "': " << GetLastError() @@ -129,8 +213,12 @@ class SharedObjectLoader::Impl { explicit Impl(const char* pluginName) { ExcludeCurrentDirectoryA(); + LoadPluginFromDirectoryA(pluginName); + + if (!shared_object) { + shared_object = LoadLibraryA(pluginName); + } - shared_object = LoadLibraryA(pluginName); if (!shared_object) { char cwd[1024]; THROW_IE_EXCEPTION << "Cannot load library '" << pluginName << "': " << GetLastError() @@ -142,6 +230,12 @@ class SharedObjectLoader::Impl { FreeLibrary(shared_object); } + /** + * @brief Searches for a function symbol in the loaded module + * @param symbolName Name of function to find + * @return A pointer to the function if found + * @throws InferenceEngineException if the function is not found + */ void* get_symbol(const char* symbolName) const { if (!shared_object) { THROW_IE_EXCEPTION << "Cannot get '" << symbolName << "' content from unknown library!"; @@ -154,18 +248,17 @@ class SharedObjectLoader::Impl { } }; -#ifdef ENABLE_UNICODE_PATH_SUPPORT -SharedObjectLoader::SharedObjectLoader(const wchar_t* pluginName) { - _impl = std::make_shared(pluginName); -} -#endif - SharedObjectLoader::~SharedObjectLoader() noexcept(false) { } SharedObjectLoader::SharedObjectLoader(const char * pluginName) { _impl = std::make_shared(pluginName); } +#ifdef ENABLE_UNICODE_PATH_SUPPORT +SharedObjectLoader::SharedObjectLoader(const wchar_t* pluginName) { + _impl = std::make_shared(pluginName); +} +#endif void* SharedObjectLoader::get_symbol(const char* symbolName) const { return _impl->get_symbol(symbolName); From 856ab82bbf85f3ea34f39277021e0e46bbaef6db Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Tue, 22 Dec 2020 21:02:52 +0300 Subject: [PATCH 122/244] Added company name to a version file (#3653) --- cmake/developer_package/vs_version/vs_version.cmake | 5 ++++- cmake/developer_package/vs_version/vs_version.rc.in | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/developer_package/vs_version/vs_version.cmake b/cmake/developer_package/vs_version/vs_version.cmake index 9972fdce1338d3..12f11a9f1d74e9 100644 --- a/cmake/developer_package/vs_version/vs_version.cmake +++ b/cmake/developer_package/vs_version/vs_version.cmake @@ -21,6 +21,7 @@ if(IE_VS_VER_HAS_VERSION) set(IE_VS_VER_FILEVERSION_STR "${IE_VERSION_MAJOR}.${IE_VERSION_MINOR}.${IE_VERSION_PATCH}.0") endif() +set(IE_VS_VER_COMPANY_NAME_STR "Intel Corporation") set(IE_VS_VER_PRODUCTVERSION_STR "${CI_BUILD_NUMBER}") set(IE_VS_VER_PRODUCTNAME_STR "OpenVINO toolkit") set(IE_VS_VER_COPYRIGHT_STR "Copyright (C) 2018-2020, Intel Corporation") @@ -29,6 +30,7 @@ set(IE_VS_VER_COMMENTS_STR "https://docs.openvinotoolkit.org/") # # ie_add_vs_version_file(NAME # FILEDESCRIPTION +# [COMPANY_NAME ] # [FILEVERSION ] # [INTERNALNAME ] # [COPYRIGHT ] @@ -43,7 +45,7 @@ function(ie_add_vs_version_file) return() endif() - cmake_parse_arguments(VS_VER "" "NAME;FILEDESCRIPTION;FILEVERSION;INTERNALNAME;COPYRIGHT;PRODUCTNAME;PRODUCTVERSION;COMMENTS;FILEVERSION_QUAD;PRODUCTVERSION_QUAD" "" ${ARGN}) + cmake_parse_arguments(VS_VER "" "COMPANY_NAME;NAME;FILEDESCRIPTION;FILEVERSION;INTERNALNAME;COPYRIGHT;PRODUCTNAME;PRODUCTVERSION;COMMENTS;FILEVERSION_QUAD;PRODUCTVERSION_QUAD" "" ${ARGN}) if(NOT TARGET ${VS_VER_NAME}) message(FATAL_ERROR "${VS_VER_NAME} must define a target") @@ -68,6 +70,7 @@ function(ie_add_vs_version_file) endif() endmacro() + _vs_ver_update_str_variable(COMPANY_NAME) _vs_ver_update_str_variable(FILEDESCRIPTION) _vs_ver_update_str_variable(FILEVERSION) _vs_ver_update_str_variable(INTERNALNAME) diff --git a/cmake/developer_package/vs_version/vs_version.rc.in b/cmake/developer_package/vs_version/vs_version.rc.in index 037247e0061722..b515b3118832e5 100644 --- a/cmake/developer_package/vs_version/vs_version.rc.in +++ b/cmake/developer_package/vs_version/vs_version.rc.in @@ -19,6 +19,7 @@ BEGIN BEGIN BLOCK "040904E4" BEGIN + VALUE "CompanyName", "@IE_VS_VER_COMPANY_NAME_STR@\0" VALUE "FileDescription", "@IE_VS_VER_FILEDESCRIPTION_STR@\0" #if @IE_VS_VER_HAS_VERSION@ VALUE "FileVersion", "@IE_VS_VER_FILEVERSION_STR@\0" From bc2bd041448e8839c3553f5e231607fad7081e0c Mon Sep 17 00:00:00 2001 From: Bartek Szmelczynski Date: Wed, 23 Dec 2020 05:52:08 +0100 Subject: [PATCH 123/244] Check disabled tests (#3441) * add 4 tests for operators based on model zoo * fix wrong names of the models * add functional tests for equal, lstm_cell and psroi_pooling operators * add functional tests for ConverLike and Mod operators * add funtional tests which were disabled, and add a minor change in convert_function_to_cnn_network.cpp file in order to make LogicalNot operator pass a test * back to the previous .xml model * made a changes in ir_layer_parsers.cpp in order to make logicalNot pass a test * minor fixes to LogicalNot operator in ie_layers_parsers.cpp * rename friendly name to "not" * add if statement for Activation type * fix style --- .../src/readers/ir_reader_v7/ie_layer_parsers.cpp | 1 + .../inference_engine/ngraph_reader/greater_tests.cpp | 2 +- .../functional/inference_engine/ngraph_reader/less_tests.cpp | 2 +- .../inference_engine/ngraph_reader/logical_and_tests.cpp | 2 +- .../inference_engine/ngraph_reader/logical_not_tests.cpp | 3 ++- .../inference_engine/ngraph_reader/logical_or_tests.cpp | 2 +- .../inference_engine/ngraph_reader/logical_xor_tests.cpp | 2 +- .../ngraph_reader/reduce_logical_and_tests.cpp | 2 +- .../ngraph_reader/reduce_logical_or_tests.cpp | 2 +- .../functional_test_utils/src/network_utils.cpp | 5 +++++ 10 files changed, 15 insertions(+), 8 deletions(-) diff --git a/inference-engine/src/readers/ir_reader_v7/ie_layer_parsers.cpp b/inference-engine/src/readers/ir_reader_v7/ie_layer_parsers.cpp index 2ca2a80b7f0816..961407d1b257f3 100644 --- a/inference-engine/src/readers/ir_reader_v7/ie_layer_parsers.cpp +++ b/inference-engine/src/readers/ir_reader_v7/ie_layer_parsers.cpp @@ -42,6 +42,7 @@ CNNLayer::Ptr ActivationLayerCreator::CreateLayer(pugi::xml_node& node, LayerPar {"elu", std::make_shared>("ELU")}, {"sigmoid", std::make_shared>("Sigmoid")}, {"tanh", std::make_shared>("TanH")}, + {"not", std::make_shared>("LogicalNot")} }; CNNLayer::Ptr activation; diff --git a/inference-engine/tests/functional/inference_engine/ngraph_reader/greater_tests.cpp b/inference-engine/tests/functional/inference_engine/ngraph_reader/greater_tests.cpp index 9222e786e45ff0..429354c0573a87 100644 --- a/inference-engine/tests/functional/inference_engine/ngraph_reader/greater_tests.cpp +++ b/inference-engine/tests/functional/inference_engine/ngraph_reader/greater_tests.cpp @@ -133,7 +133,7 @@ TEST_F(NGraphReaderTests, DISABLED_ReadGreaterNetwork) { compareIRs(model, modelV5, 3211264); } -TEST_F(NGraphReaderTests, DISABLED_ReadGreaterEqualNetwork) { +TEST_F(NGraphReaderTests, ReadGreaterEqualNetwork) { std::string model = R"V0G0N( diff --git a/inference-engine/tests/functional/inference_engine/ngraph_reader/less_tests.cpp b/inference-engine/tests/functional/inference_engine/ngraph_reader/less_tests.cpp index a30f95be3bdce4..3f12201d03a3a0 100644 --- a/inference-engine/tests/functional/inference_engine/ngraph_reader/less_tests.cpp +++ b/inference-engine/tests/functional/inference_engine/ngraph_reader/less_tests.cpp @@ -133,7 +133,7 @@ TEST_F(NGraphReaderTests, DISABLED_ReadLessNetwork) { compareIRs(model, modelV5, 3211264); } -TEST_F(NGraphReaderTests, DISABLED_ReadLessEqualNetwork) { +TEST_F(NGraphReaderTests, ReadLessEqualNetwork) { std::string model = R"V0G0N( diff --git a/inference-engine/tests/functional/inference_engine/ngraph_reader/logical_and_tests.cpp b/inference-engine/tests/functional/inference_engine/ngraph_reader/logical_and_tests.cpp index cd16442dc325ef..fafa643fc55df9 100644 --- a/inference-engine/tests/functional/inference_engine/ngraph_reader/logical_and_tests.cpp +++ b/inference-engine/tests/functional/inference_engine/ngraph_reader/logical_and_tests.cpp @@ -4,7 +4,7 @@ #include #include "ngraph_reader_tests.hpp" -TEST_F(NGraphReaderTests, DISABLED_ReadLogicalAndNetwork) { +TEST_F(NGraphReaderTests, ReadLogicalAndNetwork) { std::string model = R"V0G0N( diff --git a/inference-engine/tests/functional/inference_engine/ngraph_reader/logical_not_tests.cpp b/inference-engine/tests/functional/inference_engine/ngraph_reader/logical_not_tests.cpp index 7cc7f6b8bfce20..41e3a78f941a21 100644 --- a/inference-engine/tests/functional/inference_engine/ngraph_reader/logical_not_tests.cpp +++ b/inference-engine/tests/functional/inference_engine/ngraph_reader/logical_not_tests.cpp @@ -4,7 +4,8 @@ #include #include "ngraph_reader_tests.hpp" -TEST_F(NGraphReaderTests, DISABLED_ReadLogicalNotNetwork) { + +TEST_F(NGraphReaderTests, ReadLogicalNotNetwork) { std::string model = R"V0G0N( diff --git a/inference-engine/tests/functional/inference_engine/ngraph_reader/logical_or_tests.cpp b/inference-engine/tests/functional/inference_engine/ngraph_reader/logical_or_tests.cpp index 5e397049727e47..f9e5a02ed92e40 100644 --- a/inference-engine/tests/functional/inference_engine/ngraph_reader/logical_or_tests.cpp +++ b/inference-engine/tests/functional/inference_engine/ngraph_reader/logical_or_tests.cpp @@ -4,7 +4,7 @@ #include #include "ngraph_reader_tests.hpp" -TEST_F(NGraphReaderTests, DISABLED_ReadLogicalOrNetwork) { +TEST_F(NGraphReaderTests, ReadLogicalOrNetwork) { std::string model = R"V0G0N( diff --git a/inference-engine/tests/functional/inference_engine/ngraph_reader/logical_xor_tests.cpp b/inference-engine/tests/functional/inference_engine/ngraph_reader/logical_xor_tests.cpp index 8aab79e5208672..fcd56e71f6e40b 100644 --- a/inference-engine/tests/functional/inference_engine/ngraph_reader/logical_xor_tests.cpp +++ b/inference-engine/tests/functional/inference_engine/ngraph_reader/logical_xor_tests.cpp @@ -4,7 +4,7 @@ #include #include "ngraph_reader_tests.hpp" -TEST_F(NGraphReaderTests, DISABLED_ReadLogicalXorNetwork) { +TEST_F(NGraphReaderTests, ReadLogicalXorNetwork) { std::string model = R"V0G0N( diff --git a/inference-engine/tests/functional/inference_engine/ngraph_reader/reduce_logical_and_tests.cpp b/inference-engine/tests/functional/inference_engine/ngraph_reader/reduce_logical_and_tests.cpp index a5993c293821d4..51b36d28a56d81 100644 --- a/inference-engine/tests/functional/inference_engine/ngraph_reader/reduce_logical_and_tests.cpp +++ b/inference-engine/tests/functional/inference_engine/ngraph_reader/reduce_logical_and_tests.cpp @@ -4,7 +4,7 @@ #include #include "ngraph_reader_tests.hpp" -TEST_F(NGraphReaderTests, DISABLED_ReadReduceLogicalAndNetwork) { +TEST_F(NGraphReaderTests, ReadReduceLogicalAndNetwork) { std::string model = R"V0G0N( diff --git a/inference-engine/tests/functional/inference_engine/ngraph_reader/reduce_logical_or_tests.cpp b/inference-engine/tests/functional/inference_engine/ngraph_reader/reduce_logical_or_tests.cpp index e480a62153f731..c1cb6d4b916d82 100644 --- a/inference-engine/tests/functional/inference_engine/ngraph_reader/reduce_logical_or_tests.cpp +++ b/inference-engine/tests/functional/inference_engine/ngraph_reader/reduce_logical_or_tests.cpp @@ -4,7 +4,7 @@ #include #include "ngraph_reader_tests.hpp" -TEST_F(NGraphReaderTests, DISABLED_ReadReduceLogicalOrNetwork) { +TEST_F(NGraphReaderTests, ReadReduceLogicalOrNetwork) { std::string model = R"V0G0N( diff --git a/inference-engine/tests/ie_test_utils/functional_test_utils/src/network_utils.cpp b/inference-engine/tests/ie_test_utils/functional_test_utils/src/network_utils.cpp index 8d92cdc2ccdfe1..027bd20977367b 100644 --- a/inference-engine/tests/ie_test_utils/functional_test_utils/src/network_utils.cpp +++ b/inference-engine/tests/ie_test_utils/functional_test_utils/src/network_utils.cpp @@ -68,6 +68,11 @@ namespace FuncTestUtils { } else if (layer->type == "TensorIterator") { compareTensorIterators(layer, refLayer, sameNetVersions); } + if (layer->type == "Activation") { + err_log.pop_back(); + layer->type = "not"; + refLayer->params["type"] = "not"; + } if (layer->precision != refLayer->precision) { err_log.push_back( From 96b032504e7a2994625e50b045ee91fd206c5d20 Mon Sep 17 00:00:00 2001 From: Vladislav Volkov Date: Wed, 23 Dec 2020 08:01:07 +0300 Subject: [PATCH 124/244] Errors and warnings highlighting for UNIX platforms (#3643) * Errors and warnings highlighting for UNIX platforms * The option added for errors and warning highlighting enabling --- .../IEDevScriptsConfig.cmake | 1 + cmake/developer_package/message.cmake | 23 +++++++++++++++++++ cmake/features.cmake | 2 ++ 3 files changed, 26 insertions(+) create mode 100644 cmake/developer_package/message.cmake diff --git a/cmake/developer_package/IEDevScriptsConfig.cmake b/cmake/developer_package/IEDevScriptsConfig.cmake index df40b2a984d597..c8caf92f57b001 100644 --- a/cmake/developer_package/IEDevScriptsConfig.cmake +++ b/cmake/developer_package/IEDevScriptsConfig.cmake @@ -20,6 +20,7 @@ endfunction() set_ci_build_number() include(features) +include(message) # # Detect target diff --git a/cmake/developer_package/message.cmake b/cmake/developer_package/message.cmake new file mode 100644 index 00000000000000..fea169d50061b7 --- /dev/null +++ b/cmake/developer_package/message.cmake @@ -0,0 +1,23 @@ +# Copyright (C) 2018-2020 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 +# + +if(UNIX AND ENABLE_ERROR_HIGHLIGHT) + function(message) + string(ASCII 27 ESC) + set(RESET "${ESC}[m") + set(RED "${ESC}[31;1m") + set(YELLOW "${ESC}[33;1m") + + list(GET ARGV 0 MessageType) + if(MessageType STREQUAL FATAL_ERROR OR MessageType STREQUAL SEND_ERROR) + list(REMOVE_AT ARGV 0) + _message(${MessageType} "${RED}${ARGV}${RESET}") + elseif(MessageType STREQUAL WARNING) + list(REMOVE_AT ARGV 0) + _message(${MessageType} "${YELLOW}${ARGV}${RESET}") + else() + _message("${ARGV}") + endif() + endfunction() +endif() diff --git a/cmake/features.cmake b/cmake/features.cmake index 8c63bd77b72408..49b29562abe3b1 100644 --- a/cmake/features.cmake +++ b/cmake/features.cmake @@ -25,6 +25,8 @@ In case SELECTIVE_BUILD is enabled, the SELECTIVE_BUILD_STAT variable should con Usage: -DSELECTIVE_BUILD=ON -DSELECTIVE_BUILD_STAT=/path/*.csv" OFF ALLOWED_VALUES ON OFF COLLECT) +ie_option(ENABLE_ERROR_HIGHLIGHT "Highlight errors and warnings during compile time" OFF) + # # Process options # From bd9bbe09c31f3eff0185360e960b243b18da0cbc Mon Sep 17 00:00:00 2001 From: Patryk Elszkowski Date: Wed, 23 Dec 2020 06:02:57 +0100 Subject: [PATCH 125/244] New Gather op reference implementation. (#3633) * New Gather op reference implementation. * Unify span implementation for gather and gather_nd. Create span.hpp for common implementation of span. * Move span to utils directory. * Address review comments. * update span * Address PR comments. Co-authored-by: Patryk Elszkowski --- .../include/ngraph/coordinate_range.hpp | 8 +- .../ngraph/runtime/reference/gather.hpp | 222 +++++++---------- .../ngraph/runtime/reference/gather_nd.hpp | 55 +---- .../ngraph/runtime/reference/utils/span.hpp | 154 ++++++++++++ ngraph/test/backend/gather.in.cpp | 232 +++++++++++++++--- 5 files changed, 460 insertions(+), 211 deletions(-) create mode 100644 ngraph/core/reference/include/ngraph/runtime/reference/utils/span.hpp diff --git a/ngraph/core/reference/include/ngraph/coordinate_range.hpp b/ngraph/core/reference/include/ngraph/coordinate_range.hpp index 799ddf61b6111c..becd46887d9e61 100644 --- a/ngraph/core/reference/include/ngraph/coordinate_range.hpp +++ b/ngraph/core/reference/include/ngraph/coordinate_range.hpp @@ -185,7 +185,7 @@ namespace ngraph Strides(source_shape.size(), 1)); } - /// \brief Class allows to iterate over Tensor with reverted axies part by part. + /// \brief Class allows to iterate over Tensor with reverted axes part by part. /// /// To create ReverseRange use _reverse_ function. /// @@ -213,8 +213,14 @@ namespace ngraph return ReverseRange(source_shape, reversed_axis); } + inline ReverseRange index(const Shape& source_shape) + { + return reverse(source_shape, {}); + } + } // namespace impl using impl::Direction; + using impl::index; using impl::reverse; using impl::slice; } // namespace coordinates diff --git a/ngraph/core/reference/include/ngraph/runtime/reference/gather.hpp b/ngraph/core/reference/include/ngraph/runtime/reference/gather.hpp index 577f317b62bf5e..d05c6d009bec16 100644 --- a/ngraph/core/reference/include/ngraph/runtime/reference/gather.hpp +++ b/ngraph/core/reference/include/ngraph/runtime/reference/gather.hpp @@ -18,8 +18,10 @@ #include +#include "ngraph/coordinate_range.hpp" #include "ngraph/coordinate_transform.hpp" #include "ngraph/runtime/reference/gather_nd.hpp" +#include "utils/span.hpp" namespace ngraph { @@ -27,147 +29,105 @@ namespace ngraph { namespace reference { - // Implement gather by calling gather_nd on sub-problems - // # prepare constant shapes for tensors used for sub problems - // indices'.shape = indices.shape[-1] + [1] - // params'.shape = params.shape[axis:] - // out'.shape = params'.shape - // out'.shape[0] = indices.shape[-1] - // # call sub-problems - // foreach (params_index, out_index) in outer "axis" dimensions - // # params_prime is shared by inner loop - // params' = param[params_index] # rank(params') == rank(params) - axis - // foreach indices_index in outer N-1 dimensions - // indices' = indices[indices_index] # rank(indices') == 2 - // out_index = out_index + indices_index - // out' = out[out_index] # rank(out') == rank(params') - // gather_nd(params', indices'', out') + namespace + { + template + Shape to_shape(const Container& c) + { + return Shape(begin(c), end(c)); + } + + template + std::vector + join(const Container& c1, const Container& c2, const Container& c3) + { + using container_value_type = + typename std::remove_cv::type; + static_assert(std::is_same::value, + "Expect same type in container"); + std::vector ret; + ret.reserve(c1.size() + c2.size() + c3.size()); + std::copy(begin(c1), end(c1), std::back_inserter(ret)); + std::copy(begin(c2), end(c2), std::back_inserter(ret)); + std::copy(begin(c3), end(c3), std::back_inserter(ret)); + return ret; + } + + const auto only_one = [] { return coordinates::index(Shape{1}); }; + } // namespace template - void gather(const T* params, - const U* indices, - T* out, + void gather(const T* const params, + const U* const indices, + T* const out, const Shape& params_shape, const Shape& indices_shape, const Shape& out_shape, size_t axis) { - // prepare shape of params_prime (remove first "axis" dimensions) - const Shape params_prime_shape(params_shape.begin() + axis, params_shape.end()); - // prepare shape of indices_prime - const size_t indices_ndim = indices_shape.size(); - Shape indices_prime_shape; - // prepare shape of out_prime (same as params_prime except for first dim) - Shape out_prime_shape(params_prime_shape); - if (indices_ndim > 0) - { - out_prime_shape[0] = indices_shape[indices_ndim - 1]; - indices_prime_shape.emplace_back(indices_shape[indices_ndim - 1]); - } - else - { - out_prime_shape[0] = 1; - } - indices_prime_shape.emplace_back(1); + using std::next; + assert(std::memset(out, 0, shape_size(out_shape) * sizeof(T))); - // Create a CoordinateTransform for "out" that visits the outer "axis" dimensions - const size_t out_ndim = out_shape.size(); - const Coordinate out_outer_start_corner(out_ndim, 0); - Coordinate out_outer_end_corner(out_shape); - for (size_t i = axis; i < out_ndim; i++) - { - out_outer_end_corner[i] = 1; - } - Strides out_outer_strides(out_ndim, 1); - AxisVector out_outer_axis_order(out_ndim); - std::iota(out_outer_axis_order.begin(), out_outer_axis_order.end(), 0); - CoordinateTransform out_outer_transform(out_shape, - out_outer_start_corner, - out_outer_end_corner, - out_outer_strides, - out_outer_axis_order); - - // Create a CoordinateTransform for "params" that visits the outer "axis" dimensions - const size_t params_ndim = params_shape.size(); - const Coordinate params_outer_start_corner(params_ndim, 0); - Coordinate params_outer_end_corner(params_shape); - for (size_t i = axis; i < params_ndim; i++) - { - params_outer_end_corner[i] = 1; - } - const Strides params_outer_strides(params_ndim, 1); - AxisVector params_outer_axis_order(params_ndim); - std::iota(params_outer_axis_order.begin(), params_outer_axis_order.end(), 0); - const CoordinateTransform params_outer_transform(params_shape, - params_outer_start_corner, - params_outer_end_corner, - params_outer_strides, - params_outer_axis_order); - - // Create a CoordinateTransform for "indices" that visits only the first element - // along inner most axis - const Coordinate indices_outer_start_corner(indices_ndim, 0); - Coordinate indices_outer_end_corner(indices_shape); - if (indices_ndim > 0) - { - indices_outer_end_corner[indices_ndim - 1] = 1; - } - const Strides indices_outer_strides(indices_ndim, 1); - AxisVector indices_outer_axis_order(indices_ndim); - std::iota(indices_outer_axis_order.begin(), indices_outer_axis_order.end(), 0); - const CoordinateTransform indices_outer_transform(indices_shape, - indices_outer_start_corner, - indices_outer_end_corner, - indices_outer_strides, - indices_outer_axis_order); - - // Create an inner CoordinateTransfrom for "out" - const size_t out_inner_ndim = out_ndim - axis; - const Shape out_inner_shape(out_shape.begin() + axis, out_shape.end()); - const Coordinate out_inner_start_corner(out_inner_ndim, 0); - Coordinate out_inner_end_corner(out_inner_shape); - if (indices_ndim > 0) - { - out_inner_end_corner[indices_ndim - 1] = 1; - } - for (size_t i = indices_ndim; i < out_inner_ndim; i++) - { - out_inner_end_corner[i] = 1; - } - const Strides out_inner_strides(out_inner_ndim, 1); - AxisVector out_inner_axis_order(out_inner_ndim); - std::iota(out_inner_axis_order.begin(), out_inner_axis_order.end(), 0); - const CoordinateTransform out_inner_transform(out_inner_shape, - out_inner_start_corner, - out_inner_end_corner, - out_inner_strides, - out_inner_axis_order); - - auto out_outer_coord_iter = out_outer_transform.begin(); - for (const Coordinate& params_outer_coord : params_outer_transform) + const auto params_axes_part = span(params_shape).subspan(0, axis); + + NGRAPH_CHECK(params_shape.size() >= axis, "Not enough axes in param_shape."); + + const auto remainder_part_shape = span(params_shape).subspan(axis + 1); + + const auto found_out_shape = + join(params_axes_part, span(indices_shape), remainder_part_shape); + + NGRAPH_CHECK(found_out_shape == out_shape, + "Output shape mismatch with calculations"); + + const auto batch_shape = span(params_shape).subspan(axis); + + const auto batch_size = shape_size(batch_shape); + + const auto copy_size = shape_size(remainder_part_shape); + + const size_t copy_round_in_batch = + indices_shape.size() > 1 + ? shape_size(span(indices_shape.data(), indices_shape.size() - 1)) + : 1; + const size_t round_batch_offset = indices_shape.empty() ? 1 : indices_shape.back(); + + auto dst = out; + + auto gather_range = params_axes_part.empty() + ? only_one() + : coordinates::index(to_shape(params_axes_part)); + for (auto i : gather_range) { - if (out_outer_coord_iter == out_outer_transform.end()) - break; - const T* params_prime = - ¶ms[params_outer_transform.index(params_outer_coord)]; - T* out_outer = &out[out_outer_transform.index(*out_outer_coord_iter)]; - - auto out_inner_coord_iter = out_inner_transform.begin(); - for (const Coordinate& indices_outer_coord : indices_outer_transform) + auto batch_index = i.begin_index; + for (size_t batch = 0; batch != i.element_number; + batch_index += i.step, ++batch) { - if (out_inner_coord_iter == out_inner_transform.end()) - break; - const U* indices_prime = - &indices[indices_outer_transform.index(indices_outer_coord)]; - T* out_prime = &out_outer[out_inner_transform.index(*out_inner_coord_iter)]; - gather_nd(params_prime, - indices_prime, - out_prime, - params_prime_shape, - indices_prime_shape, - out_prime_shape); - ++out_inner_coord_iter; + const auto batch_offset = batch_index * batch_size; + assert(batch_offset < shape_size(params_shape)); + for (size_t round = 0; round != copy_round_in_batch; ++round) + { + const U* input_indices = indices + round * round_batch_offset; + const auto indices_no = + indices_shape.empty() ? 1 : indices_shape.back(); + + assert(!batch_shape.empty()); + for (size_t ii = 0; ii != indices_no; ++ii) + { + const auto positive_input_index = + input_indices[ii] < 0 ? batch_shape.front() + input_indices[ii] + : input_indices[ii]; + + const auto src_offset = + batch_offset + copy_size * positive_input_index; + + const auto src_begin = next(params, src_offset); + const auto src_end = next(src_begin, copy_size); + + std::copy(src_begin, src_end, dst); + dst += copy_size; + } + } } - ++out_outer_coord_iter; } } } // namespace reference diff --git a/ngraph/core/reference/include/ngraph/runtime/reference/gather_nd.hpp b/ngraph/core/reference/include/ngraph/runtime/reference/gather_nd.hpp index 805c035c5a61b9..51e71ce21704ee 100644 --- a/ngraph/core/reference/include/ngraph/runtime/reference/gather_nd.hpp +++ b/ngraph/core/reference/include/ngraph/runtime/reference/gather_nd.hpp @@ -21,6 +21,7 @@ #include #include "ngraph/coordinate_transform.hpp" +#include "utils/span.hpp" namespace ngraph { @@ -28,52 +29,8 @@ namespace ngraph { namespace reference { - namespace + namespace details { - template - using Required = typename std::enable_if::type; - - template - struct IsRandomAccessIt - { - static constexpr bool value = - std::is_same::value; - }; - - template ::value> = true> - class Span - { - public: - Span(Iterator begin, Iterator end) - : m_begin{begin} - , m_end{end} - { - } - - Iterator begin() const { return m_begin; } - Iterator end() const { return m_end; }; - typename Iterator::value_type operator[](size_t idx) const - { - return *next(m_begin, idx); - } - - typename Iterator::difference_type size() const - { - return std::distance(m_begin, m_end); - } - - private: - Iterator m_begin; - Iterator m_end; - }; - - template - Span span(Iterator begin, Iterator end) - { - return Span{begin, end}; - }; - template std::vector get_indices_offsets(const Iterator beg, const Iterator end, @@ -90,7 +47,7 @@ namespace ngraph return offsets; } - } // namespace + } // namespace details /// /// Implementation find maximum length of *slice* of input *params* which might be @@ -143,14 +100,14 @@ namespace ngraph "params_shape should have enough rank to be index by indices"}; } - const auto slice_shape = - span(next(begin(params_shape), first_slice_index_in_params), end(params_shape)); + const auto slice_shape = span(params_shape).subspan(first_slice_index_in_params); const auto slice_size = shape_size(slice_shape); const auto dims_begin = next(rbegin(params_shape), slice_shape.size()); const auto dims_end = next(dims_begin, indices_shape.back() - 1); - const auto indices_offsets = get_indices_offsets(dims_begin, dims_end, slice_size); + const auto indices_offsets = + details::get_indices_offsets(dims_begin, dims_end, slice_size); const auto batch_offset = indices_offsets.front() * params_shape[batch_dims]; diff --git a/ngraph/core/reference/include/ngraph/runtime/reference/utils/span.hpp b/ngraph/core/reference/include/ngraph/runtime/reference/utils/span.hpp new file mode 100644 index 00000000000000..0eb742f7d3b350 --- /dev/null +++ b/ngraph/core/reference/include/ngraph/runtime/reference/utils/span.hpp @@ -0,0 +1,154 @@ +//***************************************************************************** +// Copyright 2020 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//***************************************************************************** + +#pragma once + +#include +#include +#include + +namespace ngraph +{ + namespace runtime + { + namespace reference + { + namespace details + { + template + using Required = typename std::enable_if::type; + + template + struct IsRandomAccessIt + { + static constexpr bool value = + std::is_same::value; + }; + + template + using void_t = void; + + template + struct is_complete : std::false_type + { + }; + + template + struct is_complete : std::true_type + { + }; + + template + struct from_iterator + { + using stored_value = typename std::remove_pointer< + typename std::iterator_traits::pointer>::type; + }; + + } // namespace details + + /// @brief Span should mimic std::span + template + class Span + { + public: + static_assert(std::is_object::value, + "Element must be an object type (not a reference type or void)"); + static_assert(details::is_complete::value, + "Element must be a complete type (not a forward declaration)"); + static_assert(!std::is_abstract::value, + "Element cannot be an abstract class type"); + + constexpr Span() = default; + + constexpr Span(Element* data, std::size_t size) + : m_data{data} + , m_size{size} + { + } + + using value_type = Element; + using size_type = std::size_t; + + constexpr Element* begin() const noexcept { return m_data; } + constexpr Element* end() const noexcept { return m_data + m_size; } + friend constexpr Element* begin(const Span& s) noexcept { return s.begin(); } + friend constexpr Element* end(const Span& s) noexcept { return s.end(); } + constexpr std::size_t size() const noexcept { return m_size; } + constexpr bool empty() const noexcept { return !m_size; } + constexpr Element& front() const noexcept { return *m_data; } + constexpr Element& back() const noexcept { return *(m_data + (m_size - 1)); } + constexpr Element& operator[](std::size_t idx) const { return *(m_data + idx); } + Element& at(std::size_t idx) const { return *(m_data + idx); } + Span subspan(std::size_t offset, + std::size_t size = std::numeric_limits::max()) + { + if (offset > m_size) + { + return {}; + } + return {m_data + offset, std::min(size, m_size - offset)}; + } + + private: + Element* m_data{nullptr}; + std::size_t m_size{0}; + }; + + template ::stored_value, + details::Required::value> = true> + constexpr auto span(Iterator first, Iterator second) -> Span + { + return Span{ + std::addressof(*first), + static_cast::size_type>(std::distance(first, second))}; + } + + template ().data()), + decltype(std::declval().size())>> + constexpr auto span(const Container& c) -> Span + { + return {c.data(), c.size()}; + } + + template ().data()), + decltype(std::declval().size())>> + constexpr auto span(Container& c) -> Span + { + return {c.data(), c.size()}; + } + + template + constexpr auto span(const Element* data, std::size_t size) -> Span + { + return {data, size}; + } + + template + constexpr auto span(Element* data, std::size_t size) -> Span + { + return {data, size}; + } + + } // namespace reference + } // namespace runtime +} // namespace ngraph diff --git a/ngraph/test/backend/gather.in.cpp b/ngraph/test/backend/gather.in.cpp index 288b1a8a926251..dcaf85d755e608 100644 --- a/ngraph/test/backend/gather.in.cpp +++ b/ngraph/test/backend/gather.in.cpp @@ -72,19 +72,95 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_4d_indices_axis_0_2d_input) auto f = make_shared(G, ParameterVector{P, I}); auto test_case = test::TestCase(f); - test_case.add_input({1.0f, 1.1f, 2.0f, 2.1f, 3.0f, 3.1f}); - test_case.add_input({0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2, - 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2, - 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2}); + + // clang-format off + test_case.add_input({1.0f, 1.1f, + 2.0f, 2.1f, + 3.0f, 3.1f}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 3.0f, 3.1f, + + 1.0f, 1.1f, + 2.0f, 2.1f, + 2.0f, 2.1f, + 3.0f, 3.1f, + + + + 1.0f, 1.1f, + 2.0f, 2.1f, + 2.0f, 2.1f, + 3.0f, 3.1f, + + + 1.0f, 1.1f, + 2.0f, 2.1f, + 2.0f, 2.1f, + 3.0f, 3.1f, + + 1.0f, 1.1f, + 2.0f, 2.1f, + 2.0f, 2.1f, + 3.0f, 3.1f, + + + 1.0f, 1.1f, + 2.0f, 2.1f, + 2.0f, 2.1f, + 3.0f, 3.1f, + + 1.0f, 1.1f, + 2.0f, 2.1f, + 2.0f, 2.1f, + 3.0f, 3.1f, + + 1.0f, 1.1f, + 2.0f, 2.1f, + 2.0f, 2.1f, + 3.0f, 3.1f}); + // clang-format on test_case.run(MIN_FLOAT_TOLERANCE_BITS); } @@ -100,14 +176,50 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_3d_indices_axis_0_2d_input) auto f = make_shared(G, ParameterVector{P, I}); auto test_case = test::TestCase(f); - test_case.add_input({1.0f, 1.1f, 2.0f, 2.1f, 3.0f, 3.1f}); + // clang-format off + test_case.add_input({1.0f, 1.1f, + 2.0f, 2.1f, + 3.0f, 3.1f}); test_case.add_input( - {0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2}); + {0, 1, 1, 2, + 0, 1, 1, 2, + 0, 1, 1, 2, + + 0, 1, 1, 2, + 0, 1, 1, 2, + 0, 1, 1, 2}); test_case.add_expected_output( - out_shape, {1.0f, 1.1f, 2.0f, 2.1f, 2.0f, 2.1f, 3.0f, 3.1f, 1.0f, 1.1f, 2.0f, 2.1f, - 2.0f, 2.1f, 3.0f, 3.1f, 1.0f, 1.1f, 2.0f, 2.1f, 2.0f, 2.1f, 3.0f, 3.1f, - 1.0f, 1.1f, 2.0f, 2.1f, 2.0f, 2.1f, 3.0f, 3.1f, 1.0f, 1.1f, 2.0f, 2.1f, - 2.0f, 2.1f, 3.0f, 3.1f, 1.0f, 1.1f, 2.0f, 2.1f, 2.0f, 2.1f, 3.0f, 3.1f}); + out_shape, {1.0f, 1.1f, + 2.0f, 2.1f, + 2.0f, 2.1f, + 3.0f, 3.1f, + + 1.0f, 1.1f, + 2.0f, 2.1f, + 2.0f, 2.1f, + 3.0f, 3.1f, + + 1.0f, 1.1f, + 2.0f, 2.1f, + 2.0f, 2.1f, + 3.0f, 3.1f, + + + 1.0f, 1.1f, + 2.0f, 2.1f, + 2.0f, 2.1f, + 3.0f, 3.1f, + + 1.0f, 1.1f, + 2.0f, 2.1f, + 2.0f, 2.1f, + 3.0f, 3.1f, + + 1.0f, 1.1f, + 2.0f, 2.1f, + 2.0f, 2.1f, + 3.0f, 3.1f}); + // clang-format on test_case.run(MIN_FLOAT_TOLERANCE_BITS); } @@ -123,10 +235,20 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_2d_indices_axis_0_2d_input) auto f = make_shared(G, ParameterVector{P, I}); auto test_case = test::TestCase(f); - test_case.add_input({1.0f, 1.1f, 2.0f, 2.1f, 3.0f, 3.1f}); + // clang-format off + test_case.add_input({1.0f, 1.1f, + 2.0f, 2.1f, + 3.0f, 3.1f}); + // clang-format on test_case.add_input({0, 1, 1, 2}); + // clang-format off test_case.add_expected_output(out_shape, - {1.0f, 1.1f, 2.0f, 2.1f, 2.0f, 2.1f, 3.0f, 3.1f}); + {1.0f, 1.1f, + 2.0f, 2.1f, + + 2.0f, 2.1f, + 3.0f, 3.1f}); + // clang-format on test_case.run(MIN_FLOAT_TOLERANCE_BITS); } @@ -142,10 +264,24 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_2d_negative_and_positive_indices_axis_0_2d_i auto f = make_shared(G, ParameterVector{P, I}); auto test_case = test::TestCase(f); - test_case.add_input({1.0f, 1.1f, 2.0f, 2.1f, 3.0f, 3.1f}); + + // clang-format off + test_case.add_input({1.0f, 1.1f, + 2.0f, 2.1f, + 3.0f, 3.1f}); + // clang-format on + test_case.add_input({0, -2, 1, 2}); + + // clang-format off test_case.add_expected_output(out_shape, - {1.0f, 1.1f, 2.0f, 2.1f, 2.0f, 2.1f, 3.0f, 3.1f}); + {1.0f, 1.1f, + 2.0f, 2.1f, + + 2.0f, 2.1f, + 3.0f, 3.1f}); + // clang-format on + test_case.run(MIN_FLOAT_TOLERANCE_BITS); } @@ -197,9 +333,19 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_2d_indices_axis_1_2d_input) auto f = make_shared(G, ParameterVector{P, I}); auto test_case = test::TestCase(f); - test_case.add_input({1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f, 3.0f, 3.1f, 3.2f}); + + // clang-format off + test_case.add_input({1.0f, 1.1f, 1.2f, + 2.0f, 2.1f, 2.2f, + 3.0f, 3.1f, 3.2f}); + // clang-format on test_case.add_input({0, 2}); - test_case.add_expected_output(out_shape, {1.0f, 1.2f, 2.0f, 2.2f, 3.0f, 3.2f}); + + // clang-format off + test_case.add_expected_output(out_shape, {1.0f, 1.2f, + 2.0f, 2.2f, + 3.0f, 3.2f}); + // clang-format on test_case.run(MIN_FLOAT_TOLERANCE_BITS); } @@ -215,14 +361,40 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_1d_indices_axis_2_4d_input) auto f = make_shared(G, ParameterVector{P, I}); auto test_case = test::TestCase(f); - test_case.add_input({1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f, 3.0f, 3.1f, 3.2f, - 1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f, 3.0f, 3.1f, 3.2f, - 1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f, 3.0f, 3.1f, 3.2f, - 1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f, 3.0f, 3.1f, 3.2f}); + // clang-format off + test_case.add_input({ 1.0f, 1.1f, 1.2f, + 2.0f, 2.1f, 2.2f, + 3.0f, 3.1f, 3.2f, + + 11.0f, 11.1f, 11.2f, + 12.0f, 12.1f, 12.2f, + 13.0f, 13.1f, 13.2f, + + + 101.0f, 101.1f, 101.2f, + 102.0f, 102.1f, 102.2f, + 103.0f, 103.1f, 103.2f, + + 111.0f, 111.1f, 111.2f, + 112.0f, 112.1f, 112.2f, + 113.0f, 113.1f, 113.2f}); + // clang-format on test_case.add_input({0, 2}); + // clang-format off test_case.add_expected_output( - out_shape, {1.0f, 1.1f, 1.2f, 3.0f, 3.1f, 3.2f, 1.0f, 1.1f, 1.2f, 3.0f, 3.1f, 3.2f, - 1.0f, 1.1f, 1.2f, 3.0f, 3.1f, 3.2f, 1.0f, 1.1f, 1.2f, 3.0f, 3.1f, 3.2f}); + out_shape, { 1.0f, 1.1f, 1.2f, + 3.0f, 3.1f, 3.2f, + + 11.0f, 11.1f, 11.2f, + 13.0f, 13.1f, 13.2f, + + + 101.0f, 101.1f, 101.2f, + 103.0f, 103.1f, 103.2f, + + 111.0f, 111.1f, 111.2f, + 113.0f, 113.1f, 113.2f}); + // clang-format on test_case.run(MIN_FLOAT_TOLERANCE_BITS); } @@ -404,4 +576,4 @@ NGRAPH_TEST(${BACKEND_NAME}, gather_axis_0_bool) test_case.add_input({0, 1, 1, 2}); test_case.add_expected_output(out_shape, {1, 1, 1, 0, 1, 0, 0, 1}); test_case.run(MIN_FLOAT_TOLERANCE_BITS); -} \ No newline at end of file +} From 241b0faea1d49c5b9ded9c17181d102afe07397f Mon Sep 17 00:00:00 2001 From: Vladimir Paramuzov Date: Wed, 23 Dec 2020 13:35:44 +0300 Subject: [PATCH 126/244] [IE CLDNN] NGraph integration into cldnn plugin (#2506) Co-authored-by: Roman Lyamin Co-authored-by: Mikhail Letavin --- .../src/cldnn_engine/CMakeLists.txt | 7 +- .../src/cldnn_engine/cldnn_common_utils.h | 67 +- .../src/cldnn_engine/cldnn_config.cpp | 1 + .../src/cldnn_engine/cldnn_config.h | 5 - .../src/cldnn_engine/cldnn_engine.cpp | 713 +- .../src/cldnn_engine/cldnn_engine.h | 11 +- .../cldnn_engine/cldnn_executable_network.cpp | 2 - .../cldnn_engine/cldnn_executable_network.h | 8 +- .../src/cldnn_engine/cldnn_graph.cpp | 10 +- .../src/cldnn_engine/cldnn_graph.h | 23 +- .../src/cldnn_engine/cldnn_infer_request.cpp | 20 +- .../src/cldnn_engine/cldnn_lstm.cpp | 585 -- .../cldnn_engine/cldnn_primitives_list.hpp | 206 + .../src/cldnn_engine/cldnn_program.cpp | 6098 +---------------- .../src/cldnn_engine/cldnn_program.h | 426 +- .../src/cldnn_engine/cldnn_remote_context.h | 197 +- .../src/cldnn_engine/debug_options.cpp | 326 - .../src/cldnn_engine/debug_options.h | 85 - .../src/cldnn_engine/ops/batch_to_space.cpp | 53 + .../src/cldnn_engine/ops/broadcast.cpp | 107 + .../src/cldnn_engine/ops/concat.cpp | 56 + .../src/cldnn_engine/ops/constant.cpp | 190 + .../src/cldnn_engine/ops/convert.cpp | 44 + .../src/cldnn_engine/ops/convolution.cpp | 326 + .../cldnn_engine/ops/ctc_greedy_decoder.cpp | 32 + .../src/cldnn_engine/ops/cum_sum.cpp | 74 + .../src/cldnn_engine/ops/custom.cpp | 251 + .../src/cldnn_engine/ops/depth_to_space.cpp | 44 + .../src/cldnn_engine/ops/detection_output.cpp | 86 + .../src/cldnn_engine/ops/eltwise.cpp | 190 + .../src/cldnn_engine/ops/embedding_bag.cpp | 166 + .../ops/extract_image_patches.cpp | 49 + .../src/cldnn_engine/ops/fake_quantize.cpp | 42 + .../src/cldnn_engine/ops/gather tree.cpp | 54 + .../src/cldnn_engine/ops/gather.cpp | 103 + inference-engine/src/cldnn_engine/ops/grn.cpp | 30 + .../src/cldnn_engine/ops/interpolate.cpp | 203 + inference-engine/src/cldnn_engine/ops/lrn.cpp | 49 + .../src/cldnn_engine/ops/matmul.cpp | 248 + inference-engine/src/cldnn_engine/ops/mvn.cpp | 38 + .../cldnn_engine/ops/non_max_suppression.cpp | 163 + .../src/cldnn_engine/ops/normalize_l2.cpp | 63 + .../src/cldnn_engine/ops/one_hot.cpp | 64 + inference-engine/src/cldnn_engine/ops/pad.cpp | 75 + .../src/cldnn_engine/ops/parameter.cpp | 257 + .../src/cldnn_engine/ops/pooling.cpp | 101 + .../src/cldnn_engine/ops/prior_box.cpp | 115 + .../src/cldnn_engine/ops/proposal.cpp | 146 + .../src/cldnn_engine/ops/reduce.cpp | 146 + .../src/cldnn_engine/ops/region_yolo.cpp | 39 + .../src/cldnn_engine/ops/reorg_yolo.cpp | 31 + .../src/cldnn_engine/ops/reshape.cpp | 72 + .../src/cldnn_engine/ops/result.cpp | 71 + .../src/cldnn_engine/ops/reverse_sequence.cpp | 33 + inference-engine/src/cldnn_engine/ops/rnn.cpp | 315 + .../src/cldnn_engine/ops/roi_pooling.cpp | 122 + .../src/cldnn_engine/ops/scatter_update.cpp | 68 + .../src/cldnn_engine/ops/select.cpp | 85 + .../src/cldnn_engine/ops/shuffle_channels.cpp | 47 + .../src/cldnn_engine/ops/softmax.cpp | 74 + .../src/cldnn_engine/ops/space_to_batch.cpp | 53 + .../src/cldnn_engine/ops/space_to_depth.cpp | 38 + .../src/cldnn_engine/ops/split.cpp | 73 + .../src/cldnn_engine/ops/strided_slice.cpp | 276 + .../src/cldnn_engine/ops/tile.cpp | 29 + .../src/cldnn_engine/ops/topk.cpp | 123 + .../src/cldnn_engine/ops/transpose.cpp | 80 + .../src/cldnn_engine/ops/unary.cpp | 312 + .../include/ngraph_ops/nms_ie_internal.hpp | 59 + .../convert_nms_to_nms_ie_internal.hpp | 26 + .../src/ngraph_ops/nms_ie_internal.cpp | 106 + .../convert_nms_to_nms_ie_internal.cpp | 123 + .../convert_nms_to_nms_ie_internal_test.cpp | 192 + .../behavior/core_threading_tests.cpp | 8 - .../single_layer_tests/activation.cpp | 34 +- .../single_layer_tests/broadcast.cpp | 174 + .../single_layer_tests/detection_output.cpp | 85 + .../single_layer_tests/eltwise.cpp | 25 +- .../single_layer_tests/fake_quantize.cpp | 48 + .../group_convolution_backprop_data.cpp | 129 + .../single_layer_tests/gru_cell.cpp | 37 + .../single_layer_tests/gru_sequence.cpp | 65 + .../single_layer_tests/lstm_cell.cpp | 49 + .../single_layer_tests/lstm_sequence.cpp | 79 + .../non_max_suppression.cpp | 42 + .../single_layer_tests/normalize_l2.cpp | 2 +- .../prior_box_clustered.cpp | 4 +- .../single_layer_tests/reduce_ops.cpp | 225 +- .../single_layer_tests/rnn_cell.cpp | 34 + .../single_layer_tests/rnn_sequence.cpp | 60 + .../single_layer_tests/scatter_update.cpp | 46 + .../skip_tests_config.cpp | 25 +- .../subgraph_tests/parameter_result.cpp | 16 + .../subgraph_tests/parameter_result.hpp | 15 + .../single_layer/prior_box_clustered.hpp | 1 - .../subgraph/parameter_result.hpp | 28 + .../src/single_layer/prior_box_clustered.cpp | 92 +- .../src/subgraph/parameter_result.cpp | 28 + .../functional/cldnn/CMakeLists.txt | 11 +- .../functional/cldnn/dummy.cpp | 3 + .../regression_tests/regression_reference.cpp | 11 - .../single_layer_tests.cpp | 233 - .../common_dyn_batch_regression.cpp | 16 - .../input_tests/parser_tests.cpp | 35 - .../io_blob_tests/cropResize_tests.cpp | 209 - .../io_blob_tests/dims_tests.cpp | 11 - .../io_blob_tests/layout_tests.cpp | 19 - .../lstm/lstm_cell_test.cpp | 7 - .../lstm/lstm_ir_test.cpp | 7 - .../lstm/rnn_seq_test.cpp | 9 - .../single_layer_tests/bin_conv_tests.cpp | 28 - .../deformable_psroipooling_tests.cpp | 22 - .../single_layer_tests/gemm_tests.cpp | 34 - .../single_layer_tests/one_hot_tests.cpp | 25 - .../single_layer_tests/permute_tests.cpp | 29 - .../single_layer_tests/quantize_tests.cpp | 34 - .../single_layer_tests/resample_tests.cpp | 45 - .../single_layer_tests/ti_tests.cpp | 12 - .../single_layer_tests/convert_like_tests.cpp | 149 - .../cldnn/single_layer_tests/expand_tests.cpp | 165 - .../single_layer_tests/priorbox_tests.cpp | 369 - .../single_layer_tests/transpose_tests.cpp | 153 - .../functional/cldnn/test_model_repo.cpp | 17 - .../thirdparty/clDNN/api/lstm.hpp | 4 +- .../clDNN/api/non_max_suppression.hpp | 41 +- .../kernel_selector/common/common_tools.h | 4 + .../eltwise/eltwise_kernel_base.cpp | 2 +- .../lstm/lstm_elt_kernel_base.cpp | 37 +- .../pooling_kernel_gpu_b_fs_yx_fsv16.h | 3 +- .../pooling_kernel_gpu_bfyx_block_opt.h | 3 +- .../pooling/pooling_kernel_gpu_bsv16_fsv16.h | 3 +- .../pooling/pooling_kernel_gpu_byxf_opt.h | 3 +- .../pooling_kernel_gpu_byxf_padding_opt.h | 3 +- .../pooling_kernel_gpu_fs_b_yx_fsv32.h | 3 +- .../pooling/pooling_kernel_gpu_int8_ref.h | 3 +- .../pooling/pooling_kernel_gpu_ref.h | 3 +- .../select/select_kernel_ref.cpp | 4 +- .../cl_kernels/fully_connected_gpu_imad.cl | 4 +- .../core/cl_kernels/lstm_elt_gpu_bfyx_ref.cl | 28 +- .../kernel_selector/core/common/jitter.cpp | 3 +- .../thirdparty/clDNN/src/eltwise.cpp | 2 + .../thirdparty/clDNN/src/fully_connected.cpp | 11 +- .../clDNN/src/gpu/cpu_impl_helpers.hpp | 2 +- .../clDNN/src/gpu/kernels_cache.cpp | 7 +- .../thirdparty/clDNN/src/gpu/lstm_elt_gpu.cpp | 25 +- .../clDNN/src/gpu/non_max_suppression_cpu.cpp | 177 +- .../graph_optimizer/pre_replace_deconv.cpp | 8 +- .../graph_optimizer/prepare_buffer_fusing.cpp | 2 +- .../prepare_primitive_fusing.cpp | 4 +- .../remove_redundant_reorders.cpp | 6 +- .../src/include/non_max_suppression_inst.h | 62 +- .../thirdparty/clDNN/src/layout_optimizer.cpp | 45 +- .../thirdparty/clDNN/src/program.cpp | 2 +- .../test_cases/activation_simple_gpu_test.cpp | 2 +- .../tests/test_cases/fusings_gpu_test.cpp | 14 + .../clDNN/tests/test_cases/lstm_gpu_test.cpp | 125 +- .../test_cases/non_max_suppression_test.cpp | 67 +- ngraph/core/src/op/prior_box.cpp | 6 +- ngraph/core/src/op/prior_box_clustered.cpp | 7 +- 159 files changed, 8793 insertions(+), 9738 deletions(-) delete mode 100644 inference-engine/src/cldnn_engine/cldnn_lstm.cpp create mode 100644 inference-engine/src/cldnn_engine/cldnn_primitives_list.hpp delete mode 100644 inference-engine/src/cldnn_engine/debug_options.cpp delete mode 100644 inference-engine/src/cldnn_engine/debug_options.h create mode 100644 inference-engine/src/cldnn_engine/ops/batch_to_space.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/broadcast.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/concat.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/constant.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/convert.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/convolution.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/ctc_greedy_decoder.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/cum_sum.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/custom.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/depth_to_space.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/detection_output.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/eltwise.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/embedding_bag.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/extract_image_patches.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/fake_quantize.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/gather tree.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/gather.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/grn.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/interpolate.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/lrn.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/matmul.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/mvn.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/non_max_suppression.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/normalize_l2.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/one_hot.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/pad.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/parameter.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/pooling.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/prior_box.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/proposal.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/reduce.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/region_yolo.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/reorg_yolo.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/reshape.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/result.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/reverse_sequence.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/rnn.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/roi_pooling.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/scatter_update.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/select.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/shuffle_channels.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/softmax.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/space_to_batch.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/space_to_depth.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/split.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/strided_slice.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/tile.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/topk.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/transpose.cpp create mode 100644 inference-engine/src/cldnn_engine/ops/unary.cpp create mode 100644 inference-engine/src/transformations/include/ngraph_ops/nms_ie_internal.hpp create mode 100644 inference-engine/src/transformations/include/transformations/op_conversions/convert_nms_to_nms_ie_internal.hpp create mode 100644 inference-engine/src/transformations/src/ngraph_ops/nms_ie_internal.cpp create mode 100644 inference-engine/src/transformations/src/transformations/op_conversions/convert_nms_to_nms_ie_internal.cpp create mode 100644 inference-engine/tests/functional/inference_engine/transformations/convert_nms_to_nms_ie_internal_test.cpp create mode 100644 inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/broadcast.cpp create mode 100644 inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/detection_output.cpp create mode 100644 inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/fake_quantize.cpp create mode 100644 inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/group_convolution_backprop_data.cpp create mode 100644 inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/gru_cell.cpp create mode 100644 inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/gru_sequence.cpp create mode 100644 inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/lstm_cell.cpp create mode 100644 inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/lstm_sequence.cpp create mode 100644 inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/non_max_suppression.cpp create mode 100644 inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/rnn_cell.cpp create mode 100644 inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/rnn_sequence.cpp create mode 100644 inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/scatter_update.cpp create mode 100644 inference-engine/tests/functional/plugin/gpu/shared_tests_instances/subgraph_tests/parameter_result.cpp create mode 100644 inference-engine/tests/functional/plugin/shared/include/subgraph_tests/parameter_result.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/parameter_result.hpp create mode 100644 inference-engine/tests/functional/shared_test_classes/src/subgraph/parameter_result.cpp create mode 100644 inference-engine/tests_deprecated/functional/cldnn/dummy.cpp delete mode 100644 inference-engine/tests_deprecated/functional/cldnn/regression_tests/regression_reference.cpp delete mode 100644 inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/common_single_layer_tests/single_layer_tests.cpp delete mode 100644 inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/inference_engine_regression_tests/common_dyn_batch_regression.cpp delete mode 100644 inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/input_tests/parser_tests.cpp delete mode 100644 inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/io_blob_tests/cropResize_tests.cpp delete mode 100644 inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/io_blob_tests/dims_tests.cpp delete mode 100644 inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/io_blob_tests/layout_tests.cpp delete mode 100644 inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/lstm/lstm_cell_test.cpp delete mode 100644 inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/lstm/lstm_ir_test.cpp delete mode 100644 inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/lstm/rnn_seq_test.cpp delete mode 100644 inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/single_layer_tests/bin_conv_tests.cpp delete mode 100644 inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/single_layer_tests/deformable_psroipooling_tests.cpp delete mode 100644 inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/single_layer_tests/gemm_tests.cpp delete mode 100644 inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/single_layer_tests/one_hot_tests.cpp delete mode 100644 inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/single_layer_tests/permute_tests.cpp delete mode 100644 inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/single_layer_tests/quantize_tests.cpp delete mode 100644 inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/single_layer_tests/resample_tests.cpp delete mode 100644 inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/single_layer_tests/ti_tests.cpp delete mode 100644 inference-engine/tests_deprecated/functional/cldnn/single_layer_tests/convert_like_tests.cpp delete mode 100644 inference-engine/tests_deprecated/functional/cldnn/single_layer_tests/expand_tests.cpp delete mode 100644 inference-engine/tests_deprecated/functional/cldnn/single_layer_tests/priorbox_tests.cpp delete mode 100644 inference-engine/tests_deprecated/functional/cldnn/single_layer_tests/transpose_tests.cpp delete mode 100644 inference-engine/tests_deprecated/functional/cldnn/test_model_repo.cpp diff --git a/inference-engine/src/cldnn_engine/CMakeLists.txt b/inference-engine/src/cldnn_engine/CMakeLists.txt index 7e15abbede1beb..323985cfe4ace5 100644 --- a/inference-engine/src/cldnn_engine/CMakeLists.txt +++ b/inference-engine/src/cldnn_engine/CMakeLists.txt @@ -11,7 +11,7 @@ if (LINUX) endif() endif() -file(GLOB MAIN_SRC ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) +file(GLOB_RECURSE MAIN_SRC ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) file(GLOB LIBRARY_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/*.h) addVersionDefines(cldnn_engine.cpp CI_BUILD_NUMBER CLDNN_VERSION) @@ -22,9 +22,10 @@ ie_add_plugin(NAME ${TARGET_NAME} VERSION_DEFINES_FOR cldnn_engine.cpp) target_link_libraries(${TARGET_NAME} PRIVATE clDNN_lib pugixml - inference_engine inference_engine_legacy + inference_engine inference_engine_transformations - inference_engine_lp_transformations) + inference_engine_lp_transformations + ${NGRAPH_LIBRARIES}) set(CLDNN_TOP_FOLDER "${IE_MAIN_SOURCE_DIR}/thirdparty/clDNN") target_include_directories(${TARGET_NAME} PRIVATE diff --git a/inference-engine/src/cldnn_engine/cldnn_common_utils.h b/inference-engine/src/cldnn_engine/cldnn_common_utils.h index 384d1576c9bd31..486339b1b68499 100644 --- a/inference-engine/src/cldnn_engine/cldnn_common_utils.h +++ b/inference-engine/src/cldnn_engine/cldnn_common_utils.h @@ -9,20 +9,10 @@ #include #include -using namespace InferenceEngine; -using namespace InferenceEngine::details; +#include "ngraph/type/element_type.hpp" namespace CLDNNPlugin { -#ifndef NDEBUG -#define THROW_CLDNN_EXCEPTION(desc)\ -do { \ -InferenceEngineException ex(__FILE__, __LINE__);\ -std::cout << desc << "\n---\nException detected at " << __FILE__ << ":" << \ -__LINE__ << " (" << __FUNCTION__ << ")\n---\n" << std::endl; THROW_IE_EXCEPTION << desc; } while (0); -#else -#define THROW_CLDNN_EXCEPTION(desc) THROW_IE_EXCEPTION << desc; -#endif // NDEBUG #define TensorValue(val) static_cast(val) const auto CldnnTensorFromIEDims = [](const InferenceEngine::SizeVector& dims, int def = 1) { @@ -34,33 +24,57 @@ const auto CldnnTensorFromIEDims = [](const InferenceEngine::SizeVector& dims, i case 4: return cldnn::tensor(cldnn::batch(dims[0]), cldnn::feature(dims[1]), cldnn::spatial(dims[3], dims[2])); case 5: return cldnn::tensor(cldnn::batch(dims[0]), cldnn::feature(dims[1]), cldnn::spatial(dims[4], dims[3], dims[2])); case 6: return cldnn::tensor(cldnn::batch(dims[0]), cldnn::feature(dims[1]), cldnn::spatial(dims[5], dims[4], dims[3], dims[2])); - default: THROW_CLDNN_EXCEPTION("Invalid dimensions size(" << dims.size() << ") for clDNN tensor"); + default: THROW_IE_EXCEPTION << "Invalid dimensions size(" << dims.size() << ") for clDNN tensor"; } }; inline cldnn::data_types DataTypeFromPrecision(InferenceEngine::Precision p) { switch (p) { - case Precision::I16: - case Precision::U16: - case Precision::FP32: + case InferenceEngine::Precision::I16: + case InferenceEngine::Precision::U16: + case InferenceEngine::Precision::FP32: return cldnn::data_types::f32; - case Precision::FP16: + case InferenceEngine::Precision::FP16: return cldnn::data_types::f16; - case Precision::U8: + case InferenceEngine::Precision::U8: return cldnn::data_types::u8; - case Precision::I8: + case InferenceEngine::Precision::I8: return cldnn::data_types::i8; - case Precision::I32: + case InferenceEngine::Precision::I32: return cldnn::data_types::i32; - case Precision::I64: + case InferenceEngine::Precision::I64: return cldnn::data_types::i64; - case Precision::BIN: + case InferenceEngine::Precision::BIN: return cldnn::data_types::bin; - case Precision::BOOL: + case InferenceEngine::Precision::BOOL: return cldnn::data_types::i8; default: THROW_IE_EXCEPTION << PARAMETER_MISMATCH_str << "The plugin does not support " << p.name() << " precision"; - break; + } +} + +inline cldnn::data_types DataTypeFromPrecision(ngraph::element::Type t) { + switch (t) { + case ngraph::element::Type_t::i16: + case ngraph::element::Type_t::u16: + case ngraph::element::Type_t::f32: + return cldnn::data_types::f32; + case ngraph::element::Type_t::f16: + return cldnn::data_types::f16; + case ngraph::element::Type_t::u8: + return cldnn::data_types::u8; + case ngraph::element::Type_t::i8: + return cldnn::data_types::i8; + case ngraph::element::Type_t::i32: + return cldnn::data_types::i32; + case ngraph::element::Type_t::i64: + return cldnn::data_types::i64; + case ngraph::element::Type_t::boolean: + return cldnn::data_types::i8; + case ngraph::element::Type_t::u1: + return cldnn::data_types::bin; + default: + THROW_IE_EXCEPTION << PARAMETER_MISMATCH_str << "The plugin does not support " << t.get_type_name()<< " precision"; } } @@ -81,7 +95,6 @@ inline cldnn::format FormatFromLayout(InferenceEngine::Layout l) { return cldnn::format::byxf; default: THROW_IE_EXCEPTION << PARAMETER_MISMATCH_str << "The plugin does not support " << l << " layout"; - break; } } @@ -107,7 +120,6 @@ inline cldnn::format FormatFromTensorDesc(InferenceEngine::TensorDesc desc) { return cldnn::format::byxf; default: THROW_IE_EXCEPTION << PARAMETER_MISMATCH_str << "The plugin does not support " << desc.getLayout() << " layout"; - break; } } @@ -124,12 +136,11 @@ inline cldnn::format ImageFormatFromLayout(InferenceEngine::Layout l) { return cldnn::format::nv12; default: THROW_IE_EXCEPTION << PARAMETER_MISMATCH_str << "The plugin does not support " << l << " image layout"; - break; } } -inline cldnn::format defaultFormatForDims(size_t dimensions) { +inline cldnn::format DefaultFormatForDims(size_t dimensions) { switch (dimensions) { case 0: case 1: @@ -142,7 +153,7 @@ inline cldnn::format defaultFormatForDims(size_t dimensions) { case 6: return cldnn::format::bfwzyx; default: - THROW_CLDNN_EXCEPTION("Unsupported number of dimensions: " << dimensions); + THROW_IE_EXCEPTION << "Unsupported number of dimensions: " << dimensions; } return cldnn::format::bfyx; // Should not get here diff --git a/inference-engine/src/cldnn_engine/cldnn_config.cpp b/inference-engine/src/cldnn_engine/cldnn_config.cpp index 230939922ac87f..0281d8cbe2bb51 100644 --- a/inference-engine/src/cldnn_engine/cldnn_config.cpp +++ b/inference-engine/src/cldnn_engine/cldnn_config.cpp @@ -7,6 +7,7 @@ #include #include "cldnn_config.h" #include "cpp_interfaces/exception2status.hpp" +#include "details/ie_exception.hpp" #include "cpp_interfaces/interface/ie_internal_plugin_config.hpp" #include "ie_api.h" #include "file_utils.h" diff --git a/inference-engine/src/cldnn_engine/cldnn_config.h b/inference-engine/src/cldnn_engine/cldnn_config.h index 9abf6396adb4a1..c9231494c2f866 100644 --- a/inference-engine/src/cldnn_engine/cldnn_config.h +++ b/inference-engine/src/cldnn_engine/cldnn_config.h @@ -6,11 +6,6 @@ #include #include -#include - -#include "ie_blob.h" -#include "cpp/ie_cnn_network.h" -#include "debug_options.h" #include "cldnn_custom_layer.h" diff --git a/inference-engine/src/cldnn_engine/cldnn_engine.cpp b/inference-engine/src/cldnn_engine/cldnn_engine.cpp index a1d89d7b6b149f..617f9114af372c 100644 --- a/inference-engine/src/cldnn_engine/cldnn_engine.cpp +++ b/inference-engine/src/cldnn_engine/cldnn_engine.cpp @@ -4,7 +4,6 @@ #include #include - #include #include #include @@ -12,62 +11,86 @@ #include #include #include +#include #include "ie_metric_helpers.hpp" -#include -#include -#include -#include #include "ie_plugin_config.hpp" -#include "caseless.hpp" -#include #include #include #include #include #include +#include #include +#include + +#include +#include + #include + #include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include #include -#include +#include +#include +#include +#include #include +#include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include #include "cldnn_engine.h" #include "cldnn_executable_network.h" #include "cldnn_custom_layer.h" -#include -#include - #ifdef __linux__ # include #endif -using InferenceEngine::DescriptionBuffer; -using InferenceEngine::TBlob; -using InferenceEngine::Blob; using namespace InferenceEngine; using namespace InferenceEngine::gpu; using namespace InferenceEngine::details; namespace CLDNNPlugin { +#define FACTORY_DECLARATION(op_version, op_name) \ + void __register ## _ ## op_name ## _ ## op_version(); + +#define FACTORY_CALL(op_version, op_name) \ + __register ## _ ## op_name ## _ ## op_version(); + +#define REGISTER_FACTORY(op_version, op_name) FACTORY_DECLARATION(op_version, op_name) +#include "cldnn_primitives_list.hpp" +#undef REGISTER_FACTORY + +void clDNNEngine::RegisterPrimitives() { + #define REGISTER_FACTORY(op_version, op_name) FACTORY_CALL(op_version, op_name) + #include "cldnn_primitives_list.hpp" + #undef REGISTER_FACTORY +} + struct clDNNEngine::impl { CLDNNPlugin::Config m_config; }; @@ -85,205 +108,197 @@ cldnn::device_info clDNNEngine::GetDeviceInfo(const std::map clonedNetwork = cloneNetwork(network); - bool baselineIsFP16 = false; - - if (clonedNetwork->getFunction()) { - const auto transformations_callback = [](const std::shared_ptr &node) -> bool { - // Reshape->Permute->Reshape pattern in theory can change output rank, so this check is added to be sure - // that the following primitives will be handled correctly - // DepthToSpace node implementation supports only equal input/output tensors with rank <= 5 - if (auto dtsOp = std::dynamic_pointer_cast(node)) { - return dtsOp->input_value(0).get_shape().size() <= 5lu && dtsOp->input_value(0).get_shape().size() == dtsOp->get_output_shape(0).size(); - } - - // SpaceToDepth node implementation supports only equal input/output tensors with rank <= 5 - if (auto stdOp = std::dynamic_pointer_cast(node)) { - return stdOp->input_value(0).get_shape().size() <= 5lu && stdOp->input_value(0).get_shape().size() == stdOp->get_output_shape(0).size(); - } - - // Reduce node implementation with reduce along features performs better with Reshape->Pooling->Reshape pattern - // Reshape->Pooling->Reshape scenario is also more optimal in case when batch > 1 and network precission is FP16 - if (auto redOp = std::dynamic_pointer_cast(node)) { - auto reduction_axes = redOp->get_reduction_axes().to_vector(); - bool reduce_along_f = redOp->get_reduction_axes().size() == 1 && std::count(reduction_axes.begin(), reduction_axes.end(), 1) != 0; - bool fp16_batch_not_1 = redOp->get_element_type() == ngraph::element::f16 && redOp->input(0).get_shape()[0] != 1; - bool can_use_reduce = !reduce_along_f && !fp16_batch_not_1; - return can_use_reduce; - } - if (auto redOp = std::dynamic_pointer_cast(node)) { - auto reduction_axes = redOp->get_reduction_axes().to_vector(); - bool reduce_along_f = redOp->get_reduction_axes().size() == 1 && std::count(reduction_axes.begin(), reduction_axes.end(), 1) != 0; - bool fp16_batch_not_1 = redOp->get_element_type() == ngraph::element::f16 && redOp->input(0).get_shape()[0] != 1; - bool can_use_reduce = !reduce_along_f && !fp16_batch_not_1; - return can_use_reduce; - } - if (auto redOp = std::dynamic_pointer_cast(node)) { - auto reduction_axes = redOp->get_reduction_axes().to_vector(); - bool reduce_along_f = redOp->get_reduction_axes().size() == 1 && std::count(reduction_axes.begin(), reduction_axes.end(), 1) != 0; - bool fp16_batch_not_1 = redOp->get_element_type() == ngraph::element::f16 && redOp->input(0).get_shape()[0] != 1; - bool can_use_reduce = !reduce_along_f && !fp16_batch_not_1; - return can_use_reduce; - } +template +static bool disableReduceDecomposition(const std::shared_ptr node) { + if (auto op = std::dynamic_pointer_cast(node)) { + auto reduction_axes = op->get_reduction_axes().to_vector(); + bool reduce_along_f = op->get_reduction_axes().size() == 1 && std::count(reduction_axes.begin(), reduction_axes.end(), 1) != 0; + bool fp16_batch_not_1 = op->get_element_type() == ngraph::element::f16 && op->input(0).get_shape()[0] != 1; + bool can_use_reduce = !reduce_along_f && !fp16_batch_not_1; + return can_use_reduce; + } + return false; +} - if (auto add_op = std::dynamic_pointer_cast(node)) { - return ngraph::is_type(add_op->get_input_node_shared_ptr(0)) || - ngraph::is_type(add_op->get_input_node_shared_ptr(0)) || - ngraph::is_type(add_op->get_input_node_shared_ptr(0)); - } +InferenceEngine::CNNNetwork clDNNEngine::CloneAndTransformNetwork(const InferenceEngine::CNNNetwork& network, + const CLDNNPlugin::Config& config) const { + CNNNetwork clonedNetwork = InferenceEngine::details::cloneNetwork(network); - return std::dynamic_pointer_cast(node) || - std::dynamic_pointer_cast(node) || - std::dynamic_pointer_cast(node) || - std::dynamic_pointer_cast(node) || - std::dynamic_pointer_cast(node) || - std::dynamic_pointer_cast(node) || - std::dynamic_pointer_cast(node) || - std::dynamic_pointer_cast(node) || - std::dynamic_pointer_cast(node) || - std::dynamic_pointer_cast(node); - }; - auto nGraphFunc = clonedNetwork->getFunction(); + if (clonedNetwork.getFunction()) { + auto nGraphFunc = clonedNetwork.getFunction(); // Disable shape inference (WA for generic operations) - ::ngraph::op::GenericIE::DisableReshape noReshape(nGraphFunc); + ngraph::op::GenericIE::DisableReshape noReshape(nGraphFunc); - bool enableInt8; { - // Note: instead of running all Conversion Transformations you can make up your own transformation pipeline ngraph::pass::Manager manager; - using const_node_ptr = const std::shared_ptr; - const auto& pass_config = manager.get_pass_config(); manager.register_pass(); - // WA: ConvertPriorBox must be executed before the 1st ConstantFolding pass - manager.register_pass(); - manager.register_pass(); manager.register_pass(); manager.register_pass(); manager.register_pass(); manager.register_pass(); manager.register_pass(); manager.register_pass(); + manager.register_pass(); manager.register_pass(); manager.register_pass(); manager.register_pass(); manager.register_pass(); manager.register_pass(); + manager.register_pass(); + manager.register_pass(); + manager.register_pass(); + manager.register_pass(); + manager.register_pass(); + manager.register_pass(); + manager.register_pass(); + + std::vector> convert_precision_list { + {ngraph::element::i64, ngraph::element::i32}, + {ngraph::element::u64, ngraph::element::i32}, + {ngraph::element::u16, ngraph::element::i32}, + {ngraph::element::u32, ngraph::element::i32}, + {ngraph::element::boolean, ngraph::element::u8}, + }; + + for (auto & precision : convert_precision_list) { + manager.register_pass(precision.first, precision.second); + } - manager.set_callback(transformations_callback); + auto pass_config = manager.get_pass_config(); + + using const_node_ptr = const std::shared_ptr; + + // SpaceToDepth/DepthToSpace node implementation supports only equal input/output tensors with rank <= 5 + pass_config->set_callback( + [](const_node_ptr &node) -> bool { + return node->input_value(0).get_shape().size() <= 5lu && + node->input_value(0).get_shape().size() == node->get_output_shape(0).size(); + }); + + pass_config->set_callback( + [](const_node_ptr &node) -> bool { + const auto & rank = node->input(0).get_partial_shape().rank().get_length(); + return rank <= 5lu; + }); + + pass_config->set_callback( + [](const_node_ptr &node) -> bool { + return disableReduceDecomposition(node); + }); + + pass_config->set_callback( + [](const_node_ptr &node) -> bool { + return disableReduceDecomposition(node); + }); + + pass_config->set_callback( + [](const_node_ptr &node) -> bool { + return disableReduceDecomposition(node); + }); auto isCellPrimitiveSupported = [](const_node_ptr &node) -> bool { - if (const auto &rnn_cell = std::dynamic_pointer_cast(node)) { + if (std::dynamic_pointer_cast(node) || std::dynamic_pointer_cast(node)) { return false; - } else if (const auto &gru_cell = std::dynamic_pointer_cast( - node)) { + } else if (std::dynamic_pointer_cast(node) || + std::dynamic_pointer_cast(node)) { return false; - } else if (const auto &lstm_cell = std::dynamic_pointer_cast( - node)) { - return lstm_cell->get_clip() == 0.0f && - lstm_cell->get_activations() == std::vector{"sigmoid", "tanh", "tanh"}; - } else if (const auto &lstm_cell_v1 = std::dynamic_pointer_cast( - node)) { - return lstm_cell_v1->get_clip() == 0.0f && - lstm_cell_v1->get_activations() == std::vector{"sigmoid", "tanh", "tanh"}; + } else if (const auto &lstm_cell = std::dynamic_pointer_cast(node)) { + return lstm_cell->get_clip() == 0.0f && lstm_cell->get_activations() == std::vector{"sigmoid", "tanh", "tanh"}; + } else if (const auto &lstm_cell_v1 = std::dynamic_pointer_cast(node)) { + return lstm_cell_v1->get_clip() == 0.0f && lstm_cell_v1->get_activations() == std::vector{"sigmoid", "tanh", "tanh"}; + } else if (const auto &lstm_sequence = std::dynamic_pointer_cast(node)) { + return lstm_sequence->get_clip() == 0.0f && lstm_sequence->get_activations() == std::vector{"sigmoid", "tanh", "tanh"}; } return false; }; - pass_config->set_callback( - [isCellPrimitiveSupported](const_node_ptr &node) -> bool { - return isCellPrimitiveSupported(node); - }); + pass_config->set_callback( + [isCellPrimitiveSupported](const_node_ptr &node) -> bool { + return isCellPrimitiveSupported(node); + }); pass_config->set_callback( - [isCellPrimitiveSupported](const_node_ptr &node) -> bool { - if (const auto& ti_op = std::dynamic_pointer_cast(node)) { - size_t count_rnn = 0; - for (const auto &op : ti_op->get_body()->get_ops()) - count_rnn += isCellPrimitiveSupported(op); - return count_rnn != 1; - } - return true; + ngraph::pass::ConvertTensorIteratorToLSTMSequence, + ngraph::pass::ConvertTensorIteratorToGRUSequence>( + [isCellPrimitiveSupported](const_node_ptr &node) -> bool { + if (const auto& ti_op = std::dynamic_pointer_cast(node)) { + size_t count_rnn = 0; + for (const auto &op : ti_op->get_body()->get_ops()) + count_rnn += isCellPrimitiveSupported(op); + return count_rnn != 1; + } + return true; + }); + + pass_config->set_callback( + [](const_node_ptr &node) -> bool { + return node->input_value(0).get_shape().back() == 4lu && + node->input_value(0).get_shape().front() == node->input_value(1).get_shape().front() && + node->input_value(0).get_shape()[1] == node->input_value(1).get_shape().back() && + node->input_value(0).get_shape().size() == 3lu && + node->input_value(1).get_shape().size() == 3lu; }); - manager.run_passes(nGraphFunc); - enableInt8 = config.enableInt8 && ngraph::pass::low_precision::LowPrecisionTransformer::isFunctionQuantized(nGraphFunc); - if (enableInt8) { - const auto fp16_callback = [&baselineIsFP16](const std::shared_ptr &node) -> bool { - if (!baselineIsFP16 && node->get_output_element_type(0) == ngraph::element::f16) { - baselineIsFP16 = true; - } + // List of enabled/disabled transformations + pass_config->disable(); + pass_config->disable(); + pass_config->disable(); + pass_config->disable(); + pass_config->disable(); + pass_config->disable(); + pass_config->disable(); + pass_config->disable(); + pass_config->disable(); - return true; - }; + pass_config->enable(); - ngraph::pass::Manager conversion_manager; - // [WA part1] Convert quantized FP16 model to FP32 to avoid possible overflow and mixed precision errors - conversion_manager.register_pass(ngraph::element::f16, ngraph::element::f32); - conversion_manager.set_callback(fp16_callback); - conversion_manager.run_passes(nGraphFunc); - } + manager.run_passes(nGraphFunc); } - using namespace ngraph::pass::low_precision; + bool enableInt8 = config.enableInt8 && ngraph::pass::low_precision::LowPrecisionTransformer::isFunctionQuantized(nGraphFunc); if (enableInt8) { - auto params = LayerTransformation::Params( - true, // updatePrecisions - LayerTransformation::QuantizedTensorAlignment::UpdateLevel, // quantizedTensorAlignmentOnActivations - LayerTransformation::QuantizedTensorAlignment::None, // quantizedTensorAlignmentOnWeights - true); // supportAsymmetricQuantization + using namespace ngraph::pass::low_precision; + ngraph::pass::Manager conversion_manager; + // [WA part1] Convert quantized FP16 model to FP32 to avoid possible overflow and mixed precision errors + conversion_manager.register_pass(ngraph::element::f16, ngraph::element::f32); + conversion_manager.run_passes(nGraphFunc); + auto params = LayerTransformation::Params(true, // updatePrecisions + LayerTransformation::QuantizedTensorAlignment::UpdateLevel, // quantizedTensorAlignmentOnActivations + LayerTransformation::QuantizedTensorAlignment::None, // quantizedTensorAlignmentOnWeights + true); // supportAsymmetricQuantization LowPrecisionTransformer transformer(LowPrecisionTransformer::getAllTransformations(params) .add(LayerTransformation::Params(params).setSupportAsymmetricQuantization(false))); transformer.transform(nGraphFunc); } - const auto reshape_fc_callback = [](const std::shared_ptr& node) -> bool { - return node->input_value(0).get_shape().size() <= 3lu; - }; - { - ngraph::pass::Manager manager = ngraph::pass::Manager(); - manager.register_pass(); + ngraph::pass::Manager manager; + // This ConstantFolding pass is added to fold reshapes added for constant inputs on NMS internal operation which prevents upper-bound calculation + // TODO: check why we have these reshapes + manager.register_pass(); manager.register_pass(); - manager.set_callback(transformations_callback); - auto pass_config = manager.get_pass_config(); - pass_config->set_callback(reshape_fc_callback); manager.run_passes(nGraphFunc); } - - clonedNetwork = InferenceEngine::details::convertFunctionToICNNNetwork(nGraphFunc, *clonedNetwork); } - - auto implNetwork = std::dynamic_pointer_cast(clonedNetwork); - if (implNetwork) { - // valid for CNNNetworkImpl only, while there's no API in ICNNNetwork to change network - ConstTransformer transformator(implNetwork.get()); - transformator.fullTrim(); - } - - if (baselineIsFP16) { - // [WA part1] Store 'lpt_back_to_fp16' flag to convert FP32 operations to original FP16 after LPT - InputsDataMap inputsMap; - clonedNetwork->getInputsInfo(inputsMap); - - if (!inputsMap.empty()) { - auto input0 = getInputTo(inputsMap.begin()->second->getInputData()); - input0.begin()->second->params["lpt_back_to_fp16"]; - } - } - return clonedNetwork; } clDNNEngine::clDNNEngine() : m_defaultContext(nullptr) { _pluginName = "GPU"; _impl = std::make_shared(); - + RegisterPrimitives(); // try loading clDNN engine and get info from it { cldnn::device_query device_query; @@ -333,6 +348,15 @@ auto check_inputs = [](InferenceEngine::InputsDataMap _networkInputs) { } }; +void clDNNEngine::UpdateConfig(CLDNNPlugin::Config& conf, const InferenceEngine::CNNNetwork &network, const std::map ¶ms) const { + auto device_info = GetDeviceInfo(params); + conf.enableInt8 = device_info.supports_imad || device_info.supports_immad; + conf.UpdateFromMap(params); + if (conf.enableDynamicBatch) { + conf.max_dynamic_batch = static_cast(network.getBatchSize()); + } +} + ExecutableNetworkInternal::Ptr clDNNEngine::LoadExeNetworkImpl(const InferenceEngine::CNNNetwork &network, const std::map &config) { // verification of supported input @@ -340,13 +364,7 @@ ExecutableNetworkInternal::Ptr clDNNEngine::LoadExeNetworkImpl(const InferenceEn check_inputs(_networkInputs); CLDNNPlugin::Config conf = _impl->m_config; - auto device_info = GetDeviceInfo(config); - conf.enableInt8 = device_info.supports_imad || device_info.supports_immad; - conf.UpdateFromMap(config); - - if (conf.enableDynamicBatch) { - conf.max_dynamic_batch = static_cast(network.getBatchSize()); - } + UpdateConfig(conf, network, config); CLDNNRemoteCLContext::Ptr context; @@ -379,7 +397,7 @@ ExecutableNetworkInternal::Ptr clDNNEngine::LoadExeNetworkImpl(const InferenceEn context = m_defaultContext; - InferenceEngine::CNNNetwork transformedNetwork(CloneAndTransformNetwork(network, conf)); + auto transformedNetwork = CloneAndTransformNetwork(network, conf); return std::make_shared(transformedNetwork, context, conf); } @@ -395,15 +413,9 @@ ExecutableNetworkInternal::Ptr clDNNEngine::LoadExeNetworkImpl(const InferenceEn } CLDNNPlugin::Config conf = getContextImpl(casted)->GetConfig(); - auto device_info = GetDeviceInfo(config); - conf.enableInt8 = device_info.supports_imad || device_info.supports_immad; - conf.UpdateFromMap(config); - - if (conf.enableDynamicBatch) { - conf.max_dynamic_batch = static_cast(network.getBatchSize()); - } + UpdateConfig(conf, network, config); - InferenceEngine::CNNNetwork transformedNetwork(CloneAndTransformNetwork(network, conf)); + auto transformedNetwork = CloneAndTransformNetwork(network, conf); return std::make_shared(transformedNetwork, casted, conf); } @@ -440,85 +452,101 @@ void clDNNEngine::SetConfig(const std::map &config) { QueryNetworkResult clDNNEngine::QueryNetwork(const CNNNetwork& network, const std::map& config) const { QueryNetworkResult res; - GetDeviceInfo(config); // Verify device id + CLDNNPlugin::Config conf = _impl->m_config; + UpdateConfig(conf, network, config); + + Program prog; auto function = network.getFunction(); - if (function != nullptr) { - std::unordered_set originalOps; - for (auto&& node : function->get_ops()) { - originalOps.emplace(node->get_friendly_name()); + if (function == nullptr) { + THROW_IE_EXCEPTION << "CNNetworkImpl representation is not supported anymore"; + } + + std::unordered_set originalOpNames; + auto originalOps = function->get_ops(); + for (auto&& node : originalOps) { + originalOpNames.emplace(node->get_friendly_name()); + } + + auto clonedNetwork = CloneAndTransformNetwork(network, conf); + auto ops = clonedNetwork.getFunction()->get_ordered_ops(); + std::unordered_set supported; + std::unordered_set unsupported; + + std::unordered_set splitNames; + std::unordered_set concatNames; + std::unordered_set constantsNames; + std::unordered_set depLayerNames; + + std::vector> splits; + std::vector> concats; + std::vector> constants; + std::vector> nextLayerDependent; + + auto layerIsSupported = [&](std::shared_ptr node) { + if (ngraph::is_type(node) || + ngraph::is_type(node) || + ngraph::is_type(node) || + ngraph::is_type(node)) { + return false; + } else if (ngraph::is_type(node)) { + splitNames.emplace(node->get_friendly_name()); + splits.push_back(node); + return false; + } else if (ngraph::is_type(node)) { + concatNames.emplace(node->get_friendly_name()); + concats.push_back(node); + return false; + } else if (ngraph::is_type(node) || + ngraph::is_type(node) || + ngraph::is_type(node) || + ngraph::is_type(node)) { + depLayerNames.emplace(node->get_friendly_name()); + nextLayerDependent.push_back(node); + return false; + } else if (ngraph::is_type(node)) { + constantsNames.emplace(node->get_friendly_name()); + constants.push_back(node); + return false; + } else if (prog.IsOpSupported(network, node) && + !ngraph::op::is_parameter(node) && + !ngraph::op::is_output(node)) { + return true; + } else { + return false; } - auto clonedNetwork = CloneAndTransformNetwork(network, _impl->m_config); - std::unordered_set supported; - std::unordered_set unsupported; - - std::unordered_set splitNames; - std::unordered_set concatNames; - std::unordered_set depLayerNames; - - std::vector> splits; - std::vector> concats; - std::vector> nextLayerDependent; - - for (InferenceEngine::details::CNNNetworkIterator itLayer{clonedNetwork.get()}; - itLayer != InferenceEngine::details::CNNNetworkIterator(); - itLayer++) { - auto layerIsSupported = [&] { - auto node = (*itLayer)->getNode(); - if (std::dynamic_pointer_cast(node) != nullptr || - std::dynamic_pointer_cast(node) != nullptr || - std::dynamic_pointer_cast(node) != nullptr || - std::dynamic_pointer_cast(node) != nullptr) { - return false; - } else if (std::dynamic_pointer_cast(node) != nullptr) { - splitNames.emplace(node->get_friendly_name()); - splits.push_back(node); - return false; - } else if (std::dynamic_pointer_cast(node) != nullptr) { - concatNames.emplace(node->get_friendly_name()); - concats.push_back(node); - return false; - } else if (std::dynamic_pointer_cast(node) != nullptr || - std::dynamic_pointer_cast(node) != nullptr || - std::dynamic_pointer_cast(node) != nullptr || - std::dynamic_pointer_cast(node) != nullptr || - ngraph::op::is_constant(node)) { - depLayerNames.emplace(node->get_friendly_name()); - nextLayerDependent.push_back(node); - return false; - } else if (CLDNNGraph::IsLayerSupported((*itLayer)->type)) { - return true; + }; + + // Get ops after transformations and check if it's supported + // Transformations might lead to the situation when single node is merged to multiple operations, + // so we mark original op as supported only if all nodes that it was merged into are supported + for (auto&& op : ops) { + for (auto&& fusedLayerName : ngraph::getFusedNamesVector(op)) { + if (InferenceEngine::details::contains(originalOpNames, fusedLayerName)) { + if (layerIsSupported(op)) { + supported.emplace(fusedLayerName); } else { - return false; - } - }(); - const auto fusedNode = (*itLayer)->getNode(); - if (fusedNode == nullptr) { - // skip layers completely generated by IR transformation - continue; - } - for (auto&& fusedLayerName : ngraph::getFusedNamesVector(fusedNode)) { - if (InferenceEngine::details::contains(originalOps, fusedLayerName)) { - if (layerIsSupported) { - supported.emplace(fusedLayerName); - } else { - unsupported.emplace(fusedLayerName); - } + unsupported.emplace(fusedLayerName); } } } + } - for (auto&& layerName : supported) { - if (InferenceEngine::details::contains(unsupported, layerName)) { - supported.erase(layerName); - } + for (auto&& layerName : supported) { + if (InferenceEngine::details::contains(unsupported, layerName)) { + supported.erase(layerName); } - unsupported.clear(); - - for (const auto & split : splits) { - bool is_supported = true; - const auto outputs = split->outputs(); - for (const auto& output : outputs) { - const auto& name = output.get_node()->get_friendly_name(); + } + unsupported.clear(); + + // Check set of heuristics to produce more efficient hetero sub-graph. Note: checks order is important. + // 1. Split is marked as supported when all output ops can be offloaded to GPU + for (const auto & op : splits) { + bool is_supported = true; + for (size_t i = 0; i < op->get_output_size(); i++) { + auto outTensors = op->get_output_target_inputs(i); + for (auto& t : outTensors) { + auto output = t.get_node(); + const auto& name = output->get_friendly_name(); if (!InferenceEngine::details::contains(supported, name) && !InferenceEngine::details::contains(depLayerNames, name) && !InferenceEngine::details::contains(concatNames, name) && @@ -527,69 +555,97 @@ QueryNetworkResult clDNNEngine::QueryNetwork(const CNNNetwork& network, break; } } - if (is_supported) { - supported.emplace(split->get_friendly_name()); - } } + if (is_supported) { + supported.emplace(op->get_friendly_name()); + } + } - for (const auto& concat : concats) { - bool is_supported = true; - const auto inputs = concat->inputs(); - for (const auto& input : inputs) { - const auto& name = input.get_node()->get_friendly_name(); - if (!InferenceEngine::details::contains(supported, name) && - !InferenceEngine::details::contains(depLayerNames, name) && - !InferenceEngine::details::contains(concatNames, name)) { - is_supported = false; - break; - } - } - if (is_supported) { - supported.emplace(concat->get_friendly_name()); + // 2. Concat is marked as supported when all inputs can be offloaded to GPU + for (const auto& op : concats) { + bool is_supported = true; + for (size_t i = 0; i < op->get_input_size(); i++) { + auto input = op->get_input_node_shared_ptr(i); + const auto& name = input->get_friendly_name(); + if (!InferenceEngine::details::contains(supported, name) && + !InferenceEngine::details::contains(depLayerNames, name) && + !InferenceEngine::details::contains(concatNames, name)) { + is_supported = false; + break; } } + if (is_supported) { + supported.emplace(op->get_friendly_name()); + } + } - for (const auto& cnl : nextLayerDependent) { - bool is_supported = true; - // both inputs and output should be GPU to remain on GPU - const auto inputs = cnl->inputs(); - for (const auto& input : inputs) { - const auto& name = input.get_node()->get_friendly_name(); + // 3. Some layers are marked as supported when all inputs and outputs can be offloaded to GPU + for (const auto& op : nextLayerDependent) { + bool is_supported = true; + // both inputs and output should be GPU to remain on GPU + for (size_t i = 0; i < op->get_input_size(); i++) { + auto input = op->get_input_node_shared_ptr(i); + const auto& name = input->get_friendly_name(); + // All inputs must be supported or be a constant + if (!InferenceEngine::details::contains(supported, name) && !InferenceEngine::details::contains(constantsNames, name)) { + is_supported = false; + break; + } + } + for (size_t i = 0; i < op->get_output_size(); i++) { + auto outTensors = op->get_output_target_inputs(i); + for (auto& t : outTensors) { + auto output = t.get_node(); + const auto& name = output->get_friendly_name(); if (!InferenceEngine::details::contains(supported, name)) { is_supported = false; break; } } - const auto outputs = cnl->outputs(); - for (const auto& output : outputs) { - const auto& name = output.get_node()->get_friendly_name(); + } + if (is_supported) { + supported.emplace(op->get_friendly_name()); + } + } + + // 4. Constants are marked as supported when all outputs can be offloaded to GPU + for (const auto& op : constants) { + bool is_supported = true; + for (size_t i = 0; i < op->get_output_size(); i++) { + auto outTensors = op->get_output_target_inputs(i); + for (auto& t : outTensors) { + auto output = t.get_node(); + const auto& name = output->get_friendly_name(); if (!InferenceEngine::details::contains(supported, name)) { is_supported = false; break; } } - if (is_supported) { - supported.emplace(cnl->get_friendly_name()); - } } + if (is_supported) { + supported.emplace(op->get_friendly_name()); + } + } - for (auto&& node : function->get_ops()) { - if (InferenceEngine::details::contains(supported, node->get_friendly_name())) { - for (auto&& inputNodeOutput : node->input_values()) { - if (ngraph::op::is_constant(inputNodeOutput.get_node()) || ngraph::op::is_parameter(inputNodeOutput.get_node())) { - supported.emplace(inputNodeOutput.get_node()->get_friendly_name()); - } + // Mark original constants/parameters/results ops as supported for each supported operation + // since rt_info doesn't contain names of constant that are removed during constant folding + for (auto&& node : originalOps) { + if (InferenceEngine::details::contains(supported, node->get_friendly_name())) { + for (auto&& inputNodeOutput : node->input_values()) { + if (ngraph::op::is_constant(inputNodeOutput.get_node()) || ngraph::op::is_parameter(inputNodeOutput.get_node())) { + supported.emplace(inputNodeOutput.get_node()->get_friendly_name()); } - for (auto&& outputs : node->outputs()) { - for (auto&& outputNodeInput : outputs.get_target_inputs()) { - if (ngraph::op::is_output(outputNodeInput.get_node())) { - supported.emplace(outputNodeInput.get_node()->get_friendly_name()); - } + } + for (auto&& outputs : node->outputs()) { + for (auto&& outputNodeInput : outputs.get_target_inputs()) { + if (ngraph::op::is_output(outputNodeInput.get_node())) { + supported.emplace(outputNodeInput.get_node()->get_friendly_name()); } } } + } - if (ngraph::op::is_constant(node) || ngraph::op::is_parameter(node)) { + if (ngraph::op::is_constant(node) || ngraph::op::is_parameter(node)) { if (!InferenceEngine::details::contains(supported, node->output(0).get_target_inputs().begin()->get_node()->get_friendly_name())) { supported.erase(node->get_friendly_name()); } @@ -598,69 +654,10 @@ QueryNetworkResult clDNNEngine::QueryNetwork(const CNNNetwork& network, supported.erase(node->get_friendly_name()); } } - } - - for (auto&& layerName : supported) { - res.supportedLayersMap.emplace(layerName, GetName()); - } - } else { - std::vector concats; - std::vector nextLayerDependent; - std::vector sortedLayers = CNNNetSortTopologically(network); - for (auto layer : sortedLayers) { - if (CaselessEq()(layer->type, "DetectionOutput")) { - } else if (CaselessEq()(layer->type, "PriorBox")) { - } else if (CaselessEq()(layer->type, "Proposal")) { - } else if (CaselessEq()(layer->type, "SimplerNMS")) { - } else if (CaselessEq()(layer->type, "Concat")) { - concats.push_back(layer); - } else if (CaselessEq()(layer->type, "reshape")) { - nextLayerDependent.push_back(layer); - } else if (CaselessEq()(layer->type, "permute")) { - nextLayerDependent.push_back(layer); - } else if (CaselessEq()(layer->type, "Const")) { - nextLayerDependent.push_back(layer); - } else if (CLDNNGraph::IsLayerSupported(layer->type)) { - res.supportedLayersMap.insert({ layer->name, GetName() }); - } - } - // evaluation of concats - if all parent layers are supported, only in this case we - // will mark concat as a supported for GPU - for (const auto& concat : concats) { - // take all parrents. - bool supported = true; - for (DataWeakPtr insData : concat->insData) { - CNNLayerPtr prev = getCreatorLayer(insData.lock()).lock(); - // verify if previous layer is not supported or if it in the list of not defined layers yet - // not defined layers are treated as layers which will be assigned to GPU if next layer is assigned to GPU - if (res.supportedLayersMap.find(prev->name) == res.supportedLayersMap.end() - && std::find(nextLayerDependent.begin(), nextLayerDependent.end(), prev) == nextLayerDependent.end()) { - supported = false; - } - } - if (supported) { - res.supportedLayersMap.insert({ concat->name, GetName() }); - } - } - - // evaluation of constant blobs - if all consumers are on GPU, - // then leave it on GPU, else - move to other device - for (auto cnl = nextLayerDependent.rbegin(); - cnl != nextLayerDependent.rend(); - cnl++) { - bool supported = true; - for (DataPtr out : (*cnl)->outData) { - for (auto ol : getInputTo(out)) { - if (res.supportedLayersMap.find(ol.second->name) == res.supportedLayersMap.end()) { - supported = false; - } - } - } + } - if (supported) { - res.supportedLayersMap.insert({ (*cnl)->name, GetName() }); - } - } + for (auto&& layerName : supported) { + res.supportedLayersMap.emplace(layerName, GetName()); } return res; diff --git a/inference-engine/src/cldnn_engine/cldnn_engine.h b/inference-engine/src/cldnn_engine/cldnn_engine.h index 31a502a3b031f9..963d9fd6069c69 100644 --- a/inference-engine/src/cldnn_engine/cldnn_engine.h +++ b/inference-engine/src/cldnn_engine/cldnn_engine.h @@ -16,7 +16,7 @@ namespace CLDNNPlugin { using CLDNNCustomLayerPtr = std::shared_ptr; class clDNNEngine : public InferenceEngine::InferencePluginInternal, - public gpu::details::param_map_obj_getter { + public InferenceEngine::gpu::details::param_map_obj_getter { struct impl; std::shared_ptr _impl; @@ -27,8 +27,11 @@ class clDNNEngine : public InferenceEngine::InferencePluginInternal, CLDNNRemoteCLContext::Ptr m_defaultContext; cldnn::device_info GetDeviceInfo(const std::map &config) const; - InferenceEngine::ICNNNetwork::Ptr CloneAndTransformNetwork(const InferenceEngine::ICNNNetwork& network, - CLDNNPlugin::Config config) const; + InferenceEngine::CNNNetwork CloneAndTransformNetwork(const InferenceEngine::CNNNetwork& network, + const CLDNNPlugin::Config& config) const; + + void RegisterPrimitives(); + void UpdateConfig(Config& conf, const InferenceEngine::CNNNetwork &network, const std::map ¶ms) const; public: clDNNEngine(); @@ -46,7 +49,7 @@ class clDNNEngine : public InferenceEngine::InferencePluginInternal, const std::map& config) const override; InferenceEngine::RemoteContext::Ptr CreateContext(const InferenceEngine::ParamMap& params) override; - InferenceEngine::RemoteContext::Ptr GetDefaultContext(const ParamMap& params) override; + InferenceEngine::RemoteContext::Ptr GetDefaultContext(const InferenceEngine::ParamMap& params) override; }; }; // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/cldnn_executable_network.cpp b/inference-engine/src/cldnn_engine/cldnn_executable_network.cpp index 03ea0b73bec9b3..2a5bfe28f756e7 100644 --- a/inference-engine/src/cldnn_engine/cldnn_executable_network.cpp +++ b/inference-engine/src/cldnn_engine/cldnn_executable_network.cpp @@ -16,8 +16,6 @@ #include #include -#include -#include #include "cldnn_infer_request.h" #include #include "cldnn_async_infer_request.h" diff --git a/inference-engine/src/cldnn_engine/cldnn_executable_network.h b/inference-engine/src/cldnn_engine/cldnn_executable_network.h index 9ab84fd52e41c7..c9eb89178f2cc5 100644 --- a/inference-engine/src/cldnn_engine/cldnn_executable_network.h +++ b/inference-engine/src/cldnn_engine/cldnn_executable_network.h @@ -12,7 +12,6 @@ #include #include "ie_blob.h" #include "cpp/ie_cnn_network.h" -#include "debug_options.h" #include #include "cldnn_graph.h" #include "cldnn_config.h" @@ -24,7 +23,7 @@ class CLDNNExecNetwork : public InferenceEngine::ExecutableNetworkThreadSafeDefa public: typedef std::shared_ptr Ptr; - CLDNNExecNetwork(InferenceEngine::CNNNetwork &network, RemoteContext::Ptr context, Config config); + CLDNNExecNetwork(InferenceEngine::CNNNetwork &network, InferenceEngine::RemoteContext::Ptr context, Config config); InferenceEngine::CNNNetwork GetExecGraphInfo() override; InferenceEngine::IInferRequest::Ptr CreateInferRequest() override; @@ -33,11 +32,10 @@ class CLDNNExecNetwork : public InferenceEngine::ExecutableNetworkThreadSafeDefa InferenceEngine::Parameter GetMetric(const std::string &name) const override; InferenceEngine::Parameter GetConfig(const std::string &name) const override; - RemoteContext::Ptr GetContext() const override; - + InferenceEngine::RemoteContext::Ptr GetContext() const override; std::vector> m_graphs; - gpu::ClContext::Ptr m_context; + InferenceEngine::gpu::ClContext::Ptr m_context; Config m_config; InferenceEngine::ITaskExecutor::Ptr m_taskExecutor; }; diff --git a/inference-engine/src/cldnn_engine/cldnn_graph.cpp b/inference-engine/src/cldnn_engine/cldnn_graph.cpp index 0c487f23644a8a..e4806250bf646a 100644 --- a/inference-engine/src/cldnn_engine/cldnn_graph.cpp +++ b/inference-engine/src/cldnn_engine/cldnn_graph.cpp @@ -17,8 +17,6 @@ #include "simple_math.h" #include #include -#include -#include #include "cldnn_infer_request.h" #include #include @@ -69,12 +67,12 @@ void CLDNNGraph::Build() { if (GetMaxDynamicBatchSize() > 1) { int m_bv_sz = m_program->GetMaxBatchSizeForSingleProgram(); for (int b = m_bv_sz - 1; b >= 0; b--) { - auto network = BuildNetwork(m_program->getCompiledProgram(b)); + auto network = BuildNetwork(m_program->GetCompiledProgram(b)); m_networks.insert(m_networks.begin(), network); GetEngine()->release_pending_memory(network->get_id()); } } else { - auto network = BuildNetwork(m_program->getCompiledProgram()); + auto network = BuildNetwork(m_program->GetCompiledProgram()); m_networks.emplace_back(network); GetEngine()->release_pending_memory(network->get_id()); } @@ -131,6 +129,7 @@ InferenceEngine::CNNNetwork CLDNNGraph::GetExecGraphInfoByPrimitivesInfo(std::ve } }; + // TODO: Adjust output layer names to be aligned with ngraph and add new ops auto to_IE_type_name = [](const std::string& cldnn_name) -> std::string{ static std::map type_n2l { { "activation", "Activation" }, @@ -748,6 +747,9 @@ std::string CLDNNGraph::MapOutputName(std::string outName) const { auto allPrimitiveIds = GetNetwork()->get_all_primitives(); // Find correct output ID. Start with name stored in IR. + if (primitiveIDs.find(outName) == primitiveIDs.end()) { + THROW_IE_EXCEPTION << "output with name " << outName << " was not found in primitiveIDs"; + } std::string outputID = primitiveIDs.at(outName); while (std::find(networkOutputsIDs.begin(), networkOutputsIDs.end(), outputID) == networkOutputsIDs.end()) { // If current ID isn't found in cldnn network outputs, get previous primitive id and try again. diff --git a/inference-engine/src/cldnn_engine/cldnn_graph.h b/inference-engine/src/cldnn_engine/cldnn_graph.h index c4dc89473752fa..40dc4bab68b971 100644 --- a/inference-engine/src/cldnn_engine/cldnn_graph.h +++ b/inference-engine/src/cldnn_engine/cldnn_graph.h @@ -16,17 +16,10 @@ #include #include "ie_blob.h" #include "cpp/ie_cnn_network.h" -#include "debug_options.h" + #include -#include -#include #include -#include -#include -#include -#include -#include -#include + #include #include "cldnn_custom_layer.h" #include "cldnn_config.h" @@ -39,24 +32,20 @@ class CLDNNGraph { public: typedef std::shared_ptr Ptr; - CLDNNGraph(InferenceEngine::CNNNetwork& network, gpu::ClContext::Ptr context, Config config, uint16_t stream_id = 0); + CLDNNGraph(InferenceEngine::CNNNetwork& network, InferenceEngine::gpu::ClContext::Ptr context, Config config, uint16_t stream_id = 0); explicit CLDNNGraph(std::shared_ptr graph, uint16_t stream_id = 0); InferenceEngine::CNNNetwork GetExecGraphInfo(); bool IsLoaded() const; - static bool IsLayerSupported(const std::string& type) { - return Program::LayerTypeFromStr(type) != Program::NO_TYPE; - } - void GetPerformanceCounts(std::map& perfMap) const; void UpdatePerfStatistics(); const Config& getConfig() const { return m_config; } - gpu::ClContext::Ptr GetContext() { return m_context; } + InferenceEngine::gpu::ClContext::Ptr GetContext() { return m_context; } std::shared_ptr GetEngine() const { return getContextImpl(m_context)->GetEngine(); } int GetMaxDynamicBatchSize() const { return getConfig().max_dynamic_batch; } - const std::map& GetInputLayouts() const { return m_program->getInputLayouts(); } + const std::map& GetInputLayouts() const { return m_program->GetInputLayouts(); } size_t GetNetworksCount() const { return m_networks.size(); } std::shared_ptr GetNetwork(size_t idx = 0) const; InferenceEngine::SizeVector GetOutputSize(std::string outName) const; @@ -67,7 +56,7 @@ class CLDNNGraph { std::string m_networkName; Config m_config; - gpu::ClContext::Ptr m_context; + InferenceEngine::gpu::ClContext::Ptr m_context; std::vector> m_networks; std::map primitiveIDs; std::map> primitivesToIRLayersMap; diff --git a/inference-engine/src/cldnn_engine/cldnn_infer_request.cpp b/inference-engine/src/cldnn_engine/cldnn_infer_request.cpp index 931083afcd5198..187e8dac673379 100644 --- a/inference-engine/src/cldnn_engine/cldnn_infer_request.cpp +++ b/inference-engine/src/cldnn_engine/cldnn_infer_request.cpp @@ -273,7 +273,7 @@ void CLDNNInferRequest::copyInputData(std::shared_ptr network, size_t n = (bi == nullptr) ? inputBlob.size() : bi->buf_size; size_t offset = (bi == nullptr) ? 0 : bi->buf_offset; - cldnn::primitive_id internalName = "input:" + inputName; + cldnn::primitive_id internalName = "parameter:" + inputName; auto locked = inputBlob.cbuffer(); switch (inputBlob.getTensorDesc().getPrecision()) { case Precision::FP32: { @@ -562,6 +562,7 @@ void CLDNNInferRequest::SetBlob(const char *name, const Blob::Ptr &data) { } void CLDNNInferRequest::AllocateInputs() { + auto inputLayouts = m_graph->GetInputLayouts(); // allocate inputs for (auto& ni : _networkInputs) { std::string name = ni.first; @@ -572,8 +573,14 @@ void CLDNNInferRequest::AllocateInputs() { cldnn::primitive_id YName(name + "_Y"); cldnn::primitive_id UVName(name + "_UV"); - input_alloc(YName, m_graph->GetInputLayouts().at(YName)); - input_alloc(UVName, m_graph->GetInputLayouts().at(UVName)); + if (inputLayouts.find(YName) == inputLayouts.end()) { + THROW_IE_EXCEPTION << "Input layout for " << YName << " is not found"; + } + if (inputLayouts.find(UVName) == inputLayouts.end()) { + THROW_IE_EXCEPTION << "Input layout for " << UVName << " is not found"; + } + input_alloc(YName, inputLayouts.at(YName)); + input_alloc(UVName, inputLayouts.at(UVName)); size_t height = desc.getDims()[2], width = desc.getDims()[3]; cldnn::pointer input_mem_ptr_Y = inputsMemory.at(YName).pointer(); @@ -586,7 +593,10 @@ void CLDNNInferRequest::AllocateInputs() { _inputs[name] = make_shared_blob(blobY, blobUV); } else { - cldnn::layout layout = m_graph->GetInputLayouts().at(name); + if (inputLayouts.find(name) == inputLayouts.end()) { + THROW_IE_EXCEPTION << "Input layout for " << name << " is not found"; + } + cldnn::layout layout = inputLayouts.at(name); input_alloc(name, layout); cldnn::pointer mem_ptr = inputsMemory.at(name).pointer(); _inputs[name] = createInputBlob(desc, mem_ptr.data()); @@ -907,7 +917,7 @@ void CLDNNInferRequest::PrepareInput(const cldnn::primitive_id &inputName, const return (blob_ptr == mem_ptr) && (blob.byteSize() == memory.size()); }; - cldnn::primitive_id internalName = "input:" + inputName; + cldnn::primitive_id internalName = "parameter:" + inputName; const cldnn::memory& memory = inputsMemory.at(inputName); auto _nw_ptr = m_graph->GetNetwork(); auto prec = inputBlob.getTensorDesc().getPrecision(); diff --git a/inference-engine/src/cldnn_engine/cldnn_lstm.cpp b/inference-engine/src/cldnn_engine/cldnn_lstm.cpp deleted file mode 100644 index 60bcee4c693055..00000000000000 --- a/inference-engine/src/cldnn_engine/cldnn_lstm.cpp +++ /dev/null @@ -1,585 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "cldnn_common_utils.h" -#include "cldnn_program.h" - -using namespace InferenceEngine; -using namespace InferenceEngine::details; - -namespace CLDNNPlugin { - -std::string get_string_id(size_t i) { - std::stringstream ss; - ss << std::setw(5) << std::setfill('0') << i; - return ss.str(); -} - -void Program::CreateLSTMCellPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - int lstm_batch_size, lstm_input_size, lstm_hidden_size; - bool hasBias = false; - auto inputPrimitives = GetPrevLayersPrimitives(layer); - - std::string layerName = layer_type_name_ID(layer); - cldnn::primitive_id weightID = layerName + m_weightsTag; - cldnn::primitive_id biasID = layerName + m_biasesTag; - - /* check incoming CNN layer and setup required variables */ - { - auto in_data0 = layer->insData[0].lock(); - if (!in_data0) - THROW_IE_EXCEPTION << "Missing first input for LSTMCell layer " << layer->name; - - const auto in_dims0 = in_data0->getTensorDesc().getDims(); - const auto out_dims0 = layer->outData[0]->getTensorDesc().getDims(); - - lstm_input_size = in_dims0.back(); - lstm_batch_size = in_dims0.at(in_dims0.size()-2); - lstm_hidden_size = out_dims0.back(); - - auto in_data1 = layer->insData[1].lock(); - if (!in_data1) - THROW_IE_EXCEPTION << "Missing second input for LSTMCell layer " << layer->name; - - auto in_data2 = layer->insData[2].lock(); - if (!in_data2) - THROW_IE_EXCEPTION << "Missing third input for LSTMCell layer " << layer->name; - - if (in_dims0.size() != 2 || - in_data1->getTensorDesc().getDims().size() != 2 || - in_data2->getTensorDesc().getDims().size() != 2) - THROW_IE_EXCEPTION << "Wrong input shapes for LSTMCell Layer " << layer->name; - } - - /* Prepare weight/bias memory primitives */ - { - auto wLayer = as(layer); - auto pWeightsBlob = wLayer->_weights; - cldnn::tensor wTensor = cldnn::tensor(cldnn::batch(4 * lstm_hidden_size), cldnn::feature(1), cldnn::spatial(lstm_input_size + lstm_hidden_size, 1)); - cldnn::layout WLayout = cldnn::layout(DataTypeFromPrecision(pWeightsBlob->getTensorDesc().getPrecision()), m_defaultFormat, wTensor); - weightID = CreatePrimitiveFromBlob(topology, weightID, pWeightsBlob, WLayout); - - /* create bias memory primitive */ - auto pBiasBlob = wLayer->_biases; - if (pBiasBlob != nullptr) { - cldnn::tensor bTensor = cldnn::tensor(cldnn::batch(1), cldnn::feature(1), cldnn::spatial(4 * lstm_hidden_size, 1)); - cldnn::layout BLayout = cldnn::layout(DataTypeFromPrecision(pBiasBlob->getTensorDesc().getPrecision()), m_defaultFormat, bTensor); - - biasID = CreatePrimitiveFromBlob(topology, biasID, pBiasBlob, BLayout); - hasBias = true; - } - } - - cldnn::primitive_id inReshapeID = layerName + "_inReshape"; - cldnn::primitive_id permuteID = layerName + "_inputReorder"; - cldnn::primitive_id inHiddenReshapeID = layerName + "_inHiddenReshape"; - cldnn::primitive_id inHiddenReorderID = layerName + "_inHiddenReorder"; - cldnn::primitive_id gemmReshapeID = layerName + "_gemmReshape"; - cldnn::primitive_id gemmReorderID = layerName + "_gemmReorder"; - cldnn::primitive_id concatID = layerName + "_inputConcat"; - - // LSTM primitive works with single precision for all in/out/weights tensors - auto lstmPrecision = layer->outData[0]->getPrecision(); - - cldnn::tensor inputShape = { lstm_batch_size, 1, lstm_input_size, 1 }; - cldnn::tensor hiddenStateShape = { lstm_batch_size, 1, lstm_hidden_size, 1 }; - cldnn::layout inputLayout = cldnn::layout(DataTypeFromPrecision(lstmPrecision), cldnn::format::bfyx, inputShape); - cldnn::layout hiddenLayout = cldnn::layout(DataTypeFromPrecision(lstmPrecision), cldnn::format::bfyx, hiddenStateShape); - topology.add(cldnn::reshape(inReshapeID, inputPrimitives[0], inputShape)); - topology.add(cldnn::reorder(permuteID, inReshapeID, inputLayout)); - - AddInnerPrimitiveToProfiler(inReshapeID, layer->name, layer); - AddInnerPrimitiveToProfiler(permuteID, layer->name, layer); - - std::string hiddenInResh = inHiddenReshapeID + "_1"; - std::string hiddenInStr = inHiddenReorderID + "_1"; - std::string cellInResh = inHiddenReshapeID + "_2"; - std::string cellInStr = inHiddenReorderID + "_2"; - topology.add(cldnn::reshape(hiddenInResh, inputPrimitives[1], hiddenStateShape)); - topology.add(cldnn::reorder(hiddenInStr, hiddenInResh, hiddenLayout)); - topology.add(cldnn::reshape(cellInResh, inputPrimitives[2], hiddenStateShape)); - topology.add(cldnn::reorder(cellInStr, cellInResh, hiddenLayout)); - topology.add(cldnn::concatenation(concatID, { permuteID, hiddenInStr }, cldnn::concatenation::concatenation_axis::along_x)); - - AddInnerPrimitiveToProfiler(hiddenInResh, layer->name, layer); - AddInnerPrimitiveToProfiler(hiddenInStr, layer->name, layer); - AddInnerPrimitiveToProfiler(cellInResh, layer->name, layer); - AddInnerPrimitiveToProfiler(cellInStr, layer->name, layer); - AddInnerPrimitiveToProfiler(concatID, layer->name, layer); - - cldnn::tensor gemmSz = cldnn::tensor{ lstm_batch_size, 1, 4 * lstm_hidden_size, 1 }; - cldnn::layout gemmLayout = cldnn::layout(DataTypeFromPrecision(lstmPrecision), cldnn::format::bfyx, gemmSz); - cldnn::tensor hiddenSz = cldnn::tensor{ lstm_batch_size, 1, lstm_hidden_size, 1 }; - cldnn::tensor cellCropSz = cldnn::tensor{0, 1, 0, 0}; - - std::string lstm_fc_id = layerName + "_fully_connected"; - std::string lstm_elt_id = layerName + "_lstm_elt"; - std::string crop_id = layerName + "_crop"; - - topology.add(cldnn::fully_connected(lstm_fc_id, concatID, weightID, hasBias ? biasID : "")); - topology.add(cldnn::reshape(gemmReshapeID, lstm_fc_id, gemmSz)); - topology.add(cldnn::reorder(gemmReorderID, gemmReshapeID, gemmLayout)); - topology.add(cldnn::lstm_elt(lstm_elt_id, gemmReorderID, cellInStr, - 0, 0, {}, {}, cldnn::lstm_weights_order::fizo)); - - AddInnerPrimitiveToProfiler(lstm_fc_id, layer->name, layer); - AddInnerPrimitiveToProfiler(gemmReshapeID, layer->name, layer); - AddInnerPrimitiveToProfiler(gemmReorderID, layer->name, layer); - AddInnerPrimitiveToProfiler(lstm_elt_id, layer->name, layer); - - cldnn::primitive_id outputHiddenID = layerName; - topology.add(cldnn::crop(outputHiddenID, lstm_elt_id, hiddenSz, cldnn::tensor{0, 0, 0, 0})); - AddInnerPrimitiveToProfiler(outputHiddenID, layer->name, layer); - cldnn::primitive_id outputCellID = layer_type_lower(layer) + ":" + layer->outData[1]->getName(); - topology.add(cldnn::crop(outputCellID, lstm_elt_id, hiddenSz, cellCropSz)); - AddInnerPrimitiveToProfiler(outputCellID, layer->name, layer); - - // output primitive IDs - primitiveIDs[outputHiddenID] = outputHiddenID; // LSTMCell:LSTMCell - "concat hidden" - primitiveIDs[layer_type_lower(layer) + ":" + layer->outData[0]->getName()] = outputHiddenID; // LSTMCell:LSTMCell:0 - hidden state - primitiveIDs[outputCellID] = outputCellID; // LSTMCell:LSTMCell:1 - cell state - - AddPrimitiveToProfiler(layerName, layer, outputHiddenID); -} - -void Program::CreateRegularLSTM(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - int lstm_batch_size, lstm_sequence_len, lstm_input_size, lstm_hidden_size; - bool hasInitialHidden = false, hasInitialCell = false, hasBias = false, isForward = true; - auto inputPrimitives = GetPrevLayersPrimitives(layer); - - std::string layerName = layer_type_name_ID(layer); - cldnn::primitive_id weightID = layerName + m_weightsTag; - cldnn::primitive_id biasID = layerName + m_biasesTag; - auto rnnLayer = as (layer); - bool permute_input = (1 != rnnLayer->axis); - - /* check incoming CNN layer and setup required variables */ - { - if (rnnLayer->cellType != RNNSequenceLayer::LSTM) - THROW_IE_EXCEPTION << "RNN layer supports only LSTM like cell"; - - auto in_data0 = layer->insData[0].lock(); - if (!in_data0) - THROW_IE_EXCEPTION << "Missing first input for RNN layer " << layer->name; - - const auto in_dims0 = in_data0->getTensorDesc().getDims(); - const auto out_dims0 = layer->outData[0]->getTensorDesc().getDims(); - - /* do we have initial hidden and cell? - if blobs are not null, direct the data from them - into corresponding LSTM inputs */ - auto in_data1 = layer->insData[1].lock(); - if (in_data1) { - hasInitialHidden = true; - } - - auto in_data2 = layer->insData[2].lock(); - if (in_data2) { - hasInitialCell = true; - } - - if (in_dims0.size() != 3 || - in_data1->getTensorDesc().getDims().size() != 2 || - in_data2->getTensorDesc().getDims().size() != 2) - THROW_IE_EXCEPTION << "Wrong input shapes for RNN Layer " << layer->name; - - if (!permute_input) { - lstm_batch_size = in_dims0.front(); - lstm_sequence_len = in_dims0[1]; - } else { - lstm_batch_size = in_dims0[1]; - lstm_sequence_len = in_dims0.front(); - } - - lstm_input_size = in_dims0.back(); - lstm_hidden_size = out_dims0.back(); - - if (rnnLayer->direction != RNNSequenceLayer::FWD && rnnLayer->direction != RNNSequenceLayer::BWD) - THROW_IE_EXCEPTION << "Support only forward and backward direction for RNN Layer " << layer->name; - isForward = rnnLayer->direction == RNNSequenceLayer::FWD; - } - - /* Prepare weight/bias memory primitives */ - { - auto wLayer = as(layer); - auto pWeightsBlob = wLayer->_weights; - cldnn::tensor wTensor = cldnn::tensor(cldnn::batch(4 * lstm_hidden_size), cldnn::feature(1), cldnn::spatial(lstm_input_size + lstm_hidden_size, 1)); - cldnn::layout WLayout = cldnn::layout(DataTypeFromPrecision(pWeightsBlob->getTensorDesc().getPrecision()), m_defaultFormat, wTensor); - weightID = CreatePrimitiveFromBlob(topology, weightID, pWeightsBlob, WLayout); - - /* create bias memory primitive */ - auto pBiasBlob = wLayer->_biases; - if (pBiasBlob != nullptr) { - cldnn::tensor bTensor = cldnn::tensor(cldnn::batch(1), cldnn::feature(1), cldnn::spatial(4 * lstm_hidden_size, 1)); - cldnn::layout BLayout = cldnn::layout(DataTypeFromPrecision(pBiasBlob->getTensorDesc().getPrecision()), m_defaultFormat, bTensor); - - biasID = CreatePrimitiveFromBlob(topology, biasID, pBiasBlob, BLayout); - hasBias = true; - } - } - - std::vector> input_ids_offsets; - std::vector output_ids_offsets; - - cldnn::primitive_id inReshapeID = layerName + "_inReshape"; - cldnn::primitive_id permuteID = layerName + "_inputReorder"; - cldnn::primitive_id inHiddenReshapeID = layerName + "_inHiddenReshape"; - - // LSTM primitive works with single precision for all in/out/weights tensors - auto lstmPrecision = layer->outData[0]->getPrecision(); - - cldnn::tensor inputShape; - - if (permute_input) { - inputShape = { lstm_sequence_len, lstm_batch_size, lstm_input_size, 1 }; - } else { - inputShape = { lstm_batch_size, lstm_sequence_len, lstm_input_size, 1 }; - } - cldnn::tensor hiddenStateShape = { lstm_batch_size, 1, lstm_hidden_size, 1 }; - cldnn::layout inputLayout = cldnn::layout(DataTypeFromPrecision(lstmPrecision), cldnn::format::bfyx, inputShape); - topology.add(cldnn::reshape(inReshapeID, inputPrimitives[0], inputShape)); - topology.add(cldnn::reorder(permuteID, inReshapeID, inputLayout)); - - topology.add(cldnn::reshape(inHiddenReshapeID+"_1", inputPrimitives[1], hiddenStateShape)); - topology.add(cldnn::reshape(inHiddenReshapeID+"_2", inputPrimitives[2], hiddenStateShape)); - - AddInnerPrimitiveToProfiler(inReshapeID, layerName, layer); - AddInnerPrimitiveToProfiler(permuteID, layerName, layer); - AddInnerPrimitiveToProfiler(inHiddenReshapeID + "_1", layerName, layer); - AddInnerPrimitiveToProfiler(inHiddenReshapeID + "_2", layerName, layer); - - for (int i = 0; i < lstm_sequence_len; ++i) - input_ids_offsets.push_back({ get_string_id(i), {0, i, 0, 0} }); - - cldnn::primitive_id inputSplitID = layerName + "_inputSplit"; - - if (permute_input) { - topology.add(cldnn::permute(layerName + "_inputSwap", permuteID, { 1, 0, 2, 3 })); - AddInnerPrimitiveToProfiler(layerName + "_inputSwap", layerName, layer); - topology.add(cldnn::split(inputSplitID, layerName + "_inputSwap", input_ids_offsets)); - } else { - topology.add(cldnn::split(inputSplitID, permuteID, input_ids_offsets)); - } - AddInnerPrimitiveToProfiler(inputSplitID, layerName, layer); - - cldnn::tensor gemmSz = cldnn::tensor{ lstm_batch_size, 1, 4 * lstm_hidden_size, 1 }; - cldnn::layout gemmLayout = cldnn::layout(DataTypeFromPrecision(lstmPrecision), cldnn::format::bfyx, gemmSz); - cldnn::tensor hiddenSz = cldnn::tensor{ lstm_batch_size, 1, lstm_hidden_size, 1 }; - cldnn::tensor cellCropSz = cldnn::tensor{0, 1, 0, 0}; - std::string hiddenStr = hasInitialHidden ? inHiddenReshapeID+"_1" : ""; - std::string cellStr = hasInitialCell ? inHiddenReshapeID+"_2" : ""; - - for (int i = 0; i < lstm_sequence_len; ++i) { - std::string concatID = layerName + "_inputConcat" + get_string_id(i); - std::string lstm_fc_id = layerName + "_fully_connected" + get_string_id(i); - std::string lstm_fc_resh_id = layerName + "_gemmReshape" + get_string_id(i); - std::string lstm_fc_reor_id = layerName + "_gemmReorder" + get_string_id(i); - std::string lstm_elt_id = layerName + "_lstm_elt" + get_string_id(i); - std::string crop_id = layerName + "_crop" + get_string_id(i); - - int seqIdx = isForward ? i : lstm_sequence_len - 1 - i; - if (hiddenStr != "") { - topology.add(cldnn::concatenation(concatID, { inputSplitID + ":" + get_string_id(seqIdx), hiddenStr }, - cldnn::concatenation::concatenation_axis::along_x)); - AddInnerPrimitiveToProfiler(concatID, layerName, layer); - topology.add(cldnn::fully_connected(lstm_fc_id, concatID, weightID, hasBias ? biasID : "")); - AddInnerPrimitiveToProfiler(lstm_fc_id, layerName, layer); - AddInnerPrimitiveToProfiler(inputSplitID + ":" + get_string_id(seqIdx), layerName, layer); - } else { - topology.add(cldnn::fully_connected(lstm_fc_id, inputSplitID + ":" + get_string_id(seqIdx), weightID, hasBias ? biasID : "")); - AddInnerPrimitiveToProfiler(lstm_fc_id, layerName, layer); - } - - topology.add(cldnn::reshape(lstm_fc_resh_id, lstm_fc_id, gemmSz)); - topology.add(cldnn::reorder(lstm_fc_reor_id, lstm_fc_resh_id, gemmLayout)); - topology.add(cldnn::lstm_elt(lstm_elt_id, lstm_fc_reor_id, - cellStr, 0, 0, {}, {}, - cldnn::lstm_weights_order::fizo)); - AddInnerPrimitiveToProfiler(lstm_fc_resh_id, layerName, layer); - AddInnerPrimitiveToProfiler(lstm_fc_reor_id, layerName, layer); - AddInnerPrimitiveToProfiler(lstm_elt_id, layerName, layer); - - hiddenStr = crop_id + ":hidden"; - cellStr = crop_id + ":cell"; - topology.add(cldnn::crop(hiddenStr, lstm_elt_id, hiddenSz, cldnn::tensor{ 0, 0, 0, 0 })); - AddInnerPrimitiveToProfiler(hiddenStr, layerName, layer); - output_ids_offsets.push_back(hiddenStr); - - if (i < lstm_sequence_len - 1) { - topology.add(cldnn::crop(cellStr, lstm_elt_id, hiddenSz, cellCropSz)); - AddInnerPrimitiveToProfiler(cellStr, layerName, layer); - } else { - // last hidden state crop (output 2) - if (layer->outData.size() > 1) { - cldnn::primitive_id outputHiddenID = layer_type_lower(layer) + ":" + layer->outData[1]->getName(); - primitiveIDs[hiddenStr] = hiddenStr; - primitiveIDs[outputHiddenID] = hiddenStr; - } - - // last cell state crop (output 3) - if (layer->outData.size() > 2) { - topology.add(cldnn::crop(cellStr, lstm_elt_id, hiddenSz, cellCropSz)); - cldnn::primitive_id outputCellID = layer_type_lower(layer) + ":" + layer->outData[2]->getName(); - AddInnerPrimitiveToProfiler(cellStr, layerName, layer); - primitiveIDs[outputCellID] = cellStr; - } - } - } - - if (!isForward) std::reverse(output_ids_offsets.begin(), output_ids_offsets.end()); - - if (permute_input) { - topology.add(cldnn::concatenation(layerName + "_outputConcat", output_ids_offsets, cldnn::concatenation::along_f)); - AddInnerPrimitiveToProfiler(layerName + "_outputConcat", layerName, layer); - topology.add(cldnn::permute(layerName, layerName + "_outputConcat", { 1, 0, 2, 3 })); - } else { - topology.add(cldnn::concatenation(layerName, output_ids_offsets, cldnn::concatenation::along_f)); - } - primitiveIDs[layer_type_lower(layer) + ":" + layer->outData[0]->getName()] = layerName; - AddPrimitiveToProfiler(layerName, layer); -} - -void Program::CreateDynamicLSTM(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - int lstm_batch_size, lstm_sequence_len, lstm_input_size, lstm_hidden_size; - bool hasBias = false, reverseSeq = false; - auto inputPrimitives = GetPrevLayersPrimitives(layer); - - auto lstmPrecision = layer->outData[0]->getPrecision(); - auto elementSize = cldnn::data_type_traits::size_of(DataTypeFromPrecision(lstmPrecision)); - std::string layerName = layer_type_name_ID(layer); - cldnn::primitive_id weightID = layerName + m_weightsTag; - cldnn::primitive_id recurrentID = weightID + "_recurrent"; - cldnn::primitive_id biasID = layerName + m_biasesTag; - auto rnnLayer = as(layer); - bool permute_input = (1 != rnnLayer->axis); - int32_t directions = 1; - - /* check incoming CNN layer and setup required variables */ - { - if (rnnLayer->cellType != RNNSequenceLayer::LSTM) - THROW_IE_EXCEPTION << "RNN layer supports only LSTM like cell"; - - auto in_data0 = layer->insData[0].lock(); - if (!in_data0) - THROW_IE_EXCEPTION << "Missing first input for RNN layer " << layer->name; - - const auto in_dims0 = in_data0->getTensorDesc().getDims(); - const auto out_dims0 = layer->outData[0]->getTensorDesc().getDims(); - - auto in_data1 = layer->insData[1].lock(); - auto in_data2 = layer->insData[2].lock(); - auto in_data3 = layer->insData[3].lock(); - - if (in_dims0.size() != 3 || - in_data1->getTensorDesc().getDims().size() != 2 || - in_data2->getTensorDesc().getDims().size() != 2 || - in_data3->getTensorDesc().getDims().size() != 1) - THROW_IE_EXCEPTION << "Wrong input shapes for dynamic RNN Layer " << layer->name; - - if (!permute_input) { - lstm_batch_size = in_dims0.front(); - lstm_sequence_len = in_dims0[1]; - } else { - lstm_batch_size = in_dims0[1]; - lstm_sequence_len = in_dims0.front(); - } - - lstm_input_size = in_dims0.back(); - lstm_hidden_size = out_dims0.back(); - - if (rnnLayer->direction == RNNSequenceLayer::BDR) { - directions = 2; - } else { - reverseSeq = rnnLayer->direction == RNNSequenceLayer::BWD; - } - } - - /* Prepare weight/bias memory primitives - split weight blob into W and R */ - { - const size_t WchunkSz = lstm_input_size * elementSize; - const size_t RchunkSz = lstm_hidden_size * elementSize; - - cldnn::tensor wTensor = cldnn::tensor(cldnn::batch(1), cldnn::feature(directions), cldnn::spatial(lstm_input_size, 4 * lstm_hidden_size)); - cldnn::tensor rTensor = cldnn::tensor(cldnn::batch(1), cldnn::feature(directions), cldnn::spatial(lstm_hidden_size, 4 * lstm_hidden_size)); - cldnn::layout WLayout = cldnn::layout(DataTypeFromPrecision(lstmPrecision), m_defaultFormat, wTensor); - cldnn::layout RLayout = cldnn::layout(DataTypeFromPrecision(lstmPrecision), m_defaultFormat, rTensor); - - auto wLayer = as(layer); - - { - auto pWeightsBlob = wLayer->_weights; - auto blobBytes = static_cast(pWeightsBlob->buffer()); - - auto wmem = cldnn::memory::allocate(*m_engine, WLayout); - auto wtmpPointer = wmem.pointer(); // implicitly maps buffer - unmap in destructor - - auto rmem = cldnn::memory::allocate(*m_engine, RLayout); - auto rtmpPointer = rmem.pointer(); - - auto wBytes = wtmpPointer.data(); - auto rBytes = rtmpPointer.data(); - - for (int h = 0; h < 4 * lstm_hidden_size; h++) { - // copy "input size" elements to W - for (size_t b = 0; b < WchunkSz; b++) - *wBytes++ = *blobBytes++; - - // copy "lstm_hidden_size" elements to R - for (size_t b = 0; b < RchunkSz; b++) - *rBytes++ = *blobBytes++; - } - - topology.add(cldnn::data(weightID, wmem)); - topology.add(cldnn::data(recurrentID, rmem)); - } - - /* create bias memory primitive */ - auto pBiasBlob = wLayer->_biases; - if (pBiasBlob != nullptr) { - cldnn::tensor bTensor = cldnn::tensor(cldnn::batch(1), cldnn::feature(directions), cldnn::spatial(4 * lstm_hidden_size, 1)); - cldnn::layout BLayout = cldnn::layout(DataTypeFromPrecision(pBiasBlob->getTensorDesc().getPrecision()), m_defaultFormat, bTensor); - - auto bmem = cldnn::memory::allocate(*m_engine, BLayout); - auto btmpPointer = bmem.pointer(); - - auto blobBytes = static_cast(pBiasBlob->buffer()); - const size_t BchunkSz = lstm_hidden_size * elementSize; - auto bBytes = btmpPointer.data(); - - for (size_t b = 0; b < 4 * BchunkSz; b++) - *bBytes++ = *blobBytes++; - - topology.add(cldnn::data(biasID, bmem)); - hasBias = true; - } - } - - cldnn::primitive_id inReshapeID = layerName + "_inReshape"; - cldnn::primitive_id permuteID = layerName + "_inputReorder"; - cldnn::primitive_id inHiddenReshapeID = layerName + "_inHiddenReshape"; - - cldnn::tensor inputShape; - - if (permute_input) { - inputShape = { lstm_sequence_len, lstm_batch_size, lstm_input_size, directions }; - } else { - inputShape = { lstm_batch_size, lstm_sequence_len, lstm_input_size, directions }; - } - cldnn::tensor hiddenStateShape = { lstm_batch_size, 1, lstm_hidden_size, directions }; - cldnn::layout inputLayout = cldnn::layout(DataTypeFromPrecision(lstmPrecision), cldnn::format::bfyx, inputShape); - topology.add(cldnn::reshape(inReshapeID, inputPrimitives[0], inputShape)); - topology.add(cldnn::reorder(permuteID, inReshapeID, inputLayout)); - - AddInnerPrimitiveToProfiler(inReshapeID, layerName, layer); - AddInnerPrimitiveToProfiler(permuteID, layerName, layer); - - topology.add(cldnn::reshape(inHiddenReshapeID + "_1", inputPrimitives[1], hiddenStateShape)); - topology.add(cldnn::reshape(inHiddenReshapeID + "_2", inputPrimitives[2], hiddenStateShape)); - - AddInnerPrimitiveToProfiler(inHiddenReshapeID + "_1", layerName, layer); - AddInnerPrimitiveToProfiler(inHiddenReshapeID + "_2", layerName, layer); - - cldnn::primitive_id dynID = layerName + "_dynLength"; - cldnn::primitive_id dynReshapeID = layerName + "_dynReshape"; - cldnn::tensor dynShape = { 1, 1, lstm_batch_size, 1 }; - cldnn::layout dynLayout = cldnn::layout(DataTypeFromPrecision(lstmPrecision), cldnn::format::bfyx, dynShape); - topology.add(cldnn::reshape(dynReshapeID, inputPrimitives[3], dynShape)); - topology.add(cldnn::reorder(dynID, dynReshapeID, dynLayout)); - - AddInnerPrimitiveToProfiler(dynReshapeID, layerName, layer); - AddInnerPrimitiveToProfiler(dynID, layerName, layer); - - cldnn::primitive_id inputID = permuteID; - cldnn::primitive_id prevInputID = permuteID; - - if (permute_input) { - inputID = layerName + "_inputSwap"; - topology.add(cldnn::permute(inputID, prevInputID, { 1, 0, 2, 3 })); - prevInputID = inputID; - AddInnerPrimitiveToProfiler(inputID, layerName, layer); - } - - cldnn::primitive_id seq_len_id = layer->name + "seq_lengths"; - if (reverseSeq) { - inputID = layerName + "_inputReverse"; - topology.add(cldnn::reverse_sequence(inputID, prevInputID, dynID, 1, 0)); - primitivesToIRLayersMap[inputID] = { layer->name }; - AddInnerPrimitiveToProfiler(inputID, layerName, layer); - prevInputID = inputID; - } - - // last hidden state crop (output 2) - cldnn::primitive_id outputHiddenID = "", outputCellID = ""; - if (layer->outData.size() > 1) { - outputHiddenID = layer_type_lower(layer) + ":" + layer->outData[1]->getName(); - auto last_hidden_mem = cldnn::memory::allocate(*m_engine, - { DataTypeFromPrecision(lstmPrecision), - cldnn::format::bfyx, { lstm_batch_size, 1, lstm_hidden_size, directions } }); - topology.add(cldnn::mutable_data(outputHiddenID, last_hidden_mem)); - primitiveIDs[outputHiddenID] = outputHiddenID; - } - - // last cell state crop (output 3) - if (layer->outData.size() > 2) { - outputCellID = layer_type_lower(layer) + ":" + layer->outData[2]->getName(); - auto last_cell_mem = cldnn::memory::allocate(*m_engine, - { DataTypeFromPrecision(lstmPrecision), - cldnn::format::bfyx, { lstm_batch_size, 1, lstm_hidden_size, directions } }); - topology.add(cldnn::mutable_data(outputCellID, last_cell_mem)); - primitiveIDs[outputCellID] = outputCellID; - } - - // main part - dLSTM primitive intself - cldnn::primitive_id dlstmID = layerName + "_dlstm"; - topology.add(cldnn::lstm_dynamic(dlstmID, inputID, dynID, - weightID, recurrentID, outputHiddenID, outputCellID, biasID, - inHiddenReshapeID + "_1", inHiddenReshapeID + "_2")); - prevInputID = inputID = dlstmID; - AddInnerPrimitiveToProfiler(dlstmID, layerName, layer); - - if (reverseSeq) { - inputID = layerName + "_outputReverse"; - topology.add(cldnn::reverse_sequence(inputID, prevInputID, dynID, 1, 0)); - AddInnerPrimitiveToProfiler(inputID, layerName, layer); - prevInputID = inputID; - } - - if (permute_input) { - inputID = layerName + "_outputSwap"; - topology.add(cldnn::permute(inputID, prevInputID, { 1, 0, 2, 3 })); - AddInnerPrimitiveToProfiler(inputID, layerName, layer); - prevInputID = inputID; - } - - primitiveIDs[inputID] = inputID; - primitiveIDs[layer_type_lower(layer) + ":" + layer->outData[0]->getName()] = inputID; - AddPrimitiveToProfiler(layerName, layer, inputID); -} - -void Program::CreateRNNPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - if (layer->insData.size() > 3) { - CreateDynamicLSTM(topology, layer); - } else { - CreateRegularLSTM(topology, layer); - } -} - -}; // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/cldnn_primitives_list.hpp b/inference-engine/src/cldnn_engine/cldnn_primitives_list.hpp new file mode 100644 index 00000000000000..8ce7c0ebe86534 --- /dev/null +++ b/inference-engine/src/cldnn_engine/cldnn_primitives_list.hpp @@ -0,0 +1,206 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#ifndef REGISTER_FACTORY +#error "REGISTER_FACTORY is not defined" +#endif + +// ------------------------------ Supported v0 ops ------------------------------ // +REGISTER_FACTORY(v0, Abs); +REGISTER_FACTORY(v0, Acos); +REGISTER_FACTORY(v0, Asin); +REGISTER_FACTORY(v0, Atan); +REGISTER_FACTORY(v0, Ceiling); +REGISTER_FACTORY(v0, Clamp); +REGISTER_FACTORY(v0, Concat); +REGISTER_FACTORY(v0, Constant); +REGISTER_FACTORY(v0, Convert); +REGISTER_FACTORY(v0, Cos); +REGISTER_FACTORY(v0, Cosh); +REGISTER_FACTORY(v0, CumSum); +REGISTER_FACTORY(v0, CTCGreedyDecoder); +REGISTER_FACTORY(v0, DepthToSpace); +REGISTER_FACTORY(v0, DetectionOutput); +REGISTER_FACTORY(v0, Elu); +REGISTER_FACTORY(v0, Erf); +REGISTER_FACTORY(v0, Exp); +REGISTER_FACTORY(v0, FakeQuantize); +REGISTER_FACTORY(v0, Floor); +REGISTER_FACTORY(v0, Gelu); +REGISTER_FACTORY(v0, GRN); +REGISTER_FACTORY(v0, HardSigmoid); +// REGISTER_FACTORY(v0, Interpolate); Supported via v0 -> v4 conversion +REGISTER_FACTORY(v0, Log); +REGISTER_FACTORY(v0, LRN); +REGISTER_FACTORY(v0, MatMul); +REGISTER_FACTORY(v0, MVN); +REGISTER_FACTORY(v0, Negative); +REGISTER_FACTORY(v0, NormalizeL2); +REGISTER_FACTORY(v0, Parameter); +REGISTER_FACTORY(v0, PRelu); +REGISTER_FACTORY(v0, PriorBox); +REGISTER_FACTORY(v0, PriorBoxClustered); +REGISTER_FACTORY(v0, Proposal); +REGISTER_FACTORY(v0, PSROIPooling); +REGISTER_FACTORY(v0, Relu); +REGISTER_FACTORY(v0, Result); +REGISTER_FACTORY(v0, RegionYolo); +REGISTER_FACTORY(v0, ReorgYolo); +REGISTER_FACTORY(v0, ReverseSequence); +REGISTER_FACTORY(v0, ROIPooling); +REGISTER_FACTORY(v0, Sigmoid); +REGISTER_FACTORY(v0, Sqrt); +REGISTER_FACTORY(v0, Selu); +REGISTER_FACTORY(v0, Sin); +REGISTER_FACTORY(v0, Sinh); +REGISTER_FACTORY(v0, Sign); +REGISTER_FACTORY(v0, SquaredDifference); +REGISTER_FACTORY(v0, SpaceToDepth); +REGISTER_FACTORY(v0, Squeeze); +REGISTER_FACTORY(v0, ShuffleChannels); +REGISTER_FACTORY(v0, Tan); +REGISTER_FACTORY(v0, Tanh); +REGISTER_FACTORY(v0, Tile); +REGISTER_FACTORY(v0, Unsqueeze); + +// ----------------------------- Unsupported v0 ops ----------------------------- // +// Deprecated ops +// REGISTER_FACTORY(v0, Add); +// REGISTER_FACTORY(v0, Divide); +// REGISTER_FACTORY(v0, Greater); +// REGISTER_FACTORY(v0, GreaterEq); +// REGISTER_FACTORY(v0, Less); +// REGISTER_FACTORY(v0, LessEq); +// REGISTER_FACTORY(v0, LSTMSequence); +// REGISTER_FACTORY(v0, LSTMCell); +// REGISTER_FACTORY(v0, Maximum); +// REGISTER_FACTORY(v0, Minimum); +// REGISTER_FACTORY(v0, Multiply); +// REGISTER_FACTORY(v0, NotEqual); +// REGISTER_FACTORY(v0, Power); +// REGISTER_FACTORY(v0, Quantize); +// REGISTER_FACTORY(v0, Select); +// REGISTER_FACTORY(v0, Subtract); +// REGISTER_FACTORY(v0, Xor); // Not marked as deprecated yet, but removed from new opsets + +// REGISTER_FACTORY(v0, BatchNormInference); +// REGISTER_FACTORY(v0, Range); +// REGISTER_FACTORY(v0, RNNCell); +// REGISTER_FACTORY(v0, ShapeOf); +// REGISTER_FACTORY(v0, TensorIterator); + +// ------------------------------ Supported v1 ops ------------------------------ // +REGISTER_FACTORY(v1, Add); +REGISTER_FACTORY(v1, AvgPool); +REGISTER_FACTORY(v1, BatchToSpace); +REGISTER_FACTORY(v1, BinaryConvolution); +REGISTER_FACTORY(v1, Broadcast); +REGISTER_FACTORY(v1, ConvertLike); +REGISTER_FACTORY(v1, Convolution); +REGISTER_FACTORY(v1, ConvolutionBackpropData); +REGISTER_FACTORY(v1, DeformableConvolution); +REGISTER_FACTORY(v1, DeformablePSROIPooling); +REGISTER_FACTORY(v1, Divide); +REGISTER_FACTORY(v1, Equal); +REGISTER_FACTORY(v1, FloorMod); +REGISTER_FACTORY(v1, Gather); +REGISTER_FACTORY(v1, GatherTree); +REGISTER_FACTORY(v1, Greater); +REGISTER_FACTORY(v1, GreaterEqual); +REGISTER_FACTORY(v1, GroupConvolution); +REGISTER_FACTORY(v1, GroupConvolutionBackpropData); +REGISTER_FACTORY(v1, Less); +REGISTER_FACTORY(v1, LessEqual); +REGISTER_FACTORY(v1, LogicalAnd); +REGISTER_FACTORY(v1, LogicalNot); +REGISTER_FACTORY(v1, LogicalOr); +REGISTER_FACTORY(v1, LogicalXor); +REGISTER_FACTORY(v1, MaxPool); +REGISTER_FACTORY(v1, Maximum); +REGISTER_FACTORY(v1, Minimum); +REGISTER_FACTORY(v1, Multiply); +REGISTER_FACTORY(v1, NotEqual); +// REGISTER_FACTORY(v1, NonMaxSuppression); Supported via v1 -> v5 internal conversion +REGISTER_FACTORY(v1, OneHot); +REGISTER_FACTORY(v1, Pad); +REGISTER_FACTORY(v1, Power); +REGISTER_FACTORY(v1, ReduceMax); +REGISTER_FACTORY(v1, ReduceLogicalAnd); +REGISTER_FACTORY(v1, ReduceLogicalOr); +REGISTER_FACTORY(v1, ReduceMean); +REGISTER_FACTORY(v1, ReduceMin); +REGISTER_FACTORY(v1, ReduceProd); +REGISTER_FACTORY(v1, ReduceSum); +REGISTER_FACTORY(v1, Reshape); +REGISTER_FACTORY(v1, Subtract); +REGISTER_FACTORY(v1, SpaceToBatch); +REGISTER_FACTORY(v1, Softmax); +REGISTER_FACTORY(v1, StridedSlice); +REGISTER_FACTORY(v1, Select); +REGISTER_FACTORY(v1, Split); +REGISTER_FACTORY(v1, Transpose); +REGISTER_FACTORY(v1, TopK); +REGISTER_FACTORY(v1, VariadicSplit); +REGISTER_FACTORY(v1, Mod); + +// ----------------------------- Unsupported v1 ops ----------------------------- // +// REGISTER_FACTORY(v1, Reverse); + +// ------------------------------ Supported v3 ops ------------------------------ // +REGISTER_FACTORY(v3, Asinh); +REGISTER_FACTORY(v3, Acosh); +REGISTER_FACTORY(v3, Atanh); +REGISTER_FACTORY(v3, Broadcast); +REGISTER_FACTORY(v3, EmbeddingBagOffsetsSum); +REGISTER_FACTORY(v3, EmbeddingBagPackedSum); +REGISTER_FACTORY(v3, EmbeddingSegmentsSum); +REGISTER_FACTORY(v3, ExtractImagePatches); +// REGISTER_FACTORY(v3, NonMaxSuppression); Supported via v3 -> v5 internal conversion + +// ----------------------------- Unsupported v3 ops ----------------------------- // +// REGISTER_FACTORY(v3, ScatterUpdate); // There is the scatter_update primitive, but seems like it produces wrong results +// REGISTER_FACTORY(v3, Assign); +// REGISTER_FACTORY(v3, Bucketize); +// REGISTER_FACTORY(v3, GRUCell); +// REGISTER_FACTORY(v3, NonZero); +// REGISTER_FACTORY(v3, ROIAlign); +// REGISTER_FACTORY(v3, ReadValue); +// REGISTER_FACTORY(v3, ScatterElementsUpdate); +// REGISTER_FACTORY(v3, ScatterUpdate); +// REGISTER_FACTORY(v3, ScatterNDUpdate); +// REGISTER_FACTORY(v3, ShapeOf); +// REGISTER_FACTORY(v3, TopK); + +// ------------------------------ Supported v4 ops ------------------------------ // +REGISTER_FACTORY(v4, HSwish); +REGISTER_FACTORY(v4, Interpolate); +REGISTER_FACTORY(v4, LSTMCell); +REGISTER_FACTORY(v4, Mish); +// REGISTER_FACTORY(v4, NonMaxSuppression); Supported via v4 -> v5 internal conversion +REGISTER_FACTORY(v4, Proposal); +REGISTER_FACTORY(v4, ReduceL1); +REGISTER_FACTORY(v4, ReduceL2); +REGISTER_FACTORY(v4, SoftPlus); +REGISTER_FACTORY(v4, Swish); + +// ----------------------------- Unsupported v4 ops ----------------------------- // +// REGISTER_FACTORY(v4, CTCLoss); +// REGISTER_FACTORY(v4, Range); + +// ------------------------------ Supported v5 ops ------------------------------ // +REGISTER_FACTORY(v5, HSigmoid); +REGISTER_FACTORY(v5, LogSoftmax); +REGISTER_FACTORY(v5, LSTMSequence); +//REGISTER_FACTORY(v5, NonMaxSuppression); Supported via v5 -> v5 internal conversion +REGISTER_FACTORY(v5, Round); + +// ----------------------------- Unsupported v5 ops ----------------------------- // +// REGISTER_FACTORY(v5, BatchNormInference); +// REGISTER_FACTORY(v5, GatherND); +// REGISTER_FACTORY(v5, GRUSequence); +// REGISTER_FACTORY(v5, Loop); +// REGISTER_FACTORY(v5, RNNSequence); + +// --------------------------- Supported internal ops --------------------------- // +REGISTER_FACTORY(internal, NonMaxSuppressionIEInternal); diff --git a/inference-engine/src/cldnn_engine/cldnn_program.cpp b/inference-engine/src/cldnn_engine/cldnn_program.cpp index 1e08c0893d4b17..98db66625215a5 100644 --- a/inference-engine/src/cldnn_engine/cldnn_program.cpp +++ b/inference-engine/src/cldnn_engine/cldnn_program.cpp @@ -2,514 +2,115 @@ // SPDX-License-Identifier: Apache-2.0 // -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include #include "cldnn_program.h" -#include "simple_math.h" -#include -#include -#include -#include -#include -#include -#include "cldnn_infer_request.h" -#include -#include "caseless.hpp" -#include -#include -#include -#include -#include - -#include -#include -#include "cldnn_common_utils.h" +#include "ngraph/ops.hpp" +#include "ngraph_ops/nms_ie_internal.hpp" using namespace InferenceEngine; using namespace InferenceEngine::details; -namespace { - -std::vector BFSSort(const ICNNNetwork& network) { - std::vector ordered; - std::unordered_set used; - - OutputsDataMap outputs; - network.getOutputsInfo(outputs); - - InputsDataMap inputs; - network.getInputsInfo(inputs); - - auto get_consumers = [](const CNNLayerPtr& node) -> std::vector { - std::vector consumers; - for (const auto & output : node->outData) { - for (const auto &consumer : getInputTo(output)) { - consumers.push_back(consumer.second); - } - } - return consumers; - }; - auto bfs = [&used, &ordered, &get_consumers](const CNNLayerPtr& start_node, bool traverse_via_outputs = false) { - if (!start_node) return; - std::deque q; - q.push_front(start_node); - while (!q.empty()) { - auto node = q.front(); - q.pop_front(); - if (used.insert(node->name).second) { - ordered.push_back(node); - } - - // Traverse via inputs - for (const auto & input : node->insData) { - auto locked_input = input.lock(); - if (!locked_input) { - THROW_IE_EXCEPTION << "insData for " << node->name << " is not valid."; - } - if (auto next_node = getCreatorLayer(locked_input).lock()) { - if (!used.count(next_node->name)) { - // Check that all consumers were used - bool all_consumers_used(true); - for (const auto & consumer : get_consumers(next_node)) { - if (!used.count(consumer->name)) all_consumers_used = false; - } - if (all_consumers_used) { - q.push_front(next_node); - } - } - } - } - - // Traverse via outputs - if (traverse_via_outputs) { - for (const auto &consumer : get_consumers(node)) { - if (!used.count(consumer->name)) { - q.push_front(consumer); - } - } - } - } - }; - - // First we run bfs starting from outputs that provides deterministic graph traverse - for (const auto & output : outputs) { - if (!used.count(output.first)) { - bfs(getCreatorLayer(output.second).lock()); - } - } - - // For cases when graph has no outputs we start bfs from inputs to ensure topological sort - for (const auto & input : inputs) { - const auto data_ptr = input.second->getInputData(); - for (const auto & consumer : getInputTo(data_ptr)) - if (!used.count(consumer.first)) { - bfs(consumer.second, true); - } - } - - std::reverse(ordered.begin(), ordered.end()); - return ordered; -} - -template -void convertArrayPrecision(typename PrecisionTrait::value_type* dst, - const typename PrecisionTrait::value_type* src, size_t nelem) { - using dst_type = typename PrecisionTrait::value_type; - - for (size_t i = 0; i < nelem; i++) { - dst[i] = static_cast(src[i]); - } -} - -template <> -void convertArrayPrecision(float* dst, const short* src, size_t nelem) { - InferenceEngine::PrecisionUtils::f16tof32Arrays(dst, src, nelem, 1.0f, 0.0f); -} - -template <> -void convertArrayPrecision(short* dst, const float* src, size_t nelem) { - InferenceEngine::PrecisionUtils::f32tof16Arrays(dst, src, nelem, 1.0f, 0.0f); -} - -template -Blob::Ptr convertBlobPrecision(const Blob::Ptr& blob) { - using from_d_type = typename PrecisionTrait::value_type; - using to_d_type = typename PrecisionTrait::value_type; - - auto tensor_desc = blob->getTensorDesc(); - Blob::Ptr new_blob = make_shared_blob(TensorDesc {PREC_TO, tensor_desc.getDims(), tensor_desc.getLayout()}); - new_blob->allocate(); - auto target = new_blob->buffer().as(); - auto source = blob->buffer().as(); - convertArrayPrecision(target, source, blob->size()); - return new_blob; -} - -template -void convertLayerPrecision(const CNNLayerPtr& layer, bool isOutput = false) { - if (layer->type == "TensorIterator" && dynamic_cast(layer.get()) != nullptr) { - return; - } - - using LayerType = CLDNNPlugin::Program::LayerType; - - if (!isOutput) { - for (auto &out_data : layer->outData) { - if (PREC_FROM == out_data->getPrecision()) - out_data->setPrecision(PREC_TO); - } - } - - for (auto &in_data : layer->insData) { - auto data = in_data.lock(); - if (PREC_FROM == data->getPrecision()) - data->setPrecision(PREC_TO); - - auto prev_layer = getCreatorLayer(data).lock(); - - if (CLDNNPlugin::Program::LayerTypeFromStr(prev_layer->type) == LayerType::ConstantBlob && - CLDNNPlugin::Program::LayerTypeFromStr(layer->type) != LayerType::Quantize) { - convertLayerPrecision(prev_layer, false); - } - } - - if (layer->precision == PREC_FROM) - layer->precision = PREC_TO; - - auto wLayer = dynamic_cast(layer.get()); - if (wLayer) { - if (wLayer->_weights && wLayer->_weights->getTensorDesc().getPrecision() == PREC_FROM) { - wLayer->_weights = convertBlobPrecision(wLayer->_weights); - } - if (wLayer->_biases && wLayer->_biases->getTensorDesc().getPrecision() == PREC_FROM) { - wLayer->_biases = convertBlobPrecision(wLayer->_biases); - } - } - - for (auto &blob : layer->blobs) { - auto &data = blob.second; - if (nullptr != data) { - if (data->getTensorDesc().getPrecision() == PREC_FROM) { - data = convertBlobPrecision(data); - } - } - } -} - -} // namespace - namespace CLDNNPlugin { const cldnn::primitive_id Program::m_preProcessTag("_cldnn_input_preprocess"); -const cldnn::primitive_id Program::m_weightsTag("_cldnn_weights"); -const cldnn::primitive_id Program::m_biasesTag("_cldnn_biases"); const cldnn::primitive_id Program::m_meanValuesTag("_cldnn_mean_values"); -const cldnn::primitive_id Program::m_postProcessTag("_cldnn_output_postprocess"); -const cldnn::primitive_id Program::m_scalesTag("_cldnn_scales"); const cldnn::primitive_id Program::m_preCustomLayerTag("_cldnn_custom_preprocess"); const cldnn::primitive_id Program::m_postCustomLayerTag("_cldnn_custom_postprocess"); +Program::factories_map_t Program::factories_map = {}; -static bool isValid(const InferenceEngine::CNNLayerPtr& layer, unsigned inputs) { // todo: add more checks - if (inputs && layer->insData.size() != inputs) { - return false; - } - - if (layer->_fusedWith) { - return false; - } - - return true; -} - -static void ValidateLayer(const InferenceEngine::CNNLayerPtr& layer, unsigned inputs) { - if (!isValid(layer, inputs)) { - THROW_CLDNN_EXCEPTION("Layer " << layer->name << " is inconsistent"); - } +std::string layer_type_lower(const ngraph::Node* op) { + std::string layerType = op->get_type_name(); + std::transform(layerType.begin(), layerType.end(), layerType.begin(), + [](unsigned char c) -> unsigned char { return std::tolower(c); }); + return layerType; } -static void ValidateLayer(const InferenceEngine::CNNLayerPtr& layer, std::vector inputs) { // todo: add more checks - bool is_valid = false; - if (inputs.empty()) { - if (!layer->_fusedWith) { - is_valid = true; - } - } else { - for (auto& input : inputs) { - is_valid |= isValid(layer, input); - } - } - - if (!is_valid) { - THROW_CLDNN_EXCEPTION("Layer " << layer->name << " is inconsistent"); - } +std::string layer_type_name_ID(const ngraph::Node* op) { + return layer_type_lower(op) + ":" + op->get_friendly_name(); } -static InferenceEngine::Blob::Ptr getBlobOrNull(const InferenceEngine::CNNLayerPtr& layer, std::string name) { - auto result = layer->blobs.find(name); - if (result != layer->blobs.end()) { - return result->second; - } else { - return nullptr; - } +std::string layer_type_lower(const std::shared_ptr& op) { + return layer_type_lower(op.get()); } -static InferenceEngine::Blob::Ptr getBlob(const InferenceEngine::CNNLayerPtr& layer, std::string name) { - auto result = getBlobOrNull(layer, name); - if (result == nullptr) { - THROW_CLDNN_EXCEPTION("Missing blob " << name << " in layer " << layer->name); - } - - return result; +std::string layer_type_name_ID(const std::shared_ptr& op) { + return layer_type_name_ID(op.get()); } -#if defined(_WIN32) -#define mkdir(dir, mode) _mkdir(dir) -#endif - -void Program::changeInputBatch(int batch) { +void Program::ChangeInputBatch(int batch) { m_curBatch = batch; } -bool Program::CanProcessDynBatch(InferenceEngine::ICNNNetwork &network) const { - InputsDataMap inputs; - network.getInputsInfo(inputs); - - CNNLayerSet inputLayers; - std::unordered_set allLayers; +void Program::ValidateInputs(const std::shared_ptr& op, std::vector validInputsCount) { + for (auto ic : validInputsCount) { + if (op->get_input_size() == ic) { + return; + } + } - if (inputs.empty()) - return false; + THROW_IE_EXCEPTION << "Invalid inputs count (" << op->get_input_size() << ") in " + << op->get_friendly_name() << " (" << op->get_type_name() + << " op::v" << op->get_type_info().version << ")"; +} - auto & secondLayers = getInputTo(inputs.begin()->second->getInputData()); - if (secondLayers.empty()) +bool Program::CanProcessDynBatch(std::vector> ops, InferenceEngine::InputsDataMap networkInputs) const { + if (networkInputs.empty()) return false; - bool check_result = true; - details::UnorderedDFS(allLayers, secondLayers.begin()->second, [&](CNNLayerPtr layer) { - auto type = LayerTypeFromStr(layer->type); - - auto reshapeLayer = dynamic_cast(layer.get()); - if (reshapeLayer && - type == Reshape && - (reshapeLayer->outData[0]->getTensorDesc().getDims()[0] == - reshapeLayer->insData[0].lock()->getTensorDesc().getDims()[0])) { - return; - } - - if (SimplerNMS == type || - ROIPooling == type || - PriorBox == type || - DetectionOutput == type || - Reshape == type || - Permute == type || - Flatten == type || - Proposal == type || - PSROIPooling == type ) { - check_result = false; + for (auto op : ops) { + // TODO: do we have any other exception cases? + if (std::dynamic_pointer_cast(op)) { + if (op->get_input_shape(0)[0] == op->get_output_shape(0)[0]) + continue; + } + + // List of the operations which can lead to invalid dynamic batch processing + if (std::dynamic_pointer_cast(op) || + std::dynamic_pointer_cast(op) || + std::dynamic_pointer_cast(op) || + std::dynamic_pointer_cast(op) || + std::dynamic_pointer_cast(op) || + std::dynamic_pointer_cast(op) || + std::dynamic_pointer_cast(op) || + std::dynamic_pointer_cast(op) || + std::dynamic_pointer_cast(op) || + std::dynamic_pointer_cast(op) || + std::dynamic_pointer_cast(op) || + std::dynamic_pointer_cast(op) || + std::dynamic_pointer_cast(op) || + std::dynamic_pointer_cast(op) || + std::dynamic_pointer_cast(op)) { + return false; } - // check for custom layer - auto customLayer = m_config.customLayers.find(layer->type); + auto customLayer = m_config.customLayers.find(op->get_type_name()); if (customLayer != m_config.customLayers.end()) { - check_result = false; + return false; } - }, false); + } - return check_result; + return true; } Program::Program(InferenceEngine::CNNNetwork& network, std::shared_ptr engine, const Config& config) : m_config(config) - , m_defaultFormat(cldnn::format::bfyx) , m_engine(engine) , m_curBatch(-1) - , p_currentOutputs({}) { - InitFormat(network); + , queryMode(false) { + // Extract inputs/outputs info from CNNNetwork + auto networkInputs = network.getInputsInfo(); + auto networkOutputs = network.getOutputsInfo(); - bool fqFound = false; - - bool baselineIsFP16 = false; - InputsDataMap inputsMap = network.getInputsInfo(); - if (!inputsMap.empty()) { - auto input0 = getInputTo(inputsMap.begin()->second->getInputData()); - if (!input0.empty() && (input0.begin()->second->params.count("lpt_back_to_fp16") != 0)) { - baselineIsFP16 = true; - fqFound = true; - } + auto func = network.getFunction(); + if (!func) { + THROW_IE_EXCEPTION << "Function pointer inside CNNNetwork is nullptr"; } - OutputsDataMap outputsMap = network.getOutputsInfo(); - - // [WA part2] Try to find non-quantized layers and convert them back to FP16 - if (config.enableInt8) { - if (fqFound && baselineIsFP16 && config.enable_fp16_for_quantized_models) { - auto layersSorted = BFSSort(network); - - for (auto& layer : layersSorted) { - if (layer == nullptr) - continue; - - if (layer->outData.empty() || layer->insData.empty()) - continue; - - auto isOutputLayer = [](const CNNLayerPtr& l, const OutputsDataMap& networkOutputs) -> bool { - bool is_output = false; - - if (GetNextLayers(l).empty()) - is_output = true; - - // Condition above is not enough, as network output layer - // can still be used in other parts of the graph - // (e.g. 1st output form TopK primitive may become network output - // while 2nd output from the same primitive may still be used - // in the graph). - if (!is_output) { - for (auto layerOutput : l->outData) { - for (auto networkOutput : networkOutputs) { - if (layerOutput->getName() == networkOutput.second->getName()) { - is_output = true; - break; - } - } - - if (is_output) - break; - } - } - - return is_output; - }; - - auto canReduceOutputPrecision = [](const CNNLayerPtr& l, const bool isNetworkOutput) -> bool { - // Don't do the conversion for network outputs - if (isNetworkOutput) - return false; - - auto type = LayerTypeFromStr(l->type); - auto next = GetNextLayers(l); - - if (type == LayerType::ScaleShift) { - // ScaleShift is supposed to return Dequantized values, so in most of the cases we can convert it's output to FP16 - // The exception is when the next node is Eltwise, so LPT keeps modified ScaleShift node on one of the branches - // and this node doesn't do requantization, thus we have to keep the result in FP32 precision. - for (auto n : next) { - if (LayerTypeFromStr(n->type) == LayerType::Eltwise) - return false; - } - return true; - } - - if (type == LayerType::Quantize) { - auto in = getCreatorLayer(l->insData[0].lock()).lock(); - if (l->outData[0]->getPrecision() == Precision::FP32 && in->type != "Input") - return true; - } - - return false; - }; - - auto canReducePrecision = [](const CNNLayerPtr& l) -> bool { - auto layerType = LayerTypeFromStr(l->type); - - bool result = true; - for (auto& in : l->insData) { - auto input = in.lock(); - auto precision = input->getPrecision(); - auto in_type = LayerTypeFromStr(getCreatorLayer(input).lock()->type); - if (precision != Precision::FP16 && in_type != LayerType::ConstantBlob) { - result = false; - break; - } - } - - return result; - }; - - bool is_network_output = isOutputLayer(layer, outputsMap); - - if (canReducePrecision(layer)) { - convertLayerPrecision(layer, is_network_output); - } else if (canReduceOutputPrecision(layer, is_network_output)) { - for (auto &out_data : layer->outData) { - if (out_data->getPrecision() == Precision::FP32) - out_data->setPrecision(Precision::FP16); - } - } - } - } - } + auto ops = func->get_ordered_ops(); if (m_config.max_dynamic_batch > 1) { // check topology for applicability - if (!CanProcessDynBatch(network)) { - THROW_CLDNN_EXCEPTION("Such topology cannot be compiled for dynamic batch!"); + if (!CanProcessDynBatch(ops, networkInputs)) { + THROW_IE_EXCEPTION << "Such topology cannot be compiled for dynamic batch!"; } } @@ -524,12 +125,12 @@ Program::Program(InferenceEngine::CNNNetwork& network, std::shared_ptr(b)); - m_programs.insert(m_programs.begin(), BuildProgram(network)); + ChangeInputBatch(1U << static_cast(b)); + m_programs.insert(m_programs.begin(), BuildProgram(ops, networkInputs, networkOutputs)); m_engine->release_pending_memory(0); } } else { - m_programs.emplace_back(BuildProgram(network)); + m_programs.emplace_back(BuildProgram(ops, networkInputs, networkOutputs)); m_engine->release_pending_memory(0); } } @@ -552,61 +153,28 @@ int Program::GetMaxBatchSizeForSingleProgram() { return 0; } -std::shared_ptr Program::getCompiledProgram(int program_id) { +std::shared_ptr Program::GetCompiledProgram(int program_id) { if (program_id >= m_programs.size()) - THROW_CLDNN_EXCEPTION("Invalid program ID"); + THROW_IE_EXCEPTION << "Invalid program ID"; return m_programs[program_id]; } -std::vector Program::GetNextLayers(const InferenceEngine::DataPtr data) { - std::vector nextLayers; - if (data == nullptr) { - return nextLayers; - } - for (auto nl : getInputTo(data)) { - nextLayers.push_back(nl.second); - } - return nextLayers; -} - -std::vector Program::GetNextLayers(const InferenceEngine::CNNLayerPtr layer) { - std::vector nextLayers; - if (layer == nullptr) { - return nextLayers; - } - for (auto od : layer->outData) { - auto nextLayersVec = GetNextLayers(od); - for (auto nl : nextLayersVec) { - nextLayers.push_back(nl); - } - } - return nextLayers; -} - -InferenceEngine::CNNLayerPtr Program::GetNextSingleLayer(const InferenceEngine::DataPtr data) { - if (data == nullptr) { - return nullptr; - } - auto nextLayers = GetNextLayers(data); - IE_ASSERT(nextLayers.size() == 1); - return nextLayers[0]; -} - -InferenceEngine::CNNLayerPtr Program::GetNextSingleLayer(const InferenceEngine::CNNLayerPtr layer) { - if (layer == nullptr) { - return nullptr; - } - auto nextLayers = GetNextLayers(layer); - IE_ASSERT(nextLayers.size() == 1); - return nextLayers[0]; +void Program::PrepareBuild(InferenceEngine::InputsDataMap networkInputs, InferenceEngine::OutputsDataMap networkOutputs) { + m_topology.reset(new cldnn::topology()); + m_networkInputs = networkInputs; + m_networkOutputs = networkOutputs; } -void Program::InitFormat(InferenceEngine::ICNNNetwork &network) { - m_defaultFormat = FormatFromLayout(InferenceEngine::Layout::NCHW); +void Program::CleanupBuild() { + m_topology.reset(); + m_networkInputs.clear(); + m_networkOutputs.clear(); } -std::shared_ptr Program::BuildProgram(InferenceEngine::CNNNetwork &network) { +std::shared_ptr Program::BuildProgram(std::vector> ops, + InferenceEngine::InputsDataMap networkInputs, + InferenceEngine::OutputsDataMap networkOutputs) { cldnn::build_options options; if (!m_config.graph_dumps_dir.empty()) { options.set_option(cldnn::build_option::graph_dumps_dir(m_config.graph_dumps_dir)); @@ -614,5433 +182,165 @@ std::shared_ptr Program::BuildProgram(InferenceEngine::CNNNetwor options.set_option(cldnn::build_option::optimize_data(true)); options.set_option(cldnn::build_option::tuning_config(m_config.tuningConfig)); - cldnn::topology topology; - - // 1. create inputs - InferenceEngine::InputsDataMap networkInputs = network.getInputsInfo(); - InferenceEngine::OutputsDataMap networkOutputs = network.getOutputsInfo(); - p_currentOutputs = networkOutputs; - - if (networkInputs.empty()) { - THROW_CLDNN_EXCEPTION("No inputs detected."); - } - - using LayerVect = std::vector; - std::list layersToHandle; - - auto push_if = [&](const LayerVect& clist) { - for (auto& l : clist) { - if ( (std::find_if( layersToHandle.begin(), - layersToHandle.end(), - [&](const CNNLayerPtr& x) { return layer_type_name_ID(x) == layer_type_name_ID(l); } )) == layersToHandle.end() ) - layersToHandle.push_back(l); - } - }; - - auto allInputs = CNNNetGetAllInputLayers(network); - for (auto input : allInputs) { - if (LayerTypeFromStr(input->type) == ConstantBlob) { - AddConstantBlobInput(topology, input); - } else { - auto iter = networkInputs.find(input->name); // regular input - if (iter != networkInputs.end()) { - AddInputPrimitive(topology, iter->second, input->precision, layer_type_name_ID(input)); - } - } - // collect next layers to process - push_if(GetNextLayers(input)); + PrepareBuild(networkInputs, networkOutputs); + for (auto op : ops) { + CreateSingleLayerPrimitive(*m_topology, op); } - // 2. traverse layers - unsigned infLoopProtection = 0; - while (!layersToHandle.empty()) { - if (infLoopProtection++ >= layersToHandle.size()) { - THROW_CLDNN_EXCEPTION("Infinite loop during network creation"); - break; - } - InferenceEngine::CNNLayerPtr currLayer = layersToHandle.front(); - layersToHandle.pop_front(); - auto layerName = layer_type_name_ID(currLayer); - - if (primitiveIDs.find(layerName) != primitiveIDs.end()) { - infLoopProtection = 0; - continue; // this layer was already added (had multiple inputs) - } - - bool missingInput = false; - try { - GetPrevLayersPrimitives(currLayer); - } catch (std::exception) { - missingInput = true; - } - - if (missingInput) { // some inputs aren't created yet - layersToHandle.push_back(currLayer); // push the current layer to the end of the line - continue; // move on to the next layer - } - - infLoopProtection = 0; // found a layer with all inputs already existing - CreateSingleLayerPrimitive(topology, currLayer); // currLayer will be advanced if layer was skipped or merged - prevPrimitiveIDs[layerName] = GetPrevLayersPrimitives(currLayer); - IRToNgraphLayersMap[currLayer->name] = currLayer->params["originalLayersNames"]; + auto program = std::make_shared(*m_engine, *m_topology, options); + CleanupBuild(); - push_if(GetNextLayers(currLayer)); - } + return program; +} - // 3. Handle output reordering - for (auto output : networkOutputs) { - // always reorder and let clDNN remove unneeded reorders - AddOutputPrimitive(topology, output.first, output.second); +bool Program::IsOpSupported(const InferenceEngine::CNNNetwork& network, const std::shared_ptr& op) { + cldnn::topology topology; + try { + // Query mode disables checks that input primitives are created, + // as IsOpSupported method is called for each operation separately + // So we just ensure that inputs count is valid for given operation + EnableQueryMode(); + // Creating topology object for each operation is supposed to be more time-consuming than + // simple check by op type, but it has 2 big advantages: + // 1. Code reuse. We don't need to have separate white-list of supported operations or + // add any ugly macro/templates to apply single function to multiple cases. + // 2. We also check parameters of each operation, which means we have more + // reliable results of QueryNetwork call. + PrepareBuild(network.getInputsInfo(), network.getOutputsInfo()); + CreateSingleLayerPrimitive(topology, op); + CleanupBuild(); + DisableQueryMode(); + } catch (std::exception& ex) { + // Exception means that an operation or some of it's parameters are not supported + CleanupBuild(); + return false; } - // 4. ??? - // 5. profit - p_currentOutputs.clear(); - - return std::make_shared(*m_engine, topology, options); -} - -Program::LayerType Program::LayerTypeFromStr(const std::string &str) { - static const caseless_map LayerNameToType = { - { "Convolution" , Convolution }, - { "DeformableConvolution" , DeformableConvolution }, - { "ReLU" , ReLU }, - { "ReLU6" , ReLU6 }, - { "Sigmoid" , Sigmoid }, - { "Logistic" , Sigmoid }, - { "TanH" , TanH }, - { "ELU" , ELU }, - { "Activation" , Activation }, - { "Exp" , Exp }, - { "Not" , Not }, - { "Norm" , LRN }, - { "Pooling" , Pooling }, - { "FullyConnected" , FullyConnected }, - { "SoftMax" , SoftMax }, - { "LogSoftmax", LogSoftmax }, - { "Power" , Power }, - { "Split" , Split }, - { "VariadicSplit", VariadicSplit }, - { "Slice" , Split }, - { "Concat" , Concatenate }, - { "Eltwise" , Eltwise }, - { "SimplerNMS" , SimplerNMS }, - { "ROIPooling" , ROIPooling }, - { "Crop" , Crop }, - { "Deconvolution" , Deconvolution }, - { "PriorBox" , PriorBox }, - { "DetectionOutput" , DetectionOutput }, - { "Normalize" , Normalize }, - { "Reshape" , Reshape }, - { "Transpose" , Transpose }, - { "Permute" , Permute }, - { "Flatten" , Flatten }, - { "BatchNormalization" , BatchNormalization }, - { "PReLU" , PReLU }, - { "ScaleShift" , ScaleShift }, - { "Proposal" , Proposal }, - { "PSROIPooling" , PSROIPooling }, - { "Clamp" , Clamp }, - { "Copy" , Copy }, - { "Resample" , Resample }, - { "Interp" , Interp }, - { "Interpolate" , Interpolate }, - { "RegionYolo" , RegionYolo }, - { "ReorgYolo" , ReorgYolo }, - { "Const" , ConstantBlob }, - { "ArgMax" , ArgMax }, - { "ArgMin" , ArgMin }, - { "MVN" , MVN }, - { "Unpooling" , Unpooling }, - { "Tile" , Tile }, - { "Pad" , Pad }, - { "LSTMCell" , LSTMCell }, - { "LSTMSequence" , RNN }, - { "RNNSequence" , RNN }, - { "Gather" , Gather }, - { "DepthToSpace" , DepthToSpace }, - { "SpaceToDepth" , SpaceToDepth }, - { "BatchToSpace", BatchToSpace }, - { "SpaceToBatch" , SpaceToBatch }, - { "ShuffleChannels" , ShuffleChannels }, - { "StridedSlice" , StridedSlice }, - { "ReverseSequence" , ReverseSequence }, - { "BinaryConvolution" , BinaryConvolution }, - { "FakeQuantize" , Quantize }, - { "Quantize" , Quantize }, - { "Broadcast" , Broadcast }, - { "Squeeze" , Squeeze }, - { "Unsqueeze" , Unsqueeze }, - { "ReduceMax" , Reduce }, - { "ReduceMin" , Reduce }, - { "ReduceMean" , Reduce }, - { "ReduceProd" , Reduce }, - { "ReduceSum" , Reduce }, - { "ReduceAnd" , Reduce }, - { "ReduceOr" , Reduce }, - { "ReduceSumSquare" , Reduce }, - { "ReduceL1" , Reduce }, - { "ReduceL2" , Reduce }, - { "ReduceLogSum" , Reduce }, - { "ReduceLogSumExp" , Reduce }, - { "TopK" , TopK }, - { "Asin" , Asin }, - { "Sin" , Sin }, - { "Atan" , Atan }, - { "Acos" , Acos }, - { "Cos" , Cos }, - { "Abs" , Abs }, - { "Acosh" , Acosh }, - { "Asinh" , Asinh }, - { "Sinh" , Sinh }, - { "Cosh" , Cosh }, - { "Swish" , Swish }, - { "HSwish", HSwish }, - { "Mish" , Mish }, - { "Gelu" , Gelu }, - { "Atanh" , Atanh }, - { "Floor" , Floor }, - { "Ceil" , Ceil }, - { "Ceiling" , Ceiling }, - { "Erf" , Erf }, - { "HardSigmoid" , HardSigmoid }, - { "HSigmoid", HSigmoid }, - { "Log" , Log }, - { "Neg" , Neg }, - { "Reciprocal" , Reciprocal }, - { "Selu" , Selu }, - { "Sign" , Sign }, - { "SoftPlus" , SoftPlus }, - { "SoftSign" , SoftSign }, - { "Tan" , Tan }, - { "GEMM", Gemm }, - { "OneHot", OneHot}, - { "GatherTree", GatherTree}, - { "Convert", Convert }, - { "ConvertLike", ConvertLike }, - // Implementation is disabled, since it doesn't match layer's semantic - // { "ExperimentalDetectronROIFeatureExtractor", ExperimentalDetectronROIFeatureExtractor }, - { "NonMaxSuppression", NonMaxSuppression }, - { "Select", Select }, - { "GRN", GRN }, - { "CTCGreedyDecoder", CTCGreedyDecoder }, - { "PriorBoxClustered", PriorBoxClustered }, - { "CumSum", CumSum }, - { "Round", Round }, - { "EmbeddingBagPackedSum", EmbeddingBagPackedSum }, - { "EmbeddingBagOffsetsSum", EmbeddingBagOffsetsSum }, - { "EmbeddingSegmentsSum", EmbeddingSegmentsSum }, - { "ExtractImagePatches" , ExtractImagePatches }, - }; - auto it = LayerNameToType.find(str); - if (it != LayerNameToType.end()) - return it->second; - else - return NO_TYPE; + return true; } -cldnn::pooling_mode Program::PoolingModeFromIEPooling(InferenceEngine::PoolingLayer::PoolType pt, bool excludePadding) { - switch (pt) { - case InferenceEngine::PoolingLayer::PoolType::MAX: - return cldnn::pooling_mode::max; - case InferenceEngine::PoolingLayer::PoolType::AVG: - return excludePadding ? cldnn::pooling_mode::average_no_padding : cldnn::pooling_mode::average; - default: - THROW_CLDNN_EXCEPTION("Unsupported pooling type: " << pt); - break; - } +void Program::CreateSingleLayerPrimitive(cldnn::topology& topology, const std::shared_ptr& op) { + InitProfileInfo(op->get_friendly_name(), op->get_type_name()); - return cldnn::pooling_mode::max; // shouldn't get here -} + bool is_created = false; + const ngraph::NodeTypeInfo* op_type_info = &op->get_type_info(); + while (op_type_info != nullptr) { + auto customLayer = m_config.customLayers.find(op->get_type_name()); + if (customLayer != m_config.customLayers.end()) { + CreateCustomOp(*this, op, customLayer->second); + return; + } -cldnn::eltwise_mode Program::EltwiseModeFromIEEltwise(InferenceEngine::EltwiseLayer::eOperation op) { - switch (op) { - case InferenceEngine::EltwiseLayer::Sum: - return cldnn::eltwise_mode::sum; - case InferenceEngine::EltwiseLayer::Prod: - return cldnn::eltwise_mode::prod; - case InferenceEngine::EltwiseLayer::Max: - return cldnn::eltwise_mode::max; - case InferenceEngine::EltwiseLayer::Sub: - return cldnn::eltwise_mode::sub; - case InferenceEngine::EltwiseLayer::Min: - return cldnn::eltwise_mode::min; - case InferenceEngine::EltwiseLayer::Div: - return cldnn::eltwise_mode::div; - case InferenceEngine::EltwiseLayer::Squared_diff: - return cldnn::eltwise_mode::squared_diff; - case InferenceEngine::EltwiseLayer::Equal: - return cldnn::eltwise_mode::eq; - case InferenceEngine::EltwiseLayer::Not_equal: - return cldnn::eltwise_mode::ne; - case InferenceEngine::EltwiseLayer::Less: - return cldnn::eltwise_mode::lt; - case InferenceEngine::EltwiseLayer::Less_equal: - return cldnn::eltwise_mode::le; - case InferenceEngine::EltwiseLayer::Greater: - return cldnn::eltwise_mode::gt; - case InferenceEngine::EltwiseLayer::Greater_equal: - return cldnn::eltwise_mode::ge; - case InferenceEngine::EltwiseLayer::Logical_AND: - return cldnn::eltwise_mode::logic_and; - case InferenceEngine::EltwiseLayer::Logical_OR: - return cldnn::eltwise_mode::logic_or; - case InferenceEngine::EltwiseLayer::Logical_XOR: - return cldnn::eltwise_mode::logic_xor; - case InferenceEngine::EltwiseLayer::Pow: - return cldnn::eltwise_mode::pow; - case InferenceEngine::EltwiseLayer::Floor_mod: - return cldnn::eltwise_mode::floor_mod; - default: THROW_CLDNN_EXCEPTION("Unsupported eltwise operation: " << op); + auto factory_it = factories_map.find(*op_type_info); + if (factory_it != factories_map.end()) { + factory_it->second(*this, op); + is_created = true; break; + } + op_type_info = op_type_info->parent; } - return cldnn::eltwise_mode::max; // shouldn't get here -} - -template -std::vector PermuteIEDimsToCldnnOrder(const std::vector& ie_order, Type value_to_align = 0) { - static_assert(std::is_integral::value, "Integeral required."); - std::vector cldnn_order = ie_order; - - // 1. Align to min. 4 sizes - if (cldnn_order.size() < 4) - cldnn_order.push_back(value_to_align); - - // 2. Swap spatial positions - for (int i = 0; i < (cldnn_order.size() - 2) / 2; i++) { - std::swap(cldnn_order[2 + i], cldnn_order[1 + cldnn_order.size() - (2 + i)]); + if (!is_created) { + THROW_IE_EXCEPTION << "Operation: " << op->get_friendly_name() + << " of type " << op->get_type_name() + << "(op::v" << op->get_type_info().version << ") is not supported"; } - - return cldnn_order; } -cldnn::primitive_id Program::CreatePrimitiveFromBlob(cldnn::topology& topology, - cldnn::primitive_id primID, - const InferenceEngine::Blob::Ptr pBlob, - const cldnn::layout& blobLayout, - size_t blobByteOffset, - WeightRearrangeType rearrange) { -// The condition below is not valid once we use groups - todo: think of some other size check here -// if ((pBlob != nullptr) && -// (pBlob->size() * (broadcastFeatures ? blobLayout.size.feature[0] : 1)) != blobLayout.count()) { -// THROW_CLDNN_EXCEPTION("Unexpected blob size"); -// } - if (pBlob == nullptr) { - THROW_CLDNN_EXCEPTION("Missing blob data: " << primID); - } - - auto data = static_cast(pBlob->buffer()) + blobByteOffset; - - auto bufIter = blobMemCache.find(data); - - if (bufIter != blobMemCache.end()) { - return bufIter->second; +std::vector Program::GetInputPrimitiveIDs(const std::shared_ptr& op) const { + if (!op) { + return {}; } - auto mem = cldnn::memory::allocate(*m_engine, blobLayout, 0, false); - auto tmpPointer = mem.pointer(); // implicitly maps buffer - unmap in destructor - auto buf = tmpPointer.data(); - auto bufSize = blobLayout.bytes_count(); - - const auto descLayout = pBlob->getTensorDesc().getLayout(); - if ((descLayout != InferenceEngine::OIHW) && - (descLayout != InferenceEngine::GOIHW) && - (descLayout != InferenceEngine::OIDHW) && - (descLayout != InferenceEngine::GOIDHW) && - (descLayout != InferenceEngine::NCDHW) && - (descLayout != InferenceEngine::NCHW) && - (descLayout != InferenceEngine::BLOCKED) && - (descLayout != InferenceEngine::CHW) && - (descLayout != InferenceEngine::NC) && - (descLayout != InferenceEngine::SCALAR) && - (descLayout != InferenceEngine::C)) { - // TODO: support more layouts - THROW_CLDNN_EXCEPTION("Unsupported layout (" << descLayout << ") in blob: " << primID); - } else if (rearrange == BroadcastFeatures) { - size_t features = static_cast(blobLayout.size.feature[0]); - if (pBlob->size() != features) { - THROW_CLDNN_EXCEPTION("Invalid blob dimensions to broadcast: " << primID); - } - auto elementSize = cldnn::data_type_traits::size_of(blobLayout.data_type); - size_t featureElements = blobLayout.count() / static_cast(blobLayout.size.feature[0]); - IE_ASSERT(blobLayout.format == cldnn::format::bfyx); - for (size_t f = 0; f < features; f++) { - for (size_t e = 0; e < featureElements; e++) { - for (size_t b = 0; b < elementSize; b++) { - buf[(f*featureElements + e)*elementSize + b] = data[f*elementSize + b]; - } - } + std::vector inputPrimitives; + for (size_t i = 0; i < op->get_input_size(); i++) { + auto prevOp = op->get_input_node_ptr(i); + std::string prevName = layer_type_name_ID(prevOp); + if (prevOp->get_output_size() > 1) { + prevName += "." + std::to_string(op->get_input_source_output(i).get_index()); } - } else if (rearrange == FlipDeconvDims) { - auto elementSize = cldnn::data_type_traits::size_of(blobLayout.data_type); - - size_t inputFeatureElements = static_cast(blobLayout.size.feature[0]); - size_t outputFeatureElements = static_cast(blobLayout.size.batch[0]); - - size_t featureSize = elementSize * blobLayout.size.spatial[0] * blobLayout.size.spatial[1]; - if (blobLayout.format == cldnn::format::oizyx || blobLayout.format == cldnn::format::bfzyx) - featureSize *= static_cast(blobLayout.size.spatial[2]); - - for (size_t i = 0; i < inputFeatureElements; i++) { - for (size_t o = 0; o < outputFeatureElements; o++) { - size_t outputShift = (o*inputFeatureElements + i)*featureSize; - size_t inputShift = (i*outputFeatureElements + o)*featureSize; - for (size_t b = 0; b < featureSize; b++) { - buf[outputShift + b] = data[inputShift + b]; - } + if (!queryMode) { + if (primitiveIDs.find(prevName) == primitiveIDs.end()) { + THROW_IE_EXCEPTION << "Input " << prevName << " hasn't been found in primitiveIDs map"; } + inputPrimitives.push_back(primitiveIDs.at(prevName)); + } else { + inputPrimitives.push_back(prevName); } - } else { - std::memcpy(&buf[0], &data[0], bufSize); } - topology.add(cldnn::data(primID, mem)); - blobMemCache[data] = primID; - return primID; + return inputPrimitives; } -void Program::CreateWeightAndBiasPrimitives(cldnn::topology& topology, - const InferenceEngine::CNNLayerPtr& layer, - std::vector& weightsPrimID, - std::vector& biasesPrimID) { - cldnn::tensor::value_type inFeatures = 1; // todo: workaround for xyf input, handle general case (xf, xyzf etc...) - std::shared_ptr insData0 = layer->insData[0].lock(); - IE_ASSERT(insData0 != nullptr); - const auto in0dims = insData0->getTensorDesc().getDims(); - if (in0dims.size() > 1) { - inFeatures = TensorValue(in0dims[1]); - } - cldnn::tensor::value_type outFeatures(0); - std::vector weightDimsVec; // BFZYX order - InferenceEngine::Blob::Ptr pWeightsBlob, pBiasBlob; - unsigned groupSize = 1; - WeightRearrangeType rearrange = NO_REARRANGE; - size_t inputs_count = 0; - - switch (LayerTypeFromStr(layer->type)) { - case Convolution: { - auto convLayer = as (layer); - groupSize = convLayer->_group; - if ((inFeatures % groupSize) || (convLayer->_out_depth % groupSize)) { - THROW_CLDNN_EXCEPTION("Invalid group size in layer " << convLayer->name); - } - - if (groupSize > 1) - weightDimsVec = { TensorValue(groupSize), TensorValue(convLayer->_out_depth / groupSize), TensorValue(inFeatures / groupSize) }; - else - weightDimsVec = { TensorValue(convLayer->_out_depth), TensorValue(inFeatures) }; - - for (int i = static_cast(convLayer->_kernel.size()) - 1; i >= 0; i--) { - weightDimsVec.push_back(TensorValue(convLayer->_kernel[i])); - } - outFeatures = convLayer->_out_depth; - pWeightsBlob = getBlobOrNull(layer, "weights"); - pBiasBlob = getBlobOrNull(layer, "biases"); - inputs_count = 1; - break; - } - case Deconvolution: { - auto deconvLayer = as (layer); - groupSize = deconvLayer->_group; - if ((inFeatures % groupSize) || (deconvLayer->_out_depth % groupSize)) { - THROW_CLDNN_EXCEPTION("Invalid group size in layer " << deconvLayer->name); - } - if (groupSize > 1) - weightDimsVec = { TensorValue(groupSize), TensorValue(deconvLayer->_out_depth / groupSize), TensorValue(inFeatures / groupSize) }; - else - weightDimsVec = { TensorValue(deconvLayer->_out_depth), TensorValue(inFeatures) }; - - for (int i = static_cast(deconvLayer->_kernel.size()) - 1; i >= 0; i--) { - weightDimsVec.push_back(TensorValue(deconvLayer->_kernel[i])); - } - outFeatures = deconvLayer->_out_depth; - pWeightsBlob = getBlobOrNull(layer, "weights"); - pBiasBlob = getBlobOrNull(layer, "biases"); - if ((groupSize < outFeatures) || (groupSize < inFeatures)) - rearrange = FlipDeconvDims; - inputs_count = 1; - break; - } - case DeformableConvolution: { - auto defConvLayer = as (layer); - groupSize = defConvLayer->_group; - - if (groupSize > 1) - weightDimsVec = { TensorValue(groupSize), TensorValue(defConvLayer->_out_depth / groupSize), TensorValue(inFeatures / groupSize) }; - else - weightDimsVec = { TensorValue(defConvLayer->_out_depth), TensorValue(inFeatures) }; - - for (int i = static_cast(defConvLayer->_kernel.size()) - 1; i >= 0; i--) { - weightDimsVec.push_back(TensorValue(defConvLayer->_kernel[i])); - } +void Program::AddPrimitiveToProfiler(const std::shared_ptr& op, + cldnn::primitive_id customOutputId) { + auto id = layer_type_name_ID(op); + primitivesToIRLayersMap[id] = { op->get_friendly_name() }; + primitiveIDs[id] = customOutputId.empty() ? id : customOutputId; + profilingIDs.push_back(id); +} - outFeatures = defConvLayer->_out_depth; - pWeightsBlob = getBlobOrNull(layer, "weights"); - pBiasBlob = getBlobOrNull(layer, "biases"); - inputs_count = 2; - break; - } - case FullyConnected: { - groupSize = 1; - outFeatures = static_cast(layer->outData[0]->getTensorDesc().getDims()[1]); - if (in0dims.size() == 3) - outFeatures = static_cast(layer->outData[0]->getTensorDesc().getDims()[2]); - switch (in0dims.size()) { - case 4: - weightDimsVec = { TensorValue(layer->outData[0]->getTensorDesc().getDims().back()), - TensorValue(in0dims[1]), - TensorValue(in0dims[2]), - TensorValue(in0dims[3]) }; - break; - case 3: - weightDimsVec = { TensorValue(layer->outData[0]->getTensorDesc().getDims().back()), - TensorValue(in0dims[2]), - 1, - 1 }; - break; - case 2: - weightDimsVec = { TensorValue(layer->outData[0]->getTensorDesc().getDims().back()), TensorValue(in0dims[1]), 1, 1 }; - break; - default: THROW_CLDNN_EXCEPTION("Invalid input tensor shape in fully connected layer: " << layer->name); - } - inputs_count = 1; - pWeightsBlob = getBlobOrNull(layer, "weights"); - pBiasBlob = getBlobOrNull(layer, "biases"); - break; - } - default: - THROW_IE_EXCEPTION << "Wrong weightable layer type"; - break; - } +void Program::AddPrimitiveToProfiler(cldnn::primitive_id id, const std::shared_ptr& op, + cldnn::primitive_id customOutputId) { + primitivesToIRLayersMap[id] = { op->get_friendly_name() }; + primitiveIDs[id] = customOutputId.empty() ? id : customOutputId; + profilingIDs.push_back(id); +} - if (pWeightsBlob == nullptr) { - if (layer->insData.size() == inputs_count) - THROW_IE_EXCEPTION << "No weights found in weightable layer " + layer->name; - } +void Program::AddInnerPrimitiveToProfiler(cldnn::primitive_id id, cldnn::primitive_id parentId, + const std::shared_ptr& op) { + InitProfileInfo(id, layer_type_lower(op), false, InferenceEngine::InferenceEngineProfileInfo::EXECUTED, parentId); + primitivesToIRLayersMap[id] = { op->get_friendly_name() }; + primitiveIDs[id] = id; + profilingIDs.push_back(id); +} - // create weights primitive - cldnn::format wFmt = m_defaultFormat; - if (groupSize > 1) { - switch (weightDimsVec.size()) { - case 5: wFmt = cldnn::format::goiyx; break; - case 6: wFmt = cldnn::format::goizyx; break; - default: - THROW_IE_EXCEPTION << "Unsupported weights format for layer " + layer->name; - } - } else { - switch (weightDimsVec.size()) { - case 4: wFmt = cldnn::format::oiyx; break; - case 5: wFmt = cldnn::format::oizyx; break; - default: - THROW_IE_EXCEPTION << "Unsupported weights format for layer " + layer->name; - } - } +void Program::InitProfileInfo(const std::string& layerName, + const std::string& layerType, + bool isCPU, + InferenceEngine::InferenceEngineProfileInfo::LayerStatus status, std::string parentId) { + std::string layer_type_lower = layerType; + for (auto& c : layer_type_lower) + c = tolower(c); - if (pWeightsBlob == nullptr) { - auto wei_name = layer_type_name_ID(getCreatorLayer(layer->insData[inputs_count].lock()).lock()); - if (primitiveIDs.find(wei_name) != primitiveIDs.end()) { - weightsPrimID.push_back(primitiveIDs.at(wei_name)); - } else { - weightsPrimID.push_back(wei_name); - } - } else { - cldnn::layout weightsLayout = cldnn::layout( - DataTypeFromPrecision(pWeightsBlob->getTensorDesc().getPrecision()), - wFmt, - cldnn::tensor(wFmt, weightDimsVec)); - cldnn::primitive_id weightID = layer_type_name_ID(layer) + m_weightsTag; - weightID = CreatePrimitiveFromBlob(topology, - weightID, - pWeightsBlob, - weightsLayout, - 0, - rearrange); - weightsPrimID.push_back(weightID); + std::string name = layerName; + if (name.find(layer_type_lower + ":") != std::string::npos) { + name = layerName.substr(layerName.find(":") + 1, layerName.length()); } - // create bias primitive - if (pBiasBlob != nullptr) { - cldnn::layout biasesLayout = cldnn::layout( - DataTypeFromPrecision(pBiasBlob->getTensorDesc().getPrecision()), - FormatFromLayout(pBiasBlob->getTensorDesc().getLayout()), - (cldnn::tensor) cldnn::feature(TensorValue(outFeatures))); - cldnn::primitive_id biasID = layer_type_name_ID(layer) + m_biasesTag; - biasID = CreatePrimitiveFromBlob(topology, - biasID, - pBiasBlob, - biasesLayout); - biasesPrimID.push_back(biasID); - } else if (layer->insData.size() == inputs_count + 2) { - auto bias_name = layer_type_name_ID(getCreatorLayer(layer->insData[inputs_count + 1].lock()).lock()); - if (primitiveIDs.find(bias_name) != primitiveIDs.end()) { - biasesPrimID.push_back(primitiveIDs.at(bias_name)); - } else { - biasesPrimID.push_back(bias_name); - } - } + perfMap[layer_type_lower + ":" + name].first = name; + auto& perfEntry = perfMap[layer_type_lower + ":" + name].second; + perfEntry.layerType = layerType; + perfEntry.status = status; + perfEntry.cpu_uSec = perfEntry.realTime_uSec = 0; + perfEntry.isCPU = isCPU; + perfEntry.parentPrimitive = parentId; } -void Program::CreateBinaryWeightAndBiasPrimitives(cldnn::topology& topology, - const InferenceEngine::CNNLayerPtr& layer, - std::vector& weightsPrimID, - std::vector& biasesPrimID) { - cldnn::tensor::value_type inFeatures = 1; // todo: workaround for xyf input, handle general case (xf, xyzf etc...) - std::shared_ptr insData0 = layer->insData[0].lock(); - IE_ASSERT(insData0 != nullptr); - const auto in0dims = insData0->getTensorDesc().getDims(); - if (in0dims.size() > 1) { - inFeatures = TensorValue(in0dims[1]); - } - std::vector weightDimsVec; - InferenceEngine::Blob::Ptr pWeightsBlob, pBiasBlob; - uint32_t groupSize = 1; - WeightRearrangeType rearrange = NO_REARRANGE; - - switch (LayerTypeFromStr(layer->type)) { - case BinaryConvolution: { - auto binaryConvLayer = as(layer); - groupSize = binaryConvLayer->_group; - if ((inFeatures % groupSize) || (binaryConvLayer->_out_depth % groupSize)) { - THROW_CLDNN_EXCEPTION("Invalid group size in layer " << binaryConvLayer->name); - } - weightDimsVec = { - TensorValue(binaryConvLayer->_out_depth), - TensorValue(inFeatures), - TensorValue(binaryConvLayer->_kernel[X_AXIS]), - TensorValue(binaryConvLayer->_kernel[Y_AXIS]) - }; - pWeightsBlob = binaryConvLayer->_weights; - pBiasBlob = binaryConvLayer->_biases; - - if (pWeightsBlob == nullptr) { - if (binaryConvLayer->insData.size() == 1) - THROW_IE_EXCEPTION << "No weights found in binary convolution layer " + layer->name; - } - break; - } - default: - THROW_CLDNN_EXCEPTION("Wrong binary weightable layer type"); - } +// TODO: Does it make sense to add such method to ngraph core? +bool IsNodeOnConstPath(const std::shared_ptr& node) { + std::list> nodes_to_process = { node }; + while (!nodes_to_process.empty()) { + auto& current_node = nodes_to_process.front(); + nodes_to_process.pop_front(); - // create weights primitive - if (pWeightsBlob == nullptr) { - auto wei_name = layer_type_name_ID(getCreatorLayer(layer->insData[1].lock()).lock()); - weightsPrimID.push_back(wei_name); - } else { - cldnn::layout weightsLayout = cldnn::layout( - cldnn::data_types::bin, - cldnn::format::bfyx, - cldnn::tensor(weightDimsVec)); + for (size_t i = 0; i < current_node->get_input_size(); i++) { + auto input_node = current_node->get_input_node_shared_ptr(i); - cldnn::primitive_id weightID = layer->name + m_weightsTag; - weightID = CreatePrimitiveFromBlob(topology, - weightID, - pWeightsBlob, - weightsLayout, - 0, - rearrange); - weightsPrimID.push_back(weightID); - } + // If input is constant, then drop if from the processing list + if (std::dynamic_pointer_cast(input_node) != nullptr) + continue; - // create bias primitive - if (pBiasBlob != nullptr) { - THROW_CLDNN_EXCEPTION("Biases are not supported in BinaryConvolution primitive"); - } -} + // If the node doesn't have any parents and it's not a constant, then we deal with dynamic path + if (input_node->get_input_size() == 0) { + return false; + } -void Program::CreateScaleWeightsAndBiasesFromBN(cldnn::topology& topology, - const InferenceEngine::BatchNormalizationLayer* bnLayer, - cldnn::primitive_id& weightsPrimID, - cldnn::primitive_id& biasesPrimID) { - auto weightTD = bnLayer->_weights->getTensorDesc(); - auto biasTD = bnLayer->_biases->getTensorDesc(); - { - if (weightTD.getDims() != biasTD.getDims()) { - THROW_CLDNN_EXCEPTION("mean/variance dimensions mismatch in " << bnLayer->name); - } - if (weightTD.getPrecision() != biasTD.getPrecision()) { - THROW_CLDNN_EXCEPTION("mean/variance precision mismatch in " << bnLayer->name); + nodes_to_process.insert(nodes_to_process.end(), input_node); } } - cldnn::tensor blobTensor(0); - auto outDims = bnLayer->outData[0]->getTensorDesc().getDims(); - if (outDims.size() != 2 && outDims.size() != 4) { - THROW_CLDNN_EXCEPTION("Batch normalization input doesn't have 2 or 4 dimensions in " << bnLayer->name); - } - blobTensor = (cldnn::tensor) cldnn::feature(TensorValue(outDims[1])); - cldnn::layout blobLayout( - DataTypeFromPrecision(bnLayer->precision), - m_defaultFormat, - blobTensor); - - const auto wPecision = bnLayer->_weights->getTensorDesc().getPrecision(); - - switch (wPecision) { - case Precision::FP16: { - InferenceEngine::TBlob weightsBlob(bnLayer->_weights->getTensorDesc()); - weightsBlob.allocate(); - InferenceEngine::TBlob biasesBlob(bnLayer->_biases->getTensorDesc()); - biasesBlob.allocate(); - - auto weightsData = weightsBlob.data(); - auto biasesData = biasesBlob.data(); - auto varianceData = static_cast(bnLayer->_weights->buffer()); - auto meanData = static_cast(bnLayer->_biases->buffer()); - - for (size_t i = 0; i < weightsBlob.size(); i++) { - auto variance = cldnn::half_to_float(varianceData[i]); - auto mean = cldnn::half_to_float(meanData[i]); - - float scale = 1.0f / sqrt(variance + bnLayer->epsilon); - weightsData[i] = cldnn::float_to_half(scale); - biasesData[i] = cldnn::float_to_half((-mean) * scale); - } - weightsPrimID = CreatePrimitiveFromBlob(topology, weightsPrimID, - std::make_shared>(weightsBlob), blobLayout); - biasesPrimID = CreatePrimitiveFromBlob(topology, biasesPrimID, - std::make_shared>(biasesBlob), blobLayout); - } - break; - case Precision::FP32: { - InferenceEngine::TBlob weightsBlob(bnLayer->_weights->getTensorDesc()); - weightsBlob.allocate(); - InferenceEngine::TBlob biasesBlob(bnLayer->_biases->getTensorDesc()); - biasesBlob.allocate(); - - auto weightsData = weightsBlob.data(); - auto biasesData = biasesBlob.data(); - auto varianceData = static_cast(bnLayer->_weights->buffer()); - auto meanData = static_cast(bnLayer->_biases->buffer()); - - for (size_t i = 0; i < weightsBlob.size(); i++) { - auto variance = varianceData[i]; - auto mean = meanData[i]; - weightsData[i] = 1.0f / sqrt(variance + bnLayer->epsilon); - biasesData[i] = (-mean) * weightsData[i]; - } - weightsPrimID = CreatePrimitiveFromBlob(topology, weightsPrimID, - std::make_shared>(weightsBlob), blobLayout); - biasesPrimID = CreatePrimitiveFromBlob(topology, biasesPrimID, - std::make_shared>(biasesBlob), blobLayout); - } - break; - default: - THROW_CLDNN_EXCEPTION("Unhandled mean/variance precision in " << bnLayer->name); - break; - } -} - -void Program::CreateSingleLayerPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - // Initialize a profiling entry - InitProfileInfo(layer->name, layer->type); - - // First check for custom layer - auto customLayer = m_config.customLayers.find(layer->type); - if (customLayer != m_config.customLayers.end()) { - CreateCustomLayerPrimitive(topology, layer, customLayer->second); - return; - } - - // Otherwise move on to built-in layer types - switch (LayerTypeFromStr(layer->type)) { - case Convolution: - CreateConvolutionPrimitive(topology, layer); - break; - case DeformableConvolution: - CreateDeformableConvolutionPrimitive(topology, layer); - break; - case ReLU: - case ReLU6: - case Sigmoid: - case TanH: - case ELU: - case Clamp: - case Activation: - case Exp: - case Not: - case Sin: - case Sinh: - case Asin: - case Atan: - case Cos: - case Cosh: - case Acos: - case Abs: - case Asinh: - case Acosh: - case Tan: - case Atanh: - case Floor: - case Ceil: - case Ceiling: - case Erf: - case HardSigmoid: - case HSigmoid: - case Log: - case Neg: - case Reciprocal: - case Selu: - case Sign: - case SoftPlus: - case SoftSign: - case Swish: - case HSwish: - case Mish: - case Gelu: - CreateActivationPrimitive(topology, layer, LayerTypeFromStr(layer->type)); - break; - case LRN: CreateLRNPrimitive(topology, layer); - break; - case Pooling: CreatePoolingPrimitive(topology, layer); - break; - case Unpooling: CreateMaxUnpoolingPrimitive(topology, layer); - break; - case FullyConnected: CreateFullyConnectedPrimitive(topology, layer); - break; - case SoftMax: CreateSoftMaxPrimitive(topology, layer); - break; - case LogSoftmax: CreateLogSoftmaxPrimitive(topology, layer); - break; - case Power: CreatePowerPrimitive(topology, layer); - break; - case Split: CreateSplitPrimitive(topology, layer); - break; - case VariadicSplit: CreateSplitPrimitive(topology, layer); - break; - case Concatenate: CreateConcatenatePrimitive(topology, layer); - break; - case Eltwise: CreateEltwisePrimitive(topology, layer); - break; - case SimplerNMS: CreateSimplerNMSPrimitive(topology, layer); - break; - case ROIPooling: CreateROIPoolingPrimitive(topology, layer); - break; - case Crop: CreateCropPrimitive(topology, layer); - break; - case Deconvolution: CreateDeconvolutionPrimitive(topology, layer); - break; - case PriorBox: CreatePriorBoxPrimitive(topology, layer); - break; - case DetectionOutput: CreateDetectionOutputPrimitive(topology, layer); - break; - case Normalize: CreateNormalizePrimitive(topology, layer); - break; - case Transpose: - case Reshape: - CreateReshapePrimitive(topology, layer); - break; - case Permute: CreatePermutePrimitive(topology, layer); - break; - case Flatten: CreateFlattenPrimitive(topology, layer); - break; - case BatchNormalization: CreateBatchNormalizationPrimitive(topology, layer); - break; - case PReLU: CreatePReLUPrimitive(topology, layer); - break; - case ScaleShift: CreateScaleShiftPrimitive(topology, layer); - break; - case Proposal: CreateProposalPrimitive(topology, layer); - break; - case PSROIPooling: CreatePSROIPoolingPrimitive(topology, layer); - break; - case Copy: CreateCopyPrimitive(topology, layer); - break; - case Resample: CreateResamplePrimitive(topology, layer); - break; - case Interp: CreateInterpPrimitive(topology, layer); - break; - case Interpolate: CreateInterpolatePrimitive(topology, layer); - break; - case ArgMax: - case ArgMin: - CreateArgMaxMinPrimitive(topology, layer, LayerTypeFromStr(layer->type)); - break; - case MVN: CreateMVNPrimitive(topology, layer); - break; - case LSTMCell: CreateLSTMCellPrimitive(topology, layer); - break; - case RNN: CreateRNNPrimitive(topology, layer); - break; - case RegionYolo: CreateYOLO2RegionPrimitive(topology, layer); - break; - case ReorgYolo: CreateYOLO2ReorgPrimitive(topology, layer); - break; - case Tile: CreateTilePrimitive(topology, layer); - break; - case Pad: CreatePadPrimitive(topology, layer); - break; - case Gather: CreateGatherPrimitive(topology, layer); - break; - case DepthToSpace: CreateDepthToSpacePrimitive(topology, layer); - break; - case SpaceToDepth: CreateSpaceToDepthPrimitive(topology, layer); - break; - case BatchToSpace: CreateBatchToSpacePrimitive(topology, layer); - break; - case SpaceToBatch: CreateSpaceToBatchPrimitive(topology, layer); - break; - case ShuffleChannels: CreateShuffleChannelsPrimitive(topology, layer); - break; - case StridedSlice: CreateStridedSlicePrimitive(topology, layer); - break; - case Broadcast: CreateBroadcastPrimitive(topology, layer); - break; - case ReverseSequence: CreateReverseSequencePrimitive(topology, layer); - break; - case BinaryConvolution: CreateBinaryConvolutionPrimitive(topology, layer); - break; - case Quantize: CreateQuantizePrimitive(topology, layer); - break; - case Squeeze: CreateReshapePrimitive(topology, layer); - break; - case Unsqueeze: CreateReshapePrimitive(topology, layer); - break; - case Reduce: CreateReducePrimitive(topology, layer); - break; - case TopK: CreateTopKPrimitive(topology, layer); - break; - case Gemm: CreateGemmPrimitive(topology, layer); - break; - case OneHot: CreateOneHotPrimitive(topology, layer); - break; - case Convert: CreateConvertPrimitive(topology, layer); - break; - case ConvertLike: CreateConvertLikePrimitive(topology, layer); - break; - case GatherTree: CreateGatherTreePrimitive(topology, layer); - break; - case ExperimentalDetectronROIFeatureExtractor: CreatePyramidRoIAlignPrimitive(topology, layer); - break; - case NonMaxSuppression: CreateNonMaxSuppressionPrimitive(topology, layer); - break; - case Select: CreateSelectPrimitive(topology, layer); - break; - case GRN: CreateGRNPrimitive(topology, layer); - break; - case CTCGreedyDecoder: CreateCTCGreedyDecoderPrimitive(topology, layer); - break; - case PriorBoxClustered: CreatePriorBoxClusteredPrimitive(topology, layer); - break; - case CumSum: CreateCumSumPrimitive(topology, layer); - break; - case Round: CreateRoundPrimitive(topology, layer); - break; - case EmbeddingBagPackedSum: CreateEmbeddingBagPackedSumPrimitive(topology, layer); - break; - case EmbeddingBagOffsetsSum: CreateEmbeddingBagOffsetsSumPrimitive(topology, layer); - break; - case EmbeddingSegmentsSum: CreateEmbeddingSegmentsSumPrimitive(topology, layer); - break; - case ExtractImagePatches: CreateExtractImagePatchesPrimitive(topology, layer); - break; - default: THROW_CLDNN_EXCEPTION("Unknown Layer Type: " << layer->type); - } -} - -void Program::CreateScaleShiftPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 1); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto scaleShiftLayer = as (layer); - - // create scales and biases - cldnn::primitive_id scalePrimID = scaleShiftLayer->name + m_scalesTag; - cldnn::primitive_id biasPrimID = scaleShiftLayer->name + m_biasesTag; - - const auto& wDims = scaleShiftLayer->_weights->getTensorDesc().getDims(); - const auto& iDims = scaleShiftLayer->insData.front().lock()->getTensorDesc().getDims(); - cldnn::tensor weightTensor(1); - switch (wDims.size()) { - case 1: - if (iDims.size() != 1) { - weightTensor = (cldnn::tensor) cldnn::feature(TensorValue(wDims[0])); // value per feature (or 1 global value) - } else if (iDims.size() == 1 && wDims[0] == iDims[0]) { - // If input tensor is 1D, then we need to interpret weights as batch to have consistent shapes. - weightTensor = (cldnn::tensor) cldnn::batch(TensorValue(wDims[0])); - } else { - THROW_IE_EXCEPTION << "inconsistent input tensor and scale shapes in scaleshift layer " << layer->name; - } - break; - default: weightTensor = CldnnTensorFromIEDims(wDims); - break; - } - auto scales_dt = DataTypeFromPrecision(scaleShiftLayer->_weights->getTensorDesc().getPrecision()); - cldnn::layout scalesLayout(scales_dt, m_defaultFormat, weightTensor); - scalePrimID = CreatePrimitiveFromBlob(topology, scalePrimID, scaleShiftLayer->_weights, scalesLayout); - if (scaleShiftLayer->_biases != nullptr) { - auto shifts_dt = DataTypeFromPrecision(scaleShiftLayer->_biases->getTensorDesc().getPrecision()); - cldnn::layout shiftsLayout(shifts_dt, m_defaultFormat, weightTensor); - const auto& bDims = scaleShiftLayer->_biases->getTensorDesc().getDims(); - if (bDims != wDims) { - THROW_CLDNN_EXCEPTION("Invalid bias blob dimensions in layer " << layer->name); - } - biasPrimID = CreatePrimitiveFromBlob(topology, biasPrimID, scaleShiftLayer->_biases, shiftsLayout); - } else { - biasPrimID = ""; // 0-bias - } - - std::string scaleShiftLayerName = layer_type_name_ID(layer); - auto scaleShiftPrim = cldnn::scale( - scaleShiftLayerName, - inputPrimitives[0], - scalePrimID, - biasPrimID, - cldnn::optional_data_type{DataTypeFromPrecision(layer->outData[0]->getPrecision())}); - - topology.add(scaleShiftPrim); - AddPrimitiveToProfiler(scaleShiftLayerName, layer); -} - -void Program::CreateProposalPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr & layer) { - ValidateLayer(layer, 3); - auto proposalLayer = as (layer); - - float nms_thresh = proposalLayer->GetParamAsFloat("nms_thresh", 0.7f); - int min_size = proposalLayer->GetParamAsInt("min_size", 16); - int feature_stride = proposalLayer->GetParamAsInt("feat_stride", 16); - int pre_nms_topn = proposalLayer->GetParamAsInt("pre_nms_topn", 6000); - int post_nms_topn = proposalLayer->GetParamAsInt("post_nms_topn", 300); - const std::vector ratio = proposalLayer->GetParamAsFloats("ratio"); - const std::vector scale = proposalLayer->GetParamAsFloats("scale"); - float box_coordinate_scale = proposalLayer->GetParamAsFloat("box_coordinate_scale", 1.0f); - float box_size_scale = proposalLayer->GetParamAsFloat("box_size_scale", 1.0f); - int base_size = proposalLayer->GetParamAsInt("base_size", 16); - std::string framework = proposalLayer->GetParamAsString("framework", ""); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - bool normalize = layer->GetParamAsBool("normalize", false); - bool clip_before_nms = layer->GetParamAsBool("clip_before_nms", true); - bool clip_after_nms = layer->GetParamAsBool("clip_after_nms", false); - - float coordinates_offset; - bool swap_xy; - bool initial_clip; - bool round_ratios; - bool shift_anchors; - - if (framework == "tensorflow") { - coordinates_offset = 0.0f; - initial_clip = true; - shift_anchors = true; - round_ratios = false; - swap_xy = true; - } else { - coordinates_offset = 1.0f; - initial_clip = false; - shift_anchors = false; - round_ratios = true; - swap_xy = false; - } - - const bool for_deformable = layer->GetParamAsBool("for_deformable", 0); - - if (layer->outData.size() == 2) { - auto mutable_precision = layer->outData[1]->getPrecision(); - if (mutable_precision == Precision::I64) { - mutable_precision = Precision::I32; - } - - cldnn::layout mutableLayout = cldnn::layout( - DataTypeFromPrecision(mutable_precision), - m_defaultFormat, - CldnnTensorFromIEDims(layer->outData[1]->getDims())); - - auto shared_memory = cldnn::memory::allocate(*m_engine, mutableLayout); - - cldnn::primitive_id proposal_mutable_id_w = layer_type_name_ID(layer) + "_md_write"; - auto argmax_mutable_prim = cldnn::mutable_data(proposal_mutable_id_w, shared_memory); - primitivesToIRLayersMap[proposal_mutable_id_w] = { layer->name }; - primitiveIDs[proposal_mutable_id_w] = proposal_mutable_id_w; - topology.add(argmax_mutable_prim); - inputPrimitives.push_back(proposal_mutable_id_w); - - std::string proposalLayerName = layer_type_lower(layer) + ":" + layer->outData[0]->getName(); - - auto proposalPrim = cldnn::proposal( - proposalLayerName, - inputPrimitives[0], // cls_score - inputPrimitives[1], // bbox_pred - inputPrimitives[2], // im_info - inputPrimitives[3], // second_output - 0, // max_num_proposals is unused - nms_thresh, - base_size, - min_size, - feature_stride, - pre_nms_topn, - post_nms_topn, - ratio, - scale, - coordinates_offset, - box_coordinate_scale, - box_size_scale, - for_deformable, - swap_xy, - initial_clip, - clip_before_nms, - clip_after_nms, - round_ratios, - shift_anchors, - normalize); - - topology.add(proposalPrim); - - cldnn::primitive_id proposal_mutable_id_r = layer_type_lower(layer) + ":" + layer->outData[1]->getName(); - auto argmax_mutable_prim_r = cldnn::mutable_data(proposal_mutable_id_r, { proposalLayerName }, shared_memory); - primitivesToIRLayersMap[proposal_mutable_id_r] = { layer->name }; - primitiveIDs[proposal_mutable_id_r] = proposal_mutable_id_r; - topology.add(argmax_mutable_prim_r); - - AddPrimitiveToProfiler(proposalLayerName, layer); - return; - } - - std::string proposalLayerName = layer_type_name_ID(layer); - auto proposalPrim = cldnn::proposal( - proposalLayerName, - inputPrimitives[0], // cls_score - inputPrimitives[1], // bbox_pred - inputPrimitives[2], // im_info - 0, // max_num_proposals is unused - nms_thresh, - base_size, - min_size, - feature_stride, - pre_nms_topn, - post_nms_topn, - ratio, - scale, - coordinates_offset, - box_coordinate_scale, - box_size_scale, - for_deformable, - swap_xy, - initial_clip, - clip_before_nms, - clip_after_nms, - round_ratios, - shift_anchors, - normalize); - - topology.add(proposalPrim); - AddPrimitiveToProfiler(proposalLayerName, layer); -} - -void Program::CreatePReLUPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 1); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto preluLayer = as (layer); - - std::string preluLayerName = layer_type_name_ID(layer); - auto inDataPtr = preluLayer->insData[0].lock(); - if (!inDataPtr) { - THROW_CLDNN_EXCEPTION("Data inserted into PreLu " << preluLayer->name << " is nullptr"); - } - - static const std::string blobName("weights"); - ValidateGenericLayerBlobs(preluLayer, { blobName }); - - bool channel_shared = preluLayer->GetParamAsBool("channel_shared", false); - - auto slopeBlob = preluLayer->blobs.at(blobName); - const auto slopeBlobDesc = slopeBlob->getTensorDesc(); - const auto dim0 = slopeBlobDesc.getDims().back(); - if (channel_shared) { - if (dim0 != 1) { // slopeBlob->dims()[0] != 1 - THROW_CLDNN_EXCEPTION("PReLU slope blob with wrong dimensions in " << preluLayer->name); - } - float slope(0.0f); - switch (slopeBlobDesc.getPrecision()) { - case InferenceEngine::Precision::FP32: - slope = *static_cast(slopeBlob->buffer()); - break; - case InferenceEngine::Precision::FP16: - { - slope = cldnn::half_to_float(*static_cast(slopeBlob->buffer())); - } - break; - default: THROW_CLDNN_EXCEPTION("Invalid PReLU slope blob precision in " << preluLayer->name); - } - topology.add(cldnn::activation(preluLayerName, inputPrimitives[0], cldnn::activation_func::relu_negative_slope, { slope, 0.f })); - } else { - cldnn::primitive_id slopePrimID(preluLayerName + "_" + blobName + m_weightsTag); - auto map = CreateGenericLayerBlobPrimitives(topology, preluLayer); - topology.add(cldnn::activation(preluLayerName, inputPrimitives[0], map.at(slopePrimID), cldnn::activation_func::relu_negative_slope)); - } - - AddPrimitiveToProfiler(preluLayerName, layer); -} - -void Program::CreateBatchNormalizationPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr & layer) { - ValidateLayer(layer, 1); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - std::string bnLayerName = layer_type_name_ID(layer); - - auto bnLayer = as (layer); - cldnn::primitive_id weightID = bnLayerName + "_" + m_scalesTag; - cldnn::primitive_id biasID = bnLayerName + "_" + m_biasesTag; - - CreateScaleWeightsAndBiasesFromBN(topology, bnLayer, weightID, biasID); - auto scalePrim = cldnn::scale(bnLayerName, inputPrimitives[0], weightID, biasID); - - topology.add(scalePrim); - - AddPrimitiveToProfiler(bnLayerName, layer); -} - -void Program::CreateFlattenPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 1); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto flattenLayer = as (layer); - std::string flattenLayerName = layer_type_name_ID(layer); - - auto flattenPrim = cldnn::reshape( - flattenLayerName, - inputPrimitives[0], - CldnnTensorFromIEDims(flattenLayer->outData[0]->getTensorDesc().getDims())); - - topology.add(flattenPrim); - AddPrimitiveToProfiler(flattenLayerName, layer); -} - -void Program::CreatePermutePrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 1); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto permuteLayer = as(layer); - std::vector ie_order; - for (auto& a : permuteLayer->GetParamAsInts("order")) - ie_order.push_back(static_cast(a)); - - auto outDesc = layer->outData[0]->getTensorDesc(); - auto outDims = outDesc.getDims(); - - int rank = std::max(4, static_cast(outDims.size())); - if (ie_order.empty()) { - // if order size is empty - we need to set inversed axes order - for (int o = rank - 1; o >= 0; o--) - ie_order.push_back((uint16_t)o); - } - - // if order size is less than 4 - fill the rest with just copy - for (auto o = ie_order.size(); o < rank; o++) - ie_order.push_back((uint16_t)o); - - /* - Because of the cldnn ordering: bfxy, and IE ordering: bfyx - we need to adjust the permute order. - */ - std::vector cldnn_permute_order; - // 1. Switch permute order values for spatial dims - for (auto const& o : ie_order) { - if (o >= 2) - cldnn_permute_order.push_back(1 + ie_order.size() - o); - else - cldnn_permute_order.push_back(o); - } - cldnn_permute_order = PermuteIEDimsToCldnnOrder(cldnn_permute_order); - - std::string permuteLayerName = layer_type_name_ID(layer); - - auto permutePrim = cldnn::permute( - permuteLayerName, - inputPrimitives[0], - cldnn_permute_order); - - topology.add(permutePrim); - AddPrimitiveToProfiler(permuteLayerName, layer); -} - -void Program::CreateReshapePrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - if (layer->insData.size() != 1 && layer->insData.size() != 2) - THROW_CLDNN_EXCEPTION("Invalid number of inputs for layer: " << layer->name); - - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto reshapeLayer = as(layer); - IE_ASSERT(reshapeLayer->outData.size()); - std::string reshapeLayerName = layer_type_name_ID(layer); - - auto outDesc = reshapeLayer->outData[0]->getTensorDesc(); - auto inDims = reshapeLayer->input()->getTensorDesc().getDims(); - auto outDims = outDesc.getDims(); - auto outTensor = CldnnTensorFromIEDims(outDims); - - // if we convert from or to 5D/6D, additional reorder also required to change format - cldnn::primitive_id reshapeInputId = inputPrimitives[0]; - if (inDims.size() != outDims.size()) { - cldnn::primitive_id reorderId = "reorder:" + layer->name + "_reorder"; - cldnn::format outputFormat = cldnn::format::bfyx; - - switch (outDims.size()) { - case 5: outputFormat = cldnn::format::bfzyx; break; - case 6: outputFormat = cldnn::format::bfwzyx; break; - default: break; - } - - cldnn::layout outputLayout(DataTypeFromPrecision(outDesc.getPrecision()), outputFormat, outTensor); - topology.add(cldnn::reorder(reorderId, reshapeInputId, outputLayout)); - InitProfileInfo(reorderId, "Reorder", false, InferenceEngine::InferenceEngineProfileInfo::EXECUTED, reshapeLayerName); - primitivesToIRLayersMap[reorderId] = { layer->name }; - primitiveIDs[reshapeLayerName + "_reorder"] = reorderId; - primitiveIDs[reorderId] = reorderId; - profilingIDs.push_back(reorderId); - reshapeInputId = reorderId; - } - - auto reshapePrim = cldnn::reshape( - reshapeLayerName, - reshapeInputId, - outTensor); - - topology.add(reshapePrim); - AddPrimitiveToProfiler(reshapeLayerName, layer); -} - -void Program::CreateNormalizePrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 1); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto normLayer = as (layer); - ValidateGenericLayerBlobs(normLayer, { "weights" }); - auto map = CreateGenericLayerBlobPrimitives(topology, normLayer); - - // params - bool across_spatial = normLayer->GetParamAsBool("across_spatial", true); - float eps = normLayer->GetParamAsFloat("eps", 0.0f); - - // WA for MO outputting %.6f - if (eps == 0.0f) { - eps = 1e-10f; - } - - std::string normLayerName = layer_type_name_ID(layer); - auto normPrim = cldnn::normalize( - normLayerName, - inputPrimitives[0], - map.at(normLayerName + "_weights" + m_weightsTag), - across_spatial, - eps); - - topology.add(normPrim); - AddPrimitiveToProfiler(normLayerName, layer); -} - -void Program::CreateDetectionOutputPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 3); - auto detectionLayer = as (layer); - - uint32_t num_classes = detectionLayer->GetParamAsUInt("num_classes", 1); - bool share_location = detectionLayer->GetParamAsBool("share_location", true); - int background_label_id = detectionLayer->GetParamAsInt("background_label_id", 0); - float nms_threshold = detectionLayer->GetParamAsFloat("nms_threshold", 0.3f); - int top_k = detectionLayer->GetParamAsInt("top_k", -1); - float confidence_threshold = detectionLayer->GetParamAsFloat("confidence_threshold", -FLT_MAX); - float eta = detectionLayer->GetParamAsFloat("eta", 1.0f); - int keep_top_k = detectionLayer->GetParamAsInt("keep_top_k", -1); - bool variance_encoded_in_target = detectionLayer->GetParamAsBool("variance_encoded_in_target", false); - int input_width = detectionLayer->GetParamAsInt("input_width", -1); - int input_height = detectionLayer->GetParamAsInt("input_height", -1); - bool normalized = detectionLayer->GetParamAsBool("normalized", true); - std::string code_type = detectionLayer->GetParamAsString("code_type", "caffe.PriorBoxParameter.CORNER"); - bool clip_before_nms = detectionLayer->GetParamAsBool("clip_before_nms", false) || - detectionLayer->GetParamAsBool("clip", false); // For backward compatibility - bool clip_after_nms = detectionLayer->GetParamAsBool("clip_after_nms", false); - bool decrease_label_id = detectionLayer->GetParamAsBool("decrease_label_id", false); - - cldnn::prior_box_code_type cldnnCodeType = PriorBoxCodeFromString(code_type); - int32_t prior_info_size = normalized != 0 ? 4 : 5; - int32_t prior_coordinates_offset = normalized != 0 ? 0 : 1; - - auto inputPrimitives = GetPrevLayersPrimitives(layer); - std::string detectionLayerName = layer_type_name_ID(layer); - auto detectionPrim = cldnn::detection_output(detectionLayerName, - inputPrimitives[0], - inputPrimitives[1], - inputPrimitives[2], - num_classes, - keep_top_k, - share_location, - background_label_id, - nms_threshold, - top_k, - eta, - cldnnCodeType, - variance_encoded_in_target, - confidence_threshold, - prior_info_size, - prior_coordinates_offset, - normalized, - input_width, - input_height, - decrease_label_id, - clip_before_nms, - clip_after_nms); - - topology.add(detectionPrim); - AddPrimitiveToProfiler(detectionLayerName, layer); -} - -void Program::CreatePriorBoxPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 2); - auto priorBoxLayer = as (layer); - - // params - std::vector min_size = priorBoxLayer->GetParamAsFloats("min_size"); - std::vector max_size = priorBoxLayer->GetParamAsFloats("max_size", {}); - std::vector aspect_ratio = priorBoxLayer->GetParamAsFloats("aspect_ratio", {}); - std::vector variance = priorBoxLayer->GetParamAsFloats("variance"); - std::vector fixed_size = priorBoxLayer->GetParamAsFloats("fixed_size", {}); - std::vector fixed_ratio = priorBoxLayer->GetParamAsFloats("fixed_ratio", {}); - std::vector density = priorBoxLayer->GetParamAsFloats("density", {}); - bool flip = priorBoxLayer->GetParamAsBool("flip", true); - bool clip = priorBoxLayer->GetParamAsBool("clip", false); - bool scale_all_sizes = priorBoxLayer->GetParamAsBool("scale_all_sizes", true); - float offset = priorBoxLayer->GetParamAsFloat("offset", 0.5f); - - auto step_w = priorBoxLayer->GetParamAsFloat("step_w", 0.0f); - auto step_h = priorBoxLayer->GetParamAsFloat("step_h", 0.0f); - auto step = priorBoxLayer->GetParamAsFloat("step", 0.0f); - - float _step_w = 0.0f; - float _step_h = 0.0f; - if (HasParam(priorBoxLayer->params, "step_w") && step_w != 0.0f && - HasParam(priorBoxLayer->params, "step_h") && step_h != 0.0f) { - _step_w = step_w; - _step_h = step_h; - } else if (HasParam(priorBoxLayer->params, "step") && step != 0.0f) { - _step_w = step; - _step_h = step; - } - - int img = priorBoxLayer->GetParamAsInt("img_size", 0); - int img_w = priorBoxLayer->GetParamAsInt("img_w", 0); - int img_h = priorBoxLayer->GetParamAsInt("img_h", 0); - if ((img != 0) || (img_w != 0) || (img_h != 0)) { - // unsupported mode - THROW_CLDNN_EXCEPTION("Unsupported image sizes in prior box " + layer->name + " (use an image blob instead of dimensions)"); - } - - IE_ASSERT(layer->insData[1].lock()); - auto img_dims = layer->insData[1].lock()->getTensorDesc().getDims(); - - auto wdim = img_dims.back(); - auto hdim = img_dims.at(img_dims.size()-2); - - cldnn::tensor img_size = (cldnn::tensor) cldnn::spatial(TensorValue(wdim), TensorValue(hdim)); - std::vector inputPrimitives = GetPrevLayersPrimitives(layer); - // second input isn't used by value - only dimensions taken from the layer input - - if (_step_w == 0.0f || _step_h == 0.0f) { - _step_w = static_cast(img_w) / static_cast(wdim); - _step_h = static_cast(img_h) / static_cast(hdim); - } - - std::string priorBoxLayerName = layer_type_name_ID(layer); - auto priorBoxPrim = cldnn::prior_box( - priorBoxLayerName, - inputPrimitives[0], - img_size, - min_size, - max_size, - aspect_ratio, - flip, - clip, - variance, - _step_w, - _step_h, - offset, - scale_all_sizes, - fixed_ratio, - fixed_size, - density); - - topology.add(priorBoxPrim); - AddPrimitiveToProfiler(priorBoxLayerName, layer); -} - -void Program::CreateDeconvolutionPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, {1, 2, 3}); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto deconvLayer = as (layer); - - if (deconvLayer->_dilation[X_AXIS] != 1 || deconvLayer->_dilation[Y_AXIS] != 1) { - THROW_CLDNN_EXCEPTION("Unsupported dilation in deconvolution " << layer->name); - } - - std::vector weightPrimID; - std::vector biasPrimID; - CreateWeightAndBiasPrimitives(topology, layer, weightPrimID, biasPrimID); - - auto allPad = getPaddings(*deconvLayer); - int x_pad = allPad.begin[X_AXIS], y_pad = allPad.begin[Y_AXIS]; - cldnn::tensor stride, padding, dilation; - if (deconvLayer->input()->getTensorDesc().getDims().size() > 4) { - stride = cldnn::tensor(cldnn::batch(1), cldnn::feature(1), - cldnn::spatial(deconvLayer->_stride[X_AXIS], - deconvLayer->_stride[Y_AXIS], - deconvLayer->_stride[Z_AXIS])); - int z_pad = allPad.begin[Z_AXIS]; - padding = cldnn::tensor(cldnn::batch(0), cldnn::feature(0), - cldnn::spatial(-x_pad, -y_pad, -z_pad)); - dilation = cldnn::tensor(cldnn::batch(1), cldnn::feature(1), - cldnn::spatial(deconvLayer->_dilation[X_AXIS], - deconvLayer->_dilation[Y_AXIS], - deconvLayer->_dilation[Z_AXIS])); - } else { - stride = cldnn::tensor(cldnn::batch(1), cldnn::feature(1), - cldnn::spatial(deconvLayer->_stride[X_AXIS], deconvLayer->_stride[Y_AXIS])); - padding = cldnn::tensor(cldnn::batch(0), cldnn::feature(0), - cldnn::spatial(-x_pad, -y_pad, 0)); - dilation = cldnn::tensor(cldnn::batch(1), cldnn::feature(1), - cldnn::spatial(deconvLayer->_dilation[X_AXIS], deconvLayer->_dilation[Y_AXIS])); - } - - std::string deconvLayerName = layer_type_name_ID(layer); - - auto deconvPrim = cldnn::deconvolution(deconvLayerName, - inputPrimitives[0], - weightPrimID, - biasPrimID, - deconvLayer->_group, - stride, - padding, - CldnnTensorFromIEDims(deconvLayer->outData[0]->getTensorDesc().getDims())); - topology.add(deconvPrim); - - AddPrimitiveToProfiler(deconvLayerName, layer); -} - -void Program::CreateCropPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - if (layer->insData.size() != 1 && layer->insData.size() != 2) { - THROW_CLDNN_EXCEPTION("Invalid number of inputs for layer: " << layer->name); - } - if (layer->_fusedWith) { - THROW_CLDNN_EXCEPTION("Unsupported fuse in layer: " << layer->name << " with: " << layer->_fusedWith->name); - } - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto cropLayer = as (layer); - IE_ASSERT(cropLayer->axis.size() == cropLayer->offset.size()); - // IE_ASSERT(cropLayer->outData[0] && cropLayer->outData[0]->dims.size() == 4); - - std::vector offset{ 0, 0, 0, 0 }; - for (size_t i = 0; i < cropLayer->axis.size(); i++) { - if (cropLayer->axis[i] < 0 || cropLayer->axis[i] > 3) { - THROW_CLDNN_EXCEPTION("Invalid crop axis: " + std::to_string(cropLayer->axis[i]) + " in layer " + cropLayer->name); - } - offset[cropLayer->axis[i]] = cropLayer->offset[i]; - } - auto outputDims = cropLayer->outData[0]->getTensorDesc().getDims(); - const size_t ods = outputDims.size(); - cldnn::tensor refSize( - TensorValue(ods > 0 ? outputDims[0] : 1), - TensorValue(ods > 1 ? outputDims[1] : 1), - TensorValue(ods > 3 ? outputDims[3] : 1), - TensorValue(ods > 2 ? outputDims[2] : 1)); - - cldnn::tensor offSize( - TensorValue(offset[0]), - TensorValue(offset[1]), - TensorValue(offset[3]), - TensorValue(offset[2])); - - std::string cropLayerName = layer_type_name_ID(layer); - auto cropPrim = cldnn::crop( - cropLayerName, - inputPrimitives[0], - refSize, - offSize); - - topology.add(cropPrim); - AddPrimitiveToProfiler(cropLayerName, layer); -} - -void Program::CreateROIPoolingPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 2); - auto roiPoolingLayer = as (layer); - - // params - int pooled_width = roiPoolingLayer->GetParamAsInt("pooled_w", 0); - int pooled_height = roiPoolingLayer->GetParamAsInt("pooled_h", 0); - float spatial_scale = roiPoolingLayer->GetParamAsFloat("spatial_scale", 1.0f); - std::string method = roiPoolingLayer->GetParamAsString("method", "max"); - bool position_sensitive = false; - - cldnn::pooling_mode mode = cldnn::pooling_mode::max; - if (method == "bilinear") { - mode = cldnn::pooling_mode::bilinear; - } - auto inputPrimitives = GetPrevLayersPrimitives(layer); - - std::string roiPoolingLayerName = layer_type_name_ID(layer); - auto roiPoolingPrim = cldnn::roi_pooling(roiPoolingLayerName, - inputPrimitives[0], // input data - inputPrimitives[1], // input rois - mode, - position_sensitive, - pooled_width, - pooled_height, - spatial_scale); - - topology.add(roiPoolingPrim); - AddPrimitiveToProfiler(roiPoolingLayerName, layer); -} - -void Program::CreatePSROIPoolingPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - auto psROIPoolingLayer = as (layer); - - // params - std::string mode_str = psROIPoolingLayer->GetParamAsString("mode", "average"); - cldnn::pooling_mode mode = mode_str == "average" ? cldnn::pooling_mode::average : - mode_str == "bilinear" ? cldnn::pooling_mode::bilinear : cldnn::pooling_mode::deformable_bilinear; - bool no_trans = psROIPoolingLayer->GetParamAsBool("no_trans", true); - if (mode != cldnn::pooling_mode::deformable_bilinear || no_trans) - ValidateLayer(layer, 2); - else - ValidateLayer(layer, 3); - int group_size = psROIPoolingLayer->GetParamAsInt("group_size"); - int output_dim = psROIPoolingLayer->GetParamAsInt("output_dim"); - float spatial_scale = psROIPoolingLayer->GetParamAsFloat("spatial_scale"); - int spatial_bins_x = psROIPoolingLayer->GetParamAsInt("spatial_bins_x", 1); - int spatial_bins_y = psROIPoolingLayer->GetParamAsInt("spatial_bins_y", 1); - bool position_sensitive = true; - - auto inputPrimitives = GetPrevLayersPrimitives(layer); - std::string psROIPoolingLayerName = layer_type_name_ID(layer); - - if (mode != cldnn::pooling_mode::deformable_bilinear) { - auto psROIPoolingPrim = cldnn::roi_pooling(psROIPoolingLayerName, - inputPrimitives[0], // input data - inputPrimitives[1], // input rois - mode, - position_sensitive, - group_size, - group_size, - spatial_scale, - output_dim, - spatial_bins_x, - spatial_bins_y); - topology.add(psROIPoolingPrim); - } else { - float trans_std = psROIPoolingLayer->GetParamAsFloat("trans_std", 1); - int part_size = psROIPoolingLayer->GetParamAsInt("part_size", 1); - int pooled_width = psROIPoolingLayer->GetParamAsInt("pooled_width", 1); - int pooled_height = psROIPoolingLayer->GetParamAsInt("pooled_height", 1); - - auto psROIPoolingPrim = cldnn::roi_pooling(psROIPoolingLayerName, - inputPrimitives, - mode, - position_sensitive, - pooled_width, - pooled_height, - spatial_scale, - trans_std, - no_trans, - part_size, - group_size, - output_dim, - spatial_bins_x, - spatial_bins_y); - topology.add(psROIPoolingPrim); - } - AddPrimitiveToProfiler(psROIPoolingLayerName, layer); -} - -void Program::CreateCustomLayerPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr& layer, CLDNNCustomLayerPtr customLayer) { - ValidateLayer(layer, 0); - // todo: handling fusing - auto genericLayer = as (layer); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - - // Handle defines - std::string layerDefines; - for (const auto& def : customLayer->Defines()) { - std::string singleDefine("#define " + def.name + " " + def.prefix); - if (genericLayer->params.find(def.param) != genericLayer->params.end()) { - singleDefine += genericLayer->params.at(def.param); - } else { - singleDefine += def.default_value; - } - singleDefine += def.postfix + "\n"; - layerDefines.append(singleDefine); - } - - // reserve - std::vector reorderedInputs; - reorderedInputs.resize(inputPrimitives.size()); - - // Handle Blobs - std::map blobIndex; - for (auto& blob : genericLayer->blobs) { - const auto blobDims = blob.second->getTensorDesc().getDims(); - // create primitive from blob (always 1d) - cldnn::primitive_id blobId = genericLayer->name + "_" + blob.first; - if (blobDims.size() != 1) { - THROW_CLDNN_EXCEPTION("Invalid dimensions for blob " << blob.first << " in layer " << genericLayer->name); - } - cldnn::layout genericBlobLayout(DataTypeFromPrecision(blob.second->getTensorDesc().getPrecision()), - m_defaultFormat, - cldnn::tensor(1, 1, TensorValue(blobDims.back()), 1)); - blobId = CreatePrimitiveFromBlob(topology, blobId, blob.second, genericBlobLayout); - // save index in blobIndex - blobIndex[blob.first] = reorderedInputs.size(); - // add to reorderedInputs - reorderedInputs.push_back(blobId); - } - - // Handle kernel parameters - std::vector kernelParameters; - cldnn::format outputFormat(cldnn::format::any); - for (const auto& param : customLayer->KernelParams()) { - switch (param.type) { - case CLDNNCustomLayer::ParamType::Input: { - kernelParameters.resize(kernelParameters.size() > size_t(param.paramIndex + 1) ? kernelParameters.size() : size_t(param.paramIndex + 1)); - kernelParameters[param.paramIndex].type = cldnn::custom_gpu_primitive::arg_input; - kernelParameters[param.paramIndex].index = - static_cast((param.portIndex >= inputPrimitives.size()) ? -1 : param.portIndex); - - // Handle input reorder - if (param.portIndex < inputPrimitives.size() && reorderedInputs[param.portIndex].empty()) { - // todo: add support for multiple reorders of the same input? (read as bfyx for one arg and yxfb for another) - if (param.format != cldnn::format::any) { - auto reorderPrimName = inputPrimitives[param.portIndex] + "_" + layer->name + m_preCustomLayerTag; - auto preprocessPrim = cldnn::reorder( - reorderPrimName, - inputPrimitives[param.portIndex], - param.format, - DataTypeFromPrecision(layer->precision)); - - topology.add(preprocessPrim); - AddInnerPrimitiveToProfiler(reorderPrimName, layer_type_name_ID(layer), layer); - reorderedInputs[param.portIndex] = (reorderPrimName); - } else { - reorderedInputs[param.portIndex] = inputPrimitives[param.portIndex]; - } - } - } - break; - case CLDNNCustomLayer::ParamType::Output: { - kernelParameters.resize(kernelParameters.size() > size_t(param.paramIndex + 1) ? kernelParameters.size() : size_t(param.paramIndex + 1)); - kernelParameters[param.paramIndex].type = cldnn::custom_gpu_primitive::arg_output; - kernelParameters[param.paramIndex].index = - static_cast((param.portIndex >= inputPrimitives.size()) ? -1 : param.portIndex); - outputFormat = param.format; - } - break; - case CLDNNCustomLayer::ParamType::Data: { - kernelParameters.resize(kernelParameters.size() > size_t(param.paramIndex + 1) ? kernelParameters.size() : size_t(param.paramIndex + 1)); - kernelParameters[param.paramIndex].type = cldnn::custom_gpu_primitive::arg_input; - kernelParameters[param.paramIndex].index = - static_cast((blobIndex.find(param.blobName) == blobIndex.end()) ? -1 : blobIndex.at(param.blobName)); - } - break; - default: - THROW_CLDNN_EXCEPTION("Invalid custom layer param type: " << param.type << " in layer: " << genericLayer->name); - } - } - const std::string layerTitle("\n// Layer " + layer->name + " using Custom Layer " + customLayer->Name() + "\n"); - const std::string defineTitle("// Custom Layer User Defines\n"); - - auto dims = genericLayer->outData[0]->getTensorDesc().getDims(); - size_t N = (dims.size() > 0) ? dims[0] : 1; - size_t C = (dims.size() > 1) ? dims[1] : 1; - size_t H = (dims.size() > 2) ? dims[2] : 1; - size_t W = (dims.size() > 3) ? dims[3] : 1; - cldnn::tensor outputTensor = cldnn::tensor(cldnn::batch(N), cldnn::feature(C), cldnn::spatial(W, H)); - - cldnn::layout outputLayout = cldnn::layout(DataTypeFromPrecision(genericLayer->precision), outputFormat, outputTensor); - - // evaluate work sizes rules - std::vector gws, lws; - - // assume output tensor is dimension source by default - int batchDim = outputTensor.batch[0]; - int featureDim = outputTensor.feature[0]; - int yDim = outputTensor.spatial[1]; - int xDim = outputTensor.spatial[0]; - int iidx = customLayer->InputDimSourceIndex(); - - std::string genericLayerName = layer_type_name_ID(layer); - // if input index is greater than -1, take dimension from input - if (iidx >= 0) { - if (iidx >= genericLayer->insData.size()) - THROW_CLDNN_EXCEPTION("Invalid input tensor for index: " << iidx); - // get dimensions from one of the input tensors - auto inDataPtr = genericLayer->insData[iidx].lock(); - if (!inDataPtr) { - THROW_CLDNN_EXCEPTION("Data inserted into generic layer " << genericLayer->name << " is nullptr"); - } - SizeVector inputDims = inDataPtr->getTensorDesc().getDims(); - - xDim = inputDims[inputDims.size() - 1]; - yDim = dims.size() > 1 ? inputDims[inputDims.size() - 2] : 0; - featureDim = dims.size() > 2 ? inputDims[inputDims.size() - 3] : 0; - batchDim = dims.size() > 3 ? inputDims[inputDims.size() - 4]: 0; - } - const std::map vars = { - { 'b', batchDim } , { 'B', batchDim }, - { 'f', featureDim }, { 'F', featureDim }, - { 'y', yDim }, { 'Y', yDim }, - { 'x', xDim }, { 'X', xDim }, - }; - for (auto rule : customLayer->GlobalSizeRules()) { - SimpleMathExpression expr; - expr.SetVariables(vars); - expr.SetExpression(rule); - gws.push_back(expr.Evaluate()); - } - for (auto rule : customLayer->LocalSizeRules()) { - SimpleMathExpression expr; - expr.SetVariables(vars); - expr.SetExpression(rule); - lws.push_back(expr.Evaluate()); - } - - auto customPrim = cldnn::custom_gpu_primitive( - genericLayerName, - reorderedInputs, - { layerTitle, defineTitle, layerDefines, customLayer->KernelSource() }, - customLayer->KernelEntry(), - kernelParameters, - customLayer->CompilerOptions(), - outputLayout, - gws, - lws); - - auto prevLayerName = genericLayerName; - if (outputLayout.format != cldnn::format::any && - p_currentOutputs.find(genericLayerName) == p_currentOutputs.end()) { - // Handle output reorder - auto reorderPrimName = genericLayerName + m_postCustomLayerTag; - topology.add( - cldnn::reorder( - reorderPrimName, - genericLayerName, - m_defaultFormat, - customPrim.output_layout.data_type)); - prevLayerName = reorderPrimName; - AddInnerPrimitiveToProfiler(reorderPrimName, layer_type_name_ID(layer), layer); - } - topology.add(customPrim); - AddPrimitiveToProfiler(genericLayerName, layer); - primitiveIDs[genericLayerName] = prevLayerName; -} - -void Program::CreateSimplerNMSPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 3); - IE_ASSERT(layer->insData[0].lock()->getTensorDesc().getDims().front() == 1); // only handling input batch size 1 - IE_ASSERT(layer->insData[1].lock()->getTensorDesc().getDims().front() == 1); // only handling input batch size 1 - auto simpleNMSLayer = as (layer); - - int max_num_proposals = simpleNMSLayer->GetParamAsInt("max_num_proposals"); - float iou_threshold = simpleNMSLayer->GetParamAsFloat("iou_threshold", 0.7f); - int min_bbox_size = simpleNMSLayer->GetParamAsInt("min_bbox_size", 16); - int feature_stride = simpleNMSLayer->GetParamAsInt("feat_stride", 16); - int pre_nms_topn = simpleNMSLayer->GetParamAsInt("pre_nms_topn"); - int post_nms_topn = simpleNMSLayer->GetParamAsInt("post_nms_topn"); - std::vector scale = simpleNMSLayer->GetParamAsFloats("scale"); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - - std::string simpleNMSLayerName = layer_type_name_ID(layer); - auto simpleNMSPrim = cldnn::proposal( - simpleNMSLayerName, - inputPrimitives[0], // cls_score - inputPrimitives[1], // bbox_pred - inputPrimitives[2], // im_info - max_num_proposals, - iou_threshold, - min_bbox_size, - feature_stride, - pre_nms_topn, - post_nms_topn, - { 0.5f, 1.0f, 2.0f }, // ratios for the SimplerNMS variant - scale); - - topology.add(simpleNMSPrim); - AddPrimitiveToProfiler(simpleNMSLayerName, layer); -} - -void Program::CreateEltwisePrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, {}); - - auto eltwiseLayer = as (layer); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - std::string eltwiseLayerName = layer_type_name_ID(layer); - - std::vector coefficients = eltwiseLayer->coeff; - if (eltwiseLayer->_operation != InferenceEngine::EltwiseLayer::Sum && !coefficients.empty()) { - THROW_IE_EXCEPTION << "Only sum operation supports operands coefficients"; - } - - if (!coefficients.empty() && coefficients.size() != inputPrimitives.size()) { - THROW_IE_EXCEPTION << "Number of provided coefficients is not equal to number of operands"; - } - - auto outDimsN = layer->outData[0]->getTensorDesc().getDims().size(); - for (size_t i = 0; i < inputPrimitives.size(); ++i) { - auto inputDims = layer->insData[i].lock()->getTensorDesc().getDims(); - auto inputDimsN = inputDims.size(); - if (inputDimsN != outDimsN) { - // Add reorder if changing number of dimensions requires changing format - auto targetFormat = defaultFormatForDims(outDimsN); - if (targetFormat.value != defaultFormatForDims(inputDimsN).value) { - auto reorderName = eltwiseLayerName + "_cldnn_in" + std::to_string(i) + "_reorder"; - auto targetDatatype = DataTypeFromPrecision(layer->precision); - auto reorderPrim = cldnn::reorder(reorderName, inputPrimitives[i], targetFormat, targetDatatype); - - topology.add(reorderPrim); - AddInnerPrimitiveToProfiler(reorderName, eltwiseLayerName, layer); - - inputPrimitives[i] = reorderName; - } - - auto reshapeName = eltwiseLayerName + "_cldnn_in" + std::to_string(i) + "_reshape"; - - // Extend input dimensions by prepending ones - inputDims.insert(inputDims.begin(), outDimsN - inputDimsN, 1ul); - - auto targetShape = CldnnTensorFromIEDims(inputDims); - - auto reshapePrim = cldnn::reshape(reshapeName, inputPrimitives[i], targetShape); - topology.add(reshapePrim); - AddInnerPrimitiveToProfiler(reshapeName, eltwiseLayerName, layer); - - inputPrimitives[i] = reshapeName; - } - } - - auto out_dt = DataTypeFromPrecision(eltwiseLayer->precision); - auto eltwisePrim = cldnn::eltwise( - eltwiseLayerName, - inputPrimitives, - EltwiseModeFromIEEltwise(eltwiseLayer->_operation), - coefficients, - out_dt); - - topology.add(eltwisePrim); - - AddPrimitiveToProfiler(eltwiseLayerName, layer); -} - -inline cldnn::concatenation::concatenation_axis ConcatAxisFromIEAxis(unsigned axis, unsigned sz) { - if (axis >= sz) - THROW_CLDNN_EXCEPTION("Concatenation axis exceeds number of dimensions"); - - // Difference in dimension ordering between IE and clDNN, - // reverse spatial dimensions after batch and feature. - unsigned cldnn_axis = axis; - if (axis >= 2) { - auto spatial_axis = axis - 2; - // Default and minimum number of dimensions is 4 - auto spatial_size = std::max(sz, 4u) - 2; - cldnn_axis = spatial_size - spatial_axis - 1 + 2; - } - - switch (cldnn_axis) { - case 0: - return cldnn::concatenation::concatenation_axis::along_b; - case 1: - return cldnn::concatenation::concatenation_axis::along_f; - case 2: - return cldnn::concatenation::concatenation_axis::along_x; - case 3: - return cldnn::concatenation::concatenation_axis::along_y; - case 4: - return cldnn::concatenation::concatenation_axis::along_z; - case 5: - return cldnn::concatenation::concatenation_axis::along_w; - default: THROW_CLDNN_EXCEPTION("Unsupported concatenation axis: " << axis); - break; - } - - return cldnn::concatenation::concatenation_axis::along_f; // shouldn't get here -} - -void Program::CreateConcatenatePrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 0); - auto concatLayer = as (layer); - - auto output_dt = DataTypeFromPrecision(concatLayer->outData[0]->getTensorDesc().getPrecision()); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - std::string concatLayerName = layer_type_name_ID(layer); - auto concatPrim = cldnn::concatenation( - concatLayerName, - inputPrimitives, - ConcatAxisFromIEAxis(concatLayer->_axis, - concatLayer->input().get()->getTensorDesc().getDims().size()), - output_dt); - - topology.add(concatPrim); - AddPrimitiveToProfiler(concatLayerName, layer); -} - -void Program::CreateSplitPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 1); - auto splitLayer = as (layer); - if (IsValidSplitConvMerge(splitLayer)) { - // AlextNet style split->conv*2->merge - CreateFusedSplitConvMergePrimitive(topology, layer, true); - } else { -#ifdef _USE_SPLIT_PRIMITIVE - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto inputDims = splitLayer->insData[0].lock()->getTensorDesc().getDims(); - InferenceEngine::SizeVector startOffset(inputDims.size()); - std::vector> outputOffsets; - - std::string splitLayerName = layer_type_name_ID(layer); - for (auto& outLayer : splitLayer->outData) { - if (outLayer->dims.size() != startOffset.size()) { - THROW_CLDNN_EXCEPTION("Invalid dimesions in split layer: " << splitLayer->name << " output: " << outLayer->name); - } - for (size_t i = 0; i < inputDims.size(); i++) { - if ((outLayer->dims[i] + startOffset[i]) > inputDims[i]) { - THROW_CLDNN_EXCEPTION("Invalid dimesions in split layer: " << splitLayer->name << " output: " << outLayer->name); - } - } - auto outTensor = CldnnTensorFromIEDims(outLayer->getTensorDesc().getDims()); - std::string outLayerName = splitLayer->type + ":" + outLayer->name; - - auto cropPrim = cldnn::crop(outLayerName, inputPrimitives[0], outTensor, CldnnTensorFromIEDims(startOffset)); - topology.add(cropPrim); - - primitivesToIRLayersMap[outLayerName] = { layer->name }; - primitiveIDs[outLayerName] = outLayerName; - profilingIDs.push_back(outLayerName); - outputOffsets.emplace_back(outLayerName, CldnnTensorFromIEDims(startOffset)); - for (size_t i = 0; i < inputDims.size(); i++) { - if (outLayer->dims[i] != inputDims[i]) { - startOffset[i] += outLayer->dims[i]; - } - } - } - - auto splitPrim = cldnn::split( - splitLayerName, - inputPrimitives[0], - outputOffsets); - topology.add(splitPrim); - - // set split as not_run - InitProfileInfo(splitLayerName, layer->type, "None", InferenceEngine::InferenceEngineProfileInfo::OPTIMIZED_OUT); // Mark this layer as optimized out - -#else // _USE_SPLIT_PRIMITIVE - // TODO: replace with clDNN split when it's implemented - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto inDataPtr = splitLayer->insData[0].lock(); - if (!inDataPtr) { - THROW_CLDNN_EXCEPTION("Data inserts into split layer " << splitLayer->name << " is nullptr"); - } - auto inputDims = inDataPtr->getTensorDesc().getDims(); - InferenceEngine::SizeVector startOffset(inputDims.size()); - - bool is_single_out_split = splitLayer->outData.size() == 1; - - for (auto& outLayer : splitLayer->outData) { - std::string outLayerName = std::string("crop:") + - (is_single_out_split ? layer->name : outLayer->getName()); - const auto outLayerDims = outLayer->getTensorDesc().getDims(); - if (outLayerDims.size() != startOffset.size()) { - THROW_CLDNN_EXCEPTION("Invalid dimesions in split layer: " << splitLayer->name << " output: " << outLayer->getName()); - } - for (size_t i = 0; i < inputDims.size(); i++) { - if ((outLayerDims[i] + startOffset[i]) > inputDims[i]) { - THROW_CLDNN_EXCEPTION("Invalid dimesions in split layer: " << splitLayer->name << " output: " << outLayer->getName()); - } - } - - auto outTensor = CldnnTensorFromIEDims(outLayerDims, 1); - auto offsetTensor = CldnnTensorFromIEDims(startOffset, 0); - - auto cropPrim = cldnn::crop(outLayerName, inputPrimitives[0], outTensor, offsetTensor); - primitivesToIRLayersMap[outLayerName] = { layer->name }; - primitiveIDs[layer_type_lower(splitLayer) + ":" + outLayer->getName()] = outLayerName; - primitiveIDs[outLayerName] = outLayerName; - topology.add(cropPrim); - profilingIDs.push_back(outLayerName); - InitProfileInfo(outLayerName, "Crop"); - - for (size_t i = 0; i < inputDims.size(); i++) { - if (outLayerDims[i] != inputDims[i]) { - startOffset[i] += outLayerDims[i]; - } - } - } - - // set split as not_run - InitProfileInfo(layer->name, layer->type, false, InferenceEngine::InferenceEngineProfileInfo::OPTIMIZED_OUT); // Mark this layer as optimized out -#endif // _USE_SPLIT_PRIMITIVE - } -} - -void Program::CreateFusedSplitConvMergePrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer, bool useGroups) { - auto inputPrimitives = GetPrevLayersPrimitives(layer); - // only handle the split->conv->merge topology for now - auto splitLayer = as (layer); - IE_ASSERT(IsValidSplitConvMerge(splitLayer)); - - auto convLayer1 = - as (GetNextSingleLayer(splitLayer->outData[0])); - auto convLayer2 = - as (GetNextSingleLayer(splitLayer->outData[1])); - auto concatLayer = - as (GetNextSingleLayer(GetNextSingleLayer(splitLayer->outData[0]))); - - // Mark these layers as optimized out - InitProfileInfo(convLayer1->name, convLayer1->type, false, InferenceEngine::InferenceEngineProfileInfo::OPTIMIZED_OUT); - InitProfileInfo(convLayer2->name, convLayer2->type, false, InferenceEngine::InferenceEngineProfileInfo::OPTIMIZED_OUT); - InitProfileInfo(concatLayer->name, concatLayer->type, false, InferenceEngine::InferenceEngineProfileInfo::OPTIMIZED_OUT); - - // build the split conv primitive - std::vector weightPrimID; - std::vector biasPrimID; - - auto conv_groups = useGroups ? splitLayer->outData.size() : 1; - if (useGroups) { - auto pWeightsBlob0 = getBlobOrNull(GetNextSingleLayer(splitLayer->outData[0]), "weights"); - auto pWeightsBlob1 = getBlobOrNull(GetNextSingleLayer(splitLayer->outData[1]), "weights"); - auto pBiasBlob0 = getBlobOrNull(GetNextSingleLayer(splitLayer->outData[0]), "biases"); - auto pBiasBlob1 = getBlobOrNull(GetNextSingleLayer(splitLayer->outData[1]), "biases"); - - auto outputSize = convLayer1->_out_depth; - auto inputSize = convLayer1->insData[0].lock()->getDims()[1]; - auto bias_format = cldnn::format::bfyx; - auto weights_format = (convLayer1->insData[0].lock()->getDims().size() == 4) ? cldnn::format::goiyx : - cldnn::format::goizyx; - - cldnn::primitive_id weightID = layer_type_name_ID(layer) + "_grouped" + m_weightsTag; - cldnn::primitive_id biasID = layer_type_name_ID(layer) + m_biasesTag; - - std::vector weightDimsVec = { TensorValue(conv_groups), - TensorValue(outputSize), - TensorValue(inputSize) }; - - std::vector biasDimsVec = { TensorValue(1), - TensorValue(conv_groups * outputSize), - TensorValue(1), - TensorValue(1) }; - - for (int i = static_cast(convLayer1->_kernel.size()) - 1; i >= 0; i--) { - weightDimsVec.push_back(TensorValue(convLayer1->_kernel[i])); - } - - if (pWeightsBlob0 != nullptr && pWeightsBlob1 != nullptr) { - cldnn::layout weightsLayout = cldnn::layout( - DataTypeFromPrecision(pWeightsBlob0->getTensorDesc().getPrecision()), - weights_format, - cldnn::tensor(weights_format, weightDimsVec)); - - auto data0 = static_cast(pWeightsBlob0->buffer()); - auto data1 = static_cast(pWeightsBlob1->buffer()); - - auto mem = cldnn::memory::allocate(*m_engine, weightsLayout, 0, false); - auto tmpPointer = mem.pointer(); - auto buf = tmpPointer.data(); - auto bufSize = weightsLayout.bytes_count(); - - for (size_t i = 0; i < bufSize / 2; i++) { - buf[i] = data0[i]; - buf[i + bufSize / 2] = data1[i]; - } - - topology.add(cldnn::data(weightID, mem)); - weightPrimID.push_back(weightID); - } else { - THROW_CLDNN_EXCEPTION("Missing weightID blob data"); - } - - if (pBiasBlob0 != nullptr && pBiasBlob1 != nullptr) { - cldnn::layout biasLayout = cldnn::layout( - DataTypeFromPrecision(pBiasBlob0->getTensorDesc().getPrecision()), - bias_format, - cldnn::tensor(bias_format, biasDimsVec)); - - auto data0 = static_cast(pBiasBlob0->buffer()); - auto data1 = static_cast(pBiasBlob1->buffer()); - - auto mem = cldnn::memory::allocate(*m_engine, biasLayout, 0, false); - auto tmpPointer = mem.pointer(); - auto buf = tmpPointer.data(); - auto bufSize = biasLayout.bytes_count(); - - for (size_t i = 0; i < bufSize / 2; i++) { - buf[i] = data0[i]; - buf[i + bufSize / 2] = data1[i]; - } - - topology.add(cldnn::data(biasID, mem)); - biasPrimID.push_back(biasID); - } - } else { - CreateWeightAndBiasPrimitives(topology, GetNextSingleLayer(splitLayer->outData[0]), weightPrimID, biasPrimID); - CreateWeightAndBiasPrimitives(topology, GetNextSingleLayer(splitLayer->outData[1]), weightPrimID, biasPrimID); - } - - auto concatLayerPtr = std::make_shared(*concatLayer); - - cldnn::tensor stride = cldnn::tensor(cldnn::batch(1), cldnn::feature(1), - cldnn::spatial(convLayer1->_stride[X_AXIS], convLayer1->_stride[Y_AXIS])); - auto allPad = getPaddings(*convLayer1); - int x_pad = allPad.begin[X_AXIS], y_pad = allPad.begin[Y_AXIS]; - cldnn::tensor padding = cldnn::tensor(cldnn::batch(0), cldnn::feature(0), - cldnn::spatial(-x_pad, -y_pad, 0)); - - cldnn::tensor dilation = cldnn::tensor(cldnn::batch(1), cldnn::feature(1), - cldnn::spatial(convLayer1->_dilation[X_AXIS], convLayer1->_dilation[Y_AXIS])); - - std::string splitLayerName = layer_type_name_ID(layer); - auto splitPrim = cldnn::convolution(splitLayerName, - inputPrimitives[0], - weightPrimID, - biasPrimID, - conv_groups, - stride, - padding, - dilation, - CldnnTensorFromIEDims(concatLayer->outData[0]->getTensorDesc().getDims()), - DataTypeFromPrecision(convLayer2->outData[0]->getPrecision())); - - layer = concatLayerPtr; - - primitivesToIRLayersMap[splitLayerName] = {convLayer1->name, convLayer2->name, concatLayer->name}; - primitiveIDs[splitLayerName] = splitLayerName; - primitiveIDs[layer_type_name_ID(convLayer1)] = splitLayerName; - primitiveIDs[layer_type_name_ID(convLayer2)] = splitLayerName; - primitiveIDs[layer_type_name_ID(concatLayer)] = splitLayerName; // pair the last merged layer (concat or relu) with - // this primitive name to be used as - // input prim for subsequent layers - topology.add(splitPrim); - profilingIDs.push_back(splitLayerName); -} - -void Program::CreatePowerPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 1); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto powerLayer = as (layer); - if (powerLayer->power != 1.0f && powerLayer->power != 0.5f) { - auto power = powerLayer->power; - auto scale = powerLayer->scale; - auto shift = powerLayer->offset; - - std::string powerLayerName = layer_type_name_ID(layer); - std::string linearLayerName = powerLayerName + "_linear_activation"; - auto linearActivationPrim = cldnn::activation(linearLayerName, inputPrimitives[0], cldnn::activation_func::linear, { scale, shift }); - topology.add(linearActivationPrim); - AddInnerPrimitiveToProfiler(linearLayerName, powerLayerName, layer); - - auto powActivationPrim = cldnn::activation(powerLayerName, linearLayerName, cldnn::activation_func::pow, { power, 0.f }); - topology.add(powActivationPrim); - AddPrimitiveToProfiler(powerLayerName, layer); - } else { - std::string powerLayerName = layer_type_name_ID(layer); - if ((powerLayer->scale == 1.0f) && (powerLayer->offset == 0.0f)) { - if (powerLayer->power == 0.5f) { - auto activationPrim = cldnn::activation(powerLayerName, inputPrimitives[0], cldnn::activation_func::sqrt); - topology.add(activationPrim); - profilingIDs.push_back(powerLayerName); - primitiveIDs[powerLayerName] = powerLayerName; - } else { - // skip this layer - primitiveIDs[powerLayerName] = inputPrimitives[0]; // register the previous primID for this layer too - InitProfileInfo(layer->name, layer->type, false, InferenceEngine::InferenceEngineProfileInfo::NOT_RUN); // Mark this layer as not run - } - } else { - // create scale primitive - auto scaleValuePrimName = powerLayerName + m_scalesTag; - AddSingleValuePrimitive(topology, scaleValuePrimName, - DataTypeFromPrecision(powerLayer->precision), - powerLayer->scale); - - cldnn::primitive_id biasValuePrimName = ""; - if (powerLayer->offset != 0.0f) { - biasValuePrimName = powerLayerName + m_biasesTag; - AddSingleValuePrimitive(topology, biasValuePrimName, - DataTypeFromPrecision(powerLayer->precision), - powerLayer->offset); - } - auto scalePrim = cldnn::scale( - powerLayerName, - inputPrimitives[0], - scaleValuePrimName, - biasValuePrimName); - - topology.add(scalePrim); - AddPrimitiveToProfiler(powerLayerName, layer); - - if (powerLayer->power == 0.5f) { - auto activationPrim = cldnn::activation(powerLayerName + "_sqrt", powerLayerName, cldnn::activation_func::sqrt); - topology.add(activationPrim); - AddInnerPrimitiveToProfiler(powerLayerName + "_sqrt", powerLayerName, layer); - profilingIDs.push_back(powerLayerName + "_sqrt"); - } - } - } -} - -void Program::CreateSoftMaxPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 1); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto softmaxLayer = as (layer); - - std::string softmaxLayerName = layer_type_name_ID(layer); - auto softmaxPrim = cldnn::softmax(softmaxLayerName, - inputPrimitives[0], - SoftmaxDimensionFromIEAxis(softmaxLayer)); - topology.add(softmaxPrim); - AddPrimitiveToProfiler(softmaxLayerName, layer); -} - -void Program::CreateLogSoftmaxPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 1); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto logSoftmaxLayer = as(layer); - auto sz = logSoftmaxLayer->input().get()->getTensorDesc().getDims().size(); - - auto axis = logSoftmaxLayer->GetParamAsInt("axis", 1); - if (axis < 0) axis += sz; - cldnn::softmax::dimension_t softmax_axis; - - switch (axis) { - case 0: softmax_axis = cldnn::softmax::normalize_all; break; - case 1: softmax_axis = cldnn::softmax::normalize_f; break; - case 2: softmax_axis = sz > 4 ? cldnn::softmax::normalize_z : cldnn::softmax::normalize_y; break; - case 3: softmax_axis = sz > 4 ? cldnn::softmax::normalize_y : cldnn::softmax::normalize_x; break; - case 4: softmax_axis = cldnn::softmax::normalize_x; break; - default: THROW_CLDNN_EXCEPTION("Unsupported logsoftmax axis " << axis); - } - - std::string softmaxLayerName = "softMax"; - auto softmaxPrim = cldnn::softmax(softmaxLayerName, inputPrimitives[0], softmax_axis); - topology.add(softmaxPrim); - AddPrimitiveToProfiler(softmaxLayerName, layer); - - std::string logSoftmaxLayerName = layer_type_name_ID(layer); - auto logPrim = cldnn::activation(logSoftmaxLayerName, softmaxLayerName, cldnn::activation_func::log); - topology.add(logPrim); - AddPrimitiveToProfiler(logSoftmaxLayerName, layer); -} - -void Program::CreateFullyConnectedPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, {1, 2, 3}); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto fcLayer = as (layer); - - std::string fcLayerName = layer_type_name_ID(layer); - std::vector weightPrimID; - std::vector biasPrimID; - CreateWeightAndBiasPrimitives(topology, layer, weightPrimID, biasPrimID); - - IE_ASSERT(weightPrimID.size() == 1); - IE_ASSERT(biasPrimID.size() <= 1); - - auto outDims = layer->outData[0]->getTensorDesc().getDims().size(); - auto fcPrim = cldnn::fully_connected(fcLayerName, - inputPrimitives[0], - weightPrimID[0], - biasPrimID.empty() ? "" : biasPrimID[0], - DataTypeFromPrecision(fcLayer->outData[0]->getTensorDesc().getPrecision()), - cldnn::padding(), - layer->outData[0]->getTensorDesc().getDims().size()); - - topology.add(fcPrim); - - AddPrimitiveToProfiler(fcLayerName, layer); -} - -void Program::CreatePoolingPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 1); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - - auto poolLayer = as(layer); - - std::string poolLayerName = layer_type_name_ID(layer); - auto allPads = getPaddings(*poolLayer); - if (poolLayer->outData.size() > 1) { - // max pooling with argmax - SizeVector argmaxDims; - - std::string realOutputID, argmaxOutputID; - int outputOrder = 0; - - for (auto out : poolLayer->outData) { - auto layersMap = getInputTo(out); - - for (auto item : layersMap) { - bool isUpooling = (LayerTypeFromStr(item.second->type) == Unpooling); - if (outputOrder == 1 && isUpooling) { - argmaxDims = InferenceEngine::SizeVector(out->getTensorDesc().getDims()); - argmaxOutputID = out->getName(); - } else { - realOutputID = out->getName(); - } - outputOrder++; - } - } - - // create mutable_data primitive for storing argmax data - cldnn::tensor mutableTensor; - switch (argmaxDims.size()) { - case 4: mutableTensor = cldnn::tensor(TensorValue(argmaxDims[0]), TensorValue(argmaxDims[1]), - TensorValue(argmaxDims[3]), TensorValue(argmaxDims[2])); - break; - case 3: mutableTensor = cldnn::tensor(TensorValue(argmaxDims[0]), TensorValue(argmaxDims[1]), - 1, TensorValue(argmaxDims[2])); - break; - case 2: mutableTensor = cldnn::tensor(TensorValue(argmaxDims[0]), TensorValue(argmaxDims[1]), 1, 1); - break; - case 1: // not implemented yet. - default: THROW_CLDNN_EXCEPTION("Invalid constant blob dimensions"); - } - - cldnn::layout mutableLayout = cldnn::layout( - cldnn::data_types::f32, - m_defaultFormat, - mutableTensor); - - cldnn::primitive_id argmaxPrimID = layer->name + "_argmax_mutable"; - - auto mem = cldnn::memory::allocate(*m_engine, mutableLayout); - auto argmax_mutable_prim = cldnn::mutable_data(argmaxPrimID, mem); - topology.add(argmax_mutable_prim); - primitivesToIRLayersMap[argmaxPrimID] = { layer->name }; - primitivesToIRLayersMap[argmaxOutputID] = { layer->name }; - primitiveIDs[argmaxPrimID] = argmaxPrimID; - primitiveIDs[argmaxOutputID] = argmaxPrimID; - - // create pooling primitive itself - auto poolPrim = cldnn::pooling(poolLayerName, - inputPrimitives[0], - argmaxPrimID, - cldnn::pooling_mode::max_with_argmax, - (cldnn::tensor) cldnn::spatial(TensorValue(poolLayer->_kernel[X_AXIS]), TensorValue(poolLayer->_kernel[Y_AXIS])), // size - (cldnn::tensor) cldnn::spatial(TensorValue(poolLayer->_stride[X_AXIS]), TensorValue(poolLayer->_stride[Y_AXIS])), // stride - // input offset (padding) - explicit tensor for 0 bf - cldnn::tensor { 0, 0, -TensorValue(allPads.begin[X_AXIS]), -TensorValue(allPads.begin[Y_AXIS]), 0 }, - CldnnTensorFromIEDims(poolLayer->outData[0]->getTensorDesc().getDims())); - - topology.add(poolPrim); - primitiveIDs[realOutputID] = poolLayerName; - } else { - // regular pooling - cldnn::tensor size, stride, input_offset; - - if (poolLayer->input()->getTensorDesc().getDims().size() > 4) { - size = (cldnn::tensor) cldnn::spatial(TensorValue(poolLayer->_kernel[X_AXIS]), - TensorValue(poolLayer->_kernel[Y_AXIS]), - TensorValue(poolLayer->_kernel[Z_AXIS])); - stride = (cldnn::tensor) cldnn::spatial(TensorValue(poolLayer->_stride[X_AXIS]), - TensorValue(poolLayer->_stride[Y_AXIS]), - TensorValue(poolLayer->_stride[Z_AXIS])); - input_offset = { 0, 0, -TensorValue(allPads.begin[X_AXIS]), - -TensorValue(allPads.begin[Y_AXIS]), - -TensorValue(allPads.begin[Z_AXIS]) }; - } else { - size = (cldnn::tensor) cldnn::spatial(TensorValue(poolLayer->_kernel[X_AXIS]), TensorValue(poolLayer->_kernel[Y_AXIS])); - stride = (cldnn::tensor) cldnn::spatial(TensorValue(poolLayer->_stride[X_AXIS]), TensorValue(poolLayer->_stride[Y_AXIS])); - input_offset = { 0, 0, -TensorValue(allPads.begin[X_AXIS]), -TensorValue(allPads.begin[Y_AXIS]), 0 }; - } - - auto dt = DataTypeFromPrecision(poolLayer->outData[0]->getPrecision()); - - auto poolPrim = cldnn::pooling(poolLayerName, - inputPrimitives[0], - PoolingModeFromIEPooling(poolLayer->_type, poolLayer->_exclude_pad), - size, - stride, - input_offset, - CldnnTensorFromIEDims(poolLayer->outData[0]->getTensorDesc().getDims()), - dt); - cldnn::tensor pad_end = { 0, 0, -TensorValue(poolLayer->_pads_end[X_AXIS]), -TensorValue(poolLayer->_pads_end[Y_AXIS]), 0 }; - poolPrim.pad_end = pad_end; - topology.add(poolPrim); - primitiveIDs[poolLayerName] = poolLayerName; - } - - primitivesToIRLayersMap[poolLayerName] = { layer->name }; - profilingIDs.push_back(poolLayerName); -} - -void Program::CreateLRNPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 1); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto lrnLayer = as (layer); - std::string lrnLayerName = layer_type_name_ID(layer); - auto lrnPrim = cldnn::lrn( - lrnLayerName, - inputPrimitives[0], - lrnLayer->_size, - static_cast(lrnLayer->_k), - lrnLayer->_alpha, - lrnLayer->_beta, - lrnLayer->_isAcrossMaps ? cldnn::lrn_norm_region_across_channel : cldnn::lrn_norm_region_within_channel); - - topology.add(lrnPrim); - AddPrimitiveToProfiler(lrnLayerName, layer); -} - -void Program::CreateActivationPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer, const LayerType type) { - ValidateLayer(layer, 1); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - cldnn::activation_additional_params params{ 0.0f, 0.0f }; - cldnn::activation_func func = cldnn::activation_func::none; - - LayerType activationType; - if (type == Activation) { - std::string activation_type = layer->GetParamAsString("type"); - if (activation_type == "tanh") { - activationType = TanH; - } else if (activation_type == "sigmoid" || activation_type == "logistic") { - activationType = Sigmoid; - } else if (activation_type == "elu") { - activationType = ELU; - } else if (activation_type == "swish") { - activationType = Swish; - } else if (activation_type == "hswish") { - activationType = HSwish; - } else if (activation_type == "mish") { - activationType = Mish; - } else if (activation_type == "gelu") { - activationType = Gelu; - } else if (activation_type == "relu") { - activationType = ReLU; - } else if (activation_type == "relu6") { - activationType = ReLU6; - } else if (activation_type == "clamp") { - activationType = Clamp; - } else if (activation_type == "exp") { - activationType = Exp; - } else if (activation_type == "not") { - activationType = Not; - } else if (activation_type == "hsigmoid") { - activationType = HSigmoid; - } else { - THROW_CLDNN_EXCEPTION("Unsupported activation type (" + activation_type + - ") in layer " + layer->name); - } - } else { - activationType = type; - } - - switch (activationType) { - case TanH: - { - func = cldnn::activation_func::hyperbolic_tan; - break; - } - case ELU: - { - func = cldnn::activation_func::elu; - params.a = layer->GetParamAsFloat("alpha", 1.0f); - break; - } - case Sigmoid: - { - func = cldnn::activation_func::logistic; - break; - } - case ReLU: - { - auto negative_slope = layer->GetParamAsFloat("negative_slope", 0.0f); - if (negative_slope == 0.f) { - func = cldnn::activation_func::relu; - } else { - func = cldnn::activation_func::relu_negative_slope; - params.a = negative_slope; - } - break; - } - case ReLU6: - { - func = cldnn::activation_func::clamp; - params.b = layer->GetParamAsFloat("n", 6.0f); - break; - } - case Clamp: - { - func = cldnn::activation_func::clamp; - params.a = layer->GetParamAsFloat("min"); - params.b = layer->GetParamAsFloat("max"); - break; - } - case Exp: - { - func = cldnn::activation_func::exp; - break; - } - case Not: - { - func = cldnn::activation_func::negation; - break; - } - case Asin: - { - func = cldnn::activation_func::asin; - break; - } - case Asinh: - { - func = cldnn::activation_func::asinh; - break; - } - case Acos: - { - func = cldnn::activation_func::acos; - break; - } - case Acosh: - { - func = cldnn::activation_func::acosh; - break; - } - case Atan: - { - func = cldnn::activation_func::atan; - break; - } - case Atanh: - { - func = cldnn::activation_func::atanh; - break; - } - case Abs: - { - func = cldnn::activation_func::abs; - break; - } - case Floor: - { - func = cldnn::activation_func::floor; - break; - } - case Ceil: - { - func = cldnn::activation_func::ceil; - break; - } - case Ceiling: - { - func = cldnn::activation_func::ceil; - break; - } - case Erf: - { - func = cldnn::activation_func::erf; - break; - } - case HardSigmoid: - { - func = cldnn::activation_func::hard_sigmoid; - params.a = layer->GetParamAsFloat("alpha", 0.2f); - params.b = layer->GetParamAsFloat("beta", 0.5f); - break; - } - case HSigmoid: - { - func = cldnn::activation_func::hsigmoid; - break; - } - case Log: - { - func = cldnn::activation_func::log; - break; - } - case Neg: - { - func = cldnn::activation_func::negative; - break; - } - case Reciprocal: - { - func = cldnn::activation_func::reciprocal; - break; - } - case Selu: - { - func = cldnn::activation_func::selu; - params.a = layer->GetParamAsFloat("alpha", 1.67326f); - params.b = layer->GetParamAsFloat("gamma", 1.0507f); - break; - } - case SoftPlus: - { - func = cldnn::activation_func::softplus; - break; - } - case SoftSign: - { - func = cldnn::activation_func::softsign; - break; - } - case Tan: - { - func = cldnn::activation_func::tan; - break; - } - case Sin: - { - func = cldnn::activation_func::sin; - break; - } - case Sinh: - { - func = cldnn::activation_func::sinh; - break; - } - case Cos: - { - func = cldnn::activation_func::cos; - break; - } - case Cosh: - { - func = cldnn::activation_func::cosh; - break; - } - case Swish: - { - func = cldnn::activation_func::swish; - break; - } - case HSwish: - { - func = cldnn::activation_func::hswish; - break; - } - case Mish: - { - func = cldnn::activation_func::mish; - break; - } - case Gelu: - { - func = cldnn::activation_func::gelu; - break; - } - case Sign: - { - func = cldnn::activation_func::sign; - break; - } - default: - THROW_CLDNN_EXCEPTION("Unsupported activation type (" + layer->type + - ") in layer " + layer->name); - } - - std::string layerName = layer_type_name_ID(layer); - auto activationPrimitive = cldnn::activation(layerName, inputPrimitives[0], func, params); - topology.add(activationPrimitive); - AddPrimitiveToProfiler(layerName, layer); -} - -void Program::CreateCopyPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 1); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - - // Optimize out and just update references - std::string layerName = layer_type_name_ID(layer); - primitivesToIRLayersMap[layerName] = { layer->name }; - primitiveIDs[layerName] = inputPrimitives[0]; - InitProfileInfo(layerName, layer->type, false, InferenceEngine::InferenceEngineProfileInfo::OPTIMIZED_OUT); // Mark this layer as optimized out -} - -void Program::CreateResamplePrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 1); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto resampleLayer = as (layer); - - size_t inFeatures = 1; - std::shared_ptr insData0 = layer->insData[0].lock(); - IE_ASSERT(insData0 != nullptr); - auto insData0dims = insData0->getTensorDesc().getDims(); - auto outDims = layer->outData[0]->getTensorDesc().getDims(); - auto outTensor = CldnnTensorFromIEDims(outDims); - - if (insData0dims.size() > 1) { - inFeatures = insData0dims[1]; - } - std::string sampleType = resampleLayer->GetParamAsString("type"); - std::string resampleLayerName = layer_type_name_ID(layer); - - cldnn::resample_type cldnnSampleType = ResampleTypeFromString(sampleType); - - auto upsamplingPrim = cldnn::resample( - resampleLayerName, - inputPrimitives[0], - outTensor, - inFeatures, - cldnnSampleType); - - topology.add(upsamplingPrim); - AddPrimitiveToProfiler(resampleLayerName, layer); -} - -void Program::CreateInterpPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 1); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto interpLayer = as (layer); - - std::shared_ptr insData0 = layer->insData[0].lock(); - IE_ASSERT(insData0 != nullptr); - auto insData0dims = insData0->getTensorDesc().getDims(); - auto outDims = layer->outData[0]->getTensorDesc().getDims(); - auto outTensor = CldnnTensorFromIEDims(outDims); - - std::vector pads_begin(outDims.size(), 0); - std::vector pads_end(outDims.size(), 0); - int pad_begin = interpLayer->GetParamAsInt("pad_beg_", 0); - int pad_end = interpLayer->GetParamAsInt("pad_end_", 0); - for (size_t i = 2; i < pads_begin.size(); ++i) { - pads_begin[i] = pad_begin; - pads_end[i] = pad_end; - } - int align_corners = interpLayer->GetParamAsInt("align_corners", 1); - - std::string resampleLayerName = layer_type_name_ID(layer); - - auto resamplePrim = cldnn::resample( - resampleLayerName, - inputPrimitives[0], - outTensor, - pads_begin, - pads_end, - align_corners, - cldnn::resample_type::bilinear); - - topology.add(resamplePrim); - AddPrimitiveToProfiler(resampleLayerName, layer); -} - -static cldnn::coordinate_transformation_mode CoordinateTransformationModeFromString(const std::string &str) { - static const caseless_map CoordTransformationMode = { - { "half_pixel" , cldnn::coordinate_transformation_mode::half_pixel }, - { "pytorch_half_pixel" , cldnn::coordinate_transformation_mode::pytorch_half_pixel }, - { "asymmetric" , cldnn::coordinate_transformation_mode::asymmetric }, - { "tf_half_pixel_for_nn" , cldnn::coordinate_transformation_mode::tf_half_pixel_for_nn }, - { "align_corners" , cldnn::coordinate_transformation_mode::align_corners }, - }; - auto it = CoordTransformationMode.find(str); - if (it != CoordTransformationMode.end()) - return it->second; - else - THROW_CLDNN_EXCEPTION("Unknown coordinate transformation mode: " << str); -} - -static cldnn::nearest_mode NearestModeFromString(const std::string &str) { - static const caseless_map NearestMode = { - { "round_prefer_floor" , cldnn::nearest_mode::round_prefer_floor }, - { "round_prefer_ceil" , cldnn::nearest_mode::round_prefer_ceil }, - { "floor" , cldnn::nearest_mode::floor }, - { "ceil" , cldnn::nearest_mode::ceil }, - { "simple" , cldnn::nearest_mode::simple }, - }; - auto it = NearestMode.find(str); - if (it != NearestMode.end()) - return it->second; - else - THROW_CLDNN_EXCEPTION("Unknown nearest mode: " << str); -} - -static cldnn::shape_calculation_mode ShapeCalculationModeFromString(const std::string &str) { - static const caseless_map shapeCalcMode = { - { "sizes" , cldnn::shape_calculation_mode::sizes }, - { "scales" , cldnn::shape_calculation_mode::scales }, - }; - auto it = shapeCalcMode.find(str); - if (it != shapeCalcMode.end()) - return it->second; - else - THROW_CLDNN_EXCEPTION("Unknown shape calculation mode: " << str); -} - -inline cldnn::resample::resample_axis InterpolateAxisFromIEAxis(int axis, unsigned sz) { - if (axis < 0) - axis += sz; - if (axis < 0 || axis >= sz) - THROW_CLDNN_EXCEPTION("Interpolate axis is not correspond to number of dimensions"); - - // Difference in dimension ordering between IE and clDNN, - // reverse spatial dimensions after batch and feature. - unsigned cldnn_axis = axis; - if (axis >= 2) { - auto spatial_axis = axis - 2; - // Default and minimum number of dimensions is 4 - auto spatial_size = std::max(sz, 4u) - 2; - cldnn_axis = spatial_size - spatial_axis - 1 + 2; - } - - switch (cldnn_axis) { - case 0: - return cldnn::resample::resample_axis::along_b; - case 1: - return cldnn::resample::resample_axis::along_f; - case 2: - return cldnn::resample::resample_axis::along_x; - case 3: - return cldnn::resample::resample_axis::along_y; - case 4: - return cldnn::resample::resample_axis::along_z; - case 5: - return cldnn::resample::resample_axis::along_w; - default: - break; - } - THROW_CLDNN_EXCEPTION("Unsupported Interpolate axis: " << axis); -} - -void Program::CreateInterpolatePrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, {3, 4}); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto interpolateLayer = as (layer); - - std::shared_ptr insData0 = layer->insData[0].lock(); - IE_ASSERT(insData0 != nullptr); - auto insData0dims = insData0->getTensorDesc().getDims(); - auto outDims = layer->outData[0]->getTensorDesc().getDims(); - auto outTensor = CldnnTensorFromIEDims(outDims); - - auto pads_begin = interpolateLayer->GetParamAsInts("pads_begin", {}); - auto pads_end = interpolateLayer->GetParamAsInts("pads_end", {}); - for (size_t i = pads_begin.size(); i < outDims.size() || i < 4; ++i) - pads_begin.push_back(0); - for (size_t i = pads_end.size(); i < outDims.size() || i < 4; ++i) - pads_end.push_back(0); - std::string mode = interpolateLayer->GetParamAsString("mode"); - std::string shape_calc_mode = interpolateLayer->GetParamAsString("shape_calculation_mode"); - std::string coordinate_trans_mode = interpolateLayer->GetParamAsString("coordinate_transformation_mode", "half_pixel"); - std::string nearest_mode = interpolateLayer->GetParamAsString("nearest_mode", "round_prefer_floor"); - int antialias = interpolateLayer->GetParamAsBool("antialias", false); - float cube_coeff = interpolateLayer->GetParamAsFloat("cube_coeff", -0.75f); - - std::string resampleLayerName = layer_type_name_ID(layer); - auto cldnnSampleType = ResampleTypeFromString(mode); - auto shapeCalcMode = ShapeCalculationModeFromString(shape_calc_mode); - auto coordTransMode = CoordinateTransformationModeFromString(coordinate_trans_mode); - auto nearestMode = NearestModeFromString(nearest_mode); - - std::vector scales; - auto scalesInput = layer->insData[2].lock(); - auto scalesInputCreator = getCreatorLayer(scalesInput).lock(); - if (scalesInputCreator->blobs.size() == 1) { - auto constantBlob = scalesInputCreator->blobs.begin()->second; - auto axesPrecision = constantBlob->getTensorDesc().getPrecision(); - if (axesPrecision == InferenceEngine::Precision::FP32) { - 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"; - } - } - - std::vector axes; - if (inputPrimitives.size() == 4) { - auto axesInput = layer->insData[3].lock(); - auto axesInputCreator = getCreatorLayer(axesInput).lock(); - if (axesInputCreator->blobs.size() == 1) { - auto constantBlob = axesInputCreator->blobs.begin()->second; - auto axesPrecision = constantBlob->getTensorDesc().getPrecision(); - if (axesPrecision == InferenceEngine::Precision::I32) { - auto data = constantBlob->buffer().as(); - for (size_t i = 0; i < constantBlob->size(); ++i) - axes.push_back(InterpolateAxisFromIEAxis(data[i], insData0dims.size())); - } else if (axesPrecision == InferenceEngine::Precision::I64) { - auto data = constantBlob->buffer().as(); - for (size_t i = 0; i < constantBlob->size(); ++i) - axes.push_back(InterpolateAxisFromIEAxis(static_cast(data[i]), insData0dims.size())); - } else { - THROW_IE_EXCEPTION << layer->name - << " Incorrect axes input precision"; - } - } - } else { - for (int i = 0; i < insData0dims.size(); ++i) { - axes.push_back(InterpolateAxisFromIEAxis(i, insData0dims.size())); - } - } - - if (axes.size() != scales.size()) - THROW_IE_EXCEPTION << layer->name << " Incorrect axes and scales should be the same size"; - - cldnn::resample::AxesAndScales axesAndScales; - for (size_t i = 0; i < axes.size(); ++i) { - axesAndScales[axes[i]] = scales[i]; - } - - if (cldnnSampleType == cldnn::resample_type::linear_onnx) { - if (insData0dims.size() != 2 && insData0dims.size() != 4) - THROW_CLDNN_EXCEPTION("mode 'linear_onnx' supports only 2D or 4D tensors"); - if (axes.size() != 2 && insData0dims.size() != axes.size()) - THROW_CLDNN_EXCEPTION("mode 'linear_onnx' supports only axes with size 2 or equal to input rank"); - bool correctAxes = - ((axes[0] == cldnn::resample::resample_axis::along_b) && - (axes[1] == cldnn::resample::resample_axis::along_f)) || - ((axes[0] == cldnn::resample::resample_axis::along_y) && - (axes[1] == cldnn::resample::resample_axis::along_x)); - if (axes.size() == 4 && insData0dims.size() == 4) { - correctAxes = axes[0] == cldnn::resample::resample_axis::along_b && - axes[1] == cldnn::resample::resample_axis::along_f && - axes[2] == cldnn::resample::resample_axis::along_y && - axes[3] == cldnn::resample::resample_axis::along_x; - } - if (!correctAxes) - THROW_CLDNN_EXCEPTION( - "mode 'linear_onnx' supports only case when axes = {2, 3} or " - "axes = {0, 1} or axes = {0, 1, 2, 3}"); - } - - auto resamplePrim = cldnn::resample( - resampleLayerName, - inputPrimitives[0], - outTensor, - axesAndScales, - pads_begin, - pads_end, - antialias, - cube_coeff, - cldnnSampleType, - shapeCalcMode, - coordTransMode, - nearestMode); - - topology.add(resamplePrim); - AddPrimitiveToProfiler(resampleLayerName, layer); -} - -void Program::CreateYOLO2RegionPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 1); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto YOLOregionLayer = as (layer); - - uint32_t coords = YOLOregionLayer->GetParamAsUInt("coords", 4); - uint32_t classes = YOLOregionLayer->GetParamAsUInt("classes", 20); - uint32_t num = YOLOregionLayer->GetParamAsUInt("num", 1); - bool do_softmax = YOLOregionLayer->GetParamAsBool("do_softmax", true); - - uint32_t mask_size = 0; - if (HasParam(YOLOregionLayer->params, "mask")) { - const auto mask = YOLOregionLayer->GetParamAsInts("mask"); - mask_size = static_cast(mask.size()); - } - - std::string YOLOregionLayerName = layer_type_name_ID(layer); - auto regionPrim = cldnn::region_yolo( - YOLOregionLayerName, - inputPrimitives[0], - coords, - classes, - num, - mask_size, - do_softmax); - - topology.add(regionPrim); - AddPrimitiveToProfiler(YOLOregionLayerName, layer); -} - -void Program::CreateYOLO2ReorgPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 1); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto YOLOreorgLayer = as (layer); - uint32_t stride = YOLOreorgLayer->GetParamAsUInt("stride"); - - std::string YOLOreorgLayerName = layer_type_name_ID(layer); - auto reorgPrim = cldnn::reorg_yolo( - YOLOreorgLayerName, - inputPrimitives[0], - stride); - - topology.add(reorgPrim); - AddPrimitiveToProfiler(YOLOreorgLayerName, layer); -} - -void Program::CreateArgMaxMinPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer, const LayerType type) { - ValidateLayer(layer, 1); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto ArgMaxLayer = as (layer); - const cldnn::arg_max_min::out_type otype = type == ArgMin ? cldnn::arg_max_min::out_type::min : cldnn::arg_max_min::out_type::max; - - if (HasParam(ArgMaxLayer->params, "out_max_val")) { - int32_t out_max_val_flag = ArgMaxLayer->GetParamAsInt("out_max_val"); - if (out_max_val_flag != 0) { - THROW_IE_EXCEPTION << NOT_IMPLEMENTED_str << "ArgMax: out_max_val param is not supported for layer: " << layer->name; - } - } - - uint32_t top_k = ArgMaxLayer->GetParamAsUInt("top_k", 1); - - cldnn::arg_max_min::axis_name chosen_axis = cldnn::arg_max_min::axis_name::xyf; - - if (HasParam(ArgMaxLayer->params, "axis")) { - int32_t axis_param = ArgMaxLayer->GetParamAsInt("axis", 1); - - int32_t axis = axis_param; - if (ArgMaxLayer->outData[0]->getTensorDesc().getDims().size() == 5) { - if (-5 <= axis && axis <= -1) - axis += 5; - - switch (axis) { - case 0: chosen_axis = cldnn::arg_max_min::axis_name::batch; break; - case 1: chosen_axis = cldnn::arg_max_min::axis_name::feature; break; - case 2: chosen_axis = cldnn::arg_max_min::axis_name::z; break; - case 3: chosen_axis = cldnn::arg_max_min::axis_name::y; break; - case 4: chosen_axis = cldnn::arg_max_min::axis_name::x; break; - } - } else { - if (-4 <= axis && axis <= -1) - axis += 4; - - switch (axis) { - case 0: chosen_axis = cldnn::arg_max_min::axis_name::batch; break; - case 1: chosen_axis = cldnn::arg_max_min::axis_name::feature; break; - case 2: chosen_axis = cldnn::arg_max_min::axis_name::y; break; - case 3: chosen_axis = cldnn::arg_max_min::axis_name::x; break; - } - } - } - - std::string ArgMaxLayerName = layer_type_name_ID(layer); - auto argmaxPrim = cldnn::arg_max_min( - ArgMaxLayerName, - inputPrimitives, - otype, - top_k, - chosen_axis); - - topology.add(argmaxPrim); - AddPrimitiveToProfiler(ArgMaxLayerName, layer); -} - -void Program::CreateTopKPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 2); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto ArgMaxLayer = as (layer); - - cldnn::arg_max_min::out_type otype; - cldnn::arg_max_min::sort_type stype; - - if (layer->GetParamAsString("mode", "max") == "max") - otype = cldnn::arg_max_min::out_type::max; - else - otype = cldnn::arg_max_min::out_type::min; - - if (layer->GetParamAsString("sort", "value") == "value") - stype = cldnn::arg_max_min::sort_type::sort_by_values; - else - stype = cldnn::arg_max_min::sort_type::sort_by_indices; - - auto topKInput = layer->insData[1].lock(); - auto topKInputCreator = getCreatorLayer(topKInput).lock(); - - std::vector topk; - if (topKInputCreator->blobs.size() == 1) { - auto constantBlob = topKInputCreator->blobs.begin()->second; - - if (constantBlob->size() != 1) - THROW_IE_EXCEPTION << layer->name << " Incorrect TopK elements value"; - - auto axesPrecision = constantBlob->getTensorDesc().getPrecision(); - if (axesPrecision == InferenceEngine::Precision::FP32) { - auto data = constantBlob->buffer().as(); - for (size_t i = 0; i < constantBlob->size(); ++i) - topk.push_back(data[i]); - } else if (axesPrecision == InferenceEngine::Precision::I32) { - auto data = constantBlob->buffer().as(); - for (size_t i = 0; i < constantBlob->size(); ++i) - topk.push_back(data[i]); - } else if (axesPrecision == InferenceEngine::Precision::I64) { - auto data = constantBlob->buffer().as(); - for (size_t i = 0; i < constantBlob->size(); ++i) - topk.push_back(static_cast(data[i])); - } else { - THROW_IE_EXCEPTION << layer->name << " Incorrect TopK input Precision"; - } - } - - uint32_t top_k = topk[0]; - - cldnn::arg_max_min::axis_name chosen_axis = cldnn::arg_max_min::axis_name::batch; - - if (HasParam(ArgMaxLayer->params, "axis")) { - int32_t axis_param = ArgMaxLayer->GetParamAsInt("axis", -1); - - auto input_dims_num = ArgMaxLayer->outData[0]->getTensorDesc().getDims().size(); - int32_t axis = axis_param; - if (input_dims_num == 5) { - if (-5 <= axis && axis <= -1) - axis += 5; - - switch (axis) { - case 0: chosen_axis = cldnn::arg_max_min::axis_name::batch; break; - case 1: chosen_axis = cldnn::arg_max_min::axis_name::feature; break; - case 2: chosen_axis = cldnn::arg_max_min::axis_name::z; break; - case 3: chosen_axis = cldnn::arg_max_min::axis_name::y; break; - case 4: chosen_axis = cldnn::arg_max_min::axis_name::x; break; - } - } else { - if (-static_cast(input_dims_num) <= axis && axis <= -1) - axis += input_dims_num; - - switch (axis) { - case 0: chosen_axis = cldnn::arg_max_min::axis_name::batch; break; - case 1: chosen_axis = cldnn::arg_max_min::axis_name::feature; break; - case 2: chosen_axis = cldnn::arg_max_min::axis_name::y; break; - case 3: chosen_axis = cldnn::arg_max_min::axis_name::x; break; - } - } - } - - if (layer->outData.size() == 2) { - auto mutable_precision = layer->outData[1]->getPrecision(); - if (mutable_precision == Precision::I64) { - mutable_precision = Precision::I32; - } - - cldnn::layout mutableLayout = cldnn::layout( - DataTypeFromPrecision(mutable_precision), - defaultFormatForDims(layer->outData[1]->getDims().size()), - CldnnTensorFromIEDims(layer->outData[1]->getDims())); - - auto shared_memory = cldnn::memory::allocate(*m_engine, mutableLayout); - - cldnn::primitive_id argmax_mutable_id_w = layer_type_name_ID(layer) + "_md_write"; - auto argmax_mutable_prim = cldnn::mutable_data(argmax_mutable_id_w, shared_memory); - primitivesToIRLayersMap[argmax_mutable_id_w] = {layer->name}; - primitiveIDs[argmax_mutable_id_w] = argmax_mutable_id_w; - topology.add(argmax_mutable_prim); - inputPrimitives.push_back(argmax_mutable_id_w); - - std::string ArgMaxLayerName = layer_type_lower(layer) + ":" + layer->outData[0]->getName(); - auto argmaxPrim = cldnn::arg_max_min( - ArgMaxLayerName, - inputPrimitives, - otype, - top_k, - chosen_axis, - stype, - true, - cldnn::padding({0, 0, 0, 0}, 0), - DataTypeFromPrecision(layer->outData[0]->getPrecision())); - - topology.add(argmaxPrim); - - cldnn::primitive_id argmax_mutable_id_r = layer_type_lower(layer) + ":" + layer->outData[1]->getName(); - auto argmax_mutable_prim_r = cldnn::mutable_data(argmax_mutable_id_r, {ArgMaxLayerName}, shared_memory); - primitivesToIRLayersMap[argmax_mutable_id_r] = {layer->name}; - primitiveIDs[argmax_mutable_id_r] = argmax_mutable_id_r; - topology.add(argmax_mutable_prim_r); - InitProfileInfo(ArgMaxLayerName, layer_type_lower(layer)); - AddPrimitiveToProfiler(ArgMaxLayerName, layer); - } else if (layer->outData.size() == 1) { - std::string ArgMaxLayerName = layer_type_lower(layer) + ":" + layer->outData[0]->getName(); - auto argmaxPrim = cldnn::arg_max_min( - ArgMaxLayerName, - inputPrimitives, - otype, - top_k, - chosen_axis, - stype, - true, - cldnn::padding({0, 0, 0, 0}, 0), - DataTypeFromPrecision(layer->outData[0]->getPrecision())); - - topology.add(argmaxPrim); - InitProfileInfo(ArgMaxLayerName, layer_type_lower(layer)); - AddPrimitiveToProfiler(ArgMaxLayerName, layer); - } else { - THROW_IE_EXCEPTION << layer->name << " Incorrect TopK outputs number"; - } -} - -void Program::CreateMaxUnpoolingPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 2); - - auto UnpoolingLayer = as (layer); - - cldnn::primitive_id real_input, argmax_mutable; - - // locate ArgMax primitive - int inputOrder = 0; - for (auto inputData : layer->insData) { - auto prevData = inputData.lock(); - - if (prevData == nullptr) { - THROW_CLDNN_EXCEPTION("MaxUnpooling: nonexistent input for layer: " << layer->name); - } - - auto prevCreator = getCreatorLayer(prevData).lock(); - - if (prevCreator && - (LayerTypeFromStr(prevCreator->type) == Pooling) && - prevCreator->outData.size() > 1 && - inputOrder == 1) { - argmax_mutable = primitiveIDs.at(prevCreator->name + "_argmax_mutable"); - } else { - real_input = primitiveIDs.at(prevData->getName()); - } - inputOrder++; - } - - uint32_t stride = UnpoolingLayer->GetParamAsUInt("stride"); - uint32_t kernel_size = UnpoolingLayer->GetParamAsUInt("kernel_size"); - - std::string UnpoolingLayerName = layer_type_name_ID(layer); - auto unpoolingPrim = cldnn::max_unpooling( - UnpoolingLayerName, - real_input, - argmax_mutable, - (cldnn::tensor) cldnn::spatial(kernel_size, kernel_size), // size - (cldnn::tensor) cldnn::spatial(stride, stride) ); // stride - - topology.add(unpoolingPrim); - AddPrimitiveToProfiler(UnpoolingLayerName, layer); -} - -void Program::CreateMVNPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 1); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto MvnLayer = as (layer); - - bool across_channels = MvnLayer->GetParamAsBool("across_channels", false); - bool normalize_variance = MvnLayer->GetParamAsBool("normalize_variance", true); - float eps = MvnLayer->GetParamAsFloat("eps", 1e-10f); - - std::string MvnLayerName = layer_type_name_ID(layer); - auto mvnPrim = cldnn::mvn( - MvnLayerName, - inputPrimitives[0], - across_channels, - normalize_variance, - eps); - - topology.add(mvnPrim); - AddPrimitiveToProfiler(MvnLayerName, layer); -} - -void Program::CreateTilePrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 1); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto tileLayer = as (layer); - - std::string tileLayerName = layer_type_name_ID(layer); - auto tilePrim = cldnn::tile( - tileLayerName, - inputPrimitives[0], - CldnnTensorFromIEDims(tileLayer->outData[0]->getTensorDesc().getDims())); - - topology.add(tilePrim); - AddPrimitiveToProfiler(tileLayerName, layer); -} - -void Program::CreatePadPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 1); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto padLayer = as (layer); - - auto pads_begin = cldnn::tensor(PermuteIEDimsToCldnnOrder(padLayer->GetParamAsInts("pads_begin")), 0); - auto pads_end = cldnn::tensor(PermuteIEDimsToCldnnOrder(padLayer->GetParamAsInts("pads_end")), 0); - std::string mode = padLayer->GetParamAsString("pad_mode"); - float pad_value = padLayer->GetParamAsFloat("pad_value", 0.0f); - - cldnn::border_type border_mode; - if (mode == "constant") - border_mode = cldnn::border_type::constant; - else if (mode == "edge") - border_mode = cldnn::border_type::edge; - else if (mode == "symmetric") - border_mode = cldnn::border_type::mirror; - else if (mode == "reflect") - border_mode = cldnn::border_type::mirror_101; - else - THROW_CLDNN_EXCEPTION("Invalid border mode " << mode << " in layer " << padLayer->name); - - std::string padLayerName = layer_type_name_ID(layer); - auto tilePrim = cldnn::border( - padLayerName, - inputPrimitives[0], - pads_begin, - pads_end, - border_mode, - pad_value); - - topology.add(tilePrim); - AddPrimitiveToProfiler(padLayerName, layer); -} - -void Program::AddConstantBlobInput(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - if (layer->blobs.empty()) - THROW_IE_EXCEPTION << "No blobs found in const layer " << layer->name; - auto constBlob = layer->blobs.begin()->second; - SizeVector constDims(layer->outData[0]->getTensorDesc().getDims()); - - cldnn::tensor constTensor; - switch (constDims.size()) { - case 6: constTensor = cldnn::tensor(TensorValue(constDims[0]), TensorValue(constDims[1]), - TensorValue(constDims[5]), TensorValue(constDims[4]), - TensorValue(constDims[3]), TensorValue(constDims[2])); - break; - case 5: constTensor = cldnn::tensor(TensorValue(constDims[0]), TensorValue(constDims[1]), - TensorValue(constDims[4]), TensorValue(constDims[3]), TensorValue(constDims[2])); - break; - case 4: constTensor = cldnn::tensor(TensorValue(constDims[0]), TensorValue(constDims[1]), - TensorValue(constDims[3]), TensorValue(constDims[2])); - break; - case 3: constTensor = cldnn::tensor(TensorValue(constDims[0]), TensorValue(constDims[1]), - 1, TensorValue(constDims[2])); - break; - case 2: constTensor = cldnn::tensor(TensorValue(constDims[0]), TensorValue(constDims[1]), 1, 1); - break; - case 1: constTensor = cldnn::tensor(1, TensorValue(constDims[0]), 1, 1); - break; - case 0: - if (constBlob->size() != 1) - THROW_CLDNN_EXCEPTION("Invalid constant blob with 0-dim shape"); - - constTensor = cldnn::tensor(1, 1, 1, 1); - break; - default: THROW_CLDNN_EXCEPTION("Invalid constant blob dimensions"); - } - - auto inputIsWeights = [](InferenceEngine::CNNLayerPtr &layer) -> bool { - if (GetNextLayers(layer->outData[0]).size() == 1) { - auto next = GetNextSingleLayer(layer->outData[0]); - auto nextConv = tryAs(next); - auto nextDeconv = tryAs(next); - auto nextDefConv = tryAs(next); - auto nextBinConv = tryAs(next); - - bool isWeights = (nextConv != nullptr && nextConv->insData.size() > 1 && nextConv->insData[1].lock() == layer->outData[0]) || - (nextDeconv != nullptr && nextDeconv->insData.size() > 1 && nextDeconv->insData[1].lock() == layer->outData[0]) || - (nextDefConv != nullptr && nextDefConv->insData.size() > 2 && nextDefConv->insData[2].lock() == layer->outData[0]) || - (nextBinConv != nullptr && nextBinConv->insData.size() > 1 && nextBinConv->insData[1].lock() == layer->outData[0]); - - return isWeights; - } - - return false; - }; - - auto inputToConstQuantize = [inputIsWeights, constTensor](InferenceEngine::CNNLayerPtr &layer) -> bool { - if (GetNextLayers(layer->outData[0]).size() != 1) - return false; - - auto next = GetNextSingleLayer(layer->outData[0]); - if (next->type != "FakeQuantize") - return false; - - if (inputIsWeights(next)) { - for (size_t i = 1; i < next->insData.size(); i++) - if (next->insData[i].lock() == layer->outData[0]) - return true; - } - - return false; - }; - - // WA to inconsistency between input and const 1d tensors - // For Concat along batch we go with batch interpretation - // For Gather input we go with batch interpretation - bool needsBatchInterpretation = false; - if (constDims.size() == 1) { - for (auto next : GetNextLayers(layer->outData[0])) { - if (LayerTypeFromStr(next->type) == Concatenate) { - auto nextConcat = as(next); - if (nextConcat->_axis == cldnn::concatenation::concatenation_axis::along_b) { - needsBatchInterpretation = true; - break; - } - } else if (LayerTypeFromStr(next->type) == Eltwise) { - bool all_inputs_1d = true; - for (auto& in : next->insData) { - auto& in_shape = in.lock()->getTensorDesc().getDims(); - if (in_shape.size() != 1) - all_inputs_1d = false; - } - needsBatchInterpretation = all_inputs_1d; - break; - } else if (LayerTypeFromStr(next->type) == Gather) { - needsBatchInterpretation = true; - break; - } - } - } - - // If quantize on weights has per-channel ranges, we have to swap channel and batch dimensions, because - // quantization should be applied per output channel of weights - // TODO: Check if it's still needed once LowPrecisionTransformations ready - if (inputToConstQuantize(layer) || needsBatchInterpretation) { - constTensor.batch[0] = constTensor.count(); - constTensor.feature[0] = 1; - } - - cldnn::layout constLayout = cldnn::layout( - DataTypeFromPrecision(layer->blobs.begin()->second->getTensorDesc().getPrecision()), - FormatFromTensorDesc(layer->outData[0]->getTensorDesc()), - constTensor); - - cldnn::primitive_id initialconstPrimID = layer_type_name_ID(layer); - cldnn::primitive_id constPrimID = CreatePrimitiveFromBlob(topology, initialconstPrimID, constBlob, constLayout); - AddPrimitiveToProfiler(initialconstPrimID, layer, constPrimID); -} - -void Program::CreateConvolutionPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, {1, 2, 3}); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto convLayer = as(layer); - std::string convLayerName = layer_type_name_ID(layer); - - std::vector weightPrimID; - std::vector biasPrimID; - CreateWeightAndBiasPrimitives(topology, layer, weightPrimID, biasPrimID); - - auto allPads = getPaddings(*convLayer); - int x_pad = allPads.begin[X_AXIS], y_pad = allPads.begin[Y_AXIS]; - cldnn::tensor stride, padding, dilation; - if (convLayer->input()->getTensorDesc().getDims().size() > 4) { - stride = cldnn::tensor(cldnn::batch(1), cldnn::feature(1), - cldnn::spatial(convLayer->_stride[X_AXIS], - convLayer->_stride[Y_AXIS], - convLayer->_stride[Z_AXIS])); - int z_pad = allPads.begin[Z_AXIS]; - padding = cldnn::tensor(cldnn::batch(0), cldnn::feature(0), - cldnn::spatial(-x_pad, -y_pad, -z_pad)); - dilation = cldnn::tensor(cldnn::batch(1), cldnn::feature(1), - cldnn::spatial(convLayer->_dilation[X_AXIS], - convLayer->_dilation[Y_AXIS], - convLayer->_dilation[Z_AXIS])); - - } else { - stride = cldnn::tensor(cldnn::batch(1), cldnn::feature(1), - cldnn::spatial(convLayer->_stride[X_AXIS], convLayer->_stride[Y_AXIS])); - padding = cldnn::tensor(cldnn::batch(0), cldnn::feature(0), - cldnn::spatial(-x_pad, -y_pad, 0)); - dilation = cldnn::tensor(cldnn::batch(1), cldnn::feature(1), - cldnn::spatial(convLayer->_dilation[X_AXIS], convLayer->_dilation[Y_AXIS])); - } - - auto convPrim = cldnn::convolution(convLayerName, - inputPrimitives[0], - weightPrimID, - biasPrimID, - convLayer->_group, - stride, - padding, - dilation, - CldnnTensorFromIEDims(convLayer->outData[0]->getTensorDesc().getDims()), - DataTypeFromPrecision(convLayer->outData[0]->getTensorDesc().getPrecision())); - - topology.add(convPrim); - AddPrimitiveToProfiler(convLayerName, layer); -} - -void Program::CreateDeformableConvolutionPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, {2, 3, 4}); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto defConvLayer = as(layer); - - std::vector weightPrimID; - std::vector biasPrimID; - CreateWeightAndBiasPrimitives(topology, layer, weightPrimID, biasPrimID); - - cldnn::tensor stride = cldnn::tensor(cldnn::batch(1), cldnn::feature(1), - cldnn::spatial(defConvLayer->_stride[X_AXIS], defConvLayer->_stride[Y_AXIS], 1)); - auto allPad = getPaddings(*defConvLayer); - cldnn::tensor padding = cldnn::tensor(cldnn::batch(0), cldnn::feature(0), - cldnn::spatial(-static_cast(allPad.begin[X_AXIS]), -static_cast(allPad.begin[Y_AXIS]), 0)); - cldnn::tensor dilation = cldnn::tensor(cldnn::batch(1), cldnn::feature(1), - cldnn::spatial(defConvLayer->_dilation[X_AXIS], defConvLayer->_dilation[Y_AXIS], 1)); - - cldnn::tensor kernel = cldnn::tensor(cldnn::batch(1), cldnn::feature(1), - cldnn::spatial(defConvLayer->_kernel[X_AXIS], defConvLayer->_kernel[Y_AXIS], 1)); - - const uint32_t deformable_group = defConvLayer->GetParamAsUInt("deformable_group", 1); - if (defConvLayer->_group > 1) { - std::string defConvLayerName = layer_type_name_ID(layer); - auto defConvPrim = cldnn::convolution(defConvLayerName, - inputPrimitives[0], - inputPrimitives[1], - weightPrimID, - biasPrimID, - defConvLayer->_group, - deformable_group, - stride, - padding, - dilation, - CldnnTensorFromIEDims(defConvLayer->outData[0]->getTensorDesc().getDims())); - topology.add(defConvPrim); - AddPrimitiveToProfiler(defConvLayerName, layer); - } else { - std::string defConvLayerNameInterp = layer_type_name_ID(layer)+"_interp"; - std::string defConvLayerNameConv = layer_type_name_ID(layer); - auto defConvPrimInterp = cldnn::deformable_interp(defConvLayerNameInterp, - inputPrimitives[0], - inputPrimitives[1], - defConvLayer->_group, - deformable_group, - stride, - padding, - dilation, - CldnnTensorFromIEDims(defConvLayer->outData[0]->getTensorDesc().getDims()), - kernel); - topology.add(defConvPrimInterp); - AddInnerPrimitiveToProfiler(defConvLayerNameInterp, defConvLayerNameConv, layer); - auto defConvPrim = cldnn::deformable_conv(defConvLayerNameConv, - defConvLayerNameInterp, - weightPrimID, - biasPrimID, - defConvLayer->_group, - CldnnTensorFromIEDims(defConvLayer->outData[0]->getTensorDesc().getDims())); - topology.add(defConvPrim); - AddPrimitiveToProfiler(defConvLayerNameConv, layer); - } -} - -void Program::CreateBinaryConvolutionPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 1); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto binaryConvLayer = as(layer); - - if (binaryConvLayer->_group != 1) - THROW_CLDNN_EXCEPTION("BinaryConvolution with groups is not supported yet"); - - std::vector weightPrimID; - std::vector biasPrimID; - CreateBinaryWeightAndBiasPrimitives(topology, layer, weightPrimID, biasPrimID); - cldnn::tensor stride = cldnn::tensor(cldnn::batch(1), cldnn::feature(1), - cldnn::spatial(binaryConvLayer->_stride[X_AXIS], binaryConvLayer->_stride[Y_AXIS])); - auto allPad = getPaddings(*binaryConvLayer); - int x_pad = allPad.begin[X_AXIS], y_pad = allPad.begin[Y_AXIS]; - cldnn::tensor padding = cldnn::tensor(cldnn::batch(0), cldnn::feature(0), - cldnn::spatial(-x_pad, -y_pad)); - cldnn::tensor dilation = cldnn::tensor(cldnn::batch(1), cldnn::feature(1), - cldnn::spatial(binaryConvLayer->_dilation[X_AXIS], binaryConvLayer->_dilation[Y_AXIS])); - - cldnn::data_types calc_precision = DataTypeFromPrecision(binaryConvLayer->precision); - std::string binaryConvLayerName = layer_type_name_ID(layer); - auto binaryConvPrim = cldnn::binary_convolution(binaryConvLayerName, - inputPrimitives[0], - weightPrimID, - stride, - padding, - dilation, - CldnnTensorFromIEDims(binaryConvLayer->outData[0]->getTensorDesc().getDims()), - binaryConvLayer->_group, - binaryConvLayer->_pad_value, - calc_precision); - - topology.add(binaryConvPrim); - AddPrimitiveToProfiler(binaryConvLayerName, layer); -} - -void Program::CreateQuantizePrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 5); - - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto quantizationLayer = as(layer); - - auto input_low_id = inputPrimitives[1]; - auto input_high_id = inputPrimitives[2]; - auto output_low_id = inputPrimitives[3]; - auto output_high_id = inputPrimitives[4]; - - int levels = quantizationLayer->levels; - auto dt = DataTypeFromPrecision(layer->outData[0]->getPrecision()); - std::string quantizeLayerName = layer_type_name_ID(layer); - auto quantizationPrim = cldnn::quantize(quantizeLayerName, - inputPrimitives[0], - input_low_id, - input_high_id, - output_low_id, - output_high_id, - levels, - dt); - - topology.add(quantizationPrim); - AddPrimitiveToProfiler(quantizeLayerName, layer); -} - -void Program::CreateGatherPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 2); - - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto gatherLayer = as (layer); - - int axis = gatherLayer->GetParamAsInt("axis", 0); - - // Be careful, TensorFlow consist negative axis interpretation bug. Here: -3 = b, -2 = f, -1 = y, but must be -3 = f, -2 = y, -1 = x - auto cldnnAxisFromIE = [](int axis, cldnn::format inputFormat) { - if (axis == 0) { - return cldnn::gather::gather_axis::along_b; - } else if (axis == 1) { - return cldnn::gather::gather_axis::along_f; - } - - if (inputFormat == cldnn::format::bfyx) { - switch (axis) { - case 2: return cldnn::gather::gather_axis::along_y; - case 3: return cldnn::gather::gather_axis::along_x; - case -1: return cldnn::gather::gather_axis::along_y; - case -2: return cldnn::gather::gather_axis::along_f; - case -3: return cldnn::gather::gather_axis::along_b; - default: THROW_CLDNN_EXCEPTION("Unsupported gather axis: " << axis); - } - } else if (inputFormat == cldnn::format::bfzyx) { - switch (axis) { - case 2: return cldnn::gather::gather_axis::along_z; - case 3: return cldnn::gather::gather_axis::along_y; - case 4: return cldnn::gather::gather_axis::along_x; - case -1: return cldnn::gather::gather_axis::along_y; - case -2: return cldnn::gather::gather_axis::along_z; - case -3: return cldnn::gather::gather_axis::along_f; - case -4: return cldnn::gather::gather_axis::along_b; - default: THROW_CLDNN_EXCEPTION("Unsupported gather axis: " << axis); - } - } else if (inputFormat == cldnn::format::bfwzyx) { - switch (axis) { - case 2: return cldnn::gather::gather_axis::along_w; - case 3: return cldnn::gather::gather_axis::along_z; - case 4: return cldnn::gather::gather_axis::along_y; - case 5: return cldnn::gather::gather_axis::along_x; - case -1: return cldnn::gather::gather_axis::along_y; - case -2: return cldnn::gather::gather_axis::along_z; - case -3: return cldnn::gather::gather_axis::along_w; - case -4: return cldnn::gather::gather_axis::along_f; - case -5: return cldnn::gather::gather_axis::along_b; - default: THROW_CLDNN_EXCEPTION("Unsupported gather axis: " << axis); - } - } else { - THROW_CLDNN_EXCEPTION("Unsupported gather axis: " << axis); - } - }; - - auto gatherLayerName = layer_type_name_ID(layer); - - std::vector reorderedInputs; - reorderedInputs.resize(inputPrimitives.size()); - - for (size_t portIndex = 0; portIndex < inputPrimitives.size(); portIndex++) { - auto inputDataType = DataTypeFromPrecision(layer->insData[portIndex].lock()->getPrecision()); - if (inputDataType == cldnn::data_types::i64) { - // clDNN primitive does not support i64 inputs, - // so we need additional reorders to convert them to i32 - auto reorderPrimName = inputPrimitives[portIndex] + "_" + layer->name + m_preProcessTag; - auto targetFormat = FormatFromLayout(layer->insData[portIndex].lock()->getLayout()); - auto preprocessPrim = cldnn::reorder( - reorderPrimName, - inputPrimitives[portIndex], - targetFormat, - cldnn::data_types::i32); - topology.add(preprocessPrim); - AddInnerPrimitiveToProfiler(reorderPrimName, gatherLayerName, layer); - reorderedInputs[portIndex] = reorderPrimName; - } else { - reorderedInputs[portIndex] = inputPrimitives[portIndex]; - } - } - - auto inputLayout = layer->insData[0].lock()->getTensorDesc().getLayout(); - auto outDims = layer->outData[0]->getTensorDesc().getDims(); - auto outLayout = layer->outData[0]->getTensorDesc().getLayout(); - - auto gatherPrim = cldnn::gather( - gatherLayerName, - reorderedInputs[0], - reorderedInputs[1], - cldnnAxisFromIE(axis, FormatFromLayout(inputLayout)), - FormatFromLayout(outLayout), - CldnnTensorFromIEDims(outDims)); - - topology.add(gatherPrim); - AddPrimitiveToProfiler(gatherLayerName, layer); -} - -void CLDNNPlugin::Program::CreateGatherTreePrimitive(cldnn::topology & topology, InferenceEngine::CNNLayerPtr & layer) { - ValidateLayer(layer, 4); - - auto inputPrimitives = GetPrevLayersPrimitives(layer); - - std::vector reorderedInputs; - reorderedInputs.resize(inputPrimitives.size()); - - for (size_t portIndex = 0; portIndex < inputPrimitives.size(); portIndex++) { - auto inputDataType = DataTypeFromPrecision(layer->insData[portIndex].lock()->getPrecision()); - if (inputDataType == cldnn::data_types::i64) { - // clDNN primitive does not support i64 inputs, - // so we need additional reorders to convert them to i32 - auto reorderPrimName = inputPrimitives[portIndex] + "_" + layer->name + m_preProcessTag; - auto targetFormat = FormatFromLayout(layer->insData[portIndex].lock()->getLayout()); - auto preprocessPrim = cldnn::reorder( - reorderPrimName, - inputPrimitives[portIndex], - targetFormat, - cldnn::data_types::i32); - topology.add(preprocessPrim); - AddInnerPrimitiveToProfiler(reorderPrimName, layer_type_name_ID(layer), layer); - reorderedInputs[portIndex] = (reorderPrimName); - } else { - reorderedInputs[portIndex] = inputPrimitives[portIndex]; - } - } - - std::string gatherTreeLayerName = layer_type_name_ID(layer); - auto gatherTreePrim = cldnn::gather_tree( - gatherTreeLayerName, - reorderedInputs[0], - reorderedInputs[1], - reorderedInputs[2], - reorderedInputs[3]); - - topology.add(gatherTreePrim); - AddPrimitiveToProfiler(gatherTreeLayerName, layer); -} - -void Program::CreateDepthToSpacePrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 1); - - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto depthToSpace = as (layer); - - size_t blockSize = static_cast(depthToSpace->GetParamAsUInt("block_size", 2)); - std::string mode_s = depthToSpace->GetParamAsString("mode"); - - cldnn::depth_to_space_mode mode = mode_s == "depth_first" ? cldnn::depth_to_space_mode::depth_first - : cldnn::depth_to_space_mode::blocks_first; - - auto inputDim = depthToSpace->input().get()->getTensorDesc().getDims(); - size_t blockSizeSquare = blockSize * blockSize; - - if (inputDim[1] % blockSizeSquare != 0) - THROW_CLDNN_EXCEPTION("The depth of the input tensor must be divisible by squared block size = " << blockSizeSquare); - - std::string depthToSpaceName = layer_type_name_ID(layer); - auto depthToSpacePrim = cldnn::depth_to_space( - depthToSpaceName, - inputPrimitives[0], - blockSize, - mode); - - topology.add(depthToSpacePrim); - AddPrimitiveToProfiler(depthToSpaceName, layer); -} - -void Program::CreateSpaceToDepthPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 1); - - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto spaceToDepth = as (layer); - - size_t blockSize = static_cast(spaceToDepth->GetParamAsUInt("block_size", 1)); - std::string modeAsString = spaceToDepth->GetParamAsString("mode", "blocks_first"); - cldnn::space_to_depth::depth_mode mode; - mode = (modeAsString == "blocks_first") ? cldnn::space_to_depth::blocks_first : cldnn::space_to_depth::depth_first; - - std::string spaceToDepthName = layer_type_name_ID(layer); - auto spaceToDepthPrim = cldnn::space_to_depth( - spaceToDepthName, - inputPrimitives[0], - mode, - blockSize); - - topology.add(spaceToDepthPrim); - AddPrimitiveToProfiler(spaceToDepthName, layer); -} - -void Program::CreateBatchToSpacePrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 4); - - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto batchToSpace = as (layer); - auto rank = batchToSpace->input().get()->getTensorDesc().getDims().size(); - auto format = FormatFromLayout(batchToSpace->input()->getLayout()); - - std::vector inputs; - inputs.reserve(3); - - for (size_t i = 1; i < 4; ++i) { - auto defaultIndexInput = layer->insData[i].lock(); - auto defaultIndexInputCreator = getCreatorLayer(defaultIndexInput).lock(); - if (defaultIndexInputCreator->blobs.size() == 1) { - auto constantBlob = defaultIndexInputCreator->blobs.begin()->second; - auto defaultIndexPrecision = constantBlob->getTensorDesc().getPrecision(); - std::vector sizes; - sizes.reserve(rank); - int32_t default_size = i == 1 ? 1 : 0; - switch (defaultIndexPrecision) { - case InferenceEngine::Precision::I32: { - auto data = constantBlob->buffer().as(); - sizes = std::vector(data, data + rank); - break; - } - case InferenceEngine::Precision::I64: { - auto data = constantBlob->buffer().as(); - std::vector sizes_i64 = std::vector(data, data + rank); - for (size_t j = 0; j < sizes_i64.size(); ++j) - sizes.emplace_back(static_cast(sizes_i64[j])); - break; - } - default: { - THROW_IE_EXCEPTION << layer->name << "Incorrect BatchToSpace precision"; - break; - } - } - inputs.emplace_back(format, sizes, default_size); - } - } - auto out_size = CldnnTensorFromIEDims(batchToSpace->outData[0]->getTensorDesc().getDims()); - - std::string batchToSpaceName = layer_type_name_ID(layer); - auto batchToSpacePrim = cldnn::batch_to_space( - batchToSpaceName, - inputPrimitives[0], // input - inputs[0], // block_shape - inputs[1], // crops_begin - inputs[2], // crops_end - out_size); - - topology.add(batchToSpacePrim); - AddPrimitiveToProfiler(batchToSpaceName, layer); -} - -void Program::CreateSpaceToBatchPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 4); - - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto spaceToBatch = as (layer); - auto rank = spaceToBatch->input().get()->getTensorDesc().getDims().size(); - auto format = FormatFromLayout(spaceToBatch->input()->getLayout()); - - std::vector inputs; - inputs.reserve(3); - - for (size_t i = 1; i < 4; ++i) { - auto defaultIndexInput = layer->insData[i].lock(); - auto defaultIndexInputCreator = getCreatorLayer(defaultIndexInput).lock(); - if (defaultIndexInputCreator->blobs.size() == 1) { - auto constantBlob = defaultIndexInputCreator->blobs.begin()->second; - auto defaultIndexPrecision = constantBlob->getTensorDesc().getPrecision(); - std::vector sizes; - sizes.reserve(rank); - int32_t default_size = i == 1 ? 1 : 0; - switch (defaultIndexPrecision) { - case InferenceEngine::Precision::I32: { - auto data = constantBlob->buffer().as(); - sizes = std::vector(data, data + rank); - break; - } - case InferenceEngine::Precision::I64: { - auto data = constantBlob->buffer().as(); - std::vector sizes_i64 = std::vector(data, data + rank); - for (size_t j = 0; j < sizes_i64.size(); ++j) - sizes.emplace_back(static_cast(sizes_i64[j])); - break; - } - default: { - THROW_IE_EXCEPTION << layer->name << "Incorrect SpaceToBatch precision"; - break; - } - } - inputs.emplace_back(format, sizes, default_size); - } - } - auto out_size = CldnnTensorFromIEDims(spaceToBatch->outData[0]->getTensorDesc().getDims()); - - std::string spaceToBatchName = layer_type_name_ID(layer); - auto spaceToBatchPrim = cldnn::space_to_batch( - spaceToBatchName, - inputPrimitives[0], // input - inputs[0], // block_shape - inputs[1], // pads_begin - inputs[2], // pads_end - out_size); - - topology.add(spaceToBatchPrim); - AddPrimitiveToProfiler(spaceToBatchName, layer); -} - -void Program::CreateShuffleChannelsPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 1); - - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto shuffleChannels = as (layer); - const int32_t numberOfDims = static_cast(shuffleChannels->input()->getDims().size()); - - int32_t group = shuffleChannels->GetParamAsInt("group", 1); - int32_t axis = shuffleChannels->GetParamAsInt("axis", 1); - - if (axis < 0) - axis += numberOfDims; - - if (axis < 0 || axis >= numberOfDims) - THROW_CLDNN_EXCEPTION("Incorrect axis value! Actual axis is" + std::to_string(group)); - - if (group < 1) - THROW_CLDNN_EXCEPTION("Invalid group size value (should equal at least one). Actual block size is" + - std::to_string(group)); - - if (shuffleChannels->input().get()->getDims()[axis] % group != 0) - THROW_CLDNN_EXCEPTION("Group parameter must evenly divide the channel dimension. Actual group size is " + - std::to_string(axis)); - - std::string shuffleChannelsName = layer_type_name_ID(layer); - auto shuffleChannelsPrim = cldnn::shuffle_channels( - shuffleChannelsName, - inputPrimitives[0], - group, - axis); - - topology.add(shuffleChannelsPrim); - AddPrimitiveToProfiler(shuffleChannelsName, layer); -} - -void Program::CreateStridedSlicePrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto stridedSliceLayer = as (layer); - - auto tmp = stridedSliceLayer->GetParamAsUInts("end_mask"); - std::vector end_mask(tmp.begin(), tmp.end()); - tmp = stridedSliceLayer->GetParamAsUInts("begin_mask"); - std::vector begin_mask(tmp.begin(), tmp.end()); - tmp = stridedSliceLayer->GetParamAsUInts("new_axis_mask"); - std::vector new_axis_mask(tmp.begin(), tmp.end()); - tmp = stridedSliceLayer->GetParamAsUInts("shrink_axis_mask"); - std::vector shrink_axis_mask(tmp.begin(), tmp.end()); - - auto out_size = CldnnTensorFromIEDims(stridedSliceLayer->outData[0]->getTensorDesc().getDims()); - - std::string stridedSliceLayerName = layer_type_name_ID(layer); - auto stridedSlicePrim = cldnn::strided_slice( - stridedSliceLayerName, - inputPrimitives[0], inputPrimitives[1], inputPrimitives[2], inputPrimitives[3], - begin_mask, end_mask, new_axis_mask, shrink_axis_mask, out_size); - - topology.add(stridedSlicePrim); - AddPrimitiveToProfiler(stridedSliceLayerName, layer); -} - -void Program::CreateReverseSequencePrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 2); - - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto reverseSequence = as (layer); - - const auto input = reverseSequence->insData[0].lock()->getDims(); - const auto sequence_lengths = reverseSequence->insData[1].lock()->getDims(); - - int32_t batch_axis = reverseSequence->GetParamAsInt("batch_axis", 0); - int32_t seq_axis = reverseSequence->GetParamAsInt("seq_axis", 1); - - if (batch_axis < 0) - batch_axis += input.size(); - - if (seq_axis < 0) - seq_axis += input.size(); - - if (batch_axis == seq_axis) - THROW_CLDNN_EXCEPTION("Batch axis and sequence axis should not be equal\n"); - - if (seq_axis < 0 || seq_axis >= input.size()) - THROW_CLDNN_EXCEPTION("Incorrect Sequence axis value! Actual axis is " + std::to_string(seq_axis)); - - if (batch_axis < 0 || batch_axis >= input.size()) - THROW_CLDNN_EXCEPTION("Incorrect Sequence axis value! Actual axis is " + std::to_string(batch_axis)); - - if (sequence_lengths[0] != input[batch_axis]) - THROW_CLDNN_EXCEPTION("Sequence lengths must be a vector of length " + std::to_string(input[batch_axis]) - + "! Actual axis is " + std::to_string(sequence_lengths[0])); - - std::string reverseSequenceLayerName = layer_type_name_ID(layer); - auto reverseSequencePrim = cldnn::reverse_sequence( - reverseSequenceLayerName, - inputPrimitives[0], - inputPrimitives[1], - seq_axis, - batch_axis); - - topology.add(reverseSequencePrim); - AddPrimitiveToProfiler(reverseSequenceLayerName, layer); -} - -void Program::CreateBroadcastPrimitive(cldnn::topology &topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 2); - - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto broadcast = as(layer); - - std::string broadcastLayerName = layer_type_name_ID(layer); - auto broadcastPrim = cldnn::broadcast( - broadcastLayerName, - inputPrimitives[0], - CldnnTensorFromIEDims(broadcast->outData[0]->getTensorDesc().getDims())); - - topology.add(broadcastPrim); - AddPrimitiveToProfiler(broadcastLayerName, layer); -} - -void Program::CreateGemmPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - bool threeInputs = layer->insData.size() == 3; - - if (threeInputs) { - ValidateLayer(layer, 3); - } else { - ValidateLayer(layer, 2); - } - - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto gemmLayer = as(layer); - auto gemmLayerName = layer_type_name_ID(layer); - - auto outDims = layer->outData[0]->getTensorDesc().getDims(); - auto outDimsN = outDims.size(); - - auto gemmSpecificTensor = [](const InferenceEngine::SizeVector& dims) { - switch (dims.size()) { - case 2: return cldnn::tensor(cldnn::spatial(dims[1], dims[0])); - case 3: return cldnn::tensor(cldnn::batch(dims[0]), cldnn::spatial(dims[2], dims[1])); - case 4: return cldnn::tensor(cldnn::batch(dims[0]), cldnn::feature(dims[1]), cldnn::spatial(dims[3], dims[2])); - case 5: return cldnn::tensor(cldnn::batch(dims[0]), cldnn::feature(dims[1]), cldnn::spatial(dims[4], dims[3], dims[2])); - case 6: return cldnn::tensor(cldnn::batch(dims[0]), cldnn::feature(dims[1]), cldnn::spatial(dims[5], dims[4], dims[3], dims[2])); - default: THROW_CLDNN_EXCEPTION("Invalid dimensions size(" << dims.size() << ") for Gemm layer"); - } - }; - - // Preprocess inputs - for (size_t i = 0; i < inputPrimitives.size(); ++i) { - auto inputDims = layer->insData[i].lock()->getTensorDesc().getDims(); - auto inputDimsN = inputDims.size(); - - // Add reorder if changing number of dimensions requires changing format - auto targetFormat = defaultFormatForDims(outDimsN); - - if (targetFormat.value != defaultFormatForDims(inputDimsN).value) { - auto reorderName = gemmLayerName + "_cldnn_in" + std::to_string(i) + "_reorder"; - auto targetDatatype = DataTypeFromPrecision(layer->precision); - auto reorderPrim = cldnn::reorder(reorderName, inputPrimitives[i], targetFormat, targetDatatype); - - topology.add(reorderPrim); - AddInnerPrimitiveToProfiler(reorderName, gemmLayerName, layer); - - inputPrimitives[i] = reorderName; - } - - // Reshape input if they differ or gemm specific shape matches default one - if (inputDimsN != outDimsN || inputDimsN < 4) { - auto reshapeName = gemmLayerName + "_cldnn_in" + std::to_string(i) + "_reshape"; - - // Extend input dimensions by prepending ones - inputDims.insert(inputDims.begin(), outDimsN - inputDimsN, 1ul); - - auto targetShape = gemmSpecificTensor(inputDims); - - auto reshapePrim = cldnn::reshape(reshapeName, inputPrimitives[i], targetShape); - - topology.add(reshapePrim); - AddInnerPrimitiveToProfiler(reshapeName, gemmLayerName, layer); - - inputPrimitives[i] = reshapeName; - } - } - - // Add actual gemm - auto alpha = gemmLayer->alpha; - auto beta = gemmLayer->beta; - auto transA = gemmLayer->transpose_a; - auto transB = gemmLayer->transpose_b; - - auto gemmPrim = cldnn::gemm( - gemmLayerName, - inputPrimitives, - DataTypeFromPrecision(gemmLayer->outData[0]->getTensorDesc().getPrecision()), - transA, - transB, - alpha, - beta); - - topology.add(gemmPrim); - - auto lastLayerName = gemmLayerName; - - // Reshape output if gemm specific shape does not match default one - if (outDimsN < 4) { - auto outputShape = CldnnTensorFromIEDims(outDims); - auto outReshapeName = gemmLayerName + "_cldnn_out_reshape"; - auto outReshapePrim = cldnn::reshape(outReshapeName, gemmLayerName, outputShape); - - topology.add(outReshapePrim); - AddInnerPrimitiveToProfiler(outReshapeName, gemmLayerName, layer); - - lastLayerName = outReshapeName; - } - - AddPrimitiveToProfiler(gemmLayerName, layer, lastLayerName); -} - - -void Program::CreateReducePrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 2); - - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto reduce = as(layer); - auto input = reduce->insData[0].lock(); - size_t reduceDimNumber = input->getTensorDesc().getDims().size(); - - auto axesInput = layer->insData[1].lock(); - auto axesInputCreator = getCreatorLayer(axesInput).lock(); - - std::vector rawAxes; - if (axesInputCreator->blobs.size() == 1) { - auto constantBlob = axesInputCreator->blobs.begin()->second; - auto axesPrecision = constantBlob->getTensorDesc().getPrecision(); - if (axesPrecision == InferenceEngine::Precision::FP32) { - auto data = constantBlob->buffer().as(); - for (size_t i = 0; i < constantBlob->size(); ++i) - rawAxes.push_back(data[i]); - } else if (axesPrecision == InferenceEngine::Precision::I32) { - auto data = constantBlob->buffer().as(); - for (size_t i = 0; i < constantBlob->size(); ++i) - rawAxes.push_back(data[i]); - } else if (axesPrecision == InferenceEngine::Precision::I64) { - auto data = constantBlob->buffer().as(); - for (size_t i = 0; i < constantBlob->size(); ++i) - rawAxes.push_back(static_cast(data[i])); - } else { - THROW_IE_EXCEPTION << layer->name << " Incorrect Reduce axes input Precision"; - } - } - - std::vector axes; - for (size_t a = 0; a < rawAxes.size(); a++) { - if (rawAxes[a] < 0) - rawAxes[a] = rawAxes[a] + reduceDimNumber; - if (rawAxes[a] < 0 || rawAxes[a] > reduceDimNumber - 1) - THROW_IE_EXCEPTION << layer->name << " Incorrect Reduce axis value: " << rawAxes[a]; - if (reduceDimNumber == 6) { - switch (rawAxes[a]) { - case 0: axes.push_back(cldnn::reduce::along_b); break; - case 1: axes.push_back(cldnn::reduce::along_f); break; - case 2: axes.push_back(cldnn::reduce::along_w); break; - case 3: axes.push_back(cldnn::reduce::along_z); break; - case 4: axes.push_back(cldnn::reduce::along_y); break; - case 5: axes.push_back(cldnn::reduce::along_x); break; - } - } else if (reduceDimNumber == 5) { - switch (rawAxes[a]) { - case 0: axes.push_back(cldnn::reduce::along_b); break; - case 1: axes.push_back(cldnn::reduce::along_f); break; - case 2: axes.push_back(cldnn::reduce::along_z); break; - case 3: axes.push_back(cldnn::reduce::along_y); break; - case 4: axes.push_back(cldnn::reduce::along_x); break; - } - } else { - switch (rawAxes[a]) { - case 0: axes.push_back(cldnn::reduce::along_b); break; - case 1: axes.push_back(cldnn::reduce::along_f); break; - case 2: axes.push_back(cldnn::reduce::along_y); break; - case 3: axes.push_back(cldnn::reduce::along_x); break; - } - } - } - - sort(axes.begin(), axes.end()); - axes.erase(unique(axes.begin(), axes.end()), axes.end()); - - cldnn::reduce_mode mode; - std::string reduceType = layer->type; - if (reduceType == "ReduceMax") mode = cldnn::reduce_mode::max; - else if (reduceType == "ReduceMin") mode = cldnn::reduce_mode::min; - else if (reduceType == "ReduceMean") mode = cldnn::reduce_mode::mean; - else if (reduceType == "ReduceProd") mode = cldnn::reduce_mode::prod; - else if (reduceType == "ReduceSum") mode = cldnn::reduce_mode::sum; - else if (reduceType == "ReduceAnd") mode = cldnn::reduce_mode::logical_and; - else if (reduceType == "ReduceOr") mode = cldnn::reduce_mode::logical_or; - else if (reduceType == "ReduceSumSquare") mode = cldnn::reduce_mode::sum_square; - else if (reduceType == "ReduceL1") mode = cldnn::reduce_mode::l1; - else if (reduceType == "ReduceL2") mode = cldnn::reduce_mode::l2; - else if (reduceType == "ReduceLogSum") mode = cldnn::reduce_mode::log_sum; - else if (reduceType == "ReduceLogSumExp") mode = cldnn::reduce_mode::log_sum_exp; - else - THROW_IE_EXCEPTION << layer->name << " Incorrect Reduce layer type!"; - - std::string reduceLayerName = layer_type_name_ID(layer); - auto reducePrim = cldnn::reduce( - reduceLayerName, - inputPrimitives[0], - mode, - axes, - static_cast(reduce->keep_dims)); - - topology.add(reducePrim); - - auto reorderLayerName = reduceLayerName + "_reorder"; - cldnn::format out_format = cldnn::format::any; - auto out_dt = DataTypeFromPrecision(reduce->outData[0]->getTensorDesc().getPrecision()); - if (!reduce->keep_dims && reduceDimNumber > 4) { - if (reduceDimNumber - rawAxes.size() == 6) - out_format = cldnn::format::bfwzyx; - else if (reduceDimNumber - rawAxes.size() == 5) - out_format = cldnn::format::bfzyx; - else if (reduceDimNumber - rawAxes.size() <= 4) - out_format = cldnn::format::bfyx; - - auto reorder_prim = cldnn::reorder(reorderLayerName, reduceLayerName, out_format, out_dt); - topology.add(reorder_prim); - AddPrimitiveToProfiler(reduceLayerName, layer, reorderLayerName); - } else { - AddPrimitiveToProfiler(reduceLayerName, layer); - } -} - -void Program::CreateOneHotPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 1); - - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto oneHot = as(layer); - - int16_t axis = oneHot->GetParamAsInt("axis", -1); - float on_value = layer->GetParamAsFloat("on_value", 1.0f); - float off_value = layer->GetParamAsFloat("off_value", 0.0f); - auto dims = oneHot->input()->getDims(); - - if (axis < -1 || axis > static_cast(dims.size())) - THROW_IE_EXCEPTION << layer->name << " Incorrect OneHot axis value: " << axis << ". Should be between -1 and " << dims.size(); - - if (axis == -1) { - axis = dims.size(); - for (int i = dims.size() - 1; i >= 0; i--) { - if (dims[i] == 1) - axis--; - else - break; - } - } - - std::string oneHotLayerName = layer_type_name_ID(layer); - auto oneHotPrim = cldnn::one_hot( - oneHotLayerName, - inputPrimitives[0], - CldnnTensorFromIEDims(oneHot->outData[0]->getDims()), - DataTypeFromPrecision(oneHot->outData[0]->getPrecision()), - static_cast(axis), - on_value, - off_value); - - topology.add(oneHotPrim); - AddPrimitiveToProfiler(oneHotLayerName, layer); -} - -void Program::CreateConvertPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 1); - - auto inputPrimitives = GetPrevLayersPrimitives(layer); - - auto precisionParam = layer->GetParamAsString("precision"); - auto outPrecision = Precision::FromStr(precisionParam); - auto outDataType = DataTypeFromPrecision(outPrecision); - - auto name = layer_type_name_ID(layer); - auto prim = cldnn::reorder(name, inputPrimitives[0], cldnn::format::any, outDataType); - - topology.add(prim); - AddPrimitiveToProfiler(name, layer); -} - -void Program::CreateConvertLikePrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 2); - - auto inputPrimitives = GetPrevLayersPrimitives(layer); - - auto likePrimitive = layer->insData[1].lock(); - auto outPrecision = likePrimitive->getPrecision(); - auto outDataType = DataTypeFromPrecision(outPrecision); - - auto name = layer_type_name_ID(layer); - auto prim = cldnn::reorder(name, inputPrimitives[0], cldnn::format::any, outDataType); - - topology.add(prim); - AddPrimitiveToProfiler(name, layer); -} - -void Program::CreatePyramidRoIAlignPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, 5); - - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto name = layer_type_name_ID(layer); - - auto outputSize = layer->GetParamAsInt("output_size"); - auto samplingRatio = layer->GetParamAsInt("sampling_ratio"); - auto pyramidScales = layer->GetParamAsInts("pyramid_scales"); - const int canonicalStartingLevel = 2; - - auto prim = cldnn::pyramid_roi_align( - name, - inputPrimitives[0], - inputPrimitives[1], - inputPrimitives[2], - inputPrimitives[3], - inputPrimitives[4], - outputSize, - samplingRatio, - pyramidScales, - canonicalStartingLevel); - - topology.add(prim); - AddPrimitiveToProfiler(name, layer); -} - -void Program::CreateNonMaxSuppressionPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer) { - ValidateLayer(layer, {2, 3, 4, 5}); - - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto nonMaxSupression = as(layer); - - std::vector reorderedInputs; - reorderedInputs.resize(inputPrimitives.size()); - - for (size_t portIndex = 0; portIndex < inputPrimitives.size(); portIndex++) { - auto inputDataType = DataTypeFromPrecision(layer->insData[portIndex].lock()->getPrecision()); - if ((portIndex == 2) && (inputDataType == cldnn::data_types::i64)) { - // clDNN primitive supports only i32 data type for 'max_output_boxes_per_class' input - // so we need additional reorder if it's provided as i64 - auto reorderPrimName = inputPrimitives[portIndex] + "_" + layer->name + m_preProcessTag; - auto targetFormat = FormatFromLayout(layer->insData[portIndex].lock()->getLayout()); - auto preprocessPrim = cldnn::reorder( - reorderPrimName, - inputPrimitives[portIndex], - targetFormat, - cldnn::data_types::i32); - topology.add(preprocessPrim); - AddInnerPrimitiveToProfiler(reorderPrimName, layer_type_name_ID(layer), layer); - reorderedInputs[portIndex] = (reorderPrimName); - } else { - reorderedInputs[portIndex] = inputPrimitives[portIndex]; - } - } - - // clDNN primitive supports only i32 as output data type - nonMaxSupression->outData[0]->setPrecision(Precision::I32); - - auto centerPointBox = nonMaxSupression->center_point_box; - auto outputIndices = nonMaxSupression->outData[0]->getTensorDesc().getDims()[0]; - - auto name = layer->outData.size() > 1 ? (layer_type_lower(layer) + ":" + layer->outData[0]->getName()) : layer_type_name_ID(layer); - auto prim = cldnn::non_max_suppression( - name, - reorderedInputs[0], - reorderedInputs[1], - static_cast(outputIndices), - centerPointBox); - - switch (reorderedInputs.size()) { - case 5: - prim.score_threshold = reorderedInputs[4]; - case 4: - prim.iou_threshold = reorderedInputs[3]; - case 3: - prim.num_select_per_class = reorderedInputs[2]; - case 2: - case 1: - break; - default: - THROW_CLDNN_EXCEPTION("Incorrect number of input primitives for layer: " << layer->name); - } - - prim.output_data_type = DataTypeFromPrecision(nonMaxSupression->outData[0]->getTensorDesc().getPrecision()); - - topology.add(prim); - AddPrimitiveToProfiler(name, layer); -} - -void Program::CreateSelectPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr& layer) { - ValidateLayer(layer, 3); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - - auto selectLayerName = layer_type_name_ID(layer); - - auto outDims = layer->outData[0]->getTensorDesc().getDims(); - auto outDimsN = outDims.size(); - - std::string broadcast_type = layer->GetParamAsString("auto_broadcast", "numpy"); - - if ((broadcast_type != "none") && (broadcast_type != "numpy")) { - THROW_CLDNN_EXCEPTION("Unsupported broadcast type (" + broadcast_type + - ") in layer " + selectLayerName); - } - - auto selectSpecificTensor = [](const InferenceEngine::SizeVector& dims, int def = 1) { - switch (dims.size()) { - case 0: return cldnn::tensor(cldnn::batch(def), cldnn::feature(def), cldnn::spatial(def, def)); - case 1: return cldnn::tensor(cldnn::batch(dims[0]), cldnn::feature(def), cldnn::spatial(def, def)); - case 2: return cldnn::tensor(cldnn::batch(dims[0]), cldnn::feature(dims[1]), cldnn::spatial(def, def)); - case 3: return cldnn::tensor(cldnn::batch(dims[0]), cldnn::feature(dims[1]), cldnn::spatial(def, dims[2])); - case 4: return cldnn::tensor(cldnn::batch(dims[0]), cldnn::feature(dims[1]), cldnn::spatial(dims[3], dims[2])); - case 5: return cldnn::tensor(cldnn::batch(dims[0]), cldnn::feature(dims[1]), cldnn::spatial(dims[4], dims[3], dims[2])); - case 6: return cldnn::tensor(cldnn::batch(dims[0]), cldnn::feature(dims[1]), cldnn::spatial(dims[5], dims[4], dims[3], dims[2])); - default: THROW_CLDNN_EXCEPTION("Invalid dimensions size(" << dims.size() << ") for Select layer"); - } - }; - - if (broadcast_type == "numpy") { - // Preprocess inputs - for (size_t i = 0; i < inputPrimitives.size(); ++i) { - auto inputDims = layer->insData[i].lock()->getTensorDesc().getDims(); - auto inputDimsN = inputDims.size(); - - // Add reorder if changing number of dimensions requires changing format - auto targetFormat = defaultFormatForDims(outDimsN); - - if (targetFormat.value != defaultFormatForDims(inputDimsN).value) { - auto reorderName = selectLayerName + "_cldnn_in" + std::to_string(i) + "_reorder"; - auto targetDatatype = DataTypeFromPrecision(layer->precision); - auto reorderPrim = cldnn::reorder(reorderName, inputPrimitives[i], targetFormat, targetDatatype); - - topology.add(reorderPrim); - AddInnerPrimitiveToProfiler(reorderName, selectLayerName, layer); - - inputPrimitives[i] = reorderName; - } - - // Reshape input if they differ or select specific shape matches default one - if (inputDimsN != outDimsN || inputDimsN < 4) { - auto reshapeName = selectLayerName + "_cldnn_in" + std::to_string(i) + "_reshape"; - - // Extend input dimensions to the same size as output dimensions by prepending ones - inputDims.insert(inputDims.begin(), outDimsN - inputDimsN, 1ul); - - auto targetShape = selectSpecificTensor(inputDims); - - auto reshapePrim = cldnn::reshape(reshapeName, inputPrimitives[i], targetShape); - - topology.add(reshapePrim); - AddInnerPrimitiveToProfiler(reshapeName, selectLayerName, layer); - - inputPrimitives[i] = reshapeName; - } - } - } - - auto primitive = cldnn::select( - selectLayerName, - inputPrimitives[0], - inputPrimitives[1], - inputPrimitives[2], - cldnn::padding(), - broadcast_type); - - topology.add(primitive); - AddPrimitiveToProfiler(selectLayerName, layer); -} - -void Program::CreateGRNPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr& layer) { - ValidateLayer(layer, 1); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto layerName = layer_type_name_ID(layer); - auto grn = as(layer); - float bias = grn->bias; - - auto primitive = cldnn::grn( - layerName, - inputPrimitives[0], - bias, - DataTypeFromPrecision(grn->outData[0]->getTensorDesc().getPrecision())); - - topology.add(primitive); - AddPrimitiveToProfiler(layerName, layer); -} - -void Program::CreateCTCGreedyDecoderPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr& layer) { - ValidateLayer(layer, 2); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto layerName = layer_type_name_ID(layer); - auto ctcGreedyDecoder = as(layer); - float mergeRepeated = ctcGreedyDecoder->GetParamAsBool("ctc_merge_repeated"); - - auto primitive = cldnn::ctc_greedy_decoder( - layerName, - inputPrimitives[0], - inputPrimitives[1], - mergeRepeated, - DataTypeFromPrecision(ctcGreedyDecoder->outData[0]->getTensorDesc().getPrecision()), - CldnnTensorFromIEDims(layer->outData[0]->getDims())); - - topology.add(primitive); - AddPrimitiveToProfiler(layerName, layer); -} - -inline cldnn::cum_sum::cum_sum_axis CumSumAxisFromIEAxis(int axis, unsigned sz) { - if (axis < 0) - axis += sz; - if (axis < 0 || axis >= sz) - THROW_CLDNN_EXCEPTION("CumSum axis is not correspond to number of dimensions"); - - // Difference in dimension ordering between IE and clDNN, - // reverse spatial dimensions after batch and feature. - unsigned cldnn_axis = axis; - if (axis >= 2) { - auto spatial_axis = axis - 2; - // Default and minimum number of dimensions is 4 - auto spatial_size = std::max(sz, 4u) - 2; - cldnn_axis = spatial_size - spatial_axis - 1 + 2; - } - - switch (cldnn_axis) { - case 0: - return cldnn::cum_sum::cum_sum_axis::along_b; - case 1: - return cldnn::cum_sum::cum_sum_axis::along_f; - case 2: - return cldnn::cum_sum::cum_sum_axis::along_x; - case 3: - return cldnn::cum_sum::cum_sum_axis::along_y; - case 4: - return cldnn::cum_sum::cum_sum_axis::along_z; - case 5: - return cldnn::cum_sum::cum_sum_axis::along_w; - default: THROW_CLDNN_EXCEPTION("Unsupported cumsum axis: " << axis); - break; - } - - return cldnn::cum_sum::cum_sum_axis::along_f; // shouldn't get here -} - -void Program::CreateCumSumPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr& layer) { - ValidateLayer(layer, {1, 2}); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto cumSum = as (layer); - - auto exclusive = cumSum->GetParamAsBool("exclusive", false); - auto reverse = cumSum->GetParamAsBool("reverse", false); - - auto layerName = layer_type_name_ID(layer); - - size_t dimNumber = cumSum->insData[0].lock()->getTensorDesc().getDims().size(); - int32_t axis = 0; - if (inputPrimitives.size() == 2) { - auto axesInput = layer->insData[1].lock(); - auto axesInputCreator = getCreatorLayer(axesInput).lock(); - if (axesInputCreator->blobs.size() == 1) { - auto constantBlob = axesInputCreator->blobs.begin()->second; - auto axesPrecision = constantBlob->getTensorDesc().getPrecision(); - switch (axesPrecision) { - case InferenceEngine::Precision::U8: { - auto data = constantBlob->buffer().as(); - axis = static_cast(data[0]); - break; - } - case InferenceEngine::Precision::I8: { - auto data = constantBlob->buffer().as(); - axis = static_cast(data[0]); - break; - } - case InferenceEngine::Precision::U16: { - auto data = constantBlob->buffer().as(); - axis = static_cast(data[0]); - break; - } - case InferenceEngine::Precision::I16: { - auto data = constantBlob->buffer().as(); - axis = static_cast(data[0]); - break; - } - case InferenceEngine::Precision::I32: { - auto data = constantBlob->buffer().as(); - axis = data[0]; - break; - } - case InferenceEngine::Precision::U32: { - auto data = constantBlob->buffer().as(); - axis = static_cast(data[0]); - break; - } - case InferenceEngine::Precision::U64: { - auto data = constantBlob->buffer().as(); - axis = static_cast(data[0]); - break; - } - case InferenceEngine::Precision::I64: { - auto data = constantBlob->buffer().as(); - axis = static_cast(data[0]); - break; - } - default: - THROW_IE_EXCEPTION << layer->name << " Incorrect CumSum axes input Precision"; - } - } - } - - auto primitive = cldnn::cum_sum( - layerName, - inputPrimitives[0], - CumSumAxisFromIEAxis(axis, dimNumber), - exclusive, - reverse); - - topology.add(primitive); - AddPrimitiveToProfiler(layerName, layer); -} - -void Program::CreateRoundPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr& layer) { - ValidateLayer(layer, 1); - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto layerName = layer_type_name_ID(layer); - - std::string mode = layer->GetParamAsString("mode", "half_to_even"); - - if ((mode != "half_to_even") && (mode != "half_away_from_zero")) { - THROW_CLDNN_EXCEPTION("Unsupported mode (" + mode + ") in layer " + layerName); - } - - auto func = mode == "half_to_even" ? cldnn::activation_func::round_half_to_even : cldnn::activation_func::round_half_away_from_zero; - - auto primitive = cldnn::activation( - layerName, - inputPrimitives[0], - func); - - topology.add(primitive); - AddPrimitiveToProfiler(layerName, layer); -} - -void Program::CreatePriorBoxClusteredPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr& layer) { - ValidateLayer(layer, 2); - auto pbcLayer = as(layer); - - // params - std::vector width = pbcLayer->GetParamAsFloats("width", { 0.0f }); - std::vector height = pbcLayer->GetParamAsFloats("height", { 0.0f }); - std::vector variance = pbcLayer->GetParamAsFloats("variance", { 0.1f }); - float offset = pbcLayer->GetParamAsFloat("offset", 0.5f); - bool clip = pbcLayer->GetParamAsBool("clip", false); - - IE_ASSERT(layer->insData[0].lock()); - auto inp_dims = layer->insData[0].lock()->getTensorDesc().getDims(); - IE_ASSERT(layer->insData[1].lock()); - auto img_dims = layer->insData[1].lock()->getTensorDesc().getDims(); - - int img_w = pbcLayer->GetParamAsInt("img_w", 0); - int img_h = pbcLayer->GetParamAsInt("img_h", 0); - img_w = img_w == 0 ? static_cast(img_dims.back()) : img_w; - img_h = img_h == 0 ? static_cast(img_dims.at(img_dims.size() - 2)) : img_h; - cldnn::tensor img_size = (cldnn::tensor) cldnn::spatial(TensorValue(img_w), TensorValue(img_h)); - - auto step_w = pbcLayer->GetParamAsFloat("step_w", 0.0f); - auto step_h = pbcLayer->GetParamAsFloat("step_h", 0.0f); - auto step = pbcLayer->GetParamAsFloat("step", 0.0f); - - step_w = step_w == 0.0f ? step : step_w; - step_h = step_h == 0.0f ? step : step_h; - if (step_w == 0.0f && step_h == 0.0f) { - step_w = static_cast(img_w) / inp_dims.back(); - step_h = static_cast(img_h) / inp_dims.at(img_dims.size() - 2); - } - - auto output_dt = DataTypeFromPrecision(layer->outData[0]->getTensorDesc().getPrecision()); - - std::vector inputPrimitives = GetPrevLayersPrimitives(layer); - // second input isn't used by value - only dimensions taken from the layer input - std::string priorBoxLayerName = layer_type_name_ID(layer); - auto priorBoxPrim = cldnn::prior_box( - priorBoxLayerName, - inputPrimitives[0], - img_size, - clip, - variance, - step_w, - step_h, - offset, - width, - height, - output_dt); - - topology.add(priorBoxPrim); - AddPrimitiveToProfiler(priorBoxLayerName, layer); -} - -void Program::CreateEmbeddingBagPackedSumPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr& layer) { - ValidateLayer(layer, {2, 3}); - - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto embeddingBag = as(layer); - - auto layerName = layer_type_name_ID(layer); - - std::vector reorderedInputs; - reorderedInputs.resize(inputPrimitives.size()); - - for (size_t portIndex = 0; portIndex < inputPrimitives.size(); portIndex++) { - auto inputDataType = DataTypeFromPrecision(layer->insData[portIndex].lock()->getPrecision()); - if ((portIndex == 1) && (inputDataType == cldnn::data_types::i64)) { - // clDNN primitive supports only i32 data type for indices input, - // so we need additional reorder if it's provided as i64 - auto reorderPrimName = inputPrimitives[portIndex] + "_" + layer->name + m_preProcessTag; - auto targetFormat = FormatFromLayout(layer->insData[portIndex].lock()->getLayout()); - auto preprocessPrim = cldnn::reorder( - reorderPrimName, - inputPrimitives[portIndex], - targetFormat, - cldnn::data_types::i32); - topology.add(preprocessPrim); - AddInnerPrimitiveToProfiler(reorderPrimName, layer_type_name_ID(layer), layer); - reorderedInputs[portIndex] = (reorderPrimName); - } else { - reorderedInputs[portIndex] = inputPrimitives[portIndex]; - } - } - - auto embeddingBagPrim = cldnn::embedding_bag( - layerName, - reorderedInputs, - cldnn::embedding_bag::packed_sum, - CldnnTensorFromIEDims(embeddingBag->outData[0]->getTensorDesc().getDims())); - - topology.add(embeddingBagPrim); - AddPrimitiveToProfiler(layerName, layer); -} - -void Program::CreateEmbeddingBagOffsetsSumPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr& layer) { - ValidateLayer(layer, {3, 4, 5}); - - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto embeddingBag = as(layer); - - int32_t defaultIndex = -1; - if (inputPrimitives.size() > 3) { - auto defaultIndexInput = layer->insData[3].lock(); - auto defaultIndexInputCreator = getCreatorLayer(defaultIndexInput).lock(); - if (defaultIndexInputCreator->blobs.size() == 1) { - auto constantBlob = defaultIndexInputCreator->blobs.begin()->second; - auto defaultIndexPrecision = constantBlob->getTensorDesc().getPrecision(); - if (defaultIndexPrecision == InferenceEngine::Precision::I32) { - auto data = constantBlob->buffer().as(); - defaultIndex = data[0]; - } else if (defaultIndexPrecision == InferenceEngine::Precision::I64) { - auto data = constantBlob->buffer().as(); - defaultIndex = static_cast(data[0]); - } else { - THROW_IE_EXCEPTION << layer->name << "Incorrect EmbeddingBagOfsetsSum default_index precision"; - } - } - inputPrimitives.erase(inputPrimitives.begin() + 3); // Remove "default_index" - } - - std::vector reorderedInputs; - reorderedInputs.resize(inputPrimitives.size()); - - for (size_t portIndex = 0; portIndex < inputPrimitives.size(); portIndex++) { - auto inputDataType = DataTypeFromPrecision(layer->insData[portIndex].lock()->getPrecision()); - if (((portIndex == 1) || (portIndex == 2)) && (inputDataType == cldnn::data_types::i64)) { - // clDNN primitive supports only i32 data type for indices inputs, - // so we need additional reorders if they are provided as i64 - auto reorderPrimName = inputPrimitives[portIndex] + "_" + layer->name + m_preProcessTag; - auto targetFormat = FormatFromLayout(layer->insData[portIndex].lock()->getLayout()); - auto preprocessPrim = cldnn::reorder( - reorderPrimName, - inputPrimitives[portIndex], - targetFormat, - cldnn::data_types::i32); - topology.add(preprocessPrim); - AddInnerPrimitiveToProfiler(reorderPrimName, layer_type_name_ID(layer), layer); - reorderedInputs[portIndex] = (reorderPrimName); - } else { - reorderedInputs[portIndex] = inputPrimitives[portIndex]; - } - } - - auto layerName = layer_type_name_ID(layer); - auto embeddingBagPrim = cldnn::embedding_bag( - layerName, - reorderedInputs, - cldnn::embedding_bag::offsets_sum, - CldnnTensorFromIEDims(embeddingBag->outData[0]->getTensorDesc().getDims()), - defaultIndex); - - topology.add(embeddingBagPrim); - AddPrimitiveToProfiler(layerName, layer); -} - -void Program::CreateEmbeddingSegmentsSumPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr& layer) { - ValidateLayer(layer, {4, 5, 6}); - - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto embeddingBag = as(layer); - - inputPrimitives.erase(inputPrimitives.begin() + 3); // Remove "num_segments" - - int32_t defaultIndex = -1; - if (inputPrimitives.size() > 3) { - auto defaultIndexInput = layer->insData[4].lock(); - auto defaultIndexInputCreator = getCreatorLayer(defaultIndexInput).lock(); - if (defaultIndexInputCreator->blobs.size() == 1) { - auto constantBlob = defaultIndexInputCreator->blobs.begin()->second; - auto defaultIndexPrecision = constantBlob->getTensorDesc().getPrecision(); - if (defaultIndexPrecision == InferenceEngine::Precision::I32) { - auto data = constantBlob->buffer().as(); - defaultIndex = data[0]; - } else if (defaultIndexPrecision == InferenceEngine::Precision::I64) { - auto data = constantBlob->buffer().as(); - defaultIndex = static_cast(data[0]); - } else { - THROW_IE_EXCEPTION << layer->name << "Incorrect EmbeddingBagOfsetsSum default_index precision"; - } - } - inputPrimitives.erase(inputPrimitives.begin() + 3); // Remove "default_index" - } - - std::vector reorderedInputs; - reorderedInputs.resize(inputPrimitives.size()); - - for (size_t portIndex = 0; portIndex < inputPrimitives.size(); portIndex++) { - auto inputDataType = DataTypeFromPrecision(layer->insData[portIndex].lock()->getPrecision()); - if (((portIndex == 1) || (portIndex == 2)) && (inputDataType == cldnn::data_types::i64)) { - // clDNN primitive supports only i32 data type for indices inputs, - // so we need additional reorders if they are provided as i64 - auto reorderPrimName = inputPrimitives[portIndex] + "_" + layer->name + m_preProcessTag; - auto targetFormat = FormatFromLayout(layer->insData[portIndex].lock()->getLayout()); - auto preprocessPrim = cldnn::reorder( - reorderPrimName, - inputPrimitives[portIndex], - targetFormat, - cldnn::data_types::i32); - topology.add(preprocessPrim); - AddInnerPrimitiveToProfiler(reorderPrimName, layer_type_name_ID(layer), layer); - reorderedInputs[portIndex] = (reorderPrimName); - } else { - reorderedInputs[portIndex] = inputPrimitives[portIndex]; - } - } - - auto layerName = layer_type_name_ID(layer); - auto embeddingBagPrim = cldnn::embedding_bag( - layerName, - reorderedInputs, - cldnn::embedding_bag::segments_sum, - CldnnTensorFromIEDims(embeddingBag->outData[0]->getTensorDesc().getDims()), - defaultIndex); - - topology.add(embeddingBagPrim); - AddPrimitiveToProfiler(layerName, layer); -} - -void Program::CreateExtractImagePatchesPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr& layer) { - ValidateLayer(layer, 1); - - auto inputPrimitives = GetPrevLayersPrimitives(layer); - auto eipLayer = as(layer); - - std::vector sizes = eipLayer->GetParamAsUInts("sizes"); - std::vector strides = eipLayer->GetParamAsUInts("strides"); - std::vector rates = eipLayer->GetParamAsUInts("rates"); - std::string auto_pad = eipLayer->GetParamAsString("auto_pad"); - - std::string eipLayerName = layer_type_name_ID(layer); - - auto extractImagePatchesPrim = cldnn::extract_image_patches( - eipLayerName, - inputPrimitives[0], - sizes, - strides, - rates, - auto_pad, - CldnnTensorFromIEDims(eipLayer->outData[0]->getTensorDesc().getDims())); - - topology.add(extractImagePatchesPrim); - AddPrimitiveToProfiler(eipLayerName, layer); -} - -bool Program::IsValidSplitConvMerge(const InferenceEngine::SplitLayer *splitLayer) const { - if (splitLayer->outData.size() != 2) return false; // split into 2 - - for (auto out : splitLayer->outData) { - if (getInputTo(out).size() != 1) { - return false; - } - } - - auto convLayer1 = - tryAs (GetNextSingleLayer(splitLayer->outData[0])); - auto convLayer2 = - tryAs (GetNextSingleLayer(splitLayer->outData[1])); - if (!convLayer1 || !convLayer2) { // outputs aren't convolutions - return false; - } - auto allPad1 = getPaddings(*convLayer1); - auto allPad2 = getPaddings(*convLayer2); - if (convLayer1->precision != convLayer2->precision // wrong precision - || convLayer1->_fusedWith || convLayer2->_fusedWith // convolutions are fused - || convLayer1->outData.size() != 1 || convLayer2->outData.size() != 1 // more than 1 output for convolutions - || allPad1.begin[X_AXIS] != allPad2.begin[X_AXIS] // different padding - || allPad1.begin[Y_AXIS] != allPad2.begin[Y_AXIS] // different padding - || convLayer1->_stride[X_AXIS] != convLayer2->_stride[X_AXIS] // different strides - || convLayer1->_stride[Y_AXIS] != convLayer2->_stride[Y_AXIS] // different strides - || convLayer1->_dilation[X_AXIS] != convLayer2->_dilation[X_AXIS] // different dilation - || convLayer1->_dilation[Y_AXIS] != convLayer2->_dilation[Y_AXIS] // different dilation - || (GetNextSingleLayer(GetNextSingleLayer(splitLayer->outData[0])) // no merge after convolutions - != GetNextSingleLayer(GetNextSingleLayer(splitLayer->outData[1]))) - || (p_currentOutputs.find(convLayer1->name) != p_currentOutputs.end()) - || (p_currentOutputs.find(convLayer2->name) != p_currentOutputs.end())) { - return false; - } - auto concatLayer = - tryAs ( - GetNextSingleLayer(GetNextSingleLayer(splitLayer->outData[0]))); - if (!concatLayer || // not a merge layer - concatLayer->_axis != 1 || // merge on unsupported axis - concatLayer->outData.size() != 1) { // too many outputs - return false; - } - if (m_config.customLayers.find(convLayer1->type) != m_config.customLayers.end() || - m_config.customLayers.find(concatLayer->type) != m_config.customLayers.end()) { - return false; // convolution or concat were overwritten by a custom layer - } - return true; } -void Program::AddInputPrimitive(cldnn::topology& topology, InputInfo::Ptr inputInfo, Precision layerPrecision, const std::string inputName) { - // first create and add the input layout - const auto inputDesc = inputInfo->getTensorDesc(); - const auto inputDims = inputDesc.getDims(); - Layout l = inputDesc.getLayout(); - Precision ip = inputDesc.getPrecision(); - auto consumers = getInputTo(inputInfo->getInputData()); - - cldnn::format inputFormat = m_defaultFormat; - if (InferenceEngine::Layout::BLOCKED == l && 6 == inputDims.size()) - inputFormat = cldnn::format::bfwzyx; - else - inputFormat = FormatFromLayout(l); - cldnn::tensor dataTensor; - cldnn::tensor::value_type batch = (m_max_batch <= 1) - ? (inputDims.size() > 3 ? TensorValue(inputDims[0]) : 1) - : TensorValue(m_curBatch); - switch (inputDims.size()) { - case 6: - dataTensor = cldnn::tensor(cldnn::batch(batch), - cldnn::feature(inputDims[1]), - cldnn::spatial(inputDims[5], inputDims[4], inputDims[3], inputDims[2])); - break; - case 5: - if (InferenceEngine::Layout::NCDHW == l) { - dataTensor = cldnn::tensor(cldnn::batch(batch), - cldnn::feature(inputDims[1]), - cldnn::spatial(inputDims[4], inputDims[3], inputDims[2])); - } else { - THROW_CLDNN_EXCEPTION("Unsupported layout (" << l << ") in 5D input " + inputInfo->name()); - } - break; - case 4: - if (InferenceEngine::Layout::NCHW == l || InferenceEngine::Layout::CHW == l) { - dataTensor = cldnn::tensor(batch, - TensorValue(inputDims[1]), TensorValue(inputDims[3]), TensorValue(inputDims[2])); - } else if (InferenceEngine::Layout::NHWC == l) { - dataTensor = cldnn::tensor(batch, - TensorValue(inputDims[1]), TensorValue(inputDims[3]), TensorValue(inputDims[2])); - } else { - THROW_CLDNN_EXCEPTION("Unsupported layout (" << l << ") in 4D input " + inputInfo->name()); - } - break; - case 3: - if (InferenceEngine::Layout::CHW == l) { - dataTensor = cldnn::tensor(TensorValue(inputDims[0]), TensorValue(inputDims[1]), 1, TensorValue(inputDims[2])); - } else { - THROW_CLDNN_EXCEPTION("Unsupported layout (" << l << ") in 3D input " + inputInfo->name()); - } - break; - case 2: - if (InferenceEngine::Layout::NCHW == l || InferenceEngine::NC == l) { - dataTensor = cldnn::tensor(TensorValue(inputDims[0]), TensorValue(inputDims[1]), 1, 1); - } else { - THROW_CLDNN_EXCEPTION("Unsupported layout (" << l << ") in 2D input " + inputInfo->name()); - } - break; - case 1: - dataTensor = cldnn::tensor(TensorValue(inputDims[0]), 1, 1, 1); - break; - case 0: - dataTensor = cldnn::tensor(1, 1, 1, 1); - break; - default: THROW_CLDNN_EXCEPTION("Invalid data dimensions"); - } - cldnn::layout networkInputLayout(DataTypeFromPrecision(ip), - inputFormat, - dataTensor); - - // look at the expected color format of this input - auto preProcess = inputInfo->getPreProcess(); - size_t meanChannels = preProcess.getNumberOfChannels(); - networkInputLayout.format = inputFormat; - networkInputLayout.size = networkInputLayout.size.transform(inputFormat, 1); - networkInputLayout.data_type = DataTypeFromPrecision(layerPrecision); - auto preprocessPrimID = "reorder:" + inputName + m_preProcessTag; - cldnn::primitive_id meanBlobID = inputName + m_meanValuesTag; - std::vector meanValues; - - if ((meanChannels > 0) && - (meanChannels != networkInputLayout.size.feature[0])) { - THROW_CLDNN_EXCEPTION("Mismatched mean values channels in input " + inputName); - } - - switch (preProcess.getMeanVariant()) { - case NONE: - case MEAN_VALUE: { - if (meanChannels > 0) { - for (size_t c = 0; c < meanChannels; c++) { - if (fabs(preProcess[c]->stdScale - 1.0f) > 1e-10) - THROW_CLDNN_EXCEPTION("not supporting stdScale yet in input " + inputName); - meanValues.push_back(preProcess[c]->meanValue); - } - } - break; - } - case MEAN_IMAGE: { - IE_ASSERT(meanChannels); - // first merge all mean values to a single blob - // todo make sure mean blob precision is the same as the input precision - auto meanDims = inputDims; - // overwrite batches with 1 - switch (meanDims.size()) { - case 4: meanDims[0] = 1; - break; - default: - THROW_CLDNN_EXCEPTION("Missing batch dimensions in input image"); - } - const TensorDesc desc(Precision(Precision::FP32), meanDims, TensorDesc::getLayoutByDims(meanDims)); - InferenceEngine::TBlob meanBlob(desc); - meanBlob.allocate(); - auto meanBlobData = meanBlob.data(); - for (size_t c = 0; c < meanChannels; c++) { - if (fabs(preProcess[c]->stdScale - 1.0f) > 1e-10) - THROW_CLDNN_EXCEPTION("not supporting stdScale yet in input " + inputName); - auto channelMeanBlob = std::dynamic_pointer_cast>(preProcess[c]->meanData); - auto channelSize = channelMeanBlob->size(); - auto channelBlobData = channelMeanBlob->data(); - for (size_t i = 0; i < channelSize; i++) { - meanBlobData[(c * channelSize) + i] = channelBlobData[i]; - } - } - // then create a data primitive for the mean values - auto meanBlobPtr = std::make_shared>(meanBlob); - - // mean values will use external format (sub in the input format before convert to new format) - cldnn::tensor meanBlobTensor(networkInputLayout.size); - meanBlobTensor.batch[0] = 1; // mean values have no batches - cldnn::layout meanBlobLayout(cldnn::data_types::f32, m_defaultFormat, meanBlobTensor); - meanBlobID = CreatePrimitiveFromBlob(topology, - meanBlobID, - meanBlobPtr, - meanBlobLayout); - break; - } - default: THROW_CLDNN_EXCEPTION("Invalid mean variant in input " + inputName); - break; - } - - if (ColorFormat::NV12 == preProcess.getColorFormat() && m_config.nv12_two_inputs) { - // for NV12, create two input layouts with reorder instead of one, - // and then would expect compound blob in inferRequest - if (Layout::NCHW != l && - (Precision::I8 != ip || Precision::U8 != ip)) { - THROW_CLDNN_EXCEPTION("Unsupported layout (" << l << ") or precision (" - << ip.name() << ") for NV12 input " + inputInfo->name()); - } - int height = inputDims[2]; - int width = inputDims[3]; - - std::string y_name = inputName + "_Y"; - std::string uv_name = inputName + "_UV"; - - cldnn::layout y_layout(DataTypeFromPrecision(ip), - cldnn::format::nv12, { 1, 1, width, height }); - cldnn::layout uv_layout(DataTypeFromPrecision(ip), - cldnn::format::nv12, { 1, 2, width / 2, height / 2 }); - auto inputY = cldnn::input_layout(y_name, y_layout); - auto inputUV = cldnn::input_layout(uv_name, uv_layout); - - topology.add(inputY); - inputLayouts.insert({ inputInfo->name() + "_Y", y_layout }); - topology.add(inputUV); - inputLayouts.insert({ inputInfo->name() + "_UV", uv_layout }); - switch (preProcess.getMeanVariant()) { - case NONE: - case MEAN_VALUE: { - topology.add(cldnn::reorder(preprocessPrimID, y_name, uv_name, networkInputLayout, meanValues)); - break; - } - case MEAN_IMAGE: { - topology.add(cldnn::reorder(preprocessPrimID, y_name, uv_name, networkInputLayout, meanBlobID)); - break; - } - default: THROW_CLDNN_EXCEPTION("Invalid mean variant in input " + inputName); - break; - } - - primitivesToIRLayersMap[preprocessPrimID] = { inputInfo->name() }; - primitivesToIRLayersMap[y_name] = { inputInfo->name() }; - primitivesToIRLayersMap[uv_name] = { inputInfo->name() }; - profilingIDs.push_back(preprocessPrimID); - InitProfileInfo(preprocessPrimID, "Reorder"); - } else { - cldnn::layout inputLayout(networkInputLayout); - inputLayout.data_type = DataTypeFromPrecision(ip); - inputLayouts.insert({ inputInfo->name(), inputLayout }); - - topology.add(cldnn::input_layout(inputName, inputLayout)); - primitivesToIRLayersMap[inputName] = { inputInfo->name() }; - - switch (preProcess.getMeanVariant()) { - case NONE: - case MEAN_VALUE: { - topology.add(cldnn::reorder(preprocessPrimID, inputName, networkInputLayout, meanValues)); - break; - } - case MEAN_IMAGE: { - topology.add(cldnn::reorder(preprocessPrimID, - inputName, - networkInputLayout, - meanBlobID)); - break; - } - default: THROW_CLDNN_EXCEPTION("Invalid mean variant in input " + inputName); - break; - } - InitProfileInfo(preprocessPrimID, "reorder"); - primitiveIDs[preprocessPrimID] = preprocessPrimID; - profilingIDs.push_back(preprocessPrimID); - } - - primitiveIDs[inputName] = preprocessPrimID; - primitiveIDs[preprocessPrimID] = preprocessPrimID; -} - -std::vector Program::GetPrevLayersPrimitives(const InferenceEngine::CNNLayerPtr layer) const { - if (layer == nullptr) { - return {}; - } - std::vector inputPrimitives; - for (auto inputData : layer->insData) { - auto prevData = inputData.lock(); - if (prevData == nullptr) { - THROW_CLDNN_EXCEPTION("Nonexistent input for layer: " << layer->name); - } - auto prevCreator = getCreatorLayer(prevData).lock(); - std::string prevName; - - if (prevCreator) { - prevName = layer_type_lower(prevCreator) + ":"; - if (prevCreator->outData.size() > 1) - prevName += prevData->getName(); - else - prevName += prevCreator->name; - } else { - prevName = prevData->getName(); - } - inputPrimitives.push_back(primitiveIDs.at(prevName)); - } - return inputPrimitives; -} - -void Program::AddOutputPrimitive(cldnn::topology& topology, std::string outputName, const InferenceEngine::DataPtr outputData, Precision outputPrecision) { - const auto outputDesc = outputData->getTensorDesc(); - const auto outputlayout = outputDesc.getLayout(); - - // TODO: add precision check once there's an outputInfo object - if (outputlayout != InferenceEngine::NCHW && - // TODO: change 6d case once new layout added in IE - outputlayout != InferenceEngine::BLOCKED && - outputlayout != InferenceEngine::NCDHW && - outputlayout != InferenceEngine::NHWC && - outputlayout != InferenceEngine::CHW && - outputlayout != InferenceEngine::NC && - outputlayout != InferenceEngine::C && - outputlayout != InferenceEngine::SCALAR) { - THROW_CLDNN_EXCEPTION("Unsupported layout (" << outputlayout << ") in output: " << outputName); - } - - auto outputCreator = getCreatorLayer(outputData).lock(); - std::string outLayerName = layer_type_lower(outputCreator) + ":"; - - if (outputCreator->outData.size() > 1) - outLayerName += outputName; - else - outLayerName += outputCreator->name; - - auto outputReorderID = "reorder:" + outputName + m_postProcessTag; - Precision precision = outputPrecision == Precision::UNSPECIFIED ? outputData->getPrecision() : outputPrecision; - - // Find correct output ID. Start with name stored in IR. - std::string outputID = outLayerName; - // This can happen when an output has invalid connections with previous layer and - // it's not handled by CreateSingleLayerPrimitive method - if (primitiveIDs.find(outLayerName) == primitiveIDs.end()) { - THROW_IE_EXCEPTION << "Can't find output with name " << outLayerName; - } - - std::string finalID = primitiveIDs.at(outLayerName); - - while (outputID != finalID) { - auto prim = primitiveIDs.find(finalID); - - if (prim == primitiveIDs.end()) { - THROW_IE_EXCEPTION << "Unknown output primitive id " << outputID; - } - outputID = finalID; - finalID = prim->second; - } - - topology.add(cldnn::reorder(outputReorderID, outputID, - FormatFromLayout(outputData->getLayout()), - DataTypeFromPrecision(precision))); - InitProfileInfo(outputReorderID, "reorder"); - primitiveIDs[outputReorderID] = outputReorderID; - profilingIDs.push_back(outputReorderID); - primitiveIDs[outputName] = outputReorderID; - - outputDims[outputName] = outputDesc.getDims(); - prevPrimitiveIDs[outputReorderID] = {outputName}; -} - -void Program::AddSingleValuePrimitive(cldnn::topology& topology, cldnn::primitive_id valPrimID, cldnn::data_types dataType, float value) { - cldnn::layout primLayout(dataType, m_defaultFormat, { 1, 1, 1, 1 }); - auto primMem = cldnn::memory::allocate(*m_engine, primLayout, 0, false); - switch (dataType) { - case cldnn::data_types::f32: - { - auto tmpPointer = primMem.pointer(); // implicitly maps buffer - unmap in destructor - tmpPointer[0] = value; - } - break; - case cldnn::data_types::f16: - { - auto tmpPointer = primMem.pointer(); // implicitly maps buffer - unmap in destructor - tmpPointer[0] = cldnn::float_to_half(value); - } - break; - default: - THROW_CLDNN_EXCEPTION("Unhandled data type (precision)"); - } - - topology.add(cldnn::data(valPrimID, primMem)); -} - -cldnn::resample_type Program::ResampleTypeFromString(const std::string &str) { - static const caseless_map UpsamplingTypeNameToType = { - { "caffe.ResampleParameter.LINEAR" , cldnn::resample_type::caffe_bilinear }, - { "caffe.ResampleParameter.NEAREST" , cldnn::resample_type::nearest }, - { "Interp" , cldnn::resample_type::bilinear }, - { "linear" , cldnn::resample_type::caffe_bilinear }, - { "linear_onnx" , cldnn::resample_type::linear_onnx }, - { "cubic" , cldnn::resample_type::cubic }, - { "nearest" , cldnn::resample_type::nearest }, - }; - auto it = UpsamplingTypeNameToType.find(str); - if (it != UpsamplingTypeNameToType.end()) - return it->second; - else - THROW_CLDNN_EXCEPTION("Unknown Resample type: " << str); -} - -cldnn::softmax::dimension_t Program::SoftmaxDimensionFromIEAxis(const InferenceEngine::SoftMaxLayer* softmaxLayer) { - auto sz = softmaxLayer->input()->getTensorDesc().getDims().size(); - switch (softmaxLayer->axis) { - case 0: return cldnn::softmax::normalize_all; - case 1: return cldnn::softmax::normalize_f; - case 2: - if (sz > 4) - return cldnn::softmax::normalize_z; - else - return cldnn::softmax::normalize_y; - case 3: - if (sz > 4) - return cldnn::softmax::normalize_y; - else - return cldnn::softmax::normalize_x; - case 4: - return cldnn::softmax::normalize_x; - default: THROW_CLDNN_EXCEPTION("Invalid softmax axis " << softmaxLayer->axis); - } - return cldnn::softmax::normalize_fyx; -} - -cldnn::prior_box_code_type Program::PriorBoxCodeFromString(const std::string& str) { - static const std::map CodeNameToType = { - { "caffe.PriorBoxParameter.CORNER" , cldnn::prior_box_code_type::corner }, - { "caffe.PriorBoxParameter.CENTER_SIZE" , cldnn::prior_box_code_type::center_size }, - { "caffe.PriorBoxParameter.CORNER_SIZE" , cldnn::prior_box_code_type::corner_size }, - }; - auto it = CodeNameToType.find(str); - if (it != CodeNameToType.end()) { - return it->second; - } else { - THROW_CLDNN_EXCEPTION("Unknown Prior-Box code type: " + str); - return cldnn::prior_box_code_type::corner; - } -} - -Program::GenericBlobMap Program::CreateGenericLayerBlobPrimitives(cldnn::topology& topology, const InferenceEngine::GenericLayer* layer) { - IE_ASSERT(layer); - GenericBlobMap res; - for (auto& blob : layer->blobs) { - const auto blobDims = blob.second->getTensorDesc().getDims(); - - cldnn::tensor genericBlobTensor(1); - switch (blobDims.size()) { - case 1: genericBlobTensor = cldnn::tensor(cldnn::feature(TensorValue(blobDims[0]))); // value per feature (or 1 global value) - break; - default: genericBlobTensor = CldnnTensorFromIEDims(blobDims); - break; - } - - cldnn::layout genericLayout(DataTypeFromPrecision(blob.second->getTensorDesc().getPrecision()), - m_defaultFormat, genericBlobTensor); - - cldnn::primitive_id initialWeightID = layer_type_name_ID(layer) + "_" + blob.first + m_weightsTag; - cldnn::primitive_id weightID = CreatePrimitiveFromBlob(topology, initialWeightID, blob.second, genericLayout); - res[initialWeightID] = weightID; - } - - return res; -} - -void Program::ValidateGenericLayerBlobs(const InferenceEngine::GenericLayer* layer, const std::vector& blobNames) { - IE_ASSERT(layer); - for (auto& name : blobNames) { - if (layer->blobs.find(name) == layer->blobs.end()) { - THROW_CLDNN_EXCEPTION("Missing blob " + name + " in layer " + layer->name); - } - } -} - -void Program::AddPrimitiveToProfiler(cldnn::primitive_id id, const InferenceEngine::CNNLayerPtr &layer, - cldnn::primitive_id customOutputId) { - primitivesToIRLayersMap[id] = { layer->name }; - primitiveIDs[id] = customOutputId.empty() ? id : customOutputId; - profilingIDs.push_back(id); -} - -void Program::AddInnerPrimitiveToProfiler(cldnn::primitive_id id, cldnn::primitive_id parentId, - const InferenceEngine::CNNLayerPtr &layer) { - InitProfileInfo(id, layer_type_lower(layer), false, InferenceEngine::InferenceEngineProfileInfo::EXECUTED, parentId); - primitivesToIRLayersMap[id] = { layer->name }; - primitiveIDs[id] = id; - profilingIDs.push_back(id); -} - -void Program::InitProfileInfo(const std::string& layerName, - const std::string& layerType, - bool isCPU, - InferenceEngine::InferenceEngineProfileInfo::LayerStatus status, std::string parentId) { - std::string layer_type_lower = layerType; - for (auto& c : layer_type_lower) - c = tolower(c); - - std::string name = layerName; - if (name.find(layer_type_lower + ":") != std::string::npos) { - name = layerName.substr(layerName.find(":") + 1, layerName.length()); - } - - perfMap[layer_type_lower + ":" + name].first = name; - auto& perfEntry = perfMap[layer_type_lower + ":" + name].second; - perfEntry.layerType = layerType; - perfEntry.status = status; - perfEntry.cpu_uSec = perfEntry.realTime_uSec = 0; - perfEntry.isCPU = isCPU; - perfEntry.parentPrimitive = parentId; -} - } // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/cldnn_program.h b/inference-engine/src/cldnn_engine/cldnn_program.h index 2d3439dcde1766..35c621002d5812 100644 --- a/inference-engine/src/cldnn_engine/cldnn_program.h +++ b/inference-engine/src/cldnn_engine/cldnn_program.h @@ -6,65 +6,49 @@ #include #include -#include #include #include -#include -#include +#include #include -#include -#include -#include +#include "details/ie_exception.hpp" -#include "debug_options.h" -#include "cldnn_custom_layer.h" #include "cldnn_config.h" #include -#include #include -#include -#include -#include -#include -#include -#include -#include -namespace CLDNNPlugin { -template -LayerTypePtr tryAs(const InferenceEngine::CNNLayerPtr& in_ptr) { - return dynamic_cast(in_ptr.get()); -} - -template -LayerTypePtr as(const InferenceEngine::CNNLayerPtr& in_ptr) { - auto result_ptr = dynamic_cast (in_ptr.get()); - if (nullptr == result_ptr) { - THROW_IE_EXCEPTION << "CNNLayerPtr is not suitable for casting to requested layer type"; - } - return result_ptr; +// Forward declarations for cldnn part +namespace cldnn { +enum class activation_func; +struct activation_additional_params; +enum class reduce_mode : uint16_t; +enum class eltwise_mode : int32_t; +} // namespace cldnn + +// Forward declarations for ngraph part +namespace ngraph { +class Node; +class DiscreteTypeInfo; +} // namespace ngraph + +#define REGISTER_FACTORY_IMPL(op_version, op_name) \ +void __register ## _ ## op_name ## _ ## op_version() { \ + Program::RegisterFactory( \ + [](Program& p, const std::shared_ptr& op) { \ + auto op_casted = std::dynamic_pointer_cast(op); \ + if (!op_casted) \ + THROW_IE_EXCEPTION << "Invalid ngraph Node type passed into " << __PRETTY_FUNCTION__; \ + Create##op_name##Op(p, op_casted); \ + }); \ } -inline std::string layer_type_lower(const InferenceEngine::CNNLayer* layer) { - std::string layerType = layer->type; - std::transform(layerType.begin(), layerType.end(), layerType.begin(), - [](unsigned char c) -> unsigned char { return std::tolower(c); }); - return layerType; -} - -inline std::string layer_type_name_ID(const InferenceEngine::CNNLayer* layer) { - return layer_type_lower(layer) + ":" + layer->name; -} - -inline std::string layer_type_lower(InferenceEngine::CNNLayerPtr layer) { - return layer_type_lower(layer.get()); -} +namespace CLDNNPlugin { -inline std::string layer_type_name_ID(InferenceEngine::CNNLayerPtr layer) { - return layer_type_name_ID(layer.get()); -} +std::string layer_type_lower(const ngraph::Node* op); +std::string layer_type_name_ID(const ngraph::Node* op); +std::string layer_type_lower(const std::shared_ptr& op); +std::string layer_type_name_ID(const std::shared_ptr& op); struct PerfCounter { InferenceEngine::InferenceEngineProfileInfo::LayerStatus status; @@ -85,8 +69,14 @@ struct PerfCounter { class Program { public: - Program(InferenceEngine::CNNNetwork &network, std::shared_ptr engine, const Config& config); - std::shared_ptr getCompiledProgram(int program_id = 0); + Program(InferenceEngine::CNNNetwork& network, std::shared_ptr engine, const Config& config); + Program() : m_config({}), m_engine(nullptr), m_curBatch(-1), queryMode(false) {} + + static const cldnn::primitive_id m_preProcessTag; + static const cldnn::primitive_id m_meanValuesTag; + static const cldnn::primitive_id m_workaroundTag; + static const cldnn::primitive_id m_preCustomLayerTag; + static const cldnn::primitive_id m_postCustomLayerTag; std::map primitiveIDs; std::map> primitivesToIRLayersMap; @@ -103,298 +93,82 @@ class Program { int m_max_batch; int m_curBatch; - InferenceEngine::OutputsDataMap p_currentOutputs; - - std::vector GetPrevLayersPrimitives(const InferenceEngine::CNNLayerPtr layer) const; - const std::map& getInputLayouts() const { return inputLayouts; } + std::shared_ptr GetCompiledProgram(int program_id = 0); + const std::map& GetInputLayouts() const { return inputLayouts; } + InferenceEngine::InputsDataMap GetNetworkInputs() const { return m_networkInputs; } + InferenceEngine::OutputsDataMap GetNetworkOutputs() const { return m_networkOutputs; } + const cldnn::engine& GetEngine() const { return *m_engine; } + const Config& GetConfig() const { return m_config; } int GetMaxBatchSizeForSingleProgram(); - void AddPrimitiveToProfiler(cldnn::primitive_id id, const InferenceEngine::CNNLayerPtr &layer, - cldnn::primitive_id customOutputId = ""); - - void AddInnerPrimitiveToProfiler(cldnn::primitive_id id, cldnn::primitive_id parentId, - const InferenceEngine::CNNLayerPtr &layer); - - // internal types - enum LayerType { - Convolution, - DeformableConvolution, - ReLU, - ReLU6, - Sigmoid, - TanH, - ELU, - Activation, - Exp, - Asin, - Atan, - Acos, - Abs, - Asinh, - Acosh, - Atanh, - Not, - LRN, - Pooling, - FullyConnected, - SoftMax, - LogSoftmax, - Power, - Split, - VariadicSplit, - Concatenate, - Eltwise, - SimplerNMS, - ROIPooling, - Crop, - Deconvolution, - PriorBox, - DetectionOutput, - Normalize, - Reshape, - Transpose, - Permute, - Flatten, - BatchNormalization, - PReLU, - ScaleShift, - Proposal, - PSROIPooling, - Clamp, - Copy, - Resample, - Interp, - Interpolate, - RegionYolo, - ReorgYolo, - ConstantBlob, - ArgMax, - ArgMin, - MVN, - Unpooling, - Tile, - Pad, - LSTMCell, - RNN, - Gather, - DepthToSpace, - SpaceToDepth, - BatchToSpace, - SpaceToBatch, - ShuffleChannels, - StridedSlice, - Broadcast, - ReverseSequence, - BinaryConvolution, - Quantize, - Squeeze, - Unsqueeze, - Reduce, - TopK, - Floor, - Ceil, - Ceiling, - Erf, - HardSigmoid, - HSigmoid, - Log, - Neg, - Reciprocal, - Selu, - Sign, - SoftPlus, - SoftSign, - Swish, - HSwish, - Mish, - Gelu, - Sin, - Sinh, - Cos, - Cosh, - Tan, - Gemm, - OneHot, - Convert, - ConvertLike, - GatherTree, - ExperimentalDetectronROIFeatureExtractor, - NonMaxSuppression, - Select, - GRN, - CTCGreedyDecoder, - PriorBoxClustered, - CumSum, - Round, - EmbeddingBagPackedSum, - EmbeddingBagOffsetsSum, - EmbeddingSegmentsSum, - ExtractImagePatches, - NO_TYPE - }; - using GenericBlobMap = std::map; - - static LayerType LayerTypeFromStr(const std::string& str); - -private: - std::vector> m_programs; - std::shared_ptr m_engine; - Config m_config; - - std::shared_ptr BuildProgram(InferenceEngine::CNNNetwork &network); + bool IsOpSupported(const InferenceEngine::CNNNetwork& network, const std::shared_ptr& op); + // Profiling utils void InitProfileInfo(const std::string& layerName, const std::string& layerType, bool isCPU = false, InferenceEngine::InferenceEngineProfileInfo::LayerStatus status = InferenceEngine::InferenceEngineProfileInfo::EXECUTED, std::string parentId = ""); + void AddPrimitiveToProfiler(cldnn::primitive_id id, const std::shared_ptr& op, + cldnn::primitive_id customOutputId = ""); + void AddPrimitiveToProfiler(const std::shared_ptr& op, + cldnn::primitive_id customOutputId = ""); + void AddInnerPrimitiveToProfiler(cldnn::primitive_id id, cldnn::primitive_id parentId, + const std::shared_ptr& op); - static const cldnn::primitive_id m_preProcessTag; - static const cldnn::primitive_id m_weightsTag; - static const cldnn::primitive_id m_biasesTag; - static const cldnn::primitive_id m_meanValuesTag; - static const cldnn::primitive_id m_postProcessTag; - static const cldnn::primitive_id m_scalesTag; - static const cldnn::primitive_id m_workaroundTag; - static const cldnn::primitive_id m_preCustomLayerTag; - static const cldnn::primitive_id m_postCustomLayerTag; + // Graph construction helpers + void ValidateInputs(const std::shared_ptr& op, std::vector validInputsCount); + std::vector GetInputPrimitiveIDs(const std::shared_ptr& op) const; + + using factory_t = std::function&)>; + using factories_map_t = std::map; + + template::value, int>::type = 0> + static void RegisterFactory(factory_t func) { + Program::factories_map.insert({OpType::type_info, func}); + } + template + void AddPrimitive(PType prim) { + if (m_topology == nullptr) { + THROW_IE_EXCEPTION << "m_topology object was not created in clDNNPlugin::Program"; + } - enum WeightRearrangeType { - BroadcastFeatures, - FlipDeconvDims, - NO_REARRANGE - }; - - cldnn::format m_defaultFormat; - void InitFormat(InferenceEngine::ICNNNetwork &network); - - static cldnn::resample_type ResampleTypeFromString(const std::string &str); - - void Load(InferenceEngine::ICNNNetwork &network); - static cldnn::pooling_mode PoolingModeFromIEPooling(InferenceEngine::PoolingLayer::PoolType pt, bool excludePadding = false); - static cldnn::eltwise_mode EltwiseModeFromIEEltwise(InferenceEngine::EltwiseLayer::eOperation op); - static cldnn::prior_box_code_type PriorBoxCodeFromString(const std::string& str); - static cldnn::softmax::dimension_t SoftmaxDimensionFromIEAxis(const InferenceEngine::SoftMaxLayer* softmaxLayer); - cldnn::primitive_id CreatePrimitiveFromBlob(cldnn::topology& topology, - cldnn::primitive_id primID, - const InferenceEngine::Blob::Ptr pBlob, - const cldnn::layout& blobLayout, - size_t blobByteOffset = 0, - WeightRearrangeType rearrange = NO_REARRANGE); - void CreateWeightAndBiasPrimitives(cldnn::topology& topology, - const InferenceEngine::CNNLayerPtr& layer, - std::vector& weightsPrimID, - std::vector& biasesPrimID); - void CreateBinaryWeightAndBiasPrimitives(cldnn::topology& topology, - const InferenceEngine::CNNLayerPtr& layer, - std::vector& weightsPrimID, - std::vector& biasesPrimID); - void CreateScaleWeightsAndBiasesFromBN(cldnn::topology& topology, - const InferenceEngine::BatchNormalizationLayer* bnLayer, - cldnn::primitive_id& weightsPrimID, - cldnn::primitive_id& biasesPrimID); - void AddPreProcessPrimitive(InferenceEngine::InputInfo::Ptr inputInfo); - void AddInputPrimitive(cldnn::topology& topology, - InferenceEngine::InputInfo::Ptr inputInfo, InferenceEngine::Precision inputPrecision, const std::string inputName); - void AddOutputPrimitive(cldnn::topology& topology, - std::string outputName, const InferenceEngine::DataPtr outputData, - InferenceEngine::Precision outputPrecision = InferenceEngine::Precision::UNSPECIFIED); - void CreateSingleLayerPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr& layer); - bool IsValidSplitConvMerge(const InferenceEngine::SplitLayer* splitLayer) const; - bool CanProcessDynBatch(InferenceEngine::ICNNNetwork &network) const; - static std::vector GetNextLayers(const InferenceEngine::DataPtr data); - static std::vector GetNextLayers(const InferenceEngine::CNNLayerPtr layer); - static InferenceEngine::CNNLayerPtr GetNextSingleLayer(const InferenceEngine::DataPtr data); - static InferenceEngine::CNNLayerPtr GetNextSingleLayer(const InferenceEngine::CNNLayerPtr layer); - void AddSingleValuePrimitive(cldnn::topology& topology, cldnn::primitive_id valPrimID, cldnn::data_types dataType, float value); - - GenericBlobMap CreateGenericLayerBlobPrimitives(cldnn::topology& topology, const InferenceEngine::GenericLayer* layer); - static void ValidateGenericLayerBlobs(const InferenceEngine::GenericLayer* layer, const std::vector& blobNames); - static bool HasParam(const std::map& layerParams, std::string paramName) { - auto p = layerParams.find(paramName); - return p != layerParams.end(); + m_topology->add(prim); } - void changeInputBatch(int batch); - - // Layer Primitive Creators - void CreatePReLUPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateBatchNormalizationPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr & layer); - void CreateFlattenPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreatePermutePrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateReshapePrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateNormalizePrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateDetectionOutputPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreatePriorBoxPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateDeconvolutionPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateCropPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateROIPoolingPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateSimplerNMSPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateEltwisePrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateConcatenatePrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateSplitPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateFusedSplitConvMergePrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer, bool useGroups = true); - void CreatePowerPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateSoftMaxPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateLogSoftmaxPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateFullyConnectedPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreatePoolingPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateLRNPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateActivationPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer, const LayerType type); - void CreateConvolutionPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateDeformableConvolutionPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateScaleShiftPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateProposalPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreatePSROIPoolingPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateCopyPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateResamplePrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateInterpPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateInterpolatePrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateYOLO2RegionPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateYOLO2ReorgPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateArgMaxMinPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer, const LayerType type); - void CreateTopKPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateMaxUnpoolingPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateMVNPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateTilePrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreatePadPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateRegularLSTM(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateDynamicLSTM(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateRNNPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateLSTMCellPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void AddConstantBlobInput(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateCustomLayerPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer, CLDNNCustomLayerPtr customLayer); - void CreateGatherPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateDepthToSpacePrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateSpaceToDepthPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateBatchToSpacePrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateSpaceToBatchPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateShuffleChannelsPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateStridedSlicePrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateBroadcastPrimitive(cldnn::topology &topology, InferenceEngine::CNNLayerPtr &layer); - void CreateReverseSequencePrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateBinaryConvolutionPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateQuantizePrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateGemmPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateReducePrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateOneHotPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateGatherTreePrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateConvertPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateConvertLikePrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreatePyramidRoIAlignPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateNonMaxSuppressionPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); - void CreateSelectPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr& layer); - void CreateGRNPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr& layer); - void CreateCTCGreedyDecoderPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr& layer); - void CreatePriorBoxClusteredPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr& layer); - void CreateCumSumPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr& layer); - void CreateRoundPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr& layer); - void CreateEmbeddingBagPackedSumPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr& layer); - void CreateEmbeddingBagOffsetsSumPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr& layer); - void CreateEmbeddingSegmentsSumPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr& layer); - void CreateExtractImagePatchesPrimitive(cldnn::topology& topology, InferenceEngine::CNNLayerPtr &layer); +private: + static factories_map_t factories_map; + std::vector> m_programs; + std::shared_ptr m_engine; + Config m_config; + + std::shared_ptr m_topology; + InferenceEngine::InputsDataMap m_networkInputs; + InferenceEngine::OutputsDataMap m_networkOutputs; + + bool queryMode; + + void EnableQueryMode() { queryMode = true; } + void DisableQueryMode() { queryMode = false; } + + void PrepareBuild(InferenceEngine::InputsDataMap networkInputs, InferenceEngine::OutputsDataMap networkOutputs); + void CleanupBuild(); + std::shared_ptr BuildProgram(std::vector> ops, + InferenceEngine::InputsDataMap networkInputs, + InferenceEngine::OutputsDataMap networkOutputs); + + void CreateSingleLayerPrimitive(cldnn::topology& topology, const std::shared_ptr& op); + bool CanProcessDynBatch(std::vector> ops, InferenceEngine::InputsDataMap networkInputs) const; + void ChangeInputBatch(int batch); }; +void CreateCustomOp(Program& p, const std::shared_ptr& node, CLDNNCustomLayerPtr customLayer); +void CreateUnaryEltwiseOp(Program& p, const std::shared_ptr& node, + cldnn::activation_func func, cldnn::activation_additional_params params); +void CreateElementwiseOp(Program& p, const std::shared_ptr& node, cldnn::eltwise_mode mode); + +bool IsNodeOnConstPath(const std::shared_ptr& node); + } // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/cldnn_remote_context.h b/inference-engine/src/cldnn_engine/cldnn_remote_context.h index b5ff08184ede9f..0b52527a244829 100644 --- a/inference-engine/src/cldnn_engine/cldnn_remote_context.h +++ b/inference-engine/src/cldnn_engine/cldnn_remote_context.h @@ -28,7 +28,7 @@ namespace CLDNNPlugin { class CLDNNRemoteAllocator; -class CLDNNRemoteBlobImpl : public gpu::details::param_map_obj_getter { +class CLDNNRemoteBlobImpl : public InferenceEngine::gpu::details::param_map_obj_getter { friend class CLDNNRemoteAllocator; public: enum BlobType { @@ -40,24 +40,24 @@ class CLDNNRemoteBlobImpl : public gpu::details::param_map_obj_getter { BT_DX_BUF_SHARED, }; - explicit CLDNNRemoteBlobImpl(gpu::ClContext::Ptr context, - const cldnn::layout& layout, - cldnn::shared_handle mem, - cldnn::shared_surface surf, - uint32_t plane = 0, - BlobType mem_type = BT_BUF_INTERNAL); + explicit CLDNNRemoteBlobImpl(InferenceEngine::gpu::ClContext::Ptr context, + const cldnn::layout& layout, + cldnn::shared_handle mem, + cldnn::shared_surface surf, + uint32_t plane = 0, + BlobType mem_type = BT_BUF_INTERNAL); void allocate() noexcept; bool deallocate() noexcept; - ParamMap getParams() const; + InferenceEngine::ParamMap getParams() const; std::string getDeviceName() const noexcept; - std::shared_ptr getContext() const noexcept; - LockedMemory buffer() noexcept; - LockedMemory cbuffer() const noexcept; - LockedMemory rwmap()noexcept; - LockedMemory rmap() const noexcept; - LockedMemory wmap()noexcept; - const std::shared_ptr &getAllocator() const noexcept; + std::shared_ptr getContext() const noexcept; + InferenceEngine::LockedMemory buffer() noexcept; + InferenceEngine::LockedMemory cbuffer() const noexcept; + InferenceEngine::LockedMemory rwmap()noexcept; + InferenceEngine::LockedMemory rmap() const noexcept; + InferenceEngine::LockedMemory wmap()noexcept; + const std::shared_ptr &getAllocator() const noexcept; void *getHandle() const noexcept { return _handle; } bool is_allocated() const noexcept; @@ -67,7 +67,7 @@ class CLDNNRemoteBlobImpl : public gpu::details::param_map_obj_getter { protected: static CLDNNRemoteAllocator m_allocator; - std::weak_ptr m_context; + std::weak_ptr m_context; // constructor stuff cldnn::shared_handle m_mem; @@ -81,10 +81,10 @@ class CLDNNRemoteBlobImpl : public gpu::details::param_map_obj_getter { mutable std::unique_ptr> lockedHolder; mutable void* _handle; - mutable std::shared_ptr _allocator; + mutable std::shared_ptr _allocator; - void lock() const; - void unlock() const; + void lock() const; + void unlock() const; }; template @@ -92,45 +92,44 @@ class typedCLDNNRemoteBlob : public TpublicAPI { public: using Ptr = std::shared_ptr; - explicit typedCLDNNRemoteBlob(gpu::ClContext::Ptr context, - const TensorDesc& desc, - const cldnn::layout& layout, - cldnn::shared_handle mem, - cldnn::shared_surface surf, - uint32_t plane, - CLDNNRemoteBlobImpl::BlobType mem_type) - : _impl(context, layout, mem, - surf, - plane, mem_type), TpublicAPI(desc) {} + explicit typedCLDNNRemoteBlob(InferenceEngine::gpu::ClContext::Ptr context, + const InferenceEngine::TensorDesc& desc, + const cldnn::layout& layout, + cldnn::shared_handle mem, + cldnn::shared_surface surf, + uint32_t plane, + CLDNNRemoteBlobImpl::BlobType mem_type) + : _impl(context, layout, mem, surf, plane, mem_type) + , TpublicAPI(desc) {} void allocate() noexcept override { _impl.allocate(); } bool deallocate() noexcept override { return _impl.deallocate(); } - ParamMap getParams() const override { return _impl.getParams(); } + InferenceEngine::ParamMap getParams() const override { return _impl.getParams(); } std::string getDeviceName() const noexcept override { return _impl.getDeviceName(); } - std::shared_ptr getContext() const noexcept override { return _impl.getContext(); } - LockedMemory buffer() noexcept override { return _impl.buffer(); } - LockedMemory cbuffer() const noexcept override { return _impl.cbuffer(); } - LockedMemory rwmap() noexcept override { return _impl.rwmap(); } - LockedMemory rmap() const noexcept override { return _impl.rmap(); } - LockedMemory wmap()noexcept override { return _impl.wmap(); } + std::shared_ptr getContext() const noexcept override { return _impl.getContext(); } + InferenceEngine::LockedMemory buffer() noexcept override { return _impl.buffer(); } + InferenceEngine::LockedMemory cbuffer() const noexcept override { return _impl.cbuffer(); } + InferenceEngine::LockedMemory rwmap() noexcept override { return _impl.rwmap(); } + InferenceEngine::LockedMemory rmap() const noexcept override { return _impl.rmap(); } + InferenceEngine::LockedMemory wmap()noexcept override { return _impl.wmap(); } CLDNNRemoteBlobImpl* getImpl() { return &_impl; } protected: - const std::shared_ptr &getAllocator() const noexcept override { return _impl.getAllocator(); } + const std::shared_ptr &getAllocator() const noexcept override { return _impl.getAllocator(); } void *getHandle() const noexcept override { return _impl.getHandle(); } CLDNNRemoteBlobImpl _impl; }; -using CLDNNRemoteCLbuffer = typedCLDNNRemoteBlob; -using CLDNNRemoteCLImage2D = typedCLDNNRemoteBlob; +using CLDNNRemoteCLbuffer = typedCLDNNRemoteBlob; +using CLDNNRemoteCLImage2D = typedCLDNNRemoteBlob; #ifdef WIN32 -using CLDNNRemoteD3DBuffer = typedCLDNNRemoteBlob; -using CLDNNRemoteD3DSurface = typedCLDNNRemoteBlob; +using CLDNNRemoteD3DBuffer = typedCLDNNRemoteBlob; +using CLDNNRemoteD3DSurface = typedCLDNNRemoteBlob; #else -using CLDNNRemoteVASurface = typedCLDNNRemoteBlob; +using CLDNNRemoteVASurface = typedCLDNNRemoteBlob; #endif -inline CLDNNRemoteBlobImpl* getBlobImpl(gpu::ClBlob* blobPtr) { +inline CLDNNRemoteBlobImpl* getBlobImpl(InferenceEngine::gpu::ClBlob* blobPtr) { #ifdef WIN32 { auto ptr = blobPtr->as(); @@ -157,7 +156,7 @@ inline CLDNNRemoteBlobImpl* getBlobImpl(gpu::ClBlob* blobPtr) { return nullptr; } -class CLDNNRemoteAllocator : public IAllocator { +class CLDNNRemoteAllocator : public InferenceEngine::IAllocator { protected: friend class CLDNNRemoteBlobImpl; std::atomic_flag _lock; @@ -181,13 +180,13 @@ class CLDNNRemoteAllocator : public IAllocator { * @brief Maps handle to heap memory accessible by any memory manipulation routines. * @return Generic pointer to memory */ - void* lock(void* handle, LockOp = LOCK_FOR_WRITE) noexcept override { return nullptr; }; + void* lock(void* handle, InferenceEngine::LockOp = InferenceEngine::LOCK_FOR_WRITE) noexcept override { return nullptr; }; /** * @brief Unmaps memory by handle with multiple sequential mappings of the same handle. * The multiple sequential mappings of the same handle are suppose to get the same * result while there isn't a ref counter supported. */ - void unlock(void* handle) noexcept override; + void unlock(void* handle) noexcept override; /** * @brief Allocates memory * @param size The size in bytes to allocate @@ -198,12 +197,12 @@ class CLDNNRemoteAllocator : public IAllocator { * @brief Releases handle and all associated memory resources which invalidates the handle. * @return false if handle cannot be released, otherwise - true. */ - bool free(void* handle) noexcept override { return true; } + bool free(void* handle) noexcept override { return true; } void Release() noexcept override {} }; -class CLDNNExecutionContextImpl : public gpu::details::param_map_obj_getter { +class CLDNNExecutionContextImpl : public InferenceEngine::gpu::details::param_map_obj_getter { public: enum ContextType { OCL, @@ -213,17 +212,17 @@ class CLDNNExecutionContextImpl : public gpu::details::param_map_obj_getter { using Ptr = std::shared_ptr; using CPtr = std::shared_ptr; - explicit CLDNNExecutionContextImpl(std::shared_ptr plugin, - const ParamMap& params, - const Config& config = {}); + explicit CLDNNExecutionContextImpl(std::shared_ptr plugin, + const InferenceEngine::ParamMap& params, + const Config& config = {}); - ParamMap getParams() const; + InferenceEngine::ParamMap getParams() const; std::string getDeviceName() const noexcept; std::shared_ptr GetEngine() const { return m_engine; } Config& GetConfig() { return m_config; } ContextType GetType() const { return m_type; } - const std::weak_ptr GetPlugin() const { return m_plugin; } + const std::weak_ptr GetPlugin() const { return m_plugin; } void acquire_lock() { while (lock.test_and_set(std::memory_order_acquire)) {} @@ -235,11 +234,11 @@ class CLDNNExecutionContextImpl : public gpu::details::param_map_obj_getter { protected: std::shared_ptr m_engine; - gpu_handle_param m_va_display; + InferenceEngine::gpu_handle_param m_va_display; Config m_config; ContextType m_type; - std::weak_ptr m_plugin; + std::weak_ptr m_plugin; std::atomic_flag lock; }; @@ -263,18 +262,19 @@ class typedCLDNNExecutionContext : public TpublicContextAPI, #else using surf_key = _Key; #endif - std::map shared_surf_reg; - std::map shared_obj_reg; - - RemoteBlob::Ptr reuse_surf(const TensorDesc& tensorDesc, - const ParamMap& params) { - RemoteBlob::Ptr ret = nullptr; - uint32_t plane = gpu::details::param_map_obj_getter::_ObjFromParamSimple(params, GPU_PARAM_KEY(VA_PLANE)); + std::map shared_surf_reg; + std::map shared_obj_reg; + + InferenceEngine::RemoteBlob::Ptr reuse_surf(const InferenceEngine::TensorDesc& tensorDesc, const InferenceEngine::ParamMap& params) { + using namespace InferenceEngine; + using InferenceEngine::gpu::details::param_map_obj_getter; + InferenceEngine::RemoteBlob::Ptr ret = nullptr; + uint32_t plane = param_map_obj_getter::_ObjFromParamSimple(params, GPU_PARAM_KEY(VA_PLANE)); #ifdef WIN32 - cldnn::shared_handle mem = gpu::details::param_map_obj_getter::_ObjFromParamSimple(params, GPU_PARAM_KEY(DEV_OBJECT_HANDLE)); + cldnn::shared_handle mem = param_map_obj_getter::_ObjFromParamSimple(params, GPU_PARAM_KEY(DEV_OBJECT_HANDLE)); surf_key skey(mem, plane); #else - cldnn::shared_surface surf = gpu::details::param_map_obj_getter::_ObjFromParamSimple(params, GPU_PARAM_KEY(DEV_OBJECT_HANDLE)); + cldnn::shared_surface surf = param_map_obj_getter::_ObjFromParamSimple(params, GPU_PARAM_KEY(DEV_OBJECT_HANDLE)); surf_key skey(surf, plane); #endif _impl.acquire_lock(); @@ -289,7 +289,7 @@ class typedCLDNNExecutionContext : public TpublicContextAPI, ImageFormatFromLayout(tensorDesc.getLayout()), CldnnTensorFromIEDims(tensorDesc.getDims())); auto smart_this = - std::dynamic_pointer_cast + std::dynamic_pointer_cast (std::enable_shared_from_this>::shared_from_this()); #ifdef WIN32 ret = std::make_shared(smart_this, @@ -307,10 +307,10 @@ class typedCLDNNExecutionContext : public TpublicContextAPI, return ret; } - RemoteBlob::Ptr reuse_obj(const TensorDesc& tensorDesc, - cldnn::shared_handle mem, - CLDNNRemoteBlobImpl::BlobType blob_type) { - RemoteBlob::Ptr ret = nullptr; + InferenceEngine::RemoteBlob::Ptr reuse_obj(const InferenceEngine::TensorDesc& tensorDesc, + cldnn::shared_handle mem, + CLDNNRemoteBlobImpl::BlobType blob_type) { + InferenceEngine::RemoteBlob::Ptr ret = nullptr; _impl.acquire_lock(); @@ -321,26 +321,23 @@ class typedCLDNNExecutionContext : public TpublicContextAPI, } else { // unlickily, not found - create new and insert into registry cldnn::layout layout(DataTypeFromPrecision(tensorDesc.getPrecision()), - FormatFromLayout(tensorDesc.getLayout()), - CldnnTensorFromIEDims(tensorDesc.getDims())); + FormatFromLayout(tensorDesc.getLayout()), + CldnnTensorFromIEDims(tensorDesc.getDims())); auto smart_this = - std::dynamic_pointer_cast + std::dynamic_pointer_cast (std::enable_shared_from_this>::shared_from_this()); switch (blob_type) { case CLDNNRemoteBlobImpl::BlobType::BT_BUF_SHARED: - ret = std::make_shared(smart_this, - tensorDesc, layout, mem, 0, 0, blob_type); + ret = std::make_shared(smart_this, tensorDesc, layout, mem, 0, 0, blob_type); break; case CLDNNRemoteBlobImpl::BlobType::BT_IMG_SHARED: layout.format = ImageFormatFromLayout(tensorDesc.getLayout()); - ret = std::make_shared(smart_this, - tensorDesc, layout, mem, 0, 0, blob_type); + ret = std::make_shared(smart_this, tensorDesc, layout, mem, 0, 0, blob_type); break; #ifdef WIN32 case CLDNNRemoteBlobImpl::BlobType::BT_DX_BUF_SHARED: - ret = std::make_shared(smart_this, - tensorDesc, layout, mem, 0, 0, blob_type); + ret = std::make_shared(smart_this, tensorDesc, layout, mem, 0, 0, blob_type); break; #endif default: @@ -353,17 +350,17 @@ class typedCLDNNExecutionContext : public TpublicContextAPI, return ret; } - RemoteBlob::Ptr create_buffer(const TensorDesc& tensorDesc) { + InferenceEngine::RemoteBlob::Ptr create_buffer(const InferenceEngine::TensorDesc& tensorDesc) { cldnn::layout layout(DataTypeFromPrecision(tensorDesc.getPrecision()), - FormatFromLayout(tensorDesc.getLayout()), - CldnnTensorFromIEDims(tensorDesc.getDims())); - auto smart_this = std::dynamic_pointer_cast + FormatFromLayout(tensorDesc.getLayout()), + CldnnTensorFromIEDims(tensorDesc.getDims())); + auto smart_this = std::dynamic_pointer_cast (std::enable_shared_from_this>::shared_from_this()); return std::make_shared(smart_this, - tensorDesc, - layout, - nullptr, 0, 0, - CLDNNRemoteBlobImpl::BlobType::BT_BUF_INTERNAL); + tensorDesc, + layout, + nullptr, 0, 0, + CLDNNRemoteBlobImpl::BlobType::BT_BUF_INTERNAL); } void check_if_shared() { @@ -374,21 +371,23 @@ class typedCLDNNExecutionContext : public TpublicContextAPI, using Ptr = std::shared_ptr; using CPtr = std::shared_ptr; - explicit typedCLDNNExecutionContext(std::shared_ptr plugin, - const ParamMap& params, - const Config& config = {}) + explicit typedCLDNNExecutionContext(std::shared_ptr plugin, + const InferenceEngine::ParamMap& params, + const Config& config = {}) : _impl(plugin, params, config) {} - ParamMap getParams() const noexcept override { return _impl.getParams(); } + InferenceEngine::ParamMap getParams() const noexcept override { return _impl.getParams(); } std::string getDeviceName() const noexcept override { return _impl.getDeviceName(); } - RemoteBlob::Ptr CreateBlob(const TensorDesc& tensorDesc, const ParamMap& params = {}) override { + InferenceEngine::RemoteBlob::Ptr CreateBlob(const InferenceEngine::TensorDesc& tensorDesc, const InferenceEngine::ParamMap& params = {}) override { + using namespace InferenceEngine; + using InferenceEngine::gpu::details::param_map_obj_getter; if (params.empty()) { // user wants clDNN to allocate blob by itself and return handle return create_buffer(tensorDesc); } else { // user will supply shared object handle - std::string memTypeStr = gpu::details::param_map_obj_getter::_StrFromParams(params, GPU_PARAM_KEY(SHARED_MEM_TYPE)); + std::string memTypeStr = param_map_obj_getter::_StrFromParams(params, GPU_PARAM_KEY(SHARED_MEM_TYPE)); if (GPU_PARAM_VALUE(VA_SURFACE) == memTypeStr) { check_if_shared(); @@ -399,14 +398,14 @@ class typedCLDNNExecutionContext : public TpublicContextAPI, if (GPU_PARAM_VALUE(OCL_BUFFER) == memTypeStr) { blob_type = CLDNNRemoteBlobImpl::BlobType::BT_BUF_SHARED; - mem = gpu::details::param_map_obj_getter::_ObjFromParamSimple(params, GPU_PARAM_KEY(MEM_HANDLE)); + mem = param_map_obj_getter::_ObjFromParamSimple(params, GPU_PARAM_KEY(MEM_HANDLE)); } else if (GPU_PARAM_VALUE(OCL_IMAGE2D) == memTypeStr) { blob_type = CLDNNRemoteBlobImpl::BlobType::BT_IMG_SHARED; - mem = gpu::details::param_map_obj_getter::_ObjFromParamSimple(params, GPU_PARAM_KEY(MEM_HANDLE)); + mem = param_map_obj_getter::_ObjFromParamSimple(params, GPU_PARAM_KEY(MEM_HANDLE)); #ifdef WIN32 } else if (GPU_PARAM_VALUE(DX_BUFFER) == memTypeStr) { blob_type = CLDNNRemoteBlobImpl::BlobType::BT_DX_BUF_SHARED; - mem = gpu::details::param_map_obj_getter::_ObjFromParamSimple(params, GPU_PARAM_KEY(DEV_OBJECT_HANDLE)); + mem = param_map_obj_getter::_ObjFromParamSimple(params, GPU_PARAM_KEY(DEV_OBJECT_HANDLE)); check_if_shared(); #endif } else { @@ -426,14 +425,14 @@ class typedCLDNNExecutionContext : public TpublicContextAPI, CLDNNExecutionContextImpl _impl; }; -using CLDNNRemoteCLContext = typedCLDNNExecutionContext; +using CLDNNRemoteCLContext = typedCLDNNExecutionContext; #ifdef WIN32 -using CLDNNRemoteD3DContext = typedCLDNNExecutionContext; +using CLDNNRemoteD3DContext = typedCLDNNExecutionContext; #else -using CLDNNRemoteVAContext = typedCLDNNExecutionContext; +using CLDNNRemoteVAContext = typedCLDNNExecutionContext; #endif -inline CLDNNExecutionContextImpl* getContextImpl(gpu::ClContext::Ptr ctxPtr) { +inline CLDNNExecutionContextImpl* getContextImpl(InferenceEngine::gpu::ClContext::Ptr ctxPtr) { #ifdef WIN32 { auto ptr = ctxPtr->as(); diff --git a/inference-engine/src/cldnn_engine/debug_options.cpp b/inference-engine/src/cldnn_engine/debug_options.cpp deleted file mode 100644 index 4da91c8a6a7a2f..00000000000000 --- a/inference-engine/src/cldnn_engine/debug_options.cpp +++ /dev/null @@ -1,326 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include -#include -#ifndef NDEBUG - #include - #include -#endif - -#include "debug_options.h" - -namespace CLDNNPlugin { - -DebugOptions::DebugOptions() { - m_bDebugLayerContent = -#ifdef _DEBUG_LAYER_CONTENT - true; -#else - false; -#endif - - m_bDebugLayerContentIndexed = -#ifdef _DEBUG_LAYER_CONTENT_INDEXED - true; -#else - false; -#endif - - m_bDebugLayerFormat = -#ifdef _DEBUG_LAYER_FORMAT - true; -#else - false; -#endif - - m_bPluginPerfPrints = -#ifdef _PLUGIN_PERF_PRINTS - true; -#else - false; -#endif - - m_maxPrintSize = -#ifdef _DEBUG_LAYER_CONTENT_FULL - 1000000000; -#else - 3; -#endif -} - -void DebugOptions::PrintOptions() const { -#ifndef NDEBUG - std::cout << "Debug Options:" << std::endl; - std::cout << "\tDebug Layer Content: " << m_bDebugLayerContent << std::endl; - std::cout << "\tDebug Layer Content Indexed: " << m_bDebugLayerContentIndexed << std::endl; - std::cout << "\tDebug Layers Format: " << m_bDebugLayerFormat << std::endl; - std::cout << "\tPlugin Performance Prints: " << m_bPluginPerfPrints << std::endl; - std::cout << "\tPrint Size: " << m_maxPrintSize << std::endl; -#endif // NDEBUG -} - -std::string DebugOptions::GetFormatName(cldnn::format::type format) { - switch (format) { - case cldnn::format::yxfb: - return "yxfb"; - case cldnn::format::byxf: - return "byxf"; - case cldnn::format::bfyx: - return "bfyx"; - case cldnn::format::fyxb: - return "fyxb"; - default: - return "Unknown Format"; - } -} - -std::string DebugOptions::GetDataTypeName(cldnn::data_types dataType) { - switch (dataType) { - case cldnn::data_types::f16: - return "f16"; - case cldnn::data_types::f32: - return "f32"; - default: - return "Unknown Data Type"; - } -} - -void DebugOptions::PrintInput(const InferenceEngine::TBlob& input) const { -#ifndef NDEBUG - const float* inputBlobPtr = input.readOnly(); - - if (m_bDebugLayerContent) { - std::cout << "Input (" << input.size() << ") = "; - for (size_t i = 0; i < std::min(m_maxPrintSize, input.size()); i++) { - std::cout << inputBlobPtr[i] << ", "; - } - std::cout << std::endl; - } -#endif // NDEBUG -} - -float DebugOptions::SimpleConvertFP16toFP32(uint16_t u16val) { -#ifndef NDEBUG - // convert to fp32 (1,5,10)->(1,8,23) - // trivial conversion not handling inf/denorm - uint32_t sign = (u16val & 0x8000U) << 16; - uint32_t mantissa = (u16val & 0x3FFU) << 13; - uint32_t exp_val_f16 = (u16val & 0x7C00U) >> 10; - uint32_t exp = (exp_val_f16 == 0x1FU ? 0xFFU : exp_val_f16 + 127 - 15) << 23;; - uint32_t val = sign | exp | mantissa; - float fval = *(reinterpret_cast(&val)); - return (fabs(fval) < 1e-4f) ? 0.0f : fval; // clamp epsilon fp16 to 0 -#endif // NDEBUG - return 0; -} -void DebugOptions::PrintIndexedValue(const cldnn::memory& mem, const cldnn::tensor index) const { -#ifndef NDEBUG - auto layout = mem.get_layout(); - float fval; - switch (layout.data_type) { - case cldnn::data_types::f32: { - auto p32 = mem.pointer(); - auto resPtrF32 = p32.data(); - fval = resPtrF32[CalcLinearIndex(layout, index)]; - } - break; - case cldnn::data_types::f16: - { - auto p16 = mem.pointer(); - auto resPtrU16 = p16.data(); - fval = SimpleConvertFP16toFP32(resPtrU16[CalcLinearIndex(layout, index)]); - } - break; - default: - assert(0); // unhandled data type - fval = 0.0f; - } - - if (m_bDebugLayerContentIndexed) { - std::cout << "\t["; - for (size_t i = 0; i < index.raw.size(); i++) { - std::cout << index.raw[i] << ","; - } - std::cout << "] = " << fval << "\n"; - } else { - std::cout << fval << ", "; - } -#endif // NDEBUG -} - -uint32_t DebugOptions::CalcLinearIndex(const cldnn::layout& memLayout, const cldnn::tensor index) { -#ifndef NDEBUG - uint32_t bPitch, fPitch, xPitch, yPitch; - switch (memLayout.format) { - case cldnn::format::yxfb: - bPitch = 1; - fPitch = memLayout.size.batch[0] * bPitch; - xPitch = memLayout.size.feature[0] * fPitch; - yPitch = memLayout.size.spatial[1] * xPitch; - return (index.batch[0] * bPitch) - + (index.feature[0] * fPitch) - + (index.spatial[1] * xPitch) - + (index.spatial[0] * yPitch); - break; - case cldnn::format::bfyx: - xPitch = 1; - yPitch = memLayout.size.spatial[1] * xPitch; - fPitch = memLayout.size.spatial[0] * yPitch; - bPitch = memLayout.size.feature[0] * fPitch; - return (index.batch[0] * bPitch) - + (index.feature[0] * fPitch) - + (index.spatial[1] * xPitch) - + (index.spatial[0] * yPitch); - break; - default: - assert(0); - return 0; - } -#endif // NDEBUG - return 0; -} - -void DebugOptions::PrintNetworkOutputs(std::map& outputsMap) const { -#ifndef NDEBUG - if (!m_bDebugLayerContent && !m_bDebugLayerFormat) { - return; - } - - for (auto& layer : outputsMap) { - std::cout << layer.first << ":\n"; - auto mem = layer.second.get_memory(); - auto layout = mem.get_layout(); - if (m_bDebugLayerFormat) { - std::string formatName = GetFormatName(layout.format); - std::string datatypeName = GetDataTypeName(layout.data_type); - std::cout << " Layout: ( " << - GetDataTypeName(layout.data_type) << ", " << - GetFormatName(layout.format) << ", ["; - for (auto s : layout.size.sizes()) { - std::cout << s << ","; - } - std::cout << "] )\n"; - } - if (m_bDebugLayerContent) { - DumpSingleOutput(layer.first, outputsMap); - std::cout << "\n"; - } - } -#endif // NDEBUG -} - -void DebugOptions::DumpSingleOutput(cldnn::primitive_id name, std::map& outputs, bool bSingleFeatureMap) const { -#ifndef NDEBUG - if (outputs.find(name) == outputs.end()) { - std::cout << "Couldn't find output: " << name << std::endl; - return; - } - - auto output = outputs.at(name); - std::cout << name << ":\n"; - auto mem = output.get_memory(); - auto layout = mem.get_layout(); - cldnn::tensor lowerPad = layout.data_padding.lower_size(); - cldnn::tensor upperPad = layout.data_padding.upper_size(); - { // format - std::string formatName = GetFormatName(layout.format); - std::string datatypeName = GetDataTypeName(layout.data_type); - std::cout << " Layout: ( " << - GetDataTypeName(layout.data_type) << ", " << - GetFormatName(layout.format) << ", ["; - for (auto s : layout.size.sizes()) { - std::cout << s << ","; - } - std::cout << "] ["; - for (auto p : layout.data_padding.lower_size().sizes()) { - std::cout << p << ","; - } - std::cout << "] ["; - for (auto p : layout.data_padding.upper_size().sizes()) { - std::cout << p << ","; - } - std::cout << "] )\n"; - } - { // content - switch (layout.format) { - case cldnn::format::bfyx: - { - std::vector pitches; - size_t elements = 1; - if (bSingleFeatureMap) { - elements = layout.size.spatial[1] * layout.size.spatial[0]; - } else { - for (int i = 0; i < 4; i++) { - elements *= layout.size.sizes()[i] + lowerPad.sizes()[i] + upperPad.sizes()[i]; - } - } - pitches.push_back(layout.size.spatial[0] + lowerPad.spatial[0] + upperPad.spatial[0]); // x or width - rowpitch - pitches.push_back(pitches[0] * (layout.size.spatial[1] + lowerPad.spatial[1] + upperPad.spatial[1])); // slice pitch - pitches.push_back(pitches[0] * pitches[1] * layout.size.feature[0]); // depth/feature pitch - if (layout.data_type == cldnn::data_types::f32) - DumpElementsRaw(mem, pitches, elements); - else - DumpElementsRaw(mem, pitches, elements); - break; - } - default: - assert(0); // unhandled format - return; - } - std::cout << "\n"; - } -#endif // NDEBUG -} - -void DebugOptions::AddTimedEvent(std::string eventName, std::string startingAt) { -#ifdef _PLUGIN_PERF_PRINTS - m_TimedEventTimestamp[eventName] = std::chrono::steady_clock::now(); - if (startingAt.compare(std::string()) == 0) { - startingAt = eventName; - } - m_TimedEventStart[eventName] = startingAt; -#endif // _PLUGIN_PERF_PRINTS -} - -void DebugOptions::PrintTimedEvents() { -#ifdef _PLUGIN_PERF_PRINTS - for (auto& e : m_TimedEventStart) { - if (e.first.compare(e.second)) { - std::cout << "[Plugin Internal Metric]: \t" << e.first << " took: " << - std::chrono::duration_cast> - (m_TimedEventTimestamp[e.first] - m_TimedEventTimestamp[e.second]).count() << " ms\n"; - } - } -#endif // _PLUGIN_PERF_PRINTS -} - -void DebugOptions::ClearTimedEvents() { -#ifdef _PLUGIN_PERF_PRINTS - m_TimedEventStart.clear(); - m_TimedEventTimestamp.clear(); -#endif // _PLUGIN_PERF_PRINTS -} - -void DebugOptions::EnableWA(std::string name) { -#ifndef NDEBUG - m_workaroundNames.insert(name); -#endif // NDEBUG -} - -void DebugOptions::DisableWA(std::string name) { -#ifndef NDEBUG - m_workaroundNames.erase(name); -#endif // NDEBUG -} - -bool DebugOptions::IsWAActive(std::string name) { -#ifndef NDEBUG - return (m_workaroundNames.find(name) != m_workaroundNames.end()); -#else - return false; -#endif // NDEBUG -} - -}; // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/debug_options.h b/inference-engine/src/cldnn_engine/debug_options.h deleted file mode 100644 index 0ed6f1397e2d83..00000000000000 --- a/inference-engine/src/cldnn_engine/debug_options.h +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#pragma once - -#include -#include -#include -#include -#include -#include -#include -#include "cpp/ie_cnn_network.h" -#include -#include -#include - -// Debugging options flags -// #define _DEBUG_LAYER_CONTENT -// #define _DEBUG_LAYER_CONTENT_FULL -// #define _DEBUG_LAYER_FORMAT -// #define _PLUGIN_PERF_PRINTS - -namespace CLDNNPlugin { - -class DebugOptions { -public: - bool m_bDebugLayerContent; - bool m_bDebugLayerContentIndexed; - bool m_bDebugLayerFormat; - bool m_bPluginPerfPrints; - cldnn::tensor::value_type m_maxPrintSize; - - DebugOptions(); - void PrintOptions() const; - static std::string GetFormatName(cldnn::format::type format); - static std::string GetDataTypeName(cldnn::data_types dataType); - void PrintInput(const InferenceEngine::TBlob& input) const; - void PrintIndexedValue(const cldnn::memory& mem, const cldnn::tensor index) const; - static uint32_t CalcLinearIndex(const cldnn::layout& memLayout, const cldnn::tensor index); - - void PrintNetworkOutputs(std::map& outputsMap) const; - void DumpSingleOutput(cldnn::primitive_id name, std::map& outputs, bool bSingleFeatureMap = false)const; - - // the functions below will work in release unlike the rest - void AddTimedEvent(std::string eventName, std::string startingAt = std::string()); - void PrintTimedEvents(); - void ClearTimedEvents(); - - void EnableWA(std::string name); - void DisableWA(std::string name); - bool IsWAActive(std::string name); - -protected: - std::map m_TimedEventTimestamp; - std::map m_TimedEventStart; - std::set m_workaroundNames; - - static float SimpleConvertFP16toFP32(uint16_t u16val); - - template - static void DumpElementsRaw(cldnn::memory& mem, const std::vector& pitches, size_t numElements) { -#ifndef NDEBUG - auto layout = mem.get_layout(); - auto ptr = mem.pointer(); - auto data = ptr.data(); // +offset; - auto elements = std::min(layout.count(), numElements); - for (size_t i = 0; i < elements;) { - // size_t linearAddress = ... // todo calc linear with pitches - std::cout << std::setprecision(10) - << ((layout.data_type == cldnn::data_types::f32) ? data[i] : cldnn::half_to_float(uint16_t(data[i]))) - << ", "; - i++; - for (auto& pitch : pitches) { - if ((i % pitch) == 0) { - std::cout << std::endl; - } - } - } -#endif // NDEBUG - } -}; - -}; // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/batch_to_space.cpp b/inference-engine/src/cldnn_engine/ops/batch_to_space.cpp new file mode 100644 index 00000000000000..16db80ff398e2a --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/batch_to_space.cpp @@ -0,0 +1,53 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/batch_to_space.hpp" +#include "ngraph/op/constant.hpp" + +#include "api/batch_to_space.hpp" + +namespace CLDNNPlugin { + +void CreateBatchToSpaceOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {4}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + auto rank = op->get_input_shape(0).size(); + auto format = DefaultFormatForDims(rank); + + std::vector inputs; + inputs.reserve(3); + + for (size_t i = 1; i < 4; ++i) { + auto inConst = std::dynamic_pointer_cast(op->get_input_node_shared_ptr(i)); + if (!inConst) + THROW_IE_EXCEPTION << "Unsupported parameter nodes type in " << op->get_friendly_name() << " (" << op->get_type_name() << ")"; + + std::vector sizes = inConst->cast_vector(); + int32_t default_size = i == 1 ? 1 : 0; + for (size_t s = sizes.size(); s < rank; s++) { + sizes.push_back(default_size); + } + inputs.emplace_back(format, sizes, default_size); + } + auto out_size = CldnnTensorFromIEDims(op->get_output_shape(0)); + + auto batchToSpacePrim = cldnn::batch_to_space(layerName, + inputPrimitives[0], // input + inputs[0], // block_shape + inputs[1], // crops_begin + inputs[2], // crops_end + out_size); + + p.AddPrimitive(batchToSpacePrim); + p.AddPrimitiveToProfiler(op); +} + +REGISTER_FACTORY_IMPL(v1, BatchToSpace); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/broadcast.cpp b/inference-engine/src/cldnn_engine/ops/broadcast.cpp new file mode 100644 index 00000000000000..e412e8c2103b9a --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/broadcast.cpp @@ -0,0 +1,107 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/broadcast.hpp" +#include "ngraph/op/constant.hpp" + +#include "api/broadcast.hpp" +#include "api/reorder.hpp" +#include "api/reshape.hpp" + +namespace CLDNNPlugin { + +static void CreateCommonBroadcastOp(Program& p, const std::shared_ptr& op, const ngraph::AxisSet axis_mapping) { + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + auto inputShape = op->get_input_shape(0); + auto outputShape = op->get_output_shape(0); + auto inputRank = inputShape.size(); + auto outputRank = outputShape.size(); + + auto inputPrimitive = inputPrimitives[0]; + + if (inputRank != outputRank) { + // Add reorder if changing number of dimensions requires changing format + auto targetFormat = DefaultFormatForDims(outputRank); + if (targetFormat.value != DefaultFormatForDims(inputRank).value) { + auto reorderName = layerName + "_cldnn_in_reorder"; + auto targetDatatype = DataTypeFromPrecision(op->get_input_element_type(0)); + auto reorderPrim = cldnn::reorder(reorderName, inputPrimitive, targetFormat, targetDatatype); + + p.AddPrimitive(reorderPrim); + p.AddInnerPrimitiveToProfiler(reorderName, layerName, op); + + inputPrimitive = reorderName; + } + + auto reshapeName = layerName + "_cldnn_in_reshape"; + + // Extend input dimensions with ones + if (axis_mapping.empty()) { + // If axis_mapping is not specified, then we prepend shape with neccesary count of 1-s + inputShape.insert(inputShape.begin(), outputRank - inputRank, 1ul); + } else { + // If axis_mapping is specified, then ones are inserted according to it. + ngraph::Shape tmp_shape; + int prev_axis = -1; + int next_axis = -1; + size_t currentRank = 0; + for (auto& axis : axis_mapping) { + prev_axis = next_axis; + next_axis = static_cast(axis); + + int ones_count = std::max(next_axis - prev_axis - 1, 0); + tmp_shape.insert(tmp_shape.begin() + currentRank, ones_count, 1ul); + tmp_shape.push_back(outputShape[axis]); + + currentRank += ones_count + 1; + } + inputShape = tmp_shape; + } + + auto targetShape = CldnnTensorFromIEDims(inputShape); + + auto reshapePrim = cldnn::reshape(reshapeName, inputPrimitive, targetShape); + p.AddPrimitive(reshapePrim); + p.AddInnerPrimitiveToProfiler(reshapeName, layerName, op); + + inputPrimitive = reshapeName; + } + + auto broadcastPrim = cldnn::broadcast(layerName, + inputPrimitive, + CldnnTensorFromIEDims(op->get_output_shape(0))); + + p.AddPrimitive(broadcastPrim); + p.AddPrimitiveToProfiler(op); +} + +void CreateBroadcastOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {2, 3}); + if (op->get_broadcast_spec().m_type == ngraph::op::AutoBroadcastType::NONE && op->get_input_size() == 3) { + auto axis_mapping_node = std::dynamic_pointer_cast(op->get_input_node_shared_ptr(2)); + if (!axis_mapping_node) + THROW_IE_EXCEPTION << "Unsupported parameter nodes type in " << op->get_friendly_name() << " (" << op->get_type_name() << ")"; + + auto axis_mapping = axis_mapping_node->get_axis_set_val(); + CreateCommonBroadcastOp(p, op, axis_mapping); + } else { + // TODO: check if axis_mapping is not needed in these cases and prepending input shape with ones works fine in all cases + CreateCommonBroadcastOp(p, op, {}); + } +} + +void CreateBroadcastOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {2, 3}); + CreateCommonBroadcastOp(p, op, op->get_broadcast_axes().second); +} + +REGISTER_FACTORY_IMPL(v1, Broadcast); +REGISTER_FACTORY_IMPL(v3, Broadcast); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/concat.cpp b/inference-engine/src/cldnn_engine/ops/concat.cpp new file mode 100644 index 00000000000000..0f0a19de37f675 --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/concat.cpp @@ -0,0 +1,56 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/concat.hpp" + +#include "api/concatenation.hpp" + +namespace CLDNNPlugin { + +static cldnn::concatenation::concatenation_axis GetConcatAxis(int32_t axis, size_t rank) { + if (axis >= rank) + THROW_IE_EXCEPTION << "Concatenation axis exceeds number of dimensions"; + + // Difference in dimension ordering between IE and clDNN, + // reverse spatial dimensions after batch and feature. + unsigned cldnn_axis = axis; + if (axis >= 2) { + auto spatial_axis = axis - 2; + // Default and minimum number of dimensions is 4 + auto spatial_size = std::max(rank, 4) - 2; + cldnn_axis = spatial_size - spatial_axis - 1 + 2; + } + + switch (cldnn_axis) { + case 0: return cldnn::concatenation::concatenation_axis::along_b; + case 1: return cldnn::concatenation::concatenation_axis::along_f; + case 2: return cldnn::concatenation::concatenation_axis::along_x; + case 3: return cldnn::concatenation::concatenation_axis::along_y; + case 4: return cldnn::concatenation::concatenation_axis::along_z; + case 5: return cldnn::concatenation::concatenation_axis::along_w; + default: THROW_IE_EXCEPTION << "Unsupported concatenation axis: " << axis; + } + + return cldnn::concatenation::concatenation_axis::along_f; // shouldn't get here +} + +void CreateConcatOp(Program& p, const std::shared_ptr& op) { + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + auto concatPrim = cldnn::concatenation( + layerName, + inputPrimitives, + GetConcatAxis(op->get_axis(), op->get_input_shape(0).size()), + DataTypeFromPrecision(op->get_output_element_type(0))); + + p.AddPrimitive(concatPrim); + p.AddPrimitiveToProfiler(op); +} + +REGISTER_FACTORY_IMPL(v0, Concat); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/constant.cpp b/inference-engine/src/cldnn_engine/ops/constant.cpp new file mode 100644 index 00000000000000..51457f9ed6036d --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/constant.cpp @@ -0,0 +1,190 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/constant.hpp" +#include "ngraph/op/convolution.hpp" +#include "ngraph/op/binary_convolution.hpp" +#include "ngraph/op/deformable_convolution.hpp" +#include "ngraph/op/group_conv.hpp" +#include "ngraph/op/concat.hpp" +#include "ngraph/op/squared_difference.hpp" +#include "ngraph/op/gather.hpp" +#include "ngraph/op/split.hpp" +#include "ngraph/op/variadic_split.hpp" +#include "ngraph/op/util/op_types.hpp" + +#include "api/data.hpp" + +namespace CLDNNPlugin { + +struct ConstProperties { + bool isWeights; + bool hasGroupDimension; + bool reversedChannelsOrder; +}; + +static ConstProperties getConstProperties(const std::shared_ptr& op) { + for (size_t i = 0; i < op->get_output_size(); i++) { + auto outTensors = op->get_output_target_inputs(i); + for (auto& t : outTensors) { + auto outOp = t.get_node(); + if (dynamic_cast(outOp)) { + return {true, false, false}; + } else if (dynamic_cast(outOp)) { + return {true, false, false}; + } else if (auto castedOp = dynamic_cast(outOp)) { + return {true, castedOp->get_group() > 1, false}; + } else if (dynamic_cast(outOp)) { + return {true, true, false}; + } else if (dynamic_cast(outOp)) { + return {true, false, true}; + } else if (dynamic_cast(outOp)) { + return {true, true, true}; + } + } + } + return {false, false, false}; +} + +void CreateConstantOp(Program& p, const std::shared_ptr& op) { + auto constDims = op->get_shape(); + cldnn::tensor constTensor; + switch (constDims.size()) { + case 6: constTensor = cldnn::tensor(TensorValue(constDims[0]), TensorValue(constDims[1]), + TensorValue(constDims[5]), TensorValue(constDims[4]), + TensorValue(constDims[3]), TensorValue(constDims[2])); + break; + case 5: constTensor = cldnn::tensor(TensorValue(constDims[0]), TensorValue(constDims[1]), + TensorValue(constDims[4]), TensorValue(constDims[3]), TensorValue(constDims[2])); + break; + case 4: constTensor = cldnn::tensor(TensorValue(constDims[0]), TensorValue(constDims[1]), + TensorValue(constDims[3]), TensorValue(constDims[2])); + break; + case 3: constTensor = cldnn::tensor(TensorValue(constDims[0]), TensorValue(constDims[1]), + 1, TensorValue(constDims[2])); + break; + case 2: constTensor = cldnn::tensor(TensorValue(constDims[0]), TensorValue(constDims[1]), 1, 1); + break; + case 1: constTensor = cldnn::tensor(1, TensorValue(constDims[0]), 1, 1); + break; + case 0: constTensor = cldnn::tensor(1, 1, 1, 1); + break; + default: THROW_IE_EXCEPTION << "Invalid constant blob dimensions"; + } + + // WA to inconsistency between input and const 1d tensors + // For Concat along batch we go with batch interpretation + // For Gather input we go with batch interpretation + bool needsBatchInterpretation = false; + if (constDims.size() == 1) { + for (size_t i = 0; i < op->get_output_size(); i++) { + auto outTensors = op->get_output_target_inputs(i); + + for (auto& t : outTensors) { + auto outOp = t.get_node(); + if (auto castedOp = dynamic_cast(outOp)) { + if (castedOp->get_axis() == 0) { + needsBatchInterpretation = true; + break; + } + } else if (ngraph::op::is_binary_elementwise_arithmetic(outOp) || + ngraph::op::is_binary_elementwise_logical(outOp) || + ngraph::is_type(outOp)) { + bool all_inputs_1d = true; + for (size_t j = 0; j < outOp->get_input_size(); j++) { + auto& in_shape = outOp->get_input_shape(j); + if (in_shape.size() != 1) + all_inputs_1d = false; + } + needsBatchInterpretation = all_inputs_1d; + break; + } else if (ngraph::is_type(outOp) || + ngraph::is_type(outOp) || + ngraph::is_type(outOp)) { + needsBatchInterpretation = true; + break; + } + } + } + } + + if (needsBatchInterpretation) { + constTensor.batch[0] = constTensor.count(); + constTensor.feature[0] = 1; + } + + auto constFormat = DefaultFormatForDims(op->get_output_shape(0).size()); + auto prop = getConstProperties(op); + if (prop.isWeights) { + // Deconvolution has reversed channels order (io instead of oi) + if (prop.reversedChannelsOrder) { + if (prop.hasGroupDimension) { + switch (op->get_output_shape(0).size()) { + case 5: constFormat = cldnn::format::gioyx; break; + case 6: constFormat = cldnn::format::giozyx; break; + } + } else { + switch (op->get_output_shape(0).size()) { + case 4: constFormat = cldnn::format::ioyx; break; + case 5: constFormat = cldnn::format::iozyx; break; + } + } + } else { + if (prop.hasGroupDimension) { + switch (op->get_output_shape(0).size()) { + case 5: constFormat = cldnn::format::goiyx; break; + case 6: constFormat = cldnn::format::goizyx; break; + } + } else { + switch (op->get_output_shape(0).size()) { + case 4: constFormat = cldnn::format::oiyx; break; + case 5: constFormat = cldnn::format::oizyx; break; + } + } + } + std::vector dims(constDims.begin(), constDims.end()); + for (size_t i = dims.size(); i < 4; i++) { + dims.push_back(1); + } + constTensor = cldnn::tensor(constFormat, dims); + } + + // If constDims has a dimension = 0, then create tensor with single value + // TODO: check if dim=0 is a valid case + if (std::accumulate(constDims.begin(), constDims.end(), 1, std::multiplies()) == 0) + constTensor = cldnn::tensor{1}; + + cldnn::layout constLayout = cldnn::layout(DataTypeFromPrecision(op->get_output_element_type(0)), + constFormat, + constTensor); + + cldnn::primitive_id initialconstPrimID = layer_type_name_ID(op); + cldnn::primitive_id constPrimID; + auto data = op->get_data_ptr(); + + auto bufIter = p.blobMemCache.find(data); + + if (bufIter != p.blobMemCache.end()) { + constPrimID = bufIter->second; + } else { + auto mem = cldnn::memory::allocate(p.GetEngine(), constLayout, 0, false); + auto tmpPointer = mem.pointer(); // implicitly maps buffer - unmap in destructor + auto buf = tmpPointer.data(); + auto bufSize = constLayout.bytes_count(); + + std::memcpy(&buf[0], &data[0], bufSize); + p.AddPrimitive(cldnn::data(initialconstPrimID, mem)); + p.blobMemCache[data] = initialconstPrimID; + constPrimID = initialconstPrimID; + } + + p.AddPrimitiveToProfiler(op, constPrimID); +} + +REGISTER_FACTORY_IMPL(v0, Constant); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/convert.cpp b/inference-engine/src/cldnn_engine/ops/convert.cpp new file mode 100644 index 00000000000000..43a72d6a589d12 --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/convert.cpp @@ -0,0 +1,44 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/convert.hpp" +#include "ngraph/op/convert_like.hpp" + +#include "api/reorder.hpp" + +namespace CLDNNPlugin { + +void CreateConvertLikeOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {2}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + auto outDataType = DataTypeFromPrecision(op->get_input_element_type(1)); + + auto reorderPrim = cldnn::reorder(layerName, inputPrimitives[0], cldnn::format::any, outDataType); + + p.AddPrimitive(reorderPrim); + p.AddPrimitiveToProfiler(op); +} + +void CreateConvertOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {1}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + auto outDataType = DataTypeFromPrecision(op->get_destination_type()); + + auto reorderPrim = cldnn::reorder(layerName, inputPrimitives[0], cldnn::format::any, outDataType); + + p.AddPrimitive(reorderPrim); + p.AddPrimitiveToProfiler(op); +} + +REGISTER_FACTORY_IMPL(v0, Convert); +REGISTER_FACTORY_IMPL(v1, ConvertLike); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/convolution.cpp b/inference-engine/src/cldnn_engine/ops/convolution.cpp new file mode 100644 index 00000000000000..c0dec0461cf167 --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/convolution.cpp @@ -0,0 +1,326 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/convolution.hpp" +#include "ngraph/op/binary_convolution.hpp" +#include "ngraph/op/deformable_convolution.hpp" +#include "ngraph/op/group_conv.hpp" +#include "ngraph/op/constant.hpp" +#include "ngraph/op/fake_quantize.hpp" +#include "ngraph/op/util/op_types.hpp" + +#include "api/convolution.hpp" +#include "api/deconvolution.hpp" +#include "api/binary_convolution.hpp" +#include "api/reshape.hpp" +#include "api/reorder.hpp" + +namespace CLDNNPlugin { + +struct ConvoltuionParameters { + cldnn::tensor stride; + cldnn::tensor padding; + cldnn::tensor dilation; + uint32_t groups; +}; + +static ConvoltuionParameters GetConvolutionParameters(const ngraph::CoordinateDiff& pads_begin, + const ngraph::Strides& dilations, + const ngraph::Strides& strides, + uint32_t groups) { + cldnn::tensor stride, padding, dilation; + if (pads_begin.size() != strides.size() || dilations.size() != strides.size()) + THROW_IE_EXCEPTION << "Strides, Dilations and Pads are supposed to have the same elements count"; + + switch (strides.size()) { + case 3: { + stride = cldnn::tensor(cldnn::batch(1), cldnn::feature(1), cldnn::spatial(strides[2], strides[1], strides[0])); + padding = cldnn::tensor(cldnn::batch(0), cldnn::feature(0), cldnn::spatial(-pads_begin[2], -pads_begin[1], -pads_begin[0])); + dilation = cldnn::tensor(cldnn::batch(1), cldnn::feature(1), cldnn::spatial(dilations[2], dilations[1], dilations[0])); + break; + } + case 2: { + stride = cldnn::tensor(cldnn::batch(1), cldnn::feature(1), cldnn::spatial(strides[1], strides[0], 1)); + padding = cldnn::tensor(cldnn::batch(0), cldnn::feature(0), cldnn::spatial(-pads_begin[1], -pads_begin[0], 0)); + dilation = cldnn::tensor(cldnn::batch(1), cldnn::feature(1), cldnn::spatial(dilations[1], dilations[0], 1)); + break; + } + case 1: { + stride = cldnn::tensor(cldnn::batch(1), cldnn::feature(1), cldnn::spatial(strides[0], 1, 1)); + padding = cldnn::tensor(cldnn::batch(0), cldnn::feature(0), cldnn::spatial(-pads_begin[0], 0, 0)); + dilation = cldnn::tensor(cldnn::batch(1), cldnn::feature(1), cldnn::spatial(dilations[0], 1, 1)); + break; + } + default: THROW_IE_EXCEPTION << "Unsupported convolve parameters size. Only 1d, 2d, and 3d cases are supported"; + } + + return {stride, padding, dilation, groups}; +} + +void CreateGroupConvolutionOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {2}); + auto inputs = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + uint32_t groups = op->get_input_shape(1)[0]; + auto params = GetConvolutionParameters(op->get_pads_begin(), op->get_dilations(), op->get_strides(), groups); + auto outDims = op->get_output_shape(0); + auto outPrecision = op->get_output_element_type(0); + + auto weightsName = inputs[1]; + + // WA: For the case with FakeQuantize op on weights that are not folderd by constant propagation pass for some reason. + // Dimensions order is GOIYZ, but + // the selected format is OIZYX by default. + if (std::dynamic_pointer_cast(op->get_input_node_shared_ptr(1)) == nullptr) { + std::string reshapeName = layerName + "_cldnn_weights_reshape"; + std::string reorderName = layerName + "_cldnn_weights_reorder"; + + auto weights_shape = op->get_input_shape(1); + std::vector new_weights_shape; + new_weights_shape.push_back(weights_shape[0] * weights_shape[1]); // Merged G and O dims + for (size_t i = 2; i < weights_shape.size(); i++) { + new_weights_shape.push_back(weights_shape[i]); + } + auto reshapePrim = cldnn::reshape(reshapeName, + weightsName, + CldnnTensorFromIEDims(new_weights_shape)); + + p.AddPrimitive(reshapePrim); + p.AddInnerPrimitiveToProfiler(reshapeName, layerName, op); + + auto reorderPrim = cldnn::reorder(reorderName, + reshapeName, + DefaultFormatForDims(new_weights_shape.size()), + DataTypeFromPrecision(op->get_input_element_type(1))); + + p.AddPrimitive(reorderPrim); + p.AddInnerPrimitiveToProfiler(reorderName, layerName, op); + + weightsName = reorderName; + } + + std::vector weights = {weightsName}; + auto convPrim = cldnn::convolution(layerName, + inputs[0], + weights, + {}, + params.groups, + params.stride, + params.padding, + params.dilation, + CldnnTensorFromIEDims(outDims), + DataTypeFromPrecision(outPrecision)); + + p.AddPrimitive(convPrim); + p.AddPrimitiveToProfiler(op); +} + +void CreateConvolutionOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {2}); + auto inputs = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + auto params = GetConvolutionParameters(op->get_pads_begin(), op->get_dilations(), op->get_strides(), 1); + auto outDims = op->get_output_shape(0); + auto outPrecision = op->get_output_element_type(0); + + std::vector weights = {inputs[1]}; + auto convPrim = cldnn::convolution(layerName, + inputs[0], + weights, + {}, + params.groups, + params.stride, + params.padding, + params.dilation, + CldnnTensorFromIEDims(outDims), + DataTypeFromPrecision(outPrecision)); + + p.AddPrimitive(convPrim); + p.AddPrimitiveToProfiler(op); +} + +void CreateConvolutionBackpropDataOp(Program& p, const std::shared_ptr& op) { + // 3rd input is an optional output shape + p.ValidateInputs(op, {2, 3}); + auto inputs = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + auto dilations = op->get_dilations(); + for (auto d : dilations) { + if (d != 1) { + THROW_IE_EXCEPTION << "Unsupported dilation in ConvolutionBackpropData " << op->get_friendly_name(); + } + } + + auto weightsName = inputs[1]; + // WA: For the case with FakeQuantize op on weights that are not folderd by constant propagation pass for some reason. + // Dimensions order of weights blob is IOYX, but + // the selected format is OIYX by default. So we need to swap I and O dimensions to match the format + if (IsNodeOnConstPath(op->get_input_node_shared_ptr(1))) { + std::string reshapeName = layerName + "_cldnn_weights_reshape"; + + auto weights_shape = op->get_input_shape(1); + std::swap(weights_shape[0], weights_shape[1]); + auto reshapePrim = cldnn::reshape(reshapeName, + weightsName, + CldnnTensorFromIEDims(weights_shape)); + + p.AddPrimitive(reshapePrim); + p.AddInnerPrimitiveToProfiler(reshapeName, layerName, op); + + weightsName = reshapeName; + } + + std::vector weights = {weightsName}; + + auto params = GetConvolutionParameters(op->get_pads_begin(), op->get_dilations(), op->get_strides(), 1); + auto deconvPrim = cldnn::deconvolution(layerName, + inputs[0], + weights, + {}, + params.groups, + params.stride, + params.padding, + CldnnTensorFromIEDims(op->get_output_tensor(0).get_shape())); + p.AddPrimitive(deconvPrim); + + p.AddPrimitiveToProfiler(op); +} + +void CreateGroupConvolutionBackpropDataOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {2}); + auto inputs = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + auto dilations = op->get_dilations(); + for (auto d : dilations) { + if (d != 1) { + THROW_IE_EXCEPTION << "Unsupported dilation in ConvolutionBackpropData " << op->get_friendly_name(); + } + } + + uint32_t groups = op->get_input_shape(1)[0]; + auto params = GetConvolutionParameters(op->get_pads_begin(), op->get_dilations(), op->get_strides(), groups); + std::vector weights = {inputs[1]}; + + auto deconvPrim = cldnn::deconvolution(layerName, + inputs[0], + weights, + {}, + params.groups, + params.stride, + params.padding, + CldnnTensorFromIEDims(op->get_output_tensor(0).get_shape())); + p.AddPrimitive(deconvPrim); + + p.AddPrimitiveToProfiler(op); +} + +void CreateDeformableConvolutionOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {3}); + auto inputs = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + auto params = GetConvolutionParameters(op->get_pads_begin(), op->get_dilations(), op->get_strides(), op->get_group()); + auto outDims = op->get_output_shape(0); + auto outPrecision = op->get_output_element_type(0); + + std::vector weights = {inputs[2]}; + if (params.groups > 1) { + auto convPrim = cldnn::convolution(layerName, + inputs[0], + inputs[1], + weights, + {}, + params.groups, + op->get_deformable_group(), + params.stride, + params.padding, + params.dilation, + CldnnTensorFromIEDims(outDims)); + + p.AddPrimitive(convPrim); + p.AddPrimitiveToProfiler(op); + } else { + std::string defConvLayerNameInterp = layerName + "_interp"; + std::string defConvLayerNameConv = layerName; + cldnn::tensor kernel; + auto weights_shape = op->get_input_shape(2); + size_t sidx = 2 + (params.groups > 1 ? 1 : 0); + if (weights_shape.size() == 3) { + kernel = cldnn::tensor(cldnn::batch(1), + cldnn::feature(1), + cldnn::spatial(weights_shape[sidx + 2], + weights_shape[sidx + 1], + weights_shape[sidx + 0])); + } else { + kernel = cldnn::tensor(cldnn::batch(1), + cldnn::feature(1), + cldnn::spatial(weights_shape[sidx + 1], + weights_shape[sidx + 0], + 1)); + } + + auto defConvPrimInterp = cldnn::deformable_interp(defConvLayerNameInterp, + inputs[0], + inputs[1], + params.groups, + op->get_deformable_group(), + params.stride, + params.padding, + params.dilation, + CldnnTensorFromIEDims(outDims), + kernel); + p.AddPrimitive(defConvPrimInterp); + p.AddInnerPrimitiveToProfiler(defConvLayerNameInterp, defConvLayerNameConv, op); + auto defConvPrim = cldnn::deformable_conv(defConvLayerNameConv, + defConvLayerNameInterp, + weights, + {}, + params.groups, + CldnnTensorFromIEDims(outDims)); + p.AddPrimitive(defConvPrim); + p.AddPrimitiveToProfiler(defConvLayerNameConv, op); + } +} + +void CreateBinaryConvolutionOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {2}); + auto inputs = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + auto params = GetConvolutionParameters(op->get_pads_begin(), op->get_dilations(), op->get_strides(), 1); + auto outDims = op->get_output_shape(0); + auto outPrecision = op->get_output_element_type(0); + + std::vector weights = {inputs[1]}; + cldnn::data_types calc_precision = DataTypeFromPrecision(op->get_output_element_type(0)); + auto convPrim = cldnn::binary_convolution(layerName, + inputs[0], + weights, + params.stride, + params.padding, + params.dilation, + CldnnTensorFromIEDims(outDims), + params.groups, + op->get_pad_value(), + calc_precision); + + p.AddPrimitive(convPrim); + p.AddPrimitiveToProfiler(op); +} + +REGISTER_FACTORY_IMPL(v1, GroupConvolution); +REGISTER_FACTORY_IMPL(v1, Convolution); +REGISTER_FACTORY_IMPL(v1, ConvolutionBackpropData); +REGISTER_FACTORY_IMPL(v1, GroupConvolutionBackpropData); +REGISTER_FACTORY_IMPL(v1, DeformableConvolution); +REGISTER_FACTORY_IMPL(v1, BinaryConvolution); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/ctc_greedy_decoder.cpp b/inference-engine/src/cldnn_engine/ops/ctc_greedy_decoder.cpp new file mode 100644 index 00000000000000..db585aeb2e22ac --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/ctc_greedy_decoder.cpp @@ -0,0 +1,32 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/ctc_greedy_decoder.hpp" + +#include "api/ctc_greedy_decoder.hpp" + +namespace CLDNNPlugin { + +void CreateCTCGreedyDecoderOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {2}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + auto primitive = cldnn::ctc_greedy_decoder(layerName, + inputPrimitives[0], + inputPrimitives[1], + op->get_ctc_merge_repeated(), + DataTypeFromPrecision(op->get_output_element_type(0)), + CldnnTensorFromIEDims(op->get_output_shape(0))); + + p.AddPrimitive(primitive); + p.AddPrimitiveToProfiler(op); +} + +REGISTER_FACTORY_IMPL(v0, CTCGreedyDecoder); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/cum_sum.cpp b/inference-engine/src/cldnn_engine/ops/cum_sum.cpp new file mode 100644 index 00000000000000..579d4083958a99 --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/cum_sum.cpp @@ -0,0 +1,74 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/cum_sum.hpp" +#include "ngraph/op/constant.hpp" + +#include "api/cum_sum.hpp" + +namespace CLDNNPlugin { + +static inline cldnn::cum_sum::cum_sum_axis GetCumSumAxis(int32_t axis, uint32_t rank) { + if (axis < 0) + axis += rank; + if (axis < 0 || axis >= rank) + THROW_IE_EXCEPTION << "CumSum axis is not correspond to number of dimensions"; + + // Difference in dimension ordering between IE and clDNN, + // reverse spatial dimensions after batch and feature. + uint32_t cldnn_axis = axis; + if (axis >= 2) { + auto spatial_axis = axis - 2; + // Default and minimum number of dimensions is 4 + auto spatial_size = std::max(rank, 4u) - 2; + cldnn_axis = spatial_size - spatial_axis - 1 + 2; + } + + switch (cldnn_axis) { + case 0: return cldnn::cum_sum::cum_sum_axis::along_b; + case 1: return cldnn::cum_sum::cum_sum_axis::along_f; + case 2: return cldnn::cum_sum::cum_sum_axis::along_x; + case 3: return cldnn::cum_sum::cum_sum_axis::along_y; + case 4: return cldnn::cum_sum::cum_sum_axis::along_z; + case 5: return cldnn::cum_sum::cum_sum_axis::along_w; + default: THROW_IE_EXCEPTION << "Unsupported CumSum axis: " << axis; + } + + return cldnn::cum_sum::cum_sum_axis::along_f; // shouldn't get here +} + +void CreateCumSumOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {1, 2}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + auto exclusive = op->is_exclusive(); + auto reverse = op->is_reverse(); + + size_t rank = op->get_input_shape(0).size(); + int32_t axis = 0; + if (op->get_input_size() == 2) { + auto axes_constant = std::dynamic_pointer_cast(op->get_input_node_shared_ptr(1)); + if (!axes_constant) { + THROW_IE_EXCEPTION << "Unsupported parameter nodes type in " << op->get_friendly_name() << " (" << op->get_type_name() << ")"; + } + axis = axes_constant->cast_vector()[0]; + } + + auto primitive = cldnn::cum_sum(layerName, + inputPrimitives[0], + GetCumSumAxis(axis, rank), + exclusive, + reverse); + + p.AddPrimitive(primitive); + p.AddPrimitiveToProfiler(op); +} + +REGISTER_FACTORY_IMPL(v0, CumSum); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/custom.cpp b/inference-engine/src/cldnn_engine/ops/custom.cpp new file mode 100644 index 00000000000000..17d2ae8a7aba68 --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/custom.cpp @@ -0,0 +1,251 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" +#include "simple_math.h" + +#include "ngraph/attribute_visitor.hpp" +#include "ngraph/node.hpp" + +#include "api/custom_gpu_primitive.hpp" +#include "api/reorder.hpp" + +namespace CLDNNPlugin { + +template +static inline std::string vecToString(std::vector vec) { + if (vec.empty()) + return ""; + + std::string res = std::to_string(vec[0]); + for (size_t i = 1; i < vec.size(); i++) { + res += "," + std::to_string(vec[i]); + } + return res; +} + +template<> +inline std::string vecToString(std::vector vec) { + if (vec.empty()) + return ""; + + std::string res = vec[0]; + for (size_t i = 1; i < vec.size(); i++) { + res += "," + vec[i]; + } + return res; +} + +class CustomLayerAttributeVisitor : public ngraph::AttributeVisitor { +public: + CustomLayerAttributeVisitor() : m_values({}) { } + + void on_adapter(const std::string& name, ngraph::ValueAccessor& adapter) override { + THROW_IE_EXCEPTION << "Attribute " << name << " can't be processed\n"; + } + // The remaining adapter methods fall back on the void adapter if not implemented + void on_adapter(const std::string& name, ngraph::ValueAccessor& adapter) override { + m_values[name] = adapter.get(); + } + void on_adapter(const std::string& name, ngraph::ValueAccessor& adapter) override { + m_values[name] = std::to_string(adapter.get()); + } + void on_adapter(const std::string& name, ngraph::ValueAccessor& adapter) override { + m_values[name] = std::to_string(adapter.get()); + } + void on_adapter(const std::string& name, ngraph::ValueAccessor& adapter) override { + m_values[name] = std::to_string(adapter.get()); + } + void on_adapter(const std::string& name, ngraph::ValueAccessor>& adapter) override { + m_values[name] = vecToString(adapter.get()); + } + void on_adapter(const std::string& name, ngraph::ValueAccessor>& adapter) override { + m_values[name] = vecToString(adapter.get()); + } + void on_adapter(const std::string& name, ngraph::ValueAccessor>& adapter) override { + m_values[name] = vecToString(adapter.get()); + } + void on_adapter(const std::string& name, ngraph::ValueAccessor>& adapter) override { + m_values[name] = vecToString(adapter.get()); + } + void on_adapter(const std::string& name, ngraph::ValueAccessor>& adapter) override { + m_values[name] = vecToString(adapter.get()); + } + void on_adapter(const std::string& name, ngraph::ValueAccessor>& adapter) override { + m_values[name] = vecToString(adapter.get()); + } + void on_adapter(const std::string& name, ngraph::ValueAccessor>& adapter) override { + m_values[name] = vecToString(adapter.get()); + } + void on_adapter(const std::string& name, ngraph::ValueAccessor>& adapter) override { + m_values[name] = vecToString(adapter.get()); + } + void on_adapter(const std::string& name, ngraph::ValueAccessor>& adapter) override { + m_values[name] = vecToString(adapter.get()); + } + void on_adapter(const std::string& name, ngraph::ValueAccessor>& adapter) override { + m_values[name] = vecToString(adapter.get()); + } + void on_adapter(const std::string& name, ngraph::ValueAccessor>& adapter) override { + m_values[name] = vecToString(adapter.get()); + } + + std::map get_parameters() const { + return m_values; + } + +protected: + std::map m_values; +}; + +void CreateCustomOp(Program& p, const std::shared_ptr& op, CLDNNCustomLayerPtr customLayer) { + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + CustomLayerAttributeVisitor visitor; + op->visit_attributes(visitor); + auto params = visitor.get_parameters(); + + // Handle defines + std::string layerDefines; + for (const auto& def : customLayer->Defines()) { + std::string singleDefine("#define " + def.name + " " + def.prefix); + if (params.find(def.param) != params.end()) { + singleDefine += params.at(def.param); + } else { + singleDefine += def.default_value; + } + singleDefine += def.postfix + "\n"; + layerDefines.append(singleDefine); + } + + // reserve + std::vector reorderedInputs; + reorderedInputs.resize(inputPrimitives.size()); + + // Handle kernel parameters + std::vector kernelParameters; + cldnn::format outputFormat(cldnn::format::any); + for (const auto& param : customLayer->KernelParams()) { + switch (param.type) { + case CLDNNCustomLayer::ParamType::Input: { + kernelParameters.resize(kernelParameters.size() > size_t(param.paramIndex + 1) ? kernelParameters.size() : size_t(param.paramIndex + 1)); + kernelParameters[param.paramIndex].type = cldnn::custom_gpu_primitive::arg_input; + kernelParameters[param.paramIndex].index = + static_cast((param.portIndex >= inputPrimitives.size()) ? -1 : param.portIndex); + + // Handle input reorder + if (param.portIndex < inputPrimitives.size() && reorderedInputs[param.portIndex].empty()) { + // todo: add support for multiple reorders of the same input? (read as bfyx for one arg and yxfb for another) + if (param.format != cldnn::format::any) { + auto reorderPrimName = inputPrimitives[param.portIndex] + "_" + op->get_friendly_name() + Program::m_preCustomLayerTag; + auto preprocessPrim = cldnn::reorder( + reorderPrimName, + inputPrimitives[param.portIndex], + param.format, + DataTypeFromPrecision(op->get_input_element_type(param.portIndex))); + + p.AddPrimitive(preprocessPrim); + p.AddInnerPrimitiveToProfiler(reorderPrimName, layer_type_name_ID(op), op); + reorderedInputs[param.portIndex] = (reorderPrimName); + } else { + reorderedInputs[param.portIndex] = inputPrimitives[param.portIndex]; + } + } + break; + } + case CLDNNCustomLayer::ParamType::Output: { + kernelParameters.resize(kernelParameters.size() > size_t(param.paramIndex + 1) ? kernelParameters.size() : size_t(param.paramIndex + 1)); + kernelParameters[param.paramIndex].type = cldnn::custom_gpu_primitive::arg_output; + kernelParameters[param.paramIndex].index = + static_cast((param.portIndex >= inputPrimitives.size()) ? -1 : param.portIndex); + outputFormat = param.format; + break; + } + default: + THROW_IE_EXCEPTION << "Invalid custom layer param type: " << param.type << " in operation: " << op->get_friendly_name(); + } + } + const std::string layerTitle("\n// Layer " + op->get_friendly_name() + " using Custom Layer " + customLayer->Name() + "\n"); + const std::string defineTitle("// Custom Layer User Defines\n"); + + auto dims = op->get_output_shape(0); + size_t N = (dims.size() > 0) ? dims[0] : 1; + size_t C = (dims.size() > 1) ? dims[1] : 1; + size_t H = (dims.size() > 2) ? dims[2] : 1; + size_t W = (dims.size() > 3) ? dims[3] : 1; + cldnn::tensor outputTensor = cldnn::tensor(cldnn::batch(N), cldnn::feature(C), cldnn::spatial(W, H)); + + cldnn::layout outputLayout = cldnn::layout(DataTypeFromPrecision(op->get_output_element_type(0)), outputFormat, outputTensor); + + // evaluate work sizes rules + std::vector gws, lws; + + // assume output tensor is dimension source by default + int batchDim = outputTensor.batch[0]; + int featureDim = outputTensor.feature[0]; + int yDim = outputTensor.spatial[1]; + int xDim = outputTensor.spatial[0]; + int iidx = customLayer->InputDimSourceIndex(); + + std::string genericLayerName = layer_type_name_ID(op); + // if input index is greater than -1, take dimension from input + if (iidx >= 0) { + if (iidx >= op->get_input_size()) + THROW_IE_EXCEPTION << "Invalid input tensor for index: " << iidx; + auto inputDims = op->get_input_shape(iidx); + + xDim = inputDims[inputDims.size() - 1]; + yDim = dims.size() > 1 ? inputDims[inputDims.size() - 2] : 0; + featureDim = dims.size() > 2 ? inputDims[inputDims.size() - 3] : 0; + batchDim = dims.size() > 3 ? inputDims[inputDims.size() - 4]: 0; + } + const std::map vars = { + { 'b', batchDim } , { 'B', batchDim }, + { 'f', featureDim }, { 'F', featureDim }, + { 'y', yDim }, { 'Y', yDim }, + { 'x', xDim }, { 'X', xDim }, + }; + for (auto rule : customLayer->GlobalSizeRules()) { + SimpleMathExpression expr; + expr.SetVariables(vars); + expr.SetExpression(rule); + gws.push_back(expr.Evaluate()); + } + for (auto rule : customLayer->LocalSizeRules()) { + SimpleMathExpression expr; + expr.SetVariables(vars); + expr.SetExpression(rule); + lws.push_back(expr.Evaluate()); + } + + auto customPrim = cldnn::custom_gpu_primitive(genericLayerName, + reorderedInputs, + { layerTitle, defineTitle, layerDefines, customLayer->KernelSource() }, + customLayer->KernelEntry(), + kernelParameters, + customLayer->CompilerOptions(), + outputLayout, + gws, + lws); + + auto prevLayerName = genericLayerName; + if (outputLayout.format != cldnn::format::any) { + // Handle output reorder + auto reorderPrimName = genericLayerName + Program::m_postCustomLayerTag; + p.AddPrimitive( + cldnn::reorder(reorderPrimName, + genericLayerName, + DefaultFormatForDims(op->get_output_shape(0).size()), + customPrim.output_layout.data_type)); + prevLayerName = reorderPrimName; + p.AddInnerPrimitiveToProfiler(reorderPrimName, layer_type_name_ID(op), op); + } + p.AddPrimitive(customPrim); + p.AddPrimitiveToProfiler(genericLayerName, op); + p.primitiveIDs[genericLayerName] = prevLayerName; +} + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/depth_to_space.cpp b/inference-engine/src/cldnn_engine/ops/depth_to_space.cpp new file mode 100644 index 00000000000000..84ecdeec471746 --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/depth_to_space.cpp @@ -0,0 +1,44 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/depth_to_space.hpp" + +#include "api/depth_to_space.hpp" + +namespace CLDNNPlugin { + +static cldnn::depth_to_space_mode GetDepthMode(ngraph::op::v0::DepthToSpace::DepthToSpaceMode mode) { + switch (mode) { + case ngraph::op::v0::DepthToSpace::DepthToSpaceMode::BLOCKS_FIRST: + return cldnn::depth_to_space_mode::blocks_first; + case ngraph::op::v0::DepthToSpace::DepthToSpaceMode::DEPTH_FIRST: + return cldnn::depth_to_space_mode::depth_first; + default: THROW_IE_EXCEPTION << "Unsupported DepthToSpaceMode value: " << static_cast(mode); + } + return cldnn::depth_to_space_mode::blocks_first; +} + +void CreateDepthToSpaceOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {1}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + size_t blockSize = op->get_block_size(); + cldnn::depth_to_space_mode mode = GetDepthMode(op->get_mode()); + + auto depthToSpacePrim = cldnn::depth_to_space(layerName, + inputPrimitives[0], + blockSize, + mode); + + p.AddPrimitive(depthToSpacePrim); + p.AddPrimitiveToProfiler(op); +} + +REGISTER_FACTORY_IMPL(v0, DepthToSpace); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/detection_output.cpp b/inference-engine/src/cldnn_engine/ops/detection_output.cpp new file mode 100644 index 00000000000000..f65e1dfbea28b1 --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/detection_output.cpp @@ -0,0 +1,86 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/detection_output.hpp" + +#include "api/detection_output.hpp" + +namespace CLDNNPlugin { + +static cldnn::prior_box_code_type PriorBoxCodeFromString(const std::string& str) { + static const std::map CodeNameToType = { + { "caffe.PriorBoxParameter.CORNER" , cldnn::prior_box_code_type::corner }, + { "caffe.PriorBoxParameter.CENTER_SIZE" , cldnn::prior_box_code_type::center_size }, + { "caffe.PriorBoxParameter.CORNER_SIZE" , cldnn::prior_box_code_type::corner_size }, + }; + auto it = CodeNameToType.find(str); + if (it != CodeNameToType.end()) { + return it->second; + } else { + THROW_IE_EXCEPTION << "Unknown Prior-Box code type: " << str; + } + return cldnn::prior_box_code_type::corner; +} + +void CreateDetectionOutputOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {3}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + auto attrs = op->get_attrs(); + + uint32_t num_classes = attrs.num_classes; + bool share_location = attrs.share_location; + int background_label_id = attrs.background_label_id; + float nms_threshold = attrs.nms_threshold; + int top_k = attrs.top_k; + float confidence_threshold = attrs.confidence_threshold; + float eta = 1.0f; + int keep_top_k = attrs.keep_top_k[0]; + bool variance_encoded_in_target = attrs.variance_encoded_in_target; + int input_width = attrs.input_width; + int input_height = attrs.input_height; + bool normalized = attrs.normalized; + std::string code_type = attrs.code_type; + bool clip_before_nms = attrs.clip_before_nms; + bool clip_after_nms = attrs.clip_after_nms; + bool decrease_label_id = attrs.decrease_label_id; + + cldnn::prior_box_code_type cldnnCodeType = PriorBoxCodeFromString(code_type); + int32_t prior_info_size = normalized != 0 ? 4 : 5; + int32_t prior_coordinates_offset = normalized != 0 ? 0 : 1; + + auto detectionPrim = cldnn::detection_output(layerName, + inputPrimitives[0], + inputPrimitives[1], + inputPrimitives[2], + num_classes, + keep_top_k, + share_location, + background_label_id, + nms_threshold, + top_k, + eta, + cldnnCodeType, + variance_encoded_in_target, + confidence_threshold, + prior_info_size, + prior_coordinates_offset, + normalized, + input_width, + input_height, + decrease_label_id, + clip_before_nms, + clip_after_nms); + + p.AddPrimitive(detectionPrim); + p.AddPrimitiveToProfiler(op); +} + +REGISTER_FACTORY_IMPL(v0, DetectionOutput); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/eltwise.cpp b/inference-engine/src/cldnn_engine/ops/eltwise.cpp new file mode 100644 index 00000000000000..4a04dce1d172e6 --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/eltwise.cpp @@ -0,0 +1,190 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" +#include "transformations/utils/utils.hpp" + +#include "ngraph/op/add.hpp" +#include "ngraph/op/multiply.hpp" +#include "ngraph/op/maximum.hpp" +#include "ngraph/op/minimum.hpp" +#include "ngraph/op/subtract.hpp" +#include "ngraph/op/divide.hpp" +#include "ngraph/op/squared_difference.hpp" +#include "ngraph/op/equal.hpp" +#include "ngraph/op/not_equal.hpp" +#include "ngraph/op/less.hpp" +#include "ngraph/op/less_eq.hpp" +#include "ngraph/op/greater.hpp" +#include "ngraph/op/greater_eq.hpp" +#include "ngraph/op/and.hpp" +#include "ngraph/op/or.hpp" +#include "ngraph/op/xor.hpp" +#include "ngraph/op/power.hpp" +#include "ngraph/op/floor_mod.hpp" + +#include "api/activation.hpp" +#include "api/eltwise.hpp" +#include "api/reorder.hpp" +#include "api/reshape.hpp" + +namespace CLDNNPlugin { + +void CreateElementwiseOp(Program& p, const std::shared_ptr& op, cldnn::eltwise_mode mode) { + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + auto outRank = op->get_output_shape(0).size(); + for (size_t i = 0; i < inputPrimitives.size(); ++i) { + auto inputShape = op->get_input_shape(i); + auto inputRank = inputShape.size(); + if (inputRank != outRank) { + // Add reorder if changing number of dimensions requires changing format + auto targetFormat = DefaultFormatForDims(outRank); + if (targetFormat.value != DefaultFormatForDims(inputRank).value) { + auto reorderName = layerName + "_cldnn_in" + std::to_string(i) + "_reorder"; + auto targetDatatype = DataTypeFromPrecision(op->get_input_element_type(i)); + auto reorderPrim = cldnn::reorder(reorderName, inputPrimitives[i], targetFormat, targetDatatype); + + p.AddPrimitive(reorderPrim); + p.AddInnerPrimitiveToProfiler(reorderName, layerName, op); + + inputPrimitives[i] = reorderName; + } + + auto reshapeName = layerName + "_cldnn_in" + std::to_string(i) + "_reshape"; + + // Extend input dimensions by prepending ones + inputShape.insert(inputShape.begin(), outRank - inputRank, 1ul); + + auto targetShape = CldnnTensorFromIEDims(inputShape); + + auto reshapePrim = cldnn::reshape(reshapeName, inputPrimitives[i], targetShape); + p.AddPrimitive(reshapePrim); + p.AddInnerPrimitiveToProfiler(reshapeName, layerName, op); + + inputPrimitives[i] = reshapeName; + } + } + + auto out_dt = DataTypeFromPrecision(op->get_output_element_type(0)); + auto eltwisePrim = cldnn::eltwise(layerName, + inputPrimitives, + mode, + {}, + out_dt); + + p.AddPrimitive(eltwisePrim); + p.AddPrimitiveToProfiler(op); +} + +void CreateAddOp(Program& p, const std::shared_ptr& op) { + CreateElementwiseOp(p, op, cldnn::eltwise_mode::sum); +} + +void CreateMultiplyOp(Program& p, const std::shared_ptr& op) { + CreateElementwiseOp(p, op, cldnn::eltwise_mode::prod); +} + +void CreateMaximumOp(Program& p, const std::shared_ptr& op) { + CreateElementwiseOp(p, op, cldnn::eltwise_mode::max); +} + +void CreateMinimumOp(Program& p, const std::shared_ptr& op) { + CreateElementwiseOp(p, op, cldnn::eltwise_mode::min); +} + +void CreateSubtractOp(Program& p, const std::shared_ptr& op) { + CreateElementwiseOp(p, op, cldnn::eltwise_mode::sub); +} + +void CreateDivideOp(Program& p, const std::shared_ptr& op) { + CreateElementwiseOp(p, op, cldnn::eltwise_mode::div); +} + +void CreateSquaredDifferenceOp(Program& p, const std::shared_ptr& op) { + CreateElementwiseOp(p, op, cldnn::eltwise_mode::squared_diff); +} + +void CreateEqualOp(Program& p, const std::shared_ptr& op) { + CreateElementwiseOp(p, op, cldnn::eltwise_mode::eq); +} + +void CreateNotEqualOp(Program& p, const std::shared_ptr& op) { + CreateElementwiseOp(p, op, cldnn::eltwise_mode::ne); +} + +void CreateLessOp(Program& p, const std::shared_ptr& op) { + CreateElementwiseOp(p, op, cldnn::eltwise_mode::lt); +} + +void CreateLessEqualOp(Program& p, const std::shared_ptr& op) { + CreateElementwiseOp(p, op, cldnn::eltwise_mode::le); +} + +void CreateGreaterOp(Program& p, const std::shared_ptr& op) { + CreateElementwiseOp(p, op, cldnn::eltwise_mode::gt); +} + +void CreateGreaterEqualOp(Program& p, const std::shared_ptr& op) { + CreateElementwiseOp(p, op, cldnn::eltwise_mode::ge); +} + +void CreateLogicalAndOp(Program& p, const std::shared_ptr& op) { + CreateElementwiseOp(p, op, cldnn::eltwise_mode::logic_and); +} + +void CreateLogicalOrOp(Program& p, const std::shared_ptr& op) { + CreateElementwiseOp(p, op, cldnn::eltwise_mode::logic_or); +} + +void CreateLogicalXorOp(Program& p, const std::shared_ptr& op) { + CreateElementwiseOp(p, op, cldnn::eltwise_mode::logic_xor); +} + +void CreatePowerOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {2}); + auto power_node = std::dynamic_pointer_cast(op->get_input_node_shared_ptr(1)); + if (power_node) { + if (ngraph::shape_size(power_node->get_output_shape(0)) == 1) { + float pow; + if (!ngraph::op::util::get_single_value(power_node, pow)) + THROW_IE_EXCEPTION << "Invalid parameter size in " << op->get_friendly_name() << " (" << op->get_type_name() << ")"; + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::pow, {pow}); + return; + } + } + CreateElementwiseOp(p, op, cldnn::eltwise_mode::pow); +} + +void CreateFloorModOp(Program& p, const std::shared_ptr& op) { + CreateElementwiseOp(p, op, cldnn::eltwise_mode::floor_mod); +} + +void CreateModOp(Program& p, const std::shared_ptr& op) { + CreateElementwiseOp(p, op, cldnn::eltwise_mode::mod); +} + +REGISTER_FACTORY_IMPL(v1, Add); +REGISTER_FACTORY_IMPL(v1, Multiply); +REGISTER_FACTORY_IMPL(v1, Maximum); +REGISTER_FACTORY_IMPL(v1, Minimum); +REGISTER_FACTORY_IMPL(v1, Subtract); +REGISTER_FACTORY_IMPL(v1, Divide); +REGISTER_FACTORY_IMPL(v0, SquaredDifference); +REGISTER_FACTORY_IMPL(v1, Equal); +REGISTER_FACTORY_IMPL(v1, NotEqual); +REGISTER_FACTORY_IMPL(v1, Less); +REGISTER_FACTORY_IMPL(v1, LessEqual); +REGISTER_FACTORY_IMPL(v1, Greater); +REGISTER_FACTORY_IMPL(v1, GreaterEqual); +REGISTER_FACTORY_IMPL(v1, LogicalAnd); +REGISTER_FACTORY_IMPL(v1, LogicalOr); +REGISTER_FACTORY_IMPL(v1, LogicalXor); +REGISTER_FACTORY_IMPL(v1, Power); +REGISTER_FACTORY_IMPL(v1, FloorMod); +REGISTER_FACTORY_IMPL(v1, Mod); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/embedding_bag.cpp b/inference-engine/src/cldnn_engine/ops/embedding_bag.cpp new file mode 100644 index 00000000000000..1195fcc302f867 --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/embedding_bag.cpp @@ -0,0 +1,166 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/embedding_segments_sum.hpp" +#include "ngraph/op/embeddingbag_offsets_sum.hpp" +#include "ngraph/op/embeddingbag_packedsum.hpp" + +#include "api/embedding_bag.hpp" +#include "api/reorder.hpp" + +#include "transformations/utils/utils.hpp" + +namespace CLDNNPlugin { + +void CreateEmbeddingBagOffsetsSumOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {3, 4, 5}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + int32_t defaultIndex = -1; + if (inputPrimitives.size() > 3) { + auto index_node = std::dynamic_pointer_cast(op->get_input_node_shared_ptr(3)); + if (!index_node) { + THROW_IE_EXCEPTION << "Unsupported parameter nodes type in " << op->get_friendly_name() << " (" << op->get_type_name() << ")"; + } + + float val; + if (ngraph::shape_size(index_node->get_output_shape(0)) != 1 || !ngraph::op::util::get_single_value(index_node, val)) + THROW_IE_EXCEPTION << "Unsupported parameter size in " << op->get_friendly_name() << " (" << op->get_type_name() << ")"; + + defaultIndex = static_cast(val); + inputPrimitives.erase(inputPrimitives.begin() + 3); // Remove "default_index" + } + + std::vector reorderedInputs; + reorderedInputs.resize(inputPrimitives.size()); + + for (size_t portIndex = 0; portIndex < inputPrimitives.size(); portIndex++) { + auto inputDataType = DataTypeFromPrecision(op->get_input_element_type(portIndex)); + if (((portIndex == 1) || (portIndex == 2)) && (inputDataType == cldnn::data_types::i64)) { + // clDNN primitive supports only i32 data type for indices inputs, + // so we need additional reorders if they are provided as i64 + auto reorderPrimName = inputPrimitives[portIndex] + "_" + op->get_friendly_name() + Program::m_preProcessTag; + auto targetFormat = DefaultFormatForDims(op->get_input_shape(portIndex).size()); + auto preprocessPrim = cldnn::reorder(reorderPrimName, + inputPrimitives[portIndex], + targetFormat, + cldnn::data_types::i32); + p.AddPrimitive(preprocessPrim); + p.AddInnerPrimitiveToProfiler(reorderPrimName, layer_type_name_ID(op), op); + reorderedInputs[portIndex] = (reorderPrimName); + } else { + reorderedInputs[portIndex] = inputPrimitives[portIndex]; + } + } + + auto embeddingBagPrim = cldnn::embedding_bag(layerName, + reorderedInputs, + cldnn::embedding_bag::offsets_sum, + CldnnTensorFromIEDims(op->get_output_shape(0)), + defaultIndex); + + p.AddPrimitive(embeddingBagPrim); + p.AddPrimitiveToProfiler(op); +} + +void CreateEmbeddingBagPackedSumOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {2, 3}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + std::vector reorderedInputs; + reorderedInputs.resize(inputPrimitives.size()); + + for (size_t portIndex = 0; portIndex < inputPrimitives.size(); portIndex++) { + auto inputDataType = DataTypeFromPrecision(op->get_input_element_type(portIndex)); + if ((portIndex == 1) && (inputDataType == cldnn::data_types::i64)) { + // clDNN primitive supports only i32 data type for indices input, + // so we need additional reorder if it's provided as i64 + auto reorderPrimName = inputPrimitives[portIndex] + "_" + op->get_friendly_name() + Program::m_preProcessTag; + auto targetFormat = DefaultFormatForDims(op->get_input_shape(portIndex).size()); + auto preprocessPrim = cldnn::reorder(reorderPrimName, + inputPrimitives[portIndex], + targetFormat, + cldnn::data_types::i32); + p.AddPrimitive(preprocessPrim); + p.AddInnerPrimitiveToProfiler(reorderPrimName, layer_type_name_ID(op), op); + reorderedInputs[portIndex] = (reorderPrimName); + } else { + reorderedInputs[portIndex] = inputPrimitives[portIndex]; + } + } + + auto embeddingBagPrim = cldnn::embedding_bag(layerName, + reorderedInputs, + cldnn::embedding_bag::packed_sum, + CldnnTensorFromIEDims(op->get_output_shape(0))); + + p.AddPrimitive(embeddingBagPrim); + p.AddPrimitiveToProfiler(op); +} + +void CreateEmbeddingSegmentsSumOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {4, 5, 6}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + inputPrimitives.erase(inputPrimitives.begin() + 3); // Remove "num_segments" + + int32_t defaultIndex = -1; + // port of default_index is 4 by default, but we removed "num_segments" above, so now it's equal to 3 + if (inputPrimitives.size() > 3) { + auto index_node = std::dynamic_pointer_cast(op->get_input_node_shared_ptr(4)); + if (!index_node) { + THROW_IE_EXCEPTION << "Unsupported parameter nodes type in " << op->get_friendly_name() << " (" << op->get_type_name() << ")"; + } + + float val; + if (ngraph::shape_size(index_node->get_output_shape(0)) != 1 || !ngraph::op::util::get_single_value(index_node, val)) + THROW_IE_EXCEPTION << "Unsupported parameter size in " << op->get_friendly_name() << " (" << op->get_type_name() << ")"; + + defaultIndex = static_cast(val); + inputPrimitives.erase(inputPrimitives.begin() + 3); // Remove "default_index" + } + + std::vector reorderedInputs; + reorderedInputs.resize(inputPrimitives.size()); + + for (size_t portIndex = 0; portIndex < inputPrimitives.size(); portIndex++) { + auto inputDataType = DataTypeFromPrecision(op->get_input_element_type(portIndex)); + if (((portIndex == 1) || (portIndex == 2)) && (inputDataType == cldnn::data_types::i64)) { + // clDNN primitive supports only i32 data type for indices inputs, + // so we need additional reorders if they are provided as i64 + auto reorderPrimName = inputPrimitives[portIndex] + "_" + op->get_friendly_name() + Program::m_preProcessTag; + auto targetFormat = DefaultFormatForDims(op->get_input_shape(portIndex).size()); + auto preprocessPrim = cldnn::reorder(reorderPrimName, + inputPrimitives[portIndex], + targetFormat, + cldnn::data_types::i32); + p.AddPrimitive(preprocessPrim); + p.AddInnerPrimitiveToProfiler(reorderPrimName, layer_type_name_ID(op), op); + reorderedInputs[portIndex] = (reorderPrimName); + } else { + reorderedInputs[portIndex] = inputPrimitives[portIndex]; + } + } + + auto embeddingBagPrim = cldnn::embedding_bag(layerName, + reorderedInputs, + cldnn::embedding_bag::segments_sum, + CldnnTensorFromIEDims(op->get_output_shape(0)), + defaultIndex); + + p.AddPrimitive(embeddingBagPrim); + p.AddPrimitiveToProfiler(op); +} + +REGISTER_FACTORY_IMPL(v3, EmbeddingBagOffsetsSum); +REGISTER_FACTORY_IMPL(v3, EmbeddingBagPackedSum); +REGISTER_FACTORY_IMPL(v3, EmbeddingSegmentsSum); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/extract_image_patches.cpp b/inference-engine/src/cldnn_engine/ops/extract_image_patches.cpp new file mode 100644 index 00000000000000..9e397228567acc --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/extract_image_patches.cpp @@ -0,0 +1,49 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/extractimagepatches.hpp" + +#include "api/extract_image_patches.hpp" + +namespace CLDNNPlugin { + +static inline std::string PadToString(ngraph::op::PadType pad) { + switch (pad) { + case ngraph::op::PadType::SAME_UPPER: return "same_upper"; + case ngraph::op::PadType::SAME_LOWER: return "same_lower"; + case ngraph::op::PadType::VALID: return "valid"; + default: THROW_IE_EXCEPTION << "Unsupported pad type in ExtractImagePatches primitive " << pad; + } + + return ""; +} + +void CreateExtractImagePatchesOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {1}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + std::vector sizes = std::vector(op->get_sizes().begin(), op->get_sizes().end()); + std::vector strides = std::vector(op->get_strides().begin(), op->get_strides().end()); + std::vector rates = std::vector(op->get_rates().begin(), op->get_rates().end()); + std::string auto_pad = PadToString(op->get_auto_pad()); + + auto extractImagePatchesPrim = cldnn::extract_image_patches(layerName, + inputPrimitives[0], + sizes, + strides, + rates, + auto_pad, + CldnnTensorFromIEDims(op->get_output_shape(0))); + + p.AddPrimitive(extractImagePatchesPrim); + p.AddPrimitiveToProfiler(op); +} + +REGISTER_FACTORY_IMPL(v3, ExtractImagePatches); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/fake_quantize.cpp b/inference-engine/src/cldnn_engine/ops/fake_quantize.cpp new file mode 100644 index 00000000000000..9a59b10ade582a --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/fake_quantize.cpp @@ -0,0 +1,42 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/fake_quantize.hpp" + +#include "api/quantize.hpp" + +namespace CLDNNPlugin { + +void CreateFakeQuantizeOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {5}); + std::string layerName = layer_type_name_ID(op); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + + auto input_id = inputPrimitives[0]; + auto input_low_id = inputPrimitives[1]; + auto input_high_id = inputPrimitives[2]; + auto output_low_id = inputPrimitives[3]; + auto output_high_id = inputPrimitives[4]; + + int levels = static_cast(op->get_levels()); + auto dt = DataTypeFromPrecision(op->get_output_element_type(0)); + auto quantizationPrim = cldnn::quantize(layerName, + input_id, + input_low_id, + input_high_id, + output_low_id, + output_high_id, + levels, + dt); + + p.AddPrimitive(quantizationPrim); + p.AddPrimitiveToProfiler(op); +} + +REGISTER_FACTORY_IMPL(v0, FakeQuantize); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/gather tree.cpp b/inference-engine/src/cldnn_engine/ops/gather tree.cpp new file mode 100644 index 00000000000000..3718b8771bf053 --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/gather tree.cpp @@ -0,0 +1,54 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/gather_tree.hpp" + +#include "api/gather_tree.hpp" +#include "api/reorder.hpp" + +namespace CLDNNPlugin { + +void CreateGatherTreeOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {4}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + std::vector reorderedInputs; + reorderedInputs.resize(inputPrimitives.size()); + + for (size_t portIndex = 0; portIndex < inputPrimitives.size(); portIndex++) { + auto inputDataType = DataTypeFromPrecision(op->get_input_element_type(portIndex)); + if (inputDataType == cldnn::data_types::i64) { + // clDNN primitive does not support i64 inputs, + // so we need additional reorders to convert them to i32 + auto reorderPrimName = inputPrimitives[portIndex] + "_" + op->get_friendly_name() + Program::m_preProcessTag; + auto targetFormat = DefaultFormatForDims(op->get_input_shape(portIndex).size()); + auto preprocessPrim = cldnn::reorder(reorderPrimName, + inputPrimitives[portIndex], + targetFormat, + cldnn::data_types::i32); + p.AddPrimitive(preprocessPrim); + p.AddInnerPrimitiveToProfiler(reorderPrimName, layerName, op); + reorderedInputs[portIndex] = reorderPrimName; + } else { + reorderedInputs[portIndex] = inputPrimitives[portIndex]; + } + } + + auto gatherTreePrim = cldnn::gather_tree(layerName, + reorderedInputs[0], + reorderedInputs[1], + reorderedInputs[2], + reorderedInputs[3]); + + p.AddPrimitive(gatherTreePrim); + p.AddPrimitiveToProfiler(op); +} + +REGISTER_FACTORY_IMPL(v1, GatherTree); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/gather.cpp b/inference-engine/src/cldnn_engine/ops/gather.cpp new file mode 100644 index 00000000000000..63cc05577d9f1a --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/gather.cpp @@ -0,0 +1,103 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/gather.hpp" + +#include "api/gather.hpp" +#include "api/reorder.hpp" + +namespace CLDNNPlugin { + +static cldnn::gather::gather_axis GetGatherAxis(int32_t axis, cldnn::format inputFormat) { + if (axis == 0) { + return cldnn::gather::gather_axis::along_b; + } else if (axis == 1) { + return cldnn::gather::gather_axis::along_f; + } + + if (inputFormat == cldnn::format::bfyx) { + switch (axis) { + case 2: return cldnn::gather::gather_axis::along_y; + case 3: return cldnn::gather::gather_axis::along_x; + case -1: return cldnn::gather::gather_axis::along_y; + case -2: return cldnn::gather::gather_axis::along_f; + case -3: return cldnn::gather::gather_axis::along_b; + default: THROW_IE_EXCEPTION << "Unsupported gather axis: " << axis; + } + } else if (inputFormat == cldnn::format::bfzyx) { + switch (axis) { + case 2: return cldnn::gather::gather_axis::along_z; + case 3: return cldnn::gather::gather_axis::along_y; + case 4: return cldnn::gather::gather_axis::along_x; + case -1: return cldnn::gather::gather_axis::along_y; + case -2: return cldnn::gather::gather_axis::along_z; + case -3: return cldnn::gather::gather_axis::along_f; + case -4: return cldnn::gather::gather_axis::along_b; + default: THROW_IE_EXCEPTION << "Unsupported gather axis: " << axis; + } + } else if (inputFormat == cldnn::format::bfwzyx) { + switch (axis) { + case 2: return cldnn::gather::gather_axis::along_w; + case 3: return cldnn::gather::gather_axis::along_z; + case 4: return cldnn::gather::gather_axis::along_y; + case 5: return cldnn::gather::gather_axis::along_x; + case -1: return cldnn::gather::gather_axis::along_y; + case -2: return cldnn::gather::gather_axis::along_z; + case -3: return cldnn::gather::gather_axis::along_w; + case -4: return cldnn::gather::gather_axis::along_f; + case -5: return cldnn::gather::gather_axis::along_b; + default: THROW_IE_EXCEPTION << "Unsupported gather axis: " << axis; + } + } else { + THROW_IE_EXCEPTION << "Unsupported gather axis: " << axis; + } +} + +void CreateGatherOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {2, 3}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + int32_t axis = static_cast(op->get_axis()); + + std::vector reorderedInputs; + reorderedInputs.resize(inputPrimitives.size()); + + for (size_t portIndex = 0; portIndex < inputPrimitives.size(); portIndex++) { + auto inputDataType = DataTypeFromPrecision(op->get_input_element_type(portIndex)); + if (inputDataType == cldnn::data_types::i64) { + // clDNN primitive does not support i64 inputs, + // so we need additional reorders to convert them to i32 + auto reorderPrimName = inputPrimitives[portIndex] + "_" + op->get_friendly_name() + Program::m_preProcessTag; + auto targetFormat = DefaultFormatForDims(op->get_input_shape(portIndex).size()); + auto preprocessPrim = cldnn::reorder(reorderPrimName, + inputPrimitives[portIndex], + targetFormat, + cldnn::data_types::i32); + p.AddPrimitive(preprocessPrim); + p.AddInnerPrimitiveToProfiler(reorderPrimName, layerName, op); + reorderedInputs[portIndex] = reorderPrimName; + } else { + reorderedInputs[portIndex] = inputPrimitives[portIndex]; + } + } + + auto outLayout = DefaultFormatForDims(op->get_output_shape(0).size()); + auto gatherPrim = cldnn::gather(layerName, + reorderedInputs[0], + reorderedInputs[1], + GetGatherAxis(axis, DefaultFormatForDims(op->get_input_shape(0).size())), + outLayout, + CldnnTensorFromIEDims(op->get_output_shape(0))); + + p.AddPrimitive(gatherPrim); + p.AddPrimitiveToProfiler(op); +} + +REGISTER_FACTORY_IMPL(v1, Gather); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/grn.cpp b/inference-engine/src/cldnn_engine/ops/grn.cpp new file mode 100644 index 00000000000000..5efadf0d2a6b02 --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/grn.cpp @@ -0,0 +1,30 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/grn.hpp" + +#include "api/grn.hpp" + +namespace CLDNNPlugin { + +void CreateGRNOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {1}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + auto primitive = cldnn::grn(layerName, + inputPrimitives[0], + op->get_bias(), + DataTypeFromPrecision(op->get_output_element_type(0))); + + p.AddPrimitive(primitive); + p.AddPrimitiveToProfiler(op); +} + +REGISTER_FACTORY_IMPL(v0, GRN); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/interpolate.cpp b/inference-engine/src/cldnn_engine/ops/interpolate.cpp new file mode 100644 index 00000000000000..d0c401669d39ad --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/interpolate.cpp @@ -0,0 +1,203 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" +#include "caseless.hpp" + +#include "ngraph/op/interpolate.hpp" +#include "ngraph/op/constant.hpp" + +#include "api/resample.hpp" + +namespace CLDNNPlugin { + +static cldnn::coordinate_transformation_mode GetCoordinateTransformationMode(ngraph::op::v4::Interpolate::CoordinateTransformMode mode) { + switch (mode) { + case ngraph::op::v4::Interpolate::CoordinateTransformMode::half_pixel: + return cldnn::coordinate_transformation_mode::half_pixel; + case ngraph::op::v4::Interpolate::CoordinateTransformMode::pytorch_half_pixel: + return cldnn::coordinate_transformation_mode::pytorch_half_pixel; + case ngraph::op::v4::Interpolate::CoordinateTransformMode::asymmetric: + return cldnn::coordinate_transformation_mode::asymmetric; + case ngraph::op::v4::Interpolate::CoordinateTransformMode::tf_half_pixel_for_nn: + return cldnn::coordinate_transformation_mode::tf_half_pixel_for_nn; + case ngraph::op::v4::Interpolate::CoordinateTransformMode::align_corners: + return cldnn::coordinate_transformation_mode::align_corners; + } + + THROW_IE_EXCEPTION << "Unknown coordinate transformation mode: " << static_cast(mode); +} + +static cldnn::nearest_mode GetNearestMode(ngraph::op::v4::Interpolate::NearestMode mode) { + switch (mode) { + case ngraph::op::v4::Interpolate::NearestMode::round_prefer_floor: + return cldnn::nearest_mode::round_prefer_floor; + case ngraph::op::v4::Interpolate::NearestMode::round_prefer_ceil: + return cldnn::nearest_mode::round_prefer_ceil; + case ngraph::op::v4::Interpolate::NearestMode::floor: + return cldnn::nearest_mode::floor; + case ngraph::op::v4::Interpolate::NearestMode::ceil: + return cldnn::nearest_mode::ceil; + case ngraph::op::v4::Interpolate::NearestMode::simple: + return cldnn::nearest_mode::simple; + } + + THROW_IE_EXCEPTION << "Unknown nearest mode: " << static_cast(mode); +} + +static cldnn::shape_calculation_mode GetShapeCalculationMode(ngraph::op::v4::Interpolate::ShapeCalcMode mode) { + switch (mode) { + case ngraph::op::v4::Interpolate::ShapeCalcMode::sizes: return cldnn::shape_calculation_mode::sizes; + case ngraph::op::v4::Interpolate::ShapeCalcMode::scales: return cldnn::shape_calculation_mode::scales; + } + THROW_IE_EXCEPTION << "Unknown shape calculation mode: " << static_cast(mode); +} + +static cldnn::resample_type GetResampleType(ngraph::op::v4::Interpolate::InterpolateMode mode) { + switch (mode) { + case ngraph::op::v4::Interpolate::InterpolateMode::nearest: return cldnn::resample_type::nearest; + case ngraph::op::v4::Interpolate::InterpolateMode::linear: return cldnn::resample_type::caffe_bilinear; + case ngraph::op::v4::Interpolate::InterpolateMode::linear_onnx: return cldnn::resample_type::linear_onnx; + case ngraph::op::v4::Interpolate::InterpolateMode::cubic: return cldnn::resample_type::cubic; + } + THROW_IE_EXCEPTION << "Unknown interpolation mode: " << static_cast(mode); +} + +static cldnn::resample::resample_axis GetInterpolationAxis(int32_t axis, uint32_t sz) { + if (axis < 0) + axis += sz; + if (axis < 0 || axis >= sz) + THROW_IE_EXCEPTION << "Interpolate axis is not correspond to number of dimensions"; + + // Difference in dimension ordering between IE and clDNN, + // reverse spatial dimensions after batch and feature. + uint32_t cldnn_axis = axis; + if (axis >= 2) { + auto spatial_axis = axis - 2; + // Default and minimum number of dimensions is 4 + auto spatial_size = std::max(sz, 4u) - 2; + cldnn_axis = spatial_size - spatial_axis - 1 + 2; + } + + switch (cldnn_axis) { + case 0: + return cldnn::resample::resample_axis::along_b; + case 1: + return cldnn::resample::resample_axis::along_f; + case 2: + return cldnn::resample::resample_axis::along_x; + case 3: + return cldnn::resample::resample_axis::along_y; + case 4: + return cldnn::resample::resample_axis::along_z; + case 5: + return cldnn::resample::resample_axis::along_w; + default: + break; + } + THROW_IE_EXCEPTION << "Unsupported Interpolate axis: " << axis; +} + +void CreateInterpolateOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {3, 4}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + static const size_t SCALES_INDEX = 2; + static const size_t AXES_INDEX = 3; + + auto attrs = op->get_attrs(); + auto inputRank = op->get_input_shape(0).size(); + auto outDims = op->get_output_shape(0).size(); + auto outTensor = CldnnTensorFromIEDims(op->get_output_shape(0)); + + std::vector pad_begin(attrs.pads_begin.begin(), attrs.pads_begin.end()); + std::vector pad_end(attrs.pads_end.begin(), attrs.pads_end.end()); + + for (size_t i = pad_begin.size(); i < outDims || i < 4; ++i) + pad_begin.push_back(0); + for (size_t i = pad_end.size(); i < outDims || i < 4; ++i) + pad_end.push_back(0); + + int antialias = attrs.antialias; + float cube_coeff = attrs.cube_coeff; + + auto cldnnSampleType = GetResampleType(attrs.mode); + auto shapeCalcMode = GetShapeCalculationMode(attrs.shape_calculation_mode); + auto coordTransMode = GetCoordinateTransformationMode(attrs.coordinate_transformation_mode); + auto nearestMode = GetNearestMode(attrs.nearest_mode); + + auto scales_constant = std::dynamic_pointer_cast(op->get_input_node_shared_ptr(SCALES_INDEX)); + if (!scales_constant) { + THROW_IE_EXCEPTION << "Unsupported parameter node type in " << op->get_friendly_name() << " (" << op->get_type_name() << ")"; + } + std::vector scales = scales_constant->cast_vector(); + + std::vector axes; + if (op->get_input_size() == 4) { + auto axes_constant = std::dynamic_pointer_cast(op->get_input_node_shared_ptr(AXES_INDEX)); + if (!axes_constant) { + THROW_IE_EXCEPTION << "Unsupported parameter node type in " << op->get_friendly_name() << " (" << op->get_type_name() << ")"; + } + auto ie_axes = axes_constant->cast_vector(); + for (auto axis : ie_axes) { + axes.push_back(GetInterpolationAxis(axis, inputRank)); + } + } else { + for (int i = 0; i < inputRank; ++i) { + axes.push_back(GetInterpolationAxis(i, inputRank)); + } + } + + if (axes.size() != scales.size()) + THROW_IE_EXCEPTION << op->get_friendly_name() << " Incorrect axes and scales should be the same size"; + + cldnn::resample::AxesAndScales axesAndScales; + for (size_t i = 0; i < axes.size(); ++i) { + axesAndScales[axes[i]] = scales[i]; + } + + if (cldnnSampleType == cldnn::resample_type::linear_onnx) { + if (inputRank != 2 && inputRank != 4) + THROW_IE_EXCEPTION << "mode 'linear_onnx' supports only 2D or 4D tensors"; + if (axes.size() != 2 && inputRank != axes.size()) + THROW_IE_EXCEPTION << "mode 'linear_onnx' supports only axes with size 2 or equal to input rank"; + bool correctAxes = + ((axes[0] == cldnn::resample::resample_axis::along_b) && + (axes[1] == cldnn::resample::resample_axis::along_f)) || + ((axes[0] == cldnn::resample::resample_axis::along_y) && + (axes[1] == cldnn::resample::resample_axis::along_x)); + if (axes.size() == 4 && inputRank == 4) { + correctAxes = axes[0] == cldnn::resample::resample_axis::along_b && + axes[1] == cldnn::resample::resample_axis::along_f && + axes[2] == cldnn::resample::resample_axis::along_y && + axes[3] == cldnn::resample::resample_axis::along_x; + } + if (!correctAxes) + THROW_IE_EXCEPTION << + "mode 'linear_onnx' supports only case when axes = {2, 3} or " + "axes = {0, 1} or axes = {0, 1, 2, 3}"; + } + + auto resamplePrim = cldnn::resample(layerName, + inputPrimitives[0], + outTensor, + axesAndScales, + pad_begin, + pad_end, + antialias, + cube_coeff, + cldnnSampleType, + shapeCalcMode, + coordTransMode, + nearestMode); + + p.AddPrimitive(resamplePrim); + p.AddPrimitiveToProfiler(op); +} + +REGISTER_FACTORY_IMPL(v4, Interpolate); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/lrn.cpp b/inference-engine/src/cldnn_engine/ops/lrn.cpp new file mode 100644 index 00000000000000..99de8080f9d302 --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/lrn.cpp @@ -0,0 +1,49 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/lrn.hpp" +#include "ngraph/op/constant.hpp" + +#include "api/lrn.hpp" + +namespace CLDNNPlugin { + +static cldnn::lrn_norm_region GetNormRegion(std::vector axis_value) { + if (axis_value.size() == 1 && axis_value[0] == 1) { + return cldnn::lrn_norm_region_across_channel; + } else { + return cldnn::lrn_norm_region_within_channel; + } +} + +void CreateLRNOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {2}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + auto axis_const = std::dynamic_pointer_cast(op->get_input_node_shared_ptr(1)); + if (!axis_const) { + THROW_IE_EXCEPTION << "Unsupported axes node type in " << op->get_friendly_name() << " (" << op->get_type_name() << ")"; + } + auto axis_value = axis_const->cast_vector(); + auto localSize = op->get_nsize(); + + auto lrnPrim = cldnn::lrn(layerName, + inputPrimitives[0], + localSize, + static_cast(op->get_bias()), + static_cast(op->get_alpha()), + static_cast(op->get_beta()), + GetNormRegion(axis_value)); + + p.AddPrimitive(lrnPrim); + p.AddPrimitiveToProfiler(op); +} + +REGISTER_FACTORY_IMPL(v0, LRN); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/matmul.cpp b/inference-engine/src/cldnn_engine/ops/matmul.cpp new file mode 100644 index 00000000000000..8f7753c6c060fa --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/matmul.cpp @@ -0,0 +1,248 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/matmul.hpp" +#include "ngraph/op/constant.hpp" +#include "ngraph/op/fake_quantize.hpp" + +#include "api/gemm.hpp" +#include "api/fully_connected.hpp" +#include "api/reshape.hpp" +#include "api/reorder.hpp" +#include "api/permute.hpp" + +namespace CLDNNPlugin { + +/* +* get_aligned_shapes function align two input shapes to have the same size and +* the same batch dimensions (last two dimensions are not comparable). +* It also checks that dimensions are compatible so in case with two shapes +* for example: [2, 32, 64] [3, 64, 64] it will raise an exception. +*/ + +static std::pair get_aligned_shapes(const ngraph::Shape& shape_a, + const ngraph::Shape& shape_b, + const std::shared_ptr& matmul) { + ngraph::Shape shape_a_aligned(shape_a), shape_b_aligned(shape_b); + size_t max_size = std::max(shape_a_aligned.size(), shape_b_aligned.size()); + for (size_t i = 0, cnt = max_size - shape_a_aligned.size(); i < cnt; ++i) + shape_a_aligned.insert(shape_a_aligned.begin(), 1); + for (size_t i = 0, cnt = max_size - shape_b_aligned.size(); i < cnt; ++i) + shape_b_aligned.insert(shape_b_aligned.begin(), 1); + + if (matmul->get_transpose_a()) { + std::swap(*(shape_a_aligned.end() - 1), *(shape_a_aligned.end() - 2)); + } + if (matmul->get_transpose_b()) { + std::swap(*(shape_b_aligned.end() - 1), *(shape_b_aligned.end() - 2)); + } + + for (size_t i = 0; i < max_size - 2; ++i) { + if (shape_a_aligned[i] != shape_b_aligned[i] && shape_a_aligned[i] > 1 && shape_b_aligned[i] > 1) { + THROW_IE_EXCEPTION << "Shapes can't be aligned: " << shape_a_aligned << " " << shape_b_aligned; + } + size_t max_value = std::max(shape_a_aligned[i], shape_b_aligned[i]); + shape_a_aligned[i] = shape_b_aligned[i] = max_value; + } + + return {shape_a_aligned, shape_b_aligned}; +} + +void CreateMatMulOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {2}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + auto shape_a = op->get_input_shape(0); + auto shape_b = op->get_input_shape(1); + + bool is_fc = ngraph::is_type(op->get_input_node_shared_ptr(1)) || + ngraph::is_type(op->get_input_node_shared_ptr(1)); + is_fc &= std::count_if(shape_b.begin(), shape_b.end(), [](size_t x) { return x != 1; }) <= 2; + + if (is_fc) { + ngraph::Shape shape_a_aligned, shape_b_aligned; + std::tie(shape_a_aligned, shape_b_aligned) = get_aligned_shapes(shape_a, shape_b, op); + if (shape_a_aligned.size() < 2 || shape_b_aligned.size() < 2) { + THROW_IE_EXCEPTION << "MatMul " << op->get_friendly_name() << " shapes are inconsistent."; + } + size_t K = *(shape_a_aligned.end() - 1); + size_t O = *(shape_b_aligned.end() - 1); + + auto inputName = inputPrimitives[0]; + auto weightsName = inputPrimitives[1]; + // Weights normalization + if (!op->get_transpose_b()) { + ngraph::Shape output_shape = shape_b; + std::vector transpose_order(output_shape.size()); + std::iota(transpose_order.begin(), transpose_order.end(), 0); + std::swap(*(transpose_order.end() - 1), *(transpose_order.end() - 2)); + + for (auto o = transpose_order.size(); o < 4; o++) + transpose_order.push_back((uint16_t)o); + + auto permuteName = op->get_friendly_name() + "/transpose_b"; + auto permutePrim = cldnn::permute(permuteName, + weightsName, + transpose_order); + p.AddPrimitive(permutePrim); + p.AddInnerPrimitiveToProfiler(permuteName, layerName, op); + weightsName = permuteName; + } + + // Input normalization + if (op->get_transpose_a()) { + ngraph::Shape output_shape = shape_a; + std::vector transpose_order(output_shape.size()); + std::iota(transpose_order.begin(), transpose_order.end(), 0); + std::swap(*(transpose_order.end() - 1), *(transpose_order.end() - 2)); + + for (auto o = transpose_order.size(); o < 4; o++) + transpose_order.push_back((uint16_t)o); + + auto permuteName = op->get_friendly_name() + "/transpose_a"; + auto permutePrim = cldnn::permute(permuteName, + inputName, + transpose_order); + p.AddPrimitive(permutePrim); + p.AddInnerPrimitiveToProfiler(permuteName, layerName, op); + inputName = permuteName; + } + + bool reshape_fc = shape_a_aligned.size() > 3; + + auto reshape_to_2d = [&](const ngraph::Shape& shape, std::string inputName, size_t features, std::string suffix) -> std::string { + auto total = std::accumulate(shape.begin(), shape.end(), 1, std::multiplies()); + std::vector reshapeSize = { total / features, features }; + + if (total != reshapeSize[0] * reshapeSize[1]) + THROW_IE_EXCEPTION << "Inconsistent reshape in Matmul op: " << op->get_friendly_name(); + + auto reshapeInName = op->get_friendly_name() + suffix; + auto reshapeInPrim = cldnn::reshape(reshapeInName, inputName, CldnnTensorFromIEDims(reshapeSize)); + p.AddPrimitive(reshapeInPrim); + p.AddInnerPrimitiveToProfiler(reshapeInName, layerName, op); + return reshapeInName; + }; + + if (reshape_fc) { + inputName = reshape_to_2d(shape_a, inputName, shape_a.back(), "_cldnn_reshape_in"); + weightsName = reshape_to_2d(shape_b, weightsName, K, "_cldnn_reshape_weights"); + } + + auto fcPrim = cldnn::fully_connected(layerName, + inputName, + weightsName, + "", + DataTypeFromPrecision(op->get_output_element_type(0)), + cldnn::padding(), + op->get_output_shape(0).size()); + + p.AddPrimitive(fcPrim); + + auto lastLayerName = layerName; + if (reshape_fc) { + auto outputShape = CldnnTensorFromIEDims(op->get_output_shape(0)); + auto outReshapeName = layerName + "_cldnn_out_reshape"; + auto outReshapePrim = cldnn::reshape(outReshapeName, layerName, outputShape); + + p.AddPrimitive(outReshapePrim); + p.AddInnerPrimitiveToProfiler(outReshapeName, layerName, op); + + lastLayerName = outReshapeName; + } + + p.AddPrimitiveToProfiler(op, lastLayerName); + } else { + auto outDims = op->get_output_shape(0); + auto outDimsN = outDims.size(); + + auto gemmSpecificTensor = [](const InferenceEngine::SizeVector& dims) { + switch (dims.size()) { + case 2: return cldnn::tensor(cldnn::spatial(dims[1], dims[0])); + case 3: return cldnn::tensor(cldnn::batch(dims[0]), cldnn::spatial(dims[2], dims[1])); + case 4: return cldnn::tensor(cldnn::batch(dims[0]), cldnn::feature(dims[1]), cldnn::spatial(dims[3], dims[2])); + case 5: return cldnn::tensor(cldnn::batch(dims[0]), cldnn::feature(dims[1]), cldnn::spatial(dims[4], dims[3], dims[2])); + case 6: return cldnn::tensor(cldnn::batch(dims[0]), cldnn::feature(dims[1]), cldnn::spatial(dims[5], dims[4], dims[3], dims[2])); + default: THROW_IE_EXCEPTION << "Invalid dimensions size(" << dims.size() << ") for Gemm layer"; + } + }; + + // Preprocess inputs + for (size_t i = 0; i < inputPrimitives.size(); ++i) { + auto inputDims = op->get_input_shape(i); + auto inputDimsN = inputDims.size(); + + // Add reorder if changing number of dimensions requires changing format + auto targetFormat = DefaultFormatForDims(outDimsN); + + if (targetFormat.value != DefaultFormatForDims(inputDimsN).value) { + auto reorderName = layerName + "_cldnn_in" + std::to_string(i) + "_reorder"; + auto targetDatatype = DataTypeFromPrecision(op->get_output_element_type(0)); + auto reorderPrim = cldnn::reorder(reorderName, inputPrimitives[i], targetFormat, targetDatatype); + + p.AddPrimitive(reorderPrim); + p.AddInnerPrimitiveToProfiler(reorderName, layerName, op); + + inputPrimitives[i] = reorderName; + } + + // Reshape input if they differ or gemm specific shape matches default one + if (inputDimsN != outDimsN || inputDimsN < 4) { + auto reshapeName = layerName + "_cldnn_in" + std::to_string(i) + "_reshape"; + + // Extend input dimensions by prepending ones + inputDims.insert(inputDims.begin(), outDimsN - inputDimsN, 1ul); + + auto targetShape = gemmSpecificTensor(inputDims); + + auto reshapePrim = cldnn::reshape(reshapeName, inputPrimitives[i], targetShape); + + p.AddPrimitive(reshapePrim); + p.AddInnerPrimitiveToProfiler(reshapeName, layerName, op); + + inputPrimitives[i] = reshapeName; + } + } + + // Add actual gemm + auto alpha = 1.0f; + auto beta = 0.0f; + auto transA = op->get_transpose_a(); + auto transB = op->get_transpose_b(); + + auto gemmPrim = cldnn::gemm(layerName, + inputPrimitives, + DataTypeFromPrecision(op->get_output_element_type(0)), + transA, + transB, + alpha, + beta); + + p.AddPrimitive(gemmPrim); + + auto lastLayerName = layerName; + + // Reshape output if gemm specific shape does not match default one + if (outDimsN < 4) { + auto outputShape = CldnnTensorFromIEDims(outDims); + auto outReshapeName = layerName + "_cldnn_out_reshape"; + auto outReshapePrim = cldnn::reshape(outReshapeName, layerName, outputShape); + + p.AddPrimitive(outReshapePrim); + p.AddInnerPrimitiveToProfiler(outReshapeName, layerName, op); + + lastLayerName = outReshapeName; + } + + p.AddPrimitiveToProfiler(op, lastLayerName); + } +} + +REGISTER_FACTORY_IMPL(v0, MatMul); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/mvn.cpp b/inference-engine/src/cldnn_engine/ops/mvn.cpp new file mode 100644 index 00000000000000..94973c9584b04d --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/mvn.cpp @@ -0,0 +1,38 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/mvn.hpp" + +#include "api/mvn.hpp" + +namespace CLDNNPlugin { + +void CreateMVNOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {1}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + const size_t chanelAxis = 1; + ngraph::AxisSet reductionAxes = op->get_reduction_axes(); + // FIXME: op->get_across_channels(); doesn't work for some reason. Is it expected? + bool across_channels = reductionAxes.count(chanelAxis) > 0; + bool normalize_variance = op->get_normalize_variance(); + float eps = op->get_eps(); + + auto mvnPrim = cldnn::mvn(layerName, + inputPrimitives[0], + across_channels, + normalize_variance, + eps); + + p.AddPrimitive(mvnPrim); + p.AddPrimitiveToProfiler(op); +} + +REGISTER_FACTORY_IMPL(v0, MVN); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/non_max_suppression.cpp b/inference-engine/src/cldnn_engine/ops/non_max_suppression.cpp new file mode 100644 index 00000000000000..5720c75e0d60d7 --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/non_max_suppression.cpp @@ -0,0 +1,163 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/non_max_suppression.hpp" +#include +#include + +#include "api/reorder.hpp" +#include "api/mutable_data.hpp" +#include "api/non_max_suppression.hpp" + +namespace CLDNNPlugin { + +static bool GetCenterPointBox(ngraph::op::v5::NonMaxSuppression::BoxEncodingType encoding) { + switch (encoding) { + case ::ngraph::op::v5::NonMaxSuppression::BoxEncodingType::CENTER: return true; + case ::ngraph::op::v5::NonMaxSuppression::BoxEncodingType::CORNER: return false; + default: THROW_IE_EXCEPTION << "NonMaxSuppression layer has unsupported box encoding"; + } + return false; +} + +void CreateNonMaxSuppressionIEInternalOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {2, 3, 4, 5, 6}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + + std::vector reorderedInputs; + reorderedInputs.resize(inputPrimitives.size()); + + for (size_t portIndex = 0; portIndex < inputPrimitives.size(); portIndex++) { + auto inputDataType = DataTypeFromPrecision(op->get_input_element_type(portIndex)); + if ((portIndex == 2) && (inputDataType == cldnn::data_types::i64)) { + // clDNN primitive supports only i32 data type for 'max_output_boxes_per_class' input + // so we need additional reorder if it's provided as i64 + auto reorderPrimName = inputPrimitives[portIndex] + "_" + op->get_friendly_name() + Program::m_preProcessTag; + auto targetFormat = DefaultFormatForDims(op->get_input_shape(portIndex).size()); + auto preprocessPrim = cldnn::reorder(reorderPrimName, + inputPrimitives[portIndex], + targetFormat, + cldnn::data_types::i32); + p.AddPrimitive(preprocessPrim); + p.AddInnerPrimitiveToProfiler(reorderPrimName, layer_type_name_ID(op), op); + reorderedInputs[portIndex] = (reorderPrimName); + } else { + reorderedInputs[portIndex] = inputPrimitives[portIndex]; + } + } + + // clDNN primitive supports only i32 as output data type + auto out_type = op->get_output_element_type(0); + if (out_type == ngraph::element::i64) { + out_type = ngraph::element::i32; + } + + auto outputIndices = op->get_output_shape(0)[0]; + + auto boxesShape = op->get_input_shape(0); + int32_t num_batches = boxesShape.at(0); + int32_t num_boxes = boxesShape.at(1); + + auto scoresShape = op->get_input_shape(1); + int32_t num_classes = scoresShape.at(1); + + std::size_t num_output = op->get_output_size(); + + std::vector shared_memory; + switch (num_output) { + case 3: { + auto mutable_precision_second = op->get_output_element_type(2); + if (mutable_precision_second == ngraph::element::i64) { + mutable_precision_second = ngraph::element::i32; + } + cldnn::layout mutableLayoutSecond = cldnn::layout( + DataTypeFromPrecision(mutable_precision_second), + DefaultFormatForDims(op->get_output_shape(2).size()), + CldnnTensorFromIEDims(op->get_output_shape(2))); + + shared_memory.emplace_back(cldnn::memory::allocate(p.GetEngine(), mutableLayoutSecond)); + + cldnn::primitive_id non_max_supression_mutable_id_w_second = layer_type_name_ID(op) + "_md_write_second"; + auto nms_mutable_prim_second = cldnn::mutable_data(non_max_supression_mutable_id_w_second, shared_memory.back()); + p.primitivesToIRLayersMap[non_max_supression_mutable_id_w_second] = { op->get_friendly_name() }; + p.primitiveIDs[non_max_supression_mutable_id_w_second] = non_max_supression_mutable_id_w_second; + p.AddPrimitive(nms_mutable_prim_second); + inputPrimitives.push_back(non_max_supression_mutable_id_w_second); + } + case 2: { + auto mutable_precision_first = op->get_output_element_type(1); + + cldnn::layout mutableLayoutFirst = cldnn::layout( + DataTypeFromPrecision(mutable_precision_first), + cldnn::format::bfyx, + cldnn::tensor(outputIndices, 3, 1, 1)); + + shared_memory.emplace_back(cldnn::memory::allocate(p.GetEngine(), mutableLayoutFirst)); + + cldnn::primitive_id non_max_supression_mutable_id_w_first = layer_type_name_ID(op) + "_md_write_first"; + auto nms_mutable_prim_first = cldnn::mutable_data(non_max_supression_mutable_id_w_first, shared_memory.back()); + p.primitivesToIRLayersMap[non_max_supression_mutable_id_w_first] = { op->get_friendly_name() }; + p.primitiveIDs[non_max_supression_mutable_id_w_first] = non_max_supression_mutable_id_w_first; + p.AddPrimitive(nms_mutable_prim_first); + inputPrimitives.push_back(non_max_supression_mutable_id_w_first); + } + case 1: break; + default: THROW_IE_EXCEPTION << "Incorrect number of output for layer: " << op->get_friendly_name(); + } + + auto nonMaxSupressionLayerName = num_output > 1 ? layer_type_name_ID(op) + ".0" : layer_type_name_ID(op); + auto prim = cldnn::non_max_suppression( + nonMaxSupressionLayerName, + reorderedInputs[0], + reorderedInputs[1], + static_cast(outputIndices), + op->m_center_point_box, + op->m_sort_result_descending); + + prim.output_data_type = DataTypeFromPrecision(out_type); + + switch (reorderedInputs.size()) { + case 6: prim.soft_nms_sigma = reorderedInputs[5]; + case 5: prim.score_threshold = reorderedInputs[4]; + case 4: prim.iou_threshold = reorderedInputs[3]; + case 3: prim.num_select_per_class = reorderedInputs[2]; + case 2: break; + default: THROW_IE_EXCEPTION << "Incorrect number of input primitives for layer: " << op->get_friendly_name(); + } + + switch (num_output) { + case 3: prim.third_output = inputPrimitives[inputPrimitives.size() - 2]; + case 2: prim.second_output = inputPrimitives[inputPrimitives.size() - 1]; + default: break; + } + + p.AddPrimitive(prim); + + switch (num_output) { + case 3: { + cldnn::primitive_id non_max_supression_id_r_second = layer_type_name_ID(op) + ".2"; + auto nms_mutable_prim_r_second = cldnn::mutable_data(non_max_supression_id_r_second, { nonMaxSupressionLayerName }, shared_memory.front()); + p.primitivesToIRLayersMap[non_max_supression_id_r_second] = { op->get_friendly_name() }; + p.primitiveIDs[non_max_supression_id_r_second] = non_max_supression_id_r_second; + p.AddPrimitive(nms_mutable_prim_r_second); + } + case 2: { + cldnn::primitive_id non_max_supression_id_r_first = layer_type_name_ID(op) + ".1"; + auto nms_mutable_prim_r_first = cldnn::mutable_data(non_max_supression_id_r_first, { nonMaxSupressionLayerName }, shared_memory.back()); + p.primitivesToIRLayersMap[non_max_supression_id_r_first] = { op->get_friendly_name() }; + p.primitiveIDs[non_max_supression_id_r_first] = non_max_supression_id_r_first; + p.AddPrimitive(nms_mutable_prim_r_first); + } + default: break; + } + + p.AddPrimitiveToProfiler(nonMaxSupressionLayerName, op); +} + +REGISTER_FACTORY_IMPL(internal, NonMaxSuppressionIEInternal); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/normalize_l2.cpp b/inference-engine/src/cldnn_engine/ops/normalize_l2.cpp new file mode 100644 index 00000000000000..34ec375b5d7660 --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/normalize_l2.cpp @@ -0,0 +1,63 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/normalize_l2.hpp" +#include "ngraph/op/constant.hpp" + +#include "api/normalize.hpp" +#include "api/data.hpp" + +namespace CLDNNPlugin { + +void CreateNormalizeL2Op(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {2}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + // params + auto const_axis = std::dynamic_pointer_cast(op->get_input_node_shared_ptr(1)); + if (!const_axis) + THROW_IE_EXCEPTION << "Unsupported axis node type in " << op->get_friendly_name() << " (" << op->get_type_name() << ")"; + + auto axis = const_axis->cast_vector(); + bool across_spatial = !(axis.size() == 1 && axis[0] == 1); + float eps = op->get_eps(); + + // WA for MO outputting %.6f + if (eps == 0.0f) { + eps = 1e-10f; + } + + // We create fake scale constant and fill it with ones to keep the same behavior as current primitive + auto scale = std::make_shared(op->get_output_element_type(0), ngraph::Shape{1}, std::vector{1.0}); + cldnn::layout constLayout = cldnn::layout(DataTypeFromPrecision(op->get_output_element_type(0)), cldnn::format::bfyx, cldnn::tensor{1}); + auto mem = cldnn::memory::allocate(p.GetEngine(), constLayout, 0, false); + auto tmpPointer = mem.pointer(); // implicitly maps buffer - unmap in destructor + auto buf = tmpPointer.data(); + auto bufSize = scale->get_output_tensor(0).size(); + + if (bufSize != constLayout.bytes_count()) + THROW_IE_EXCEPTION << "Invalid scales buffer in NormalizeL2 op " << op->get_friendly_name(); + + std::memcpy(&buf[0], scale->get_data_ptr(), bufSize); + auto scalesName = layerName + "_cldnn_input_scales"; + p.AddPrimitive(cldnn::data(scalesName, mem)); + p.AddInnerPrimitiveToProfiler(scalesName, layerName, op); + + auto normPrim = cldnn::normalize(layerName, + inputPrimitives[0], + scalesName, + across_spatial, + eps); + + p.AddPrimitive(normPrim); + p.AddPrimitiveToProfiler(op); +} + +REGISTER_FACTORY_IMPL(v0, NormalizeL2); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/one_hot.cpp b/inference-engine/src/cldnn_engine/ops/one_hot.cpp new file mode 100644 index 00000000000000..bdb1b66cada796 --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/one_hot.cpp @@ -0,0 +1,64 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" +#include "transformations/utils/utils.hpp" + +#include "ngraph/op/one_hot.hpp" + +#include "api/one_hot.hpp" + +namespace CLDNNPlugin { + +void CreateOneHotOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {4}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + int16_t axis = op->get_axis(); + auto on_value_node = std::dynamic_pointer_cast(op->get_input_node_shared_ptr(2)); + auto off_value_node = std::dynamic_pointer_cast(op->get_input_node_shared_ptr(3)); + + if (on_value_node == nullptr || off_value_node == nullptr) + THROW_IE_EXCEPTION << "Unsupported on/off node type in " << op->get_friendly_name() << " (" << op->get_type_name() << ")"; + + float on_value; + float off_value; + + if (!ngraph::op::util::get_single_value(on_value_node, on_value) || + !ngraph::op::util::get_single_value(off_value_node, off_value)) { + THROW_IE_EXCEPTION << "Unsupported parameter size in " << op->get_friendly_name() << " (" << op->get_type_name() << ")"; + } + + auto dims = op->get_input_shape(0); + + if (axis < -1 || axis > static_cast(dims.size())) + THROW_IE_EXCEPTION << op->get_friendly_name() << " Incorrect OneHot axis value: " << axis << ". Should be between -1 and " << dims.size(); + + if (axis == -1) { + axis = dims.size(); + for (int i = dims.size() - 1; i >= 0; i--) { + if (dims[i] == 1) + axis--; + else + break; + } + } + + auto oneHotPrim = cldnn::one_hot(layerName, + inputPrimitives[0], + CldnnTensorFromIEDims(op->get_output_shape(0)), + DataTypeFromPrecision(op->get_output_element_type(0)), + static_cast(axis), + on_value, + off_value); + + p.AddPrimitive(oneHotPrim); + p.AddPrimitiveToProfiler(op); +} + +REGISTER_FACTORY_IMPL(v1, OneHot); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/pad.cpp b/inference-engine/src/cldnn_engine/ops/pad.cpp new file mode 100644 index 00000000000000..d9bc215cc4f924 --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/pad.cpp @@ -0,0 +1,75 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" +#include "transformations/utils/utils.hpp" + +#include "ngraph/op/pad.hpp" + +#include "api/border.hpp" + +namespace CLDNNPlugin { + +static cldnn::border_type GetBorderType(ngraph::op::PadMode mode) { + switch (mode) { + case ngraph::op::PadMode::CONSTANT: return cldnn::border_type::constant; + case ngraph::op::PadMode::EDGE: return cldnn::border_type::edge; + case ngraph::op::PadMode::REFLECT: return cldnn::border_type::mirror_101; + case ngraph::op::PadMode::SYMMETRIC: return cldnn::border_type::mirror; + default: THROW_IE_EXCEPTION << "Invalid border mode " << mode << " in layer "; + } + return cldnn::border_type::constant; +} + +static std::vector GetPermuteOrder(const ngraph::CoordinateDiff& ie_order) { + std::vector cldnn_order(ie_order.begin(), ie_order.end()); + + // 1. Align to min. 4 sizes + if (cldnn_order.size() < 4) + cldnn_order.push_back(0); + + // 2. Swap spatial positions + for (int i = 0; i < (cldnn_order.size() - 2) / 2; i++) { + std::swap(cldnn_order[2 + i], cldnn_order[1 + cldnn_order.size() - (2 + i)]); + } + + return cldnn_order; +} + +void CreatePadOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {3, 4}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + auto pads_begin = cldnn::tensor(GetPermuteOrder(op->get_pads_begin()), 0); + auto pads_end = cldnn::tensor(GetPermuteOrder(op->get_pads_end()), 0); + float pad_value = 0.f; + + if (op->get_input_size() == 4) { + auto const_node = std::dynamic_pointer_cast(op->get_input_node_shared_ptr(3)); + if (!const_node) { + THROW_IE_EXCEPTION << "Unsupported const node type in " << op->get_friendly_name() << " (" << op->get_type_name() << ")"; + } + if (!ngraph::op::util::get_single_value(const_node, pad_value)) { + THROW_IE_EXCEPTION << "Unsupported pad value in " << op->get_friendly_name() << " (" << op->get_type_name() << ")"; + } + } + + cldnn::border_type border_mode = GetBorderType(op->get_pad_mode()); + + auto tilePrim = cldnn::border(layerName, + inputPrimitives[0], + pads_begin, + pads_end, + border_mode, + pad_value); + + p.AddPrimitive(tilePrim); + p.AddPrimitiveToProfiler(op); +} + +REGISTER_FACTORY_IMPL(v1, Pad); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/parameter.cpp b/inference-engine/src/cldnn_engine/ops/parameter.cpp new file mode 100644 index 00000000000000..57cd325b8d44d4 --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/parameter.cpp @@ -0,0 +1,257 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/parameter.hpp" + +#include "api/input_layout.hpp" +#include "api/reorder.hpp" +#include "api/data.hpp" + +using namespace InferenceEngine; + +namespace CLDNNPlugin { + +void CreateParameterOp(Program& p, const std::shared_ptr& op) { + auto networkInputs = p.GetNetworkInputs(); + if (networkInputs.find(op->get_friendly_name()) == networkInputs.end()) { + THROW_IE_EXCEPTION << "Can't find input " << op->get_friendly_name() << " in InputsDataMap"; + } + + auto inputInfo = networkInputs.at(op->get_friendly_name()); + // first create and add the input layout + const auto inputDesc = inputInfo->getTensorDesc(); + const auto inputDims = inputDesc.getDims(); + Layout l = inputDesc.getLayout(); + Precision ip = inputDesc.getPrecision(); + + cldnn::format inputFormat = cldnn::format::bfyx; + if (Layout::BLOCKED == l && 6 == inputDims.size()) { + inputFormat = cldnn::format::bfwzyx; + } else { + inputFormat = FormatFromLayout(l); + } + + cldnn::tensor dataTensor; + cldnn::tensor::value_type batch = (p.m_max_batch <= 1) + ? (inputDims.size() > 3 ? TensorValue(inputDims[0]) : 1) + : TensorValue(p.m_curBatch); + switch (inputDims.size()) { + case 6: + dataTensor = cldnn::tensor(cldnn::batch(batch), + cldnn::feature(inputDims[1]), + cldnn::spatial(inputDims[5], inputDims[4], inputDims[3], inputDims[2])); + break; + case 5: + if (Layout::NCDHW == l) { + dataTensor = cldnn::tensor(cldnn::batch(batch), + cldnn::feature(inputDims[1]), + cldnn::spatial(inputDims[4], inputDims[3], inputDims[2])); + } else { + THROW_IE_EXCEPTION << "Unsupported layout (" << l << ") in 5D input " << inputInfo->name(); + } + break; + case 4: + if (Layout::NCHW == l || Layout::CHW == l) { + dataTensor = cldnn::tensor(batch, + TensorValue(inputDims[1]), TensorValue(inputDims[3]), TensorValue(inputDims[2])); + } else if (Layout::NHWC == l) { + dataTensor = cldnn::tensor(batch, + TensorValue(inputDims[1]), TensorValue(inputDims[3]), TensorValue(inputDims[2])); + } else { + THROW_IE_EXCEPTION << "Unsupported layout (" << l << ") in 4D input " + inputInfo->name(); + } + break; + case 3: + if (Layout::CHW == l) { + dataTensor = cldnn::tensor(TensorValue(inputDims[0]), TensorValue(inputDims[1]), 1, TensorValue(inputDims[2])); + } else { + THROW_IE_EXCEPTION << "Unsupported layout (" << l << ") in 3D input " + inputInfo->name(); + } + break; + case 2: + if (Layout::NCHW == l || NC == l) { + dataTensor = cldnn::tensor(TensorValue(inputDims[0]), TensorValue(inputDims[1]), 1, 1); + } else { + THROW_IE_EXCEPTION << "Unsupported layout (" << l << ") in 2D input " << inputInfo->name(); + } + break; + case 1: + dataTensor = cldnn::tensor(TensorValue(inputDims[0]), 1, 1, 1); + break; + case 0: + dataTensor = cldnn::tensor(1, 1, 1, 1); + break; + default: THROW_IE_EXCEPTION << "Invalid data dimensions"; + } + cldnn::layout networkInputLayout(DataTypeFromPrecision(ip), + inputFormat, + dataTensor); + + // look at the expected color format of this input + auto inputName = layer_type_name_ID(op); + auto preProcess = inputInfo->getPreProcess(); + size_t meanChannels = preProcess.getNumberOfChannels(); + networkInputLayout.format = inputFormat; + networkInputLayout.size = networkInputLayout.size.transform(inputFormat, 1); + networkInputLayout.data_type = DataTypeFromPrecision(op->get_output_element_type(0)); + auto preprocessPrimID = "reorder:" + inputName + Program::m_preProcessTag; + cldnn::primitive_id meanBlobID = inputName + Program::m_meanValuesTag; + std::vector meanValues; + + if ((meanChannels > 0) && + (meanChannels != networkInputLayout.size.feature[0])) { + THROW_IE_EXCEPTION << "Mismatched mean values channels in input " << inputName; + } + + switch (preProcess.getMeanVariant()) { + case NONE: + case MEAN_VALUE: { + if (meanChannels > 0) { + for (size_t c = 0; c < meanChannels; c++) { + if (fabs(preProcess[c]->stdScale - 1.0f) > 1e-10) + THROW_IE_EXCEPTION << "not supporting stdScale yet in input " << inputName; + meanValues.push_back(preProcess[c]->meanValue); + } + } + break; + } + case MEAN_IMAGE: { + IE_ASSERT(meanChannels); + // first merge all mean values to a single blob + // todo make sure mean blob precision is the same as the input precision + auto meanDims = inputDims; + // overwrite batches with 1 + switch (meanDims.size()) { + case 4: meanDims[0] = 1; + break; + default: + THROW_IE_EXCEPTION << "Missing batch dimensions in input image"; + } + const TensorDesc desc(Precision::FP32, meanDims, TensorDesc::getLayoutByDims(meanDims)); + TBlob meanBlob(desc); + meanBlob.allocate(); + auto meanBlobData = meanBlob.data(); + for (size_t c = 0; c < meanChannels; c++) { + if (fabs(preProcess[c]->stdScale - 1.0f) > 1e-10) + THROW_IE_EXCEPTION << "not supporting stdScale yet in input " << inputName; + auto channelMeanBlob = std::dynamic_pointer_cast>(preProcess[c]->meanData); + auto channelSize = channelMeanBlob->size(); + auto channelBlobData = channelMeanBlob->data(); + for (size_t i = 0; i < channelSize; i++) { + meanBlobData[(c * channelSize) + i] = channelBlobData[i]; + } + } + // then create a data primitive for the mean values + auto meanBlobPtr = std::make_shared>(meanBlob); + + // mean values will use external format (sub in the input format before convert to new format) + cldnn::tensor meanBlobTensor(networkInputLayout.size); + meanBlobTensor.batch[0] = 1; // mean values have no batches + cldnn::layout meanBlobLayout(cldnn::data_types::f32, cldnn::format::bfyx, meanBlobTensor); + + auto data = static_cast(meanBlobPtr->buffer()); + + auto bufIter = p.blobMemCache.find(data); + if (bufIter != p.blobMemCache.end()) { + meanBlobID = bufIter->second; + } else { + auto mem = cldnn::memory::allocate(p.GetEngine(), meanBlobLayout, 0, false); + auto tmpPointer = mem.pointer(); // implicitly maps buffer - unmap in destructor + auto buf = tmpPointer.data(); + auto bufSize = meanBlobLayout.bytes_count(); + + std::memcpy(&buf[0], &data[0], bufSize); + + p.AddPrimitive(cldnn::data(meanBlobID, mem)); + p.blobMemCache[data] = meanBlobID; + } + break; + } + default: THROW_IE_EXCEPTION << "Invalid mean variant in input " << inputName; + break; + } + + if (ColorFormat::NV12 == preProcess.getColorFormat() && p.GetConfig().nv12_two_inputs) { + // for NV12, create two input layouts with reorder instead of one, + // and then would expect compound blob in inferRequest + if (Layout::NCHW != l && + (Precision::I8 != ip || Precision::U8 != ip)) { + THROW_IE_EXCEPTION << "Unsupported layout (" << l << ") or precision " + << ip.name() << ") for NV12 input " + inputInfo->name(); + } + int height = inputDims[2]; + int width = inputDims[3]; + + std::string y_name = inputName + "_Y"; + std::string uv_name = inputName + "_UV"; + + cldnn::layout y_layout(DataTypeFromPrecision(ip), + cldnn::format::nv12, { 1, 1, width, height }); + cldnn::layout uv_layout(DataTypeFromPrecision(ip), + cldnn::format::nv12, { 1, 2, width / 2, height / 2 }); + auto inputY = cldnn::input_layout(y_name, y_layout); + auto inputUV = cldnn::input_layout(uv_name, uv_layout); + + p.AddPrimitive(inputY); + p.inputLayouts.insert({ inputInfo->name() + "_Y", y_layout }); + p.AddPrimitive(inputUV); + p.inputLayouts.insert({ inputInfo->name() + "_UV", uv_layout }); + switch (preProcess.getMeanVariant()) { + case NONE: + case MEAN_VALUE: { + p.AddPrimitive(cldnn::reorder(preprocessPrimID, y_name, uv_name, networkInputLayout, meanValues)); + break; + } + case MEAN_IMAGE: { + p.AddPrimitive(cldnn::reorder(preprocessPrimID, y_name, uv_name, networkInputLayout, meanBlobID)); + break; + } + default: THROW_IE_EXCEPTION << "Invalid mean variant in input " + inputName; + break; + } + + p.primitivesToIRLayersMap[preprocessPrimID] = { inputInfo->name() }; + p.primitivesToIRLayersMap[y_name] = { inputInfo->name() }; + p.primitivesToIRLayersMap[uv_name] = { inputInfo->name() }; + p.profilingIDs.push_back(preprocessPrimID); + p.InitProfileInfo(preprocessPrimID, "Reorder"); + } else { + cldnn::layout inputLayout(networkInputLayout); + inputLayout.data_type = DataTypeFromPrecision(ip); + p.inputLayouts.insert({ inputInfo->name(), inputLayout }); + + p.AddPrimitive(cldnn::input_layout(inputName, inputLayout)); + p.primitivesToIRLayersMap[inputName] = { inputInfo->name() }; + + switch (preProcess.getMeanVariant()) { + case NONE: + case MEAN_VALUE: { + p.AddPrimitive(cldnn::reorder(preprocessPrimID, inputName, networkInputLayout, meanValues)); + break; + } + case MEAN_IMAGE: { + p.AddPrimitive(cldnn::reorder(preprocessPrimID, + inputName, + networkInputLayout, + meanBlobID)); + break; + } + default: THROW_IE_EXCEPTION << "Invalid mean variant in input " << inputName; + break; + } + p.InitProfileInfo(preprocessPrimID, "reorder"); + p.primitiveIDs[preprocessPrimID] = preprocessPrimID; + p.profilingIDs.push_back(preprocessPrimID); + } + + p.primitiveIDs[inputName] = preprocessPrimID; + p.primitiveIDs[preprocessPrimID] = preprocessPrimID; +} + +REGISTER_FACTORY_IMPL(v0, Parameter); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/pooling.cpp b/inference-engine/src/cldnn_engine/ops/pooling.cpp new file mode 100644 index 00000000000000..60e0eccd908446 --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/pooling.cpp @@ -0,0 +1,101 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/max_pool.hpp" +#include "ngraph/op/avg_pool.hpp" + +#include "api/pooling.hpp" + +namespace CLDNNPlugin { + +struct PoolingParameters { + cldnn::tensor kernel; + cldnn::tensor stride; + cldnn::tensor pad_begin; + cldnn::tensor pad_end; +}; + +static PoolingParameters GetPoolingParameters(const ngraph::Shape& kernel, + const ngraph::Strides& strides, + const ngraph::Shape& pads_begin, + const ngraph::Shape& pads_end) { + cldnn::tensor k, s, pb, pe; + if (pads_begin.size() != strides.size() || pads_end.size() != strides.size() || kernel.size() != strides.size()) + THROW_IE_EXCEPTION << "Strides, KernelSizes and Pads are supposed to have the same elements count"; + + std::vector pb_casted(pads_begin.begin(), pads_begin.end()); + std::vector pe_casted(pads_end.begin(), pads_end.end()); + switch (strides.size()) { + case 3: { + k = cldnn::tensor(cldnn::batch(1), cldnn::feature(1), cldnn::spatial(kernel[2], kernel[1], kernel[0])); + s = cldnn::tensor(cldnn::batch(1), cldnn::feature(1), cldnn::spatial(strides[2], strides[1], strides[0])); + pb = cldnn::tensor(cldnn::batch(0), cldnn::feature(0), cldnn::spatial(-pb_casted[2], -pb_casted[1], -pb_casted[0])); + pe = cldnn::tensor(cldnn::batch(0), cldnn::feature(0), cldnn::spatial(-pe_casted[2], -pe_casted[1], -pe_casted[0])); + break; + } + case 2: { + k = cldnn::tensor(cldnn::batch(1), cldnn::feature(1), cldnn::spatial(kernel[1], kernel[0], 1)); + s = cldnn::tensor(cldnn::batch(1), cldnn::feature(1), cldnn::spatial(strides[1], strides[0], 1)); + pb = cldnn::tensor(cldnn::batch(0), cldnn::feature(0), cldnn::spatial(-pb_casted[1], -pb_casted[0], 0)); + pe = cldnn::tensor(cldnn::batch(0), cldnn::feature(0), cldnn::spatial(-pe_casted[1], -pe_casted[0], 0)); + break; + } + case 1: { + k = cldnn::tensor(cldnn::batch(1), cldnn::feature(1), cldnn::spatial(kernel[0], 1, 1)); + s = cldnn::tensor(cldnn::batch(1), cldnn::feature(1), cldnn::spatial(strides[0], 1, 1)); + pb = cldnn::tensor(cldnn::batch(0), cldnn::feature(0), cldnn::spatial(-pb_casted[0], 0, 0)); + pe = cldnn::tensor(cldnn::batch(0), cldnn::feature(0), cldnn::spatial(-pe_casted[0], 0, 0)); + break; + } + default: THROW_IE_EXCEPTION << "Unsupported pooling parameters size. Only 1d, 2d, and 3d cases are supported"; + } + + return {k, s, pb, pe}; +} + +void CreateAvgPoolOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {1}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + auto params = GetPoolingParameters(op->get_kernel(), op->get_strides(), op->get_pads_begin(), op->get_pads_end()); + auto poolPrim = cldnn::pooling(layerName, + inputPrimitives[0], + op->get_exclude_pad() ? cldnn::pooling_mode::average_no_padding : cldnn::pooling_mode::average, + params.kernel, + params.stride, + params.pad_begin, + CldnnTensorFromIEDims(op->get_output_shape(0)), + DataTypeFromPrecision(op->get_output_element_type(0))); + poolPrim.pad_end = params.pad_end; + p.AddPrimitive(poolPrim); + p.AddPrimitiveToProfiler(op); +} + +void CreateMaxPoolOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {1}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + auto params = GetPoolingParameters(op->get_kernel(), op->get_strides(), op->get_pads_begin(), op->get_pads_end()); + auto poolPrim = cldnn::pooling(layerName, + inputPrimitives[0], + cldnn::pooling_mode::max, + params.kernel, + params.stride, + params.pad_begin, + CldnnTensorFromIEDims(op->get_output_shape(0)), + DataTypeFromPrecision(op->get_output_element_type(0))); + poolPrim.pad_end = params.pad_end; + p.AddPrimitive(poolPrim); + p.AddPrimitiveToProfiler(op); +} + +REGISTER_FACTORY_IMPL(v1, MaxPool); +REGISTER_FACTORY_IMPL(v1, AvgPool); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/prior_box.cpp b/inference-engine/src/cldnn_engine/ops/prior_box.cpp new file mode 100644 index 00000000000000..4b64fa6a802cd8 --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/prior_box.cpp @@ -0,0 +1,115 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/prior_box.hpp" +#include "ngraph/op/prior_box_clustered.hpp" + +#include "api/prior_box.hpp" + +namespace CLDNNPlugin { + +void CreatePriorBoxClusteredOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {2}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + auto attrs = op->get_attrs(); + + std::vector width = attrs.widths; + std::vector height = attrs.heights; + std::vector variance = attrs.variances; + float offset = attrs.offset; + bool clip = attrs.clip; + + auto inp_dims = op->get_input_shape(0); + auto img_dims = op->get_input_shape(1); + + int img_w = static_cast(img_dims.back()); + int img_h = static_cast(img_dims.at(img_dims.size() - 2)); + cldnn::tensor img_size = (cldnn::tensor) cldnn::spatial(TensorValue(img_w), TensorValue(img_h)); + + auto step_w = attrs.step_widths; + auto step_h = attrs.step_heights; + if (std::abs(attrs.step_heights - attrs.step_widths) < 1e-5) { + step_w = attrs.step_widths; + step_h = attrs.step_widths; + } + + if (step_w == 0.0f && step_h == 0.0f) { + step_w = static_cast(img_w) / inp_dims.back(); + step_h = static_cast(img_h) / inp_dims.at(img_dims.size() - 2); + } + + auto priorBoxPrim = cldnn::prior_box(layerName, + inputPrimitives[0], + img_size, + clip, + variance, + step_w, + step_h, + offset, + width, + height, + DataTypeFromPrecision(op->get_output_element_type(0))); + + p.AddPrimitive(priorBoxPrim); + p.AddPrimitiveToProfiler(op); +} + +void CreatePriorBoxOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {2}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + auto attrs = op->get_attrs(); + // params + std::vector min_size = attrs.min_size; + std::vector max_size = attrs.max_size; + std::vector aspect_ratio = attrs.aspect_ratio; + std::vector variance = attrs.variance; + std::vector fixed_size = attrs.fixed_size; + std::vector fixed_ratio = attrs.fixed_ratio; + std::vector density = attrs.density; + bool flip = attrs.flip; + bool clip = attrs.clip; + bool scale_all_sizes = attrs.scale_all_sizes; + float offset = attrs.offset; + + auto step_w = attrs.step; + auto step_h = attrs.step; + + auto img_dims = op->get_input_shape(1); + + auto wdim = img_dims.back(); + auto hdim = img_dims.at(img_dims.size()-2); + + cldnn::tensor img_size = (cldnn::tensor) cldnn::spatial(TensorValue(wdim), TensorValue(hdim)); + auto priorBoxPrim = cldnn::prior_box(layerName, + inputPrimitives[0], + img_size, + min_size, + max_size, + aspect_ratio, + flip, + clip, + variance, + step_w, + step_h, + offset, + scale_all_sizes, + fixed_ratio, + fixed_size, + density); + + p.AddPrimitive(priorBoxPrim); + p.AddPrimitiveToProfiler(op); +} + +REGISTER_FACTORY_IMPL(v0, PriorBoxClustered); +REGISTER_FACTORY_IMPL(v0, PriorBox); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/proposal.cpp b/inference-engine/src/cldnn_engine/ops/proposal.cpp new file mode 100644 index 00000000000000..7223d78dbf7991 --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/proposal.cpp @@ -0,0 +1,146 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/proposal.hpp" + +#include "api/proposal.hpp" +#include "api/mutable_data.hpp" + +namespace CLDNNPlugin { + +void CreateProposalOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {3}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + + auto attrs = op->get_attrs(); + float nms_thresh = attrs.nms_thresh; + int min_size = attrs.min_size; + int feature_stride = attrs.feat_stride; + int pre_nms_topn = attrs.pre_nms_topn; + int post_nms_topn = attrs.post_nms_topn; + const std::vector ratio = attrs.ratio; + const std::vector scale = attrs.scale; + float box_coordinate_scale = attrs.box_coordinate_scale; + float box_size_scale = attrs.box_size_scale; + int base_size = attrs.base_size; + std::string framework = attrs.framework; + bool normalize = attrs.normalize; + bool clip_before_nms = attrs.clip_before_nms; + bool clip_after_nms = attrs.clip_after_nms; + + float coordinates_offset; + bool swap_xy; + bool initial_clip; + bool round_ratios; + bool shift_anchors; + + if (framework == "tensorflow") { + coordinates_offset = 0.0f; + initial_clip = true; + shift_anchors = true; + round_ratios = false; + swap_xy = true; + } else { + coordinates_offset = 1.0f; + initial_clip = false; + shift_anchors = false; + round_ratios = true; + swap_xy = false; + } + + if (op->get_output_size() == 2) { + auto mutable_precision = op->get_output_element_type(1); + if (mutable_precision == ngraph::element::i64) { + mutable_precision = ngraph::element::i32; + } + + cldnn::layout mutableLayout = cldnn::layout(DataTypeFromPrecision(mutable_precision), + DefaultFormatForDims(op->get_output_shape(1).size()), + CldnnTensorFromIEDims(op->get_output_shape(1))); + + auto shared_memory = cldnn::memory::allocate(p.GetEngine(), mutableLayout); + + cldnn::primitive_id proposal_mutable_id_w = layer_type_name_ID(op) + "_md_write"; + auto argmax_mutable_prim = cldnn::mutable_data(proposal_mutable_id_w, shared_memory); + p.primitivesToIRLayersMap[proposal_mutable_id_w] = { op->get_friendly_name() }; + p.primitiveIDs[proposal_mutable_id_w] = proposal_mutable_id_w; + p.AddPrimitive(argmax_mutable_prim); + inputPrimitives.push_back(proposal_mutable_id_w); + + std::string proposalLayerName = layer_type_name_ID(op) + ".0"; + auto proposalPrim = cldnn::proposal(proposalLayerName, + inputPrimitives[0], // cls_score + inputPrimitives[1], // bbox_pred + inputPrimitives[2], // im_info + inputPrimitives[3], // second_output + 0, // max_num_proposals is unused + nms_thresh, + base_size, + min_size, + feature_stride, + pre_nms_topn, + post_nms_topn, + ratio, + scale, + coordinates_offset, + box_coordinate_scale, + box_size_scale, + false, + swap_xy, + initial_clip, + clip_before_nms, + clip_after_nms, + round_ratios, + shift_anchors, + normalize); + + p.AddPrimitive(proposalPrim); + + cldnn::primitive_id proposal_mutable_id_r = layer_type_name_ID(op) + ".1"; + auto argmax_mutable_prim_r = cldnn::mutable_data(proposal_mutable_id_r, { proposalLayerName }, shared_memory); + p.primitivesToIRLayersMap[proposal_mutable_id_r] = { op->get_friendly_name() }; + p.primitiveIDs[proposal_mutable_id_r] = proposal_mutable_id_r; + p.AddPrimitive(argmax_mutable_prim_r); + + p.AddPrimitiveToProfiler(proposalLayerName, op); + return; + } + + std::string proposalLayerName = layer_type_name_ID(op); + auto proposalPrim = cldnn::proposal(proposalLayerName, + inputPrimitives[0], // cls_score + inputPrimitives[1], // bbox_pred + inputPrimitives[2], // im_info + 0, // max_num_proposals is unused + nms_thresh, + base_size, + min_size, + feature_stride, + pre_nms_topn, + post_nms_topn, + ratio, + scale, + coordinates_offset, + box_coordinate_scale, + box_size_scale, + false, + swap_xy, + initial_clip, + clip_before_nms, + clip_after_nms, + round_ratios, + shift_anchors, + normalize); + + p.AddPrimitive(proposalPrim); + p.AddPrimitiveToProfiler(op); +} + +REGISTER_FACTORY_IMPL(v0, Proposal); +REGISTER_FACTORY_IMPL(v4, Proposal); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/reduce.cpp b/inference-engine/src/cldnn_engine/ops/reduce.cpp new file mode 100644 index 00000000000000..c79182c191c190 --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/reduce.cpp @@ -0,0 +1,146 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/reduce_sum.hpp" +#include "ngraph/op/reduce_prod.hpp" +#include "ngraph/op/reduce_mean.hpp" +#include "ngraph/op/reduce_logical_or.hpp" +#include "ngraph/op/reduce_logical_and.hpp" +#include "ngraph/op/reduce_l1.hpp" +#include "ngraph/op/reduce_l2.hpp" +#include "ngraph/op/min.hpp" +#include "ngraph/op/max.hpp" +#include "ngraph/op/constant.hpp" + +#include "api/reduce.hpp" +#include "api/reorder.hpp" + +namespace CLDNNPlugin { + +void CreateReduceOp(Program& p, const std::shared_ptr& op, cldnn::reduce_mode mode, bool keep_dims) { + p.ValidateInputs(op, {2}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + size_t rank = op->get_input_shape(0).size(); + + auto axes_constant = std::dynamic_pointer_cast(op->get_input_node_shared_ptr(1)); + if (!axes_constant) { + THROW_IE_EXCEPTION << "Unsupported parameter nodes type in " << op->get_friendly_name() << " (" << op->get_type_name() << ")"; + } + std::vector rawAxes = axes_constant->cast_vector(); + + std::vector axes; + for (size_t a = 0; a < rawAxes.size(); a++) { + if (rawAxes[a] < 0) + rawAxes[a] = rawAxes[a] + rank; + if (rawAxes[a] < 0 || rawAxes[a] > rank - 1) + THROW_IE_EXCEPTION << op->get_friendly_name() << " Incorrect Reduce axis value: " << rawAxes[a]; + if (rank == 6) { + switch (rawAxes[a]) { + case 0: axes.push_back(cldnn::reduce::along_b); break; + case 1: axes.push_back(cldnn::reduce::along_f); break; + case 2: axes.push_back(cldnn::reduce::along_w); break; + case 3: axes.push_back(cldnn::reduce::along_z); break; + case 4: axes.push_back(cldnn::reduce::along_y); break; + case 5: axes.push_back(cldnn::reduce::along_x); break; + } + } else if (rank == 5) { + switch (rawAxes[a]) { + case 0: axes.push_back(cldnn::reduce::along_b); break; + case 1: axes.push_back(cldnn::reduce::along_f); break; + case 2: axes.push_back(cldnn::reduce::along_z); break; + case 3: axes.push_back(cldnn::reduce::along_y); break; + case 4: axes.push_back(cldnn::reduce::along_x); break; + } + } else { + switch (rawAxes[a]) { + case 0: axes.push_back(cldnn::reduce::along_b); break; + case 1: axes.push_back(cldnn::reduce::along_f); break; + case 2: axes.push_back(cldnn::reduce::along_y); break; + case 3: axes.push_back(cldnn::reduce::along_x); break; + } + } + } + + sort(axes.begin(), axes.end()); + axes.erase(unique(axes.begin(), axes.end()), axes.end()); + + auto reducePrim = cldnn::reduce(layerName, + inputPrimitives[0], + mode, + axes, + static_cast(keep_dims)); + + p.AddPrimitive(reducePrim); + + auto reorderLayerName = layerName + "_reorder"; + cldnn::format out_format = cldnn::format::any; + auto out_dt = DataTypeFromPrecision(op->get_output_element_type(0)); + if (!keep_dims && rank > 4) { + if (rank - rawAxes.size() == 6) + out_format = cldnn::format::bfwzyx; + else if (rank - rawAxes.size() == 5) + out_format = cldnn::format::bfzyx; + else if (rank - rawAxes.size() <= 4) + out_format = cldnn::format::bfyx; + + auto reorder_prim = cldnn::reorder(reorderLayerName, layerName, out_format, out_dt); + p.AddPrimitive(reorder_prim); + p.AddPrimitiveToProfiler(op, reorderLayerName); + } else { + p.AddPrimitiveToProfiler(op); + } +} + +void CreateReduceMaxOp(Program& p, const std::shared_ptr& op) { + CreateReduceOp(p, op, cldnn::reduce_mode::max, op->get_keep_dims()); +} + +void CreateReduceLogicalAndOp(Program& p, const std::shared_ptr& op) { + CreateReduceOp(p, op, cldnn::reduce_mode::logical_and, op->get_keep_dims()); +} + +void CreateReduceLogicalOrOp(Program& p, const std::shared_ptr& op) { + CreateReduceOp(p, op, cldnn::reduce_mode::logical_or, op->get_keep_dims()); +} + +void CreateReduceMeanOp(Program& p, const std::shared_ptr& op) { + CreateReduceOp(p, op, cldnn::reduce_mode::mean, op->get_keep_dims()); +} + +void CreateReduceMinOp(Program& p, const std::shared_ptr& op) { + CreateReduceOp(p, op, cldnn::reduce_mode::min, op->get_keep_dims()); +} + +void CreateReduceProdOp(Program& p, const std::shared_ptr& op) { + CreateReduceOp(p, op, cldnn::reduce_mode::prod, op->get_keep_dims()); +} + +void CreateReduceSumOp(Program& p, const std::shared_ptr& op) { + CreateReduceOp(p, op, cldnn::reduce_mode::sum, op->get_keep_dims()); +} + +void CreateReduceL1Op(Program& p, const std::shared_ptr& op) { + CreateReduceOp(p, op, cldnn::reduce_mode::l1, op->get_keep_dims()); +} + +void CreateReduceL2Op(Program& p, const std::shared_ptr& op) { + CreateReduceOp(p, op, cldnn::reduce_mode::l2, op->get_keep_dims()); +} + +REGISTER_FACTORY_IMPL(v1, ReduceMax); +REGISTER_FACTORY_IMPL(v1, ReduceLogicalAnd); +REGISTER_FACTORY_IMPL(v1, ReduceLogicalOr); +REGISTER_FACTORY_IMPL(v1, ReduceMean); +REGISTER_FACTORY_IMPL(v1, ReduceMin); +REGISTER_FACTORY_IMPL(v1, ReduceProd); +REGISTER_FACTORY_IMPL(v1, ReduceSum); +REGISTER_FACTORY_IMPL(v4, ReduceL1); +REGISTER_FACTORY_IMPL(v4, ReduceL2); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/region_yolo.cpp b/inference-engine/src/cldnn_engine/ops/region_yolo.cpp new file mode 100644 index 00000000000000..7a78aec6ab6d97 --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/region_yolo.cpp @@ -0,0 +1,39 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/region_yolo.hpp" + +#include "api/region_yolo.hpp" + +namespace CLDNNPlugin { + +void CreateRegionYoloOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {1}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + uint32_t coords = op->get_num_coords(); + uint32_t classes = op->get_num_classes(); + uint32_t num = op->get_num_regions(); + bool do_softmax = op->get_do_softmax(); + uint32_t mask_size = op->get_mask().size(); + + auto regionPrim = cldnn::region_yolo(layerName, + inputPrimitives[0], + coords, + classes, + num, + mask_size, + do_softmax); + + p.AddPrimitive(regionPrim); + p.AddPrimitiveToProfiler(op); +} + +REGISTER_FACTORY_IMPL(v0, RegionYolo); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/reorg_yolo.cpp b/inference-engine/src/cldnn_engine/ops/reorg_yolo.cpp new file mode 100644 index 00000000000000..12703a4537e81d --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/reorg_yolo.cpp @@ -0,0 +1,31 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/reorg_yolo.hpp" + +#include "api/reorg_yolo.hpp" + +namespace CLDNNPlugin { + +void CreateReorgYoloOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {1}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + uint32_t stride = op->get_strides()[0]; + + auto reorgPrim = cldnn::reorg_yolo(layerName, + inputPrimitives[0], + stride); + + p.AddPrimitive(reorgPrim); + p.AddPrimitiveToProfiler(op); +} + +REGISTER_FACTORY_IMPL(v0, ReorgYolo); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/reshape.cpp b/inference-engine/src/cldnn_engine/ops/reshape.cpp new file mode 100644 index 00000000000000..5dbb1978de8fd5 --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/reshape.cpp @@ -0,0 +1,72 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/reshape.hpp" +#include "ngraph/op/squeeze.hpp" +#include "ngraph/op/unsqueeze.hpp" + +#include "api/reshape.hpp" +#include "api/reorder.hpp" + +namespace CLDNNPlugin { + +void CreateCommonReshapeOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {1, 2}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + auto inDims = op->get_input_shape(0); + auto outDims = op->get_output_shape(0); + auto outTensor = CldnnTensorFromIEDims(outDims); + + // if we convert from or to 5D/6D, additional reorder also required to change format + cldnn::primitive_id reshapeInputId = inputPrimitives[0]; + if (inDims.size() != outDims.size()) { + cldnn::primitive_id reorderId = "reorder:" + op->get_friendly_name() + "_reorder"; + cldnn::format outputFormat = cldnn::format::bfyx; + + switch (outDims.size()) { + case 5: outputFormat = cldnn::format::bfzyx; break; + case 6: outputFormat = cldnn::format::bfwzyx; break; + default: break; + } + + cldnn::layout outputLayout(DataTypeFromPrecision(op->get_output_element_type(0)), outputFormat, outTensor); + p.AddPrimitive(cldnn::reorder(reorderId, reshapeInputId, outputLayout)); + p.InitProfileInfo(reorderId, "Reorder", false, InferenceEngine::InferenceEngineProfileInfo::EXECUTED, layerName); + p.primitivesToIRLayersMap[reorderId] = { op->get_friendly_name() }; + p.primitiveIDs[layerName + "_reorder"] = reorderId; + p.primitiveIDs[reorderId] = reorderId; + p.profilingIDs.push_back(reorderId); + reshapeInputId = reorderId; + } + + auto reshapePrim = cldnn::reshape(layerName, + reshapeInputId, + outTensor); + + p.AddPrimitive(reshapePrim); + p.AddPrimitiveToProfiler(op); +} + +void CreateReshapeOp(Program& p, const std::shared_ptr& op) { + CreateCommonReshapeOp(p, op); +} + +void CreateSqueezeOp(Program& p, const std::shared_ptr& op) { + CreateCommonReshapeOp(p, op); +} + +void CreateUnsqueezeOp(Program& p, const std::shared_ptr& op) { + CreateCommonReshapeOp(p, op); +} + +REGISTER_FACTORY_IMPL(v1, Reshape); +REGISTER_FACTORY_IMPL(v0, Squeeze); +REGISTER_FACTORY_IMPL(v0, Unsqueeze); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/result.cpp b/inference-engine/src/cldnn_engine/ops/result.cpp new file mode 100644 index 00000000000000..56ad5e9f5c017a --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/result.cpp @@ -0,0 +1,71 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/result.hpp" + +#include "api/reorder.hpp" + +using namespace InferenceEngine; + +namespace CLDNNPlugin { + +void CreateResultOp(Program& p, const std::shared_ptr& op) { + OutputsDataMap networkOutputs = p.GetNetworkOutputs(); + p.ValidateInputs(op, {1}); + + auto prev = op->get_input_node_shared_ptr(0); + auto inputID = op->get_input_source_output(0).get_tensor().get_name(); + if (inputID.empty()) { + inputID = prev->get_friendly_name(); + if (prev->get_output_size() > 1) { + inputID += "." + std::to_string(op->get_input_source_output(0).get_index()); + } + } + auto it = networkOutputs.find(inputID); + if (it == networkOutputs.end()) { + THROW_IE_EXCEPTION << "Can't find output " << inputID << " in OutputsDataMap"; + } + std::string originalOutName = it->first; + DataPtr outputData = it->second; + + auto inputs = p.GetInputPrimitiveIDs(op); + const auto outputDesc = outputData->getTensorDesc(); + const auto outputlayout = outputDesc.getLayout(); + + // TODO: add precision check once there's an outputInfo object + if (outputlayout != NCHW && + // TODO: change 6d case once new layout added in IE + outputlayout != BLOCKED && + outputlayout != NCDHW && + outputlayout != NHWC && + outputlayout != CHW && + outputlayout != NC && + outputlayout != C && + outputlayout != SCALAR) { + THROW_IE_EXCEPTION << "Unsupported layout (" << outputlayout << ") in output: " << originalOutName; + } + + auto outLayerName = layer_type_name_ID(op); + Precision precision = outputData->getPrecision(); + std::string outputID = inputs[0]; + + p.AddPrimitive(cldnn::reorder(outLayerName, + outputID, + FormatFromLayout(outputData->getLayout()), + DataTypeFromPrecision(precision))); + p.InitProfileInfo(outLayerName, "reorder"); + p.profilingIDs.push_back(outLayerName); + p.primitiveIDs[outLayerName] = outLayerName; + p.primitiveIDs[originalOutName] = outLayerName; + + p.outputDims[originalOutName] = outputDesc.getDims(); + p.prevPrimitiveIDs[outLayerName] = {originalOutName}; +} + +REGISTER_FACTORY_IMPL(v0, Result); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/reverse_sequence.cpp b/inference-engine/src/cldnn_engine/ops/reverse_sequence.cpp new file mode 100644 index 00000000000000..fc76b898de5828 --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/reverse_sequence.cpp @@ -0,0 +1,33 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/reverse_sequence.hpp" + +#include "api/reverse_sequence.hpp" + +namespace CLDNNPlugin { + +void CreateReverseSequenceOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {2}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + size_t batch_axis = op->get_batch_axis(); + size_t seq_axis = op->get_sequence_axis(); + auto reverseSequencePrim = cldnn::reverse_sequence(layerName, + inputPrimitives[0], + inputPrimitives[1], + seq_axis, + batch_axis); + + p.AddPrimitive(reverseSequencePrim); + p.AddPrimitiveToProfiler(op); +} + +REGISTER_FACTORY_IMPL(v0, ReverseSequence); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/rnn.cpp b/inference-engine/src/cldnn_engine/ops/rnn.cpp new file mode 100644 index 00000000000000..c3b59976bbb02f --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/rnn.cpp @@ -0,0 +1,315 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/lstm_cell.hpp" +#include "ngraph/op/lstm_sequence.hpp" + +#include "api/reshape.hpp" +#include "api/reorder.hpp" +#include "api/fully_connected.hpp" +#include "api/lstm.hpp" +#include "api/crop.hpp" +#include "api/concatenation.hpp" + +namespace CLDNNPlugin { +cldnn::activation_func GetActivationFunc(std::string name) { + static const std::map name_mapping = { + {"sigmoid", cldnn::activation_func::logistic}, + {"tanh", cldnn::activation_func::hyperbolic_tan}, + {"relu", cldnn::activation_func::relu}, + }; + auto itr = name_mapping.find(name); + if (itr != name_mapping.end()) + return itr->second; + else + return cldnn::activation_func::none; +} + +template +void GetLSTMActivationParams(const std::shared_ptr& op, + std::vector& activations, + std::vector& activation_params) { + activations = { cldnn::activation_func::logistic, + cldnn::activation_func::hyperbolic_tan, + cldnn::activation_func::hyperbolic_tan }; + activation_params = {}; + auto op_activations = op->get_activations(); + if (!op_activations.empty()) { + if (op_activations.size() != 3) + THROW_IE_EXCEPTION << "Wrong number of activations for LSTMCell op " << op->get_friendly_name(); + for (int i = 0; i < 3; i++) { + auto af = GetActivationFunc(op_activations[i]); + if (af == cldnn::activation_func::none) + THROW_IE_EXCEPTION << "Wrong or unsupported activation type " << op_activations[i] + << " for LSTMCell op " << op->get_friendly_name(); + activations[i] = af; + } + } + auto op_a = op->get_activations_alpha(); + auto op_b = op->get_activations_beta(); + if (!op_a.empty()) { + if (op_a.size() != 3 || op_b.size() != 3) + THROW_IE_EXCEPTION << "Wrong number of activation parameters for LSTMCell op " << op->get_friendly_name(); + for (int i = 0; i < 3; i++) { + cldnn::activation_additional_params params = { op_a[i], op_b[i] }; + activation_params.push_back(cldnn::activation_additional_params(params)); + } + } +} + +void CreateLSTMCellOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {6}); + int lstm_batch_size, lstm_input_size, lstm_hidden_size; + bool hasBias = true; + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + + std::string layerName = layer_type_name_ID(op); + cldnn::primitive_id weightID = inputPrimitives[3]; + cldnn::primitive_id recurrentID = inputPrimitives[4]; + cldnn::primitive_id biasID = inputPrimitives[5]; + + /* check incoming CNN layer and setup required variables */ + { + const auto in_dims0 = op->get_input_shape(0); + const auto out_dims0 = op->get_output_shape(0); + + if (in_dims0.size() != 2 || + op->get_input_shape(1).size() != 2 || + op->get_input_shape(2).size() != 2) + THROW_IE_EXCEPTION << "Wrong input shapes for LSTMCell op " << op->get_friendly_name(); + + lstm_input_size = in_dims0.back(); + lstm_batch_size = in_dims0.at(in_dims0.size()-2); + lstm_hidden_size = out_dims0.back(); + } + + std::vector activations; + std::vector activation_params; + GetLSTMActivationParams(op, activations, activation_params); + float clip = op->get_clip(); + + // LSTM primitive works with single precision for all in/out/weights tensors + auto lstm_dtype = DataTypeFromPrecision(op->get_output_element_type(0)); + + cldnn::primitive_id inReshapeID = layerName + "_inReshape"; + cldnn::primitive_id permuteID = layerName + "_inputReorder"; + cldnn::primitive_id inHiddenReshapeID = layerName + "_inHiddenReshape"; + cldnn::primitive_id inHiddenReorderID = layerName + "_inHiddenReorder"; + cldnn::primitive_id gemmReshapeID = layerName + "_gemmReshape"; + cldnn::primitive_id gemmReorderID = layerName + "_gemmReorder"; + cldnn::primitive_id input_concatID = layerName + "_inputConcat"; + + cldnn::tensor inputShape = { lstm_batch_size, 1, lstm_input_size, 1 }; + cldnn::tensor inStateShape = { lstm_batch_size, 1, lstm_hidden_size, 1 }; + cldnn::layout inputLayout = cldnn::layout(lstm_dtype, cldnn::format::bfyx, inputShape); + cldnn::layout hiddenLayout = cldnn::layout(lstm_dtype, cldnn::format::bfyx, inStateShape); + p.AddPrimitive(cldnn::reshape(inReshapeID, inputPrimitives[0], inputShape)); + p.AddPrimitive(cldnn::reorder(permuteID, inReshapeID, inputLayout)); + + p.AddInnerPrimitiveToProfiler(inReshapeID, op->get_friendly_name(), op); + p.AddInnerPrimitiveToProfiler(permuteID, op->get_friendly_name(), op); + + std::string hiddenInResh = inHiddenReshapeID + "_1"; + std::string hiddenInStr = inHiddenReorderID + "_1"; + std::string cellInResh = inHiddenReshapeID + "_2"; + std::string cellInStr = inHiddenReorderID + "_2"; + p.AddPrimitive(cldnn::reshape(hiddenInResh, inputPrimitives[1], inStateShape)); + p.AddPrimitive(cldnn::reorder(hiddenInStr, hiddenInResh, hiddenLayout)); + p.AddPrimitive(cldnn::reshape(cellInResh, inputPrimitives[2], inStateShape)); + p.AddPrimitive(cldnn::reorder(cellInStr, cellInResh, hiddenLayout)); + p.AddPrimitive(cldnn::concatenation(input_concatID, { permuteID, hiddenInStr }, cldnn::concatenation::concatenation_axis::along_x)); + + p.AddInnerPrimitiveToProfiler(hiddenInResh, op->get_friendly_name(), op); + p.AddInnerPrimitiveToProfiler(hiddenInStr, op->get_friendly_name(), op); + p.AddInnerPrimitiveToProfiler(cellInResh, op->get_friendly_name(), op); + p.AddInnerPrimitiveToProfiler(cellInStr, op->get_friendly_name(), op); + p.AddInnerPrimitiveToProfiler(input_concatID, op->get_friendly_name(), op); + + cldnn::tensor gemmSz = cldnn::tensor{ lstm_batch_size, 1, 4 * lstm_hidden_size, 1 }; + cldnn::layout gemmLayout = cldnn::layout(lstm_dtype, cldnn::format::bfyx, gemmSz); + cldnn::tensor hiddenSz = cldnn::tensor{ lstm_batch_size, 1, lstm_hidden_size, 1 }; + cldnn::tensor cellCropSz = cldnn::tensor{0, 1, 0, 0}; + + std::string lstm_fc_id = layerName + "_fully_connected"; + std::string lstm_elt_id = layerName + "_lstm_elt"; + std::string crop_id = layerName + "_crop"; + + cldnn::primitive_id WRconcatID = layerName + "_WRconcat"; + p.AddPrimitive(cldnn::concatenation(WRconcatID, { weightID, recurrentID }, cldnn::concatenation::concatenation_axis::along_f)); + p.AddInnerPrimitiveToProfiler(WRconcatID, op->get_friendly_name(), op); + + p.AddPrimitive(cldnn::fully_connected(lstm_fc_id, input_concatID, WRconcatID, hasBias ? biasID : "")); + p.AddPrimitive(cldnn::reshape(gemmReshapeID, lstm_fc_id, gemmSz)); + p.AddPrimitive(cldnn::reorder(gemmReorderID, gemmReshapeID, gemmLayout)); + p.AddPrimitive(cldnn::lstm_elt(lstm_elt_id, gemmReorderID, cellInStr, + clip, 0, activations, activation_params, cldnn::lstm_weights_order::fizo)); + + p.AddInnerPrimitiveToProfiler(lstm_fc_id, op->get_friendly_name(), op); + p.AddInnerPrimitiveToProfiler(gemmReshapeID, op->get_friendly_name(), op); + p.AddInnerPrimitiveToProfiler(gemmReorderID, op->get_friendly_name(), op); + p.AddInnerPrimitiveToProfiler(lstm_elt_id, op->get_friendly_name(), op); + + cldnn::primitive_id outputHiddenID = layerName + ".0"; + p.AddPrimitive(cldnn::crop(outputHiddenID, lstm_elt_id, hiddenSz, cldnn::tensor{0, 0, 0, 0})); + p.AddInnerPrimitiveToProfiler(outputHiddenID, op->get_friendly_name(), op); + cldnn::primitive_id outputCellID = layerName + ".1"; + p.AddPrimitive(cldnn::crop(outputCellID, lstm_elt_id, hiddenSz, cellCropSz)); + p.AddInnerPrimitiveToProfiler(outputCellID, op->get_friendly_name(), op); + + // output primitive IDs + p.primitiveIDs[outputHiddenID] = outputHiddenID; // LSTMCell:LSTMCell - "concat hidden" + p.primitiveIDs[layerName] = outputHiddenID; // LSTMCell:LSTMCell:0 - hidden state + p.primitiveIDs[outputCellID] = outputCellID; // LSTMCell:LSTMCell:1 - cell state + + p.AddPrimitiveToProfiler(layerName, op, outputHiddenID); +} + +void CreateLSTMSequenceOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {7}); + + std::string layerName = layer_type_name_ID(op); + int lstm_batch_size, lstm_input_size, lstm_hidden_size, lstm_sequence_len; + + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + cldnn::primitive_id weightID = inputPrimitives[4]; + cldnn::primitive_id recurrentID = inputPrimitives[5]; + cldnn::primitive_id biasID = inputPrimitives[6]; + + { + const auto in_dims0 = op->get_input_shape(0); + const auto out_dims0 = op->get_output_shape(0); + + if (in_dims0.size() != 3 || + op->get_input_shape(1).size() != 3 || + op->get_input_shape(2).size() != 3) + THROW_IE_EXCEPTION << "Wrong input shapes for LSTMSequence op " << op->get_friendly_name(); + + lstm_input_size = in_dims0.back(); + lstm_sequence_len = in_dims0.at(in_dims0.size() - 2); + lstm_batch_size = in_dims0.at(in_dims0.size() - 3); + lstm_hidden_size = out_dims0.back(); + } + + std::vector activations; + std::vector activation_params; + GetLSTMActivationParams(op, activations, activation_params); + float clip = op->get_clip(); + bool isForward = op->get_direction() == ngraph::op::RecurrentSequenceDirection::FORWARD; + + // LSTM primitive works with single precision for all in/out/weights tensors + auto lstm_dtype = DataTypeFromPrecision(op->get_output_element_type(0)); + + cldnn::primitive_id inReshapeID = layerName + "_inReshape"; + cldnn::primitive_id permuteID = layerName + "_inputReorder"; + cldnn::primitive_id inHiddenReshapeID = layerName + "_inHiddenReshape"; + cldnn::primitive_id inHiddenReorderID = layerName + "_inHiddenReorder"; + cldnn::primitive_id inHiddenStateID = inHiddenReshapeID + "_1"; + cldnn::primitive_id inCellStateID = inHiddenReshapeID + "_2"; + + std::vector output_ids_offsets; + + cldnn::tensor inputShape = { lstm_batch_size, lstm_sequence_len, lstm_input_size, 1 }; + cldnn::tensor inStateShape = { lstm_batch_size, 1, lstm_hidden_size, 1 }; + cldnn::layout inputLayout = cldnn::layout(lstm_dtype, cldnn::format::bfyx, inputShape); + p.AddPrimitive(cldnn::reshape(inReshapeID, inputPrimitives[0], inputShape)); + p.AddPrimitive(cldnn::reorder(permuteID, inReshapeID, inputLayout)); + + p.AddPrimitive(cldnn::reshape(inHiddenStateID, inputPrimitives[1], inStateShape)); + p.AddPrimitive(cldnn::reshape(inCellStateID, inputPrimitives[2], inStateShape)); + + p.AddInnerPrimitiveToProfiler(inReshapeID, op->get_friendly_name(), op); + p.AddInnerPrimitiveToProfiler(permuteID, op->get_friendly_name(), op); + p.AddInnerPrimitiveToProfiler(inHiddenStateID, op->get_friendly_name(), op); + p.AddInnerPrimitiveToProfiler(inCellStateID, op->get_friendly_name(), op); + + cldnn::tensor gemmSz = cldnn::tensor{ lstm_batch_size, 1, 4 * lstm_hidden_size, 1 }; + cldnn::layout gemmLayout = cldnn::layout(lstm_dtype, cldnn::format::bfyx, gemmSz); + cldnn::tensor hiddenSz = cldnn::tensor{ lstm_batch_size, 1, lstm_hidden_size, 1 }; + cldnn::tensor cellCropSz = cldnn::tensor{0, 1, 0, 0}; + cldnn::primitive_id hiddenStr = inHiddenReshapeID + "_1"; + cldnn::primitive_id cellStr = inHiddenReshapeID + "_2"; + cldnn::primitive_id inputCropID = layerName + "_inputCrop"; + + cldnn::primitive_id WRconcatID = layerName + "_WRconcat"; + p.AddPrimitive(cldnn::concatenation(WRconcatID, { weightID, recurrentID }, cldnn::concatenation::concatenation_axis::along_y)); + p.AddInnerPrimitiveToProfiler(WRconcatID, op->get_friendly_name(), op); + + std::vector WRreshapeSize = { 4 * size_t(lstm_hidden_size), size_t(lstm_input_size + lstm_hidden_size) }; + cldnn::primitive_id WRreshapeID = WRconcatID + "_reshape"; + auto reshapeInPrim = cldnn::reshape(WRreshapeID, WRconcatID, CldnnTensorFromIEDims(WRreshapeSize)); + p.AddPrimitive(reshapeInPrim); + p.AddInnerPrimitiveToProfiler(WRreshapeID, op->get_friendly_name(), op); + + for (int i = 0; i < lstm_sequence_len; ++i) { + const std::string id_str = std::to_string(i); + cldnn::primitive_id concatID = layerName + "_inputConcat" + id_str; + cldnn::primitive_id lstm_fc_id = layerName + "_fully_connected" + id_str; + cldnn::primitive_id lstm_fc_resh_id = layerName + "_gemmReshape" + id_str; + cldnn::primitive_id lstm_fc_reor_id = layerName + "_gemmReorder" + id_str; + cldnn::primitive_id lstm_elt_id = layerName + "_lstm_elt" + id_str; + cldnn::primitive_id crop_id = layerName + "_crop" + id_str; + + int seqIdx = isForward ? i : lstm_sequence_len - 1 - i; + const std::string seqIdx_str = std::to_string(seqIdx); + + cldnn::tensor crop_tensor{ inputShape.batch[0], 1, inputShape.spatial[0], inputShape.spatial[1] }; + cldnn::tensor offset_tensor{ 0, static_cast(seqIdx), 0, 0 }; + cldnn::primitive_id inputCrop_id = inputCropID + ":" + seqIdx_str; + p.AddPrimitive(cldnn::crop(inputCrop_id, permuteID, crop_tensor, offset_tensor)); + p.AddInnerPrimitiveToProfiler(inputCrop_id, op->get_friendly_name(), op); + + p.AddPrimitive(cldnn::concatenation(concatID, { inputCrop_id, hiddenStr }, cldnn::concatenation::concatenation_axis::along_x)); + p.AddInnerPrimitiveToProfiler(concatID, op->get_friendly_name(), op); + p.AddPrimitive(cldnn::fully_connected(lstm_fc_id, concatID, WRreshapeID, biasID)); + p.AddInnerPrimitiveToProfiler(lstm_fc_id, op->get_friendly_name(), op); + + p.AddPrimitive(cldnn::reshape(lstm_fc_resh_id, lstm_fc_id, gemmSz)); + p.AddPrimitive(cldnn::reorder(lstm_fc_reor_id, lstm_fc_resh_id, gemmLayout)); + p.AddPrimitive(cldnn::lstm_elt(lstm_elt_id, lstm_fc_reor_id, cellStr, + clip, 0, activations, activation_params, cldnn::lstm_weights_order::fizo)); + p.AddInnerPrimitiveToProfiler(lstm_fc_resh_id, op->get_friendly_name(), op); + p.AddInnerPrimitiveToProfiler(lstm_fc_reor_id, op->get_friendly_name(), op); + p.AddInnerPrimitiveToProfiler(lstm_elt_id, op->get_friendly_name(), op); + + hiddenStr = crop_id + ":hidden"; + cellStr = crop_id + ":cell"; + p.AddPrimitive(cldnn::crop(hiddenStr, lstm_elt_id, hiddenSz, cldnn::tensor{ 0, 0, 0, 0 })); + p.AddInnerPrimitiveToProfiler(hiddenStr, op->get_friendly_name(), op); + output_ids_offsets.push_back(hiddenStr); + + if (i < lstm_sequence_len - 1) { + p.AddPrimitive(cldnn::crop(cellStr, lstm_elt_id, hiddenSz, cellCropSz)); + p.AddInnerPrimitiveToProfiler(cellStr, op->get_friendly_name(), op); + } else { + // last hidden state crop (output 2) + cldnn::primitive_id outputHiddenID = layerName + ".1"; + p.primitiveIDs[hiddenStr] = hiddenStr; + p.primitiveIDs[outputHiddenID] = hiddenStr; + + // last cell state crop (output 3) + p.AddPrimitive(cldnn::crop(cellStr, lstm_elt_id, hiddenSz, cellCropSz)); + cldnn::primitive_id outputCellID = layerName + ".2"; + p.AddInnerPrimitiveToProfiler(cellStr, op->get_friendly_name(), op); + p.primitiveIDs[outputCellID] = cellStr; + } + } + + if (!isForward) std::reverse(output_ids_offsets.begin(), output_ids_offsets.end()); + // concatenated hidden state (output 1) + cldnn::primitive_id outputConcatID = layerName + ".0"; + cldnn::primitive_id concatStr = layerName + ":hiddenConcat"; + p.AddPrimitive(cldnn::concatenation(concatStr, output_ids_offsets, cldnn::concatenation::along_f)); + + p.primitiveIDs[outputConcatID] = concatStr; + p.primitiveIDs[layerName] = concatStr; + p.AddPrimitiveToProfiler(layerName, op); +} + +REGISTER_FACTORY_IMPL(v4, LSTMCell); +REGISTER_FACTORY_IMPL(v5, LSTMSequence); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/roi_pooling.cpp b/inference-engine/src/cldnn_engine/ops/roi_pooling.cpp new file mode 100644 index 00000000000000..6d9d15ee4ba632 --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/roi_pooling.cpp @@ -0,0 +1,122 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/roi_pooling.hpp" +#include "ngraph/op/psroi_pooling.hpp" +#include "ngraph/op/deformable_psroi_pooling.hpp" + +#include "api/roi_pooling.hpp" + +namespace CLDNNPlugin { + +static cldnn::pooling_mode GetPoolingMode(std::string method) { + if (method == "bilinear") + return cldnn::pooling_mode::bilinear; + else if (method == "max") + return cldnn::pooling_mode::max; + else if (method == "average") + return cldnn::pooling_mode::average; + else + return cldnn::pooling_mode::deformable_bilinear; +} + +void CreateDeformablePSROIPoolingOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {2, 3}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + cldnn::pooling_mode mode = GetPoolingMode(op->get_mode()); + float trans_std = op->get_trans_std(); + int part_size = op->get_part_size(); + bool no_trans = op->get_input_size() == 2 ? true : false; + + // temporary workaround due to incorrect usage of group_size in the nGraph operation for the DeformablePSROIPooling + int pooled_width = op->get_group_size(); + int pooled_height = op->get_group_size(); + int group_size = op->get_group_size(); + int output_dim = op->get_output_dim(); + float spatial_scale = op->get_spatial_scale(); + int spatial_bins_x = op->get_spatial_bins_x(); + int spatial_bins_y = op->get_spatial_bins_y(); + bool position_sensitive = true; + + auto psROIPoolingPrim = cldnn::roi_pooling(layerName, + inputPrimitives, + mode, + position_sensitive, + pooled_width, + pooled_height, + spatial_scale, + trans_std, + no_trans, + part_size, + group_size, + output_dim, + spatial_bins_x, + spatial_bins_y); + p.AddPrimitive(psROIPoolingPrim); +} + +void CreatePSROIPoolingOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {2}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + cldnn::pooling_mode mode = GetPoolingMode(op->get_mode()); + int group_size = op->get_group_size(); + int output_dim = op->get_output_dim(); + float spatial_scale = op->get_spatial_scale(); + int spatial_bins_x = op->get_spatial_bins_x(); + int spatial_bins_y = op->get_spatial_bins_y(); + bool position_sensitive = true; + + auto psROIPoolingPrim = cldnn::roi_pooling(layerName, + inputPrimitives[0], // input data + inputPrimitives[1], // input rois + mode, + position_sensitive, + group_size, + group_size, + spatial_scale, + output_dim, + spatial_bins_x, + spatial_bins_y); + p.AddPrimitive(psROIPoolingPrim); + p.AddPrimitiveToProfiler(op); +} + +void CreateROIPoolingOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {2}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + // params + auto out_size = op->get_output_size(); + int pooled_height = out_size[0]; + int pooled_width = out_size[1]; + float spatial_scale = op->get_spatial_scale(); + bool position_sensitive = false; + + cldnn::pooling_mode mode = GetPoolingMode(op->get_method()); + auto roiPoolingPrim = cldnn::roi_pooling(layerName, + inputPrimitives[0], // input data + inputPrimitives[1], // input rois + mode, + position_sensitive, + pooled_width, + pooled_height, + spatial_scale); + + p.AddPrimitive(roiPoolingPrim); + p.AddPrimitiveToProfiler(op); +} + +REGISTER_FACTORY_IMPL(v1, DeformablePSROIPooling); +REGISTER_FACTORY_IMPL(v0, PSROIPooling); +REGISTER_FACTORY_IMPL(v0, ROIPooling); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/scatter_update.cpp b/inference-engine/src/cldnn_engine/ops/scatter_update.cpp new file mode 100644 index 00000000000000..18971a9b29a002 --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/scatter_update.cpp @@ -0,0 +1,68 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/scatter_update.hpp" +#include "ngraph/op/constant.hpp" + +#include "api/scatter_update.hpp" + +namespace CLDNNPlugin { + +static inline cldnn::scatter_update::scatter_update_axis GetScatterUpdateAxis(int axis, unsigned rank) { + if (axis < 0) + axis += rank; + if (axis < 0 || axis >= rank) + THROW_IE_EXCEPTION << "ScatterUpdate axis is not correspond to number of dimensions"; + + // Difference in dimension ordering between IE and clDNN, + // reverse spatial dimensions after batch and feature. + unsigned cldnn_axis = axis; + if (axis >= 2) { + auto spatial_axis = axis - 2; + // Default and minimum number of dimensions is 4 + auto spatial_size = std::max(rank, 4u) - 2; + cldnn_axis = spatial_size - spatial_axis - 1 + 2; + } + + switch (cldnn_axis) { + case 0: return cldnn::scatter_update::scatter_update_axis::along_b; + case 1: return cldnn::scatter_update::scatter_update_axis::along_f; + case 2: return cldnn::scatter_update::scatter_update_axis::along_x; + case 3: return cldnn::scatter_update::scatter_update_axis::along_y; + case 4: return cldnn::scatter_update::scatter_update_axis::along_z; + case 5: return cldnn::scatter_update::scatter_update_axis::along_w; + default: THROW_IE_EXCEPTION << "Unsupported ScatterUpdate axis: " << axis; + } + + return cldnn::scatter_update::scatter_update_axis::along_f; // shouldn't get here +} + +void CreateScatterUpdateOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {4}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + size_t rank = op->get_input_shape(0).size(); + auto axes_constant = std::dynamic_pointer_cast(op->get_input_node_shared_ptr(3)); + if (!axes_constant) { + THROW_IE_EXCEPTION << "Unsupported parameter nodes type in " << op->get_friendly_name() << " (" << op->get_type_name() << ")"; + } + int32_t axis = axes_constant->cast_vector()[0]; + + auto primitive = cldnn::scatter_update(layerName, + inputPrimitives[0], + inputPrimitives[1], + inputPrimitives[2], + GetScatterUpdateAxis(axis, rank)); + + p.AddPrimitive(primitive); + p.AddPrimitiveToProfiler(op); +} + +REGISTER_FACTORY_IMPL(v3, ScatterUpdate); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/select.cpp b/inference-engine/src/cldnn_engine/ops/select.cpp new file mode 100644 index 00000000000000..bf1d18a89c9dfd --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/select.cpp @@ -0,0 +1,85 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/select.hpp" + +#include "api/select.hpp" +#include "api/reorder.hpp" +#include "api/reshape.hpp" + +namespace CLDNNPlugin { + +void CreateSelectOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {3}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + auto outDims = op->get_output_shape(0); + auto outDimsN = outDims.size(); + + auto broadcast_type = op->get_auto_broadcast(); + + if (broadcast_type.m_type != ngraph::op::AutoBroadcastType::NONE && + broadcast_type.m_type != ngraph::op::AutoBroadcastType::NUMPY) { + THROW_IE_EXCEPTION << "Unsupported broadcast type (" << broadcast_type.m_type << ") in layer " + op->get_friendly_name(); + } + + if (broadcast_type.m_type == ngraph::op::AutoBroadcastType::NUMPY) { + // Preprocess inputs + for (size_t i = 0; i < inputPrimitives.size(); ++i) { + auto inputDims = op->get_input_shape(i); + auto inputDimsN = inputDims.size(); + + // Add reorder if changing number of dimensions requires changing format + auto targetFormat = DefaultFormatForDims(outDimsN); + + if (targetFormat.value != DefaultFormatForDims(inputDimsN).value) { + auto reorderName = layerName + "_cldnn_in" + std::to_string(i) + "_reorder"; + auto targetDatatype = DataTypeFromPrecision(op->get_input_element_type(i)); + auto reorderPrim = cldnn::reorder(reorderName, inputPrimitives[i], targetFormat, targetDatatype); + + p.AddPrimitive(reorderPrim); + p.AddInnerPrimitiveToProfiler(reorderName, layerName, op); + + inputPrimitives[i] = reorderName; + } + + // Reshape input if they differ or select specific shape matches default one + if (inputDimsN != outDimsN || inputDimsN < 4) { + auto reshapeName = layerName + "_cldnn_in" + std::to_string(i) + "_reshape"; + + // Extend input dimensions to the same size as output dimensions by prepending ones + inputDims.insert(inputDims.begin(), outDimsN - inputDimsN, 1ul); + + auto targetShape = CldnnTensorFromIEDims(inputDims); + + auto reshapePrim = cldnn::reshape(reshapeName, inputPrimitives[i], targetShape); + + p.AddPrimitive(reshapePrim); + p.AddInnerPrimitiveToProfiler(reshapeName, layerName, op); + + inputPrimitives[i] = reshapeName; + } + } + } + + std::string bc_string = broadcast_type.m_type == ngraph::op::AutoBroadcastType::NUMPY ? "numpy" : "none"; + + auto selectPrim = cldnn::select(layerName, + inputPrimitives[0], + inputPrimitives[1], + inputPrimitives[2], + cldnn::padding(), + bc_string); + + p.AddPrimitive(selectPrim); + p.AddPrimitiveToProfiler(op); +} + +REGISTER_FACTORY_IMPL(v1, Select); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/shuffle_channels.cpp b/inference-engine/src/cldnn_engine/ops/shuffle_channels.cpp new file mode 100644 index 00000000000000..afeedb6fee1c0d --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/shuffle_channels.cpp @@ -0,0 +1,47 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/shuffle_channels.hpp" + +#include "api/shuffle_channels.hpp" + +namespace CLDNNPlugin { + +void CreateShuffleChannelsOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {1, 2}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + auto in_rank = op->get_input_shape(0).size(); + + int32_t group = op->get_group(); + int32_t axis = op->get_axis(); + + if (axis < 0) + axis += in_rank; + + if (axis < 0 || axis >= in_rank) + THROW_IE_EXCEPTION << "Incorrect axis value! Actual axis is" + std::to_string(group); + + if (group < 1) + THROW_IE_EXCEPTION << "Invalid group size value (should equal at least one). Actual block size is" << std::to_string(group); + + if (op->get_input_shape(0)[axis] % group != 0) + THROW_IE_EXCEPTION << "Group parameter must evenly divide the channel dimension. Actual group size is " << std::to_string(axis); + + auto shuffleChannelsPrim = cldnn::shuffle_channels(layerName, + inputPrimitives[0], + group, + axis); + + p.AddPrimitive(shuffleChannelsPrim); + p.AddPrimitiveToProfiler(op); +} + +REGISTER_FACTORY_IMPL(v0, ShuffleChannels); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/softmax.cpp b/inference-engine/src/cldnn_engine/ops/softmax.cpp new file mode 100644 index 00000000000000..d27c9c4b92cc48 --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/softmax.cpp @@ -0,0 +1,74 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/softmax.hpp" +#include "ngraph/op/log_softmax.hpp" + +#include "api/softmax.hpp" +#include "api/activation.hpp" + +namespace CLDNNPlugin { + +static cldnn::softmax::dimension_t GetSoftmaxAxis(int64_t axis, size_t rank) { + switch (axis) { + // FIXME: it seems that axis=0 should correspond to normalize_b; + case 0: return cldnn::softmax::normalize_all; + case 1: return cldnn::softmax::normalize_f; + case 2: + if (rank > 4) + return cldnn::softmax::normalize_z; + else + return cldnn::softmax::normalize_y; + case 3: + if (rank > 4) + return cldnn::softmax::normalize_y; + else + return cldnn::softmax::normalize_x; + case 4: + return cldnn::softmax::normalize_x; + default: THROW_IE_EXCEPTION << "Invalid softmax axis " << axis; + } + return cldnn::softmax::normalize_fyx; +} + +void CreateSoftmaxOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {1}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + auto softmaxPrim = cldnn::softmax(layerName, + inputPrimitives[0], + GetSoftmaxAxis(op->get_axis(), op->get_input_shape(0).size())); + p.AddPrimitive(softmaxPrim); + p.AddPrimitiveToProfiler(op); +} + +void CreateLogSoftmaxOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {1}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + std::string layerNameSoftmax = layer_type_name_ID(op) + "_softmax"; + + auto axis = op->get_axis(); + if (axis < 0) + axis += op->get_input_shape(0).size(); + + auto softmaxPrim = cldnn::softmax(layerNameSoftmax, + inputPrimitives[0], + GetSoftmaxAxis(static_cast(axis), op->get_input_shape(0).size())); + + auto logPrim = cldnn::activation(layerName, layerNameSoftmax, cldnn::activation_func::log); + + p.AddPrimitive(softmaxPrim); + p.AddPrimitive(logPrim); + p.AddPrimitiveToProfiler(layerNameSoftmax, op); + p.AddPrimitiveToProfiler(layerName, op); +} + +REGISTER_FACTORY_IMPL(v1, Softmax); +REGISTER_FACTORY_IMPL(v5, LogSoftmax); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/space_to_batch.cpp b/inference-engine/src/cldnn_engine/ops/space_to_batch.cpp new file mode 100644 index 00000000000000..9748864884056d --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/space_to_batch.cpp @@ -0,0 +1,53 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/space_to_batch.hpp" +#include "ngraph/op/constant.hpp" + +#include "api/space_to_batch.hpp" + +namespace CLDNNPlugin { + +void CreateSpaceToBatchOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {4}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + auto rank = op->get_input_shape(0).size(); + auto format = DefaultFormatForDims(rank); + + std::vector inputs; + inputs.reserve(3); + + for (size_t i = 1; i < 4; ++i) { + auto inConst = std::dynamic_pointer_cast(op->get_input_node_shared_ptr(i)); + if (!inConst) + THROW_IE_EXCEPTION << "Unsupported parameter nodes type in " << op->get_friendly_name() << " (" << op->get_type_name() << ")"; + + std::vector sizes = inConst->cast_vector(); + int32_t default_size = i == 1 ? 1 : 0; + for (size_t s = sizes.size(); s < rank; s++) { + sizes.push_back(default_size); + } + inputs.emplace_back(format, sizes, default_size); + } + auto out_size = CldnnTensorFromIEDims(op->get_output_shape(0)); + + auto batchToSpacePrim = cldnn::space_to_batch(layerName, + inputPrimitives[0], // input + inputs[0], // block_shape + inputs[1], // crops_begin + inputs[2], // crops_end + out_size); + + p.AddPrimitive(batchToSpacePrim); + p.AddPrimitiveToProfiler(op); +} + +REGISTER_FACTORY_IMPL(v1, SpaceToBatch); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/space_to_depth.cpp b/inference-engine/src/cldnn_engine/ops/space_to_depth.cpp new file mode 100644 index 00000000000000..e9731348d59f4d --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/space_to_depth.cpp @@ -0,0 +1,38 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/space_to_depth.hpp" + +#include "api/space_to_depth.hpp" + +namespace CLDNNPlugin { + +static cldnn::space_to_depth::depth_mode GetDepthMode(ngraph::op::v0::SpaceToDepth::SpaceToDepthMode mode) { + switch (mode) { + case ngraph::op::v0::SpaceToDepth::SpaceToDepthMode::BLOCKS_FIRST: return cldnn::space_to_depth::blocks_first; + case ngraph::op::v0::SpaceToDepth::SpaceToDepthMode::DEPTH_FIRST: return cldnn::space_to_depth::depth_first; + default: THROW_IE_EXCEPTION << "Unsupported SpaceToDepthMode value: " << static_cast(mode); + } + return cldnn::space_to_depth::blocks_first; +} + +void CreateSpaceToDepthOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {1}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + auto spaceToDepthPrim = cldnn::space_to_depth(layerName, + inputPrimitives[0], + GetDepthMode(op->get_mode()), + op->get_block_size()); + + p.AddPrimitive(spaceToDepthPrim); + p.AddPrimitiveToProfiler(op); +} + +REGISTER_FACTORY_IMPL(v0, SpaceToDepth); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/split.cpp b/inference-engine/src/cldnn_engine/ops/split.cpp new file mode 100644 index 00000000000000..65cbf59873b831 --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/split.cpp @@ -0,0 +1,73 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/split.hpp" +#include "ngraph/op/variadic_split.hpp" + +#include "api/crop.hpp" + +namespace CLDNNPlugin { + +void CreateCommonSplitOp(Program& p, const std::shared_ptr& op) { + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + auto inputDims = op->get_input_shape(0); + InferenceEngine::SizeVector startOffset(inputDims.size()); + + bool is_single_out_split = op->get_output_size() == 1; + + for (size_t i = 0; i < op->get_output_size(); i++) { + std::string outLayerName = layerName + (is_single_out_split ? "" : "." + std::to_string(i)); + const auto outLayerDims = op->get_output_shape(i); + if (outLayerDims.size() != startOffset.size()) { + THROW_IE_EXCEPTION << "Invalid dimesions in split layer: " << op->get_friendly_name() + << " output: " << op->get_output_tensor_name(i); + } + for (size_t i = 0; i < inputDims.size(); i++) { + if ((outLayerDims[i] + startOffset[i]) > inputDims[i]) { + THROW_IE_EXCEPTION << "Invalid dimesions in split layer: " << op->get_friendly_name() + << " output: " << op->get_output_tensor_name(i); + } + } + + auto outTensor = CldnnTensorFromIEDims(outLayerDims, 1); + auto offsetTensor = CldnnTensorFromIEDims(startOffset, 0); + + auto cropPrim = cldnn::crop(outLayerName, inputPrimitives[0], outTensor, offsetTensor); + p.primitivesToIRLayersMap[outLayerName] = { op->get_friendly_name() }; + p.primitiveIDs[outLayerName] = outLayerName; + + p.AddPrimitive(cropPrim); + p.profilingIDs.push_back(outLayerName); + p.InitProfileInfo(outLayerName, "Crop"); + + for (size_t i = 0; i < inputDims.size(); i++) { + if (outLayerDims[i] != inputDims[i]) { + startOffset[i] += outLayerDims[i]; + } + } + } + + // set split as not_run + p.InitProfileInfo(op->get_friendly_name(), op->get_type_name(), false, InferenceEngine::InferenceEngineProfileInfo::OPTIMIZED_OUT); +} + +void CreateSplitOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {2}); + CreateCommonSplitOp(p, op); +} + +void CreateVariadicSplitOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {3}); + CreateCommonSplitOp(p, op); +} + +REGISTER_FACTORY_IMPL(v1, Split); +REGISTER_FACTORY_IMPL(v1, VariadicSplit); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/strided_slice.cpp b/inference-engine/src/cldnn_engine/ops/strided_slice.cpp new file mode 100644 index 00000000000000..afc3533dfc90e7 --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/strided_slice.cpp @@ -0,0 +1,276 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/strided_slice.hpp" +#include "ngraph/op/constant.hpp" + +#include "api/strided_slice.hpp" +#include "api/reshape.hpp" +#include "api/crop.hpp" + +namespace CLDNNPlugin { + +void CreateStridedSliceOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {4}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + do { + auto data_output = op->input_value(0); + auto begin_node = std::dynamic_pointer_cast(op->input_value(1).get_node_shared_ptr()); + auto end_node = std::dynamic_pointer_cast(op->input_value(2).get_node_shared_ptr()); + auto stride_node = std::dynamic_pointer_cast(op->input_value(3).get_node_shared_ptr()); + + auto partial_input_shape = op->get_input_partial_shape(0); + + if (!begin_node || !end_node || !stride_node || partial_input_shape.is_dynamic()) { + break; + } + + for (auto& m : op->get_begin_mask()) { + if (m != 0) + break; + } + + for (auto& m : op->get_end_mask()) { + if (m != 0) + break; + } + + auto input_shape = op->get_input_shape(0); + auto output_shape = op->get_output_shape(0); + + auto begin = begin_node->cast_vector(); + auto end = end_node->cast_vector(); + auto strides = stride_node->cast_vector(); + + bool ones_stride = true; + for (auto & s : strides) { + if (s != 1) + ones_stride = false; + } + + if (!ones_stride) + break; + + auto convert_to_set = [](const std::vector mask) { + ngraph::AxisSet axis_set{}; + for (size_t i = 0; i < static_cast(mask.size()); ++i) { + if (mask[i] == 1) { + axis_set.emplace(i); + } + } + return axis_set; + }; + + auto shrink_axis_mask = convert_to_set(op->get_shrink_axis_mask()); + auto new_axis_mask = convert_to_set(op->get_new_axis_mask()); + auto ellipsis_mask = convert_to_set(op->get_ellipsis_mask()); + auto begin_mask = convert_to_set(op->get_begin_mask()); + auto end_mask = convert_to_set(op->get_end_mask()); + + std::vector reshape_pattern, + axes, + offset, + dim; + + size_t input_shape_idx = 0; + uint64_t uniq_id = 0; + for (size_t axis = 0; axis < begin.size(); ++axis) { + // add dimensions hidden under the ellipsis mask if ellipsis mask is set + if (ellipsis_mask.count(axis)) { + // only one bit in ellipsis mask is allowed + int num_new_axis_after_ellipses = 0; + int num_input_axis_before_ellipses = 0; + for (size_t i = 0; i < axis; ++i) { + if (!new_axis_mask.count(i)) + num_input_axis_before_ellipses++; + } + for (size_t i = axis + 1; i < begin.size(); ++i) { + if (new_axis_mask.count(i)) + num_new_axis_after_ellipses++; + } + + // -1 because it's a position of ellipses + unsigned long num_input_axis_after_ellipses = (begin.size() - axis - num_new_axis_after_ellipses - 1); + unsigned long num_of_hidden_dims = input_shape.size() - num_input_axis_after_ellipses + - num_input_axis_before_ellipses; + for (size_t i = 0; i < num_of_hidden_dims; ++i) { + axes.emplace_back(uniq_id); + uniq_id++; + reshape_pattern.emplace_back(input_shape[input_shape_idx]); + offset.emplace_back(0); + + dim.emplace_back(input_shape[input_shape_idx]); + input_shape_idx++; + } + } else { + // add new single dimension if new_axis_mask is set + if (new_axis_mask.count(axis)) { + reshape_pattern.emplace_back(1); + dim.emplace_back(1); + offset.emplace_back(0); + } else if (shrink_axis_mask.count(axis)) { + // skip this dimension if shrink_axis_mask is set (input_shape_idx++) + dim.emplace_back(1); + offset.emplace_back(begin_mask.count(axis) ? 0 : begin[axis]); + reshape_pattern.emplace_back(1); + input_shape_idx++; + } else { + // calculate dimension using begin, end, begin_mask, end_mask, stride + reshape_pattern.emplace_back(input_shape[input_shape_idx]); + + int64_t lb = begin[axis]; + int64_t ub = end[axis]; + + // convert negative indexes to positive + if (lb < 0) + lb = std::max(static_cast(input_shape[input_shape_idx]) + lb, + static_cast(0)); + if (ub < 0) + ub = std::max(static_cast(input_shape[input_shape_idx]) + ub, + static_cast(0)); + + // apply restrictions when begin or end values more/less than max/min possible values. + lb = std::min(static_cast(input_shape[input_shape_idx]), lb); + ub = std::min(static_cast(input_shape[input_shape_idx]), ub); + + offset.emplace_back(lb); + + // set default value for stride or use given value + int64_t stride = 1; + if (strides.size() > axis) + stride = strides[axis]; + + int64_t dimension = 0; + if (stride < 0) { + // apply masks + if (begin_mask.count(axis)) + lb = static_cast(input_shape[input_shape_idx]) - 1; + if (end_mask.count(axis)) + ub = -1; + + lb = std::min(lb, static_cast(input_shape[input_shape_idx]) - 1); + lb -= 1; // we always get 1st element, so we need decrease range + if (ub <= lb) + dimension = (ub - lb) / stride + 1; + } else { + // apply masks + if (begin_mask.count(axis)) + lb = 0; + if (end_mask.count(axis)) + ub = static_cast(input_shape[input_shape_idx]); + + lb += 1; // we always get 1st element, so we need decrease range + if (ub >= lb) + dimension = (ub - lb) / stride + 1; + } + + dim.emplace_back(dimension); + input_shape_idx++; + } + axes.emplace_back(uniq_id); + uniq_id++; + } + } + + for (; input_shape_idx < input_shape.size(); ++input_shape_idx) { + reshape_pattern.emplace_back(input_shape[input_shape_idx]); + offset.emplace_back(0); + dim.emplace_back(input_shape[input_shape_idx]); + axes.emplace_back(uniq_id); + uniq_id++; + } + + if (axes.size() != 4) { + break; + } + + auto inPrimitive = inputPrimitives[0]; + // Reshape in case of new axis + if (!new_axis_mask.empty()) { + auto targetShape = CldnnTensorFromIEDims(reshape_pattern); + auto reshapeInName = op->get_friendly_name() + "/Reshape_before"; + auto reshapePrim = cldnn::reshape(reshapeInName, inputPrimitives[0], targetShape); + p.AddPrimitive(reshapePrim); + p.AddInnerPrimitiveToProfiler(reshapeInName, layerName, op); + inPrimitive = reshapeInName; + } + + auto data_node_shape = data_output.get_shape(); + + std::vector offset_tensor{ 0, 0, 0, 0 }; + for (size_t i = 0; i < axes.size(); i++) { + if (axes[i] < 0 || axes[i] > 3) { + THROW_IE_EXCEPTION << "Invalid crop axis: " << std::to_string(axes[i]) << " in op " + op->get_friendly_name(); + } + offset_tensor[axes[i]] = offset[i]; + } + + ngraph::Shape crop_shape(reshape_pattern); + for (int i = 0; i < axes.size(); ++i) { + crop_shape[axes[i]] = dim[i]; + } + + + const size_t ods = crop_shape.size(); + cldnn::tensor refSize = CldnnTensorFromIEDims(crop_shape); + cldnn::tensor offSize = CldnnTensorFromIEDims(offset, 0); + + + auto cropPrim = cldnn::crop(layerName, inPrimitive, refSize, offSize); + p.AddPrimitive(cropPrim); + p.AddPrimitiveToProfiler(layerName, op); + + // Reshape in case of deleting of axis + if (!shrink_axis_mask.empty()) { + auto targetShape = CldnnTensorFromIEDims(output_shape); + auto reshapeOutName = op->get_friendly_name() + "/Crop"; + auto reshapePrim = cldnn::reshape(reshapeOutName, layerName, targetShape); + p.AddPrimitive(reshapePrim); + p.AddInnerPrimitiveToProfiler(reshapeOutName, layerName, op); + } + return; + } while (false); + + auto end_mask_ = op->get_end_mask(); + auto begin_mask_ = op->get_begin_mask(); + auto new_axis_mask_ = op->get_new_axis_mask(); + auto shrink_axis_mask_ = op->get_shrink_axis_mask(); + std::vector begin_mask(begin_mask_.begin(), begin_mask_.end()); + std::vector end_mask(end_mask_.begin(), end_mask_.end()); + std::vector new_axis_mask(new_axis_mask_.begin(), new_axis_mask_.end()); + std::vector shrink_axis_mask(shrink_axis_mask_.begin(), shrink_axis_mask_.end()); + + // Plugin requires inverted mask values. Consider changing primitive impl to be aligned with the spec. + for (auto& b : begin_mask) { + b = 1 - b; + } + for (auto& e : end_mask) { + e = 1 - e; + } + + auto out_size = CldnnTensorFromIEDims(op->get_output_shape(0)); + + auto stridedSlicePrim = cldnn::strided_slice(layerName, + inputPrimitives[0], + inputPrimitives[1], + inputPrimitives[2], + inputPrimitives[3], + begin_mask, + end_mask, + new_axis_mask, + shrink_axis_mask, + out_size); + + p.AddPrimitive(stridedSlicePrim); + p.AddPrimitiveToProfiler(op); +} + +REGISTER_FACTORY_IMPL(v1, StridedSlice); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/tile.cpp b/inference-engine/src/cldnn_engine/ops/tile.cpp new file mode 100644 index 00000000000000..0b4eb265ba32bc --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/tile.cpp @@ -0,0 +1,29 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/tile.hpp" + +#include "api/tile.hpp" + +namespace CLDNNPlugin { + +void CreateTileOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {2}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + auto tilePrim = cldnn::tile(layerName, + inputPrimitives[0], + CldnnTensorFromIEDims(op->get_output_shape(0))); + + p.AddPrimitive(tilePrim); + p.AddPrimitiveToProfiler(op); +} + +REGISTER_FACTORY_IMPL(v0, Tile); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/topk.cpp b/inference-engine/src/cldnn_engine/ops/topk.cpp new file mode 100644 index 00000000000000..b0e01db5a9f995 --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/topk.cpp @@ -0,0 +1,123 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "cldnn_common_utils.h" + +#include "ngraph/op/topk.hpp" + +#include "api/arg_max_min.hpp" +#include "api/mutable_data.hpp" + +namespace CLDNNPlugin { + +static cldnn::arg_max_min::axis_name GetAxis(int32_t axis, size_t in_rank) { + if (in_rank == 5) { + if (-5 <= axis && axis <= -1) + axis += 5; + + switch (axis) { + case 0: return cldnn::arg_max_min::axis_name::batch; + case 1: return cldnn::arg_max_min::axis_name::feature; + case 2: return cldnn::arg_max_min::axis_name::z; + case 3: return cldnn::arg_max_min::axis_name::y; + case 4: return cldnn::arg_max_min::axis_name::x; + } + } else { + if (-static_cast(in_rank) <= axis && axis <= -1) + axis += in_rank; + + switch (axis) { + case 0: return cldnn::arg_max_min::axis_name::batch; + case 1: return cldnn::arg_max_min::axis_name::feature; + case 2: return cldnn::arg_max_min::axis_name::y; + case 3: return cldnn::arg_max_min::axis_name::x; + } + } + + return cldnn::arg_max_min::axis_name::batch; +} + +void CreateTopKOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {2}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + cldnn::arg_max_min::out_type otype; + cldnn::arg_max_min::sort_type stype; + + if (op->get_mode() == ngraph::op::v1::TopK::Mode::MAX) + otype = cldnn::arg_max_min::out_type::max; + else + otype = cldnn::arg_max_min::out_type::min; + + if (op->get_sort_type() == ngraph::op::v1::TopK::SortType::SORT_VALUES) + stype = cldnn::arg_max_min::sort_type::sort_by_values; + else + stype = cldnn::arg_max_min::sort_type::sort_by_indices; + + uint32_t top_k = op->get_k(); + cldnn::arg_max_min::axis_name chosen_axis = GetAxis(static_cast(op->get_axis()), + op->get_input_shape(0).size()); + + if (op->get_output_size() == 2) { + auto mutable_precision = op->get_output_element_type(1); + if (mutable_precision == ngraph::element::i64) { + mutable_precision = ngraph::element::i32; + } + + cldnn::layout mutableLayout = cldnn::layout(DataTypeFromPrecision(mutable_precision), + DefaultFormatForDims(op->get_output_shape(1).size()), + CldnnTensorFromIEDims(op->get_output_shape(1))); + + auto shared_memory = cldnn::memory::allocate(p.GetEngine(), mutableLayout); + + cldnn::primitive_id argmax_mutable_id_w = layer_type_name_ID(op) + "_md_write"; + auto argmax_mutable_prim = cldnn::mutable_data(argmax_mutable_id_w, shared_memory); + p.primitivesToIRLayersMap[argmax_mutable_id_w] = {op->get_friendly_name()}; + p.primitiveIDs[argmax_mutable_id_w] = argmax_mutable_id_w; + p.AddPrimitive(argmax_mutable_prim); + inputPrimitives.push_back(argmax_mutable_id_w); + + std::string ArgMaxLayerName = layerName + ".0"; + auto argmaxPrim = cldnn::arg_max_min(ArgMaxLayerName, + inputPrimitives, + otype, + top_k, + chosen_axis, + stype, + true, + cldnn::padding({0, 0, 0, 0}, 0), + DataTypeFromPrecision(op->get_output_element_type(0))); + + p.AddPrimitive(argmaxPrim); + + cldnn::primitive_id argmax_mutable_id_r = layerName + ".1"; + auto argmax_mutable_prim_r = cldnn::mutable_data(argmax_mutable_id_r, {ArgMaxLayerName}, shared_memory); + p.primitivesToIRLayersMap[argmax_mutable_id_r] = {op->get_friendly_name()}; + p.primitiveIDs[argmax_mutable_id_r] = argmax_mutable_id_r; + p.AddPrimitive(argmax_mutable_prim_r); + p.InitProfileInfo(ArgMaxLayerName, layer_type_lower(op)); + p.AddPrimitiveToProfiler(ArgMaxLayerName, op); + } else if (op->get_output_size() == 1) { + auto argmaxPrim = cldnn::arg_max_min(layerName, + inputPrimitives, + otype, + top_k, + chosen_axis, + stype, + true, + cldnn::padding({0, 0, 0, 0}, 0), + DataTypeFromPrecision(op->get_output_element_type(0))); + + p.AddPrimitive(argmaxPrim); + p.AddPrimitiveToProfiler(op); + } else { + THROW_IE_EXCEPTION << op->get_friendly_name() << " Incorrect TopK outputs number"; + } +} + +REGISTER_FACTORY_IMPL(v1, TopK); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/transpose.cpp b/inference-engine/src/cldnn_engine/ops/transpose.cpp new file mode 100644 index 00000000000000..023be75e2e7e9b --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/transpose.cpp @@ -0,0 +1,80 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" + +#include "ngraph/op/transpose.hpp" +#include "ngraph/op/constant.hpp" + +#include "api/permute.hpp" + +namespace CLDNNPlugin { + +template +std::vector GetPermuteOrder(const std::vector& ie_order, Type value_to_align = 0) { + static_assert(std::is_integral::value, "Integeral required."); + std::vector cldnn_order = ie_order; + + // 1. Align to min. 4 sizes + if (cldnn_order.size() < 4) + cldnn_order.push_back(value_to_align); + + // 2. Swap spatial positions + for (int i = 0; i < (cldnn_order.size() - 2) / 2; i++) { + std::swap(cldnn_order[2 + i], cldnn_order[1 + cldnn_order.size() - (2 + i)]); + } + + return cldnn_order; +} + +void CreateTransposeOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {1, 2}); + auto inputPrimitives = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + + std::vector ie_order; + if (op->get_input_size() == 2) { + auto order_constant = std::dynamic_pointer_cast(op->get_input_node_shared_ptr(1)); + if (!order_constant) { + THROW_IE_EXCEPTION << "Unsupported parameter nodes type in " << op->get_friendly_name() << " (" << op->get_type_name() << ")"; + } + ie_order = order_constant->cast_vector(); + } + + int rank = std::max(4, static_cast(op->get_input_shape(0).size())); + if (ie_order.empty()) { + // if order size is less than 4 - fill the rest with just copy + for (int o = rank - 1; o >= 0; o--) + ie_order.push_back((uint16_t)o); + } + + // if order size is less than 4 - fill the rest with just copy + for (auto o = ie_order.size(); o < rank; o++) + ie_order.push_back((uint16_t)o); + + /* + Because of the cldnn ordering: bfxy, and IE ordering: bfyx + we need to adjust the permute order. + */ + std::vector cldnn_permute_order; + // 1. Switch permute order values for spatial dims + for (auto const& o : ie_order) { + if (o >= 2) + cldnn_permute_order.push_back(1 + ie_order.size() - o); + else + cldnn_permute_order.push_back(o); + } + cldnn_permute_order = GetPermuteOrder(cldnn_permute_order); + + auto permutePrim = cldnn::permute(layerName, + inputPrimitives[0], + cldnn_permute_order); + + p.AddPrimitive(permutePrim); + p.AddPrimitiveToProfiler(op); +} + +REGISTER_FACTORY_IMPL(v1, Transpose); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/cldnn_engine/ops/unary.cpp b/inference-engine/src/cldnn_engine/ops/unary.cpp new file mode 100644 index 00000000000000..943690af4d0b64 --- /dev/null +++ b/inference-engine/src/cldnn_engine/ops/unary.cpp @@ -0,0 +1,312 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "cldnn_program.h" +#include "transformations/utils/utils.hpp" + +#include "ngraph/op/tanh.hpp" +#include "ngraph/op/elu.hpp" +#include "ngraph/op/sigmoid.hpp" +#include "ngraph/op/relu.hpp" +#include "ngraph/op/prelu.hpp" +#include "ngraph/op/clamp.hpp" +#include "ngraph/op/exp.hpp" +#include "ngraph/op/not.hpp" +#include "ngraph/op/asin.hpp" +#include "ngraph/op/asinh.hpp" +#include "ngraph/op/acos.hpp" +#include "ngraph/op/acosh.hpp" +#include "ngraph/op/atan.hpp" +#include "ngraph/op/atanh.hpp" +#include "ngraph/op/abs.hpp" +#include "ngraph/op/floor.hpp" +#include "ngraph/op/ceiling.hpp" +#include "ngraph/op/erf.hpp" +#include "ngraph/op/hard_sigmoid.hpp" +#include "ngraph/op/log.hpp" +#include "ngraph/op/negative.hpp" +#include "ngraph/op/selu.hpp" +#include "ngraph/op/softplus.hpp" +#include "ngraph/op/tan.hpp" +#include "ngraph/op/sin.hpp" +#include "ngraph/op/sinh.hpp" +#include "ngraph/op/cos.hpp" +#include "ngraph/op/cosh.hpp" +#include "ngraph/op/swish.hpp" +#include "ngraph/op/hswish.hpp" +#include "ngraph/op/mish.hpp" +#include "ngraph/op/gelu.hpp" +#include "ngraph/op/sign.hpp" +#include "ngraph/op/hsigmoid.hpp" +#include "ngraph/op/round.hpp" + +#include "api/activation.hpp" + +namespace CLDNNPlugin { + +void CreateUnaryEltwiseOp(Program& p, const std::shared_ptr& op, + cldnn::activation_func func, cldnn::activation_additional_params params) { + auto inputs = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + auto activationPrimitive = cldnn::activation(layerName, inputs[0], func, params); + p.AddPrimitive(activationPrimitive); + p.AddPrimitiveToProfiler(op); +} + +void CreateTanhOp(Program& p, const std::shared_ptr& op) { + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::hyperbolic_tan, {}); +} + +void CreateEluOp(Program& p, const std::shared_ptr& op) { + auto alpha = static_cast(op->get_alpha()); + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::elu, {alpha}); +} + +void CreateSigmoidOp(Program& p, const std::shared_ptr& op) { + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::logistic, {}); +} + +void CreateReluOp(Program& p, const std::shared_ptr& op) { + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::relu, {}); +} + +void CreatePReluOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {2}); + + auto slope_node = std::dynamic_pointer_cast(op->get_input_node_shared_ptr(1)); + auto slope_shape = op->get_input_shape(1); + auto out_shape = op->get_output_shape(0); + + if (slope_node && ngraph::shape_size(slope_shape) == 1) { + float slope; + if (!ngraph::op::util::get_single_value(slope_node, slope)) + THROW_IE_EXCEPTION << "Unsupported parameter size in " << op->get_friendly_name() << " (" << op->get_type_name() << ")"; + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::relu_negative_slope, {slope}); + } else if (out_shape.size() >= 2 && ngraph::shape_size(slope_shape) == out_shape[1]) { + auto inputs = p.GetInputPrimitiveIDs(op); + std::string layerName = layer_type_name_ID(op); + auto activationPrimitive = cldnn::activation(layerName, inputs[0], inputs[1], cldnn::activation_func::relu_negative_slope); + p.AddPrimitive(activationPrimitive); + p.AddPrimitiveToProfiler(op); + } +} + +void CreateClampOp(Program& p, const std::shared_ptr& op) { + float min = static_cast(op->get_min()); + float max = static_cast(op->get_max()); + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::clamp, {min, max}); +} + +void CreateExpOp(Program& p, const std::shared_ptr& op) { + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::exp, {}); +} + +void CreateLogicalNotOp(Program& p, const std::shared_ptr& op) { + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::negation, {}); +} + +void CreateAsinOp(Program& p, const std::shared_ptr& op) { + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::asin, {}); +} + +void CreateAsinhOp(Program& p, const std::shared_ptr& op) { + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::asinh, {}); +} + +void CreateAcosOp(Program& p, const std::shared_ptr& op) { + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::acos, {}); +} + +void CreateAcoshOp(Program& p, const std::shared_ptr& op) { + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::acosh, {}); +} + +void CreateAtanOp(Program& p, const std::shared_ptr& op) { + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::atan, {}); +} + +void CreateAtanhOp(Program& p, const std::shared_ptr& op) { + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::atanh, {}); +} + +void CreateAbsOp(Program& p, const std::shared_ptr& op) { + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::abs, {}); +} + +void CreateFloorOp(Program& p, const std::shared_ptr& op) { + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::floor, {}); +} + +void CreateCeilingOp(Program& p, const std::shared_ptr& op) { + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::ceil, {}); +} + +void CreateSqrtOp(Program& p, const std::shared_ptr& op) { + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::sqrt, {}); +} + +void CreateErfOp(Program& p, const std::shared_ptr& op) { + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::erf, {}); +} + +void CreateHardSigmoidOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {3}); + auto alpha_node = std::dynamic_pointer_cast(op->get_input_node_shared_ptr(1)); + auto beta_node = std::dynamic_pointer_cast(op->get_input_node_shared_ptr(2)); + if (!alpha_node || !beta_node) { + THROW_IE_EXCEPTION << "Unsupported parameter nodes type in " << op->get_friendly_name() << " (" << op->get_type_name() << ")"; + } + + if (ngraph::shape_size(alpha_node->get_output_shape(0)) == 1 && + ngraph::shape_size(beta_node->get_output_shape(0)) == 1) { + float alpha, beta; + if (!ngraph::op::util::get_single_value(alpha_node, alpha) || !ngraph::op::util::get_single_value(beta_node, beta)) { + THROW_IE_EXCEPTION << "Unsupported parameter size in " << op->get_friendly_name() << " (" << op->get_type_name() << ")"; + } + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::hard_sigmoid, {alpha, beta}); + } +} + +void CreateLogOp(Program& p, const std::shared_ptr& op) { + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::log, {}); +} + +void CreateNegativeOp(Program& p, const std::shared_ptr& op) { + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::negative, {}); +} + +void CreateSeluOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {3}); + auto alpha_node = std::dynamic_pointer_cast(op->get_input_node_shared_ptr(1)); + auto lambda_node = std::dynamic_pointer_cast(op->get_input_node_shared_ptr(2)); + if (!alpha_node || !lambda_node) { + THROW_IE_EXCEPTION << "Unsupported parameter nodes type in " << op->get_friendly_name() << " (" << op->get_type_name() << ")"; + } + + if (ngraph::shape_size(alpha_node->get_output_shape(0)) == 1 && + ngraph::shape_size(lambda_node->get_output_shape(0)) == 1) { + float alpha, lambda; + if (!ngraph::op::util::get_single_value(alpha_node, alpha) || !ngraph::op::util::get_single_value(lambda_node, lambda)) { + THROW_IE_EXCEPTION << "Unsupported parameter size in " << op->get_friendly_name() << " (" << op->get_type_name() << ")"; + } + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::selu, {alpha, lambda}); + } else { + THROW_IE_EXCEPTION << "Unsupported shapes of parameter nodes in " << op->get_friendly_name() << " (" << op->get_type_name() << ")"; + } +} + +void CreateSoftPlusOp(Program& p, const std::shared_ptr& op) { + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::softplus, {}); +} + +void CreateTanOp(Program& p, const std::shared_ptr& op) { + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::tan, {}); +} + +void CreateSinOp(Program& p, const std::shared_ptr& op) { + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::sin, {}); +} + +void CreateSinhOp(Program& p, const std::shared_ptr& op) { + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::sinh, {}); +} + +void CreateCosOp(Program& p, const std::shared_ptr& op) { + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::cos, {}); +} + +void CreateCoshOp(Program& p, const std::shared_ptr& op) { + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::cosh, {}); +} + +void CreateSwishOp(Program& p, const std::shared_ptr& op) { + p.ValidateInputs(op, {1, 2}); + if (op->get_input_size() == 2) { + auto beta_node = std::dynamic_pointer_cast(op->get_input_node_shared_ptr(1)); + if (beta_node) { + if (ngraph::shape_size(beta_node->get_output_shape(0)) == 1) { + float beta; + if (!ngraph::op::util::get_single_value(beta_node, beta)) { + THROW_IE_EXCEPTION << "Unsupported parameter size in " << op->get_friendly_name() << " (" << op->get_type_name() << ")"; + } + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::swish, {beta}); + } else { + THROW_IE_EXCEPTION << "Unsupported parameter size in " << op->get_friendly_name() << " (" << op->get_type_name() << ")"; + } + } else { + THROW_IE_EXCEPTION << "Unsupported parameter type in " << op->get_friendly_name() << " (" << op->get_type_name() << ")"; + } + } else { + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::swish, {1.0f}); + } +} + +void CreateHSwishOp(Program& p, const std::shared_ptr& op) { + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::hswish, {}); +} + +void CreateMishOp(Program& p, const std::shared_ptr& op) { + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::mish, {}); +} + +void CreateGeluOp(Program& p, const std::shared_ptr& op) { + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::gelu, {}); +} + +void CreateSignOp(Program& p, const std::shared_ptr& op) { + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::sign, {}); +} + +void CreateHSigmoidOp(Program& p, const std::shared_ptr& op) { + CreateUnaryEltwiseOp(p, op, cldnn::activation_func::hsigmoid, {}); +} + +void CreateRoundOp(Program& p, const std::shared_ptr& op) { + auto func = cldnn::activation_func::none; + switch (op->get_mode()) { + case ngraph::op::v5::Round::RoundMode::HALF_TO_EVEN : func = cldnn::activation_func::round_half_to_even; break; + case ngraph::op::v5::Round::RoundMode::HALF_AWAY_FROM_ZERO : func = cldnn::activation_func::round_half_away_from_zero; break; + default: THROW_IE_EXCEPTION << "Unsupported round mode in " << op->get_friendly_name() << ": " << static_cast(op->get_mode()); + } + CreateUnaryEltwiseOp(p, op, func, {}); +} + +REGISTER_FACTORY_IMPL(v0, Tanh); +REGISTER_FACTORY_IMPL(v0, Elu); +REGISTER_FACTORY_IMPL(v0, Sigmoid); +REGISTER_FACTORY_IMPL(v0, Relu); +REGISTER_FACTORY_IMPL(v0, PRelu); +REGISTER_FACTORY_IMPL(v0, Clamp); +REGISTER_FACTORY_IMPL(v0, Exp); +REGISTER_FACTORY_IMPL(v1, LogicalNot); +REGISTER_FACTORY_IMPL(v0, Asin); +REGISTER_FACTORY_IMPL(v3, Asinh); +REGISTER_FACTORY_IMPL(v0, Acos); +REGISTER_FACTORY_IMPL(v3, Acosh); +REGISTER_FACTORY_IMPL(v0, Atan); +REGISTER_FACTORY_IMPL(v3, Atanh); +REGISTER_FACTORY_IMPL(v0, Abs); +REGISTER_FACTORY_IMPL(v0, Floor); +REGISTER_FACTORY_IMPL(v0, Ceiling); +REGISTER_FACTORY_IMPL(v0, Sqrt); +REGISTER_FACTORY_IMPL(v0, Erf); +REGISTER_FACTORY_IMPL(v0, HardSigmoid); +REGISTER_FACTORY_IMPL(v0, Log); +REGISTER_FACTORY_IMPL(v0, Negative); +REGISTER_FACTORY_IMPL(v0, Selu); +REGISTER_FACTORY_IMPL(v4, SoftPlus); +REGISTER_FACTORY_IMPL(v0, Tan); +REGISTER_FACTORY_IMPL(v0, Sin); +REGISTER_FACTORY_IMPL(v0, Sinh); +REGISTER_FACTORY_IMPL(v0, Cos); +REGISTER_FACTORY_IMPL(v0, Cosh); +REGISTER_FACTORY_IMPL(v4, Swish); +REGISTER_FACTORY_IMPL(v4, HSwish); +REGISTER_FACTORY_IMPL(v4, Mish); +REGISTER_FACTORY_IMPL(v0, Gelu); +REGISTER_FACTORY_IMPL(v0, Sign); +REGISTER_FACTORY_IMPL(v5, HSigmoid); +REGISTER_FACTORY_IMPL(v5, Round); + +} // namespace CLDNNPlugin diff --git a/inference-engine/src/transformations/include/ngraph_ops/nms_ie_internal.hpp b/inference-engine/src/transformations/include/ngraph_ops/nms_ie_internal.hpp new file mode 100644 index 00000000000000..4d5bd8167f00a1 --- /dev/null +++ b/inference-engine/src/transformations/include/ngraph_ops/nms_ie_internal.hpp @@ -0,0 +1,59 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include + +#include + +#include "ngraph/coordinate_diff.hpp" +#include "ngraph/op/op.hpp" + +namespace ngraph { +namespace op { +namespace internal { + +class TRANSFORMATIONS_API NonMaxSuppressionIEInternal : public Op { +public: + static constexpr NodeTypeInfo type_info{"NonMaxSuppressionIEInternal", 0}; + const NodeTypeInfo& get_type_info() const override { return type_info; } + + NonMaxSuppressionIEInternal(const Output& boxes, + const Output& scores, + const Output& max_output_boxes_per_class, + const Output& iou_threshold, + const Output& score_threshold, + int center_point_box, + bool sort_result_descending, + const ngraph::element::Type& output_type = ngraph::element::i64); + + NonMaxSuppressionIEInternal(const Output& boxes, + const Output& scores, + const Output& max_output_boxes_per_class, + const Output& iou_threshold, + const Output& score_threshold, + const Output& soft_nms_sigma, + int center_point_box, + bool sort_result_descending, + const ngraph::element::Type& output_type = ngraph::element::i64); + + void validate_and_infer_types() override; + + bool visit_attributes(AttributeVisitor& visitor) override; + + std::shared_ptr clone_with_new_inputs(const OutputVector & new_args) const override; + + int m_center_point_box; + bool m_sort_result_descending = true; + element::Type m_output_type; + +private: + int64_t max_boxes_output_from_input() const; +}; + +} // namespace internal +} // namespace op +} // namespace ngraph diff --git a/inference-engine/src/transformations/include/transformations/op_conversions/convert_nms_to_nms_ie_internal.hpp b/inference-engine/src/transformations/include/transformations/op_conversions/convert_nms_to_nms_ie_internal.hpp new file mode 100644 index 00000000000000..b0e6133b20152b --- /dev/null +++ b/inference-engine/src/transformations/include/transformations/op_conversions/convert_nms_to_nms_ie_internal.hpp @@ -0,0 +1,26 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include + +#include +#include + +namespace ngraph { +namespace pass { + +class TRANSFORMATIONS_API ConvertNMSToNMSIEInternal; + +} // namespace pass +} // namespace ngraph + +class ngraph::pass::ConvertNMSToNMSIEInternal: public ngraph::pass::MatcherPass { +public: + NGRAPH_RTTI_DECLARATION; + ConvertNMSToNMSIEInternal(); +}; diff --git a/inference-engine/src/transformations/src/ngraph_ops/nms_ie_internal.cpp b/inference-engine/src/transformations/src/ngraph_ops/nms_ie_internal.cpp new file mode 100644 index 00000000000000..2053e869434cb8 --- /dev/null +++ b/inference-engine/src/transformations/src/ngraph_ops/nms_ie_internal.cpp @@ -0,0 +1,106 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include + +#include +#include "ngraph_ops/nms_ie_internal.hpp" + +using namespace std; +using namespace ngraph; + +constexpr NodeTypeInfo op::internal::NonMaxSuppressionIEInternal::type_info; + +op::internal::NonMaxSuppressionIEInternal::NonMaxSuppressionIEInternal(const Output& boxes, + const Output& scores, + const Output& max_output_boxes_per_class, + const Output& iou_threshold, + const Output& score_threshold, + int center_point_box, + bool sort_result_descending, + const ngraph::element::Type& output_type) + : Op({boxes, scores, max_output_boxes_per_class, iou_threshold, score_threshold}), + m_center_point_box(center_point_box), m_sort_result_descending(sort_result_descending), m_output_type(output_type) { + constructor_validate_and_infer_types(); +} + +op::internal::NonMaxSuppressionIEInternal::NonMaxSuppressionIEInternal(const Output& boxes, + const Output& scores, + const Output& max_output_boxes_per_class, + const Output& iou_threshold, + const Output& score_threshold, + const Output& soft_nms_sigma, + int center_point_box, + bool sort_result_descending, + const ngraph::element::Type& output_type) + : Op({boxes, scores, max_output_boxes_per_class, iou_threshold, score_threshold, soft_nms_sigma}), + m_center_point_box(center_point_box), m_sort_result_descending(sort_result_descending), m_output_type(output_type) { + constructor_validate_and_infer_types(); +} + +std::shared_ptr op::internal::NonMaxSuppressionIEInternal::clone_with_new_inputs(const ngraph::OutputVector &new_args) const { + if (new_args.size() == 6) { + return make_shared(new_args.at(0), new_args.at(1), new_args.at(2), new_args.at(3), + new_args.at(4), new_args.at(5), m_center_point_box, m_sort_result_descending, + m_output_type); + } else if (new_args.size() == 5) { + return make_shared(new_args.at(0), new_args.at(1), new_args.at(2), new_args.at(3), + new_args.at(4), m_center_point_box, m_sort_result_descending, + m_output_type); + } + throw ngraph::ngraph_error("Unsupported number of inputs: " + std::to_string(new_args.size())); +} + +bool op::internal::NonMaxSuppressionIEInternal::visit_attributes(AttributeVisitor& visitor) { + visitor.on_attribute("center_point_box", m_center_point_box); + visitor.on_attribute("sort_result_descending", m_sort_result_descending); + visitor.on_attribute("output_type", m_output_type); + return true; +} + +static constexpr size_t boxes_port = 0; +static constexpr size_t scores_port = 1; +static constexpr size_t max_output_boxes_per_class_port = 2; + +int64_t op::internal::NonMaxSuppressionIEInternal::max_boxes_output_from_input() const { + int64_t max_output_boxes{0}; + + size_t num_of_inputs = inputs().size(); + if (num_of_inputs < 3) { + return 0; + } + + const auto max_output_boxes_input = + as_type_ptr(input_value(max_output_boxes_per_class_port).get_node_shared_ptr()); + max_output_boxes = max_output_boxes_input->cast_vector().at(0); + + return max_output_boxes; +} + +void op::internal::NonMaxSuppressionIEInternal::validate_and_infer_types() { + const auto boxes_ps = get_input_partial_shape(boxes_port); + const auto scores_ps = get_input_partial_shape(scores_port); + + // NonMaxSuppression produces triplets + // that have the following format: [batch_index, class_index, box_index] + PartialShape out_shape = {Dimension::dynamic(), 3}; + + if (boxes_ps.rank().is_static() && scores_ps.rank().is_static()) { + const auto num_boxes_boxes = boxes_ps[1]; + const auto max_output_boxes_per_class_node = input_value(max_output_boxes_per_class_port).get_node_shared_ptr(); + if (num_boxes_boxes.is_static() && scores_ps[0].is_static() && scores_ps[1].is_static() && + op::is_constant(max_output_boxes_per_class_node)) { + const auto num_boxes = num_boxes_boxes.get_length(); + const auto num_classes = scores_ps[1].get_length(); + const auto max_output_boxes_per_class = max_boxes_output_from_input(); + + out_shape[0] = std::min(num_boxes, max_output_boxes_per_class) * num_classes * + scores_ps[0].get_length(); + } + } + + set_output_type(0, m_output_type, out_shape); + set_output_type(1, element::f32, out_shape); + set_output_type(2, m_output_type, Shape{1}); +} diff --git a/inference-engine/src/transformations/src/transformations/op_conversions/convert_nms_to_nms_ie_internal.cpp b/inference-engine/src/transformations/src/transformations/op_conversions/convert_nms_to_nms_ie_internal.cpp new file mode 100644 index 00000000000000..3f39f2079bf840 --- /dev/null +++ b/inference-engine/src/transformations/src/transformations/op_conversions/convert_nms_to_nms_ie_internal.cpp @@ -0,0 +1,123 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include +#include + +#include +#include + +#include +#include + +#include "ngraph_ops/nms_ie_internal.hpp" +#include "transformations/op_conversions/convert_nms_to_nms_ie_internal.hpp" + +NGRAPH_RTTI_DEFINITION(ngraph::pass::ConvertNMSToNMSIEInternal, "ConvertNMSToNMSIEInternal", 0); + +ngraph::pass::ConvertNMSToNMSIEInternal::ConvertNMSToNMSIEInternal() { + auto nms = ngraph::pattern::wrap_type(); + + ngraph::matcher_pass_callback callback = [](pattern::Matcher &m) { + auto nms_5 = std::dynamic_pointer_cast(m.get_match_root()); + if (!nms_5) { + return false; + } + + const auto new_args = nms_5->input_values(); + const std::size_t num_of_inputs = new_args.size(); + + const auto& arg2 = num_of_inputs > 2 ? new_args.at(2) : ngraph::opset5::Constant::create(element::i32, Shape{}, {0}); + const auto& arg3 = num_of_inputs > 3 ? new_args.at(3) : ngraph::opset5::Constant::create(element::f32, Shape{}, {.0f}); + const auto& arg4 = num_of_inputs > 4 ? new_args.at(4) : ngraph::opset5::Constant::create(element::f32, Shape{}, {.0f}); + + // vector of new nGraph operations + NodeVector new_ops; + + auto one_dim_shape = Shape{1}; + + Output new_max_per_class; + Output new_iou_threshold; + Output new_score_threshold; + Output new_soft_nms_sigma; + + Output new_shape_for_max_per_class = opset1::Constant::create(ngraph::element::i64, Shape{1}, {1}); + Output new_shape_for_iou_threshold = opset1::Constant::create(ngraph::element::i64, Shape{1}, {1}); + Output new_shape_for_score_threshold = opset1::Constant::create(ngraph::element::i64, Shape{1}, {1}); + Output new_shape_for_soft_nms_sigma = opset1::Constant::create(ngraph::element::i64, Shape{1}, {1}); + + new_max_per_class = std::make_shared(arg2, new_shape_for_max_per_class, true); + new_ops.emplace_back(new_max_per_class.get_node_shared_ptr()); + + new_iou_threshold = std::make_shared(arg3, new_shape_for_iou_threshold, true); + new_ops.emplace_back(new_iou_threshold.get_node_shared_ptr()); + + new_score_threshold = std::make_shared(arg4, new_shape_for_score_threshold, true); + new_ops.emplace_back(new_score_threshold.get_node_shared_ptr()); + + int center_point_box = 0; + switch (nms_5->get_box_encoding()) { + case ::ngraph::opset5::NonMaxSuppression::BoxEncodingType::CENTER: + center_point_box = 1; + break; + case ::ngraph::opset5::NonMaxSuppression::BoxEncodingType::CORNER: + center_point_box = 0; + break; + default: + throw ngraph_error("NonMaxSuppression layer " + nms_5->get_friendly_name() + + " has unsupported box encoding"); + } + + std::shared_ptr nms_legacy{nullptr}; + + if (num_of_inputs > 5 && nms_5->soft_nms_sigma_from_input() != 0.0f) { + new_soft_nms_sigma = std::make_shared(new_args.at(5), new_shape_for_soft_nms_sigma, true); + new_ops.emplace_back(new_soft_nms_sigma.get_node_shared_ptr()); + nms_legacy = std::make_shared( + new_args.at(0), + new_args.at(1), + new_max_per_class, + new_iou_threshold, + new_score_threshold, + new_soft_nms_sigma, + center_point_box, + nms_5->get_sort_result_descending(), + element::i32); + new_ops.push_back(nms_legacy); + } else { + nms_legacy = std::make_shared( + new_args.at(0), + new_args.at(1), + new_max_per_class, + new_iou_threshold, + new_score_threshold, + center_point_box, + nms_5->get_sort_result_descending(), + element::i32); + new_ops.push_back(nms_legacy); + } + + Output output_0 = nms_legacy->output(0); + if (nms_5->output(0).get_element_type() != output_0.get_element_type()) { + output_0 = std::make_shared(output_0, nms_5->output(0).get_element_type()); + output_0.get_node_shared_ptr()->set_friendly_name(nms_5->get_friendly_name() + "/convert.0"); + new_ops.emplace_back(output_0.get_node_shared_ptr()); + } + + Output output_2 = nms_legacy->output(2); + if (nms_5->output(2).get_element_type() != output_2.get_element_type()) { + output_2 = std::make_shared(output_2, nms_5->output(2).get_element_type()); + output_2.get_node_shared_ptr()->set_friendly_name(nms_5->get_friendly_name() + "/convert.2"); + new_ops.emplace_back(output_2.get_node_shared_ptr()); + } + + nms_legacy->set_friendly_name(nms_5->get_friendly_name()); + ngraph::copy_runtime_info(nms_5, new_ops); + ngraph::replace_node(nms_5, {output_0, nms_legacy->output(1), output_2}); + return true; + }; + + auto m = std::make_shared(nms, "ConvertNMSToNMSIEInternal"); + this->register_matcher(m, callback); +} diff --git a/inference-engine/tests/functional/inference_engine/transformations/convert_nms_to_nms_ie_internal_test.cpp b/inference-engine/tests/functional/inference_engine/transformations/convert_nms_to_nms_ie_internal_test.cpp new file mode 100644 index 00000000000000..219eb611c9193b --- /dev/null +++ b/inference-engine/tests/functional/inference_engine/transformations/convert_nms_to_nms_ie_internal_test.cpp @@ -0,0 +1,192 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "common_test_utils/ngraph_test_utils.hpp" + +using namespace testing; +using namespace ngraph; + +TEST(TransformationTests, ConvertNMS1ToNMSIEInternal) { + std::shared_ptr f(nullptr), f_ref(nullptr); + { + auto boxes = std::make_shared(element::f32, Shape{1, 1000, 4}); + auto scores = std::make_shared(element::f32, Shape{1, 1, 1000}); + auto max_output_boxes_per_class = opset1::Constant::create(element::i64, Shape{}, {10}); + auto iou_threshold = opset1::Constant::create(element::f32, Shape{}, {0.75}); + auto score_threshold = opset1::Constant::create(element::f32, Shape{}, {0.7}); + auto nms = std::make_shared(boxes, scores, max_output_boxes_per_class, + iou_threshold, score_threshold, op::v1::NonMaxSuppression::BoxEncodingType::CORNER, true); + + f = std::make_shared(NodeVector{nms}, ParameterVector{boxes, scores}); + + const auto & orig_shape = f->get_output_partial_shape(0); + ngraph::pass::Manager manager; + manager.register_pass(); + manager.register_pass(); + manager.register_pass(); + manager.register_pass(); + manager.run_passes(f); + ASSERT_NO_THROW(check_rt_info(f)); + ASSERT_TRUE(f->get_output_partial_shape(0).is_static()) << "Shape " << f->get_output_partial_shape(0) << " should be static"; + } + + { + auto boxes = std::make_shared(element::f32, Shape{1, 1000, 4}); + auto scores = std::make_shared(element::f32, Shape{1, 1, 1000}); + auto max_output_boxes_per_class = opset1::Constant::create(element::i64, Shape{1}, {10}); + auto iou_threshold = opset1::Constant::create(element::f32, Shape{1}, {0.75}); + auto score_threshold = opset1::Constant::create(element::f32, Shape{1}, {0.7}); + auto nms = std::make_shared(boxes, scores, max_output_boxes_per_class, + iou_threshold, score_threshold, 0, true, element::i32); + auto convert = std::make_shared(nms->output(0), element::i64); + + f_ref = std::make_shared(NodeVector{convert}, ParameterVector{boxes, scores}); + ASSERT_TRUE(f_ref->get_output_partial_shape(0).is_static()) << "Shape " << f_ref->get_output_partial_shape(0) << " should be static"; + } + + auto res = compare_functions(f, f_ref); + ASSERT_TRUE(res.first) << res.second; +} + +TEST(TransformationTests, ConvertNMS3ToNMSIEInternal) { + std::shared_ptr f(nullptr), f_ref(nullptr); + { + auto boxes = std::make_shared(element::f32, Shape{1, 1000, 4}); + auto scores = std::make_shared(element::f32, Shape{1, 1, 1000}); + auto max_output_boxes_per_class = opset1::Constant::create(element::i32, Shape{}, {10}); + auto iou_threshold = opset1::Constant::create(element::f32, Shape{}, {0.75}); + auto score_threshold = opset1::Constant::create(element::f32, Shape{}, {0.7}); + auto nms = std::make_shared(boxes, scores, max_output_boxes_per_class, + iou_threshold, score_threshold, opset3::NonMaxSuppression::BoxEncodingType::CORNER, true, element::i32); + + f = std::make_shared(NodeVector{nms}, ParameterVector{boxes, scores}); + + const auto & orig_shape = f->get_output_partial_shape(0); + ngraph::pass::Manager manager; + manager.register_pass(); + manager.register_pass(); + manager.register_pass(); + manager.register_pass(); + manager.run_passes(f); + ASSERT_NO_THROW(check_rt_info(f)); + ASSERT_TRUE(f->get_output_partial_shape(0).is_static()) << "Shape " << f->get_output_partial_shape(0) << " should be static"; + } + + { + auto boxes = std::make_shared(element::f32, Shape{1, 1000, 4}); + auto scores = std::make_shared(element::f32, Shape{1, 1, 1000}); + auto max_output_boxes_per_class = opset1::Constant::create(element::i32, Shape{1}, {10}); + auto iou_threshold = opset1::Constant::create(element::f32, Shape{1}, {0.75}); + auto score_threshold = opset1::Constant::create(element::f32, Shape{1}, {0.7}); + auto nms = std::make_shared(boxes, scores, max_output_boxes_per_class, + iou_threshold, score_threshold, 0, true, element::i32); + + f_ref = std::make_shared(NodeVector{nms}, ParameterVector{boxes, scores}); + ASSERT_TRUE(f_ref->get_output_partial_shape(0).is_static()) << "Shape " << f_ref->get_output_partial_shape(0) << " should be static"; + } + + auto res = compare_functions(f, f_ref); + ASSERT_TRUE(res.first) << res.second; +} + +TEST(TransformationTests, ConvertNMS4ToNMSIEInternal) { + std::shared_ptr f(nullptr), f_ref(nullptr); + { + auto boxes = std::make_shared(element::f32, Shape{1, 1000, 4}); + auto scores = std::make_shared(element::f32, Shape{1, 1, 1000}); + auto max_output_boxes_per_class = opset1::Constant::create(element::i32, Shape{}, {10}); + auto iou_threshold = opset1::Constant::create(element::f32, Shape{}, {0.75}); + auto score_threshold = opset1::Constant::create(element::f32, Shape{}, {0.7}); + auto nms = std::make_shared(boxes, scores, max_output_boxes_per_class, + iou_threshold, score_threshold, opset4::NonMaxSuppression::BoxEncodingType::CORNER, true, element::i32); + + f = std::make_shared(NodeVector{nms}, ParameterVector{boxes, scores}); + + const auto & orig_shape = f->get_output_partial_shape(0); + ngraph::pass::Manager manager; + manager.register_pass(); + manager.register_pass(); + manager.register_pass(); + manager.register_pass(); + manager.run_passes(f); + ASSERT_NO_THROW(check_rt_info(f)); + ASSERT_TRUE(f->get_output_partial_shape(0).is_static()) << "Shape " << f->get_output_partial_shape(0) << " should be static"; + } + + { + auto boxes = std::make_shared(element::f32, Shape{1, 1000, 4}); + auto scores = std::make_shared(element::f32, Shape{1, 1, 1000}); + auto max_output_boxes_per_class = opset1::Constant::create(element::i32, Shape{1}, {10}); + auto iou_threshold = opset1::Constant::create(element::f32, Shape{1}, {0.75}); + auto score_threshold = opset1::Constant::create(element::f32, Shape{1}, {0.7}); + auto nms = std::make_shared(boxes, scores, max_output_boxes_per_class, + iou_threshold, score_threshold, 0, true, element::i32); + + f_ref = std::make_shared(NodeVector{nms}, ParameterVector{boxes, scores}); + ASSERT_TRUE(f_ref->get_output_partial_shape(0).is_static()) << "Shape " << f_ref->get_output_partial_shape(0) << " should be static"; + } + + auto res = compare_functions(f, f_ref); + ASSERT_TRUE(res.first) << res.second; +} + +TEST(TransformationTests, ConvertNMS5ToNMSIEInternal) { + std::shared_ptr f(nullptr), f_ref(nullptr); + { + auto boxes = std::make_shared(element::f32, Shape{1, 1000, 4}); + auto scores = std::make_shared(element::f32, Shape{1, 1, 1000}); + auto max_output_boxes_per_class = opset1::Constant::create(element::i32, Shape{}, {10}); + auto iou_threshold = opset1::Constant::create(element::f32, Shape{}, {0.75}); + auto score_threshold = opset1::Constant::create(element::f32, Shape{}, {0.7}); + auto soft_nms_sigma = opset1::Constant::create(element::f32, Shape{}, {0.5}); + auto nms = std::make_shared(boxes, scores, max_output_boxes_per_class, + iou_threshold, score_threshold, soft_nms_sigma, opset5::NonMaxSuppression::BoxEncodingType::CORNER, true, element::i32); + + f = std::make_shared(NodeVector{nms}, ParameterVector{boxes, scores}); + + const auto & orig_shape = f->get_output_partial_shape(0); + ngraph::pass::Manager manager; + manager.register_pass(); + manager.register_pass(); + manager.register_pass(); + manager.run_passes(f); + ASSERT_NO_THROW(check_rt_info(f)); + ASSERT_TRUE(f->get_output_partial_shape(0).is_static()) << "Shape " << f->get_output_partial_shape(0) << " should be static"; + } + + { + auto boxes = std::make_shared(element::f32, Shape{1, 1000, 4}); + auto scores = std::make_shared(element::f32, Shape{1, 1, 1000}); + auto max_output_boxes_per_class = opset1::Constant::create(element::i32, Shape{1}, {10}); + auto iou_threshold = opset1::Constant::create(element::f32, Shape{1}, {0.75}); + auto score_threshold = opset1::Constant::create(element::f32, Shape{1}, {0.7}); + auto soft_nms_sigma = opset1::Constant::create(element::f32, Shape{1}, {0.5}); + auto nms = std::make_shared(boxes, scores, max_output_boxes_per_class, + iou_threshold, score_threshold, soft_nms_sigma, 0, true, element::i32); + + f_ref = std::make_shared(NodeVector{nms}, ParameterVector{boxes, scores}); + ASSERT_TRUE(f_ref->get_output_partial_shape(0).is_static()) << "Shape " << f_ref->get_output_partial_shape(0) << " should be static"; + } + + auto res = compare_functions(f, f_ref); + ASSERT_TRUE(res.first) << res.second; +} diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/core_threading_tests.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/core_threading_tests.cpp index 54b1199f23d727..745fe67eb502f7 100644 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/core_threading_tests.cpp +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/core_threading_tests.cpp @@ -23,15 +23,7 @@ TEST_P(CoreThreadingTestsWithIterations, smoke_LoadNetwork_RemoteContext) { InferenceEngine::Core ie; std::atomic counter{0u}; - const FuncTestUtils::TestModel::TestModel models[] = { - FuncTestUtils::TestModel::convReluNormPoolFcModelFP32, - FuncTestUtils::TestModel::convReluNormPoolFcModelFP16 - }; std::vector networks; - for (auto & model : models) { - networks.emplace_back(ie.ReadNetwork(model.model_xml_str, model.weights_blob)); - } - networks.emplace_back(InferenceEngine::CNNNetwork(ngraph::builder::subgraph::make2InputSubtract())); networks.emplace_back(InferenceEngine::CNNNetwork(ngraph::builder::subgraph::makeMultiSingleConv())); networks.emplace_back(InferenceEngine::CNNNetwork(ngraph::builder::subgraph::makeSingleConv())); diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/activation.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/activation.cpp index e5ea6780423856..2597674aed68f3 100644 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/activation.cpp +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/activation.cpp @@ -9,7 +9,13 @@ using namespace LayerTestsDefinitions; using namespace ngraph::helpers; namespace { - +// Common params +const std::vector inputPrecisions = { + InferenceEngine::Precision::FP32, + InferenceEngine::Precision::FP16, + InferenceEngine::Precision::I16, + InferenceEngine::Precision::U8 +}; const std::vector netPrecisions = { InferenceEngine::Precision::FP32, @@ -46,15 +52,26 @@ const std::map>> activationTypes {HSwish, {}}, {SoftPlus, {}}, {HSigmoid, {}}, + {Swish, {{0.5f}}}, {RoundHalfToEven, {}}, {RoundHalfAwayFromZero, {}} }; +const std::map>> activationParamTypes = { + {PReLu, {{-0.01f}}}, + {LeakyRelu, {{0.01f}}} +}; + std::map, std::vector>> basic = { {{1, 50}, {{}}}, {{1, 128}, {{}}}, }; +std::map, std::vector>> preluBasic = { + {{1, 50}, {{1}, {50}}}, + {{1, 128}, {{1}, {128}}}, +}; + const auto basicCases = ::testing::Combine( ::testing::ValuesIn(CommonTestUtils::combineParams(activationTypes)), ::testing::ValuesIn(netPrecisions), @@ -66,6 +83,21 @@ const auto basicCases = ::testing::Combine( ::testing::Values(CommonTestUtils::DEVICE_GPU) ); +const auto basicPreluCases = ::testing::Combine( + ::testing::ValuesIn(CommonTestUtils::combineParams(activationParamTypes)), + ::testing::ValuesIn(netPrecisions), + ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), + ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), + ::testing::Values(InferenceEngine::Layout::ANY), + ::testing::Values(InferenceEngine::Layout::ANY), + ::testing::ValuesIn(CommonTestUtils::combineParams(preluBasic)), + ::testing::Values(CommonTestUtils::DEVICE_GPU) +); + + INSTANTIATE_TEST_CASE_P(smoke_Activation_Basic, ActivationLayerTest, basicCases, ActivationLayerTest::getTestCaseName); +INSTANTIATE_TEST_CASE_P(smoke_Activation_Basic_Prelu, ActivationLayerTest, basicPreluCases, ActivationLayerTest::getTestCaseName); + +INSTANTIATE_TEST_CASE_P(smoke_Activation_Basic, ActivationParamLayerTest, basicPreluCases, ActivationLayerTest::getTestCaseName); } // namespace diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/broadcast.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/broadcast.cpp new file mode 100644 index 00000000000000..f742499993ccd9 --- /dev/null +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/broadcast.cpp @@ -0,0 +1,174 @@ +// Copyright (C) 2019 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include + +#include "single_layer_tests/broadcast.hpp" +#include "common_test_utils/test_constants.hpp" + +using namespace LayerTestsDefinitions; + +namespace { + +const std::vector inputPrecisions = { + InferenceEngine::Precision::FP32, + InferenceEngine::Precision::I32, + InferenceEngine::Precision::BOOL +}; + +// NUMPY MODE + +std::vector> inShapesNumpy = { + {3, 1}, + {1, 4, 1} +}; + +std::vector> targetShapesNumpy = { + {2, 3, 6}, + {1, 4, 4} +}; + +const auto numpyBroadcastParams1 = ::testing::Combine( + ::testing::Values(targetShapesNumpy[0]), + ::testing::Values(ngraph::AxisSet{}), //not used in numpy mode + ::testing::Values(ngraph::op::BroadcastType::NUMPY), + ::testing::Values(inShapesNumpy[0]), + ::testing::ValuesIn(inputPrecisions), + ::testing::Values(CommonTestUtils::DEVICE_GPU) +); + +INSTANTIATE_TEST_CASE_P( + smoke_TestNumpyBroadcast1, + BroadcastLayerTest, + numpyBroadcastParams1, + BroadcastLayerTest::getTestCaseName +); + +const auto numpyBroadcastParams2 = ::testing::Combine( + ::testing::Values(targetShapesNumpy[1]), + ::testing::Values(ngraph::AxisSet{}), //not used in numpy mode + ::testing::Values(ngraph::op::BroadcastType::NUMPY), + ::testing::Values(inShapesNumpy[1]), + ::testing::ValuesIn(inputPrecisions), + ::testing::Values(CommonTestUtils::DEVICE_GPU) +); + +INSTANTIATE_TEST_CASE_P( + smoke_TestNumpyBroadcast2, + BroadcastLayerTest, + numpyBroadcastParams2, + BroadcastLayerTest::getTestCaseName +); + +// BIDIRECTIONAL MODE + +std::vector> inShapesBidi = { + {4, 1}, + {1, 4, 1}, + {4, 1, 1} +}; + +std::vector> targetShapesBidi = { + {2, 1, 4}, + {1, 4, 4}, + {1, 1, 2, 2} +}; + +const auto bidirectionalBroadcastParams1 = ::testing::Combine( + ::testing::Values(targetShapesBidi[0]), + ::testing::Values(ngraph::AxisSet{}), //not used in bidirectional mode + ::testing::Values(ngraph::op::BroadcastType::BIDIRECTIONAL), + ::testing::Values(inShapesBidi[0]), + ::testing::ValuesIn(inputPrecisions), + ::testing::Values(CommonTestUtils::DEVICE_GPU) +); + +INSTANTIATE_TEST_CASE_P( + smoke_TestBidirectionalBroadcast1, + BroadcastLayerTest, + bidirectionalBroadcastParams1, + BroadcastLayerTest::getTestCaseName +); + +const auto bidirectionalBroadcastParams2 = ::testing::Combine( + ::testing::Values(targetShapesBidi[1]), + ::testing::Values(ngraph::AxisSet{}), //not used in bidirectional mode + ::testing::Values(ngraph::op::BroadcastType::BIDIRECTIONAL), + ::testing::Values(inShapesBidi[1]), + ::testing::ValuesIn(inputPrecisions), + ::testing::Values(CommonTestUtils::DEVICE_GPU) +); + +INSTANTIATE_TEST_CASE_P( + smoke_TestBidirectionalBroadcast2, + BroadcastLayerTest, + bidirectionalBroadcastParams2, + BroadcastLayerTest::getTestCaseName +); + +const auto bidirectionalBroadcastParams3 = ::testing::Combine( + ::testing::Values(targetShapesBidi[2]), + ::testing::Values(ngraph::AxisSet{}), //not used in bidirectional mode + ::testing::Values(ngraph::op::BroadcastType::BIDIRECTIONAL), + ::testing::Values(inShapesBidi[2]), + ::testing::ValuesIn(inputPrecisions), + ::testing::Values(CommonTestUtils::DEVICE_GPU) +); + +INSTANTIATE_TEST_CASE_P( + smoke_TestBidirectionalBroadcast3, + BroadcastLayerTest, + bidirectionalBroadcastParams3, + BroadcastLayerTest::getTestCaseName +); + +// EXPLICIT MODE + +std::vector> inShapesExplicit = { + {3, 1}, + {2, 4} +}; + +std::vector> targetShapesExplicit = { + {2, 3, 1}, + {2, 3, 4} +}; + +std::vector axes = { + {1, 2}, + {0, 2} +}; + +const auto explicitBroadcastParams1 = ::testing::Combine( + ::testing::Values(targetShapesExplicit[0]), + ::testing::Values(axes[0]), + ::testing::Values(ngraph::op::BroadcastType::EXPLICIT), + ::testing::Values(inShapesExplicit[0]), + ::testing::ValuesIn(inputPrecisions), + ::testing::Values(CommonTestUtils::DEVICE_GPU) +); + +INSTANTIATE_TEST_CASE_P( + smoke_TestExplicitBroadcast1, + BroadcastLayerTest, + explicitBroadcastParams1, + BroadcastLayerTest::getTestCaseName +); + +const auto explicitBroadcastParams2 = ::testing::Combine( + ::testing::Values(targetShapesExplicit[1]), + ::testing::Values(axes[1]), + ::testing::Values(ngraph::op::BroadcastType::EXPLICIT), + ::testing::Values(inShapesExplicit[1]), + ::testing::ValuesIn(inputPrecisions), + ::testing::Values(CommonTestUtils::DEVICE_GPU) +); + +INSTANTIATE_TEST_CASE_P( + smoke_TestExplicitBroadcast2, + BroadcastLayerTest, + explicitBroadcastParams2, + BroadcastLayerTest::getTestCaseName +); +} // namespace diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/detection_output.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/detection_output.cpp new file mode 100644 index 00000000000000..6606c71af7fe3b --- /dev/null +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/detection_output.cpp @@ -0,0 +1,85 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "single_layer_tests/detection_output.hpp" + +using namespace LayerTestsDefinitions; + +namespace { + +const int numClasses = 11; +const int backgroundLabelId = 0; +const std::vector topK = {75}; +const std::vector> keepTopK = { {50}, {100} }; +const std::vector codeType = {"caffe.PriorBoxParameter.CORNER", "caffe.PriorBoxParameter.CENTER_SIZE"}; +const float nmsThreshold = 0.5f; +const float confidenceThreshold = 0.3f; +const std::vector clipAfterNms = {true, false}; +const std::vector clipBeforeNms = {true, false}; +const std::vector decreaseLabelId = {true, false}; +const float objectnessScore = 0.4f; +const std::vector numberBatch = {1, 2}; + +const auto commonAttributes = ::testing::Combine( + ::testing::Values(numClasses), + ::testing::Values(backgroundLabelId), + ::testing::ValuesIn(topK), + ::testing::ValuesIn(keepTopK), + ::testing::ValuesIn(codeType), + ::testing::Values(nmsThreshold), + ::testing::Values(confidenceThreshold), + ::testing::ValuesIn(clipAfterNms), + ::testing::ValuesIn(clipBeforeNms), + ::testing::ValuesIn(decreaseLabelId) +); + +/* =============== 3 inputs cases =============== */ + +const std::vector specificParams3In = { + ParamsWhichSizeDepends{true, true, true, 1, 1, {1, 60}, {1, 165}, {1, 1, 60}, {}, {}}, + ParamsWhichSizeDepends{true, false, true, 1, 1, {1, 660}, {1, 165}, {1, 1, 60}, {}, {}}, + ParamsWhichSizeDepends{false, true, true, 1, 1, {1, 60}, {1, 165}, {1, 2, 60}, {}, {}}, + ParamsWhichSizeDepends{false, false, true, 1, 1, {1, 660}, {1, 165}, {1, 2, 60}, {}, {}}, + + ParamsWhichSizeDepends{true, true, false, 10, 10, {1, 60}, {1, 165}, {1, 1, 75}, {}, {}}, + ParamsWhichSizeDepends{true, false, false, 10, 10, {1, 660}, {1, 165}, {1, 1, 75}, {}, {}}, + ParamsWhichSizeDepends{false, true, false, 10, 10, {1, 60}, {1, 165}, {1, 2, 75}, {}, {}}, + ParamsWhichSizeDepends{false, false, false, 10, 10, {1, 660}, {1, 165}, {1, 2, 75}, {}, {}} +}; + +const auto params3Inputs = ::testing::Combine( + commonAttributes, + ::testing::ValuesIn(specificParams3In), + ::testing::ValuesIn(numberBatch), + ::testing::Values(0.0f), + ::testing::Values(CommonTestUtils::DEVICE_GPU) +); + +INSTANTIATE_TEST_CASE_P(smoke_DetectionOutput3In, DetectionOutputLayerTest, params3Inputs, DetectionOutputLayerTest::getTestCaseName); + +/* =============== 5 inputs cases =============== */ + +const std::vector specificParams5In = { + ParamsWhichSizeDepends{true, true, true, 1, 1, {1, 60}, {1, 165}, {1, 1, 60}, {1, 30}, {1, 60}}, + ParamsWhichSizeDepends{true, false, true, 1, 1, {1, 660}, {1, 165}, {1, 1, 60}, {1, 30}, {1, 660}}, + ParamsWhichSizeDepends{false, true, true, 1, 1, {1, 60}, {1, 165}, {1, 2, 60}, {1, 30}, {1, 60}}, + ParamsWhichSizeDepends{false, false, true, 1, 1, {1, 660}, {1, 165}, {1, 2, 60}, {1, 30}, {1, 660}}, + + ParamsWhichSizeDepends{true, true, false, 10, 10, {1, 60}, {1, 165}, {1, 1, 75}, {1, 30}, {1, 60}}, + ParamsWhichSizeDepends{true, false, false, 10, 10, {1, 660}, {1, 165}, {1, 1, 75}, {1, 30}, {1, 660}}, + ParamsWhichSizeDepends{false, true, false, 10, 10, {1, 60}, {1, 165}, {1, 2, 75}, {1, 30}, {1, 60}}, + ParamsWhichSizeDepends{false, false, false, 10, 10, {1, 660}, {1, 165}, {1, 2, 75}, {1, 30}, {1, 660}} +}; + +const auto params5Inputs = ::testing::Combine( + commonAttributes, + ::testing::ValuesIn(specificParams5In), + ::testing::ValuesIn(numberBatch), + ::testing::Values(objectnessScore), + ::testing::Values(CommonTestUtils::DEVICE_GPU) +); + +INSTANTIATE_TEST_CASE_P(smoke_DetectionOutput5In, DetectionOutputLayerTest, params5Inputs, DetectionOutputLayerTest::getTestCaseName); + +} // namespace diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/eltwise.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/eltwise.cpp index 5e814839bbf579..6b1ab1c82e917a 100644 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/eltwise.cpp +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/eltwise.cpp @@ -16,6 +16,8 @@ std::vector>> inShapes = { {{1, 10, 100}}, {{4, 4, 16}}, {{1, 1, 1, 3}}, + {{2, 17, 5, 4}, {1, 17, 1, 1}}, + {{2, 17, 5, 1}, {1, 17, 1, 4}}, {{1, 2, 4}}, {{1, 4, 4}}, {{1, 4, 4, 1}}, @@ -40,10 +42,14 @@ std::vector opTypes = { }; std::vector eltwiseOpTypes = { + ngraph::helpers::EltwiseTypes::ADD, ngraph::helpers::EltwiseTypes::MULTIPLY, ngraph::helpers::EltwiseTypes::SUBTRACT, - ngraph::helpers::EltwiseTypes::ADD, - ngraph::helpers::EltwiseTypes::POWER + ngraph::helpers::EltwiseTypes::DIVIDE, + ngraph::helpers::EltwiseTypes::FLOOR_MOD, + ngraph::helpers::EltwiseTypes::SQUARED_DIFF, + ngraph::helpers::EltwiseTypes::POWER, + ngraph::helpers::EltwiseTypes::MOD }; std::map additional_config = {}; @@ -61,4 +67,17 @@ const auto multiply_params = ::testing::Combine( ::testing::Values(additional_config)); INSTANTIATE_TEST_CASE_P(smoke_CompareWithRefs, EltwiseLayerTest, multiply_params, EltwiseLayerTest::getTestCaseName); -} // namespace \ No newline at end of file + + +std::vector>> inShapesSingleThread = { + {{1, 2, 3, 4}}, + {{2, 2, 2, 2}}, + {{2, 1, 2, 1, 2, 2}} +}; + +std::vector eltwiseOpTypesSingleThread = { + ngraph::helpers::EltwiseTypes::ADD, + ngraph::helpers::EltwiseTypes::POWER, +}; + +} // namespace diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/fake_quantize.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/fake_quantize.cpp new file mode 100644 index 00000000000000..3a11829be617f3 --- /dev/null +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/fake_quantize.cpp @@ -0,0 +1,48 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include + +#include "single_layer_tests/fake_quantize.hpp" +#include "common_test_utils/test_constants.hpp" + +using namespace LayerTestsDefinitions; + +namespace { + +const std::vector netPrecisions = { + InferenceEngine::Precision::FP32, + InferenceEngine::Precision::FP16 +}; + +const std::vector> inputShapes = {{1, 1, 1, 1}, {3, 10, 5, 6}}; +const std::vector> constShapes = {{1}}; +const std::vector levels = {16, 255, 256}; + +const std::pair> config = {}; +const std::vector fqArgs = {}; +const std::vector inputParams = {}; + + +const auto fqParams = ::testing::Combine( + ::testing::ValuesIn(levels), + ::testing::ValuesIn(constShapes), + ::testing::Values(fqArgs), + ::testing::Values(inputParams) +); + +INSTANTIATE_TEST_CASE_P(smoke_FakeQuantize, FakeQuantizeLayerTest, + ::testing::Combine( + fqParams, + ::testing::ValuesIn(netPrecisions), + ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), + ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), + ::testing::Values(InferenceEngine::Layout::ANY), + ::testing::Values(InferenceEngine::Layout::ANY), + ::testing::ValuesIn(inputShapes), + ::testing::Values(CommonTestUtils::DEVICE_GPU), + ::testing::Values(config)), + FakeQuantizeLayerTest::getTestCaseName); + +} // namespace diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/group_convolution_backprop_data.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/group_convolution_backprop_data.cpp new file mode 100644 index 00000000000000..0eafcb852c3bc2 --- /dev/null +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/group_convolution_backprop_data.cpp @@ -0,0 +1,129 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include + +#include "single_layer_tests/group_convolution_backprop_data.hpp" +#include "common_test_utils/test_constants.hpp" + +using namespace LayerTestsDefinitions; + +namespace { + +const std::vector netPrecisions = { + InferenceEngine::Precision::FP32 +}; + +const std::vector numOutChannels = {16, 32}; +const std::vector numGroups = {2, 8, 16}; + +/* ============= 2D GroupConvolution ============= */ +const std::vector> inputShapes2D = {{1, 16, 10, 10}, + {1, 32, 10, 10}}; +const std::vector> kernels2D = {{1, 1}, {3, 3}}; +const std::vector> strides2D = {{1, 1}}; +const std::vector> padBegins2D = {{0, 0}}; +const std::vector> padEnds2D = {{0, 0}}; +const std::vector> dilations2D = {{1, 1}}; + +const auto groupConvBackpropData2DParams_ExplicitPadding = ::testing::Combine( + ::testing::ValuesIn(kernels2D), + ::testing::ValuesIn(strides2D), + ::testing::ValuesIn(padBegins2D), + ::testing::ValuesIn(padEnds2D), + ::testing::ValuesIn(dilations2D), + ::testing::ValuesIn(numOutChannels), + ::testing::ValuesIn(numGroups), + ::testing::Values(ngraph::op::PadType::EXPLICIT) +); +const auto groupConvBackpropData2DParams_AutoPadValid = ::testing::Combine( + ::testing::ValuesIn(kernels2D), + ::testing::ValuesIn(strides2D), + ::testing::Values(std::vector({0, 0})), + ::testing::Values(std::vector({0, 0})), + ::testing::ValuesIn(dilations2D), + ::testing::ValuesIn(numOutChannels), + ::testing::ValuesIn(numGroups), + ::testing::Values(ngraph::op::PadType::VALID) +); + +INSTANTIATE_TEST_CASE_P(smoke_GroupConvBackpropData2D_ExplicitPadding, GroupConvBackpropDataLayerTest, + ::testing::Combine( + groupConvBackpropData2DParams_ExplicitPadding, + ::testing::ValuesIn(netPrecisions), + ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), + ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), + ::testing::Values(InferenceEngine::Layout::ANY), + ::testing::Values(InferenceEngine::Layout::ANY), + ::testing::ValuesIn(inputShapes2D), + ::testing::Values(CommonTestUtils::DEVICE_GPU)), + GroupConvBackpropDataLayerTest::getTestCaseName); + +INSTANTIATE_TEST_CASE_P(smoke_GroupConvBackpropData2D_AutoPadValid, GroupConvBackpropDataLayerTest, + ::testing::Combine( + groupConvBackpropData2DParams_AutoPadValid, + ::testing::ValuesIn(netPrecisions), + ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), + ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), + ::testing::Values(InferenceEngine::Layout::ANY), + ::testing::Values(InferenceEngine::Layout::ANY), + ::testing::ValuesIn(inputShapes2D), + ::testing::Values(CommonTestUtils::DEVICE_GPU)), + GroupConvBackpropDataLayerTest::getTestCaseName); + +/* ============= 3D GroupConvolution ============= */ +const std::vector> inputShapes3D = {{1, 16, 5, 5, 5}, + {1, 32, 5, 5, 5}}; +const std::vector> kernels3D = {{1, 1, 1}, {3, 3, 3}}; +const std::vector> strides3D = {{1, 1, 1}}; +const std::vector> padBegins3D = {{0, 0, 0}}; +const std::vector> padEnds3D = {{0, 0, 0}}; +const std::vector> dilations3D = {{1, 1, 1}}; + +const auto groupConvBackpropData3DParams_ExplicitPadding = ::testing::Combine( + ::testing::ValuesIn(kernels3D), + ::testing::ValuesIn(strides3D), + ::testing::ValuesIn(padBegins3D), + ::testing::ValuesIn(padEnds3D), + ::testing::ValuesIn(dilations3D), + ::testing::ValuesIn(numOutChannels), + ::testing::ValuesIn(numGroups), + ::testing::Values(ngraph::op::PadType::EXPLICIT) +); +const auto groupConvBackpropData3DParams_AutoPadValid = ::testing::Combine( + ::testing::ValuesIn(kernels3D), + ::testing::ValuesIn(strides3D), + ::testing::Values(std::vector({0, 0, 0})), + ::testing::Values(std::vector({0, 0, 0})), + ::testing::ValuesIn(dilations3D), + ::testing::ValuesIn(numOutChannels), + ::testing::ValuesIn(numGroups), + ::testing::Values(ngraph::op::PadType::VALID) +); + +INSTANTIATE_TEST_CASE_P(smoke_GroupConvBackpropData3D_ExplicitPadding, GroupConvBackpropDataLayerTest, + ::testing::Combine( + groupConvBackpropData3DParams_ExplicitPadding, + ::testing::ValuesIn(netPrecisions), + ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), + ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), + ::testing::Values(InferenceEngine::Layout::ANY), + ::testing::Values(InferenceEngine::Layout::ANY), + ::testing::ValuesIn(inputShapes3D), + ::testing::Values(CommonTestUtils::DEVICE_GPU)), + GroupConvBackpropDataLayerTest::getTestCaseName); + +INSTANTIATE_TEST_CASE_P(smoke_GroupConvBackpropData3D_AutoPadValid, GroupConvBackpropDataLayerTest, + ::testing::Combine( + groupConvBackpropData3DParams_AutoPadValid, + ::testing::ValuesIn(netPrecisions), + ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), + ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), + ::testing::Values(InferenceEngine::Layout::ANY), + ::testing::Values(InferenceEngine::Layout::ANY), + ::testing::ValuesIn(inputShapes3D), + ::testing::Values(CommonTestUtils::DEVICE_GPU)), + GroupConvBackpropDataLayerTest::getTestCaseName); + +} // namespace diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/gru_cell.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/gru_cell.cpp new file mode 100644 index 00000000000000..2ff16c312d1651 --- /dev/null +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/gru_cell.cpp @@ -0,0 +1,37 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include + +#include "single_layer_tests/gru_cell.hpp" +#include "common_test_utils/test_constants.hpp" + +using namespace LayerTestsDefinitions; + +namespace { + std::vector should_decompose{false, true}; + std::vector batch{5}; + std::vector hidden_size{1, 10}; + std::vector input_size{1, 30}; + std::vector> activations = {{"relu", "tanh"}, {"tanh", "sigmoid"}, {"sigmoid", "tanh"}, + {"tanh", "relu"}}; + std::vector clip = {0.0f, 0.7f}; + std::vector linear_before_reset = {true, false}; + std::vector netPrecisions = {InferenceEngine::Precision::FP32, + InferenceEngine::Precision::FP16}; + + INSTANTIATE_TEST_CASE_P(GRUCellCommon, GRUCellTest, + ::testing::Combine( + ::testing::ValuesIn(should_decompose), + ::testing::ValuesIn(batch), + ::testing::ValuesIn(hidden_size), + ::testing::ValuesIn(input_size), + ::testing::ValuesIn(activations), + ::testing::ValuesIn(clip), + ::testing::ValuesIn(linear_before_reset), + ::testing::ValuesIn(netPrecisions), + ::testing::Values(CommonTestUtils::DEVICE_GPU)), + GRUCellTest::getTestCaseName); + +} // namespace diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/gru_sequence.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/gru_sequence.cpp new file mode 100644 index 00000000000000..964039987528e2 --- /dev/null +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/gru_sequence.cpp @@ -0,0 +1,65 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include +#include +#include "single_layer_tests/gru_sequence.hpp" +#include "common_test_utils/test_constants.hpp" + +using namespace LayerTestsDefinitions; + +namespace { + std::vector mode{ngraph::helpers::SequenceTestsMode::CONVERT_TO_TI_MAX_SEQ_LEN_CONST, + ngraph::helpers::SequenceTestsMode::CONVERT_TO_TI_RAND_SEQ_LEN_CONST, + ngraph::helpers::SequenceTestsMode::CONVERT_TO_TI_RAND_SEQ_LEN_PARAM, + ngraph::helpers::SequenceTestsMode::PURE_SEQ}; + // output values increase rapidly without clip, so use only seq_lenghts = 2 + std::vector seq_lengths_zero_clip{2}; + std::vector seq_lengths_clip_non_zero{20}; + std::vector batch{10}; + std::vector hidden_size{1, 10}; + // std::vector input_size{10}; + std::vector> activations = {{"relu", "tanh"}, {"tanh", "sigmoid"}, {"sigmoid", "tanh"}, + {"tanh", "relu"}}; + std::vector linear_before_reset = {true, false}; + std::vector clip{0.f}; + std::vector clip_non_zeros{0.7f}; + std::vector direction = {ngraph::op::RecurrentSequenceDirection::FORWARD, + ngraph::op::RecurrentSequenceDirection::REVERSE, + ngraph::op::RecurrentSequenceDirection::BIDIRECTIONAL + }; + std::vector netPrecisions = {InferenceEngine::Precision::FP32, + InferenceEngine::Precision::FP16}; + + INSTANTIATE_TEST_CASE_P(GRUSequenceCommonZeroClip, GRUSequenceTest, + ::testing::Combine( + ::testing::ValuesIn(mode), + ::testing::ValuesIn(seq_lengths_zero_clip), + ::testing::ValuesIn(batch), + ::testing::ValuesIn(hidden_size), + // ::testing::ValuesIn(input_size), // hardcoded to 10 due to Combine supports up to 10 args + ::testing::ValuesIn(activations), + ::testing::ValuesIn(clip), + ::testing::ValuesIn(linear_before_reset), + ::testing::ValuesIn(direction), + ::testing::ValuesIn(netPrecisions), + ::testing::Values(CommonTestUtils::DEVICE_GPU)), + GRUSequenceTest::getTestCaseName); + + INSTANTIATE_TEST_CASE_P(GRUSequenceCommonClip, GRUSequenceTest, + ::testing::Combine( + ::testing::ValuesIn(mode), + ::testing::ValuesIn(seq_lengths_clip_non_zero), + ::testing::ValuesIn(batch), + ::testing::ValuesIn(hidden_size), + // ::testing::ValuesIn(input_size), // hardcoded to 10 due to Combine supports up to 10 args + ::testing::ValuesIn(activations), + ::testing::ValuesIn(clip_non_zeros), + ::testing::ValuesIn(linear_before_reset), + ::testing::ValuesIn(direction), + ::testing::ValuesIn(netPrecisions), + ::testing::Values(CommonTestUtils::DEVICE_GPU)), + GRUSequenceTest::getTestCaseName); + +} // namespace diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/lstm_cell.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/lstm_cell.cpp new file mode 100644 index 00000000000000..29f4eeb13ef9ab --- /dev/null +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/lstm_cell.cpp @@ -0,0 +1,49 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include + +#include "single_layer_tests/lstm_cell.hpp" +#include "common_test_utils/test_constants.hpp" + +using namespace LayerTestsDefinitions; + +namespace { +std::vector should_decompose{false, true}; +std::vector batch{5}; +std::vector hidden_size{1, 10}; +std::vector hidden_size_smoke{1}; +std::vector input_size{1, 30}; +std::vector> activations_smoke = {{"relu", "sigmoid", "tanh"}}; +std::vector> activations = {{"relu", "sigmoid", "tanh"}, {"sigmoid", "tanh", "tanh"}, + {"tanh", "relu", "sigmoid"}, {"sigmoid", "sigmoid", "sigmoid"}, + {"tanh", "tanh", "tanh"}, {"relu", "relu", "relu"}}; +std::vector clip{0.f, 0.7f}; +std::vector netPrecisions = {InferenceEngine::Precision::FP32, + InferenceEngine::Precision::FP16}; + +INSTANTIATE_TEST_CASE_P(LSTMCellCommon, LSTMCellTest, + ::testing::Combine( + ::testing::ValuesIn(should_decompose), + ::testing::ValuesIn(batch), + ::testing::ValuesIn(hidden_size), + ::testing::ValuesIn(input_size), + ::testing::ValuesIn(activations), + ::testing::ValuesIn(clip), + ::testing::ValuesIn(netPrecisions), + ::testing::Values(CommonTestUtils::DEVICE_GPU)), + LSTMCellTest::getTestCaseName); + +INSTANTIATE_TEST_CASE_P(smoke_LSTMCellCommon, LSTMCellTest, + ::testing::Combine( + ::testing::ValuesIn(should_decompose), + ::testing::ValuesIn(batch), + ::testing::ValuesIn(hidden_size_smoke), + ::testing::ValuesIn(input_size), + ::testing::ValuesIn(activations_smoke), + ::testing::ValuesIn(clip), + ::testing::ValuesIn(netPrecisions), + ::testing::Values(CommonTestUtils::DEVICE_GPU)), + LSTMCellTest::getTestCaseName); +} // namespace diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/lstm_sequence.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/lstm_sequence.cpp new file mode 100644 index 00000000000000..fa293441e7b615 --- /dev/null +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/lstm_sequence.cpp @@ -0,0 +1,79 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include +#include +#include "single_layer_tests/lstm_sequence.hpp" +#include "common_test_utils/test_constants.hpp" + +using namespace LayerTestsDefinitions; + +namespace { +std::vector mode{ngraph::helpers::SequenceTestsMode::CONVERT_TO_TI_MAX_SEQ_LEN_CONST, + ngraph::helpers::SequenceTestsMode::CONVERT_TO_TI_RAND_SEQ_LEN_CONST, + ngraph::helpers::SequenceTestsMode::CONVERT_TO_TI_RAND_SEQ_LEN_PARAM, + ngraph::helpers::SequenceTestsMode::PURE_SEQ}; +// output values increase rapidly without clip, so use only seq_lenghts = 2 +std::vector seq_lengths_zero_clip{2}; +std::vector seq_lengths_clip_non_zero{20}; +std::vector batch{10}; +std::vector hidden_size{1, 10}; +std::vector hidden_size_smoke{1}; +std::vector input_size{10}; +std::vector> activations = {{"relu", "sigmoid", "tanh"}, {"sigmoid", "tanh", "tanh"}, + {"tanh", "relu", "sigmoid"}, {"sigmoid", "sigmoid", "sigmoid"}, + {"tanh", "tanh", "tanh"}, {"relu", "relu", "relu"}}; +std::vector> activations_smoke = {{"relu", "sigmoid", "tanh"}}; +std::vector clip{0.f}; +std::vector clip_non_zeros{0.7f}; +std::vector direction = {ngraph::op::RecurrentSequenceDirection::FORWARD, + ngraph::op::RecurrentSequenceDirection::REVERSE, + ngraph::op::RecurrentSequenceDirection::BIDIRECTIONAL +}; +std::vector netPrecisions = {InferenceEngine::Precision::FP32, + InferenceEngine::Precision::FP16}; + +INSTANTIATE_TEST_CASE_P(LSTMSequenceCommonZeroClip, LSTMSequenceTest, + ::testing::Combine( + ::testing::ValuesIn(mode), + ::testing::ValuesIn(seq_lengths_zero_clip), + ::testing::ValuesIn(batch), + ::testing::ValuesIn(hidden_size), + ::testing::ValuesIn(input_size), + ::testing::ValuesIn(activations), + ::testing::ValuesIn(clip), + ::testing::ValuesIn(direction), + ::testing::ValuesIn(netPrecisions), + ::testing::Values(CommonTestUtils::DEVICE_GPU)), + LSTMSequenceTest::getTestCaseName); + +INSTANTIATE_TEST_CASE_P(LSTMSequenceCommonClip, LSTMSequenceTest, + ::testing::Combine( + ::testing::ValuesIn(mode), + ::testing::ValuesIn(seq_lengths_clip_non_zero), + ::testing::ValuesIn(batch), + ::testing::ValuesIn(hidden_size), + ::testing::ValuesIn(input_size), + ::testing::ValuesIn(activations), + ::testing::ValuesIn(clip_non_zeros), + ::testing::ValuesIn(direction), + ::testing::ValuesIn(netPrecisions), + ::testing::Values(CommonTestUtils::DEVICE_GPU)), + LSTMSequenceTest::getTestCaseName); + +INSTANTIATE_TEST_CASE_P(smoke_LSTMSequenceCommonClip, LSTMSequenceTest, + ::testing::Combine( + ::testing::ValuesIn(mode), + ::testing::ValuesIn(seq_lengths_clip_non_zero), + ::testing::ValuesIn(batch), + ::testing::ValuesIn(hidden_size_smoke), + ::testing::ValuesIn(input_size), + ::testing::ValuesIn(activations_smoke), + ::testing::ValuesIn(clip_non_zeros), + ::testing::ValuesIn(direction), + ::testing::ValuesIn(netPrecisions), + ::testing::Values(CommonTestUtils::DEVICE_GPU)), + LSTMSequenceTest::getTestCaseName); + +} // namespace diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/non_max_suppression.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/non_max_suppression.cpp new file mode 100644 index 00000000000000..3e6cec3cd9e3d0 --- /dev/null +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/non_max_suppression.cpp @@ -0,0 +1,42 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include + +#include "single_layer_tests/non_max_suppression.hpp" +#include "common_test_utils/test_constants.hpp" + +using namespace LayerTestsDefinitions; +using namespace InferenceEngine; +using namespace ngraph; + +const std::vector inShapeParams = { + InputShapeParams{3, 100, 5}, + InputShapeParams{1, 10, 50}, + InputShapeParams{2, 50, 50} +}; + +const std::vector maxOutBoxPerClass = {5, 20}; +const std::vector threshold = {0.3f, 0.7f}; +const std::vector sigmaThreshold = {0.0f, 0.5f}; +const std::vector encodType = {op::v5::NonMaxSuppression::BoxEncodingType::CENTER, + op::v5::NonMaxSuppression::BoxEncodingType::CORNER}; +const std::vector sortResDesc = {true, false}; +const std::vector outType = {element::i32, element::i64}; + +const auto nmsParams = ::testing::Combine(::testing::ValuesIn(inShapeParams), + ::testing::Combine(::testing::Values(Precision::FP32), + ::testing::Values(Precision::I32), + ::testing::Values(Precision::FP32)), + ::testing::ValuesIn(maxOutBoxPerClass), + ::testing::ValuesIn(threshold), + ::testing::ValuesIn(threshold), + ::testing::ValuesIn(sigmaThreshold), + ::testing::ValuesIn(encodType), + ::testing::ValuesIn(sortResDesc), + ::testing::ValuesIn(outType), + ::testing::Values(CommonTestUtils::DEVICE_GPU) +); + +INSTANTIATE_TEST_CASE_P(smoke_NmsLayerTest, NmsLayerTest, nmsParams, NmsLayerTest::getTestCaseName); diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/normalize_l2.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/normalize_l2.cpp index da4546144661bd..034d9de7c5ad3c 100644 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/normalize_l2.cpp +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/normalize_l2.cpp @@ -35,7 +35,7 @@ const auto normL2params = testing::Combine( ); INSTANTIATE_TEST_CASE_P( - NormalizeL2, + smoke_NormalizeL2, NormalizeL2LayerTest, normL2params, NormalizeL2LayerTest::getTestCaseName diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/prior_box_clustered.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/prior_box_clustered.cpp index b3fc244102f949..6db9d289ffebed 100644 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/prior_box_clustered.cpp +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/prior_box_clustered.cpp @@ -64,8 +64,8 @@ INSTANTIATE_TEST_CASE_P(smoke_PriorBoxClustered_Basic, PriorBoxClusteredLayerTes ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), ::testing::Values(InferenceEngine::Layout::ANY), ::testing::Values(InferenceEngine::Layout::ANY), - ::testing::Values(std::vector({ 1, 16, 4, 4 })), - ::testing::Values(std::vector({ 1, 3, 50, 50 })), + ::testing::Values(std::vector({ 4, 4 })), + ::testing::Values(std::vector({ 50, 50 })), ::testing::Values(CommonTestUtils::DEVICE_GPU)), PriorBoxClusteredLayerTest::getTestCaseName ); diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/reduce_ops.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/reduce_ops.cpp index 64028dc14984c8..9f1a55b40dbf88 100644 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/reduce_ops.cpp +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/reduce_ops.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 20120 Intel Corporation +// Copyright (C) 2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // @@ -10,67 +10,230 @@ using namespace LayerTestsDefinitions; namespace { - const std::vector netPrecisions = { +const std::vector netPrecisions = { InferenceEngine::Precision::FP32, - }; + InferenceEngine::Precision::I32, + InferenceEngine::Precision::U8, + InferenceEngine::Precision::I8, +}; - const std::vector> inputShapes = { - std::vector{1, 2, 4, 4}, - std::vector{3, 2, 5, 6}, - }; +const std::vector keepDims = { + true, + false, +}; - const std::vector> axes = { +const std::vector> inputShapes = { + std::vector{10, 20, 30, 40}, + std::vector{3, 5, 7, 9}, +}; + +const std::vector> inputShapesOneAxis = { + std::vector{10, 20, 30, 40}, + std::vector{3, 5, 7, 9}, + std::vector{10}, +}; + +const std::vector> axes = { + {0}, + {1}, + {2}, + {3}, + {0, 1}, {0, 2}, - {1, 3} - }; + {0, 3}, + {1, 2}, + {1, 3}, + {2, 3}, + {0, 1, 2}, + {0, 1, 3}, + {0, 2, 3}, + {1, 2, 3}, + {0, 1, 2, 3}, + {1, -1} +}; - std::vector opTypes = { +std::vector opTypes = { CommonTestUtils::OpType::SCALAR, CommonTestUtils::OpType::VECTOR, - }; +}; - const std::vector reductionTypes = { +const std::vector reductionTypes = { ngraph::helpers::ReductionType::Mean, ngraph::helpers::ReductionType::Min, ngraph::helpers::ReductionType::Max, ngraph::helpers::ReductionType::Sum, ngraph::helpers::ReductionType::Prod, - }; + ngraph::helpers::ReductionType::L1, + ngraph::helpers::ReductionType::L2, +}; - const auto paramsOneAxis = testing::Combine( +const std::vector reductionLogicalTypes = { + ngraph::helpers::ReductionType::LogicalOr, + ngraph::helpers::ReductionType::LogicalAnd +}; + +const auto paramsOneAxis = testing::Combine( testing::Values(std::vector{0}), testing::ValuesIn(opTypes), testing::Values(true, false), testing::ValuesIn(reductionTypes), - testing::ValuesIn(netPrecisions), + testing::Values(InferenceEngine::Precision::FP32), + testing::Values(InferenceEngine::Precision::UNSPECIFIED), + testing::Values(InferenceEngine::Precision::UNSPECIFIED), + testing::Values(InferenceEngine::Layout::ANY), + testing::ValuesIn(inputShapesOneAxis), + testing::Values(CommonTestUtils::DEVICE_GPU) +); + +const auto paramsOneAxisLogical = testing::Combine( + testing::Values(std::vector{0}), + testing::ValuesIn(opTypes), + testing::Values(true, false), + testing::ValuesIn(reductionLogicalTypes), + testing::Values(InferenceEngine::Precision::BOOL), testing::Values(InferenceEngine::Precision::UNSPECIFIED), testing::Values(InferenceEngine::Precision::UNSPECIFIED), testing::Values(InferenceEngine::Layout::ANY), testing::ValuesIn(inputShapes), - testing::Values(CommonTestUtils::DEVICE_GPU)); + testing::Values(CommonTestUtils::DEVICE_GPU) +); - INSTANTIATE_TEST_CASE_P( - smoke_ReduceOneAxis, - ReduceOpsLayerTest, - paramsOneAxis, - ReduceOpsLayerTest::getTestCaseName); +const auto params_Precisions = testing::Combine( + testing::Values(std::vector{1, 3}), + testing::Values(opTypes[1]), + testing::ValuesIn(keepDims), + testing::Values(ngraph::helpers::ReductionType::Sum), + testing::Values(InferenceEngine::Precision::FP32, + InferenceEngine::Precision::I32), + testing::Values(InferenceEngine::Precision::UNSPECIFIED), + testing::Values(InferenceEngine::Precision::UNSPECIFIED), + testing::Values(InferenceEngine::Layout::ANY), + testing::Values(std::vector{2, 2, 2, 2}), + testing::Values(CommonTestUtils::DEVICE_GPU) +); - const auto params = testing::Combine( +const auto params_InputShapes = testing::Combine( + testing::Values(std::vector{0}), + testing::Values(opTypes[1]), + testing::ValuesIn(keepDims), + testing::Values(ngraph::helpers::ReductionType::Mean), + testing::Values(InferenceEngine::Precision::FP32), + testing::Values(InferenceEngine::Precision::UNSPECIFIED), + testing::Values(InferenceEngine::Precision::UNSPECIFIED), + testing::Values(InferenceEngine::Layout::ANY), + testing::Values(std::vector{3}, + std::vector{3, 5}, + std::vector{2, 4, 6}, + std::vector{2, 4, 6, 8}, + std::vector{2, 2, 2, 2, 2}, + std::vector{2, 2, 2, 2, 2, 2}), + testing::Values(CommonTestUtils::DEVICE_GPU) +); + +const auto params_Axes = testing::Combine( testing::ValuesIn(axes), testing::Values(opTypes[1]), - testing::Values(true, false), - testing::ValuesIn(reductionTypes), - testing::ValuesIn(netPrecisions), + testing::ValuesIn(keepDims), + testing::Values(ngraph::helpers::ReductionType::Mean), + testing::Values(InferenceEngine::Precision::FP32), testing::Values(InferenceEngine::Precision::UNSPECIFIED), testing::Values(InferenceEngine::Precision::UNSPECIFIED), testing::Values(InferenceEngine::Layout::ANY), testing::ValuesIn(inputShapes), - testing::Values(CommonTestUtils::DEVICE_GPU)); + testing::Values(CommonTestUtils::DEVICE_GPU) +); - INSTANTIATE_TEST_CASE_P( - smoke_Reduce, +const auto params_ReductionTypes = testing::Combine( + testing::Values(std::vector{0, 1, 3}), + testing::Values(opTypes[1]), + testing::ValuesIn(keepDims), + testing::ValuesIn(reductionTypes), + testing::Values(InferenceEngine::Precision::FP32), + testing::Values(InferenceEngine::Precision::UNSPECIFIED), + testing::Values(InferenceEngine::Precision::UNSPECIFIED), + testing::Values(InferenceEngine::Layout::ANY), + testing::Values(std::vector{2, 9, 2, 9}), + testing::Values(CommonTestUtils::DEVICE_GPU) +); + +const auto params_ReductionTypesLogical = testing::Combine( + testing::Values(std::vector{0, 1, 3}), + testing::Values(opTypes[1]), + testing::ValuesIn(keepDims), + testing::ValuesIn(reductionLogicalTypes), + testing::Values(InferenceEngine::Precision::BOOL), + testing::Values(InferenceEngine::Precision::UNSPECIFIED), + testing::Values(InferenceEngine::Precision::UNSPECIFIED), + testing::Values(InferenceEngine::Layout::ANY), + testing::Values(std::vector{2, 9, 2, 9}), + testing::Values(CommonTestUtils::DEVICE_GPU) +); + +INSTANTIATE_TEST_CASE_P( + smoke_ReduceOneAxis, + ReduceOpsLayerTest, + paramsOneAxis, + ReduceOpsLayerTest::getTestCaseName +); + +INSTANTIATE_TEST_CASE_P( + smoke_ReduceLogicalOneAxis, + ReduceOpsLayerTest, + paramsOneAxisLogical, + ReduceOpsLayerTest::getTestCaseName +); + +INSTANTIATE_TEST_CASE_P( + smoke_Reduce_Precisions, + ReduceOpsLayerTest, + params_Precisions, + ReduceOpsLayerTest::getTestCaseName +); + +INSTANTIATE_TEST_CASE_P( + smoke_Reduce_InputShapes, + ReduceOpsLayerTest, + params_InputShapes, + ReduceOpsLayerTest::getTestCaseName +); + +INSTANTIATE_TEST_CASE_P( + smoke_Reduce_Axes, ReduceOpsLayerTest, - params, - ReduceOpsLayerTest::getTestCaseName); + params_Axes, + ReduceOpsLayerTest::getTestCaseName +); + +INSTANTIATE_TEST_CASE_P( + smoke_Reduce_ReductionTypes, + ReduceOpsLayerTest, + params_ReductionTypes, + ReduceOpsLayerTest::getTestCaseName +); + +INSTANTIATE_TEST_CASE_P( + smoke_ReduceLogical_ReductionTypes, + ReduceOpsLayerTest, + params_ReductionTypesLogical, + ReduceOpsLayerTest::getTestCaseName +); + +INSTANTIATE_TEST_CASE_P( + smoke_Reduce, + ReduceOpsLayerWithSpecificInputTest, + testing::Combine( + testing::ValuesIn(decltype(axes) {{0}, {1}}), + testing::Values(opTypes[1]), + testing::Values(true), + testing::Values(ngraph::helpers::ReductionType::Sum), + testing::Values(InferenceEngine::Precision::FP32, + InferenceEngine::Precision::I32), + testing::Values(InferenceEngine::Precision::UNSPECIFIED), + testing::Values(InferenceEngine::Precision::UNSPECIFIED), + testing::Values(InferenceEngine::Layout::ANY), + testing::Values(std::vector {2, 10}), + testing::Values(CommonTestUtils::DEVICE_GPU)), + ReduceOpsLayerWithSpecificInputTest::getTestCaseName +); } // namespace diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/rnn_cell.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/rnn_cell.cpp new file mode 100644 index 00000000000000..14a2b0de4bfc92 --- /dev/null +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/rnn_cell.cpp @@ -0,0 +1,34 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include + +#include "single_layer_tests/rnn_cell.hpp" +#include "common_test_utils/test_constants.hpp" + +using namespace LayerTestsDefinitions; + +namespace { + std::vector should_decompose{false, true}; + std::vector batch{1, 5}; + std::vector hidden_size{1, 10}; + std::vector input_size{1, 30}; + std::vector> activations = {{"relu"}, {"sigmoid"}, {"tanh"}}; + std::vector clip = {0.f, 0.7f}; + std::vector netPrecisions = {InferenceEngine::Precision::FP32, + InferenceEngine::Precision::FP16}; + + INSTANTIATE_TEST_CASE_P(RNNCellCommon, RNNCellTest, + ::testing::Combine( + ::testing::ValuesIn(should_decompose), + ::testing::ValuesIn(batch), + ::testing::ValuesIn(hidden_size), + ::testing::ValuesIn(input_size), + ::testing::ValuesIn(activations), + ::testing::ValuesIn(clip), + ::testing::ValuesIn(netPrecisions), + ::testing::Values(CommonTestUtils::DEVICE_GPU)), + RNNCellTest::getTestCaseName); + +} // namespace diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/rnn_sequence.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/rnn_sequence.cpp new file mode 100644 index 00000000000000..e965d12ca7b439 --- /dev/null +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/rnn_sequence.cpp @@ -0,0 +1,60 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include +#include +#include "single_layer_tests/rnn_sequence.hpp" +#include "common_test_utils/test_constants.hpp" + +using namespace LayerTestsDefinitions; + +namespace { +std::vector mode{ngraph::helpers::SequenceTestsMode::CONVERT_TO_TI_MAX_SEQ_LEN_CONST, + ngraph::helpers::SequenceTestsMode::CONVERT_TO_TI_RAND_SEQ_LEN_CONST, + ngraph::helpers::SequenceTestsMode::CONVERT_TO_TI_RAND_SEQ_LEN_PARAM, + ngraph::helpers::SequenceTestsMode::PURE_SEQ}; +// output values increase rapidly without clip, so use only seq_lenghts = 2 +std::vector seq_lengths_zero_clip{2}; +std::vector seq_lengths_clip_non_zero{20}; +std::vector batch{1, 10}; +std::vector hidden_size{1, 10}; +std::vector input_size{10}; +std::vector> activations = {{"relu"}, {"sigmoid"}, {"tanh"}}; +std::vector clip{0.f}; +std::vector clip_non_zeros{0.7f}; +std::vector direction = {ngraph::op::RecurrentSequenceDirection::FORWARD, + ngraph::op::RecurrentSequenceDirection::REVERSE, + ngraph::op::RecurrentSequenceDirection::BIDIRECTIONAL, +}; +std::vector netPrecisions = {InferenceEngine::Precision::FP32}; + +INSTANTIATE_TEST_CASE_P(RNNSequenceCommonZeroClip, RNNSequenceTest, + ::testing::Combine( + ::testing::ValuesIn(mode), + ::testing::ValuesIn(seq_lengths_zero_clip), + ::testing::ValuesIn(batch), + ::testing::ValuesIn(hidden_size), + ::testing::ValuesIn(input_size), + ::testing::ValuesIn(activations), + ::testing::ValuesIn(clip), + ::testing::ValuesIn(direction), + ::testing::ValuesIn(netPrecisions), + ::testing::Values(CommonTestUtils::DEVICE_GPU)), + RNNSequenceTest::getTestCaseName); + +INSTANTIATE_TEST_CASE_P(RNNSequenceCommonClip, RNNSequenceTest, + ::testing::Combine( + ::testing::ValuesIn(mode), + ::testing::ValuesIn(seq_lengths_clip_non_zero), + ::testing::ValuesIn(batch), + ::testing::ValuesIn(hidden_size), + ::testing::ValuesIn(input_size), + ::testing::ValuesIn(activations), + ::testing::ValuesIn(clip_non_zeros), + ::testing::ValuesIn(direction), + ::testing::ValuesIn(netPrecisions), + ::testing::Values(CommonTestUtils::DEVICE_GPU)), + RNNSequenceTest::getTestCaseName); + +} // namespace diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/scatter_update.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/scatter_update.cpp new file mode 100644 index 00000000000000..8c5ba64c64822b --- /dev/null +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/scatter_update.cpp @@ -0,0 +1,46 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include +#include + +#include "single_layer_tests/scatter_update.hpp" +#include "common_test_utils/test_constants.hpp" + +using namespace LayerTestsDefinitions; +using namespace ngraph::opset3; + +namespace { +const std::vector inputPrecisions = { + InferenceEngine::Precision::FP32, + InferenceEngine::Precision::FP16, + InferenceEngine::Precision::I32, +}; + +const std::vector idxPrecisions = { + InferenceEngine::Precision::I32, + InferenceEngine::Precision::I64, +}; + +// map> +std::map, std::map, std::vector>> axesShapeInShape { + {{10, 16, 12, 15}, {{{2, 4}, {0, 1, 2, 3}}, {{8}, {-1, -2, -3, -4}}}}, + {{10, 9, 10, 9, 10}, {{{8}, {-3, -1, 0, 2, 4}}, {{4, 2}, {-2, 2}}}}, +}; +//indices should not be random value +const std::vector> idxValue = { + {0, 2, 4, 6, 1, 3, 5, 7} +}; + +const auto ScatterUpdateCase = ::testing::Combine( + ::testing::ValuesIn(ScatterUpdateLayerTest::combineShapes(axesShapeInShape)), + ::testing::ValuesIn(idxValue), + ::testing::ValuesIn(inputPrecisions), + ::testing::ValuesIn(idxPrecisions), + ::testing::Values(CommonTestUtils::DEVICE_GPU) +); + +INSTANTIATE_TEST_CASE_P(smoke_ScatterUpdate, ScatterUpdateLayerTest, ScatterUpdateCase, ScatterUpdateLayerTest::getTestCaseName); + +} // namespace diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/skip_tests_config.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/skip_tests_config.cpp index 6dd10d2c263a5b..1ff37c6622b1c3 100644 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/skip_tests_config.cpp +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/skip_tests_config.cpp @@ -9,8 +9,6 @@ std::vector disabledTestPatterns() { return { - // Issues - 34059 - ".*BehaviorTests\\.pluginDoesNotChangeOriginalNetwork.*", //TODO: Issue: 34748 R"(.*(ComparisonLayerTest).*)", // TODO: Issue: 39014 @@ -20,8 +18,6 @@ std::vector disabledTestPatterns() { // Expected behavior R"(.*EltwiseLayerTest.*eltwiseOpType=Pow.*netPRC=I64.*)", R"(.*EltwiseLayerTest.*IS=\(.*\..*\..*\..*\..*\).*eltwiseOpType=Pow.*secondaryInputType=CONSTANT.*)", - // TODO: Issue: 40958 - R"(.*(ConstantResultSubgraphTest).*)", // TODO: Issue: 43794 R"(.*(PreprocessTest).*(SetScalePreProcess).*)", R"(.*(PreprocessTest).*(ReverseInputChannelsPreProcess).*)", @@ -35,8 +31,23 @@ std::vector disabledTestPatterns() { R"(.*TopKLayerTest.*k=10.*mode=min.*sort=index.*)", R"(.*TopKLayerTest.*k=5.*sort=(none|index).*)", // TODO: Issue: 43511 - R"(.*EltwiseLayerTest.*IS=\(1.4.3.2.1.3\).*OpType=(Prod|Sub).*secondaryInputType=CONSTANT_opType=VECTOR_netPRC=(FP16|FP32).*)", - R"(.*EltwiseLayerTest.*IS=\(1.4.3.2.1.3\).*OpType=Sum.*secondaryInputType=CONSTANT_opType=VECTOR_netPRC=(FP16|FP32).*)", - R"(.*EltwiseLayerTest.*IS=\(1.4.3.2.1.3\).*OpType=Sub.*secondaryInputType=CONSTANT_opType=VECTOR_netPRC=I64.*)", + R"(.*EltwiseLayerTest.*IS=\(1.4.3.2.1.3\).*)", + R"(.*EltwiseLayerTest.*IS=\(2\).*OpType=Mod.*opType=VECTOR.*)", + R"(.*EltwiseLayerTest.*OpType=FloorMod.*netPRC=I64.*)", + + // These tests might fail due to accuracy loss a bit bigger than threshold + R"(.*(GRUCellTest).*)", + R"(.*(RNNSequenceTest).*)", + R"(.*(GRUSequenceTest).*)", + // These test cases might fail due to FP16 overflow + R"(.*(LSTM).*activations=\(relu.*netPRC=FP16.*)", + + // Need to update activation primitive to support any broadcastable constant to enable these cases. + R"(.*ActivationParamLayerTest.*)", + // Unknown issues + R"(.*(LSTMSequence).*mode=CONVERT_TO_TI_RAND_SEQ_LEN.*)", + R"(.*(smoke_DetectionOutput3In).*)", + R"(.*(smoke_DetectionOutput5In).*)", + R"(.*(ScatterUpdateLayerTest).*)", }; } diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/subgraph_tests/parameter_result.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/subgraph_tests/parameter_result.cpp new file mode 100644 index 00000000000000..539e32923b846b --- /dev/null +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/subgraph_tests/parameter_result.cpp @@ -0,0 +1,16 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include + +#include "subgraph_tests/parameter_result.hpp" +#include "common_test_utils/test_constants.hpp" + +using namespace SubgraphTestsDefinitions; + +namespace { + INSTANTIATE_TEST_CASE_P(smoke_Check, ParameterResultSubgraphTest, + ::testing::Values(CommonTestUtils::DEVICE_GPU), + ParameterResultSubgraphTest::getTestCaseName); +} // namespace diff --git a/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/parameter_result.hpp b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/parameter_result.hpp new file mode 100644 index 00000000000000..7df683396ce794 --- /dev/null +++ b/inference-engine/tests/functional/plugin/shared/include/subgraph_tests/parameter_result.hpp @@ -0,0 +1,15 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include "shared_test_classes/subgraph/parameter_result.hpp" + +namespace SubgraphTestsDefinitions { + +TEST_P(ParameterResultSubgraphTest, CompareWithRefs) { + Run(); +} + +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/prior_box_clustered.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/prior_box_clustered.hpp index ccba818a65cc3e..e7e5110d6833b7 100644 --- a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/prior_box_clustered.hpp +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/prior_box_clustered.hpp @@ -67,7 +67,6 @@ class PriorBoxClusteredLayerTest float offset; bool clip; - std::vector> CalculateRefs() override; void SetUp() override; }; diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/parameter_result.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/parameter_result.hpp new file mode 100644 index 00000000000000..1e444c6c6fd9e1 --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/parameter_result.hpp @@ -0,0 +1,28 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include +#include +#include + +#include "shared_test_classes/base/layer_test_utils.hpp" +#include "ngraph_functions/builders.hpp" + +namespace SubgraphTestsDefinitions { + +typedef std::tuple< + std::string // Device name +> parameterResultParams; + +class ParameterResultSubgraphTest : public testing::WithParamInterface, + virtual public LayerTestsUtils::LayerTestsCommon { +public: + static std::string getTestCaseName(testing::TestParamInfo obj); +protected: + void SetUp() override; +}; +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/src/single_layer/prior_box_clustered.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/prior_box_clustered.cpp index 57bab8cdacfb08..d85bd5bd1c6ac8 100644 --- a/inference-engine/tests/functional/shared_test_classes/src/single_layer/prior_box_clustered.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/prior_box_clustered.cpp @@ -57,84 +57,8 @@ std::string PriorBoxClusteredLayerTest::getTestCaseName(const testing::TestParam return result.str(); } -std::vector> PriorBoxClusteredLayerTest::CalculateRefs() { - size_t numPriors = widths.size(); - const size_t layerWidth = inputShapes[3]; - const size_t layerHeight = inputShapes[2]; - size_t imgWidth = imageShapes[3]; - size_t imgHeight = imageShapes[2]; - - if (variances.empty()) - variances.push_back(0.1f); - size_t varSize = variances.size(); - - size_t topDataOffset = 4 * layerWidth * layerHeight * numPriors; - size_t outSize = 2 * topDataOffset; - auto outBuf = std::vector(outSize); - float* topData_0 = outBuf.data(); - float* topData_1 = outBuf.data() + topDataOffset; - - if (targetDevice.find(CommonTestUtils::DEVICE_GPU) != std::string::npos) { - //GPU inits buffers with 0.0f - for (auto i = 0; i < outSize; i++) - topData_0[i] = 0.0f; - } - - float stepW = step_width; - float stepH = step_height; - if (stepW == 0 && stepH == 0) { - stepW = static_cast(imgWidth) / layerWidth; - stepH = static_cast(imgHeight) / layerHeight; - } - - for (size_t h = 0; h < layerHeight; ++h) { - for (size_t w = 0; w < layerWidth; ++w) { - float center_x = (w + offset) * stepW; - float center_y = (h + offset) * stepH; - - for (size_t s = 0; s < numPriors; ++s) { - float box_width = widths[s]; - float box_height = heights[s]; - - float xmin = (center_x - box_width / 2.0f) / imgWidth; - float ymin = (center_y - box_height / 2.0f) / imgHeight; - float xmax = (center_x + box_width / 2.0f) / imgWidth; - float ymax = (center_y + box_height / 2.0f) / imgHeight; - - if (clip) { - xmin = (std::min)((std::max)(xmin, 0.0f), 1.0f); - ymin = (std::min)((std::max)(ymin, 0.0f), 1.0f); - xmax = (std::min)((std::max)(xmax, 0.0f), 1.0f); - ymax = (std::min)((std::max)(ymax, 0.0f), 1.0f); - } - - topData_0[h * layerWidth * numPriors * 4 + w * numPriors * 4 + s * 4 + 0] = xmin; - topData_0[h * layerWidth * numPriors * 4 + w * numPriors * 4 + s * 4 + 1] = ymin; - topData_0[h * layerWidth * numPriors * 4 + w * numPriors * 4 + s * 4 + 2] = xmax; - topData_0[h * layerWidth * numPriors * 4 + w * numPriors * 4 + s * 4 + 3] = ymax; - - for (int j = 0; j < varSize; j++) - topData_1[h * layerWidth * numPriors * varSize + w * numPriors * varSize + - s * varSize + - j] = variances[j]; - } - } - } - - // Be aligned with test utils ref calulcation method, which returns std::vector>... - std::vector> ret(1); - for (auto& val : outBuf) { - uint8_t* u8_val = reinterpret_cast(&val); - ret[0].push_back(u8_val[0]); - ret[0].push_back(u8_val[1]); - ret[0].push_back(u8_val[2]); - ret[0].push_back(u8_val[3]); - } - - return ret; -} - void PriorBoxClusteredLayerTest::SetUp() { + SetRefMode(LayerTestsUtils::RefMode::CONSTANT_FOLDING); priorBoxClusteredSpecificParams specParams; std::tie(specParams, netPrecision, inPrc, outPrc, inLayout, outLayout, @@ -149,9 +73,7 @@ void PriorBoxClusteredLayerTest::SetUp() { variances) = specParams; auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecision); - auto paramsIn = ngraph::builder::makeParams(ngPrc, { inputShapes, imageShapes }); - auto paramsOut = ngraph::helpers::convert2OutputVector( - ngraph::helpers::castOps2Nodes(paramsIn)); + auto params = ngraph::builder::makeParams(ngPrc, { inputShapes, imageShapes }); ngraph::op::PriorBoxClusteredAttrs attributes; attributes.widths = widths; @@ -162,12 +84,14 @@ void PriorBoxClusteredLayerTest::SetUp() { attributes.offset = offset; attributes.variances = variances; - auto priorBoxClustered = std::make_shared( - paramsOut[0], - paramsOut[1], + auto shape_of_1 = std::make_shared(params[0]); + auto shape_of_2 = std::make_shared(params[1]); + auto priorBoxClustered = std::make_shared( + shape_of_1, + shape_of_2, attributes); ngraph::ResultVector results{ std::make_shared(priorBoxClustered) }; - function = std::make_shared(results, paramsIn, "PB_Clustered"); + function = std::make_shared(results, params, "PB_Clustered"); } } // namespace LayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/src/subgraph/parameter_result.cpp b/inference-engine/tests/functional/shared_test_classes/src/subgraph/parameter_result.cpp new file mode 100644 index 00000000000000..19b6d162c5192f --- /dev/null +++ b/inference-engine/tests/functional/shared_test_classes/src/subgraph/parameter_result.cpp @@ -0,0 +1,28 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "shared_test_classes/subgraph/parameter_result.hpp" + +namespace SubgraphTestsDefinitions { + +std::string ParameterResultSubgraphTest::getTestCaseName(testing::TestParamInfo obj) { + std::string targetDevice; + std::tie(targetDevice) = obj.param; + std::ostringstream result; + result << "TargetDevice=" << targetDevice; + return result.str(); +} + +void ParameterResultSubgraphTest::SetUp() { + InferenceEngine::SizeVector inputShapes; + InferenceEngine::Precision inputPrecision; + std::tie(targetDevice) = this->GetParam(); + + auto parameter = std::make_shared(ngraph::element::Type_t::f32, ngraph::Shape{1, 3, 10, 10}); + const ngraph::ResultVector results{std::make_shared(parameter)}; + ngraph::ParameterVector params = {parameter}; + function = std::make_shared(results, params, "ParameterResult"); +} + +} // namespace SubgraphTestsDefinitions diff --git a/inference-engine/tests_deprecated/functional/cldnn/CMakeLists.txt b/inference-engine/tests_deprecated/functional/cldnn/CMakeLists.txt index d319c075391d99..dafba81797ad92 100644 --- a/inference-engine/tests_deprecated/functional/cldnn/CMakeLists.txt +++ b/inference-engine/tests_deprecated/functional/cldnn/CMakeLists.txt @@ -6,16 +6,7 @@ set(TARGET_NAME ClDnnFunctionalTests) file(GLOB CLDNN_TEST_SOURCES - ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/regression_tests/*.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/single_layer_tests/*.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/shared_tests_instance/io_blob_tests/*.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/shared_tests_instance/input_tests/*.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/shared_tests_instance/inference_engine_regression_tests/*.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/shared_tests_instance/lstm/*.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/shared_tests_instance/common_single_layer_tests/*.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/shared_tests_instance/ie_class/*.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/shared_tests_instance/single_layer_tests/*.cpp) + ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) list(APPEND TEST_SRC ${CLDNN_TEST_SOURCES}) diff --git a/inference-engine/tests_deprecated/functional/cldnn/dummy.cpp b/inference-engine/tests_deprecated/functional/cldnn/dummy.cpp new file mode 100644 index 00000000000000..27390184c64df6 --- /dev/null +++ b/inference-engine/tests_deprecated/functional/cldnn/dummy.cpp @@ -0,0 +1,3 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// diff --git a/inference-engine/tests_deprecated/functional/cldnn/regression_tests/regression_reference.cpp b/inference-engine/tests_deprecated/functional/cldnn/regression_tests/regression_reference.cpp deleted file mode 100644 index 6df50cb76d73d6..00000000000000 --- a/inference-engine/tests_deprecated/functional/cldnn/regression_tests/regression_reference.cpp +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "regression_reference.hpp" - -namespace Regression { - namespace Reference { - std::map> values = {}; - } // namespace Reference -} // namespace Regression diff --git a/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/common_single_layer_tests/single_layer_tests.cpp b/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/common_single_layer_tests/single_layer_tests.cpp deleted file mode 100644 index 1923c1a0e1ccb2..00000000000000 --- a/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/common_single_layer_tests/single_layer_tests.cpp +++ /dev/null @@ -1,233 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "single_layer_tests.hpp" - -static std::vector pluginParams = { - PluginDependentParam{"GPU", Layout::NCHW, Precision::FP32, 0.001f}, -}; - - -static CommonTestUtils::conv_common_params convParams = - { - PropertyVector{{2, 2}}, // stride - PropertyVector{{3, 3}}, // kernel - {}, // pad_begin - {}, // pad_end - PropertyVector{{1, 1}}, // dilation - "same_upper", // auto_pad - 1, // group - 2 // out_c - }; - -static CommonTestUtils::conv_common_params defConvParamsHeavy = - { - PropertyVector{{1, 1}}, // stride - PropertyVector{{3, 3}}, // kernel - {}, // pad_begin - {}, // pad_end - PropertyVector{{2, 2}}, // dilation - "same_upper", // auto_pad - 1, // group - 128 // out_c - }; - -static CommonTestUtils::conv_common_params defConvParamsLight0 = - { - PropertyVector{{1, 1}}, // stride - PropertyVector{{3, 3}}, // kernel - {}, // pad_begin - {}, // pad_end - PropertyVector{{2, 2}}, // dilation - "same_upper", // auto_pad - 1, // group - 4 // out_c - }; - -static CommonTestUtils::conv_common_params defConvParamsLight1 = - { - PropertyVector{{2, 2}}, // stride - PropertyVector{{3, 3}}, // kernel - {}, // pad_begin - {}, // pad_end - PropertyVector{{1, 1}}, // dilation - "same_upper", // auto_pad - 1, // group - 16 // out_c - }; - - -static CommonTestUtils::conv_common_params defConvParamsLight2 = - { - PropertyVector{{2, 2}}, // stride - PropertyVector{{3, 3}}, // kernel - {}, // pad_begin - {}, // pad_end - PropertyVector{{2, 2}}, // dilation - "same_upper", // auto_pad - 1, // group - 15 // out_c - }; - - -static CommonTestUtils::conv_common_params defConvParamsLight3 = - { - PropertyVector{{1, 1}}, // stride - PropertyVector{{3, 3}}, // kernel - {}, // pad_begin - {}, // pad_end - PropertyVector{{2, 2}}, // dilation - "same_upper", // auto_pad - 2, // group - 4 // out_c - }; - -static CommonTestUtils::pool_common_params poolParams = - { - PropertyVector{{2, 2}}, // stride - PropertyVector{{3, 3}}, // kernel - {}, // pad_begin - {}, // pad_end - "same_upper", // auto_pad - true, // avg - false // exclude_pad - }; - -std::string -getTestCaseName(testing::TestParamInfo> obj) { - auto params = obj.param; - LayerTestHelper::Ptr helper = std::get<3>(params); - return "CLDNN" + helper->getType(); -} - -INSTANTIATE_TEST_CASE_P( - // TODO: rewrite to ngraph to have reshape functionality - DISABLED_Conv_nightly, CommonSingleLayerTest, - ::testing::Combine( - ::testing::Values(InitialShapes({ - {{1, 2, 16, 16}}, // input - {{1, 2, 8, 8}} // output - })), - ::testing::Values(NewShapes({ - {{1, 2, 15, 15}}, // input - {{1, 2, 8, 8}} // output - })), - ::testing::ValuesIn(pluginParams), - ::testing::Values(Helper(std::make_shared(convParams))) -), getTestCaseName -); - -INSTANTIATE_TEST_CASE_P( - // TODO: rewrite to ngraph to have reshape functionality - DISABLED_Deconv_nightly, CommonSingleLayerTest, - ::testing::Combine( - ::testing::Values(InitialShapes({ - {{1, 2, 8, 8}}, // input - {{1, 2, 16, 16}} // output - })), - ::testing::Values(NewShapes({ - {{1, 2, 7, 7}}, // input - {{1, 2, 14, 14}} // output - })), - ::testing::ValuesIn(pluginParams), - ::testing::Values(Helper(std::make_shared(convParams))) -), getTestCaseName -); - -INSTANTIATE_TEST_CASE_P( - // TODO: rewrite to ngraph to have reshape functionality - DISABLED_Pool_nightly, CommonSingleLayerTest, - ::testing::Combine( - ::testing::Values(InitialShapes({ - {{1, 2, 16, 16}}, // input - {{1, 2, 8, 8}} // output - })), - ::testing::Values(NewShapes({ - {{1, 2, 15, 15}}, // input - {{1, 2, 8, 8}} // output - })), - ::testing::ValuesIn(pluginParams), - ::testing::Values(Helper(std::make_shared(poolParams))) -), getTestCaseName -); - -INSTANTIATE_TEST_CASE_P( - DefConvLight0_nightly, CommonSingleLayerTest, - ::testing::Combine( - ::testing::Values(InitialShapes({ - {{1, 4, 4, 4}, {1, 36, 4, 4}}, // input, trans - {{1, 4, 4, 4}} // output - })), - ::testing::Values(NewShapes({ - {{1, 4, 4, 4}, {1, 36, 4, 4}}, // input, trans - {{1, 4, 4, 4}} // output - })), - ::testing::ValuesIn(pluginParams), - ::testing::Values(Helper(std::make_shared(defConvParamsLight0, 2))) - ), getTestCaseName -); - -INSTANTIATE_TEST_CASE_P( - DefConvLight1_WithBatch_nightly, CommonSingleLayerTest, - ::testing::Combine( - ::testing::Values(InitialShapes({ - {{2, 4, 8, 8}, {2, 36, 4, 4}}, // input, trans - {{2, 16, 4, 4}} // output - })), - ::testing::Values(NewShapes({ - {{2, 4, 8, 8}, {2, 36, 4, 4}}, // input, trans - {{2, 16, 4, 4}} // output - })), - ::testing::ValuesIn(pluginParams), - ::testing::Values(Helper(std::make_shared(defConvParamsLight1, 2))) - ), getTestCaseName -); - -INSTANTIATE_TEST_CASE_P( - DefConvLight2_WithBatch_nightly, CommonSingleLayerTest, - ::testing::Combine( - ::testing::Values(InitialShapes({ - {{2, 4, 8, 8}, {2, 18, 4, 4}}, // input, trans - {{2, 15, 4, 4}} // output - })), - ::testing::Values(NewShapes({ - {{2, 4, 8, 8}, {2, 18, 4, 4}}, // input, trans - {{2, 15, 4, 4}} // output - })), - ::testing::ValuesIn(pluginParams), - ::testing::Values(Helper(std::make_shared(defConvParamsLight2, 1))) - ), getTestCaseName -); - -INSTANTIATE_TEST_CASE_P( - DefConvLight3_WithGroups_nightly, CommonSingleLayerTest, - ::testing::Combine( - ::testing::Values(InitialShapes({ - {{1, 4, 4, 4}, {1, 18, 4, 4}}, // input, trans - {{1, 4, 4, 4}} // output - })), - ::testing::Values(NewShapes({ - {{1, 4, 4, 4}, {1, 18, 4, 4}}, // input, trans - {{1, 4, 4, 4}} // output - })), - ::testing::ValuesIn(pluginParams), - ::testing::Values(Helper(std::make_shared(defConvParamsLight3, 1))) - ), getTestCaseName -); - -INSTANTIATE_TEST_CASE_P( - DefConvHeavy_nightly, CommonSingleLayerTest, - ::testing::Combine( - ::testing::Values(InitialShapes({ - {{1, 512, 38, 38}, {1, 72, 38, 38}}, // input, trans - {{1, 128, 38, 38}} // output - })), - ::testing::Values(NewShapes({ - {{1, 512, 38, 38}, {1, 72, 38, 38}}, // input, trans - {{1, 128, 38, 38}} // output - })), - ::testing::ValuesIn(pluginParams), - ::testing::Values(Helper(std::make_shared(defConvParamsHeavy, 4))) - ), getTestCaseName -); diff --git a/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/inference_engine_regression_tests/common_dyn_batch_regression.cpp b/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/inference_engine_regression_tests/common_dyn_batch_regression.cpp deleted file mode 100644 index f70953fc539836..00000000000000 --- a/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/inference_engine_regression_tests/common_dyn_batch_regression.cpp +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "common_dyn_batch_regression.hpp" - -std::vector supportedDynBatchValues = { - { "GPU", 4, 3 }, - { "GPU", 4, 2 }, - { "GPU", 4, 1 }, - { "GPU", 8, 5 }, - { "GPU", 8, 4 }, - { "GPU", 8, 3 }, -}; - -INSTANTIATE_TEST_CASE_P(FunctionalTest_smoke, TestNoRegressionDynBatchFP32, ValuesIn(supportedDynBatchValues), getTestCaseName); diff --git a/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/input_tests/parser_tests.cpp b/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/input_tests/parser_tests.cpp deleted file mode 100644 index 7ba0088fb7bfcf..00000000000000 --- a/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/input_tests/parser_tests.cpp +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "parser_tests.hpp" - -ir_test_params ir_test_cases[] = { - ir_test_params("GPU", "FP16", negative_conv_kernel_x_case), - ir_test_params("GPU", "FP16", negative_conv_kernel_y_case), - ir_test_params("GPU", "FP16", negative_conv_stride_x_case), - ir_test_params("GPU", "FP16", negative_conv_weights_case), - ir_test_params("GPU", "FP16", negative_conv_biases_case), - - ir_test_params("GPU", "FP16", negative_fc_out_size_case), - ir_test_params("GPU", "FP16", negative_fc_weights_case), - ir_test_params("GPU", "FP16", negative_fc_biases_case), - - ir_test_params("GPU", "FP16", negative_deconv_kernel_x_case), - ir_test_params("GPU", "FP16", negative_deconv_kernel_y_case), - ir_test_params("GPU", "FP16", negative_deconv_stride_x_case), - ir_test_params("GPU", "FP16", negative_deconv_weights_case), - ir_test_params("GPU", "FP16", negative_deconv_biases_case), - - ir_test_params("GPU", "FP16", negative_pool_kernel_x_case), - ir_test_params("GPU", "FP16", negative_pool_kernel_y_case), - ir_test_params("GPU", "FP16", negative_pool_stride_x_case), - ir_test_params("GPU", "FP16", incorrect_pool_type_case), - - ir_test_params("GPU", "FP16", negative_norm_local_size_case), - ir_test_params("GPU", "FP16", negative_norm_k_case) -}; - -INSTANTIATE_TEST_CASE_P(FunctionalTest_smoke, IncorrectIRTests, - ::testing::ValuesIn(ir_test_cases), - getTestName); \ No newline at end of file diff --git a/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/io_blob_tests/cropResize_tests.cpp b/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/io_blob_tests/cropResize_tests.cpp deleted file mode 100644 index 8c0f9e5e5967eb..00000000000000 --- a/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/io_blob_tests/cropResize_tests.cpp +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "cropResize_tests.hpp" - -#ifdef USE_OPENCV -#define COMBINE_WITH_DEFAULT(_dims, _in_layouts, _color_formats) \ - Combine(Values(Precision::FP32), \ - Values(_dims), \ - Values(std::make_pair(Precision::FP32, 1e-2), std::make_pair(Precision::U8, 1)), \ - Values(_in_layouts), \ - Values(ResizeAlgorithm::RESIZE_BILINEAR, ResizeAlgorithm::RESIZE_AREA), \ - Values(_color_formats), \ - Values(ROI({0, 40, 50, 220, 220})), \ - Values(false, true)) - -// test resize-only for all dims (as before) -// test resize + color conversion for smaller number of dims (simple upscale/downscale scenarios only) -namespace smoke { -static auto params_resize_only = COMBINE_WITH_DEFAULT( - TESTED_DIMS(1), - MULTI_VALUE(NCHW, NHWC), - COLOR_FORMATS_RAW); - -static auto params_csc_3ch_and_resize = COMBINE_WITH_DEFAULT( - TESTED_DIMS_SMALL(1), - MULTI_VALUE(NCHW, NHWC), - COLOR_FORMATS_3CH); - -static auto params_csc_4ch_and_resize = COMBINE_WITH_DEFAULT( - TESTED_DIMS_SMALL(1), - NHWC, - COLOR_FORMATS_4CH); - -// batch preprocessing parameters: -static auto batch_params_resize_only = COMBINE_WITH_DEFAULT( - TESTED_DIMS(2), - MULTI_VALUE(NCHW, NHWC), - COLOR_FORMATS_RAW); - -static auto batch_params_csc_3ch_and_resize = COMBINE_WITH_DEFAULT( - TESTED_DIMS_SMALL(2), - MULTI_VALUE(NCHW, NHWC), - COLOR_FORMATS_3CH); - -static auto batch_params_csc_4ch_and_resize = COMBINE_WITH_DEFAULT( - TESTED_DIMS_SMALL(2), - NHWC, - COLOR_FORMATS_4CH); -} // namespace smoke - - -// test everything in nightly (as before) -namespace nightly { -static auto params_csc_3ch_and_resize = COMBINE_WITH_DEFAULT( - TESTED_DIMS(1), - MULTI_VALUE(NCHW, NHWC), - MULTI_VALUE(COLOR_FORMATS_RAW, COLOR_FORMATS_3CH)); - - -static auto params_csc_4ch_and_resize = COMBINE_WITH_DEFAULT( - TESTED_DIMS(1), - NHWC, - COLOR_FORMATS_4CH); - -// batch preprocessing parameters: -static auto batch_params_csc_3ch_and_resize = COMBINE_WITH_DEFAULT( - MULTI_VALUE(TESTED_DIMS(2), TESTED_DIMS(3)), - MULTI_VALUE(NCHW, NHWC), - MULTI_VALUE(COLOR_FORMATS_RAW, COLOR_FORMATS_3CH)); - -static auto batch_params_csc_4ch_and_resize = COMBINE_WITH_DEFAULT( - MULTI_VALUE(TESTED_DIMS(2), TESTED_DIMS(3)), - NHWC, - COLOR_FORMATS_4CH); -} // namespace nightly - -// reorder preprocessing parameters: -static auto reorder_params = Combine( - Values(Precision::FP32), // network precision - Values(SizeVector({1, 3, 300, 300})), // sizes of the network - Values(std::make_pair(Precision::FP32, 1e-2), std::make_pair(Precision::U8, 1)), // precision and threshold - Values(std::make_pair(NCHW, NHWC), std::make_pair(NHWC, NCHW)), // Input/network data layout - Values(ResizeAlgorithm::NO_RESIZE), - Values(ColorFormat::BGR), - Values(ROI({0, 0, 0, 300, 300})), // cropped ROI params (id, x, y, width, height) - Values(false, true) // Infer mode sync/async -); - -// nv12 preprocessing parameters: -static auto nv12_params = Combine( - Values(Precision::FP32), // network precision - Values(cv::Size(300, 300)), // input image size - Values(TESTED_DIMS(1)), // sizes of the network - Values(std::make_pair(Precision::U8, 1)), // precision and threshold - Values(ResizeAlgorithm::RESIZE_BILINEAR, ResizeAlgorithm::RESIZE_AREA), - Values(ColorFormat::NV12), - Values(ROI({0, 0, 0, 300, 300}), ROI({0, 15, 10, 210, 210})), // cropped ROI params (id, x, y, width, height) - Values(false, true) // Infer mode sync/async -); - -static auto random_roi_3c = Combine( - Values(Precision::FP32), - Values(TESTED_DIMS(1)), - Values(std::make_pair(Precision::FP32, 1e-2), std::make_pair(Precision::U8, 1)), - Values(MULTI_VALUE(NCHW, NHWC)), - Values(ResizeAlgorithm::RESIZE_BILINEAR, ResizeAlgorithm::RESIZE_AREA), - Values(COLOR_FORMATS_3CH), - Values(ROI({0, 0, 0, 0, 0})), - Values(false, true) -); - -static auto random_roi_4c = Combine( - Values(Precision::FP32), - Values(TESTED_DIMS(1)), - Values(std::make_pair(Precision::FP32, 1e-2), std::make_pair(Precision::U8, 1)), - Values(NHWC), - Values(ResizeAlgorithm::RESIZE_BILINEAR, ResizeAlgorithm::RESIZE_AREA), - Values(COLOR_FORMATS_4CH), - Values(ROI({0, 0, 0, 0, 0})), - Values(false, true) -); - -static auto random_roi_nv12 = Combine( - Values(Precision::FP32), - Values(TESTED_DIMS(1)), - Values(std::make_pair(Precision::U8, 1)), - Values(NHWC), - Values(ResizeAlgorithm::RESIZE_BILINEAR, ResizeAlgorithm::RESIZE_AREA), - Values(ColorFormat::NV12), - Values(ROI({0, 0, 0, 0, 0})), - Values(false, true) -); - -// smoke:RandomROI -PLUGING_CASE_WITH_SUFFIX(GPU, _gapi_random_roi_c3_smoke, RandomROITest, random_roi_3c); -PLUGING_CASE_WITH_SUFFIX(GPU, _gapi_random_roi_c4_smoke, RandomROITest, random_roi_4c); -PLUGING_CASE_WITH_SUFFIX(GPU, _gapi_random_roi_nv12_smoke, RandomROITest, random_roi_nv12); - -PLUGING_CASE_WITH_SUFFIX(GPU, _gapi_resize_only_smoke, CropResizeTest, smoke::params_resize_only); -PLUGING_CASE_WITH_SUFFIX(GPU, _gapi_csc_3ch_and_resize_smoke, CropResizeTest, smoke::params_csc_3ch_and_resize); -PLUGING_CASE_WITH_SUFFIX(GPU, _gapi_csc_4ch_and_resize_smoke, CropResizeTest, smoke::params_csc_4ch_and_resize); - -PLUGING_CASE_WITH_SUFFIX(GPU, _gapi_resize_only_smoke, DynamicBatchResizeTest, smoke::batch_params_resize_only); -PLUGING_CASE_WITH_SUFFIX(GPU, _gapi_csc_3ch_and_resize_smoke, DynamicBatchResizeTest, smoke::batch_params_csc_3ch_and_resize); -PLUGING_CASE_WITH_SUFFIX(GPU, _gapi_csc_4ch_and_resize_smoke, DynamicBatchResizeTest, smoke::batch_params_csc_4ch_and_resize); - -PLUGING_CASE_WITH_SUFFIX(GPU, _gapi_reorder_smoke, ReorderTest, reorder_params); - -//PLUGING_CASE_WITH_SUFFIX(GPU, _gapi_csc_nv12_and_resize_smoke, NV12ColorConvertTest, nv12_params); - -#if defined(ENABLE_MKL_DNN) - PLUGING_CASE_WITH_SUFFIX(HETERO, _gapi_random_roi_c3_smoke, RandomROITest, random_roi_3c); - PLUGING_CASE_WITH_SUFFIX(HETERO, _gapi_random_roi_c4_smoke, RandomROITest, random_roi_4c); - PLUGING_CASE_WITH_SUFFIX(HETERO, _gapi_random_roi_nv12_smoke, RandomROITest, random_roi_nv12); - - PLUGING_CASE_WITH_SUFFIX(HETERO, _gapi_resize_only_smoke, CropResizeTest, smoke::params_resize_only); - PLUGING_CASE_WITH_SUFFIX(HETERO, _gapi_csc_3ch_and_resize_smoke, CropResizeTest, smoke::params_csc_3ch_and_resize); - PLUGING_CASE_WITH_SUFFIX(HETERO, _gapi_csc_4ch_and_resize_smoke, CropResizeTest, smoke::params_csc_4ch_and_resize); - - PLUGING_CASE_WITH_SUFFIX(HETERO, _gapi_resize_only_smoke, BatchResizeTest, smoke::batch_params_resize_only); - PLUGING_CASE_WITH_SUFFIX(HETERO, _gapi_csc_3ch_and_resize_smoke, BatchResizeTest, smoke::batch_params_csc_3ch_and_resize); - PLUGING_CASE_WITH_SUFFIX(HETERO, _gapi_csc_4ch_and_resize_smoke, BatchResizeTest, smoke::batch_params_csc_4ch_and_resize); - - PLUGING_CASE_WITH_SUFFIX(HETERO, _gapi_reorder_smoke, ReorderTest, reorder_params); - -// PLUGING_CASE_WITH_SUFFIX(HETERO, _gapi_csc_nv12_and_resize_smoke, NV12ColorConvertTest, nv12_params); -#endif - -//////////////////////////////////////////////////////////////////////////////////////////////////// - -// nightly: - -// FIXME: enable these once smoke/nightly concepts are introduced in CI -PLUGING_CASE_WITH_SUFFIX(DISABLED_GPU, _gapi_random_roi_c3_nightly, RandomROITest, random_roi_3c); -PLUGING_CASE_WITH_SUFFIX(DISABLED_GPU, _gapi_random_roi_c4_nightly, RandomROITest, random_roi_4c); -PLUGING_CASE_WITH_SUFFIX(DISABLED_GPU, _gapi_random_roi_nv12_nightly, RandomROITest, random_roi_nv12); - -PLUGING_CASE_WITH_SUFFIX(DISABLED_GPU, _gapi_csc_3ch_and_resize_nightly, CropResizeTest, nightly::params_csc_3ch_and_resize); -PLUGING_CASE_WITH_SUFFIX(DISABLED_GPU, _gapi_csc_4ch_and_resize_nightly, CropResizeTest, nightly::params_csc_4ch_and_resize); - -PLUGING_CASE_WITH_SUFFIX(DISABLED_GPU, _gapi_csc_3ch_and_resize_nightly, BatchResizeTest, nightly::batch_params_csc_3ch_and_resize); -PLUGING_CASE_WITH_SUFFIX(DISABLED_GPU, _gapi_csc_4ch_and_resize_nightly, BatchResizeTest, nightly::batch_params_csc_4ch_and_resize); - -PLUGING_CASE_WITH_SUFFIX(DISABLED_GPU, _gapi_csc_3ch_and_resize_nightly, DynamicBatchResizeTest, nightly::batch_params_csc_3ch_and_resize); -PLUGING_CASE_WITH_SUFFIX(DISABLED_GPU, _gapi_csc_4ch_and_resize_nightly, DynamicBatchResizeTest, nightly::batch_params_csc_4ch_and_resize); - -PLUGING_CASE_WITH_SUFFIX(DISABLED_GPU, _gapi_reorder_nightly, ReorderTest, reorder_params); - -PLUGING_CASE_WITH_SUFFIX(DISABLED_GPU, _gapi_csc_nv12_and_resize_nightly, NV12ColorConvertTest, nv12_params); - -#if defined(ENABLE_MKL_DNN) - PLUGING_CASE_WITH_SUFFIX(DISABLED_HETERO, _gapi_random_roi_c3_nightly, RandomROITest, random_roi_3c); - PLUGING_CASE_WITH_SUFFIX(DISABLED_HETERO, _gapi_random_roi_c4_nightly, RandomROITest, random_roi_4c); - PLUGING_CASE_WITH_SUFFIX(DISABLED_HETERO, _gapi_random_roi_nv12_nightly, RandomROITest, random_roi_nv12); - - PLUGING_CASE_WITH_SUFFIX(DISABLED_HETERO, _gapi_csc_3ch_and_resize_nightly, CropResizeTest, nightly::params_csc_3ch_and_resize); - PLUGING_CASE_WITH_SUFFIX(DISABLED_HETERO, _gapi_csc_4ch_and_resize_nightly, CropResizeTest, nightly::params_csc_4ch_and_resize); - - PLUGING_CASE_WITH_SUFFIX(DISABLED_HETERO, _gapi_csc_3ch_and_resize_nightly, BatchResizeTest, nightly::batch_params_csc_3ch_and_resize); - PLUGING_CASE_WITH_SUFFIX(DISABLED_HETERO, _gapi_csc_4ch_and_resize_nightly, BatchResizeTest, nightly::batch_params_csc_4ch_and_resize); - - PLUGING_CASE_WITH_SUFFIX(DISABLED_HETERO, _gapi_reorder_nightly, ReorderTest, reorder_params); - - PLUGING_CASE_WITH_SUFFIX(DISABLED_HETERO, _gapi_csc_nv12_and_resize_nightly, NV12ColorConvertTest, nv12_params); -#endif - -#endif // USE_OPENCV diff --git a/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/io_blob_tests/dims_tests.cpp b/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/io_blob_tests/dims_tests.cpp deleted file mode 100644 index d8099edb75617d..00000000000000 --- a/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/io_blob_tests/dims_tests.cpp +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "dims_tests.hpp" - -PLUGING_CASE_WITH_SUFFIX(GPU, _smoke, IO_BlobTest, params); - -#if defined(ENABLE_MKL_DNN) - PLUGING_CASE(HETERO, IO_BlobTest, params); -#endif diff --git a/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/io_blob_tests/layout_tests.cpp b/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/io_blob_tests/layout_tests.cpp deleted file mode 100644 index 85ac546466f5e9..00000000000000 --- a/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/io_blob_tests/layout_tests.cpp +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "layout_tests.hpp" - -static auto params = ::testing::Combine( - ::testing::Values(conv_p), - ::testing::Values(std::make_pair(Precision::FP32, 1e-5)), - ::testing::Values(NCHW, NHWC), - ::testing::Values(NCHW, NHWC), - ::testing::Values(Precision::FP32, Precision::U8, Precision::I16) // TODO: What about U16/I8/FP16? -); - -PLUGING_CASE_WITH_SUFFIX(GPU, _smoke, LayoutTTTest, params); - -#if defined(ENABLE_MKL_DNN) - PLUGING_CASE(HETERO, LayoutTTTest, params); -#endif diff --git a/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/lstm/lstm_cell_test.cpp b/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/lstm/lstm_cell_test.cpp deleted file mode 100644 index 20d264fea97646..00000000000000 --- a/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/lstm/lstm_cell_test.cpp +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "lstm_cell_test.hpp" - -RUN_CASE_P_WITH_SUFFIX(GPU, _smoke, LSTMCellTest, workload); diff --git a/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/lstm/lstm_ir_test.cpp b/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/lstm/lstm_ir_test.cpp deleted file mode 100644 index 54b295e397b16b..00000000000000 --- a/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/lstm/lstm_ir_test.cpp +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "lstm_ir_test.hpp" - -RUN_CASE_P_WITH_SUFFIX(GPU, _smoke, LSTM_IR_Test, workload); diff --git a/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/lstm/rnn_seq_test.cpp b/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/lstm/rnn_seq_test.cpp deleted file mode 100644 index d1f310107052c6..00000000000000 --- a/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/lstm/rnn_seq_test.cpp +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "rnn_seq_test.hpp" - -RUN_CASE_CP_WITH_SUFFIX(GPU, _smoke, RNNSeqTest, workload); - -RUN_CASE_CP_WITH_SUFFIX(GPU, _smoke_seq, RNNSeqTest, dyn_seq_workload); diff --git a/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/single_layer_tests/bin_conv_tests.cpp b/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/single_layer_tests/bin_conv_tests.cpp deleted file mode 100644 index acad53344cb730..00000000000000 --- a/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/single_layer_tests/bin_conv_tests.cpp +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "bin_conv_tests.hpp" - -bin_conv_test_params bin_conv_only_test_cases[] = { - bin_conv_test_params("CPU", case_1), - bin_conv_test_params("CPU", case_2), - bin_conv_test_params("CPU", case_3), - bin_conv_test_params("CPU", case_4), - bin_conv_test_params("CPU", case_5), - bin_conv_test_params("CPU", case_6), - bin_conv_test_params("CPU", case_7), - bin_conv_test_params("CPU", case_8), - bin_conv_test_params("CPU", case_9), - // BinaryConvolutions with groups are not supported in clDNN at this moment - // bin_conv_test_params("CPU", case_10), - // bin_conv_test_params("CPU", case_11), - // bin_conv_test_params("CPU", case_12), - // bin_conv_test_params("CPU", case_13), - bin_conv_test_params("CPU", case_14), - bin_conv_test_params("CPU", case_15), - bin_conv_test_params("CPU", case_16) -}; - -INSTANTIATE_TEST_CASE_P( - smoke_GPU_TestBinaryConvolution, BinaryConvolutionOnlyTest, ::testing::ValuesIn(bin_conv_only_test_cases), getTestCaseName); diff --git a/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/single_layer_tests/deformable_psroipooling_tests.cpp b/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/single_layer_tests/deformable_psroipooling_tests.cpp deleted file mode 100644 index 5192b772bab99b..00000000000000 --- a/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/single_layer_tests/deformable_psroipooling_tests.cpp +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "deformable_psroi_tests.hpp" - -INSTANTIATE_TEST_CASE_P( - nightly_TestDeformable, DeformablePSROIOnlyTest, - ::testing::Values( - deformable_psroi_test_params{"GPU", {1, 7938, 38, 38}, {300, 5}, {300, 162, 7, 7}, - 0.0625, 162, 7, 7, 7, 7, 4, true - }, - deformable_psroi_test_params{"GPU", {1, 392, 38, 38}, {300, 5}, {300, 8, 7, 7}, - 0.0625, 8, 7, 7, 7, 7, 4, false, 0.1, {300, 2, 7, 7} - }, - deformable_psroi_test_params{"GPU", {1, 98, 38, 38}, {300, 5}, {300, 2, 7, 7}, - 0.0625, 2, 7, 7, 7, 7, 4, true - }, - deformable_psroi_test_params{"GPU", {1, 3969, 38, 38}, {300, 5}, {300, 81, 7, 7}, - 0.0625, 81, 7, 7, 7, 7, 4, false, 0.1, {300, 162, 7, 7} - } - )); diff --git a/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/single_layer_tests/gemm_tests.cpp b/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/single_layer_tests/gemm_tests.cpp deleted file mode 100644 index b6c487b4c87f9c..00000000000000 --- a/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/single_layer_tests/gemm_tests.cpp +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "gemm_tests.hpp" - -gemm_base_params gemm_smoke_cases[] = { - case8, case16, case24, case32, - case47 -}; - -INSTANTIATE_TEST_CASE_P(smoke_GPU_GemmRandomTest, GemmRandomTest, - testing::Combine( - testing::Values("GPU"), - testing::Values("FP32", "FP16"), - testing::ValuesIn(gemm_smoke_cases) -)); - -gemm_base_params gemm_all_cases[] = { - case1, case2, case3, case4, case5, case6, case7, - case9, case10, case11, case12, case13, case14, case15, - case17, case18, case19, case20, case21, case22, case23, - case25, case26, case27, case28, case29, case30, case31, - case33, case34, case35, case36, case37, case38, - case39, case40, case41, case42, case43, case44, - case45, case46 -}; - -INSTANTIATE_TEST_CASE_P(nightly_GPU_GemmRandomTest, GemmRandomTest, - testing::Combine( - testing::Values("GPU"), - testing::Values("FP32", "FP16"), - testing::ValuesIn(gemm_all_cases) -)); diff --git a/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/single_layer_tests/one_hot_tests.cpp b/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/single_layer_tests/one_hot_tests.cpp deleted file mode 100644 index bb02c58c08b717..00000000000000 --- a/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/single_layer_tests/one_hot_tests.cpp +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "one_hot_tests.hpp" - -one_hot_test_params one_hot_only_4d_test_cases[] = { - one_hot_test_params("GPU", case_2d_0), - one_hot_test_params("GPU", case_2d_1), - one_hot_test_params("GPU", case_2d_2), - one_hot_test_params("GPU", case_3d_0), - one_hot_test_params("GPU", case_3d_1), - one_hot_test_params("GPU", case_3d_2), - one_hot_test_params("GPU", case_4d_0), - one_hot_test_params("GPU", case_4d_1), - one_hot_test_params("GPU", case_4d_2), - one_hot_test_params("GPU", case_4d_3), - one_hot_test_params("GPU", case_5d_0), - one_hot_test_params("GPU", case_5d_1), - one_hot_test_params("GPU", case_5d_2), - one_hot_test_params("GPU", case_5d_3), - one_hot_test_params("GPU", case_5d_4) -}; - -INSTANTIATE_TEST_CASE_P(nightly_TestsOneHot, OneHotOnlyTestShared, ::testing::ValuesIn(one_hot_only_4d_test_cases)); diff --git a/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/single_layer_tests/permute_tests.cpp b/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/single_layer_tests/permute_tests.cpp deleted file mode 100644 index aecba48320d797..00000000000000 --- a/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/single_layer_tests/permute_tests.cpp +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "permute_tests.hpp" - -permute_test_params permute_only_test_cases[] = { - permute_test_params("GPU", case_1), - permute_test_params("GPU", case_2), - permute_test_params("GPU", case_3), - permute_test_params("GPU", case_4), - permute_test_params("GPU", case_5), - permute_test_params("GPU", case_6), - permute_test_params("GPU", case_7), - permute_test_params("GPU", case_8), - permute_test_params("GPU", case_9), - permute_test_params("GPU", case_10), - permute_test_params("GPU", case_11), - permute_test_params("GPU", case_12), - permute_test_params("GPU", case_13), - permute_test_params("GPU", case_14), - permute_test_params("GPU", case_15), - permute_test_params("GPU", case_16) -}; - - -INSTANTIATE_TEST_CASE_P( - smoke_GPU_TestPermute, PermuteOnlyTests, ::testing::ValuesIn(permute_only_test_cases)); - diff --git a/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/single_layer_tests/quantize_tests.cpp b/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/single_layer_tests/quantize_tests.cpp deleted file mode 100644 index d8fddac8a5c0cf..00000000000000 --- a/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/single_layer_tests/quantize_tests.cpp +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "quantize_tests.hpp" - -quantize_test_params quantize_only_test_cases[] = { - quantize_test_params{"GPU", case_1}, - quantize_test_params{"GPU", case_2}, - quantize_test_params{"GPU", case_3}, - quantize_test_params{"GPU", case_4}, - quantize_test_params{"GPU", case_5}, - quantize_test_params{"GPU", case_6}, - quantize_test_params{"GPU", case_7}, - quantize_test_params{"GPU", case_8}, - quantize_test_params{"GPU", case_9}, - quantize_test_params{"GPU", case_10}, - quantize_test_params{"GPU", case_11}, - quantize_test_params{"GPU", case_12}, - quantize_test_params{"GPU", case_13}, - quantize_test_params{"GPU", case_14}, - quantize_test_params{"GPU", case_15}, - quantize_test_params{"GPU", case_16}, - quantize_test_params{"GPU", case_17}, - quantize_test_params{"GPU", case_18}, - quantize_test_params{"GPU", case_19}, - quantize_test_params{"GPU", case_20}, - quantize_test_params{"GPU", case_21}, - quantize_test_params{"GPU", case_22}, - quantize_test_params{"GPU", case_23}, - quantize_test_params{"GPU", case_24}, -}; - -INSTANTIATE_TEST_CASE_P(smoke_GPU_TestQuantize, QuantizeOnlyTest, ::testing::ValuesIn(quantize_only_test_cases)); diff --git a/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/single_layer_tests/resample_tests.cpp b/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/single_layer_tests/resample_tests.cpp deleted file mode 100644 index cac8c945e239b6..00000000000000 --- a/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/single_layer_tests/resample_tests.cpp +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "resample_tests.hpp" - -INSTANTIATE_TEST_CASE_P( - TestsResample, ResampleTests, - ::testing::Values( - // 4D nearest - resample_test_params{"GPU", {2, 64, 15, 25}, 1.f, "caffe.ResampleParameter.NEAREST"}, - resample_test_params{"GPU", {2, 64, 10, 20}, 0.25f, "caffe.ResampleParameter.NEAREST"}, - resample_test_params{"GPU", {1, 1, 10, 20}, 0.5f, "caffe.ResampleParameter.NEAREST"}, - resample_test_params{"GPU", {2, 3, 15, 25}, 1.f, "caffe.ResampleParameter.NEAREST"}, - resample_test_params{"GPU", {2, 3, 10, 20}, 0.25f, "caffe.ResampleParameter.NEAREST"}, - resample_test_params{"GPU", {1, 1, 10, 13}, 0.52f, "caffe.ResampleParameter.NEAREST"}, - //// 4D linear - resample_test_params{"GPU", {2, 64, 15, 25}, 1.f, "caffe.ResampleParameter.LINEAR"}, - resample_test_params{"GPU", {2, 64, 10, 20}, 0.25f, "caffe.ResampleParameter.LINEAR"}, - resample_test_params{"GPU", {1, 1, 15, 25}, 0.5, "caffe.ResampleParameter.LINEAR"}, - resample_test_params{"GPU", {1, 3, 15, 25}, 0.5, "caffe.ResampleParameter.LINEAR"}, - resample_test_params{"GPU", {2, 5, 3, 3}, 3.0f, "caffe.ResampleParameter.LINEAR"}, - resample_test_params{"GPU", {2, 4, 10, 20}, 2.0f, "caffe.ResampleParameter.LINEAR"}, - resample_test_params{"GPU", {2, 20, 30, 30}, 3.0f, "caffe.ResampleParameter.LINEAR"}, - resample_test_params{"GPU", {2, 20, 3, 6}, 3.0f, "caffe.ResampleParameter.LINEAR"}, - //// 5D nearest - resample_test_params{ "GPU", {1, 64, 20, 15, 25}, 1.f, "caffe.ResampleParameter.NEAREST" }, - resample_test_params{ "GPU", {1, 64, 15, 10, 20}, 0.25f, "caffe.ResampleParameter.NEAREST" }, - resample_test_params{ "GPU", {1, 64, 10, 10, 20}, 0.5f, "caffe.ResampleParameter.NEAREST" }, - resample_test_params{ "GPU", {1, 3, 20, 15, 25}, 1.f, "caffe.ResampleParameter.NEAREST" }, - resample_test_params{ "GPU", {1, 3, 15, 10, 20}, 0.25f, "caffe.ResampleParameter.NEAREST" }, - resample_test_params{ "GPU", {2, 64, 20, 15, 25}, 1.f, "caffe.ResampleParameter.NEAREST" }, - resample_test_params{ "GPU", {2, 64, 15, 10, 20}, 0.25f, "caffe.ResampleParameter.NEAREST" }, - resample_test_params{ "GPU", {2, 64, 10, 10, 20}, 0.5f, "caffe.ResampleParameter.NEAREST" }, - resample_test_params{ "GPU", {2, 3, 20, 15, 25}, 1.f, "caffe.ResampleParameter.NEAREST" }, - resample_test_params{ "GPU", {2, 3, 15, 10, 20}, 0.25f, "caffe.ResampleParameter.NEAREST" }, - // 5D linear - resample_test_params{ "GPU", {1, 8, 5, 2, 4}, 0.2f, "caffe.ResampleParameter.LINEAR" }, - resample_test_params{ "GPU", {1, 8, 10, 10, 20}, 0.25f, "caffe.ResampleParameter.LINEAR" }, - resample_test_params{ "GPU", {1, 2, 16, 12, 20}, 4.f, "caffe.ResampleParameter.LINEAR" }, - resample_test_params{ "GPU", {2, 16, 15, 10, 20}, 1.f, "caffe.ResampleParameter.LINEAR" }, - resample_test_params{ "GPU", {2, 2, 4, 10, 20}, 0.25f, "caffe.ResampleParameter.LINEAR" }, - resample_test_params{ "GPU", {2, 4, 15, 10, 20}, 1.f, "caffe.ResampleParameter.LINEAR" }, - resample_test_params{ "GPU", {2, 8, 16, 12, 20}, 4.f, "caffe.ResampleParameter.LINEAR" }, - resample_test_params{ "GPU", {2, 16, 10, 10, 20}, 0.25f, "caffe.ResampleParameter.LINEAR" })); diff --git a/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/single_layer_tests/ti_tests.cpp b/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/single_layer_tests/ti_tests.cpp deleted file mode 100644 index 55b714fe1308c6..00000000000000 --- a/inference-engine/tests_deprecated/functional/cldnn/shared_tests_instance/single_layer_tests/ti_tests.cpp +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "ti_tests.hpp" - -ti_test_params ti_test_cases[] = {{"GPU", 1, InferenceEngine::Precision(InferenceEngine::Precision::FP32)}, - {"GPU", 1, InferenceEngine::Precision(InferenceEngine::Precision::FP16)}}; - -RUN_CASE_P_WITH_SUFFIX(GPU, _smoke, TITest, ti_test_cases); - -RUN_CASE_P_WITH_SUFFIX(GPU, _smoke, TITest2, ti_test_cases); diff --git a/inference-engine/tests_deprecated/functional/cldnn/single_layer_tests/convert_like_tests.cpp b/inference-engine/tests_deprecated/functional/cldnn/single_layer_tests/convert_like_tests.cpp deleted file mode 100644 index 1840231dc2c375..00000000000000 --- a/inference-engine/tests_deprecated/functional/cldnn/single_layer_tests/convert_like_tests.cpp +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (C) 2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include -#include -#include - -#include "tests_common.hpp" -#include "single_layer_common.hpp" - - -using namespace ::testing; -using namespace InferenceEngine; -using namespace std; - - -struct convert_like_test_params { - std::string device_name; - std::string inPrecision; - std::string likePrecision; - InferenceEngine::SizeVector in_out_shape; - InferenceEngine::SizeVector like_shape; -}; - - - -class ConvertLikeTest : public TestsCommon, public WithParamInterface { - std::string model_t = R"V0G0N( - - - - - - _IN_OUT_ - - - - - - - _LIKE_ - - - - - - - _IN_OUT_ - - - _LIKE_ - - - - - _IN_OUT_ - - - - - - - - - -)V0G0N"; - - - std::string getModel(convert_like_test_params p) { - std::string model = model_t; - std::string in_out_shape, like_shape; - - for (size_t i = 0; i < p.in_out_shape.size(); i++) { - in_out_shape += ""; - in_out_shape += std::to_string(p.in_out_shape[i]); - in_out_shape += "\n"; - } - - for (size_t i = 0; i < p.like_shape.size(); i++) { - like_shape += ""; - like_shape += std::to_string(p.like_shape[i]); - like_shape += "\n"; - } - - REPLACE_WITH_STR(model, "_INP_", p.inPrecision); - REPLACE_WITH_STR(model, "_LKP_", p.likePrecision); - REPLACE_WITH_STR(model, "_IN_OUT_", in_out_shape); - REPLACE_WITH_STR(model, "_LIKE_", like_shape); - - return model; - } - -protected: - virtual void TearDown() { - } - - virtual void SetUp() { - try - { - convert_like_test_params p = ::testing::WithParamInterface::GetParam(); - std::string model = getModel(p); - - Core ie; - CNNNetwork net = ie.ReadNetwork(model, InferenceEngine::Blob::CPtr()); - - ExecutableNetwork executable_network = ie.LoadNetwork(net, p.device_name); - InferRequest inferRequest = executable_network.CreateInferRequest(); - - // Input Data - InputsDataMap inputInfo(net.getInputsInfo()); - Blob::Ptr input1 = inferRequest.GetBlob("input"); - input1->allocate(); - Blob::Ptr input2 = inferRequest.GetBlob("like"); - input2->allocate(); - - inferRequest.Infer(); - - // Output Data - OutputsDataMap outputInfo(net.getOutputsInfo()); - Blob::Ptr outputBlob = inferRequest.GetBlob(outputInfo.begin()->first); - auto outputPrecision = outputBlob->getTensorDesc().getPrecision(); - auto likePrecision = input2->getTensorDesc().getPrecision(); - - if (outputPrecision != likePrecision) - { - FAIL() << "Different output and like precision!"; - } - - } - catch (const InferenceEngine::details::InferenceEngineException &e) - { - FAIL() << e.what(); - } - } -}; - -TEST_P(ConvertLikeTest, smoke_GPU_TestsConvertLike) {} - -INSTANTIATE_TEST_CASE_P( - smoke_TestsConvertLike, ConvertLikeTest, - ::testing::Values( - convert_like_test_params{ "GPU", "FP32", "I32", { 3, 5 }, { 2 } }, - convert_like_test_params{ "GPU", "FP32", "I32", { 10, 10, 10, 5 }, { 2 } }, - convert_like_test_params{ "GPU", "FP32", "I32", { 3, 5 }, { 2, 4, 5 } }, - convert_like_test_params{ "GPU", "FP32", "FP16", { 3, 5 }, { 2 } }, - convert_like_test_params{ "GPU", "I32", "FP16", { 3, 5 }, { 2 } }, - convert_like_test_params{ "GPU", "I32", "FP32", { 3, 5 }, { 2 } } -)); diff --git a/inference-engine/tests_deprecated/functional/cldnn/single_layer_tests/expand_tests.cpp b/inference-engine/tests_deprecated/functional/cldnn/single_layer_tests/expand_tests.cpp deleted file mode 100644 index 7833f9a77a8850..00000000000000 --- a/inference-engine/tests_deprecated/functional/cldnn/single_layer_tests/expand_tests.cpp +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include -#include -#include - -#include "tests_common.hpp" -#include "single_layer_common.hpp" - - - -using namespace ::testing; -using namespace InferenceEngine; -using namespace std; - - -struct broadcast_test_params { - std::string device_name; - InferenceEngine::SizeVector in_dim; - InferenceEngine::SizeVector out_dim; - std::vector ref; -}; - -template -void ref_broadcast(InferenceEngine::TBlob &dsts, broadcast_test_params &prm) { - data_t *dst_data = dsts.buffer().template as(); - for(int i = 0; i < prm.ref.size(); ++i) - dst_data[i] = prm.ref[i]; -} - -InferenceEngine::TBlob::Ptr generateWeights(const SizeVector &data) { - TensorDesc td(InferenceEngine::Precision::U8, { data.size() * sizeof(uint32_t) }, InferenceEngine::C ); - TBlob::Ptr weights; - weights = make_shared_blob(td); - weights->allocate(); - auto wb = weights->buffer().as(); - for (size_t i = 0; i < data.size(); i++) { - wb[i] = data[i]; - } - return weights; -} - - -class BroadcastTests : public TestsCommon, public WithParamInterface { - std::string model_t = R"V0G0N( - - - - - - _IN_ - - - - - - - 4 - - - - - - - - - - _IN_ - - - 4 - - - - - _OUT_ - - - - - - - - - -)V0G0N"; - - std::string getModel(broadcast_test_params p) { - std::string in, out; - - for (auto& i : p.in_dim) { - in += "" + std::to_string(i) + "\n"; - } - - for (auto& o : p.out_dim) { - out += "" + std::to_string(o) + "\n"; - } - - REPLACE_WITH_STR(model_t, "_IN_", in); - REPLACE_WITH_STR(model_t, "_OUT_", out); - - return model_t; - } - -protected: - virtual void TearDown() { - } - - virtual void SetUp() { - try { - TestsCommon::SetUp(); - broadcast_test_params p = ::testing::WithParamInterface::GetParam(); - std::string model = getModel(p); - - Core ie; - CNNNetwork net = ie.ReadNetwork(model, generateWeights(p.out_dim)); - ExecutableNetwork executable_network = ie.LoadNetwork(net, p.device_name); - InferRequest inferRequest = executable_network.CreateInferRequest(); - - // Input Data - InputsDataMap inputInfo(net.getInputsInfo()); - Blob::Ptr inputBlob = inferRequest.GetBlob(inputInfo.begin()->first); - float* inputData = inputBlob->buffer().as(); - fill_data_dbgval(inputData, inputBlob->size()); - - inferRequest.Infer(); - - // Output Data - OutputsDataMap outputInfo(net.getOutputsInfo()); - Blob::Ptr outputBlob = inferRequest.GetBlob(outputInfo.begin()->first); - - size_t outSz = outputBlob->size(); - // Output Reference - InferenceEngine::TBlob dst_ref(outputBlob->getTensorDesc()); - dst_ref.allocate(); - ref_broadcast(dst_ref, p); - - const float* res = outputBlob->buffer().as(); - const float* ref = dst_ref.data(); - compare(res, ref, outSz); - } catch (const InferenceEngine::details::InferenceEngineException &e) { - FAIL() << e.what(); - } - } -}; - -TEST_P(BroadcastTests, smoke_GPU_TestsBroadcast) {} - -// Test data vectors -std::vector broadcast_ref0 = { 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f }; -std::vector broadcast_ref1 = { 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 2.f, 2.f, 2.f, 2.f, 2.f, 2.f, - 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 2.f, 2.f, 2.f, 2.f, 2.f, 2.f}; -std::vector broadcast_ref2 = { 0.f, 0.f, 0.f, 0.f, - 1.f, 1.f, 1.f, 1.f, - 2.f, 2.f, 2.f, 2.f}; - -INSTANTIATE_TEST_CASE_P( - smoke_TestsBroadcast, BroadcastTests, - ::testing::Values( - broadcast_test_params{ "GPU", { 1, 1, 1, 1 }, { 2, 2, 2, 2 }, broadcast_ref0 }, - broadcast_test_params{ "GPU", { 1, 1, 3, 1 }, { 1, 2, 3, 6 }, broadcast_ref1 }, - broadcast_test_params{ "GPU", { 1, 1, 3, 1 }, { 1, 1, 3, 4 }, broadcast_ref2 } - )); diff --git a/inference-engine/tests_deprecated/functional/cldnn/single_layer_tests/priorbox_tests.cpp b/inference-engine/tests_deprecated/functional/cldnn/single_layer_tests/priorbox_tests.cpp deleted file mode 100644 index 39b5058855919f..00000000000000 --- a/inference-engine/tests_deprecated/functional/cldnn/single_layer_tests/priorbox_tests.cpp +++ /dev/null @@ -1,369 +0,0 @@ -// Copyright (C) 2018-2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include -#include - -#include "tests_common.hpp" -#include "single_layer_common.hpp" - -using namespace ::testing; -using namespace InferenceEngine; - -struct priorbox_test_params { - std::string device_name; - - size_t mb; - - struct { - size_t c; - size_t h; - size_t w; - } in1; - - struct { - size_t c; - size_t h; - size_t w; - } in2; - - struct { - size_t c; - size_t h; - size_t w; - } out; - - int offset; - int stride; - int min_size; - int max_size; - bool flip; - bool clip; -}; - -class smoke_PriorBoxOnlyTest: public TestsCommon, - public WithParamInterface { - - std::string model_t = R"V0G0N( - - - - - - 1 - _IC1_ - _IH1_ - _IW1_ - - - - - - - 1 - _IC2_ - _IH2_ - _IW2_ - - - - - - - - 1 - _IC1_ - _IH1_ - _IW1_ - - - 1 - _IC2_ - _IH2_ - _IW2_ - - - - - 1 - _OC_ - _OH_ - _OW_ - - - - - - - - - - -)V0G0N"; - - std::string getModel(priorbox_test_params p) { - std::string model = model_t; - - REPLACE_WITH_NUM(model, "_IW1_", p.in1.w); - REPLACE_WITH_NUM(model, "_IH1_", p.in1.h); - REPLACE_WITH_NUM(model, "_IC1_", p.in1.c); - - REPLACE_WITH_NUM(model, "_IW2_", p.in2.w); - REPLACE_WITH_NUM(model, "_IH2_", p.in2.h); - REPLACE_WITH_NUM(model, "_IC2_", p.in2.c); - - REPLACE_WITH_NUM(model, "_OW_", p.out.w); - REPLACE_WITH_NUM(model, "_OH_", p.out.h); - REPLACE_WITH_NUM(model, "_OC_", p.out.c); - - return model; - } - -protected: - virtual void SetUp() { - - try { - priorbox_test_params p = ::testing::WithParamInterface::GetParam(); - std::string model = getModel(p); - - Core ie; - CNNNetwork network = ie.ReadNetwork(model, Blob::CPtr()); - network.setBatchSize(p.mb); - - InputsDataMap inputs = network.getInputsInfo(); - - DataPtr inputPtr1 = inputs["input1"]->getInputData(); - DataPtr inputPtr2 = inputs["input2"]->getInputData(); - - InferenceEngine::Blob::Ptr input1 = InferenceEngine::make_shared_blob(inputPtr1->getTensorDesc()); - input1->allocate(); - - InferenceEngine::Blob::Ptr input2 = InferenceEngine::make_shared_blob(inputPtr2->getTensorDesc()); - input2->allocate(); - - InferenceEngine::BlobMap inputBlobs; - inputBlobs["input1"] = input1; - inputBlobs["input2"] = input2; - - OutputsDataMap outputs = network.getOutputsInfo(); - - InferenceEngine::TBlob::Ptr output; - output = InferenceEngine::make_shared_blob(outputs["prior"]->getTensorDesc()); - output->allocate(); - - InferenceEngine::BlobMap outputBlobs; - outputBlobs["prior"] = output; - - ExecutableNetwork exeNetwork = ie.LoadNetwork(network, p.device_name); - InferRequest inferRequest = exeNetwork.CreateInferRequest(); - inferRequest.SetInput(inputBlobs); - inferRequest.SetOutput(outputBlobs); - inferRequest.Infer(); - - // Check results - - const TBlob::Ptr outputArray = std::dynamic_pointer_cast>(output); - float* dst_ptr = outputArray->data(); - - const float eps = 1e-6; - - // pick a few generated priors and compare against the expected number. - // first prior - EXPECT_NEAR(dst_ptr[0], 0.03, eps); - EXPECT_NEAR(dst_ptr[1], 0.03, eps); - EXPECT_NEAR(dst_ptr[2], 0.07, eps); - EXPECT_NEAR(dst_ptr[3], 0.07, eps); - // second prior - EXPECT_NEAR(dst_ptr[4], 0.02, eps); - EXPECT_NEAR(dst_ptr[5], 0.02, eps); - EXPECT_NEAR(dst_ptr[6], 0.08, eps); - EXPECT_NEAR(dst_ptr[7], 0.08, eps); - // prior in the 5-th row and 5-th col - EXPECT_NEAR(dst_ptr[4*10*2*4+4*2*4], 0.43, eps); - EXPECT_NEAR(dst_ptr[4*10*2*4+4*2*4+1], 0.43, eps); - EXPECT_NEAR(dst_ptr[4*10*2*4+4*2*4+2], 0.47, eps); - EXPECT_NEAR(dst_ptr[4*10*2*4+4*2*4+3], 0.47, eps); - - // check variance - dst_ptr += p.out.h * p.out.w; - for (int d = 0; d < p.out.h * p.out.w; ++d) { - EXPECT_NEAR(dst_ptr[d], 0.1, eps); - } - } catch (const InferenceEngine::details::InferenceEngineException &e) { - FAIL() << e.what(); - } - } -}; - -TEST_P(smoke_PriorBoxOnlyTest, TestsPriorBox) {} - -INSTANTIATE_TEST_CASE_P( - TestsPriorBox, smoke_PriorBoxOnlyTest, - ::testing::Values( - priorbox_test_params{ "GPU", - 10, {10, 10, 10}, {3, 100, 100}, {2, 1, 800}, 0, 0, 4, 9, true, true })); - - -class smoke_PriorBoxDensityTest : public TestsCommon, - public WithParamInterface { - - std::string model_t = R"V0G0N( - - - - - - 1 - _IC1_ - _IH1_ - _IW1_ - - - - - - - 1 - _IC2_ - _IH2_ - _IW2_ - - - - - - - - 1 - _IC1_ - _IH1_ - _IW1_ - - - 1 - _IC2_ - _IH2_ - _IW2_ - - - - - 1 - _OC_ - _OH_ - _OW_ - - - - - - - - - - -)V0G0N"; - - std::string getModel(priorbox_test_params p) { - std::string model = model_t; - - REPLACE_WITH_NUM(model, "_IW1_", p.in1.w); - REPLACE_WITH_NUM(model, "_IH1_", p.in1.h); - REPLACE_WITH_NUM(model, "_IC1_", p.in1.c); - - REPLACE_WITH_NUM(model, "_IW2_", p.in2.w); - REPLACE_WITH_NUM(model, "_IH2_", p.in2.h); - REPLACE_WITH_NUM(model, "_IC2_", p.in2.c); - - REPLACE_WITH_NUM(model, "_OW_", p.out.w); - REPLACE_WITH_NUM(model, "_OH_", p.out.h); - REPLACE_WITH_NUM(model, "_OC_", p.out.c); - - return model; - } - -protected: - virtual void SetUp() { - - try { - priorbox_test_params p = ::testing::WithParamInterface::GetParam(); - std::string model = getModel(p); - - Core ie; - CNNNetwork network = ie.ReadNetwork(model, Blob::CPtr()); - network.setBatchSize(p.mb); - - InputsDataMap inputs = network.getInputsInfo(); - - DataPtr inputPtr1 = inputs["input1"]->getInputData(); - DataPtr inputPtr2 = inputs["input2"]->getInputData(); - - InferenceEngine::Blob::Ptr input1 = InferenceEngine::make_shared_blob(inputPtr1->getTensorDesc()); - input1->allocate(); - - InferenceEngine::Blob::Ptr input2 = InferenceEngine::make_shared_blob(inputPtr2->getTensorDesc()); - input2->allocate(); - - InferenceEngine::BlobMap inputBlobs; - inputBlobs["input1"] = input1; - inputBlobs["input2"] = input2; - - OutputsDataMap outputs = network.getOutputsInfo(); - - InferenceEngine::TBlob::Ptr output; - output = InferenceEngine::make_shared_blob(outputs["prior"]->getTensorDesc()); - output->allocate(); - - InferenceEngine::BlobMap outputBlobs; - outputBlobs["prior"] = output; - - ExecutableNetwork exeNetwork = ie.LoadNetwork(network, p.device_name); - InferRequest inferRequest = exeNetwork.CreateInferRequest(); - inferRequest.SetInput(inputBlobs); - inferRequest.SetOutput(outputBlobs); - inferRequest.Infer(); - - // Check results - - const TBlob::Ptr outputArray = std::dynamic_pointer_cast>(output); - float* dst_ptr = outputArray->data(); - - // pick a few generated priors and compare against the expected number. - // first prior - EXPECT_NEAR(dst_ptr[0], 0.03, 1e-6); - EXPECT_NEAR(dst_ptr[1], 0.03, 1e-6); - EXPECT_NEAR(dst_ptr[2], 0.07, 1e-6); - EXPECT_NEAR(dst_ptr[3], 0.07, 1e-6); - // second prior - EXPECT_NEAR(dst_ptr[4], 0.03, 0.1); - EXPECT_NEAR(dst_ptr[5], 0.03, 0.1); - EXPECT_NEAR(dst_ptr[6], 0.17, 0.1); - EXPECT_NEAR(dst_ptr[7], 0.03, 0.1); - // prior in the 5-th row and 5-th col - EXPECT_NEAR(dst_ptr[4 * 10 * 2 * 4 + 4 * 2 * 4], 0.83, 0.1); - EXPECT_NEAR(dst_ptr[4 * 10 * 2 * 4 + 4 * 2 * 4 + 1], 0.83, 0.1); - EXPECT_NEAR(dst_ptr[4 * 10 * 2 * 4 + 4 * 2 * 4 + 2], 0.84, 0.1); - EXPECT_NEAR(dst_ptr[4 * 10 * 2 * 4 + 4 * 2 * 4 + 3], 0.84, 0.1); - - // check variance - dst_ptr += p.out.h * p.out.w; - for (int d = 0; d < p.out.h * p.out.w; ++d) { - EXPECT_NEAR(dst_ptr[d], 0.1, 1e-6); - } - } - catch (const InferenceEngine::details::InferenceEngineException &e) { - FAIL() << e.what(); - } - } -}; - -TEST_P(smoke_PriorBoxDensityTest, TestsPriorBoxDensity) {} - -INSTANTIATE_TEST_CASE_P( - TestsPriorBoxDensity, smoke_PriorBoxDensityTest, - ::testing::Values( - priorbox_test_params{ "GPU", - 10,{ 10, 10, 10 },{ 3, 100, 100 },{ 2, 1, 400 }, 0, 0, 4, 9, true, true })); - diff --git a/inference-engine/tests_deprecated/functional/cldnn/single_layer_tests/transpose_tests.cpp b/inference-engine/tests_deprecated/functional/cldnn/single_layer_tests/transpose_tests.cpp deleted file mode 100644 index 611aef0bf80f52..00000000000000 --- a/inference-engine/tests_deprecated/functional/cldnn/single_layer_tests/transpose_tests.cpp +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (C) 2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include -#include -#include - -#include "tests_common.hpp" -#include "single_layer_common.hpp" - - -using namespace ::testing; -using namespace InferenceEngine; -using namespace std; - - -struct transpose_test_params { - std::string device_name; - InferenceEngine::SizeVector in_shape; - InferenceEngine::SizeVector out_shape; - bool secondInput; -}; - - -class TransposeTest : public TestsCommon, public WithParamInterface { - std::string model_t = R"V0G0N( - - - - - - _IN_ - - - - _SND_INP_ - - - - _IN_ - - _SND_INPUT_SHAPE_ - - - - _OUT_ - - - - - - - _SND_EDGE_ - - -)V0G0N"; - - - std::string getModel(transpose_test_params p) { - std::string model = model_t; - std::string in_shape, out_shape, snd_layer, snd_shape, snd_edge; - snd_layer = snd_shape = snd_edge = ""; - - for (size_t i = 0; i < p.in_shape.size(); i++) { - in_shape += ""; - in_shape += std::to_string(p.in_shape[i]); - in_shape += "\n"; - } - - for (size_t i = 0; i < p.out_shape.size(); i++) { - out_shape += ""; - out_shape += std::to_string(p.out_shape[i]); - out_shape += "\n"; - } - - if (p.secondInput) - { - snd_shape += "\n"; - snd_shape += std::to_string(p.in_shape.size()); - snd_shape += "\n\n"; - - snd_layer += "\n"; - snd_layer += "\n"; - snd_layer += snd_shape; - snd_layer += "\n"; - snd_layer += "\n"; - - snd_edge += ""; - } - - REPLACE_WITH_STR(model, "_IN_", in_shape); - REPLACE_WITH_STR(model, "_OUT_", out_shape); - REPLACE_WITH_STR(model, "_SND_INP_", snd_layer); - REPLACE_WITH_STR(model, "_SND_INPUT_SHAPE_", snd_shape); - REPLACE_WITH_STR(model, "_SND_EDGE_", snd_edge); - - return model; - } - -protected: - virtual void TearDown() { - } - - virtual void SetUp() { - try - { - transpose_test_params p = ::testing::WithParamInterface::GetParam(); - std::string model = getModel(p); - - Core ie; - CNNNetwork net = ie.ReadNetwork(model, Blob::CPtr()); - ExecutableNetwork executable_network = ie.LoadNetwork(net, p.device_name); - InferRequest inferRequest = executable_network.CreateInferRequest(); - - Blob::Ptr src = make_shared_blob({Precision::FP32, p.in_shape, - TensorDesc::getLayoutByDims(p.in_shape)}); - src->allocate(); - - auto* srcPtr = dynamic_cast*>(src.get()); - - if (srcPtr == nullptr) - FAIL() << "Cannot cast blob to TBlob."; - - inferRequest.SetBlob("input", src); - - inferRequest.Infer(); - - OutputsDataMap outputInfo(net.getOutputsInfo()); - Blob::Ptr outputBlob = inferRequest.GetBlob(outputInfo.begin()->first); - auto outputDims = outputBlob->getTensorDesc().getDims(); - - compare(outputDims, p.out_shape); - - } - catch (const InferenceEngine::details::InferenceEngineException &e) - { - FAIL() << e.what(); - } - } -}; - -TEST_P(TransposeTest, smoke_GPU_TestsTranspose) {} - -INSTANTIATE_TEST_CASE_P( - smoke_TestsTranspose, TransposeTest, - ::testing::Values( - transpose_test_params{ "GPU", { 2, 3, 4 }, { 4, 3, 2 }, false }, - transpose_test_params{ "GPU", { 2, 3, 4, 5 }, { 5, 4, 3, 2 }, false }, - transpose_test_params{ "GPU", { 2, 3, 4 }, { 4, 3, 2 }, true }, - transpose_test_params{ "GPU", { 2, 3, 4 }, { 4, 2, 3 }, true }, - transpose_test_params{ "GPU", { 2, 3, 4, 5 }, { 2, 3, 5, 4 }, true } -)); diff --git a/inference-engine/tests_deprecated/functional/cldnn/test_model_repo.cpp b/inference-engine/tests_deprecated/functional/cldnn/test_model_repo.cpp deleted file mode 100644 index 1cb30455d332ad..00000000000000 --- a/inference-engine/tests_deprecated/functional/cldnn/test_model_repo.cpp +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (C) 2020 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "test_model_repo.hpp" - -std::string get_model_repo() { - return "models:"; -}; - -const char* TestDataHelpers::getModelPathNonFatal() noexcept { - return TestDataHelpers::getModelPathNonFatalDefault(); -} - -std::string TestDataHelpers::get_data_path() { - return TestDataHelpers::get_data_path_default(); -} \ No newline at end of file diff --git a/inference-engine/thirdparty/clDNN/api/lstm.hpp b/inference-engine/thirdparty/clDNN/api/lstm.hpp index 97ae0f3f1ed8a8..69a86aa0e83e28 100644 --- a/inference-engine/thirdparty/clDNN/api/lstm.hpp +++ b/inference-engine/thirdparty/clDNN/api/lstm.hpp @@ -228,7 +228,9 @@ struct lstm_elt : public primitive_base { const primitive_id& cell = "", const float clip = 0, const bool input_forget = 0, - const std::vector activations = {}, + const std::vector activations = {activation_func::logistic, + activation_func::hyperbolic_tan, + activation_func::hyperbolic_tan}, const std::vector activation_params = {}, const lstm_weights_order offset_order = lstm_weights_order::iofz, const uint32_t direction = 0, diff --git a/inference-engine/thirdparty/clDNN/api/non_max_suppression.hpp b/inference-engine/thirdparty/clDNN/api/non_max_suppression.hpp index bbf205252472a6..6b906ae442e56d 100644 --- a/inference-engine/thirdparty/clDNN/api/non_max_suppression.hpp +++ b/inference-engine/thirdparty/clDNN/api/non_max_suppression.hpp @@ -1,5 +1,5 @@ /* -// Copyright (c) 2019 Intel Corporation +// Copyright (c) 2019-2020 Intel Corporation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -41,29 +41,45 @@ struct non_max_suppression : public primitive_base { /// @param boxes_score Id of primitive with boxes scores per class. /// @param selected_indices_num Number of selected indices. /// @param center_point_box If true boxes are represented as [center x, center y, width, height]. + /// @param sort_result_descending Specifies whether it is necessary to sort selected boxes across batches or not. /// @param num_select_per_class Id of primitive producing number of boxes to select per class. /// @param iou_threshold Id of primitive producing threshold value for IOU. /// @param score_threshold Id of primitive producing threshold value for scores. + /// @param soft_nms_sigma Id of primitive specifying the sigma parameter for Soft-NMS. + /// @param second_output Id of primitive specifying output for scores for each selected box. + /// @param third_output Id of primitive specifying output for total number of selected boxes. non_max_suppression(const primitive_id& id, - const primitive_id& boxes_positions, - const primitive_id& boxes_score, - int selected_indices_num, - bool center_point_box = false, - const primitive_id& num_select_per_class = primitive_id(), - const primitive_id& iou_threshold = primitive_id(), - const primitive_id& score_threshold = primitive_id()) + const primitive_id& boxes_positions, + const primitive_id& boxes_score, + int selected_indices_num, + bool center_point_box = false, + bool sort_result_descending = true, + const primitive_id& num_select_per_class = primitive_id(), + const primitive_id& iou_threshold = primitive_id(), + const primitive_id& score_threshold = primitive_id(), + const primitive_id& soft_nms_sigma = primitive_id(), + const primitive_id& second_output = primitive_id(), + const primitive_id& third_output = primitive_id()) : primitive_base(id, {boxes_positions, boxes_score}) , selected_indices_num(selected_indices_num) , center_point_box(center_point_box) + , sort_result_descending(sort_result_descending) , num_select_per_class(num_select_per_class) , iou_threshold(iou_threshold) - , score_threshold(score_threshold) {} + , score_threshold(score_threshold) + , soft_nms_sigma(soft_nms_sigma) + , second_output(second_output) + , third_output(third_output) {} int selected_indices_num; bool center_point_box; + bool sort_result_descending; primitive_id num_select_per_class; primitive_id iou_threshold; primitive_id score_threshold; + primitive_id soft_nms_sigma; + primitive_id second_output; + primitive_id third_output; std::vector> get_dependencies() const override { std::vector> ret; @@ -73,6 +89,13 @@ struct non_max_suppression : public primitive_base { ret.push_back(iou_threshold); if (!score_threshold.empty()) ret.push_back(score_threshold); + if (!soft_nms_sigma.empty()) + ret.push_back(soft_nms_sigma); + if (!second_output.empty()) + ret.push_back(second_output); + if (!third_output.empty()) + ret.push_back(third_output); + return ret; } }; diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/common/common_tools.h b/inference-engine/thirdparty/clDNN/kernel_selector/common/common_tools.h index d159874ee0a32f..a7c2e025cf9480 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/common/common_tools.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/common/common_tools.h @@ -63,10 +63,14 @@ inline uint8_t GetActivationAdditionalParamsNumber(ActivationFunction func) { switch (func) { case ActivationFunction::LINEAR: case ActivationFunction::CLAMP: + case ActivationFunction::HARD_SIGMOID: + case ActivationFunction::SELU: paramsNum = 2; break; case ActivationFunction::RELU_NEGATIVE_SLOPE: case ActivationFunction::ELU: + case ActivationFunction::POW: + case ActivationFunction::SWISH: paramsNum = 1; break; default: diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/eltwise/eltwise_kernel_base.cpp b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/eltwise/eltwise_kernel_base.cpp index f8bc15463b901d..eaaceab22ea6bf 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/eltwise/eltwise_kernel_base.cpp +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/eltwise/eltwise_kernel_base.cpp @@ -247,7 +247,7 @@ JitConstants EltwiseKernelBase::GetOperationsJitConstants(const eltwise_params& op += "(!" + input0_str + " != !" + input1_str + ")"; break; case EltwiseMode::FLOOR_MOD: - op += "(" + input0_str + " - " + input0_str + " / " + input1_str + " * " + input1_str + ")"; + op += "(" + input0_str + " - floor(" + input0_str + " / " + input1_str + ") * " + input1_str + ")"; break; case EltwiseMode::ASSIGN: op += input0_str; diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/lstm/lstm_elt_kernel_base.cpp b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/lstm/lstm_elt_kernel_base.cpp index 53c7c599b80a17..1f7ccf8218d7a2 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/lstm/lstm_elt_kernel_base.cpp +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/lstm/lstm_elt_kernel_base.cpp @@ -20,6 +20,7 @@ #include namespace kernel_selector { + JitConstants LSTMEltKernelBase::GetJitConstants(const lstm_elt_params& params) const { JitConstants jit = MakeBaseParamsJitConstants(params); @@ -29,15 +30,6 @@ JitConstants LSTMEltKernelBase::GetJitConstants(const lstm_elt_params& params) c MakeJitConstant("CELL", cell), MakeJitConstant("CELL_DIRECTION", params.cell_direction)}); } - if (params.clip > 0) { - std::string psclip = toCodeString(params.clip); - std::string nsclip = toCodeString(-params.clip); - jit.AddConstants( - {MakeJitConstant("CLIP(x)", - "((x > " + psclip + ") ? " + psclip + ": (x < " + nsclip + ") ? " + nsclip + " : (x))")}); - } else { - jit.AddConstants({MakeJitConstant("CLIP(x)", "(x)")}); - } if (params.input_forget) { jit.AddConstants({MakeJitConstant("INPUT_FORGET", true)}); } @@ -51,6 +43,31 @@ JitConstants LSTMEltKernelBase::GetJitConstants(const lstm_elt_params& params) c MakeJitConstant("GEMM_OFFSET_F", params.GetOffsetIndexF() * size), MakeJitConstant("GEMM_OFFSET_Z", params.GetOffsetIndexZ() * size), }); + + auto ftype = GetUnitType(params); + // if ReLU activation present, we have to reset accumulator type for the kernel to FP32 + // to avoid possible overflows on FP16, since ReLU doesn't limit upper border of its result + for (size_t i = 0; i < params.activations.size(); i++) { + if (params.activations[i].function == ActivationFunction::RELU) { + ftype = Datatype::F32; + break; + } + } + jit.Merge(MakeTypeJitConstants(ftype, "ACCUMULATOR")); + + static const std::vector asuffixes = {"_F","_G","_H","_CLIP"}; + for (size_t i = 0; i < params.activations.size(); i++) { + std::vector aparams = { params.activations[i] }; + jit.Merge(MakeActivationJitConstants(aparams, ftype, asuffixes[i])); + } + + if (params.clip <= 0) { + jit.AddConstants({ + MakeJitConstant("ACTIVATION_PARAMS_CLIP", ""), + MakeJitConstant("ACTIVATION_CLIP(x, p)", "(x)"), + }); + } + return jit; } @@ -88,4 +105,4 @@ KernelsData LSTMEltKernelBase::GetCommonKernelsData(const Params& params, const return {kd}; } -} // namespace kernel_selector \ No newline at end of file +} // namespace kernel_selector diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_gpu_b_fs_yx_fsv16.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_gpu_b_fs_yx_fsv16.h index 06c3ea248206fb..e7d2fd1397e50d 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_gpu_b_fs_yx_fsv16.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_gpu_b_fs_yx_fsv16.h @@ -31,7 +31,8 @@ class PoolingKernel_b_fs_yx_fsv16 : public PoolingKernelBase { JitConstants GetJitConstants(const pooling_params& params, DispatchData dispatchData) const override; DispatchData SetDefault(const pooling_params& params) const override; std::vector GetSupportedFusedOps() const override { - return { FusedOpType::QUANTIZE, + return { FusedOpType::ELTWISE, + FusedOpType::QUANTIZE, FusedOpType::SCALE, FusedOpType::ACTIVATION }; } diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_gpu_bfyx_block_opt.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_gpu_bfyx_block_opt.h index b093a1af13c103..ca48a1b0bd2da0 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_gpu_bfyx_block_opt.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_gpu_bfyx_block_opt.h @@ -31,7 +31,8 @@ class PoolingKernelGPUBfyxBlockOpt : public PoolingKernelBase { JitConstants GetJitConstants(const pooling_params& params, DispatchData dispatchData) const override; DispatchData SetDefault(const pooling_params& params) const override; std::vector GetSupportedFusedOps() const override { - return { FusedOpType::QUANTIZE, + return { FusedOpType::ELTWISE, + FusedOpType::QUANTIZE, FusedOpType::SCALE, FusedOpType::ACTIVATION }; } diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_gpu_bsv16_fsv16.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_gpu_bsv16_fsv16.h index 2e938b6c5c85ec..222e0d472919bc 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_gpu_bsv16_fsv16.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_gpu_bsv16_fsv16.h @@ -35,7 +35,8 @@ class PoolingKernel_bsv16_fsv16 : public PoolingKernelBase { JitConstants GetJitConstants(const pooling_params& params, DispatchData dispatchData) const override; DispatchData SetDefault(const pooling_params& params) const override; std::vector GetSupportedFusedOps() const override { - return { FusedOpType::QUANTIZE, + return { FusedOpType::ELTWISE, + FusedOpType::QUANTIZE, FusedOpType::SCALE, FusedOpType::ACTIVATION }; } diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_gpu_byxf_opt.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_gpu_byxf_opt.h index 4bc02499d1ca34..ba356196186cea 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_gpu_byxf_opt.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_gpu_byxf_opt.h @@ -31,7 +31,8 @@ class PoolingKernelGPUByxfOpt : public PoolingKernelBase { JitConstants GetJitConstants(const pooling_params& params, DispatchData dispatchData) const override; DispatchData SetDefault(const pooling_params& params) const override; std::vector GetSupportedFusedOps() const override { - return { FusedOpType::QUANTIZE, + return { FusedOpType::ELTWISE, + FusedOpType::QUANTIZE, FusedOpType::SCALE, FusedOpType::ACTIVATION }; } diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_gpu_byxf_padding_opt.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_gpu_byxf_padding_opt.h index 96149530411edf..bffa55ac832d8f 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_gpu_byxf_padding_opt.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_gpu_byxf_padding_opt.h @@ -31,7 +31,8 @@ class PoolingKernelGPUByxfPaddingOpt : public PoolingKernelBase { JitConstants GetJitConstants(const pooling_params& params, DispatchData dispatchData) const override; DispatchData SetDefault(const pooling_params& params) const override; std::vector GetSupportedFusedOps() const override { - return { FusedOpType::QUANTIZE, + return { FusedOpType::ELTWISE, + FusedOpType::QUANTIZE, FusedOpType::SCALE, FusedOpType::ACTIVATION }; } diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_gpu_fs_b_yx_fsv32.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_gpu_fs_b_yx_fsv32.h index d224be06633b75..828f42201c5b14 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_gpu_fs_b_yx_fsv32.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_gpu_fs_b_yx_fsv32.h @@ -31,7 +31,8 @@ class PoolingKerneGPU_fs_b_yx_fsv32 : public PoolingKernelBase { bool Validate(const Params& p, const optional_params& o) const override; JitConstants GetJitConstants(const pooling_params& params, DispatchData dispatchData) const override; std::vector GetSupportedFusedOps() const override { - return { FusedOpType::QUANTIZE, + return { FusedOpType::ELTWISE, + FusedOpType::QUANTIZE, FusedOpType::SCALE, FusedOpType::ACTIVATION }; } diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_gpu_int8_ref.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_gpu_int8_ref.h index aeae5413f21a9b..5864c9e8a059aa 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_gpu_int8_ref.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_gpu_int8_ref.h @@ -29,7 +29,8 @@ class PoolingKernelGPUInt8Ref : public PoolingKernelBase { bool Validate(const Params&, const optional_params&) const override; JitConstants GetJitConstants(const pooling_params& params, DispatchData dispatchData) const override; std::vector GetSupportedFusedOps() const override { - return { FusedOpType::QUANTIZE, + return { FusedOpType::ELTWISE, + FusedOpType::QUANTIZE, FusedOpType::SCALE, FusedOpType::ACTIVATION }; } diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_gpu_ref.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_gpu_ref.h index 4afdbadad514bd..2cd5a5b89630ed 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_gpu_ref.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_gpu_ref.h @@ -26,7 +26,8 @@ class PoolingKernelGPURef : public PoolingKernelBase { KernelsData GetKernelsData(const Params& params, const optional_params& options) const override; ParamsKey GetSupportedKey() const override; std::vector GetSupportedFusedOps() const override { - return { FusedOpType::QUANTIZE, + return { FusedOpType::ELTWISE, + FusedOpType::QUANTIZE, FusedOpType::SCALE, FusedOpType::ACTIVATION }; } diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/select/select_kernel_ref.cpp b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/select/select_kernel_ref.cpp index 31e32e443888ae..aa8649ddfb994d 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/select/select_kernel_ref.cpp +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/select/select_kernel_ref.cpp @@ -39,6 +39,8 @@ ParamsKey SelectKernelRef::GetSupportedKey() const { k.EnableOutputLayout(DataLayout::byxf); k.EnableBatching(); + k.EnableTensorPitches(); + k.EnableTensorOffset(); k.EnableDifferentTypes(); return k; @@ -55,4 +57,4 @@ bool SelectKernelRef::Validate(const Params& p, const optional_params& o) const KernelsData SelectKernelRef::GetKernelsData(const Params& params, const optional_params& options) const { return GetCommonKernelsData(params, options); } -} // namespace kernel_selector \ No newline at end of file +} // namespace kernel_selector diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/fully_connected_gpu_imad.cl b/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/fully_connected_gpu_imad.cl index b551bca5ce56e4..34725d624748a7 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/fully_connected_gpu_imad.cl +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/fully_connected_gpu_imad.cl @@ -28,7 +28,7 @@ #define AS_INPUT0_TYPE_4(x) AS_TYPE_N(INPUT0_TYPE, 4, x) __attribute__((intel_reqd_sub_group_size(SIMD_SIZE))) -KERNEL(fully_connected_gpu_IMAD)( +KERNEL(fully_connected_gpu_imad)( const __global INPUT0_TYPE* input, __global OUTPUT_TYPE* output, const __global FILTER_TYPE* weights @@ -81,7 +81,7 @@ KERNEL(fully_connected_gpu_IMAD)( const uint bias_index = f; #endif float dequantized = (float)dotProd + biases[bias_index]; -#elif +#else float dequantized = (float)dotProd; #endif diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/lstm_elt_gpu_bfyx_ref.cl b/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/lstm_elt_gpu_bfyx_ref.cl index 682b83a4138575..b888c218b5479d 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/lstm_elt_gpu_bfyx_ref.cl +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/cl_kernels/lstm_elt_gpu_bfyx_ref.cl @@ -1,4 +1,4 @@ -// Copyright (c) 2016-2017 Intel Corporation +// Copyright (c) 2016-2020 Intel Corporation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -15,9 +15,6 @@ #include "include/include_all.cl" -#define ACTIVATION_LOGISTIC(input) (UNIT_VAL_ONE/(UNIT_VAL_ONE + exp(-input))) -#define ACTIVATION_HYPERBOLIC_TAN(input) (tanh(input)) - // tempGEMM = [ batch, 1, direction, 4 * hidden_size ] // cell = [ batch, 1, direction, hidden_size ] optional // output = [ batch, 1, direction, hidden_size ] output @@ -32,14 +29,15 @@ KERNEL(lstm_elt)( const uint x = get_global_id(0); const uint b = get_global_id(1); - ACCUMULATOR_TYPE it = input[GET_DATA_INDEX(INPUT0, b, 0, 0, x + GEMM_OFFSET_I)]; - ACCUMULATOR_TYPE ot = input[GET_DATA_INDEX(INPUT0, b, 0, 0, x + GEMM_OFFSET_O)]; // pass constant offsets here - ACCUMULATOR_TYPE zt = input[GET_DATA_INDEX(INPUT0, b, 0, 0, x + GEMM_OFFSET_Z)]; + ACCUMULATOR_TYPE it = input[INPUT0_GET_INDEX(b, 0, 0, x + GEMM_OFFSET_I)]; + ACCUMULATOR_TYPE ot = input[INPUT0_GET_INDEX(b, 0, 0, x + GEMM_OFFSET_O)]; // pass constant offsets here + ACCUMULATOR_TYPE zt = input[INPUT0_GET_INDEX(b, 0, 0, x + GEMM_OFFSET_Z)]; - ACCUMULATOR_TYPE val = ACTIVATION_LOGISTIC(CLIP(it)) * ACTIVATION_HYPERBOLIC_TAN(CLIP(zt)); + ACCUMULATOR_TYPE val = ACTIVATION_F(ACTIVATION_CLIP(it, ACTIVATION_PARAMS_CLIP), ACTIVATION_PARAMS_F) * + ACTIVATION_G(ACTIVATION_CLIP(zt, ACTIVATION_PARAMS_CLIP), ACTIVATION_PARAMS_G); #if CELL_TERM || INPUT_FORGET - ACCUMULATOR_TYPE ft = input[GET_DATA_INDEX(INPUT0, b, 0, 0, x + GEMM_OFFSET_F)]; + ACCUMULATOR_TYPE ft = input[INPUT0_GET_INDEX(b, 0, 0, x + GEMM_OFFSET_F)]; #endif #if INPUT_FORGET @@ -47,9 +45,11 @@ KERNEL(lstm_elt)( #endif #if CELL_TERM - val += cell[GET_DATA_INDEX(CELL, b, 0, CELL_DIRECTION, x)] * ACTIVATION_LOGISTIC(CLIP(ft)); + val += cell[CELL_GET_INDEX(b, 0, CELL_DIRECTION, x)] * ACTIVATION_F(ACTIVATION_CLIP(ft, ACTIVATION_PARAMS_CLIP), ACTIVATION_PARAMS_F); #endif - - output[GET_DATA_INDEX(OUTPUT, b, 0, 0, x)] = (OUTPUT_TYPE)(ACTIVATION_HYPERBOLIC_TAN(val) * ACTIVATION_LOGISTIC(ot)); // hidden - output[GET_DATA_INDEX(OUTPUT, b, 1, 0, x)] = (OUTPUT_TYPE)val; // cell -} \ No newline at end of file + // hidden + output[OUTPUT_GET_INDEX(b, 0, 0, x)] = (OUTPUT_TYPE)(ACTIVATION_H(val, ACTIVATION_PARAMS_H) * + ACTIVATION_F(ACTIVATION_CLIP(ot, ACTIVATION_PARAMS_CLIP), ACTIVATION_PARAMS_F)); + // cell + output[OUTPUT_GET_INDEX(b, 1, 0, x)] = (OUTPUT_TYPE)val; +} diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/common/jitter.cpp b/inference-engine/thirdparty/clDNN/kernel_selector/core/common/jitter.cpp index bad98967e4fb35..50169e9bdbe22d 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/common/jitter.cpp +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/common/jitter.cpp @@ -1058,9 +1058,10 @@ JitConstants MakeActivationJitConstants(ActivationFunction activation_function, break; } case ActivationFunction::SWISH: { + auto beta = disable_type_conversion ? "m"_jit : to_type("m"_jit); jitConstants.AddConstant(MakeJitConstant( macro_def, - (input / (one + exp(neg(input)))).str())); + (input / (one + exp(neg(beta * input)))).str())); break; } case ActivationFunction::HSWISH: { diff --git a/inference-engine/thirdparty/clDNN/src/eltwise.cpp b/inference-engine/thirdparty/clDNN/src/eltwise.cpp index 9101ddf330aa33..3b0a46cecec0f2 100644 --- a/inference-engine/thirdparty/clDNN/src/eltwise.cpp +++ b/inference-engine/thirdparty/clDNN/src/eltwise.cpp @@ -63,6 +63,8 @@ layout eltwise_inst::calc_output_layout(eltwise_node const& node) { eltwise_mode::le, eltwise_mode::gt, eltwise_mode::ge, + eltwise_mode::squared_diff, + eltwise_mode::floor_mod, eltwise_mode::logic_and, eltwise_mode::logic_or, eltwise_mode::logic_xor}; diff --git a/inference-engine/thirdparty/clDNN/src/fully_connected.cpp b/inference-engine/thirdparty/clDNN/src/fully_connected.cpp index 13c4cbdb6c7e42..47a765a3b02759 100644 --- a/inference-engine/thirdparty/clDNN/src/fully_connected.cpp +++ b/inference-engine/thirdparty/clDNN/src/fully_connected.cpp @@ -65,10 +65,13 @@ format::type get_preferred_format(const fully_connected_node& node) { return format::yxfb; bool no_spatial_padding = true; - for (auto pad : input_layout.data_padding.lower_size().spatial) - no_spatial_padding &= pad == 0; - for (auto pad : input_layout.data_padding.upper_size().spatial) - no_spatial_padding &= pad == 0; + // C++ 11 range loop shouldn't be used here because of incorrect iterator functionality in mutable_array_ref<> + for (size_t i = 0; i < input_layout.data_padding.lower_size().spatial.size(); ++i) { + no_spatial_padding &= (input_layout.data_padding.lower_size().spatial[i] == 0); + } + for (size_t i = 0; i < input_layout.data_padding.upper_size().spatial.size(); ++i) { + no_spatial_padding &= (input_layout.data_padding.upper_size().spatial[i] == 0); + } if (input_layout.data_type == data_types::f32 && input_layout.format == format::bfyx && diff --git a/inference-engine/thirdparty/clDNN/src/gpu/cpu_impl_helpers.hpp b/inference-engine/thirdparty/clDNN/src/gpu/cpu_impl_helpers.hpp index 229c27ce328721..8bb3376934d9fa 100644 --- a/inference-engine/thirdparty/clDNN/src/gpu/cpu_impl_helpers.hpp +++ b/inference-engine/thirdparty/clDNN/src/gpu/cpu_impl_helpers.hpp @@ -38,7 +38,7 @@ struct bounding_box { bounding_box() : bounding_box(0, 0, 0, 0) {} bounding_box(float centerx, float centery, float width, float height, center_point_construct_tag) - : bounding_box(centerx - width / 2, centery - height / 2, centerx + width / 2, centery + width / 2) {} + : bounding_box(centerx - width / 2, centery - height / 2, centerx + width / 2, centery + height / 2) {} bounding_box(float ax, float ay, float bx, float by, two_corners_construct_tag) : bounding_box(std::min(ax, bx), std::min(ay, by), std::max(ax, bx), std::max(ay, by)) {} diff --git a/inference-engine/thirdparty/clDNN/src/gpu/kernels_cache.cpp b/inference-engine/thirdparty/clDNN/src/gpu/kernels_cache.cpp index 5e210e29563fc5..67d4c30e482f9c 100644 --- a/inference-engine/thirdparty/clDNN/src/gpu/kernels_cache.cpp +++ b/inference-engine/thirdparty/clDNN/src/gpu/kernels_cache.cpp @@ -405,8 +405,11 @@ kernels_cache::kernels_map kernels_cache::build_program(const program_code& prog } } - if (!err_log.empty()) - throw std::runtime_error("Program build failed:\n" + std::move(err_log)); + if (!err_log.empty()) { + static const size_t max_msg_length = 128; + std::string short_err_log = err_log.erase(max_msg_length); + throw std::runtime_error("Program build failed:\n" + std::move(short_err_log)); + } return kmap; } catch (const cl::Error& err) { diff --git a/inference-engine/thirdparty/clDNN/src/gpu/lstm_elt_gpu.cpp b/inference-engine/thirdparty/clDNN/src/gpu/lstm_elt_gpu.cpp index aee130a682ffd8..23170ab224e079 100644 --- a/inference-engine/thirdparty/clDNN/src/gpu/lstm_elt_gpu.cpp +++ b/inference-engine/thirdparty/clDNN/src/gpu/lstm_elt_gpu.cpp @@ -1,5 +1,5 @@ /* -// Copyright (c) 2016 Intel Corporation +// Copyright (c) 2016-2020 Intel Corporation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -58,6 +58,29 @@ struct lstm_elt_gpu : typed_primitive_gpu_impl { } } + const auto& prim = arg.get_primitive(); + if (!prim->activations.empty()) { + auto a_sz = prim->activations.size(); + auto param_sz = prim->activation_params.size(); + if (param_sz) { + CLDNN_ERROR_NOT_EQUAL(arg.id(), + "number of activations", + a_sz, + "number of activation parameters", + param_sz, + "activations/parameters num mismatch"); + } + for (size_t i = 0; i < a_sz; i++) { + lstm_elt_params.activations.emplace_back(get_kernel_selector_activation_param(prim->activations[i]), + param_sz ? prim->activation_params[i].a : 0.0f, + param_sz ? prim->activation_params[i].b : 0.0f); + } + } + + if (prim->clip > 0.0f) { + lstm_elt_params.activations.emplace_back(get_kernel_selector_activation_param(activation_func::clamp), -prim->clip, prim->clip); + } + lstm_elt_params.SetOffsetOrder(static_cast(arg.offset_order())); lstm_elt_params.clip = arg.clip(); lstm_elt_params.input_forget = arg.input_forget(); diff --git a/inference-engine/thirdparty/clDNN/src/gpu/non_max_suppression_cpu.cpp b/inference-engine/thirdparty/clDNN/src/gpu/non_max_suppression_cpu.cpp index c375bd948f249f..a803900401ee45 100644 --- a/inference-engine/thirdparty/clDNN/src/gpu/non_max_suppression_cpu.cpp +++ b/inference-engine/thirdparty/clDNN/src/gpu/non_max_suppression_cpu.cpp @@ -1,5 +1,5 @@ /* -// Copyright (c) 2019 Intel Corporation +// Copyright (c) 2019-2020 Intel Corporation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ #include "cpu_impl_helpers.hpp" #include +#include #include #include #include @@ -37,53 +38,86 @@ struct result_indices { int box_index; }; +struct boxInfo { + float score; + int idx; + int suppress_begin_index; +}; + std::vector run_nms( const vector2D& boxes, const vector3D& scores, int num_select_per_class, float score_threshold, - float iou_threshold + float iou_threshold, + float soft_nms_sigma, + bool sort_result_descending ) { + auto less = [](const boxInfo& l, const boxInfo& r) { + return l.score < r.score || ((l.score == r.score) && (l.idx > r.idx)); + }; + float scale = 0.0f; + if (soft_nms_sigma > 0.0f) { + scale = -0.5f / soft_nms_sigma; + } + auto coeff = [&](float iou) { + const float weight = std::exp(scale * iou * iou); + return iou <= iou_threshold ? weight : 0.0f; + }; std::vector result; for (size_t bi = 0; bi < boxes.size(); ++bi) { for (size_t ci = 0; ci < scores[bi].size(); ++ci) { - std::vector> score_box; + std::vector fb; + + std::priority_queue, decltype(less)> sorted_boxes(less); for (size_t bbi = 0; bbi < boxes[bi].size(); ++bbi) { if (scores[bi][ci][bbi] > score_threshold) - score_box.emplace_back(scores[bi][ci][bbi], static_cast(bbi)); + sorted_boxes.emplace(boxInfo({scores[bi][ci][bbi], static_cast(bbi), 0})); } + fb.reserve(sorted_boxes.size()); - std::sort(score_box.begin(), score_box.end(), [](const std::pair& a, const std::pair& b) {return a.first > b.first; }); + while (static_cast(fb.size()) < num_select_per_class && !sorted_boxes.empty()) { + boxInfo currBox = sorted_boxes.top(); + float origScore = currBox.score; + sorted_boxes.pop(); - size_t selected_number = 0; - for (size_t i = 0; i < score_box.size(); ++i) { - bool keep = true; - auto box1_index = score_box[i].second; - auto& box1 = boxes[bi][box1_index]; - for (size_t j = 0; j < selected_number; ++j) { - auto box2_index = score_box[j].second; - auto& box2 = boxes[bi][box2_index]; + bool box_is_selected = true; + for (int idx = static_cast(fb.size()) - 1; idx >= currBox.suppress_begin_index; idx--) { + float iou_boxes = iou(boxes[bi][currBox.idx], boxes[bi][fb[idx].box_index]); - if (iou(box1, box2) > iou_threshold) { - keep = false; + currBox.score *= coeff(iou_boxes); + if (iou_boxes >= iou_threshold) { + box_is_selected = false; break; } - } - if (keep) { - score_box[selected_number] = score_box[i]; - selected_number += 1; - result.push_back(result_indices{ score_box[i].first, static_cast(bi), static_cast(ci), score_box[i].second }); - - if (num_select_per_class == static_cast(selected_number)) + if (currBox.score <= score_threshold) break; } + currBox.suppress_begin_index = static_cast(fb.size()); + if (box_is_selected) { + if (currBox.score == origScore) { + fb.push_back(result_indices{ currBox.score, static_cast(bi), static_cast(ci), currBox.idx }); + continue; + } + if (currBox.score > score_threshold) { + sorted_boxes.push(currBox); + } + } } + std::move(fb.begin(), fb.end(), std::back_inserter(result)); } } - std::sort(result.begin(), result.end(), [](const result_indices& a, const result_indices& b) {return a.score > b.score; }); - + if (sort_result_descending) { + std::sort(result.begin(), result.end(), + [](const result_indices& l, const result_indices& r) { + return (l.score > r.score) || + (l.score == r.score && l.batch_index < r.batch_index) || + (l.score == r.score && l.batch_index == r.batch_index && l.class_index < r.class_index) || + (l.score == r.score && l.batch_index == r.batch_index && l.class_index == r.class_index && l.box_index < r.box_index); + }); + } return result; } @@ -111,10 +145,10 @@ vector2D load_boxes_impl(memory_impl& mem, bool center_point) { bounding_box::center_point_construct_tag()); } else { result[bi].emplace_back( - static_cast(ptr[offset + 0]), static_cast(ptr[offset + 1]), - static_cast(ptr[offset + 2]), + static_cast(ptr[offset + 0]), static_cast(ptr[offset + 3]), + static_cast(ptr[offset + 2]), bounding_box::two_corners_construct_tag()); } } @@ -235,15 +269,88 @@ void store_result(memory_impl& mem, const std::vector& result) { } } +void store_first_output(memory_impl& mem, const std::vector& result) { + auto data_type = mem.get_layout().data_type; + switch (data_type) { + case cldnn::data_types::i32: + store_result_impl::type>(mem, result); + break; + case cldnn::data_types::i64: + store_result_impl::type>(mem, result); + break; + default: + throw std::runtime_error("Non max supression - unsupported output data type"); + } +} + +template +void store_second_output_impl(memory_impl& mem, const std::vector& result) { + mem_lock lock(mem); + auto ptr = lock.data(); + + auto output_size = static_cast(mem.get_layout().size.batch[0]); + auto results_size = result.size(); + + size_t si = 0; + for (; si < std::min(output_size, results_size); ++si) { + auto offset = si * 3; + ptr[offset + 0] = static_cast(result[si].batch_index); + ptr[offset + 1] = static_cast(result[si].class_index); + ptr[offset + 2] = static_cast(result[si].score); + } + for (; si < output_size; ++si) { + auto offset = si * 3; + ptr[offset + 0] = static_cast(-1); + ptr[offset + 1] = static_cast(-1); + ptr[offset + 2] = static_cast(-1); + } +} + +void store_second_output(memory_impl& mem, const std::vector& result) { + auto data_type = mem.get_layout().data_type; + switch (data_type) { + case cldnn::data_types::f16: + store_second_output_impl::type>(mem, result); + break; + case cldnn::data_types::f32: + store_second_output_impl::type>(mem, result); + break; + default: + throw std::runtime_error("Non max supression - unsupported second output data type"); + } +} + +template +void store_third_output_impl(memory_impl& mem, const std::vector& result) { + mem_lock lock(mem); + auto ptr = lock.data(); + ptr[0] = static_cast(result.size()); +} + +void store_third_output(memory_impl& mem, const std::vector& result) { + auto data_type = mem.get_layout().data_type; + switch (data_type) { + case cldnn::data_types::i32: + store_third_output_impl::type>(mem, result); + break; + case cldnn::data_types::i64: + store_third_output_impl::type>(mem, result); + break; + default: + throw std::runtime_error("Non max supression - unsupported third output data type"); + } +} + void run(non_max_suppression_inst& instance) { auto prim = instance.node.get_primitive(); auto boxes = load_boxes(instance.input_boxes_mem(), prim->center_point_box); auto scores = load_scores(instance.input_scores_mem()); - int num_select_per_class = -1; + int num_select_per_class = 0; float iou_threshold = 1.f; float score_threshold = 0.f; + float soft_nms_sigma = 0.f; if (instance.has_num_select_per_class()) { num_select_per_class = load_scalar(instance.num_select_per_class_mem()); @@ -257,7 +364,21 @@ void run(non_max_suppression_inst& instance) { score_threshold = load_scalar(instance.score_threshold_mem()); } - auto result = run_nms(boxes, scores, num_select_per_class, score_threshold, iou_threshold); + if (instance.has_soft_nms_sigma()) { + soft_nms_sigma = load_scalar(instance.soft_nms_sigma_mem()); + } + + auto result = run_nms(boxes, scores, num_select_per_class, score_threshold, iou_threshold, soft_nms_sigma, prim->sort_result_descending); + + if (instance.has_third_output()) { + store_third_output(instance.third_output_mem(), result); + } + + if (instance.has_second_output()) { + store_second_output(instance.second_output_mem(), result); + store_first_output(instance.output_memory(), result); + return; + } store_result(instance.output_memory(), result); } diff --git a/inference-engine/thirdparty/clDNN/src/graph_optimizer/pre_replace_deconv.cpp b/inference-engine/thirdparty/clDNN/src/graph_optimizer/pre_replace_deconv.cpp index 0905572b53c5c9..fad8dcf00bdb48 100644 --- a/inference-engine/thirdparty/clDNN/src/graph_optimizer/pre_replace_deconv.cpp +++ b/inference-engine/thirdparty/clDNN/src/graph_optimizer/pre_replace_deconv.cpp @@ -58,9 +58,11 @@ void pre_replace_deconv::run(program_impl& p) { } // limit optimization to stride = 1 - bool unit_stride = std::all_of(deconv_prim->stride.spatial.begin(), - deconv_prim->stride.spatial.end(), - [](tensor::value_type v) { return v == 1; }); + // iterators shouldn't be used here because of incorrect iterator functionality in mutable_array_ref<> + bool unit_stride = true; + for (size_t i = 0; i < deconv_prim->stride.spatial.size(); ++i) { + unit_stride &= (deconv_prim->stride.spatial[i] == 1); + } if (unit_stride) { primitive_id deconv_id = node->id(); auto& input_node = node->get_dependency(0); diff --git a/inference-engine/thirdparty/clDNN/src/graph_optimizer/prepare_buffer_fusing.cpp b/inference-engine/thirdparty/clDNN/src/graph_optimizer/prepare_buffer_fusing.cpp index 8b465677a76caa..4299d1a5bfc4b7 100644 --- a/inference-engine/thirdparty/clDNN/src/graph_optimizer/prepare_buffer_fusing.cpp +++ b/inference-engine/thirdparty/clDNN/src/graph_optimizer/prepare_buffer_fusing.cpp @@ -146,7 +146,7 @@ bool concat_in_place_optimization::match(concatenation_node& node) { // todo: we need add padding support for all optimized kernels to remove this condition if (!input->is_type() && !input->is_type() && !input->is_type() && !input->is_type() && - !input->is_type() && !input->is_type() && !input->is_type() && + !input->is_type() && !input->is_type() && !input->is_type() && !input->is_type() && !input->is_type()) return false; diff --git a/inference-engine/thirdparty/clDNN/src/graph_optimizer/prepare_primitive_fusing.cpp b/inference-engine/thirdparty/clDNN/src/graph_optimizer/prepare_primitive_fusing.cpp index 85b6d03382fa57..ecc4c5d1a246c9 100644 --- a/inference-engine/thirdparty/clDNN/src/graph_optimizer/prepare_primitive_fusing.cpp +++ b/inference-engine/thirdparty/clDNN/src/graph_optimizer/prepare_primitive_fusing.cpp @@ -111,7 +111,8 @@ void prepare_primitive_fusing::fuse_sigmoid_mul_to_swish(program_impl &p) { if (&input != &sigmoid.input()) return; - auto swish_prim = std::make_shared(mul.id()+"_swish", input.id(), activation_func::swish); + activation_additional_params swish_params = {1.0f, 0.0f}; + auto swish_prim = std::make_shared(mul.id() + "_swish", input.id(), activation_func::swish, swish_params); auto& swish = p.get_or_create(swish_prim); p.add_optimized_primitive_info(node.id(), {swish.id()}); @@ -734,6 +735,7 @@ void prepare_primitive_fusing::fuse_simple_primitives(program_impl &p) { (parents[i]->is_type()) || (parents[i]->is_type() && eltwise_supports_fusings(parents[i]->as())) || (parents[i]->is_type()) || + (parents[i]->is_type() && pooling_supports_fusings(parents[i]->as())) || (parents[i]->is_type() && dts_supports_fusings(parents[i]->as())) || (parents[i]->is_type() && reduce_supports_fusings(parents[i]->as())); } diff --git a/inference-engine/thirdparty/clDNN/src/graph_optimizer/remove_redundant_reorders.cpp b/inference-engine/thirdparty/clDNN/src/graph_optimizer/remove_redundant_reorders.cpp index 530c37df9ff8e4..5eda0dd35864b8 100644 --- a/inference-engine/thirdparty/clDNN/src/graph_optimizer/remove_redundant_reorders.cpp +++ b/inference-engine/thirdparty/clDNN/src/graph_optimizer/remove_redundant_reorders.cpp @@ -24,6 +24,7 @@ #include #include "reshape_inst.h" +#include "one_hot_inst.h" using namespace cldnn; @@ -299,8 +300,9 @@ void remove_redundant_reorders::run(program_impl& p) { if (input.get_users().size() != 1 || node.get_users().empty()) continue; - auto same_data_type = input.get_output_layout().data_type == output_layout.data_type; - if (!same_data_type) + bool same_data_type = input.get_output_layout().data_type == output_layout.data_type; + bool allowed_dt_conversion_fuse = input.is_type(); + if (!same_data_type && !allowed_dt_conversion_fuse) continue; if (!lo.can_fuse_reorder_to_prev(input, *node.get_users().front(), input.get_output_layout().format, output_layout.format)) diff --git a/inference-engine/thirdparty/clDNN/src/include/non_max_suppression_inst.h b/inference-engine/thirdparty/clDNN/src/include/non_max_suppression_inst.h index 8fbda53a950199..150e48b616a653 100644 --- a/inference-engine/thirdparty/clDNN/src/include/non_max_suppression_inst.h +++ b/inference-engine/thirdparty/clDNN/src/include/non_max_suppression_inst.h @@ -1,5 +1,5 @@ /* -// Copyright (c) 2019 Intel Corporation +// Copyright (c) 2019-2020 Intel Corporation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -60,6 +60,36 @@ struct typed_program_node : public typed_program_node_base< offset += has_iou_threshold(); return get_dependency(offset); } + + bool has_soft_nms_sigma() const { return !get_primitive()->soft_nms_sigma.empty(); } + program_node& soft_nms_sigma_node() const { + size_t offset = 2; + offset += has_num_select_per_class(); + offset += has_iou_threshold(); + offset += has_score_threshold(); + return get_dependency(offset); + } + + bool has_second_output() const { return !get_primitive()->second_output.empty(); } + program_node& second_output_node() const { + size_t offset = 2; + offset += has_num_select_per_class(); + offset += has_iou_threshold(); + offset += has_score_threshold(); + offset += has_soft_nms_sigma(); + return get_dependency(offset); + } + + bool has_third_output() const { return !get_primitive()->third_output.empty(); } + program_node& third_output_node() const { + size_t offset = 2; + offset += has_num_select_per_class(); + offset += has_iou_threshold(); + offset += has_score_threshold(); + offset += has_soft_nms_sigma(); + offset += has_second_output(); + return get_dependency(offset); + } }; using non_max_suppression_node = typed_program_node; @@ -103,6 +133,36 @@ class typed_primitive_inst : public typed_primitive_inst_ba offset += has_iou_threshold(); return dep_memory(offset); } + + bool has_soft_nms_sigma() const { return node.has_soft_nms_sigma(); } + memory_impl& soft_nms_sigma_mem() const { + size_t offset = 2; + offset += has_num_select_per_class(); + offset += has_iou_threshold(); + offset += has_score_threshold(); + return dep_memory(offset); + } + + bool has_second_output() const { return node.has_second_output(); } + memory_impl& second_output_mem() const { + size_t offset = 2; + offset += has_num_select_per_class(); + offset += has_iou_threshold(); + offset += has_score_threshold(); + offset += has_soft_nms_sigma(); + return dep_memory(offset); + } + + bool has_third_output() const { return node.has_third_output(); } + memory_impl& third_output_mem() const { + size_t offset = 2; + offset += has_num_select_per_class(); + offset += has_iou_threshold(); + offset += has_score_threshold(); + offset += has_soft_nms_sigma(); + offset += has_second_output(); + return dep_memory(offset); + } }; using non_max_suppression_inst = typed_primitive_inst; diff --git a/inference-engine/thirdparty/clDNN/src/layout_optimizer.cpp b/inference-engine/thirdparty/clDNN/src/layout_optimizer.cpp index 8285036935b23c..df6e39a5e8f971 100644 --- a/inference-engine/thirdparty/clDNN/src/layout_optimizer.cpp +++ b/inference-engine/thirdparty/clDNN/src/layout_optimizer.cpp @@ -28,6 +28,7 @@ #include "eltwise_inst.h" #include "pooling_inst.h" +#include "one_hot_inst.h" #include "permute_inst.h" #include "quantize_inst.h" #include "mvn_inst.h" @@ -226,13 +227,22 @@ bool layout_optimizer::can_fuse_reorder(program_node& prev, program_node& next, return false; } -bool layout_optimizer::can_fuse_reorder_to_prev(program_node& prev, program_node& /*next*/, format /*fmt_prev*/, format fmt_next) { +bool layout_optimizer::can_fuse_reorder_to_prev(program_node& prev, program_node& next, format fmt_prev, format fmt_next) { + auto dt_prev = prev.get_output_layout().data_type; + auto dt_next = next.get_output_layout().data_type; + if (prev.is_type()) return true; if (prev.is_type() && fmt_next == format::b_fs_yx_fsv16) return true; + if (prev.is_type() && + !data_type_traits::is_floating_point(dt_prev) && + data_type_traits::is_floating_point(dt_next) && + fmt_prev == fmt_next) + return true; + if (prev.is_type() && (fmt_next == format::b_fs_yx_fsv4 || fmt_next == format::b_fs_yx_fsv32 || fmt_next == format::b_fs_zyx_fsv32 || fmt_next == format::b_fs_yx_fsv16 || fmt_next == format::b_fs_zyx_fsv16 || fmt_next == format::bs_fs_yx_bsv16_fsv16)) @@ -365,7 +375,7 @@ bool layout_optimizer::convolution_b_fs_yx_fsv16_opt(layout const &input_layout, // Check for non-grouped or depthwise convolution if (input_layout.format.dimension() == 4 && ((ks_x == 7 && ks_y == 7) || (ks_x == 3 && ks_y == 3) || (ks_x == 1 && ks_y == 1) || (ks_x == 5 && ks_y == 5)) && - weights_layout.size.batch[0] >= 16 && + weights_layout.size.batch[0] * weights_layout.size.group[0] >= 16 && ((conv->groups == 1 && conv->split() == 1) || conv->groups == static_cast(input_layout.size.feature[0]) || conv->split() == static_cast(input_layout.size.feature[0]))) @@ -545,6 +555,33 @@ bool layout_optimizer::deconvolution_b_fs_yx_fsv16_opt(layout const &input_layou return false; } +// This function is needed to avoid performance regressions for the convolutions with byxf layout +// Previously some topologies had scale operations which prevented byxf usage +// Now instead of scale we have eltwise + fused_ops which might enable byxf convolution in unexpected cases +// So here we check that given eltwise node is replacement of the old scale primitive +// TODO: Adjust byxf convolution selection logic +static bool is_scale_shift(const eltwise_node& node) { + if (node.get_dependencies().size() != 2) + return false; + + if (node.get_primitive()->mode != eltwise_mode::prod) + return false; + + if (node.get_fused_primitives().empty()) + return false; + + auto fused_op0 = node.get_fused_primitives().front(); + auto fused_op0_node = fused_op0.node; + + if (!fused_op0_node->is_type()) + return false; + + if (fused_op0_node->as().get_primitive()->mode != eltwise_mode::sum) + return false; + + return true; +} + bool layout_optimizer::users_for_convolution_byxf_opt(program_node const& node, uint32_t depth) { // This function checks if byxf optimization can be applied to the required depth of node's users. // Setting depth to 1 will check only node's users, depth = 2 are user's users etc. @@ -553,7 +590,7 @@ bool layout_optimizer::users_for_convolution_byxf_opt(program_node const& node, for (auto& user : node.get_users()) { // primitives that support transitions byxf->other format and other format->byxf are valid for byxf opt - if (user->type() == cldnn::eltwise::type_id() || user->type() == cldnn::pooling::type_id()) { + if ((user->type() == cldnn::eltwise::type_id() && !is_scale_shift(user->as())) || user->type() == cldnn::pooling::type_id()) { if (!users_for_convolution_byxf_opt(*user, depth - 1)) return false; // convolution that is capable to use byxf and is performant is also valid for byxf opt @@ -593,7 +630,7 @@ bool layout_optimizer::deps_for_convolution_byxf_opt(program_node const& node, u conv_dep)) { return false; } - } else if (!dep->is_type() && !dep->is_type()) { + } else if (!dep->is_type() && (!dep->is_type() || !is_scale_shift(dep->as()))) { return false; } diff --git a/inference-engine/thirdparty/clDNN/src/program.cpp b/inference-engine/thirdparty/clDNN/src/program.cpp index 2ee74903070b42..7718e655ef7796 100644 --- a/inference-engine/thirdparty/clDNN/src/program.cpp +++ b/inference-engine/thirdparty/clDNN/src/program.cpp @@ -569,7 +569,7 @@ void program_impl::add_split_outputs() { primitive_id input_id = split_prim->input[0]; auto split_num = split_prim->output_offsets.size(); - // create crop for each split ouptut provided + // create crop for each split output provided for (decltype(split_num) i = 0; i < split_num; i++) { primitive_id output_id = node->id() + ":" + split_prim->output_ids[i]; diff --git a/inference-engine/thirdparty/clDNN/tests/test_cases/activation_simple_gpu_test.cpp b/inference-engine/thirdparty/clDNN/tests/test_cases/activation_simple_gpu_test.cpp index 369984777a00c7..f407e10a81157e 100644 --- a/inference-engine/thirdparty/clDNN/tests/test_cases/activation_simple_gpu_test.cpp +++ b/inference-engine/thirdparty/clDNN/tests/test_cases/activation_simple_gpu_test.cpp @@ -782,7 +782,7 @@ TEST(activation_f32_fw_gpu, basic_yxfb_all_functions) EXPECT_FLOAT_EQ(-((float)input_ptr[i]), output_ptr[i]); break; case activation_func::swish: - EXPECT_FLOAT_EQ((float)input_ptr[i] / (1.f + std::exp((float)(-input_ptr[i]))), output_ptr[i]); + EXPECT_FLOAT_EQ((float)input_ptr[i] / (1.f + std::exp((float)(-params.a * input_ptr[i]))), output_ptr[i]); break; case activation_func::hswish: EXPECT_FLOAT_EQ((float)input_ptr[i] * std::fmin(std::fmax(0.f, (float)input_ptr[i] + 3.f), 6.f) / 6.f, output_ptr[i]); diff --git a/inference-engine/thirdparty/clDNN/tests/test_cases/fusings_gpu_test.cpp b/inference-engine/thirdparty/clDNN/tests/test_cases/fusings_gpu_test.cpp index aee13eed135c16..38663285776cc2 100644 --- a/inference-engine/thirdparty/clDNN/tests/test_cases/fusings_gpu_test.cpp +++ b/inference-engine/thirdparty/clDNN/tests/test_cases/fusings_gpu_test.cpp @@ -4980,6 +4980,20 @@ TEST_P(pooling_scale_activation, basic) { execute(p); } +TEST_P(pooling_scale_activation, eltwise_mul) { + auto p = GetParam(); + + create_topologies(input_layout("input", get_input_layout(p)), + data("scale_data", get_mem(get_per_channel_layout(p), 1.0f / tensor{1, 1, 4, 4}.count())), + pooling("pooling", "input", "", p.pool_mode, tensor(1, 1, 4, 4), tensor(1, 1, 2, 2)), + eltwise("scale", {"pooling", "scale_data"}, eltwise_mode::prod, p.default_type), + activation("activation", "scale", activation_func::relu), + reorder("output_reorder", "activation", p.default_format, data_types::f32)); + + tolerance = 1e-05f; + execute(p); +} + INSTANTIATE_TEST_CASE_P(fusings_gpu, pooling_scale_activation, ::testing::ValuesIn(std::vector{ diff --git a/inference-engine/thirdparty/clDNN/tests/test_cases/lstm_gpu_test.cpp b/inference-engine/thirdparty/clDNN/tests/test_cases/lstm_gpu_test.cpp index 6ae2ee736a1938..d2a99323bcd06c 100644 --- a/inference-engine/thirdparty/clDNN/tests/test_cases/lstm_gpu_test.cpp +++ b/inference-engine/thirdparty/clDNN/tests/test_cases/lstm_gpu_test.cpp @@ -1680,7 +1680,7 @@ TEST(lstm_gemm_gpu, gemv_bfyx_1x64_lstm_gemm_no_hidden_bias_f32) { } // LSTM ELT Tests -TEST(lstm_elt_gpu, generic_lstm_elt_test_clip_f32) { +TEST(DISABLED_lstm_elt_gpu, generic_lstm_elt_test_clip_f32) { generic_lstm_elt_gpu_test(1, 1, 4, 6, 3, true, 0.3f); } @@ -1688,7 +1688,7 @@ TEST(lstm_elt_gpu, generic_lstm_elt_test_input_forget_f32) { generic_lstm_elt_gpu_test(1, 1, 4, 6, 3, true, 0.f, 1); } -TEST(lstm_elt_gpu, generic_lstm_elt_test_clip_input_forget_f32) { +TEST(DISABLED_lstm_elt_gpu, generic_lstm_elt_test_clip_input_forget_f32) { generic_lstm_elt_gpu_test(1, 1, 4, 6, 3, true, 0.5f, 1); } @@ -1734,160 +1734,160 @@ TEST(lstm_custom_gpu, generic_lstm_custom_no_bias_hidden_cell_f32) { // generic_lstm_gpu_test paramters: // layers, sequence, dir, batch, input, hidden, bias, initial_h, initial_cell, threshold, coupled_input_forget -TEST(lstm_gpu, generic_lstm_f32) { +TEST(DISABLED_lstm_gpu, generic_lstm_f32) { generic_lstm_gpu_test(1, 7, 1, 3, 3, 2, true, true, true); } -TEST(lstm_gpu, generic_lstm_no_bias_f32) { +TEST(DISABLED_lstm_gpu, generic_lstm_no_bias_f32) { generic_lstm_gpu_test(1, 7, 1, 3, 3, 2, false, true, true); } -TEST(lstm_gpu, generic_lstm_no_hidden_f32) { +TEST(DISABLED_lstm_gpu, generic_lstm_no_hidden_f32) { generic_lstm_gpu_test(1, 7, 1, 5, 4, 3, true, false, true); } -TEST(lstm_gpu, generic_lstm_no_bias_hidden_f32) { +TEST(DISABLED_lstm_gpu, generic_lstm_no_bias_hidden_f32) { generic_lstm_gpu_test(1, 7, 1, 5, 4, 3, false, false, true); } -TEST(lstm_gpu, generic_lstm_no_cell_f32) { +TEST(DISABLED_lstm_gpu, generic_lstm_no_cell_f32) { generic_lstm_gpu_test(1, 7, 1, 5, 4, 3, true, true, false); } -TEST(lstm_gpu, generic_lstm_no_bias_cell_f32) { +TEST(DISABLED_lstm_gpu, generic_lstm_no_bias_cell_f32) { generic_lstm_gpu_test(1, 7, 1, 5, 4, 3, false, true, false); } -TEST(lstm_gpu, generic_lstm_no_hidden_cell_f32) { +TEST(DISABLED_lstm_gpu, generic_lstm_no_hidden_cell_f32) { generic_lstm_gpu_test(1, 7, 1, 5, 4, 3, true, false, false); } -TEST(lstm_gpu, generic_lstm_no_bias_hidden_cell_f32) { +TEST(DISABLED_lstm_gpu, generic_lstm_no_bias_hidden_cell_f32) { generic_lstm_gpu_test(1, 7, 1, 5, 4, 3, false, false, false); } -TEST(lstm_gpu, generic_lstm_clip_f32) { +TEST(DISABLED_lstm_gpu, generic_lstm_clip_f32) { generic_lstm_gpu_test(1, 7, 1, 3, 3, 2, true, true, true, 0.3f, 0); } -TEST(lstm_gpu, generic_lstm_input_forget_f32) { +TEST(DISABLED_lstm_gpu, generic_lstm_input_forget_f32) { generic_lstm_gpu_test(1, 7, 1, 3, 3, 2, true, true, true, 0.f, 1); } -TEST(lstm_gpu, generic_lstm_clip_input_forget_f32) { +TEST(DISABLED_lstm_gpu, generic_lstm_clip_input_forget_f32) { generic_lstm_gpu_test(1, 7, 1, 3, 3, 2, true, true, true, 0.3f, 1); } -TEST(lstm_gpu, generic_lstm_offset_order_ifoz_f32) { +TEST(DISABLED_lstm_gpu, generic_lstm_offset_order_ifoz_f32) { default_offset_type = lstm_weights_order::ifoz; generic_lstm_gpu_test(1, 7, 1, 3, 3, 2, true, true, true); default_offset_type = lstm_weights_order::iofz; } -TEST(lstm_gpu, generic_lstm_canonical_f32) { +TEST(DISABLED_lstm_gpu, generic_lstm_canonical_f32) { generic_lstm_gpu_test(1, 1, 1, 1, 1, 1, true, true, true); } // bidirectional support -TEST(lstm_gpu, generic_lstm_bi_f32) { +TEST(DISABLED_lstm_gpu, generic_lstm_bi_f32) { generic_lstm_gpu_test(1, 7, 2, 2, 3, 4, false, false, false); } -TEST(lstm_gpu, generic_lstm_bi_bias_f32) { +TEST(DISABLED_lstm_gpu, generic_lstm_bi_bias_f32) { generic_lstm_gpu_test(1, 7, 2, 2, 3, 4, true, false, false); } -TEST(lstm_gpu, generic_lstm_bi_bias_hidden_f32) { +TEST(DISABLED_lstm_gpu, generic_lstm_bi_bias_hidden_f32) { generic_lstm_gpu_test(1, 7, 2, 2, 3, 4, true, true, false); } -TEST(lstm_gpu, generic_lstm_bi_bias_hidden_cell_f32) { +TEST(DISABLED_lstm_gpu, generic_lstm_bi_bias_hidden_cell_f32) { generic_lstm_gpu_test(1, 7, 2, 2, 3, 4, true, true, true); } // multi-layer support -TEST(lstm_gpu, generic_lstm_stacked_no_seq_f32) { +TEST(DISABLED_lstm_gpu, generic_lstm_stacked_no_seq_f32) { generic_lstm_gpu_test(4, 1, 1, 3, 3, 2, true, true, true); } -TEST(lstm_gpu, generic_lstm_stacked_seq_f32) { +TEST(DISABLED_lstm_gpu, generic_lstm_stacked_seq_f32) { generic_lstm_gpu_test(4, 7, 1, 3, 3, 2, true, true, true); } -TEST(lstm_gpu, generic_lstm_stacked_bi_f32) { +TEST(DISABLED_lstm_gpu, generic_lstm_stacked_bi_f32) { generic_lstm_gpu_test(4, 7, 2, 3, 3, 2, true, true, true); } -TEST(lstm_gpu, generic_lstm_stacked_seq_bi_f32) { +TEST(DISABLED_lstm_gpu, generic_lstm_stacked_seq_bi_f32) { generic_lstm_gpu_test(4, 7, 2, 3, 3, 2, true, true, true); } // optional outputs support -TEST(lstm_gpu, output_test_sequence_f32) { +TEST(DISABLED_lstm_gpu, output_test_sequence_f32) { lstm_gpu_output_test(lstm_output_selection::sequence, 1); } -TEST(lstm_gpu, output_test_hidden_f32) { +TEST(DISABLED_lstm_gpu, output_test_hidden_f32) { lstm_gpu_output_test(lstm_output_selection::hidden, 1); } -TEST(lstm_gpu, output_test_hidden_cell_f32) { +TEST(DISABLED_lstm_gpu, output_test_hidden_cell_f32) { lstm_gpu_output_test(lstm_output_selection::hidden_cell, 1); } -TEST(lstm_gpu, output_test_sequence_cell_f32) { +TEST(DISABLED_lstm_gpu, output_test_sequence_cell_f32) { lstm_gpu_output_test(lstm_output_selection::sequence_cell, 1); } -TEST(lstm_gpu, output_test_sequence_bi_f32) { +TEST(DISABLED_lstm_gpu, output_test_sequence_bi_f32) { lstm_gpu_output_test(lstm_output_selection::sequence, 2); } -TEST(lstm_gpu, output_test_hidden_bi_f32) { +TEST(DISABLED_lstm_gpu, output_test_hidden_bi_f32) { lstm_gpu_output_test(lstm_output_selection::hidden, 2); } -TEST(lstm_gpu, output_test_hidden_cell_bi_f32) { +TEST(DISABLED_lstm_gpu, output_test_hidden_cell_bi_f32) { lstm_gpu_output_test(lstm_output_selection::hidden_cell, 2); } -TEST(lstm_gpu, output_test_sequence_cell_bi_f32) { +TEST(DISABLED_lstm_gpu, output_test_sequence_cell_bi_f32) { lstm_gpu_output_test(lstm_output_selection::sequence_cell, 2); } // format tests -TEST(lstm_gpu, lstm_gpu_format_bfyx_f32) { +TEST(DISABLED_lstm_gpu, lstm_gpu_format_bfyx_f32) { lstm_gpu_format_test(cldnn::format::bfyx, 1); } -TEST(lstm_gpu, lstm_gpu_format_bfyx_bi_f32) { +TEST(DISABLED_lstm_gpu, lstm_gpu_format_bfyx_bi_f32) { lstm_gpu_format_test(cldnn::format::bfyx, 2); } -TEST(lstm_gpu, lstm_gpu_format_fyxb_f32) { +TEST(DISABLED_lstm_gpu, lstm_gpu_format_fyxb_f32) { lstm_gpu_format_test(cldnn::format::fyxb, 1); } -TEST(lstm_gpu, lstm_gpu_format_fyxb_bi_f32) { +TEST(DISABLED_lstm_gpu, lstm_gpu_format_fyxb_bi_f32) { lstm_gpu_format_test(cldnn::format::fyxb, 2); } // test for LSTM users' dependencies -TEST(lstm_gpu, lstm_users_f32) { +TEST(DISABLED_lstm_gpu, lstm_users_f32) { lstm_gpu_users_test(); } // Test for LSTM with concatenated input -TEST(lstm_gpu, generic_lstm_concatenated_input) { +TEST(DISABLED_lstm_gpu, generic_lstm_concatenated_input) { lstm_gpu_concatenated_input_test(1, 2, 2, 1, 1, 1, true, true, true); } -TEST(lstm_gpu, generic_lstm_concatenated_input_multi_layer) { +TEST(DISABLED_lstm_gpu, generic_lstm_concatenated_input_multi_layer) { lstm_gpu_concatenated_input_test(5, 5, 2, 1, 1, 4, true, true, true); } // test for LSTM with chain and stack (multilayer) -TEST(lstm_gpu, generic_lstm_chained_unidirectional_f32) { +TEST(DISABLED_lstm_gpu, generic_lstm_chained_unidirectional_f32) { // batch size = 1 // input size = 2 // hidden size = 4 @@ -1899,7 +1899,7 @@ TEST(lstm_gpu, generic_lstm_chained_unidirectional_f32) { lstm_gpu_chain_test(1, 2, 4, 1, 1, 2, 1, lstm_output_selection::sequence_cell); } -TEST(lstm_gpu, generic_lstm_chained_bidirectional_f32) { +TEST(DISABLED_lstm_gpu, generic_lstm_chained_bidirectional_f32) { // batch size = 1 // input size = 2 // hidden size = 4 @@ -1911,7 +1911,7 @@ TEST(lstm_gpu, generic_lstm_chained_bidirectional_f32) { lstm_gpu_chain_test(1, 2, 4, 2, 1, 1, 1, lstm_output_selection::sequence_cell); } -TEST(lstm_gpu, generic_lstm_chained_no_stack_bidirectional_f32) { +TEST(DISABLED_lstm_gpu, generic_lstm_chained_no_stack_bidirectional_f32) { // batch size = 2 // input size = 2 // hidden size = 4 @@ -1923,7 +1923,7 @@ TEST(lstm_gpu, generic_lstm_chained_no_stack_bidirectional_f32) { lstm_gpu_chain_test(2, 2, 4, 2, 1, 2, 5, lstm_output_selection::sequence_cell); } -TEST(lstm_gpu, generic_lstm_chained_stacked_bidirectional_f32) { +TEST(DISABLED_lstm_gpu, generic_lstm_chained_stacked_bidirectional_f32) { // batch size = 2 // input size = 2 // hidden size = 4 @@ -1952,7 +1952,7 @@ TEST(lstm_gemm_gpu, generic_lstm_gemm_no_hidden_bias_f16) { generic_lstm_gemm_gpu_test(1, 1, 3, 6, 2, false, false); } -TEST(lstm_elt_gpu, generic_lstm_elt_test_clip_f16) { +TEST(DISABLED_lstm_elt_gpu, generic_lstm_elt_test_clip_f16) { generic_lstm_elt_gpu_test(1, 1, 4, 6, 3, true, 0.3f); } @@ -1960,7 +1960,7 @@ TEST(lstm_elt_gpu, generic_lstm_elt_test_input_forget_f16) { generic_lstm_elt_gpu_test(1, 1, 4, 6, 3, true, 0.f, 1); } -TEST(lstm_elt_gpu, generic_lstm_elt_test_clip_input_forget_f16) { +TEST(DISABLED_lstm_elt_gpu, generic_lstm_elt_test_clip_input_forget_f16) { generic_lstm_elt_gpu_test(1, 1, 4, 6, 3, true, 0.5f, 1); } @@ -1972,79 +1972,79 @@ TEST(lstm_elt_gpu, generic_lstm_elt_no_cell_f16) { generic_lstm_elt_gpu_test(1, 1, 4, 6, 3, false); } -TEST(lstm_gpu, generic_lstm_f16) { +TEST(DISABLED_lstm_gpu, generic_lstm_f16) { generic_lstm_gpu_test(1, 7, 1, 3, 3, 2, true, true, true); } -TEST(lstm_gpu, generic_lstm_no_bias_f16) { +TEST(DISABLED_lstm_gpu, generic_lstm_no_bias_f16) { generic_lstm_gpu_test(1, 7, 1, 3, 3, 2, false, true, true); } -TEST(lstm_gpu, generic_lstm_no_hidden_f16) { +TEST(DISABLED_lstm_gpu, generic_lstm_no_hidden_f16) { generic_lstm_gpu_test(1, 7, 1, 5, 4, 3, true, false, true); } -TEST(lstm_gpu, generic_lstm_no_bias_hidden_f16) { +TEST(DISABLED_lstm_gpu, generic_lstm_no_bias_hidden_f16) { generic_lstm_gpu_test(1, 7, 1, 5, 4, 3, false, false, true); } -TEST(lstm_gpu, generic_lstm_no_cell_f16) { +TEST(DISABLED_lstm_gpu, generic_lstm_no_cell_f16) { generic_lstm_gpu_test(1, 7, 1, 5, 4, 3, true, true, false); } -TEST(lstm_gpu, generic_lstm_no_bias_cell_f16) { +TEST(DISABLED_lstm_gpu, generic_lstm_no_bias_cell_f16) { generic_lstm_gpu_test(1, 7, 1, 5, 4, 3, false, true, false); } -TEST(lstm_gpu, generic_lstm_no_hidden_cell_f16) { +TEST(DISABLED_lstm_gpu, generic_lstm_no_hidden_cell_f16) { generic_lstm_gpu_test(1, 7, 1, 5, 4, 3, true, false, false); } -TEST(lstm_gpu, generic_lstm_no_bias_hidden_cell_f16) { +TEST(DISABLED_lstm_gpu, generic_lstm_no_bias_hidden_cell_f16) { generic_lstm_gpu_test(1, 7, 1, 5, 4, 3, false, false, false); } -TEST(lstm_gpu, generic_lstm_clip_f16) { +TEST(DISABLED_lstm_gpu, generic_lstm_clip_f16) { generic_lstm_gpu_test(1, 7, 1, 3, 3, 2, true, true, true, 0.3f, 0); } -TEST(lstm_gpu, generic_lstm_input_forget_f16) { +TEST(DISABLED_lstm_gpu, generic_lstm_input_forget_f16) { generic_lstm_gpu_test(1, 7, 1, 3, 3, 2, true, true, true, 0.f, 1); } -TEST(lstm_gpu, generic_lstm_clip_input_forget_f16) { +TEST(DISABLED_lstm_gpu, generic_lstm_clip_input_forget_f16) { generic_lstm_gpu_test(1, 7, 1, 3, 3, 2, true, true, true, 0.3f, 1); } -TEST(lstm_gpu, generic_lstm_offset_order_ifoz_f16) { +TEST(DISABLED_lstm_gpu, generic_lstm_offset_order_ifoz_f16) { default_offset_type = lstm_weights_order::ifoz; generic_lstm_gpu_test(1, 7, 1, 3, 3, 2, true, true, true); default_offset_type = lstm_weights_order::iofz; } -TEST(lstm_gpu, generic_lstm_canonical_f16) { +TEST(DISABLED_lstm_gpu, generic_lstm_canonical_f16) { generic_lstm_gpu_test(1, 1, 1, 1, 1, 1, true, true, true); } // bidirectional support -TEST(lstm_gpu, generic_lstm_bi_bias_f16) { +TEST(DISABLED_lstm_gpu, generic_lstm_bi_bias_f16) { generic_lstm_gpu_test(1, 7, 2, 2, 3, 4, true, false, false); } -TEST(lstm_gpu, generic_lstm_bi_bias_hidden_f16) { +TEST(DISABLED_lstm_gpu, generic_lstm_bi_bias_hidden_f16) { generic_lstm_gpu_test(1, 7, 2, 2, 3, 4, true, true, false); } -TEST(lstm_gpu, generic_lstm_bi_bias_hidden_cell_f16) { +TEST(DISABLED_lstm_gpu, generic_lstm_bi_bias_hidden_cell_f16) { generic_lstm_gpu_test(1, 7, 2, 2, 3, 4, true, true, true); } // multi-layer support -TEST(lstm_gpu, generic_lstm_stacked_seq_f16) { +TEST(DISABLED_lstm_gpu, generic_lstm_stacked_seq_f16) { generic_lstm_gpu_test(4, 7, 1, 3, 3, 2, true, true, true); } -TEST(lstm_gpu, generic_lstm_stacked_bi_f16) { +TEST(DISABLED_lstm_gpu, generic_lstm_stacked_bi_f16) { generic_lstm_gpu_test(4, 7, 2, 3, 3, 2, true, true, true); } @@ -2052,4 +2052,3 @@ TEST(lstm_gpu, generic_lstm_stacked_bi_f16) { // integration testing using multi-layer and chained LSTMs // LSTMs single input // optional activation list - diff --git a/inference-engine/thirdparty/clDNN/tests/test_cases/non_max_suppression_test.cpp b/inference-engine/thirdparty/clDNN/tests/test_cases/non_max_suppression_test.cpp index d73399c8576590..e1182378192c5d 100644 --- a/inference-engine/thirdparty/clDNN/tests/test_cases/non_max_suppression_test.cpp +++ b/inference-engine/thirdparty/clDNN/tests/test_cases/non_max_suppression_test.cpp @@ -1,5 +1,5 @@ /* -// Copyright (c) 2019 Intel Corporation +// Copyright (c) 2019-2020 Intel Corporation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -109,7 +109,7 @@ TYPED_TEST(non_max_suppression_basic, basic) { topology topo; topo.add(input_layout("boxes", this->boxes_layout)); topo.add(input_layout("scores", this->scores_layout)); - topo.add(non_max_suppression("nms", "boxes", "scores", 6, false)); + topo.add(non_max_suppression("nms", "boxes", "scores", 6, false, true)); build_options build_opts( build_option::optimize_data(true) @@ -125,12 +125,12 @@ TYPED_TEST(non_max_suppression_basic, basic) { auto result = net.execute(); std::vector expected_out = { - 0, 0, 2, - 0, 1, 0, - 1, 0, 2, - 0, 1, 2, - 0, 0, 1, - 1, 0, 1, + this->pad, this->pad, this->pad, + this->pad, this->pad, this->pad, + this->pad, this->pad, this->pad, + this->pad, this->pad, this->pad, + this->pad, this->pad, this->pad, + this->pad, this->pad, this->pad }; auto out_mem = result.at("nms").get_memory(); @@ -142,13 +142,17 @@ TYPED_TEST(non_max_suppression_basic, basic) { } } -TYPED_TEST(non_max_suppression_basic, basic_all) { +TYPED_TEST(non_max_suppression_basic, num_per_class) { auto engine = tests::get_test_engine(); + auto num_per_class_mem = memory::allocate(engine, layout(data_types::f32, format::bfyx, tensor(batch(1)))); + tests::set_values(num_per_class_mem, { 1.f }); + topology topo; topo.add(input_layout("boxes", this->boxes_layout)); topo.add(input_layout("scores", this->scores_layout)); - topo.add(non_max_suppression("nms", "boxes", "scores", 12, false)); + topo.add(data("num_per_class", num_per_class_mem)); + topo.add(non_max_suppression("nms", "boxes", "scores", 6, false, true, "num_per_class")); build_options build_opts( build_option::optimize_data(true) @@ -167,15 +171,9 @@ TYPED_TEST(non_max_suppression_basic, basic_all) { 0, 0, 2, 0, 1, 0, 1, 0, 2, - 0, 1, 2, - 0, 0, 1, - 1, 0, 1, - 0, 0, 0, 1, 1, 2, - 1, 0, 0, - 0, 1, 1, - 1, 1, 1, - 1, 1, 0 + this->pad, this->pad, this->pad, + this->pad, this->pad, this->pad, }; auto out_mem = result.at("nms").get_memory(); @@ -187,17 +185,20 @@ TYPED_TEST(non_max_suppression_basic, basic_all) { } } -TYPED_TEST(non_max_suppression_basic, num_per_class) { +TYPED_TEST(non_max_suppression_basic, iou_threshold) { auto engine = tests::get_test_engine(); auto num_per_class_mem = memory::allocate(engine, layout(data_types::f32, format::bfyx, tensor(batch(1)))); - tests::set_values(num_per_class_mem, { 1.f }); + tests::set_values(num_per_class_mem, { 3.f }); + auto iou_threshold_mem = memory::allocate(engine, layout(data_types::f32, format::bfyx, tensor(batch(1)))); + tests::set_values(iou_threshold_mem, { 0.4f }); topology topo; topo.add(input_layout("boxes", this->boxes_layout)); topo.add(input_layout("scores", this->scores_layout)); topo.add(data("num_per_class", num_per_class_mem)); - topo.add(non_max_suppression("nms", "boxes", "scores", 6, false, "num_per_class")); + topo.add(data("iou_threshold", iou_threshold_mem)); + topo.add(non_max_suppression("nms", "boxes", "scores", 6, false, true, "num_per_class", "iou_threshold")); build_options build_opts( build_option::optimize_data(true) @@ -216,9 +217,9 @@ TYPED_TEST(non_max_suppression_basic, num_per_class) { 0, 0, 2, 0, 1, 0, 1, 0, 2, - 1, 1, 2, - this->pad, this->pad, this->pad, - this->pad, this->pad, this->pad, + 0, 0, 1, + 1, 0, 1, + 1, 1, 2 }; auto out_mem = result.at("nms").get_memory(); @@ -230,20 +231,23 @@ TYPED_TEST(non_max_suppression_basic, num_per_class) { } } -TYPED_TEST(non_max_suppression_basic, iou_threshold) { +TYPED_TEST(non_max_suppression_basic, score_threshold) { auto engine = tests::get_test_engine(); auto num_per_class_mem = memory::allocate(engine, layout(data_types::f32, format::bfyx, tensor(batch(1)))); tests::set_values(num_per_class_mem, { 3.f }); auto iou_threshold_mem = memory::allocate(engine, layout(data_types::f32, format::bfyx, tensor(batch(1)))); tests::set_values(iou_threshold_mem, { 0.4f }); + auto score_threshold_mem = memory::allocate(engine, layout(data_types::f32, format::bfyx, tensor(batch(1)))); + tests::set_values(score_threshold_mem, { 0.4f }); topology topo; topo.add(input_layout("boxes", this->boxes_layout)); topo.add(input_layout("scores", this->scores_layout)); topo.add(data("num_per_class", num_per_class_mem)); topo.add(data("iou_threshold", iou_threshold_mem)); - topo.add(non_max_suppression("nms", "boxes", "scores", 6, false, "num_per_class", "iou_threshold")); + topo.add(data("score_threshold", score_threshold_mem)); + topo.add(non_max_suppression("nms", "boxes", "scores", 6, false, true, "num_per_class", "iou_threshold", "score_threshold")); build_options build_opts( build_option::optimize_data(true) @@ -264,7 +268,7 @@ TYPED_TEST(non_max_suppression_basic, iou_threshold) { 1, 0, 2, 0, 0, 1, 1, 0, 1, - 1, 1, 2 + this->pad, this->pad, this->pad, }; auto out_mem = result.at("nms").get_memory(); @@ -276,7 +280,7 @@ TYPED_TEST(non_max_suppression_basic, iou_threshold) { } } -TYPED_TEST(non_max_suppression_basic, score_threshold) { +TYPED_TEST(non_max_suppression_basic, soft_nms_sigma) { auto engine = tests::get_test_engine(); auto num_per_class_mem = memory::allocate(engine, layout(data_types::f32, format::bfyx, tensor(batch(1)))); @@ -285,6 +289,8 @@ TYPED_TEST(non_max_suppression_basic, score_threshold) { tests::set_values(iou_threshold_mem, { 0.4f }); auto score_threshold_mem = memory::allocate(engine, layout(data_types::f32, format::bfyx, tensor(batch(1)))); tests::set_values(score_threshold_mem, { 0.4f }); + auto soft_nms_sigma_mem = memory::allocate(engine, layout(data_types::f32, format::bfyx, tensor(batch(1)))); + tests::set_values(soft_nms_sigma_mem, { 0.5f }); topology topo; topo.add(input_layout("boxes", this->boxes_layout)); @@ -292,7 +298,8 @@ TYPED_TEST(non_max_suppression_basic, score_threshold) { topo.add(data("num_per_class", num_per_class_mem)); topo.add(data("iou_threshold", iou_threshold_mem)); topo.add(data("score_threshold", score_threshold_mem)); - topo.add(non_max_suppression("nms", "boxes", "scores", 6, false, "num_per_class", "iou_threshold", "score_threshold")); + topo.add(data("soft_nms_sigma", soft_nms_sigma_mem)); + topo.add(non_max_suppression("nms", "boxes", "scores", 6, false, true, "num_per_class", "iou_threshold", "score_threshold", "soft_nms_sigma")); build_options build_opts( build_option::optimize_data(true) @@ -313,7 +320,7 @@ TYPED_TEST(non_max_suppression_basic, score_threshold) { 1, 0, 2, 0, 0, 1, 1, 0, 1, - this->pad, this->pad, this->pad, + this->pad, this->pad, this->pad }; auto out_mem = result.at("nms").get_memory(); diff --git a/ngraph/core/src/op/prior_box.cpp b/ngraph/core/src/op/prior_box.cpp index 53fc78b51c1e6e..b1d70094c60f8b 100644 --- a/ngraph/core/src/op/prior_box.cpp +++ b/ngraph/core/src/op/prior_box.cpp @@ -194,11 +194,7 @@ bool op::v0::PriorBox::evaluate(const HostTensorVector& outputs, { NGRAPH_OP_SCOPE(v0_PriorBox_evaluate) { - // Todo (itikhono): enable the use of the reference implementation after - // supporting constants as - // outputs in plugins - // return evaluate_prior_box(inputs[0], inputs[1], outputs[0], get_attrs()); - return false; + return prior_box::evaluate_prior_box(inputs[0], inputs[1], outputs[0], get_attrs()); } return false; } diff --git a/ngraph/core/src/op/prior_box_clustered.cpp b/ngraph/core/src/op/prior_box_clustered.cpp index eb1eeb25519d95..0d74979fe323dd 100644 --- a/ngraph/core/src/op/prior_box_clustered.cpp +++ b/ngraph/core/src/op/prior_box_clustered.cpp @@ -167,11 +167,8 @@ bool op::v0::PriorBoxClustered::evaluate(const HostTensorVector& outputs, { NGRAPH_OP_SCOPE(v0_PriorBoxClustered_evaluate) { - // Todo (itikhono): enable the use of the reference implementation after - // supporting constants as - // outputs in plugins - // return evaluate_prior_box(inputs[0], inputs[1], outputs[0], get_attrs()); - return false; + return prior_box_clustered::evaluate_prior_box( + inputs[0], inputs[1], outputs[0], get_attrs()); } return false; } From a8022cdbc88d3fb1131f06b693fc1e146df8b1cb Mon Sep 17 00:00:00 2001 From: Mateusz Tabaka Date: Wed, 23 Dec 2020 12:25:54 +0100 Subject: [PATCH 127/244] Enable TinyYolo v3 in CI (#3651) --- ngraph/python/tests/__init__.py | 1 - .../python/tests/test_onnx/test_zoo_models.py | 20 +++++++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/ngraph/python/tests/__init__.py b/ngraph/python/tests/__init__.py index a76d0d3c7de1dc..4e3b2b7ffadaf6 100644 --- a/ngraph/python/tests/__init__.py +++ b/ngraph/python/tests/__init__.py @@ -208,7 +208,6 @@ def xfail_test(reason="Mark the test as expected to fail", strict=True): xfail_issue_39662 = xfail_test(reason="RuntimeError: 'ScatterElementsUpdate' layer with name 'y' have " "indices value that points to non-existing output tensor element") xfail_issue_39663 = xfail_test(reason="RuntimeError: Unsupported primitive of type: ROIAlign name: Y") -xfail_issue_43380 = xfail_test(reason="RuntimeError: Sorting not possible, due to existed loop") xfail_issue_41894 = xfail_test(reason="CPU plugin elementwise computation missmatch") diff --git a/ngraph/python/tests/test_onnx/test_zoo_models.py b/ngraph/python/tests/test_onnx/test_zoo_models.py index c4667d28a0edd5..d4a2b0de0c1e2e 100644 --- a/ngraph/python/tests/test_onnx/test_zoo_models.py +++ b/ngraph/python/tests/test_onnx/test_zoo_models.py @@ -28,7 +28,6 @@ from tests import ( xfail_issue_38701, xfail_issue_43742, - xfail_issue_43380, xfail_issue_45457, xfail_issue_40957, xfail_issue_37957, @@ -52,8 +51,18 @@ def yolov3_post_processing(outputs : Sequence[Any]) -> Sequence[Any]: outputs[concat_out_index] = concat_out return outputs +def tinyyolov3_post_processing(outputs : Sequence[Any]) -> Sequence[Any]: + concat_out_index = 2 + # remove all elements with value -1 from yolonms_layer_1:1 output + concat_out = outputs[concat_out_index][outputs[concat_out_index] != -1] + concat_out = concat_out.reshape((outputs[concat_out_index].shape[0], -1, 3)) + outputs[concat_out_index] = concat_out + return outputs + post_processing = { - "yolov3" : {"post_processing" : yolov3_post_processing} + "yolov3" : {"post_processing" : yolov3_post_processing}, + "tinyyolov3" : {"post_processing" : tinyyolov3_post_processing}, + "tiny-yolov3-11": {"post_processing": tinyyolov3_post_processing}, } tolerance_map = { @@ -114,6 +123,8 @@ def yolov3_post_processing(outputs : Sequence[Any]) -> Sequence[Any]: "test_mobilenetv2-1": {"atol": 1e-04, "rtol": 0.001}, "yolov3": {"atol": 0.001, "rtol": 0.001}, "yolov4": {"atol": 1e-04, "rtol": 0.001}, + "tinyyolov3": {"atol": 1e-04, "rtol": 0.001}, + "tiny-yolov3-11": {"atol": 1e-04, "rtol": 0.001}, } zoo_models = [] @@ -173,8 +184,6 @@ def yolov3_post_processing(outputs : Sequence[Any]) -> Sequence[Any]: (xfail_issue_39669, "test_onnx_model_zoo_text_machine_comprehension_t5_model_t5_encoder_12_t5_encoder_cpu"), (xfail_issue_38084, "test_onnx_model_zoo_vision_object_detection_segmentation_mask_rcnn_model_MaskRCNN_10_mask_rcnn_R_50_FPN_1x_cpu"), (xfail_issue_38084, "test_onnx_model_zoo_vision_object_detection_segmentation_faster_rcnn_model_FasterRCNN_10_faster_rcnn_R_50_FPN_1x_cpu"), - (xfail_issue_43380, "test_onnx_model_zoo_vision_object_detection_segmentation_tiny_yolov3_model_tiny_yolov3_11_yolov3_tiny_cpu"), - (xfail_issue_45457, "test_MSFT_opset10_mlperf_ssd_resnet34_1200_ssd_resnet34_mAP_20.2_cpu"), # Model MSFT (xfail_issue_37973, "test_MSFT_opset7_tf_inception_v2_model_cpu"), @@ -191,8 +200,7 @@ def yolov3_post_processing(outputs : Sequence[Any]) -> Sequence[Any]: (xfail_issue_39669, "test_MSFT_opset9_cgan_cgan_cpu"), (xfail_issue_40957, "test_MSFT_opset10_BERT_Squad_bertsquad10_cpu"), - - (xfail_issue_43380, "test_MSFT_opset11_tinyyolov3_yolov3_tiny_cpu") + (xfail_issue_45457, "test_MSFT_opset10_mlperf_ssd_resnet34_1200_ssd_resnet34_mAP_20.2_cpu"), ] for test_case in import_xfail_list + execution_xfail_list: From 8806cd3d644dcb5644ac5b3e308b69943812e115 Mon Sep 17 00:00:00 2001 From: Piotr Szmelczynski Date: Wed, 23 Dec 2020 14:10:29 +0100 Subject: [PATCH 128/244] Abs revise (#3601) * create type_prop tests * add abs type_prop tests to CMakeList * add type prop test for dynamic input shape * fix style --- ngraph/test/CMakeLists.txt | 1 + ngraph/test/type_prop/abs.cpp | 64 +++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 ngraph/test/type_prop/abs.cpp diff --git a/ngraph/test/CMakeLists.txt b/ngraph/test/CMakeLists.txt index 266d9ea3fc12be..f04d7b4196e3ac 100644 --- a/ngraph/test/CMakeLists.txt +++ b/ngraph/test/CMakeLists.txt @@ -100,6 +100,7 @@ set(SRC shape.cpp specialize_function.cpp tensor.cpp + type_prop/abs.cpp type_prop/assign.cpp type_prop/avg_pool.cpp type_prop/batch_norm.cpp diff --git a/ngraph/test/type_prop/abs.cpp b/ngraph/test/type_prop/abs.cpp new file mode 100644 index 00000000000000..f49ff0e270fb8d --- /dev/null +++ b/ngraph/test/type_prop/abs.cpp @@ -0,0 +1,64 @@ +//***************************************************************************** +// Copyright 2017-2020 Intel Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//***************************************************************************** + +#include "gtest/gtest.h" +#include "ngraph/ngraph.hpp" + +using namespace std; +using namespace ngraph; + +TEST(type_prop, abs_basic_shape_inference) +{ + Shape data_shape{2, 2}; + const auto param = make_shared(element::f32, data_shape); + const auto op = make_shared(param); + ASSERT_EQ(op->get_shape(), (data_shape)); + ASSERT_EQ(op->get_element_type(), element::f32); +} + +TEST(type_prop, abs_incompatible_input_type) +{ + Shape data_shape{3, 3}; + const auto param = make_shared(element::boolean, data_shape); + ASSERT_THROW(make_shared(param), ngraph::NodeValidationFailure); +} + +TEST(type_prop, abs_dynamic_shape_2D) +{ + const PartialShape data_shape{Dimension::dynamic(), 2}; + const auto param = make_shared(element::f32, data_shape); + const auto op = make_shared(param); + ASSERT_TRUE(op->get_output_partial_shape(0).same_scheme({Dimension::dynamic(), 2})); + ASSERT_EQ(op->get_element_type(), element::f32); +} + +TEST(type_prop, abs_dynamic_shape_3D) +{ + const PartialShape data_shape{Dimension::dynamic(), Dimension::dynamic(), 3}; + const auto param = make_shared(element::f32, data_shape); + const auto op = make_shared(param); + ASSERT_TRUE(op->get_output_partial_shape(0).same_scheme( + {Dimension::dynamic(), Dimension::dynamic(), 3})); + ASSERT_EQ(op->get_element_type(), element::f32); +} + +TEST(type_prop, abs_dynamic_ok) +{ + const auto param = make_shared(element::f32, PartialShape::dynamic()); + auto ap = make_shared(param); + ASSERT_EQ(ap->get_output_element_type(0), element::f32); + ASSERT_TRUE(ap->get_output_partial_shape(0).same_scheme(PartialShape::dynamic())); +} From 2bc18c27aa40238334ccd76bd7da3512998567ed Mon Sep 17 00:00:00 2001 From: Patryk Elszkowski Date: Wed, 23 Dec 2020 14:14:26 +0100 Subject: [PATCH 129/244] Constant attr to visitor (#3540) * Add new path for constant in IR serializer. * Apply suggestion from review. * Unique name for temporary test file * Switch from static to constant member function - GetTestName * Ensure bin path is not empty. * Compare Constants op by string values converted to float. * Add path validation. Co-authored-by: Patryk Elszkowski --- .../include/transformations/serialize.hpp | 3 +- .../src/transformations/serialize.cpp | 189 +++++++++++------- .../ir_serialization/custom_ops.cpp | 6 +- .../ir_serialization/serialize.cpp | 24 +-- .../base/layer_test_utils.hpp | 2 - .../src/base/layer_test_utils.cpp | 14 -- .../common_test_utils/ngraph_test_utils.cpp | 39 ++-- .../common_test_utils/ngraph_test_utils.hpp | 2 - .../common_test_utils/test_common.cpp | 21 +- .../common_test_utils/test_common.hpp | 6 + ngraph/core/include/ngraph/function.hpp | 2 +- ngraph/core/include/ngraph/op/constant.hpp | 15 +- ngraph/core/src/function.cpp | 2 +- ngraph/core/src/op/constant.cpp | 5 +- 14 files changed, 186 insertions(+), 144 deletions(-) diff --git a/inference-engine/src/transformations/include/transformations/serialize.hpp b/inference-engine/src/transformations/include/transformations/serialize.hpp index e400e975399580..45f855a7dcc45a 100644 --- a/inference-engine/src/transformations/include/transformations/serialize.hpp +++ b/inference-engine/src/transformations/include/transformations/serialize.hpp @@ -34,8 +34,7 @@ class ngraph::pass::Serialize : public ngraph::pass::FunctionPass { bool run_on_function(std::shared_ptr f) override; Serialize(const std::string& xmlPath, const std::string& binPath, - Version version = Version::IR_V10, std::map custom_opsets = {}) - : m_xmlPath{xmlPath}, m_binPath{binPath}, m_version{version}, m_custom_opsets{custom_opsets} {} + Version version = Version::IR_V10, std::map custom_opsets = {}); private: const std::string m_xmlPath; diff --git a/inference-engine/src/transformations/src/transformations/serialize.cpp b/inference-engine/src/transformations/src/transformations/serialize.cpp index 2630be432a5f4e..1869e9f6206f21 100644 --- a/inference-engine/src/transformations/src/transformations/serialize.cpp +++ b/inference-engine/src/transformations/src/transformations/serialize.cpp @@ -3,6 +3,8 @@ // #include +#include +#include #include #include #include @@ -18,18 +20,17 @@ using namespace ngraph; NGRAPH_RTTI_DEFINITION(ngraph::pass::Serialize, "Serialize", 0); namespace { // helpers -template -std::string joinVec(const std::vector& vec, - const std::string& glue = std::string(",")) { - if (vec.empty()) return ""; +template +std::string join(const Container& c, const char* glue = ", ") { std::stringstream oss; - oss << vec[0]; - for (size_t i = 1; i < vec.size(); i++) oss << glue << vec[i]; + const char* s = ""; + for (const auto& v : c) { + oss << s << v; + s = glue; + } return oss.str(); } -} // namespace -namespace { // implementation details struct Edge { int from_layer = 0; int from_port = 0; @@ -37,34 +38,70 @@ struct Edge { int to_port = 0; }; -struct ConstantAtributes { - int size = 0; - int offset = 0; -}; +// Here operation type names are translated from ngraph convention to IR +// convention. Most of them are the same, but there are exceptions, e.g +// Constant (ngraph name) and Const (IR name). If there will be more +// discrepancies discoverd, translations needs to be added here. +const std::unordered_map translate_type_name_translator = { + {"Constant", "Const"}, + {"Relu", "ReLU"}, + {"Softmax", "SoftMax"}}; + +std::string translate_type_name(const std::string& name) { + auto found = translate_type_name_translator.find(name); + if (found != end(translate_type_name_translator)) { + return found->second; + } + return name; +} -class XmlVisitor : public ngraph::AttributeVisitor { - pugi::xml_node& m_data; +class XmlSerializer : public ngraph::AttributeVisitor { + pugi::xml_node& m_xml_node; + std::ostream& m_bin_data; std::string& m_node_type_name; template std::string create_atribute_list( ngraph::ValueAccessor>& adapter) { - return joinVec(adapter.get(), std::string(",")); + return join(adapter.get()); } public: - XmlVisitor(pugi::xml_node& data, std::string& node_type_name) - : m_data(data), m_node_type_name(node_type_name) {} + XmlSerializer(pugi::xml_node& data, + std::ostream& bin_data, + std::string& node_type_name) + : m_xml_node(data) + , m_bin_data(bin_data) + , m_node_type_name(node_type_name) { + } void on_adapter(const std::string& name, ngraph::ValueAccessor& adapter) override { -#if 0 // TODO: remove when Constant will support VisitorAPI - m_data.append_attribute(name.c_str()); -#endif + (void)name; + (void)adapter; } + + void on_adapter(const std::string& name, + ngraph::ValueAccessor& adapter) override { + if (name == "value" && translate_type_name(m_node_type_name) == "Const") { + using AlignedBufferAdapter = + ngraph::AttributeAdapter>; + if (auto a = ngraph::as_type(&adapter)) { + const int64_t size = a->size(); + const int64_t offset = m_bin_data.tellp(); + + m_xml_node.append_attribute("offset").set_value(offset); + m_xml_node.append_attribute("size").set_value(size); + + auto data = static_cast(a->get_ptr()); + m_bin_data.write(data, size); + } + } + } + void on_adapter(const std::string& name, ngraph::ValueAccessor& adapter) override { - m_data.append_attribute(name.c_str()).set_value(adapter.get()); + m_xml_node.append_attribute(name.c_str()).set_value(adapter.get()); } void on_adapter(const std::string& name, ngraph::ValueAccessor& adapter) override { @@ -75,40 +112,40 @@ class XmlVisitor : public ngraph::AttributeVisitor { // it is a WA to not introduce dependency on plugin_api library m_node_type_name = adapter.get(); } else { - m_data.append_attribute(name.c_str()) + m_xml_node.append_attribute(name.c_str()) .set_value(adapter.get().c_str()); } } void on_adapter(const std::string& name, ngraph::ValueAccessor& adapter) override { - m_data.append_attribute(name.c_str()).set_value(adapter.get()); + m_xml_node.append_attribute(name.c_str()).set_value(adapter.get()); } void on_adapter(const std::string& name, ngraph::ValueAccessor& adapter) override { - m_data.append_attribute(name.c_str()).set_value(adapter.get()); + m_xml_node.append_attribute(name.c_str()).set_value(adapter.get()); } void on_adapter( const std::string& name, ngraph::ValueAccessor>& adapter) override { - m_data.append_attribute(name.c_str()) + m_xml_node.append_attribute(name.c_str()) .set_value(create_atribute_list(adapter).c_str()); } void on_adapter( const std::string& name, ngraph::ValueAccessor>& adapter) override { - m_data.append_attribute(name.c_str()) + m_xml_node.append_attribute(name.c_str()) .set_value(create_atribute_list(adapter).c_str()); } void on_adapter( const std::string& name, ngraph::ValueAccessor>& adapter) override { - m_data.append_attribute(name.c_str()) + m_xml_node.append_attribute(name.c_str()) .set_value(create_atribute_list(adapter).c_str()); } void on_adapter( const std::string& name, ngraph::ValueAccessor>& adapter) override { - m_data.append_attribute(name.c_str()) + m_xml_node.append_attribute(name.c_str()) .set_value(create_atribute_list(adapter).c_str()); } }; @@ -175,19 +212,7 @@ const std::vector create_edge_mapping( return edges; } -// TODO: refactor to Vistor API when Constant will be supporting it -ConstantAtributes dump_constant_data(std::vector& bin, - const ngraph::op::Constant& c) { - NGRAPH_CHECK(c.get_output_partial_shape(0.).is_static(), - "Unsupported dynamic output shape in ", c); - - ConstantAtributes attr; - const uint8_t* p = reinterpret_cast(c.get_data_ptr()); - attr.size = ngraph::shape_size(c.get_shape()) * c.get_element_type().size(); - attr.offset = bin.size(); - bin.insert(end(bin), p, p + attr.size); - return attr; -} + std::string get_opset_name( const ngraph::Node* n, @@ -214,20 +239,6 @@ std::string get_opset_name( return "experimental"; } -// Here operation type names are translated from ngraph convention to IR -// convention. Most of them are the same, but there are exceptions, e.g -// Constant (ngraph name) and Const (IR name). If there will be more -// discrepancies discoverd, translations needs to be added here. -std::string translate_type_name(std::string name) { - const std::unordered_map translator = { - {"Constant", "Const"}, - {"Relu", "ReLU"}, - {"Softmax", "SoftMax"}}; - if (translator.count(name) > 0) { - name = translator.at(name); - } - return name; -} std::string get_output_precision_name(ngraph::Output& o) { auto elem_type = o.get_element_type(); @@ -364,10 +375,10 @@ bool resolve_dynamic_shapes(const ngraph::Function& f) { return true; } -void ngfunction_2_irv10( - pugi::xml_document& doc, std::vector& bin, - ngraph::Function& f, - const std::map& custom_opsets) { +void ngfunction_2_irv10(pugi::xml_document& doc, + std::ostream& bin_file, + const ngraph::Function& f, + const std::map& custom_opsets) { const bool exec_graph = is_exec_graph(f); pugi::xml_node netXml = doc.append_child("net"); @@ -403,7 +414,7 @@ void ngfunction_2_irv10( if (exec_graph) { visit_exec_graph_node(data, node_type_name, node); } else { - XmlVisitor visitor(data, node_type_name); + XmlSerializer visitor(data, bin_file, node_type_name); NGRAPH_CHECK(node->visit_attributes(visitor), "Visitor API is not supported in ", node); } @@ -416,13 +427,6 @@ void ngfunction_2_irv10( layer.remove_child(data); } - // constant atributes (special case) - if (auto constant = dynamic_cast(node)) { - ConstantAtributes attr = dump_constant_data(bin, *constant); - data.append_attribute("offset").set_value(attr.offset); - data.append_attribute("size").set_value(attr.size); - } - int port_id = 0; // if (node->get_input_size() > 0) { @@ -482,10 +486,11 @@ void ngfunction_2_irv10( bool pass::Serialize::run_on_function(std::shared_ptr f) { // prepare data pugi::xml_document xml_doc; - std::vector constants; + std::ofstream bin_file(m_binPath, std::ios::out | std::ios::binary); + NGRAPH_CHECK(bin_file, "Can't open bin file: \"" + m_binPath + "\""); switch (m_version) { case Version::IR_V10: - ngfunction_2_irv10(xml_doc, constants, *f, m_custom_opsets); + ngfunction_2_irv10(xml_doc, bin_file, *f, m_custom_opsets); break; default: NGRAPH_UNREACHABLE("Unsupported version"); @@ -494,14 +499,50 @@ bool pass::Serialize::run_on_function(std::shared_ptr f) { // create xml file std::ofstream xml_file(m_xmlPath, std::ios::out); + NGRAPH_CHECK(xml_file, "Can't open xml file: \"" + m_xmlPath + "\""); xml_doc.save(xml_file); - - // create bin file - std::ofstream bin_file(m_binPath, std::ios::out | std::ios::binary); - bin_file.write(reinterpret_cast(constants.data()), - constants.size() * sizeof(constants[0])); + xml_file.flush(); + bin_file.flush(); // Return false because we didn't change nGraph Function return false; } + +namespace { + +std::string valid_xml_path(const std::string &path) { + NGRAPH_CHECK(path.length() > 4, "Path for xml file is to short: \"" + path + "\""); + + const char *const extension = ".xml"; + const bool has_xml_extension = path.rfind(extension) == path.size() - std::strlen(extension); + NGRAPH_CHECK(has_xml_extension, + "Path for xml file doesn't contains file name with 'xml' extension: \"" + + path + "\""); + return path; +} + +std::string provide_bin_path(const std::string &xmlPath, const std::string &binPath) { + if (!binPath.empty()) { + return binPath; + } + assert(xmlPath.size() > 4); // should be check by valid_xml_path + std::string bestPath = xmlPath; + const char *const extension = "bin"; + const auto ext_size = std::strlen(extension); + bestPath.replace(bestPath.size() - ext_size, ext_size, extension); + return bestPath; +} + +} // namespace + +pass::Serialize::Serialize(const std::string& xmlPath, + const std::string& binPath, + pass::Serialize::Version version, + std::map custom_opsets) + : m_xmlPath{valid_xml_path(xmlPath)} + , m_binPath{provide_bin_path(xmlPath, binPath)} + , m_version{version} + , m_custom_opsets{custom_opsets} +{ +} // ! [function_pass:serialize_cpp] diff --git a/inference-engine/tests/functional/inference_engine/ir_serialization/custom_ops.cpp b/inference-engine/tests/functional/inference_engine/ir_serialization/custom_ops.cpp index 60ab91cdebf6f4..bc1d5c8b514854 100644 --- a/inference-engine/tests/functional/inference_engine/ir_serialization/custom_ops.cpp +++ b/inference-engine/tests/functional/inference_engine/ir_serialization/custom_ops.cpp @@ -53,7 +53,7 @@ TEST_F(CustomOpsSerializationTest, CustomOpUser_MO) { bool success; std::string message; std::tie(success, message) = - compare_functions(result.getFunction(), expected.getFunction()); + compare_functions(result.getFunction(), expected.getFunction(), true); ASSERT_TRUE(success) << message; } @@ -73,7 +73,7 @@ TEST_F(CustomOpsSerializationTest, CustomOpUser_ONNXImporter) { bool success; std::string message; std::tie(success, message) = - compare_functions(result.getFunction(), expected.getFunction()); + compare_functions(result.getFunction(), expected.getFunction(), true); ASSERT_TRUE(success) << message; } @@ -97,7 +97,7 @@ TEST_F(CustomOpsSerializationTest, CustomOpTransformation) { bool success; std::string message; std::tie(success, message) = - compare_functions(result.getFunction(), expected.getFunction()); + compare_functions(result.getFunction(), expected.getFunction(), true); ASSERT_TRUE(success) << message; } diff --git a/inference-engine/tests/functional/inference_engine/ir_serialization/serialize.cpp b/inference-engine/tests/functional/inference_engine/ir_serialization/serialize.cpp index 70984ec0be705c..907483bda921a2 100644 --- a/inference-engine/tests/functional/inference_engine/ir_serialization/serialize.cpp +++ b/inference-engine/tests/functional/inference_engine/ir_serialization/serialize.cpp @@ -17,25 +17,16 @@ typedef std::tuple SerializationParams; class SerializationTest: public CommonTestUtils::TestsCommon, public testing::WithParamInterface { public: + std::string m_model_path; std::string m_out_xml_path; std::string m_out_bin_path; void SetUp() override { - const auto & model_path = IR_SERIALIZATION_MODELS_PATH + std::get<0>(GetParam()); + m_model_path = IR_SERIALIZATION_MODELS_PATH + std::get<0>(GetParam()); - const std::string test_name = "test"; // ::testing::UnitTest::GetInstance()->current_test_info()->name(); + const std::string test_name = GetTestName() + "_" + GetTimestamp(); m_out_xml_path = test_name + ".xml"; m_out_bin_path = test_name + ".bin"; - - InferenceEngine::Core ie; - auto expected = ie.ReadNetwork(model_path); - expected.serialize(m_out_xml_path, m_out_bin_path); - auto result = ie.ReadNetwork(m_out_xml_path, m_out_bin_path); - - bool success; - std::string message; - std::tie(success, message) = compare_functions(result.getFunction(), expected.getFunction()); - ASSERT_TRUE(success) << message; } void TearDown() override { @@ -45,6 +36,15 @@ class SerializationTest: public CommonTestUtils::TestsCommon, }; TEST_P(SerializationTest, CompareFunctions) { + InferenceEngine::Core ie; + auto expected = ie.ReadNetwork(m_model_path); + expected.serialize(m_out_xml_path, m_out_bin_path); + auto result = ie.ReadNetwork(m_out_xml_path, m_out_bin_path); + + bool success; + std::string message; + std::tie(success, message) = compare_functions(result.getFunction(), expected.getFunction(), true); + ASSERT_TRUE(success) << message; } INSTANTIATE_TEST_CASE_P(IRSerialization, SerializationTest, diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/base/layer_test_utils.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/base/layer_test_utils.hpp index a1f47a367c7a41..324805227beecc 100644 --- a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/base/layer_test_utils.hpp +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/base/layer_test_utils.hpp @@ -213,8 +213,6 @@ class LayerTestsCommon : public CommonTestUtils::TestsCommon { private: RefMode refMode = RefMode::INTERPRETER; - static std::string GetTimestamp(); - const std::string GetTestName(); }; } // namespace LayerTestsUtils diff --git a/inference-engine/tests/functional/shared_test_classes/src/base/layer_test_utils.cpp b/inference-engine/tests/functional/shared_test_classes/src/base/layer_test_utils.cpp index f90d6ad065f71c..709a61d5e6f9e4 100644 --- a/inference-engine/tests/functional/shared_test_classes/src/base/layer_test_utils.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/base/layer_test_utils.cpp @@ -473,18 +473,4 @@ std::map &LayerTestsCommon::GetConfiguration() { return configuration; } -std::string LayerTestsCommon::GetTimestamp() { - auto now = std::chrono::system_clock::now(); - auto epoch = now.time_since_epoch(); - auto ns = std::chrono::duration_cast(epoch); - return std::to_string(ns.count()); -} - -const std::string LayerTestsCommon::GetTestName() { - std::string test_name = - ::testing::UnitTest::GetInstance()->current_test_info()->name(); - std::replace_if(test_name.begin(), test_name.end(), - [](char c) { return !std::isalnum(c); }, '_'); - return test_name; -} } // namespace LayerTestsUtils diff --git a/inference-engine/tests/ie_test_utils/common_test_utils/ngraph_test_utils.cpp b/inference-engine/tests/ie_test_utils/common_test_utils/ngraph_test_utils.cpp index 3794307e0c8c8a..697be047be16a4 100644 --- a/inference-engine/tests/ie_test_utils/common_test_utils/ngraph_test_utils.cpp +++ b/inference-engine/tests/ie_test_utils/common_test_utils/ngraph_test_utils.cpp @@ -13,22 +13,6 @@ #include #include "ngraph_test_utils.hpp" -bool compare(const std::vector& expectedValues, const std::shared_ptr& constant) { - const auto actualValues = constant->cast_vector(); - if (actualValues.size() != expectedValues.size()) { - return false; - } - - static const float threshold = 1e-4f; - for (size_t i = 0; i < expectedValues.size(); ++i) { - if (abs(expectedValues[i] - actualValues[i]) > threshold) { - return false; - } - } - - return true; -} - bool isTypeRelaxed(const std::string& type) { return type.find_first_of("TypeRelaxed") == 0; } @@ -149,14 +133,25 @@ std::pair compare_functions( for (int i = 0; i < node1->inputs().size(); ++i) { if (compareConstValues) { - std::shared_ptr const1 = ngraph::as_type_ptr(node1->get_input_node_shared_ptr(i)); - std::shared_ptr const2 = ngraph::as_type_ptr(node2->get_input_node_shared_ptr(i)); - if ((const1 != nullptr) && (const2 != nullptr)) { - if (!compare(const1->cast_vector(), const2)) { - err_log << "Different Constant values detected" << std::endl + using Constant = ngraph::opset1::Constant; + auto const1 = ngraph::as_type_ptr(node1->get_input_node_shared_ptr(i)); + auto const2 = ngraph::as_type_ptr(node2->get_input_node_shared_ptr(i)); + + const auto equal = [](const Constant &c1, const Constant &c2) { + const auto equal_float_str = [](const std::string &s1, const std::string s2) { + return std::abs(std::stof(s1) - std::stof(s2)) < 0.001; + }; + const auto &c1v = c1.get_value_strings(); + const auto &c2v = c2.get_value_strings(); + + return c1v.size() == c2v.size() + && std::equal(begin(c1v), end(c1v), begin(c2v), equal_float_str); + }; + + if (const1 && const2 && !equal(*const1, *const2)) { + err_log << "Different Constant values detected \n" << node1->description() << " Input(" << i << ") and " << node2->description() << " Input(" << i << ")" << std::endl; - } } } diff --git a/inference-engine/tests/ie_test_utils/common_test_utils/ngraph_test_utils.hpp b/inference-engine/tests/ie_test_utils/common_test_utils/ngraph_test_utils.hpp index 9dd31115ed376a..d5eeff922c23ac 100644 --- a/inference-engine/tests/ie_test_utils/common_test_utils/ngraph_test_utils.hpp +++ b/inference-engine/tests/ie_test_utils/common_test_utils/ngraph_test_utils.hpp @@ -18,8 +18,6 @@ using TransformationTests = CommonTestUtils::TestsCommon; -bool compare(const std::vector& expectedValues, const std::shared_ptr& constant); - std::pair compare_functions( const std::shared_ptr& f1, const std::shared_ptr& f2, diff --git a/inference-engine/tests/ie_test_utils/common_test_utils/test_common.cpp b/inference-engine/tests/ie_test_utils/common_test_utils/test_common.cpp index 10f518225c7e22..fe9c31793d21c6 100644 --- a/inference-engine/tests/ie_test_utils/common_test_utils/test_common.cpp +++ b/inference-engine/tests/ie_test_utils/common_test_utils/test_common.cpp @@ -6,6 +6,10 @@ #include +#include +#include +#include + #ifdef _WIN32 #ifndef NOMINMAX #define NOMINMAX @@ -64,4 +68,19 @@ TestsCommon::TestsCommon() { InferenceEngine::ExecutorManager::getInstance()->clear(); } -} // namespace CommonTestUtils \ No newline at end of file +std::string TestsCommon::GetTimestamp() { + auto now = std::chrono::system_clock::now(); + auto epoch = now.time_since_epoch(); + auto ns = std::chrono::duration_cast(epoch); + return std::to_string(ns.count()); +} + +std::string TestsCommon::GetTestName() const { + std::string test_name = + ::testing::UnitTest::GetInstance()->current_test_info()->name(); + std::replace_if(test_name.begin(), test_name.end(), + [](char c) { return !std::isalnum(c); }, '_'); + return test_name; +} + +} // namespace CommonTestUtils diff --git a/inference-engine/tests/ie_test_utils/common_test_utils/test_common.hpp b/inference-engine/tests/ie_test_utils/common_test_utils/test_common.hpp index e51a39765238d1..9e600636b079d5 100644 --- a/inference-engine/tests/ie_test_utils/common_test_utils/test_common.hpp +++ b/inference-engine/tests/ie_test_utils/common_test_utils/test_common.hpp @@ -6,6 +6,8 @@ #include +#include + namespace CommonTestUtils { class TestsCommon : virtual public ::testing::Test { @@ -13,6 +15,10 @@ class TestsCommon : virtual public ::testing::Test { TestsCommon(); ~TestsCommon() override; + + static std::string GetTimestamp(); + + std::string GetTestName() const; }; } // namespace CommonTestUtils diff --git a/ngraph/core/include/ngraph/function.hpp b/ngraph/core/include/ngraph/function.hpp index 4f5cc1ce12db9d..b553f06e45bb52 100644 --- a/ngraph/core/include/ngraph/function.hpp +++ b/ngraph/core/include/ngraph/function.hpp @@ -107,7 +107,7 @@ namespace ngraph // updates graph and m_results list void replace_node(std::shared_ptr old, std::shared_ptr repl); - void validate_nodes_and_infer_types(); + void validate_nodes_and_infer_types() const; /// \brief Returns the sum of the size of all nodes in the graph plus the size of /// all constant data. This has little value beyond comparing the relative size of diff --git a/ngraph/core/include/ngraph/op/constant.hpp b/ngraph/core/include/ngraph/op/constant.hpp index f5e97b71f03c57..4caca60c3144bd 100644 --- a/ngraph/core/include/ngraph/op/constant.hpp +++ b/ngraph/core/include/ngraph/op/constant.hpp @@ -479,8 +479,7 @@ namespace ngraph [](IN_T c) { return static_cast(c); }); } - /// \brief Allocate a buffer and return a pointer to it - void* allocate_buffer(); + void allocate_buffer(); void* get_data_ptr_nc() { return (m_data ? m_data->get_ptr() : nullptr); } template @@ -507,7 +506,7 @@ namespace ngraph } template - void write_buffer(void* target, const std::vector& source, size_t count) + static void write_buffer(void* target, const std::vector& source, size_t count) { T* p = reinterpret_cast(target); for (size_t i = 0; i < count; i++) @@ -517,11 +516,11 @@ namespace ngraph } template - void write_to_buffer(const element::Type& target_type, - const Shape& /* target_shape */, - const std::vector& source, - void* target, - size_t target_element_count) + static void write_to_buffer(const element::Type& target_type, + const Shape& /* target_shape */, + const std::vector& source, + void* target, + size_t target_element_count) { if (source.size() != target_element_count) { diff --git a/ngraph/core/src/function.cpp b/ngraph/core/src/function.cpp index 19741e33597c31..a7fa814627e4e1 100644 --- a/ngraph/core/src/function.cpp +++ b/ngraph/core/src/function.cpp @@ -99,7 +99,7 @@ Function::Function(const OutputVector& results, { } -void Function::validate_nodes_and_infer_types() +void Function::validate_nodes_and_infer_types() const { OV_ITT_SCOPED_TASK(ngraph::itt::domains::nGraphPass_LT, "Function::validate_nodes_and_infer_types"); diff --git a/ngraph/core/src/op/constant.cpp b/ngraph/core/src/op/constant.cpp index 14f836f8d244d0..0bdea7370da66f 100644 --- a/ngraph/core/src/op/constant.cpp +++ b/ngraph/core/src/op/constant.cpp @@ -16,6 +16,7 @@ #include #include +#include #include "itt.hpp" #include "ngraph/log.hpp" @@ -301,11 +302,11 @@ op::Constant::Constant(const element::Type& type, const Shape& shape) constructor_validate_and_infer_types(); } -void* op::Constant::allocate_buffer() +void op::Constant::allocate_buffer() { m_data = make_shared(shape_size(m_shape) * m_element_type.size(), host_alignment()); - return get_data_ptr_nc(); + std::memset(m_data->get_ptr(), 0, m_data->size()); } op::Constant::Constant(const element::Type& type, const Shape& shape, const void* data) From 65b2447d36e687a37a09c7deb5e7643b7e959b00 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Wed, 23 Dec 2020 18:00:26 +0300 Subject: [PATCH 130/244] Try ENABLE_FASTER_BUILD on public CI (#3708) * Try ENABLE_FASTER_BUILD on public CI * Fixed UNITY compilation for Windows --- .ci/azure/linux.yml | 1 + .ci/azure/windows.yml | 2 +- inference-engine/src/inference_engine/file_utils.cpp | 3 +++ .../src/inference_engine/os/win/win_shared_object_loader.cpp | 5 +++++ .../src/inference_engine/os/win/win_system_conf.cpp | 4 ++++ 5 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.ci/azure/linux.yml b/.ci/azure/linux.yml index 343588be2f5451..c85b9baf2d1068 100644 --- a/.ci/azure/linux.yml +++ b/.ci/azure/linux.yml @@ -98,6 +98,7 @@ jobs: -DENABLE_PYTHON=ON -DPYTHON_EXECUTABLE=/usr/bin/python3.6 -DENABLE_TESTS=ON + -DENABLE_FASTER_BUILD=ON -DIE_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)/modules $(REPO_DIR) workingDirectory: $(BUILD_DIR) diff --git a/.ci/azure/windows.yml b/.ci/azure/windows.yml index 4ca0a08f76f8f3..e6e3aa9685c176 100644 --- a/.ci/azure/windows.yml +++ b/.ci/azure/windows.yml @@ -90,7 +90,7 @@ jobs: - script: | set PATH=$(WORK_DIR)\ninja-win;%PATH% - call "$(MSVS_VARS_PATH)" && cmake -GNinja -DENABLE_TEMPLATE_PLUGIN=ON -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_TESTS=ON -DIE_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)\modules -DCMAKE_C_COMPILER:PATH="$(MSVC_COMPILER_PATH)" -DCMAKE_CXX_COMPILER:PATH="$(MSVC_COMPILER_PATH)" $(REPO_DIR) + call "$(MSVS_VARS_PATH)" && cmake -GNinja -DENABLE_FASTER_BUILD=ON -DENABLE_TEMPLATE_PLUGIN=ON -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_TESTS=ON -DIE_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)\modules -DCMAKE_C_COMPILER:PATH="$(MSVC_COMPILER_PATH)" -DCMAKE_CXX_COMPILER:PATH="$(MSVC_COMPILER_PATH)" $(REPO_DIR) workingDirectory: $(BUILD_DIR) displayName: 'CMake' diff --git a/inference-engine/src/inference_engine/file_utils.cpp b/inference-engine/src/inference_engine/file_utils.cpp index eb31ba4304efe3..15898395770d99 100644 --- a/inference-engine/src/inference_engine/file_utils.cpp +++ b/inference-engine/src/inference_engine/file_utils.cpp @@ -26,6 +26,9 @@ # if defined(WINAPI_FAMILY) && !WINAPI_PARTITION_DESKTOP # error "Only WINAPI_PARTITION_DESKTOP is supported, because of GetModuleHandleEx[A|W]" # endif +# ifndef NOMINMAX +# define NOMINMAX +# endif # include #endif diff --git a/inference-engine/src/inference_engine/os/win/win_shared_object_loader.cpp b/inference-engine/src/inference_engine/os/win/win_shared_object_loader.cpp index 45e89852d26cea..360da0c76ce4c1 100644 --- a/inference-engine/src/inference_engine/os/win/win_shared_object_loader.cpp +++ b/inference-engine/src/inference_engine/os/win/win_shared_object_loader.cpp @@ -62,6 +62,11 @@ #include #include + +#ifndef NOMINMAX +# define NOMINMAX +#endif + #include namespace InferenceEngine { diff --git a/inference-engine/src/inference_engine/os/win/win_system_conf.cpp b/inference-engine/src/inference_engine/os/win/win_system_conf.cpp index 4e0b71e045ccde..d90e25aa8ab622 100644 --- a/inference-engine/src/inference_engine/os/win/win_system_conf.cpp +++ b/inference-engine/src/inference_engine/os/win/win_system_conf.cpp @@ -2,6 +2,10 @@ // SPDX-License-Identifier: Apache-2.0 // +#ifndef NOMINMAX +# define NOMINMAX +#endif + #include #include #include From 5b26a7fcb18b2b96fa67c76f8df42d3caa8d0a54 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Wed, 23 Dec 2020 18:00:36 +0300 Subject: [PATCH 131/244] Added error message if cmake is run from IE root (#3707) --- inference-engine/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/inference-engine/CMakeLists.txt b/inference-engine/CMakeLists.txt index 3f44e176cf88e9..cc3542d1152d07 100644 --- a/inference-engine/CMakeLists.txt +++ b/inference-engine/CMakeLists.txt @@ -1,8 +1,13 @@ # Copyright (C) 2018-2020 Intel Corporation # SPDX-License-Identifier: Apache-2.0 # + project(InferenceEngine) +if(CMAKE_SOURCE_DIR STREQUAL "${InferenceEngine_SOURCE_DIR}") + message(FATAL_ERROR "Cmake source directory must point to ") +endif() + include(cmake/features.cmake) # resolving dependencies for the project From 036f5747568b97c5fc59b2aeaaa20d9faddae69a Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Wed, 23 Dec 2020 18:25:42 +0300 Subject: [PATCH 132/244] module library type for IE plugins, extensions (#3656) * CMAKE: Added MODULE linker flags * Fixed plugins.xml s * Use module instead of shared library * Fixes * tab 2 spaces * Renamed get_shared_library_name to ie_plugin_get_file_name --- cmake/developer_package/plugins/plugins.cmake | 12 +++--- .../plugins/register_plugin_cmake.cmake | 40 +++++++++---------- .../plugins/unregister_plugin_cmake.cmake | 16 ++++---- docs/IE_DG/inference_engine_intro.md | 8 ++-- docs/template_extension/CMakeLists.txt | 2 +- inference-engine/CMakeLists.txt | 3 +- .../src/inference_engine/ie_core.cpp | 2 +- .../inference_engine/ie_network_reader.cpp | 6 +-- inference-engine/src/plugin_api/file_utils.h | 28 ++++++------- .../src/preprocessing/CMakeLists.txt | 4 +- .../src/preprocessing/ie_preprocess_data.hpp | 4 +- .../src/readers/ir_reader/CMakeLists.txt | 4 +- .../src/readers/ir_reader_v7/CMakeLists.txt | 4 +- .../src/readers/onnx_reader/CMakeLists.txt | 4 +- .../inference_engine/core_threading_tests.cpp | 6 +-- .../functional/inference_engine/extension.cpp | 2 +- .../ir_serialization/custom_ops.cpp | 2 +- .../shared_object_loader_test.cpp | 2 +- .../inference_engine/so_pointer_tests.cpp | 2 +- .../include/behavior/core_integration.hpp | 2 +- .../include/behavior/core_threading_tests.hpp | 2 +- .../common_test_utils/test_constants.hpp | 2 +- .../mocks/mock_engine/CMakeLists.txt | 4 +- .../inference_engine/ie_extension_test.cpp | 2 +- .../tests_deprecated/unit/CMakeLists.txt | 1 - 25 files changed, 81 insertions(+), 83 deletions(-) diff --git a/cmake/developer_package/plugins/plugins.cmake b/cmake/developer_package/plugins/plugins.cmake index 0a59797475f7e4..c3aad14bab612a 100644 --- a/cmake/developer_package/plugins/plugins.cmake +++ b/cmake/developer_package/plugins/plugins.cmake @@ -6,9 +6,9 @@ include(CMakeParseArguments) set(PLUGIN_FILES "" CACHE INTERNAL "") -function(get_shared_library_name target_name library_name) - set(LIB_PREFIX "${CMAKE_SHARED_LIBRARY_PREFIX}") - set(LIB_SUFFIX "${IE_BUILD_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}") +function(ie_plugin_get_file_name target_name library_name) + set(LIB_PREFIX "${CMAKE_SHARED_MODULE_PREFIX}") + set(LIB_SUFFIX "${IE_BUILD_POSTFIX}${CMAKE_SHARED_MODULE_SUFFIX}") set("${library_name}" "${LIB_PREFIX}${target_name}${LIB_SUFFIX}" PARENT_SCOPE) endfunction() @@ -52,7 +52,7 @@ function(ie_add_plugin) add_cpplint_target(${obj_lib}_cpplint FOR_TARGETS ${obj_lib}) endforeach() - add_library(${IE_PLUGIN_NAME} SHARED ${input_files}) + add_library(${IE_PLUGIN_NAME} MODULE ${input_files}) target_compile_definitions(${IE_PLUGIN_NAME} PRIVATE IMPLEMENT_INFERENCE_ENGINE_PLUGIN) ie_add_vs_version_file(NAME ${TARGET_NAME} @@ -152,7 +152,7 @@ macro(ie_register_plugins) # create plugin file set(config_file_name "${CMAKE_BINARY_DIR}/plugins/${name}.xml") - get_shared_library_name(${name} library_name) + ie_plugin_get_file_name(${name} library_name) add_custom_command(TARGET ${IE_REGISTER_MAIN_TARGET} POST_BUILD COMMAND @@ -170,7 +170,7 @@ macro(ie_register_plugins) add_custom_command(TARGET ${IE_REGISTER_MAIN_TARGET} POST_BUILD COMMAND "${CMAKE_COMMAND}" - -D "CMAKE_SHARED_LIBRARY_PREFIX=${CMAKE_SHARED_LIBRARY_PREFIX}" + -D "CMAKE_SHARED_MODULE_PREFIX=${CMAKE_SHARED_MODULE_PREFIX}" -D "IE_CONFIG_OUTPUT_FILE=${config_output_file}" -D "IE_CONFIGS_DIR=${CMAKE_BINARY_DIR}/plugins" -P "${IEDevScripts_DIR}/plugins/register_plugin_cmake.cmake" diff --git a/cmake/developer_package/plugins/register_plugin_cmake.cmake b/cmake/developer_package/plugins/register_plugin_cmake.cmake index 147e47a74b2aca..39a9657944756b 100644 --- a/cmake/developer_package/plugins/register_plugin_cmake.cmake +++ b/cmake/developer_package/plugins/register_plugin_cmake.cmake @@ -16,30 +16,30 @@ endif() file(GLOB plugin_files "${IE_CONFIGS_DIR}/*.xml") function(check_plugin_exists plugin_name outvar) - set(${outvar} OFF PARENT_SCOPE) + set(${outvar} OFF PARENT_SCOPE) - # check if config file already has this plugin - file(STRINGS "${IE_CONFIG_OUTPUT_FILE}" content REGEX "plugin .*=\"") + # check if config file already has this plugin + file(STRINGS "${IE_CONFIG_OUTPUT_FILE}" content REGEX "plugin .*=\"") - foreach(line IN LISTS content) - string(REGEX MATCH "location=\"([^\"]*)\"" location "${line}") - get_filename_component(location "${CMAKE_MATCH_1}" NAME_WE) + foreach(line IN LISTS content) + string(REGEX MATCH "location=\"([^\"]*)\"" location "${line}") + get_filename_component(location "${CMAKE_MATCH_1}" NAME_WE) - if("${CMAKE_SHARED_LIBRARY_PREFIX}${plugin_name}" MATCHES "${location}") - # plugin has already registered - set(${outvar} ON PARENT_SCOPE) - endif() - endforeach() + if("${CMAKE_SHARED_MODULE_PREFIX}${plugin_name}" MATCHES "${location}") + # plugin has already registered + set(${outvar} ON PARENT_SCOPE) + endif() + endforeach() endfunction() set(plugin_files_to_add) foreach(plugin_file IN LISTS plugin_files) - get_filename_component(plugin_name "${plugin_file}" NAME_WE) - check_plugin_exists("${plugin_name}" exists) + get_filename_component(plugin_name "${plugin_file}" NAME_WE) + check_plugin_exists("${plugin_name}" exists) - if(NOT exists) - list(APPEND plugin_files_to_add "${plugin_file}") - endif() + if(NOT exists) + list(APPEND plugin_files_to_add "${plugin_file}") + endif() endforeach() # add plugin @@ -48,11 +48,11 @@ file(STRINGS "${IE_CONFIG_OUTPUT_FILE}" content) foreach(line IN LISTS content) if("${line}" MATCHES "") - foreach(plugin_file IN LISTS plugin_files_to_add) - file(READ "${plugin_file}" content) - set(newContent "${newContent} + foreach(plugin_file IN LISTS plugin_files_to_add) + file(READ "${plugin_file}" content) + set(newContent "${newContent} ${content}") - endforeach() + endforeach() endif() if(newContent) diff --git a/cmake/developer_package/plugins/unregister_plugin_cmake.cmake b/cmake/developer_package/plugins/unregister_plugin_cmake.cmake index db66332ccae99c..c28aeed12b700b 100644 --- a/cmake/developer_package/plugins/unregister_plugin_cmake.cmake +++ b/cmake/developer_package/plugins/unregister_plugin_cmake.cmake @@ -3,7 +3,7 @@ # if(NOT EXISTS "${IE_CONFIG_OUTPUT_FILE}") - return() + return() endif() # remove plugin file @@ -16,19 +16,19 @@ file(STRINGS "${IE_CONFIG_OUTPUT_FILE}" content) set(skip_plugin OFF) foreach(line IN LISTS content) if("${line}" MATCHES "${IE_PLUGIN_NAME}") - set(skip_plugin ON) + set(skip_plugin ON) endif() if(NOT skip_plugin) - if(newContent) - set(newContent "${newContent}\n${line}") - else() - set(newContent "${line}") - endif() + if(newContent) + set(newContent "${newContent}\n${line}") + else() + set(newContent "${line}") + endif() endif() if("${line}" MATCHES "") - set(skip_plugin OFF) + set(skip_plugin OFF) endif() endforeach() diff --git a/docs/IE_DG/inference_engine_intro.md b/docs/IE_DG/inference_engine_intro.md index 41e1b1dd1b08e8..41e8711e366acb 100644 --- a/docs/IE_DG/inference_engine_intro.md +++ b/docs/IE_DG/inference_engine_intro.md @@ -62,13 +62,13 @@ The table below shows the plugin libraries and additional dependencies for Linux | Plugin | Library name for Linux | Dependency libraries for Linux | Library name for Windows | Dependency libraries for Windows | Library name for macOS | Dependency libraries for macOS | |--------|-----------------------------|-------------------------------------------------------------|--------------------------|--------------------------------------------------------------------------------------------------------|------------------------------|---------------------------------------------| -| CPU | `libMKLDNNPlugin.so` | `libinference_engine_lp_transformations.so` | `MKLDNNPlugin.dll` | `inference_engine_lp_transformations.dll` | `libMKLDNNPlugin.dylib` | `inference_engine_lp_transformations.dylib` | +| CPU | `libMKLDNNPlugin.so` | `libinference_engine_lp_transformations.so` | `MKLDNNPlugin.dll` | `inference_engine_lp_transformations.dll` | `libMKLDNNPlugin.so` | `inference_engine_lp_transformations.dylib` | | GPU | `libclDNNPlugin.so` | `libinference_engine_lp_transformations.so`, `libOpenCL.so` | `clDNNPlugin.dll` | `OpenCL.dll`, `inference_engine_lp_transformations.dll` | Is not supported | - | -| MYRIAD | `libmyriadPlugin.so` | `libusb.so`, | `myriadPlugin.dll` | `usb.dll` | `libmyriadPlugin.dylib` | `libusb.dylib` | +| MYRIAD | `libmyriadPlugin.so` | `libusb.so`, | `myriadPlugin.dll` | `usb.dll` | `libmyriadPlugin.so` | `libusb.dylib` | | HDDL | `libHDDLPlugin.so` | `libbsl.so`, `libhddlapi.so`, `libmvnc-hddl.so` | `HDDLPlugin.dll` | `bsl.dll`, `hddlapi.dll`, `json-c.dll`, `libcrypto-1_1-x64.dll`, `libssl-1_1-x64.dll`, `mvnc-hddl.dll` | Is not supported | - | | GNA | `libGNAPlugin.so` | `libgna.so`, | `GNAPlugin.dll` | `gna.dll` | Is not supported | - | -| HETERO | `libHeteroPlugin.so` | Same as for selected plugins | `HeteroPlugin.dll` | Same as for selected plugins | `libHeteroPlugin.dylib` | Same as for selected plugins | -| MULTI | `libMultiDevicePlugin.so` | Same as for selected plugins | `MultiDevicePlugin.dll` | Same as for selected plugins | `libMultiDevicePlugin.dylib` | Same as for selected plugins | +| HETERO | `libHeteroPlugin.so` | Same as for selected plugins | `HeteroPlugin.dll` | Same as for selected plugins | `libHeteroPlugin.so` | Same as for selected plugins | +| MULTI | `libMultiDevicePlugin.so` | Same as for selected plugins | `MultiDevicePlugin.dll` | Same as for selected plugins | `libMultiDevicePlugin.so` | Same as for selected plugins | > **NOTE**: All plugin libraries also depend on core Inference Engine libraries. diff --git a/docs/template_extension/CMakeLists.txt b/docs/template_extension/CMakeLists.txt index 6e53349c41c8eb..016015a6283a18 100644 --- a/docs/template_extension/CMakeLists.txt +++ b/docs/template_extension/CMakeLists.txt @@ -12,7 +12,7 @@ find_package(InferenceEngine REQUIRED) file(GLOB_RECURSE SRC *.cpp) -add_library(${TARGET_NAME} SHARED ${SRC}) +add_library(${TARGET_NAME} MODULE ${SRC}) target_compile_definitions(${TARGET_NAME} PRIVATE IMPLEMENT_INFERENCE_EXTENSION_API) target_link_libraries(${TARGET_NAME} PRIVATE IE::inference_engine ${NGRAPH_LIBRARIES}) diff --git a/inference-engine/CMakeLists.txt b/inference-engine/CMakeLists.txt index cc3542d1152d07..44f061e5515ffe 100644 --- a/inference-engine/CMakeLists.txt +++ b/inference-engine/CMakeLists.txt @@ -24,14 +24,13 @@ function(ie_developer_export_targets) endfunction() function(ie_developer_export) - set(all_dev_targets gflags inference_engine_ir_reader inference_engine_ir_v7_reader) + set(all_dev_targets gflags ie_libraries) foreach(component IN LISTS openvino_export_components) export(TARGETS ${${component}} NAMESPACE IE:: APPEND FILE "${CMAKE_BINARY_DIR}/${component}_dev_targets.cmake") list(APPEND all_dev_targets ${${component}}) endforeach() - # Custom target to build only Inference Engine Developer Package targets add_custom_target(ie_dev_targets ALL DEPENDS ${all_dev_targets}) endfunction() diff --git a/inference-engine/src/inference_engine/ie_core.cpp b/inference-engine/src/inference_engine/ie_core.cpp index 7671b39d7e74e6..15623183440a8b 100644 --- a/inference-engine/src/inference_engine/ie_core.cpp +++ b/inference-engine/src/inference_engine/ie_core.cpp @@ -422,7 +422,7 @@ class Core::Impl : public ICore { // append IR library path for default IE plugins FileUtils::FilePath pluginPath; { - pluginPath = FileUtils::makeSharedLibraryName({}, FileUtils::toFilePath(pluginName.c_str())); + pluginPath = FileUtils::makePluginLibraryName({}, FileUtils::toFilePath(pluginName.c_str())); FileUtils::FilePath absFilePath = FileUtils::makePath(getInferenceEngineLibraryPath(), pluginPath); if (FileUtils::fileExist(absFilePath)) pluginPath = absFilePath; diff --git a/inference-engine/src/inference_engine/ie_network_reader.cpp b/inference-engine/src/inference_engine/ie_network_reader.cpp index 80845341a0a91b..904f7d2a6e3a14 100644 --- a/inference-engine/src/inference_engine/ie_network_reader.cpp +++ b/inference-engine/src/inference_engine/ie_network_reader.cpp @@ -46,11 +46,11 @@ class Reader: public IReader { InferenceEngine::details::SOPointer getReaderPtr() { std::call_once(readFlag, [&] () { FileUtils::FilePath libraryName = FileUtils::toFilePath(location); - FileUtils::FilePath readersLibraryPath = FileUtils::makeSharedLibraryName(getInferenceEngineLibraryPath(), libraryName); + FileUtils::FilePath readersLibraryPath = FileUtils::makePluginLibraryName(getInferenceEngineLibraryPath(), libraryName); if (!FileUtils::fileExist(readersLibraryPath)) { THROW_IE_EXCEPTION << "Please, make sure that Inference Engine ONNX reader library " - << FileUtils::fromFilePath(::FileUtils::makeSharedLibraryName({}, libraryName)) << " is in " + << FileUtils::fromFilePath(::FileUtils::makePluginLibraryName({}, libraryName)) << " is in " << getIELibraryPath(); } ptr = InferenceEngine::details::SOPointer(readersLibraryPath); @@ -107,7 +107,7 @@ void registerReaders() { // TODO: Read readers info from XML auto create_if_exists = [] (const std::string name, const std::string library_name) { FileUtils::FilePath libraryName = FileUtils::toFilePath(library_name); - FileUtils::FilePath readersLibraryPath = FileUtils::makeSharedLibraryName(getInferenceEngineLibraryPath(), libraryName); + FileUtils::FilePath readersLibraryPath = FileUtils::makePluginLibraryName(getInferenceEngineLibraryPath(), libraryName); if (!FileUtils::fileExist(readersLibraryPath)) return std::shared_ptr(); diff --git a/inference-engine/src/plugin_api/file_utils.h b/inference-engine/src/plugin_api/file_utils.h index 17a7f286ae927d..cb3dd6a1756434 100644 --- a/inference-engine/src/plugin_api/file_utils.h +++ b/inference-engine/src/plugin_api/file_utils.h @@ -45,39 +45,39 @@ const char FileSeparator = '\\'; template<> struct FileTraits { constexpr static const auto FileSeparator = ::FileUtils::FileSeparator; - static std::string SharedLibraryPrefix() { return { }; } - static std::string SharedLibraryExt() { return { "dll" }; } + static std::string PluginLibraryPrefix() { return { }; } + static std::string PluginLibraryExt() { return { "dll" }; } }; template<> struct FileTraits { constexpr static const auto FileSeparator = L'\\'; - static std::wstring SharedLibraryPrefix() { return { }; } - static std::wstring SharedLibraryExt() { return { L"dll" }; } + static std::wstring PluginLibraryPrefix() { return { }; } + static std::wstring PluginLibraryExt() { return { L"dll" }; } }; #elif defined __APPLE__ /// @brief File path separator const char FileSeparator = '/'; template<> struct FileTraits { constexpr static const auto FileSeparator = ::FileUtils::FileSeparator; - static std::string SharedLibraryPrefix() { return { "lib" }; } - static std::string SharedLibraryExt() { return { "dylib" }; } + static std::string PluginLibraryPrefix() { return { "lib" }; } + static std::string PluginLibraryExt() { return { "so" }; } }; template<> struct FileTraits { constexpr static const auto FileSeparator = L'/'; - static std::wstring SharedLibraryPrefix() { return { L"lib" }; } - static std::wstring SharedLibraryExt() { return { L"dylib" }; } + static std::wstring PluginLibraryPrefix() { return { L"lib" }; } + static std::wstring PluginLibraryExt() { return { L"so" }; } }; #else /// @brief File path separator const char FileSeparator = '/'; template<> struct FileTraits { constexpr static const auto FileSeparator = ::FileUtils::FileSeparator; - static std::string SharedLibraryPrefix() { return { "lib" }; } - static std::string SharedLibraryExt() { return { "so" }; } + static std::string PluginLibraryPrefix() { return { "lib" }; } + static std::string PluginLibraryExt() { return { "so" }; } }; template<> struct FileTraits { constexpr static const auto FileSeparator = L'/'; - static std::wstring SharedLibraryPrefix() { return { L"lib" }; } - static std::wstring SharedLibraryExt() { return { L"so" }; } + static std::wstring PluginLibraryPrefix() { return { L"lib" }; } + static std::wstring PluginLibraryExt() { return { L"so" }; } }; #endif @@ -172,11 +172,11 @@ inline std::basic_string fileExt(const std::basic_string &filename) { } template > -inline std::basic_string makeSharedLibraryName(const std::basic_string &path, const std::basic_string &input) { +inline std::basic_string makePluginLibraryName(const std::basic_string &path, const std::basic_string &input) { std::basic_string separator(1, FileTraits::FileSeparator); if (path.empty()) separator = {}; - return path + separator + FileTraits::SharedLibraryPrefix() + input + DotSymbol::value + FileTraits::SharedLibraryExt(); + return path + separator + FileTraits::PluginLibraryPrefix() + input + DotSymbol::value + FileTraits::PluginLibraryExt(); } #ifdef ENABLE_UNICODE_PATH_SUPPORT diff --git a/inference-engine/src/preprocessing/CMakeLists.txt b/inference-engine/src/preprocessing/CMakeLists.txt index 1d64cb5503b429..9e3f864f08c768 100644 --- a/inference-engine/src/preprocessing/CMakeLists.txt +++ b/inference-engine/src/preprocessing/CMakeLists.txt @@ -122,9 +122,9 @@ target_include_directories(${TARGET_NAME}_obj PRIVATE "${CMAKE_CURRENT_SOURCE_DI set_ie_threading_interface_for(${TARGET_NAME}_obj) -# Create shared library file from object library +# Create module library file from object library -add_library(${TARGET_NAME} SHARED +add_library(${TARGET_NAME} MODULE $) ie_add_vs_version_file(NAME ${TARGET_NAME} diff --git a/inference-engine/src/preprocessing/ie_preprocess_data.hpp b/inference-engine/src/preprocessing/ie_preprocess_data.hpp index df8bdd354c6b13..969141a9d3e9ac 100644 --- a/inference-engine/src/preprocessing/ie_preprocess_data.hpp +++ b/inference-engine/src/preprocessing/ie_preprocess_data.hpp @@ -87,11 +87,11 @@ using PreProcessDataPtr = InferenceEngine::details::SOPointer; inline PreProcessDataPtr CreatePreprocDataHelper() { FileUtils::FilePath libraryName = FileUtils::toFilePath(std::string("inference_engine_preproc") + std::string(IE_BUILD_POSTFIX)); - FileUtils::FilePath preprocLibraryPath = FileUtils::makeSharedLibraryName(getInferenceEngineLibraryPath(), libraryName); + FileUtils::FilePath preprocLibraryPath = FileUtils::makePluginLibraryName(getInferenceEngineLibraryPath(), libraryName); if (!FileUtils::fileExist(preprocLibraryPath)) { THROW_IE_EXCEPTION << "Please, make sure that pre-processing library " - << FileUtils::fromFilePath(::FileUtils::makeSharedLibraryName({}, libraryName)) << " is in " + << FileUtils::fromFilePath(::FileUtils::makePluginLibraryName({}, libraryName)) << " is in " << getIELibraryPath(); } return PreProcessDataPtr(preprocLibraryPath); diff --git a/inference-engine/src/readers/ir_reader/CMakeLists.txt b/inference-engine/src/readers/ir_reader/CMakeLists.txt index f46a73f891b828..bf6543efa89e98 100644 --- a/inference-engine/src/readers/ir_reader/CMakeLists.txt +++ b/inference-engine/src/readers/ir_reader/CMakeLists.txt @@ -12,9 +12,9 @@ file(GLOB_RECURSE LIBRARY_SRC ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp source_group("src" FILES ${LIBRARY_SRC}) -# Create shared library +# Create module library -add_library(${TARGET_NAME} SHARED ${LIBRARY_SRC}) +add_library(${TARGET_NAME} MODULE ${LIBRARY_SRC}) ie_faster_build(${TARGET_NAME} UNITY diff --git a/inference-engine/src/readers/ir_reader_v7/CMakeLists.txt b/inference-engine/src/readers/ir_reader_v7/CMakeLists.txt index 71c22e6a25fefb..53ebe0bc7b4152 100644 --- a/inference-engine/src/readers/ir_reader_v7/CMakeLists.txt +++ b/inference-engine/src/readers/ir_reader_v7/CMakeLists.txt @@ -14,9 +14,9 @@ list(APPEND LIBRARY_SRC ${IE_MAIN_SOURCE_DIR}/src/readers/ir_reader/ie_ir_reader source_group("src" FILES ${LIBRARY_SRC}) -# Create shared library +# Create module library -add_library(${TARGET_NAME} SHARED ${LIBRARY_SRC}) +add_library(${TARGET_NAME} MODULE ${LIBRARY_SRC}) ie_faster_build(${TARGET_NAME} UNITY diff --git a/inference-engine/src/readers/onnx_reader/CMakeLists.txt b/inference-engine/src/readers/onnx_reader/CMakeLists.txt index 754de3a90ef7ca..483a98e6e8c6cb 100644 --- a/inference-engine/src/readers/onnx_reader/CMakeLists.txt +++ b/inference-engine/src/readers/onnx_reader/CMakeLists.txt @@ -12,9 +12,9 @@ file(GLOB_RECURSE LIBRARY_SRC ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp source_group("src" FILES ${LIBRARY_SRC}) -# Create shared library +# Create module library -add_library(${TARGET_NAME} SHARED ${LIBRARY_SRC}) +add_library(${TARGET_NAME} MODULE ${LIBRARY_SRC}) ie_add_vs_version_file(NAME ${TARGET_NAME} FILEDESCRIPTION "Inference Engine ONNX reader plugin") diff --git a/inference-engine/tests/functional/inference_engine/core_threading_tests.cpp b/inference-engine/tests/functional/inference_engine/core_threading_tests.cpp index 2271ddd037e46c..8299dd39d60aff 100644 --- a/inference-engine/tests/functional/inference_engine/core_threading_tests.cpp +++ b/inference-engine/tests/functional/inference_engine/core_threading_tests.cpp @@ -47,7 +47,7 @@ class CoreThreadingTests : public ::testing::Test { void safeAddExtension(InferenceEngine::Core & ie) { try { auto extension = InferenceEngine::make_so_pointer( - FileUtils::makeSharedLibraryName({}, + FileUtils::makePluginLibraryName({}, std::string("template_extension") + IE_BUILD_POSTFIX)); ie.AddExtension(extension); } catch (const InferenceEngine::details::InferenceEngineException & ex) { @@ -93,11 +93,11 @@ TEST_F(CoreThreadingTests, RegisterPlugins) { std::ofstream file(pluginsXML); file << "::SharedLibraryPrefix(); + file << FileUtils::FileTraits::PluginLibraryPrefix(); file << "mock_engine"; file << IE_BUILD_POSTFIX; file << FileUtils::DotSymbol::value; - file << FileUtils::FileTraits::SharedLibraryExt(); + file << FileUtils::FileTraits::PluginLibraryExt(); file << "\" name=\""; file << indexStr; file << "\">"; diff --git a/inference-engine/tests/functional/inference_engine/extension.cpp b/inference-engine/tests/functional/inference_engine/extension.cpp index 551fdf97ba20ed..74ce5d7e78271d 100644 --- a/inference-engine/tests/functional/inference_engine/extension.cpp +++ b/inference-engine/tests/functional/inference_engine/extension.cpp @@ -269,7 +269,7 @@ TEST(Extension, XmlModelWithCustomAbs) { static std::string get_extension_path() { - return FileUtils::makeSharedLibraryName({}, + return FileUtils::makePluginLibraryName({}, std::string("template_extension") + IE_BUILD_POSTFIX); } diff --git a/inference-engine/tests/functional/inference_engine/ir_serialization/custom_ops.cpp b/inference-engine/tests/functional/inference_engine/ir_serialization/custom_ops.cpp index bc1d5c8b514854..43c1eb4a12ac2f 100644 --- a/inference-engine/tests/functional/inference_engine/ir_serialization/custom_ops.cpp +++ b/inference-engine/tests/functional/inference_engine/ir_serialization/custom_ops.cpp @@ -21,7 +21,7 @@ #endif static std::string get_extension_path() { - return FileUtils::makeSharedLibraryName( + return FileUtils::makePluginLibraryName( {}, std::string("template_extension") + IE_BUILD_POSTFIX); } diff --git a/inference-engine/tests/functional/inference_engine/shared_object_loader_test.cpp b/inference-engine/tests/functional/inference_engine/shared_object_loader_test.cpp index 12fd9b1f58063e..8da411cc405507 100644 --- a/inference-engine/tests/functional/inference_engine/shared_object_loader_test.cpp +++ b/inference-engine/tests/functional/inference_engine/shared_object_loader_test.cpp @@ -17,7 +17,7 @@ IE_SUPPRESS_DEPRECATED_START class SharedObjectLoaderTests: public ::testing::Test { protected: std::string get_mock_engine_name() { - return FileUtils::makeSharedLibraryName(getIELibraryPath(), + return FileUtils::makePluginLibraryName(getIELibraryPath(), std::string("mock_engine") + IE_BUILD_POSTFIX); } diff --git a/inference-engine/tests/functional/inference_engine/so_pointer_tests.cpp b/inference-engine/tests/functional/inference_engine/so_pointer_tests.cpp index d7432c07db93c5..7ca63f51206221 100644 --- a/inference-engine/tests/functional/inference_engine/so_pointer_tests.cpp +++ b/inference-engine/tests/functional/inference_engine/so_pointer_tests.cpp @@ -113,7 +113,7 @@ TEST_F(SymbolLoaderTests, throwCreateNullPtr) { } TEST_F(SymbolLoaderTests, instantiateSymbol) { - std::string name = FileUtils::makeSharedLibraryName(getIELibraryPath(), + std::string name = FileUtils::makePluginLibraryName(getIELibraryPath(), std::string("mock_engine") + IE_BUILD_POSTFIX); std::shared_ptr sharedLoader(new SharedObjectLoader(name.c_str())); SymbolLoader loader(sharedLoader); diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/core_integration.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/core_integration.hpp index 0b8224fa6af6f2..7b414376a9a0d5 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/core_integration.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/core_integration.hpp @@ -235,7 +235,7 @@ TEST(IEClassBasicTest, smoke_createNonExistingConfigThrows) { ASSERT_THROW(Core ie("nonExistPlugins.xml"), InferenceEngineException); } -#if defined __linux__ && !defined(__APPLE__) +#ifdef __linux__ TEST(IEClassBasicTest, smoke_createMockEngineConfigNoThrows) { SKIP_IF_CURRENT_TEST_IS_DISABLED() diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/core_threading_tests.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/core_threading_tests.hpp index 12efb80d2209c0..bed550a776aef5 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/core_threading_tests.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/core_threading_tests.hpp @@ -66,7 +66,7 @@ class CoreThreadingTestsBase { void safeAddExtension(InferenceEngine::Core & ie) { try { auto extension = InferenceEngine::make_so_pointer( - FileUtils::makeSharedLibraryName({}, "template_extension")); + FileUtils::makePluginLibraryName({}, "template_extension")); ie.AddExtension(extension); } catch (const InferenceEngine::details::InferenceEngineException & ex) { ASSERT_STR_CONTAINS(ex.what(), "name: experimental"); diff --git a/inference-engine/tests/ie_test_utils/common_test_utils/test_constants.hpp b/inference-engine/tests/ie_test_utils/common_test_utils/test_constants.hpp index 466b3c3016f3b2..3ab8e8db0a3154 100644 --- a/inference-engine/tests/ie_test_utils/common_test_utils/test_constants.hpp +++ b/inference-engine/tests/ie_test_utils/common_test_utils/test_constants.hpp @@ -27,7 +27,7 @@ const char DEVICE_HETERO[] = "HETERO"; #else #if defined __APPLE__ const char pre[] = "lib"; - const char ext[] = ".dylib"; + const char ext[] = ".so"; #else const char pre[] = "lib"; const char ext[] = ".so"; diff --git a/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/mock_engine/CMakeLists.txt b/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/mock_engine/CMakeLists.txt index 895e9426fa0b95..d6ea447435573d 100644 --- a/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/mock_engine/CMakeLists.txt +++ b/inference-engine/tests/ie_test_utils/unit_test_utils/mocks/mock_engine/CMakeLists.txt @@ -22,8 +22,8 @@ endif() source_group("src" FILES ${LIBRARY_SRC}) source_group("include" FILES ${LIBRARY_HEADERS}) -# Create library file from sources. -add_library(${TARGET_NAME} SHARED +# Create module library file from sources. +add_library(${TARGET_NAME} MODULE ${LIBRARY_SRC} ${LIBRARY_HEADERS}) diff --git a/inference-engine/tests/unit/inference_engine/ie_extension_test.cpp b/inference-engine/tests/unit/inference_engine/ie_extension_test.cpp index 6e944e52dc6614..2b23cbb80b0de8 100644 --- a/inference-engine/tests/unit/inference_engine/ie_extension_test.cpp +++ b/inference-engine/tests/unit/inference_engine/ie_extension_test.cpp @@ -20,7 +20,7 @@ using namespace InferenceEngine; using ExtensionTests = ::testing::Test; std::string getExtensionPath() { - return FileUtils::makeSharedLibraryName({}, + return FileUtils::makePluginLibraryName({}, std::string("template_extension") + IE_BUILD_POSTFIX); } diff --git a/inference-engine/tests_deprecated/unit/CMakeLists.txt b/inference-engine/tests_deprecated/unit/CMakeLists.txt index 787d349ed4bbba..400cde7ab66d9f 100644 --- a/inference-engine/tests_deprecated/unit/CMakeLists.txt +++ b/inference-engine/tests_deprecated/unit/CMakeLists.txt @@ -143,7 +143,6 @@ target_link_libraries(${TARGET_NAME} PRIVATE # dynamic libraries inference_engine_transformations - inference_engine_ir_v7_reader inference_engine_lp_transformations) if(TARGET libGNAStubs) From e57ae2e2fac8068043a022307bedc928ba0c877a Mon Sep 17 00:00:00 2001 From: Maxim Shevtsov Date: Wed, 23 Dec 2020 18:35:27 +0300 Subject: [PATCH 133/244] async network loading in the MULTI (#3599) * async network loading in the MULTI. makes the overall load time as MAX of the individual devices loading timings, as opposite to the current SUM * correct way of getting perf counters flag for the MULTI (adding to the async load PR, as this is minor change) * accomodating remark from the code review- MULTI enables the perf counters only if all devices support/enable that --- .../src/multi_device/multi_device_plugin.cpp | 40 ++++++++++++++----- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/inference-engine/src/multi_device/multi_device_plugin.cpp b/inference-engine/src/multi_device/multi_device_plugin.cpp index 85172e37723ee0..59feb12ecee92f 100644 --- a/inference-engine/src/multi_device/multi_device_plugin.cpp +++ b/inference-engine/src/multi_device/multi_device_plugin.cpp @@ -13,6 +13,7 @@ #include #include +#include #include "multi_device_plugin.hpp" // ------------------------------MultiDeviceInferencePlugin---------------------------- @@ -170,19 +171,40 @@ ExecutableNetworkInternal::Ptr MultiDeviceInferencePlugin::LoadExeNetworkImpl(co multiNetworkConfig.insert(*priorities); DeviceMap executableNetworkPerDevice; + std::mutex load_mutex; + std::vector loads; for (auto& p : metaDevices) { - auto & deviceName = p.deviceName; - auto & deviceConfig = p.config; - executableNetworkPerDevice.insert({ deviceName, GetCore()->LoadNetwork(network, deviceName, deviceConfig) }); - multiNetworkConfig.insert(deviceConfig.begin(), deviceConfig.end()); - } + loads.push_back([&]() { + const auto &deviceName = p.deviceName; + const auto &deviceConfig = p.config; + auto exec_net = GetCore()->LoadNetwork(network, deviceName, deviceConfig); + std::unique_lock lock{load_mutex}; + executableNetworkPerDevice.insert({deviceName, exec_net}); + multiNetworkConfig.insert(deviceConfig.begin(), deviceConfig.end()); + }); + } + auto executor = InferenceEngine::ExecutorManager::getInstance()->getIdleCPUStreamsExecutor( + IStreamsExecutor::Config{"MultiDeviceAsyncLoad", + static_cast(std::thread::hardware_concurrency()) /* max possible #streams*/, + 1 /*single thread per stream*/, + IStreamsExecutor::ThreadBindingType::NONE}); + executor->runAndWait(loads); if (executableNetworkPerDevice.empty()) - THROW_IE_EXCEPTION << NOT_FOUND_str << "Failed to load Executable network to any device " + THROW_IE_EXCEPTION << NOT_FOUND_str << "Failed to load network to any device " << "that the MULTI device is initialized to work with"; - auto perfConfig = fullConfig.find(PluginConfigParams::KEY_PERF_COUNT); - bool enablePerfCounters = (fullConfig.end() != perfConfig) && (perfConfig->second == PluginConfigParams::YES); - + // checking the perf counters config from the loaded network to respect both device's plugin and load-specific setting + int num_plugins_supporting_perf_counters = 0; + for (auto n : executableNetworkPerDevice) { + try { + num_plugins_supporting_perf_counters += + n.second.GetConfig(PluginConfigParams::KEY_PERF_COUNT).as() == + PluginConfigParams::YES; + } catch (...) { + } + } + // MULTI can enable the perf counters only if all devices support/enable that + bool enablePerfCounters = num_plugins_supporting_perf_counters == executableNetworkPerDevice.size(); return std::make_shared(executableNetworkPerDevice, metaDevices, multiNetworkConfig, From 4f0720176c4702333d5a479aa3383f03d6df4086 Mon Sep 17 00:00:00 2001 From: Sergey Lyubimtsev Date: Wed, 23 Dec 2020 23:27:23 +0300 Subject: [PATCH 134/244] CMake install fixes (#3600) * [MO] Add CMake install for Model Optimizer * [MO] Update test for version.py * [MO] Add CMake install for Model Optimizer * [MO] Update test for version.py * [MO] Add CMake install for Model Optimizer * [MO] Update test for version.py * - fix install paths for onnx_reader and ir_reader - remove static lib installation for plugins on plugins - 97-myriad-usbboot.rules is installed only for Linux * added new line * - Return GNAPlugin to default build list - Remove test artifacts from cmake install distribution - Remove nGraph static libs from cmake install distribution * revert install rule for archive(.lib) * revert install rule for onnx_importer (.lib) --- inference-engine/src/gna_plugin/CMakeLists.txt | 5 ++--- ngraph/test/runtime/ie/CMakeLists.txt | 5 ----- ngraph/test/runtime/interpreter/CMakeLists.txt | 6 +----- ngraph/test/util/CMakeLists.txt | 2 -- 4 files changed, 3 insertions(+), 15 deletions(-) diff --git a/inference-engine/src/gna_plugin/CMakeLists.txt b/inference-engine/src/gna_plugin/CMakeLists.txt index 49d96301b28c72..2e844945122570 100644 --- a/inference-engine/src/gna_plugin/CMakeLists.txt +++ b/inference-engine/src/gna_plugin/CMakeLists.txt @@ -49,7 +49,7 @@ ie_add_api_validator_post_build_step(TARGET ${TARGET_NAME}) # Static version for tests # -add_library(${TARGET_NAME}_test_static STATIC ${SOURCES} ${HEADERS}) +add_library(${TARGET_NAME}_test_static STATIC EXCLUDE_FROM_ALL ${SOURCES} ${HEADERS}) target_compile_definitions(${TARGET_NAME}_test_static PRIVATE @@ -66,8 +66,7 @@ target_include_directories(${TARGET_NAME}_test_static PUBLIC ${CMAKE_CURRENT_SOU set_target_properties(${TARGET_NAME}_test_static PROPERTIES COMPILE_PDB_NAME ${TARGET_NAME}_test_static) set_target_properties(${TARGET_NAME} ${TARGET_NAME}_test_static - PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO} - EXCLUDE_FROM_ALL ON) + PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO}) # install diff --git a/ngraph/test/runtime/ie/CMakeLists.txt b/ngraph/test/runtime/ie/CMakeLists.txt index 829d586eb5bcaa..e12a600a93acf4 100644 --- a/ngraph/test/runtime/ie/CMakeLists.txt +++ b/ngraph/test/runtime/ie/CMakeLists.txt @@ -41,8 +41,3 @@ add_dependencies(ie_backend inference_engine) target_compile_definitions(ie_backend PRIVATE IE_BACKEND_DLL_EXPORTS) target_include_directories(ie_backend PUBLIC ${IE_MAIN_SOURCE_DIR}/include) target_link_libraries(ie_backend PUBLIC ngraph_backend inference_engine) - -install(TARGETS ie_backend - LIBRARY DESTINATION "${NGRAPH_INSTALL_LIB}" - ARCHIVE DESTINATION "${NGRAPH_INSTALL_LIB}" -) diff --git a/ngraph/test/runtime/interpreter/CMakeLists.txt b/ngraph/test/runtime/interpreter/CMakeLists.txt index 40593ff663fe97..656fa13c7e8b7c 100644 --- a/ngraph/test/runtime/interpreter/CMakeLists.txt +++ b/ngraph/test/runtime/interpreter/CMakeLists.txt @@ -40,9 +40,5 @@ if (NGRAPH_INTERPRETER_ENABLE) SOVERSION ${NGRAPH_API_VERSION}) endif() target_link_libraries(interpreter_backend PUBLIC ngraph_backend) - install(TARGETS interpreter_backend - LIBRARY DESTINATION "${NGRAPH_INSTALL_LIB}" - ARCHIVE DESTINATION "${NGRAPH_INSTALL_LIB}" - RUNTIME DESTINATION "${NGRAPH_INSTALL_LIB}" - ) + endif() diff --git a/ngraph/test/util/CMakeLists.txt b/ngraph/test/util/CMakeLists.txt index e744e04d1453c4..0ad13e8412d9a3 100644 --- a/ngraph/test/util/CMakeLists.txt +++ b/ngraph/test/util/CMakeLists.txt @@ -43,5 +43,3 @@ if(NGRAPH_LIB_VERSIONING_ENABLE) endif() target_include_directories(ngraph_test_util PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/.. ${IE_MAIN_SOURCE_DIR}/include) target_link_libraries(ngraph_test_util PRIVATE ngraph ngraph_backend libgtest) - -install(TARGETS ngraph_test_util DESTINATION ${NGRAPH_INSTALL_LIB}) From 431485e4a6d56a616521be5ae2f9bb57a8fd399f Mon Sep 17 00:00:00 2001 From: Szymon Durawa Date: Thu, 24 Dec 2020 05:34:21 +0100 Subject: [PATCH 135/244] Visitor api ti implementation (#3576) * TensorIterator deserialization. Introduce new on_adapter(Function) and add implementation in on_adapter(void) for Input and Output Descriptions. Remove factory adapter. * Add comments to functions provided. Add missing on_adapter() after rebase. * Apply formatting. * Remove visit_attributes from SubGraphOp, remove declaration for createSubGraphLayer. * Add port map parsing to address not consecutive order of external_port_id appearance. * Remove header for factory_adapter. * Add on_adapter() in V10Parse::parse() function. * Add m_num_iterations initialization for concat output. * Remove redundant lines, add doxygen comments. * Change cpp/ie_cnn_network.h to local include, remove temporary map object from range for loop. * Restore protected access for SubGraphOp. --- .../convert_function_to_cnn_network.hpp | 2 +- .../src/convert_function_to_cnn_network.cpp | 221 ++++++++++++- .../src/readers/ir_reader/ie_ir_parser.cpp | 296 +++++++++++++++--- .../src/readers/ir_reader/ie_ir_parser.hpp | 88 ++---- .../core/include/ngraph/attribute_visitor.hpp | 7 + ngraph/core/include/ngraph/function.hpp | 15 +- .../include/ngraph/op/util/sub_graph_base.hpp | 91 ++---- ngraph/core/src/attribute_visitor.cpp | 6 + ngraph/core/src/function.cpp | 267 ---------------- ngraph/core/src/op/tensor_iterator.cpp | 18 +- ngraph/core/src/op/util/sub_graph_base.cpp | 150 --------- 11 files changed, 574 insertions(+), 587 deletions(-) diff --git a/inference-engine/src/legacy_api/include/legacy/convert_function_to_cnn_network.hpp b/inference-engine/src/legacy_api/include/legacy/convert_function_to_cnn_network.hpp index 92193a27583793..778f3b4948050d 100644 --- a/inference-engine/src/legacy_api/include/legacy/convert_function_to_cnn_network.hpp +++ b/inference-engine/src/legacy_api/include/legacy/convert_function_to_cnn_network.hpp @@ -27,7 +27,7 @@ convertFunctionToICNNNetwork(const std::shared_ptr& gr const ICNNNetwork &ngraphNetwork, CNNNetworkImpl* cnnNetworkImpl, bool keep_constant_inputs = false); - + // TODO: move ConstAllocatorWrapper class, shareWeights add addBlob into CNNLayerCreator when NodeConverter class is removed class ConstAllocatorWrapper : public IAllocator { public: diff --git a/inference-engine/src/legacy_api/src/convert_function_to_cnn_network.cpp b/inference-engine/src/legacy_api/src/convert_function_to_cnn_network.cpp index fecb8d8a5a85e3..f997f8210b2b76 100644 --- a/inference-engine/src/legacy_api/src/convert_function_to_cnn_network.cpp +++ b/inference-engine/src/legacy_api/src/convert_function_to_cnn_network.cpp @@ -49,8 +49,11 @@ #include "transformations/utils/utils.hpp" #include "transformations/rt_info/fused_names_attribute.hpp" #include "transformations/rt_info/primitives_priority_attribute.hpp" +#include "cpp/ie_cnn_network.h" #include "legacy/convert_function_to_cnn_network.hpp" +#include "legacy/graph_tools.hpp" +#include "legacy/net_pass.h" #include "ie_legacy_itt.hpp" #include "ie_cnn_layer_builder_ngraph.h" @@ -66,6 +69,210 @@ namespace details { return nullptr;\ });\ +/// \brief Creates legacy representation of CNNLayer for SubGraphOp. +/// \param layer node type +/// \return pointer to CNNLayer with legacy representation of SubGraphOp. +CNNLayer::Ptr createSubGraphLayer(const std::shared_ptr& layer) { + auto sub_graph = std::dynamic_pointer_cast(layer); + if (!sub_graph) { + THROW_IE_EXCEPTION << "Cannot cast layer to SubGraphOp."; + } + + // inputs/outputs of TensorIterator (ngraph representation) + auto parameters = sub_graph->get_function()->get_parameters(); + auto results = sub_graph->get_function()->get_results(); + + // Convert body (ngraph representation) to CNNNetwork. + // This network will contain nodes of type = "Input" and data nodes with wrong names. + // IE TensorIterator doesn't include such nodes so we create CNNNetwork in a separate scope + // to call the destructor and delete these "Input"/data nodes. + + TensorIterator::Body body; + { + InferenceEngine::CNNNetwork body_net(sub_graph->get_function()); + InferenceEngine::CNNNetwork net(InferenceEngine::details::convertFunctionToICNNNetwork(body_net.getFunction(), body_net)); + // Paranoid check for cycles + bool res = CNNNetForestDFS( + CNNNetGetAllInputLayers(net), [](const CNNLayerPtr& layer) {}, false); + if (!res) { + THROW_IE_EXCEPTION << "Loop detected. SubGraphOp body should not contain loops."; + } + + // Get inputs/outputs of cnn network + auto in_info_map_with_parameters = net.getInputsInfo(); + auto out_info_map = net.getOutputsInfo(); + + IE_ASSERT(in_info_map_with_parameters.size() == parameters.size()); + IE_ASSERT(out_info_map.size() == results.size()); + + InferenceEngine::TensorIterator::Body temp_body; + temp_body.inputs.resize(in_info_map_with_parameters.size()); + temp_body.outputs.resize(out_info_map.size()); + + // Fill inputs/outs in order aligned with ng representation + uint64_t counter = 0; + for (const auto& param : parameters) { + auto info = in_info_map_with_parameters.at(param->get_friendly_name()); + temp_body.inputs[counter++] = info->getInputData(); + } + + auto map_ng_result_to_ie_name = [] (std::shared_ptr res_op) { + auto result = res_op->input(0).get_source_output(); + + std::string name = result.get_node()->get_friendly_name(); + if (result.get_node()->get_output_size() > 1) { + name += "." + std::to_string(result.get_index()); + } + return name; + }; + + counter = 0; + for (const auto& result : results) { + auto data = out_info_map.at(map_ng_result_to_ie_name(result)); + temp_body.outputs[counter++] = data; + } + + // This deep copy will hold all unreachable constants. See the comment in CopyTIBody function. + body = InferenceEngine::NetPass::CopyTIBody(temp_body); + + // Check if data is really const layer holder + auto is_constant_holder = [] (const DataPtr data) { + return data->getPrecision() == Precision::UNSPECIFIED; + }; + + // Strip unreached node holder from Inputs node. + auto holder = body.inputs.back(); + if (is_constant_holder(holder)) { + auto& holder_map = getInputTo(holder); + + for( auto it = holder_map.begin(); it != holder_map.end(); ) { + if( it->second->type == "Input") + it = holder_map.erase(it); + else + ++it; + } + } + + // TODO: Disable this WA after total switch onto Ngraph + // WA: Some plugins (like GPU) require matching of Data object name and producer Layer name. + // Data name is expected in format "[layer_name]" or "[layer_name].[port_idx]" in case + // of multiple inputs. We have to restore it if possible and ignore original names of + // Ngraph parameter and result ops. + // Will not change data name if: + // - data has several consumer layers + // - data has no consumer (example if data is straight used as output) + // + for (auto &in : body.inputs) { + if (is_constant_holder(in)) + continue; + + const auto input_to = getInputTo(in); + if (input_to.size() != 1) + continue; + + const auto consumer_layer = input_to.begin()->second; + const auto consumer_in_port_set = consumer_layer->insData; + const auto found = std::find_if(consumer_in_port_set.begin(), consumer_in_port_set.end(), + [&in] (const DataWeakPtr &wptr) { return wptr.lock() == in; }); + IE_ASSERT(found != consumer_in_port_set.end()); + const auto consumer_port_idx = std::distance(consumer_in_port_set.begin(), found); + + auto new_name = consumer_layer->name; + if (consumer_in_port_set.size() > 1) { + new_name += '.' + std::to_string(consumer_port_idx); + } + in->setName(new_name); + } + + // TODO: this WA restore original precisions of outputs. + // convertFunctionToICNNNetwork has internal fallback policy for unsupported + // precisions for inputs/outputs ports. Particular for U8 will be translated + // to FP32. However Loop body has strong requirements for continue_condition + // port, it should be BOOL(U8). + // + for (int i = 0; i < results.size(); i++) { + auto result = results[i]; + auto output = body.outputs[i]; + if (result->get_element_type() == ngraph::element::u8) { + output->setPrecision(InferenceEngine::Precision::U8); + } + } + } + + // Create Inference Engine representation of TensorIterator + LayerParams params = {layer->get_friendly_name(), "TensorIterator", + details::convertPrecision(layer->get_output_element_type(0))}; + auto res = std::make_shared(params); + res->body = body; + + // Port map: outputs + for (const auto& desc : sub_graph->get_output_descriptions()) { + auto body_output_idx = desc->m_body_value_index; + + std::string type_name = desc->get_type_info().name; + if (type_name == "ConcatOutputDescription") { + auto output_desc = ::ngraph::as_type_ptr(desc); + IE_ASSERT(output_desc != nullptr); + + res->output_port_map.emplace_back(InferenceEngine::TensorIterator::PortMap { + static_cast(output_desc->m_output_index), static_cast(body_output_idx), + static_cast(output_desc->m_axis), static_cast(output_desc->m_stride), + static_cast(output_desc->m_start), static_cast(output_desc->m_end), + static_cast(output_desc->m_part_size)}); + } else if (type_name == "BodyOutputDescription") { + auto output_desc = ::ngraph::as_type_ptr(desc); + IE_ASSERT(output_desc != nullptr); + + res->output_port_map.emplace_back(InferenceEngine::TensorIterator::PortMap { + static_cast(output_desc->m_output_index), static_cast(body_output_idx), -1, 1, 0, -1, 1}); + } else { + THROW_IE_EXCEPTION << "Incorrect type of the output description."; + } + } + + // Port map : inputs and back edges + for (const auto& desc : sub_graph->get_input_descriptions()) { + auto body_input_index = desc->m_body_parameter_index; + + if (const auto slice_desc = std::dynamic_pointer_cast(desc)) { + res->input_port_map.emplace_back(InferenceEngine::TensorIterator::PortMap { + static_cast(slice_desc->m_input_index), static_cast(body_input_index), + static_cast(slice_desc->m_axis), static_cast(slice_desc->m_stride), + static_cast(slice_desc->m_start), static_cast(slice_desc->m_end), + static_cast(slice_desc->m_part_size)}); + } else if (const auto merge_desc = std::dynamic_pointer_cast(desc)) { + res->input_port_map.emplace_back(InferenceEngine::TensorIterator::PortMap { + static_cast(merge_desc->m_input_index), static_cast(body_input_index), -1, 1, 0, -1, 1}); + + auto body_output_idx = merge_desc->m_body_value_index; + + res->back_edges.emplace_back(InferenceEngine::TensorIterator::PortMap { + static_cast(body_output_idx), static_cast(body_input_index), -1, 1, 0, -1, 1}); + } else if (const auto inv_desc = std::dynamic_pointer_cast(desc)) { + res->input_port_map.emplace_back(InferenceEngine::TensorIterator::PortMap { + static_cast(inv_desc->m_input_index), static_cast(body_input_index), -1, 1, 0, -1, 1}); + } else { + THROW_IE_EXCEPTION << "Incorrect type of the input description."; + } + } + + if (const auto loop_op = std::dynamic_pointer_cast(layer)) { + auto spec_port = loop_op->get_special_body_ports(); + if (spec_port.current_iteration_input_idx != -1) { + auto ie_port_idx = spec_port.current_iteration_input_idx; + res->params["loop_body_current_iteration_idx"] = std::to_string(ie_port_idx); + } + if (spec_port.body_condition_output_idx != -1) { + auto body_output_idx = spec_port.body_condition_output_idx; + res->params["loop_body_condition_output_idx"] = std::to_string(body_output_idx); + } + res->params["loop_trip_count_idx"] = "0"; + res->params["loop_execution_condition_idx"] = "1"; + } + + return res; +} + /** * @brief Creator for CNNLayer from nGraph op */ @@ -134,6 +341,9 @@ class CNNLayerCreator : public ::ngraph::AttributeVisitor { params[name] = joinVec(data); } + void on_adapter(const std::string& name, ::ngraph::ValueAccessor>& adapter) override { + } + void on_adapter(const std::string& name, ::ngraph::ValueAccessor& adapter) override; void on_adapter(const std::string& name, ::ngraph::ValueAccessor& adapter) override { @@ -171,6 +381,10 @@ void InferenceEngine::details::CNNLayerCreator::on_adapter(const std::string& na } else if (auto a = ::ngraph::as_type<::ngraph::AttributeAdapter>>(& adapter)) { auto data = a->get(); params[name] = joinVec(data); + } else if (auto a = ::ngraph::as_type<::ngraph::AttributeAdapter>>>(& adapter)) { + } else if (auto a = ::ngraph::as_type<::ngraph::AttributeAdapter>>>(& adapter)) { } else { THROW_IE_EXCEPTION << "Error converting ngraph to CNN network. " "Attribute adapter can not be found for " << name << " parameter"; @@ -1300,6 +1514,12 @@ InferenceEngine::details::CNNLayerCreator::CNNLayerCreator(const std::shared_ptr res->params["ctc_merge_repeated"] = res->getBoolStrParamAsIntStr("ctc_merge_repeated"); return res; }); + + addSpecificCreator({"TensorIterator"}, [](const std::shared_ptr<::ngraph::Node>& node, const std::map& params) -> CNNLayerPtr { + auto res = createSubGraphLayer(node); + res->type = "TensorIterator"; + return res; + }); } CNNLayerPtr InferenceEngine::details::CNNLayerCreator::create() { @@ -1344,7 +1564,6 @@ void convertFunctionToICNNNetwork(const std::shared_ptr>(), std::make_shared>(), std::make_shared>(), - std::make_shared>(), std::make_shared>(), std::make_shared>(), std::make_shared>(), diff --git a/inference-engine/src/readers/ir_reader/ie_ir_parser.cpp b/inference-engine/src/readers/ir_reader/ie_ir_parser.cpp index e7df22a4122167..3fdd05967e242e 100644 --- a/inference-engine/src/readers/ir_reader/ie_ir_parser.cpp +++ b/inference-engine/src/readers/ir_reader/ie_ir_parser.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include "ie_blob_stream.hpp" @@ -46,44 +47,223 @@ IRParser::IRParser(size_t version, const std::vector IRParser::parse(const pugi::xml_node& root, const Blob::CPtr& weights) { - return parser->parse(root, weights); +void V10Parser::XmlDeserializer::map_type_in_function(const pugi::xml_node& node, + const std::string map_type, std::map& type_id_in_function) { + uint64_t map_type_number = 0; + auto body_node = node.child("body"); + + if (body_node.empty()) { + THROW_IE_EXCEPTION << "Missing body part."; + } + + // Fill map: parameter/result id to parameter/result number in Function + FOREACH_CHILD(_layer, body_node.child("layers"), "layer") { + auto type = XMLParseUtils::GetStrAttr(_layer, "type"); + + if (type == map_type) { + auto id = XMLParseUtils::GetUIntAttr(_layer, "id"); + type_id_in_function[id] = map_type_number; + map_type_number++; + } + } } -/** - * Hold original blob in order to avoid situations when original blob is allocated on stack - */ -class WeightsHolderBlob : public TBlob { - Blob::CPtr originBlob; +std::vector> V10Parser::XmlDeserializer::parseInputDescription(const pugi::xml_node& node) { + std::vector> inputs; + std::map param_id_in_function; + std::map result_id_in_function; + map_type_in_function(node, "Parameter", param_id_in_function); + map_type_in_function(node, "Result", result_id_in_function); -public: - explicit WeightsHolderBlob(const Blob::CPtr& weights) : - TBlob(weights->getTensorDesc(), - weights->cbuffer().as()), - originBlob(weights) { } -}; + // Parse PortMap: external_port_id for inputs does not always appear in consecutive order + std::map input_map; + FOREACH_CHILD(_input, node.child("port_map"), "input") { + int64_t ext_port_id = GetInt64Attr(_input, "external_port_id"); + input_map[ext_port_id] = _input; + } -V10Parser::V10Parser(const std::vector& exts) : _exts(exts) { - // Load default opsets - opsets["opset1"] = ngraph::get_opset1(); - opsets["opset2"] = ngraph::get_opset2(); - opsets["opset3"] = ngraph::get_opset3(); - opsets["opset4"] = ngraph::get_opset4(); - opsets["opset5"] = ngraph::get_opset5(); - opsets["opset6"] = ngraph::get_opset6(); + for (const auto& input : input_map) { + auto &_input = input.second; + auto axis_attr = _input.attribute("axis"); + auto purpose = XMLParseUtils::GetStrAttr(_input, "purpose", ""); + int64_t ti_input_index = XMLParseUtils::GetInt64Attr(_input, "external_port_id"); + size_t body_parameter_index = XMLParseUtils::GetUIntAttr(_input, "internal_layer_id"); - // Load custom opsets - for (const auto& ext : exts) { - std::map extOpsets = ext->getOpSets(); - for (const auto& it : extOpsets) { - if (opsets.find(it.first) != opsets.end()) - THROW_IE_EXCEPTION << "Cannot add opset with name: " << it.first << ". Opset with the same name already exists."; - opsets[it.first] = it.second; + // if axis is set, then slicing is enabled. Create ngraph::TensorIterator::SlicedInput. + if (!axis_attr.empty()) { + size_t axis = XMLParseUtils::GetUIntAttr(_input, "axis"); + int64_t start = XMLParseUtils::GetInt64Attr(_input, "start", 0); + int64_t stride = XMLParseUtils::GetInt64Attr(_input, "stride", 1); + int64_t end = XMLParseUtils::GetInt64Attr(_input, "end", -1); + int64_t part_size = XMLParseUtils::GetInt64Attr(_input, "part_size", 1); + + inputs.push_back(std::make_shared + (ti_input_index, + param_id_in_function[body_parameter_index], + start, + stride, + part_size, + end, + axis)); + } else { + // otherwise find corresponding back edge and create ngraph::TensorIterator::MergedInput + bool is_back_edge_exist = false; + FOREACH_CHILD(_edge, node.child("back_edges"), "edge") { + size_t to_layer = XMLParseUtils::GetUIntAttr(_edge, "to-layer"); + + if (to_layer == body_parameter_index) { + size_t from_layer = XMLParseUtils::GetUIntAttr(_edge, "from-layer"); + inputs.push_back(std::make_shared + (ti_input_index, + param_id_in_function[body_parameter_index], + result_id_in_function[from_layer])); + + is_back_edge_exist = true; + break; + } + } + + // ti_input_index = -1 means that Parameter of the body is not connected to inputs of TensorIterator + // and is used only for internal needs. + if (!is_back_edge_exist && ti_input_index >= 0) { + inputs.push_back(std::make_shared + (ti_input_index, + param_id_in_function[body_parameter_index])); + } } } + return inputs; } -std::shared_ptr V10Parser::parse(const pugi::xml_node& root, const Blob::CPtr& weights) { +std::vector> V10Parser::XmlDeserializer::parseOutputDescription(const pugi::xml_node& node) { + std::vector> outputs; + std::map result_id_in_function; + map_type_in_function(node, "Result", result_id_in_function); + + // Parse PortMap: outputs + std::map output_map; + FOREACH_CHILD(_output, node.child("port_map"), "output") { + int64_t ext_port_id = GetInt64Attr(_output, "external_port_id"); + output_map[ext_port_id] = _output; + } + + uint64_t output_number = 0; + for (const auto& output : output_map) { + auto& _output = output.second; + auto axis_attr = _output.attribute("axis"); + auto purpose = XMLParseUtils::GetStrAttr(_output, "purpose", ""); + size_t body_result_index = XMLParseUtils::GetUIntAttr(_output, "internal_layer_id"); + + // if axis is set, then concatenation is enabled. Create ngraph::TensorIterator::ConcatOutput. + if (!axis_attr.empty()) { + int64_t axis = XMLParseUtils::GetInt64Attr(_output, "axis"); + int64_t start = XMLParseUtils::GetInt64Attr(_output, "start", 0); + int64_t stride = XMLParseUtils::GetInt64Attr(_output, "stride", 1); + int64_t end = XMLParseUtils::GetInt64Attr(_output, "end", -1); + int64_t part_size = XMLParseUtils::GetInt64Attr(_output, "part_size", 1); + + outputs.push_back(std::make_shared + (result_id_in_function[body_result_index], + output_number, + start, + stride, + part_size, + end, + axis)); + } else { + // otherwise create ngraph::TensorIterator::BodyOutput. -1 means last iteration. + outputs.push_back(std::make_shared + (result_id_in_function[body_result_index], + output_number, + -1)); + } + output_number++; + } + return outputs; +} + +void V10Parser::XmlDeserializer::on_adapter(const std::string& name, ngraph::ValueAccessor& adapter) { + std::string val; + + // for TensorIterator look for 'port_map' as 'data' does not exist + if (node.child("port_map")) { + if (auto a = ngraph::as_type>>>(&adapter)) { + a->set(parseInputDescription(node)); + } else if (auto a = ngraph::as_type>>>(&adapter)) { + a->set(parseOutputDescription(node)); + } + } + + if (!getStrAttribute(node.child("data"), name, val)) return; + if (auto a = ngraph::as_type>(&adapter)) { + static_cast(*a) = details::convertPrecision(val); + } else if (auto a = ngraph::as_type>(&adapter)) { + std::vector shape; + std::vector dims; + if (!getParameters(node.child("data"), name, shape)) return; + for (const auto& dim : shape) dims.emplace_back(dim); + static_cast(*a) = ngraph::PartialShape(dims); + } else if (auto a = ngraph::as_type>(&adapter)) { + std::vector shape; + if (!getParameters(node.child("data"), name, shape)) return; + static_cast(*a) = ngraph::Shape(shape); + } else if (auto a = ngraph::as_type>(&adapter)) { + std::vector shape; + if (!getParameters(node.child("data"), name, shape)) return; + static_cast(*a) = ngraph::Strides(shape); +#ifdef __APPLE__ + } else if (auto a = ngraph::as_type>>(&adapter)) { + std::vector result; + if (!getParameters(node.child("data"), name, result)) return; + static_cast&>(*a) = result; +#else + } else if (auto a = ngraph::as_type>>(&adapter)) { + std::vector result; + if (!getParameters(node.child("data"), name, result)) return; + a->set(result); +#endif + } else if (auto a = ngraph::as_type>(&adapter)) { + std::vector axes; + if (!getParameters(node.child("data"), name, axes)) return; + static_cast(*a) = ngraph::AxisSet(axes); + } else if (auto a = ngraph::as_type>(&adapter)) { + if (!getStrAttribute(node.child("data"), name, val)) return; + static_cast(*a) = ngraph::as_enum(val); + } else if (auto a = ngraph::as_type>(&adapter)) { + if (!getStrAttribute(node.child("data"), name, val)) return; + static_cast(*a) = ngraph::as_enum(val); + } else if (auto a = ngraph::as_type>(&adapter)) { + std::vector shape; + if (!getParameters(node.child("data"), name, shape)) return; + std::vector coord_diff(shape.begin(), shape.end()); + static_cast(*a) = ngraph::CoordinateDiff(coord_diff); + } else { + THROW_IE_EXCEPTION << "Error IR reading. Attribute adapter can not be found for " << name + << " parameter"; + } +} + +void V10Parser::XmlDeserializer::on_adapter(const std::string& name, ngraph::ValueAccessor>& adapter) { + std::shared_ptr ngraph_function; + if (!name.compare("body")) { + auto body_node = node.child(name.c_str()); + if (body_node.empty()) { + THROW_IE_EXCEPTION << "TensorIterator has no body."; + } + ngraph_function = parse_function(node.child(name.c_str()), weights); + } else if (!name.compare("net")) { + ngraph_function = parse_function(node, weights); + } else { + THROW_IE_EXCEPTION << "Error: not recognized adapter name: " << name << "."; + } + // Disabled reshape for generic operations in the TI body + ngraph::op::GenericIE::DisableReshape noReshape(ngraph_function); + adapter.set(ngraph_function); +} + +std::shared_ptr V10Parser::XmlDeserializer::parse_function(const pugi::xml_node& root, const Blob::CPtr& weights) { OV_ITT_TASK_CHAIN(taskChain, itt::domains::V10Reader_RT, "V10Parser", "Parse"); using node_params = struct { @@ -202,8 +382,53 @@ std::shared_ptr V10Parser::parse(const pugi::xml_node& root, const OV_ITT_TASK_NEXT(taskChain, "ConstructCNNNetwork"); - CNNNetwork net(function, _exts); + return function; +} + +std::shared_ptr IRParser::parse(const pugi::xml_node& root, const Blob::CPtr& weights) { + return parser->parse(root, weights); +} + +/** + * Hold original blob in order to avoid situations when original blob is allocated on stack + */ +class WeightsHolderBlob : public TBlob { + Blob::CPtr originBlob; + +public: + explicit WeightsHolderBlob(const Blob::CPtr& weights) : + TBlob(weights->getTensorDesc(), + weights->cbuffer().as()), + originBlob(weights) { } +}; + +V10Parser::V10Parser(const std::vector& exts) : _exts(exts) { + // Load default opsets + opsets["opset1"] = ngraph::get_opset1(); + opsets["opset2"] = ngraph::get_opset2(); + opsets["opset3"] = ngraph::get_opset3(); + opsets["opset4"] = ngraph::get_opset4(); + opsets["opset5"] = ngraph::get_opset5(); + opsets["opset6"] = ngraph::get_opset6(); + // Load custom opsets + for (const auto& ext : exts) { + for (const auto& it : ext->getOpSets()) { + if (opsets.find(it.first) != opsets.end()) + THROW_IE_EXCEPTION << "Cannot add opset with name: " << it.first << ". Opset with the same name already exists."; + opsets[it.first] = it.second; + } + } +} + +std::shared_ptr V10Parser::parse(const pugi::xml_node& root, const Blob::CPtr& weights) { + OV_ITT_TASK_CHAIN(taskChain, itt::domains::V10Reader_RT, "V10Parser", "Parse"); + + std::shared_ptr function; + XmlDeserializer visitor(root, weights, opsets); + visitor.on_attribute("net", function); + + CNNNetwork net(function, _exts); parsePreProcess(net, root, weights); return net; @@ -335,7 +560,7 @@ void V10Parser::parsePreProcess(CNNNetwork& network, const pugi::xml_node& root, } } -V10Parser::GenericLayerParams V10Parser::parseGenericParams(const pugi::xml_node& node) { +V10Parser::GenericLayerParams V10Parser::XmlDeserializer::parseGenericParams(const pugi::xml_node& node) { const auto parsePort = [](const pugi::xml_node& parentNode, const GenericLayerParams& params, bool input) -> GenericLayerParams::LayerPortData { @@ -392,8 +617,10 @@ bool V10Parser::LayerBaseCreator::shouldCreate(const std::string& nodeType) cons return comparator(nodeType, type); } -std::shared_ptr V10Parser::createNode(const std::vector>& inputs, - const pugi::xml_node& node, const Blob::CPtr& weights, +std::shared_ptr V10Parser::XmlDeserializer::createNode( + const std::vector>& inputs, + const pugi::xml_node& node, + const Blob::CPtr& weights, const GenericLayerParams& params) { static std::vector> creators = { std::make_shared>("DeformableConvolution"), @@ -412,7 +639,6 @@ std::shared_ptr V10Parser::createNode(const std::vector>("Result"), std::make_shared>("PSROIPooling"), std::make_shared>("VariadicSplit"), - std::make_shared>("TensorIterator"), std::make_shared>("Loop"), std::make_shared>("LogicalAnd"), std::make_shared>("LogicalOr"), @@ -483,7 +709,7 @@ std::shared_ptr V10Parser::createNode(const std::vector(opset.create_insensitive(type)); ngraphNode->set_friendly_name(params.name); ngraphNode->set_arguments(inputs); - XmlDeserializer visitor(node, weights); + XmlDeserializer visitor(node, weights, opsets); if (ngraphNode->visit_attributes(visitor)) ngraphNode->constructor_validate_and_infer_types(); } diff --git a/inference-engine/src/readers/ir_reader/ie_ir_parser.hpp b/inference-engine/src/readers/ir_reader/ie_ir_parser.hpp index 689881bf90c941..b4cdef9e8800b5 100644 --- a/inference-engine/src/readers/ir_reader/ie_ir_parser.hpp +++ b/inference-engine/src/readers/ir_reader/ie_ir_parser.hpp @@ -8,6 +8,7 @@ # include # include # include +# include #endif // IR_READER_V10 #include @@ -51,7 +52,6 @@ class CNNParser : public IParser { }; #ifdef IR_READER_V10 - class V10Parser : public IParser { public: explicit V10Parser(const std::vector& exts); @@ -171,10 +171,6 @@ class V10Parser : public IParser { } }; - std::shared_ptr createNode(const ngraph::OutputVector& inputs, const pugi::xml_node& node, - const Blob::CPtr& weights, const GenericLayerParams& params); - - GenericLayerParams parseGenericParams(const pugi::xml_node& node); void parsePreProcess(CNNNetwork& network, const pugi::xml_node& root, const Blob::CPtr& weights); std::map portsToData; @@ -182,7 +178,8 @@ class V10Parser : public IParser { class XmlDeserializer : public ngraph::AttributeVisitor { public: - explicit XmlDeserializer(const pugi::xml_node& node, const Blob::CPtr& weights): node(node), weights(weights) {} + explicit XmlDeserializer(const pugi::xml_node& node, const Blob::CPtr& weights, + const std::map& opsets) : node(node), weights(weights), opsets(opsets) {} void on_adapter(const std::string& name, ngraph::ValueAccessor& value) override { std::string val; if (!getStrAttribute(node.child("data"), name, val)) return; @@ -203,56 +200,7 @@ class V10Parser : public IParser { if (!is_true && !is_false) return; value.set(is_true); } - void on_adapter(const std::string& name, ngraph::ValueAccessor& adapter) override { - std::string val; - if (!getStrAttribute(node.child("data"), name, val)) return; - if (auto a = ngraph::as_type>(&adapter)) { - static_cast(*a) = details::convertPrecision(val); - } else if (auto a = ngraph::as_type>(&adapter)) { - std::vector shape; - std::vector dims; - if (!getParameters(node.child("data"), name, shape)) return; - for (const auto& dim : shape) dims.emplace_back(dim); - static_cast(*a) = ngraph::PartialShape(dims); - } else if (auto a = ngraph::as_type>(&adapter)) { - std::vector shape; - if (!getParameters(node.child("data"), name, shape)) return; - static_cast(*a) = ngraph::Shape(shape); - } else if (auto a = ngraph::as_type>(&adapter)) { - std::vector shape; - if (!getParameters(node.child("data"), name, shape)) return; - static_cast(*a) = ngraph::Strides(shape); -#ifdef __APPLE__ - } else if (auto a = ngraph::as_type>>(&adapter)) { - std::vector result; - if (!getParameters(node.child("data"), name, result)) return; - static_cast&>(*a) = result; -#else - } else if (auto a = ngraph::as_type>>(&adapter)) { - std::vector result; - if (!getParameters(node.child("data"), name, result)) return; - a->set(result); -#endif - } else if (auto a = ngraph::as_type>(&adapter)) { - std::vector axes; - if (!getParameters(node.child("data"), name, axes)) return; - static_cast(*a) = ngraph::AxisSet(axes); - } else if (auto a = ngraph::as_type>(&adapter)) { - if (!getStrAttribute(node.child("data"), name, val)) return; - static_cast(*a) = ngraph::as_enum(val); - } else if (auto a = ngraph::as_type>(&adapter)) { - if (!getStrAttribute(node.child("data"), name, val)) return; - static_cast(*a) = ngraph::as_enum(val); - } else if (auto a = ngraph::as_type>(&adapter)) { - std::vector shape; - if (!getParameters(node.child("data"), name, shape)) return; - std::vector coord_diff(shape.begin(), shape.end()); - static_cast(*a) = ngraph::CoordinateDiff(coord_diff); - } else { - THROW_IE_EXCEPTION << "Error IR reading. Attribute adapter can not be found for " << name - << " parameter"; - } - } + void on_adapter(const std::string& name, ngraph::ValueAccessor& adapter) override; void on_adapter(const std::string& name, ngraph::ValueAccessor& adapter) override { std::string val; if (!getStrAttribute(node.child("data"), name, val)) @@ -307,6 +255,8 @@ class V10Parser : public IParser { adapter.set(value); } + void on_adapter(const std::string& name, ngraph::ValueAccessor>& adapter) override; + void on_adapter(const std::string& name, ngraph::ValueAccessor>& adapter) override { std::vector value; if (!getParameters(node.child("data"), name, value)) return; @@ -334,6 +284,32 @@ class V10Parser : public IParser { private: const pugi::xml_node node; const Blob::CPtr& weights; + const std::map& opsets; + /// \brief Traverses port_map in order to create vector of InputDescription shared_ptrs. + /// Shall be used only for ops which have port_map attribute. + /// \param node xml op representation + std::vector> parseInputDescription( + const pugi::xml_node& node); + /// \brief Traverses port_map in order to create vector of OutputDescription shared_ptrs. + /// Shall be used only for ops which have port_map attribute. + /// \param node xml op representation + std::vector> parseOutputDescription( + const pugi::xml_node& node); + /// \brief Traverses nGraph body function for specified op type and creates a map of all + /// op iterations. Map constains type id and assigned to it consecutive number starting from 0. + /// \param node xml op representation + /// \param type op type name to find + /// \param type_id_in_function map container + void map_type_in_function(const pugi::xml_node& node, std::string type, std::map& type_id_in_function); + /// \brief Traverses xml node representation in order to create nGraph function for it. + /// \param node xml node representation + /// \param weights weights attached to current node + /// \return shared pointer to function representing input node + std::shared_ptr parse_function(const pugi::xml_node& root, const Blob::CPtr& weights); + + GenericLayerParams parseGenericParams(const pugi::xml_node& node); + std::shared_ptr createNode(const ngraph::OutputVector& inputs, const pugi::xml_node& node, + const Blob::CPtr& weights, const GenericLayerParams& params); bool getStrAttribute(const pugi::xml_node& node, const std::string& name, std::string& value) { if (!node) return false; diff --git a/ngraph/core/include/ngraph/attribute_visitor.hpp b/ngraph/core/include/ngraph/attribute_visitor.hpp index b837444bacc192..26993f956f9963 100644 --- a/ngraph/core/include/ngraph/attribute_visitor.hpp +++ b/ngraph/core/include/ngraph/attribute_visitor.hpp @@ -30,6 +30,7 @@ namespace ngraph class ValueAccessor; class VisitorAdapter; class Node; + class Function; /// \brief Visits the attributes of a node, primarily for serialization-like tasks. /// @@ -116,6 +117,12 @@ namespace ngraph /// \brief Hook for adapters that need visitor access virtual void on_adapter(const std::string& name, VisitorAdapter& adapter); + /// \brief Provides API to handle nGraph Function attribute type, accessed as ValueAccessor + /// \param name attribute name + /// \param adapter reference to a Function ValueAccessor + virtual void on_adapter(const std::string& name, + ValueAccessor>& adapter); + /// The generic visitor. There must be a definition of AttributeAdapter that can convert /// to a ValueAccessor for one of the on_adpater methods. template diff --git a/ngraph/core/include/ngraph/function.hpp b/ngraph/core/include/ngraph/function.hpp index b553f06e45bb52..06fad214f1d8e7 100644 --- a/ngraph/core/include/ngraph/function.hpp +++ b/ngraph/core/include/ngraph/function.hpp @@ -190,16 +190,17 @@ namespace ngraph }; template <> - class NGRAPH_API AttributeAdapter> : public VisitorAdapter + class NGRAPH_API AttributeAdapter> + : public DirectValueAccessor> { public: - AttributeAdapter(std::shared_ptr& ref); + AttributeAdapter(std::shared_ptr& value) + : DirectValueAccessor>(value) + { + } - bool visit_attributes(AttributeVisitor& visitor) override; - - static constexpr DiscreteTypeInfo type_info{"AttributeAdapter>", 0}; + static constexpr DiscreteTypeInfo type_info{"AttributeAdapter>", + 0}; const DiscreteTypeInfo& get_type_info() const override { return type_info; } - protected: - std::shared_ptr& m_ref; }; } diff --git a/ngraph/core/include/ngraph/op/util/sub_graph_base.hpp b/ngraph/core/include/ngraph/op/util/sub_graph_base.hpp index ce72a9d5a351bf..ab13ff55445777 100644 --- a/ngraph/core/include/ngraph/op/util/sub_graph_base.hpp +++ b/ngraph/core/include/ngraph/op/util/sub_graph_base.hpp @@ -17,7 +17,6 @@ #pragma once #include -#include "ngraph/factory_adapter.hpp" #include "ngraph/op/op.hpp" namespace ngraph @@ -50,7 +49,6 @@ namespace ngraph virtual std::shared_ptr copy() const = 0; virtual const type_info_t& get_type_info() const = 0; - virtual bool visit_attributes(AttributeVisitor& visitor); uint64_t m_input_index{0}; uint64_t m_body_parameter_index{0}; @@ -85,7 +83,6 @@ namespace ngraph int64_t axis); SliceInputDescription() = default; std::shared_ptr copy() const override; - bool visit_attributes(AttributeVisitor& visitor) override; int64_t m_start{0}; int64_t m_stride{0}; int64_t m_part_size{0}; @@ -118,7 +115,6 @@ namespace ngraph uint64_t body_value_index); MergedInputDescription() = default; std::shared_ptr copy() const override; - bool visit_attributes(AttributeVisitor& visitor) override; uint64_t m_body_value_index{0}; }; @@ -140,7 +136,6 @@ namespace ngraph InvariantInputDescription(uint64_t input_index, uint64_t body_parameter_index); InvariantInputDescription() = default; std::shared_ptr copy() const override; - bool visit_attributes(AttributeVisitor& visitor) override; }; /// \brief Describes how a SubGraphOp output is produced from the body. @@ -160,7 +155,6 @@ namespace ngraph using type_info_t = DiscreteTypeInfo; virtual ~OutputDescription() = default; virtual std::shared_ptr copy() const = 0; - virtual bool visit_attributes(AttributeVisitor& visitor); virtual const type_info_t& get_type_info() const = 0; uint64_t m_body_value_index{0}; @@ -194,7 +188,6 @@ namespace ngraph ConcatOutputDescription() = default; std::shared_ptr copy() const override; - bool visit_attributes(AttributeVisitor& visitor) override; int64_t m_start{0}; int64_t m_stride{0}; int64_t m_part_size{0}; @@ -221,7 +214,6 @@ namespace ngraph int64_t iteration); BodyOutputDescription() = default; std::shared_ptr copy() const override; - bool visit_attributes(AttributeVisitor& visitor) override; int64_t m_iteration{0}; }; @@ -347,79 +339,48 @@ namespace ngraph using OutputDescriptionVector = std::vector; } } - template class NGRAPH_API FactoryRegistry; template <> - FactoryRegistry& - FactoryRegistry::get(); - - template <> - class NGRAPH_API AttributeAdapter> - : public FactoryAttributeAdapter + class NGRAPH_API AttributeAdapter< + std::vector>> + : public DirectValueAccessor< + std::vector>> { public: - using FactoryAttributeAdapter::FactoryAttributeAdapter; - static constexpr DiscreteTypeInfo type_info{ - "AttributeAdapter>" - ">>", - 0}; - const DiscreteTypeInfo& get_type_info() const override { return type_info; } - }; - - template <> - class NGRAPH_API - AttributeAdapter>> - : public VisitorAdapter - { - public: - explicit AttributeAdapter( - std::vector>& ref); - - bool visit_attributes(AttributeVisitor& visitor) override; - static constexpr DiscreteTypeInfo type_info{ - "AttributeAdapter>" - ">>", - 0}; - const DiscreteTypeInfo& get_type_info() const override { return type_info; } - protected: - std::vector>& m_ref; - }; - - template class NGRAPH_API FactoryRegistry; - - template <> - FactoryRegistry& - FactoryRegistry::get(); + AttributeAdapter( + std::vector>& value) + : DirectValueAccessor< + std::vector>>( + value) + { + } - template <> - class NGRAPH_API AttributeAdapter> - : public FactoryAttributeAdapter - { - public: - using FactoryAttributeAdapter::FactoryAttributeAdapter; static constexpr DiscreteTypeInfo type_info{ - "AttributeAdapter>" - ">>", + "AttributeAdapter>>", 0}; const DiscreteTypeInfo& get_type_info() const override { return type_info; } }; template <> - class NGRAPH_API - AttributeAdapter>> - : public VisitorAdapter + class NGRAPH_API AttributeAdapter< + std::vector>> + : public DirectValueAccessor< + std::vector>> { public: - explicit AttributeAdapter( - std::vector>& ref); + AttributeAdapter( + std::vector>& value) + : DirectValueAccessor< + std::vector>>( + value) + { + } - bool visit_attributes(AttributeVisitor& visitor) override; static constexpr DiscreteTypeInfo type_info{ - "AttributeAdapter>" - ">>", + "AttributeAdapter>>", 0}; const DiscreteTypeInfo& get_type_info() const override { return type_info; } - protected: - std::vector>& m_ref; }; } diff --git a/ngraph/core/src/attribute_visitor.cpp b/ngraph/core/src/attribute_visitor.cpp index b3fc8ccf3b35b4..14840fdb8d9e9e 100644 --- a/ngraph/core/src/attribute_visitor.cpp +++ b/ngraph/core/src/attribute_visitor.cpp @@ -170,6 +170,12 @@ void AttributeVisitor::on_adapter(const string& name, ValueAccessor&>(adapter)); } +void AttributeVisitor::on_adapter(const string& name, + ValueAccessor>& adapter) +{ + on_adapter(name, static_cast&>(adapter)); +} + const AttributeVisitor::node_id_t AttributeVisitor::invalid_node_id = ""; void AttributeVisitor::register_node(const std::shared_ptr& node, node_id_t id) diff --git a/ngraph/core/src/function.cpp b/ngraph/core/src/function.cpp index a7fa814627e4e1..aa267222b2165a 100644 --- a/ngraph/core/src/function.cpp +++ b/ngraph/core/src/function.cpp @@ -19,7 +19,6 @@ #include #include "itt.hpp" -#include "ngraph/factory_adapter.hpp" #include "ngraph/function.hpp" #include "ngraph/graph_util.hpp" #include "ngraph/log.hpp" @@ -407,269 +406,3 @@ void Function::remove_result(const std::shared_ptr& result) } constexpr DiscreteTypeInfo AttributeAdapter>::type_info; - -AttributeAdapter>::AttributeAdapter(shared_ptr& ref) - : m_ref(ref) -{ -} - -class NodeAttributeAdapter : public FactoryAttributeAdapter -{ -public: - using FactoryAttributeAdapter::FactoryAttributeAdapter; - bool on_start(AttributeVisitor& visitor) override - { - // Indicate that there is a node following - m_id = visitor.get_registered_node_id(m_ref); - m_set_id = (m_ref == nullptr); - visitor.on_attribute("id", m_id); - return m_ref == nullptr || m_id != AttributeVisitor::invalid_node_id; - } - bool on_finish(AttributeVisitor&) override - { - if (m_set_id && m_ref) - { - m_ref->set_friendly_name(m_id); - } - return true; - } - void visit(AttributeVisitor& visitor, const std::string& id) - { - visitor.start_structure(id); - visitor.on_adapter(id, *this); - visitor.finish_structure(); - } - static constexpr DiscreteTypeInfo type_info{"Lambda.NodeAttributeAdapter", 0}; - const DiscreteTypeInfo& get_type_info() const override { return type_info; } - string m_id; - bool m_set_id; -}; - -constexpr DiscreteTypeInfo NodeAttributeAdapter::type_info; - -bool AttributeAdapter>::visit_attributes(AttributeVisitor& visitor) -{ - if (m_ref->get_results().size() > 0) - { - NodeVector serialized_nodes; - { - // Start with all nodes not already serialized - visitor.start_structure("nodes"); - NodeVector results; - for (auto result : m_ref->get_results()) - { - results.push_back(result); - } - for (auto sink : m_ref->get_sinks()) - { - results.push_back(sink); - } - - int64_t i = 0; - ostringstream index; - traverse_nodes( - results, [&i, &index, &visitor, &serialized_nodes](shared_ptr node) -> void { - if (AttributeVisitor::invalid_node_id == visitor.get_registered_node_id(node)) - { - // This node hasn't been seen before - visitor.register_node(node); - index.str(""); - index << i++; - string id = index.str(); - NodeAttributeAdapter adapter(node); - adapter.visit(visitor, id); - serialized_nodes.push_back(node); - } - }); - { - // Sentinel at end - index.str(""); - index << i++; - string id = index.str(); - shared_ptr null_node; - NodeAttributeAdapter adapter(null_node); - adapter.visit(visitor, id); - } - visitor.finish_structure(); - } - { - // Now do all the edges - visitor.start_structure("edges"); - int64_t i = 0; - ostringstream index; - for (auto node : serialized_nodes) - { - for (auto input : node->inputs()) - { - index.str(""); - index << i++; - string id = index.str(); - visitor.start_structure(id); - string input_node_id = visitor.get_registered_node_id(node); - uint64_t input_index = input.get_index(); - visitor.on_attribute("input_node", input_node_id); - visitor.on_attribute("input_index", input_index); - auto output = input.get_source_output(); - string output_node_id = - visitor.get_registered_node_id(output.get_node_shared_ptr()); - uint64_t output_index = output.get_index(); - visitor.on_attribute("output_node", output_node_id); - visitor.on_attribute("output_index", output_index); - visitor.finish_structure(); - } - } - { - // Add a sentinel - index.str(""); - index << i++; - string id = index.str(); - visitor.start_structure(id); - string input_node_id = AttributeVisitor::invalid_node_id; - visitor.on_attribute("input_node", input_node_id); - visitor.finish_structure(); - } - visitor.finish_structure(); - } - { - // Control dependencies - visitor.start_structure("control"); - int64_t i = 0; - ostringstream index; - for (auto node : serialized_nodes) - { - for (auto control : node->get_control_dependencies()) - { - index.str(""); - index << i++; - string id = index.str(); - visitor.start_structure(id); - string node_id = visitor.get_registered_node_id(node); - string dependency_id = visitor.get_registered_node_id(control); - visitor.on_attribute("node", node_id); - visitor.on_attribute("dependency", dependency_id); - visitor.finish_structure(); - } - } - { - // Add a sentinel - index.str(""); - index << i++; - string id = index.str(); - visitor.start_structure(id); - string node_id = AttributeVisitor::invalid_node_id; - visitor.on_attribute("node", node_id); - visitor.finish_structure(); - } - visitor.finish_structure(); - } - } - else - { - NodeVector deserialized_nodes; - { - // Read the graph - visitor.start_structure("nodes"); - int64_t i = 0; - ostringstream index; - while (true) - { - index.str(""); - index << i++; - string id = index.str(); - shared_ptr node; - NodeAttributeAdapter adapter(node); - adapter.visit(visitor, id); - if (node) - { - visitor.register_node(node); - deserialized_nodes.push_back(node); - } - else - { - break; - } - } - visitor.finish_structure(); - } - { - visitor.start_structure("edges"); - // Connect the nodes - int64_t i = 0; - ostringstream index; - bool more_edges = true; - while (more_edges) - { - index.str(""); - index << i++; - string id = index.str(); - visitor.start_structure(id); - string input_node_id; - visitor.on_attribute("input_node", input_node_id); - if (!input_node_id.empty()) - { - shared_ptr input_node = visitor.get_registered_node(input_node_id); - NGRAPH_CHECK(input_node, "input node of edge not known"); - uint64_t input_index; - string output_node_id; - uint64_t output_index; - visitor.on_attribute("input_index", input_index); - visitor.on_attribute("output_node", output_node_id); - visitor.on_attribute("output_index", output_index); - shared_ptr output_node = visitor.get_registered_node(output_node_id); - NGRAPH_CHECK(output_node, "output_node of edge not known"); - input_node->set_argument(input_index, output_node->output(output_index)); - } - else - { - more_edges = false; - } - visitor.finish_structure(); - } - visitor.finish_structure(); - } - { - // Control dependencies - visitor.start_structure("control"); - int64_t i = 0; - ostringstream index; - bool more_control = true; - while (more_control) - { - index.str(""); - index << i++; - string id = index.str(); - visitor.start_structure(id); - string node_id; - visitor.on_attribute("node", node_id); - if (!node_id.empty()) - { - shared_ptr node = visitor.get_registered_node(node_id); - NGRAPH_CHECK(node, "node of control edge not known"); - string dependency_id; - visitor.on_attribute("dependency", dependency_id); - shared_ptr dependency = visitor.get_registered_node(dependency_id); - NGRAPH_CHECK(dependency, "dependency of control edge not known"); - node->add_control_dependency(dependency); - } - else - { - more_control = false; - } - visitor.finish_structure(); - } - visitor.finish_structure(); - } - for (auto node : topological_sort(deserialized_nodes)) - { - node->validate_and_infer_types(); - } - } - - { - // Finally visit the object attributes - visitor.start_structure("value"); - m_ref->visit_attributes(visitor); - visitor.finish_structure(); - } - return true; -} diff --git a/ngraph/core/src/op/tensor_iterator.cpp b/ngraph/core/src/op/tensor_iterator.cpp index eb238525dbc30a..1693bcbb5cab7b 100644 --- a/ngraph/core/src/op/tensor_iterator.cpp +++ b/ngraph/core/src/op/tensor_iterator.cpp @@ -35,7 +35,15 @@ bool op::v0::TensorIterator::visit_attributes(AttributeVisitor& visitor) visitor.on_attribute("input_descriptions", m_input_descriptions); visitor.on_attribute("output_descriptions", m_output_descriptions); - return false; + for (const auto& output_description : m_output_descriptions) + { + if (auto concat = as_type_ptr(output_description)) + { + m_num_iterations = ((std::abs(concat->m_end - concat->m_start)) / concat->m_part_size); + } + } + + return true; } void op::v0::TensorIterator::revalidate_and_infer_types_for_body_ops() @@ -88,10 +96,6 @@ void op::v0::TensorIterator::validate_and_infer_types() get_input_size() == m_input_descriptions.size(), "Number of inputs must be the same as number of input descriptions"); - NODE_VALIDATION_CHECK(this, - get_output_size() == m_output_descriptions.size(), - "Number of outputs must be the same as number of output descriptions"); - std::vector> ends; auto make_positive = [](int64_t value, uint64_t dim_size) -> int64_t { @@ -226,6 +230,10 @@ void op::v0::TensorIterator::validate_and_infer_types() set_output_type(index, body_value.get_element_type(), body_value.get_partial_shape()); } } + + NODE_VALIDATION_CHECK(this, + get_output_size() == m_output_descriptions.size(), + "Number of outputs must be the same as number of output descriptions"); } std::shared_ptr op::v0::TensorIterator::get_function() diff --git a/ngraph/core/src/op/util/sub_graph_base.cpp b/ngraph/core/src/op/util/sub_graph_base.cpp index 377f9c3ae60ad9..04ec7bf6701259 100644 --- a/ngraph/core/src/op/util/sub_graph_base.cpp +++ b/ngraph/core/src/op/util/sub_graph_base.cpp @@ -35,13 +35,6 @@ op::util::SubGraphOp::InputDescription::InputDescription(uint64_t input_index, { } -bool op::util::SubGraphOp::InputDescription::visit_attributes(AttributeVisitor& visitor) -{ - visitor.on_attribute("input_index", m_input_index); - visitor.on_attribute("body_parameter_index", m_body_parameter_index); - return true; -} - op::util::SubGraphOp::SliceInputDescription::SliceInputDescription(uint64_t input_index, uint64_t body_parameter_index, int64_t start, @@ -65,17 +58,6 @@ std::shared_ptr m_input_index, m_body_parameter_index, m_start, m_stride, m_part_size, m_end, m_axis); } -bool op::util::SubGraphOp::SliceInputDescription::visit_attributes(AttributeVisitor& visitor) -{ - InputDescription::visit_attributes(visitor); - visitor.on_attribute("start", m_start); - visitor.on_attribute("stride", m_stride); - visitor.on_attribute("part_size", m_part_size); - visitor.on_attribute("end", m_end); - visitor.on_attribute("axis", m_axis); - return true; -} - op::util::SubGraphOp::MergedInputDescription::MergedInputDescription(uint64_t input_index, uint64_t body_parameter_index, uint64_t body_value_index) @@ -91,13 +73,6 @@ std::shared_ptr m_input_index, m_body_parameter_index, m_body_value_index); } -bool op::util::SubGraphOp::MergedInputDescription::visit_attributes(AttributeVisitor& visitor) -{ - InputDescription::visit_attributes(visitor); - visitor.on_attribute("body_value_index", m_body_value_index); - return true; -} - op::util::SubGraphOp::InvariantInputDescription::InvariantInputDescription( uint64_t input_index, uint64_t body_parameter_index) : InputDescription(input_index, body_parameter_index) @@ -110,12 +85,6 @@ std::shared_ptr return std::make_shared(m_input_index, m_body_parameter_index); } -bool op::util::SubGraphOp::InvariantInputDescription::visit_attributes(AttributeVisitor& visitor) -{ - InputDescription::visit_attributes(visitor); - return true; -} - op::util::SubGraphOp::OutputDescription::OutputDescription(uint64_t body_value_index, uint64_t output_index) : m_body_value_index(body_value_index) @@ -123,13 +92,6 @@ op::util::SubGraphOp::OutputDescription::OutputDescription(uint64_t body_value_i { } -bool op::util::SubGraphOp::OutputDescription::visit_attributes(AttributeVisitor& visitor) -{ - visitor.on_attribute("body_value_index", m_body_value_index); - visitor.on_attribute("output_index", m_output_index); - return true; -} - op::util::SubGraphOp::ConcatOutputDescription::ConcatOutputDescription(uint64_t body_value_index, uint64_t output_index, int64_t start, @@ -146,17 +108,6 @@ op::util::SubGraphOp::ConcatOutputDescription::ConcatOutputDescription(uint64_t { } -bool op::util::SubGraphOp::ConcatOutputDescription::visit_attributes(AttributeVisitor& visitor) -{ - OutputDescription::visit_attributes(visitor); - visitor.on_attribute("start", m_start); - visitor.on_attribute("stride", m_stride); - visitor.on_attribute("part_size", m_part_size); - visitor.on_attribute("end", m_end); - visitor.on_attribute("axis", m_axis); - return true; -} - std::shared_ptr op::util::SubGraphOp::ConcatOutputDescription::copy() const { @@ -178,13 +129,6 @@ std::shared_ptr return std::make_shared(m_body_value_index, m_output_index, m_iteration); } -bool op::util::SubGraphOp::BodyOutputDescription::visit_attributes(AttributeVisitor& visitor) -{ - OutputDescription::visit_attributes(visitor); - visitor.on_attribute("iteration", m_iteration); - return true; -} - op::util::SubGraphOp::SubGraphOp(const OutputVector& args) : Op(args) { @@ -257,103 +201,9 @@ Input op::util::SubGraphOp::input_for_value(const Output& value) namespace ngraph { - template <> - FactoryRegistry& - FactoryRegistry::get() - { - static FactoryRegistry registry; - static std::mutex init_guard; - if (registry.m_factory_map.size() == 0) - { - std::lock_guard guard(init_guard); - if (registry.m_factory_map.size() == 0) - { - registry.register_factory(); - registry.register_factory(); - registry.register_factory(); - } - } - return registry; - } - - constexpr DiscreteTypeInfo - AttributeAdapter>::type_info; - constexpr DiscreteTypeInfo AttributeAdapter< std::vector>>::type_info; - AttributeAdapter>>:: - AttributeAdapter(std::vector>& ref) - : m_ref(ref) - { - } - - bool AttributeAdapter>>:: - visit_attributes(AttributeVisitor& visitor) - { - int64_t size = m_ref.size(); - visitor.on_attribute("size", size); - if (size != m_ref.size()) - { - m_ref.resize(size); - } - std::ostringstream index; - for (int64_t i = 0; i < size; i++) - { - index.str(""); - index << i; - visitor.on_attribute(index.str(), m_ref[i]); - } - return true; - } - - template <> - FactoryRegistry& - FactoryRegistry::get() - { - static FactoryRegistry registry; - static std::mutex init_guard; - // TODO: Add a lock - if (registry.m_factory_map.size() == 0) - { - std::lock_guard guard(init_guard); - if (registry.m_factory_map.size() == 0) - { - registry.register_factory(); - registry.register_factory(); - } - } - return registry; - } - constexpr DiscreteTypeInfo AttributeAdapter< std::vector>>::type_info; - - constexpr DiscreteTypeInfo - AttributeAdapter>::type_info; - - AttributeAdapter>>:: - AttributeAdapter(std::vector>& ref) - : m_ref(ref) - { - } - - bool AttributeAdapter>>:: - visit_attributes(AttributeVisitor& visitor) - { - int64_t size = m_ref.size(); - visitor.on_attribute("size", size); - if (size != m_ref.size()) - { - m_ref.resize(size); - } - std::ostringstream index; - for (int64_t i = 0; i < size; i++) - { - index.str(""); - index << i; - visitor.on_attribute(index.str(), m_ref[i]); - } - return true; - } } \ No newline at end of file From 9d6bd321d864a49d1bc9d68770b16f734bad14bb Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Thu, 24 Dec 2020 08:07:50 +0300 Subject: [PATCH 136/244] Fixed message if ENABLE_ERROR_HIGHLIGHT is enabled (#3712) --- cmake/developer_package/message.cmake | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmake/developer_package/message.cmake b/cmake/developer_package/message.cmake index fea169d50061b7..eb6a1af60035ad 100644 --- a/cmake/developer_package/message.cmake +++ b/cmake/developer_package/message.cmake @@ -10,14 +10,13 @@ if(UNIX AND ENABLE_ERROR_HIGHLIGHT) set(YELLOW "${ESC}[33;1m") list(GET ARGV 0 MessageType) + list(REMOVE_AT ARGV 0) if(MessageType STREQUAL FATAL_ERROR OR MessageType STREQUAL SEND_ERROR) - list(REMOVE_AT ARGV 0) _message(${MessageType} "${RED}${ARGV}${RESET}") elseif(MessageType STREQUAL WARNING) - list(REMOVE_AT ARGV 0) _message(${MessageType} "${YELLOW}${ARGV}${RESET}") else() - _message("${ARGV}") + _message(${MessageType} "${ARGV}") endif() endfunction() endif() From 6d320d71629027d3b7b9930d5e51fa048cde39cd Mon Sep 17 00:00:00 2001 From: Yury Gaydaychuk Date: Thu, 24 Dec 2020 10:20:44 +0300 Subject: [PATCH 137/244] convert to bf is to be inserted only after non-const layer (#3597) --- .../src/mkldnn_plugin/bf16transformer.cpp | 3 ++ .../src/mkldnn_plugin/mkldnn_exec_network.cpp | 2 +- .../cpu/single_layer_tests/interpolate.cpp | 53 ++++++++++++++++--- .../src/single_layer/interpolate.cpp | 5 +- 4 files changed, 54 insertions(+), 9 deletions(-) diff --git a/inference-engine/src/mkldnn_plugin/bf16transformer.cpp b/inference-engine/src/mkldnn_plugin/bf16transformer.cpp index 6f238d46f7820c..03fb5001a16750 100644 --- a/inference-engine/src/mkldnn_plugin/bf16transformer.cpp +++ b/inference-engine/src/mkldnn_plugin/bf16transformer.cpp @@ -347,6 +347,9 @@ void BF16Transformer::addLayerToCNNNetworkAfterData( void BF16Transformer::insertConvertAfterInput(InferenceEngine::CNNNetwork &network) { auto inputLayers = InferenceEngine::CNNNetGetAllInputLayers(network); for (auto inputIter : inputLayers) { + if (inputIter->type == "Const") { + continue; + } for (size_t o = 0; o < inputIter->outData.size(); o++) { for (auto bfInitIter : getInputTo(inputIter->outData[o])) { if (inputIter->outData[o]->getPrecision() == Precision::BF16) { diff --git a/inference-engine/src/mkldnn_plugin/mkldnn_exec_network.cpp b/inference-engine/src/mkldnn_plugin/mkldnn_exec_network.cpp index 4ce00d14501e6c..230334bc3744ef 100644 --- a/inference-engine/src/mkldnn_plugin/mkldnn_exec_network.cpp +++ b/inference-engine/src/mkldnn_plugin/mkldnn_exec_network.cpp @@ -67,7 +67,7 @@ MKLDNNExecNetwork::MKLDNNExecNetwork(const InferenceEngine::ICNNNetwork &network BF16Transformer bf16Transformer; CNNNetwork cnnetwork(_clonedNetwork); // If enforceBF16 flag was set, BF16 transformation applies for all layers supported by CPU plugin. - // Overwise, only layers marked as BF16 in 'cnnetwork' will be performed in bfloat16 mode. + // Otherwise, only layers marked as BF16 in 'cnnetwork' will be performed in bfloat16 mode. // CPU plugin throws an exception, if marked as BF16 layers have not supported by CPU plugin. if (cfg.enforceBF16 == true) bf16Transformer.convertToBFloat16(cnnetwork); diff --git a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/interpolate.cpp b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/interpolate.cpp index b15ec88e7bb7cb..3d7faa3ec3e006 100644 --- a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/interpolate.cpp +++ b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/interpolate.cpp @@ -12,6 +12,7 @@ namespace CPULayerTestsDefinitions { typedef std::tuple< LayerTestsDefinitions::InterpolateLayerTestParams, + std::map, // Bf16 config CPUSpecificParams> InterpolateLayerCPUTestParamsSet; class InterpolateLayerCPUTest : public testing::WithParamInterface, @@ -20,12 +21,16 @@ class InterpolateLayerCPUTest : public testing::WithParamInterface obj) { LayerTestsDefinitions::InterpolateLayerTestParams basicParamsSet; CPUSpecificParams cpuParams; - std::tie(basicParamsSet, cpuParams) = obj.param; + std::map bf16config; + std::tie(basicParamsSet, bf16config, cpuParams) = obj.param; std::ostringstream result; result << LayerTestsDefinitions::InterpolateLayerTest::getTestCaseName(testing::TestParamInfo( basicParamsSet, 0)); + result << "bf16Enforce=" << (bf16config.count(InferenceEngine::PluginConfigParams::KEY_ENFORCE_BF16) ? + bf16config.at(InferenceEngine::PluginConfigParams::KEY_ENFORCE_BF16) : InferenceEngine::PluginConfigParams::NO); + result << CPUTestsBase::getTestCaseName(cpuParams); return result.str(); @@ -35,14 +40,15 @@ class InterpolateLayerCPUTest : public testing::WithParamInterfaceGetParam(); + std::map bf16config; + std::tie(basicParamsSet, bf16config, cpuParams) = this->GetParam(); std::tie(inFmts, outFmts, priority, selectedType) = cpuParams; LayerTestsDefinitions::InterpolateSpecificParams interpolateParams; std::vector inputShape; std::vector targetShape; - auto netPrecision = InferenceEngine::Precision::UNSPECIFIED; + auto netPrecision = InferenceEngine::Precision::UNSPECIFIED; std::tie(interpolateParams, netPrecision, inPrc, outPrc, inLayout, outLayout, inputShape, targetShape, targetDevice) = basicParamsSet; ngraph::op::v4::Interpolate::InterpolateMode mode; @@ -54,9 +60,9 @@ class InterpolateLayerCPUTest : public testing::WithParamInterface axes; std::vector scales; - std:tie(mode, shapeCalcMode, coordinateTransformMode, nearestMode, antialias, padBegin, padEnd, cubeCoef, axes, scales) = interpolateParams; + std::tie(mode, shapeCalcMode, coordinateTransformMode, nearestMode, antialias, padBegin, padEnd, cubeCoef, axes, scales) = interpolateParams; inPrc = outPrc = netPrecision; - + configuration.insert(bf16config.begin(), bf16config.end()); using ShapeCalcMode = ngraph::op::v4::Interpolate::ShapeCalcMode; auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecision); @@ -82,7 +88,6 @@ class InterpolateLayerCPUTest : public testing::WithParamInterfaceget_rt_info() = getCPUInfo(); const ngraph::ResultVector results{std::make_shared(interpolate)}; function = std::make_shared(results, params, "interpolate"); - selectedType = getPrimitiveType() + "_" + inPrc.name(); } }; @@ -203,6 +208,23 @@ const auto interpolateCasesCubic = ::testing::Combine( ::testing::ValuesIn(defaultAxes), ::testing::ValuesIn(defaultScales)); +const auto interpolateCasesBf16Enforced = ::testing::Combine( + ::testing::Values(ngraph::op::v4::Interpolate::InterpolateMode::nearest), + ::testing::Values(ngraph::op::v4::Interpolate::ShapeCalcMode::scales), + ::testing::Values(ngraph::op::v4::Interpolate::CoordinateTransformMode::tf_half_pixel_for_nn), + ::testing::Values(ngraph::op::v4::Interpolate::NearestMode::simple), + ::testing::ValuesIn(antialias), + ::testing::ValuesIn(pads), + ::testing::ValuesIn(pads), + ::testing::ValuesIn(cubeCoefs), + ::testing::ValuesIn(defaultAxes), + ::testing::ValuesIn(defaultScales)); + +std::vector> bf16EnforceFlags = { + {{PluginConfigParams::KEY_ENFORCE_BF16, PluginConfigParams::NO}}, + {{PluginConfigParams::KEY_ENFORCE_BF16, PluginConfigParams::YES}} +}; + INSTANTIATE_TEST_CASE_P(smoke_InterpolateNN_Layout_Test, InterpolateLayerCPUTest, ::testing::Combine( ::testing::Combine( @@ -215,6 +237,7 @@ INSTANTIATE_TEST_CASE_P(smoke_InterpolateNN_Layout_Test, InterpolateLayerCPUTest ::testing::Values(std::vector({1, 21, 40, 40})), ::testing::Values(std::vector({1, 21, 50, 60})), ::testing::Values(CommonTestUtils::DEVICE_CPU)), + ::testing::Values(std::map {}), ::testing::ValuesIn(filterCPUInfoForDevice())), InterpolateLayerCPUTest::getTestCaseName); @@ -230,6 +253,7 @@ INSTANTIATE_TEST_CASE_P(smoke_InterpolateLinearOnnx_Layout_Test, InterpolateLaye ::testing::Values(std::vector({1, 21, 40, 40})), ::testing::Values(std::vector({1, 21, 50, 60})), ::testing::Values(CommonTestUtils::DEVICE_CPU)), + ::testing::Values(std::map {}), ::testing::ValuesIn(filterCPUInfoForDevice())), InterpolateLayerCPUTest::getTestCaseName); @@ -245,9 +269,26 @@ INSTANTIATE_TEST_CASE_P(smoke_InterpolateCubic_Layout_Test, InterpolateLayerCPUT ::testing::Values(std::vector({1, 21, 40, 40})), ::testing::Values(std::vector({1, 21, 50, 60})), ::testing::Values(CommonTestUtils::DEVICE_CPU)), + ::testing::Values(std::map {}), ::testing::ValuesIn(filterCPUInfoForDevice())), InterpolateLayerCPUTest::getTestCaseName); +INSTANTIATE_TEST_CASE_P(smoke_Interpolate_Enforced_Bf16_Layout_Test, InterpolateLayerCPUTest, + ::testing::Combine( + ::testing::Combine( + interpolateCasesBf16Enforced, + ::testing::Values(InferenceEngine::Precision::BF16), + ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), + ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), + ::testing::Values(InferenceEngine::Layout::ANY), + ::testing::Values(InferenceEngine::Layout::ANY), + ::testing::Values(std::vector({1, 21, 40, 40})), + ::testing::Values(std::vector({1, 21, 50, 60})), + ::testing::Values(CommonTestUtils::DEVICE_CPU)), + ::testing::ValuesIn(bf16EnforceFlags), + ::testing::ValuesIn(filterCPUInfoForDevice())), + InterpolateLayerCPUTest::getTestCaseName); + } // namespace } // namespace CPULayerTestsDefinitions diff --git a/inference-engine/tests/functional/shared_test_classes/src/single_layer/interpolate.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/interpolate.cpp index 072775a7a2e9f9..9e836b3a296ac2 100644 --- a/inference-engine/tests/functional/shared_test_classes/src/single_layer/interpolate.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/interpolate.cpp @@ -2,6 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // +#include #include "shared_test_classes/single_layer/interpolate.hpp" #include "ngraph_functions/builders.hpp" #include "ngraph_functions/utils/ngraph_helpers.hpp" @@ -27,7 +28,7 @@ std::string InterpolateLayerTest::getTestCaseName(testing::TestParamInfo Date: Thu, 24 Dec 2020 10:25:53 +0300 Subject: [PATCH 138/244] Added memory format attribute (#3395) * [CPU] Added memory format attribute --- .../src/mkldnn_plugin/CMakeLists.txt | 2 + .../src/mkldnn_plugin/mkldnn_node.cpp | 38 ++++--- .../src/mkldnn_plugin/mkldnn_node.h | 1 + .../rt_info/memory_formats_attribute.cpp | 27 +++++ .../rt_info/memory_formats_attribute.hpp | 104 ++++++++++++++++++ .../rt_info/dequantization_attribute.hpp | 2 +- .../op_conversions/convert_convolutions.cpp | 3 +- .../functional/plugin/cpu/CMakeLists.txt | 8 +- .../cpu/subgraph_tests/src/conv_concat.cpp | 2 +- .../plugin/cpu/test_utils/cpu_test_utils.cpp | 7 +- .../plugin/cpu/test_utils/cpu_test_utils.hpp | 12 +- 11 files changed, 177 insertions(+), 29 deletions(-) create mode 100644 inference-engine/src/mkldnn_plugin/utils/rt_info/memory_formats_attribute.cpp create mode 100644 inference-engine/src/mkldnn_plugin/utils/rt_info/memory_formats_attribute.hpp diff --git a/inference-engine/src/mkldnn_plugin/CMakeLists.txt b/inference-engine/src/mkldnn_plugin/CMakeLists.txt index 43b10caa7e56e6..34ae2339394e4e 100644 --- a/inference-engine/src/mkldnn_plugin/CMakeLists.txt +++ b/inference-engine/src/mkldnn_plugin/CMakeLists.txt @@ -113,6 +113,7 @@ file(GLOB SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp ${CMAKE_CURRENT_SOURCE_DIR}/mkldnn/*.cpp ${CMAKE_CURRENT_SOURCE_DIR}/utils/*.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/utils/rt_info/*.cpp ${CMAKE_CURRENT_SOURCE_DIR}/nodes/common/*.cpp ${LAYERS} ${OS_SPECIFIC_SRC} @@ -124,6 +125,7 @@ file(GLOB HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/mkldnn/*.h ${CMAKE_CURRENT_SOURCE_DIR}/mkldnn/*.hpp ${CMAKE_CURRENT_SOURCE_DIR}/utils/*.h + ${CMAKE_CURRENT_SOURCE_DIR}/utils/rt_info/*.hpp ${CMAKE_CURRENT_SOURCE_DIR}/nodes/*.h ${CMAKE_CURRENT_SOURCE_DIR}/nodes/*.hpp ${CMAKE_CURRENT_SOURCE_DIR}/nodes/common/*.h diff --git a/inference-engine/src/mkldnn_plugin/mkldnn_node.cpp b/inference-engine/src/mkldnn_plugin/mkldnn_node.cpp index 6ee060f3940767..006431dc4e10ed 100644 --- a/inference-engine/src/mkldnn_plugin/mkldnn_node.cpp +++ b/inference-engine/src/mkldnn_plugin/mkldnn_node.cpp @@ -49,6 +49,7 @@ #include "nodes/common/cpu_memcpy.h" #include "mkldnn_debug.h" +#include "utils/rt_info/memory_formats_attribute.hpp" using namespace mkldnn; using namespace MKLDNNPlugin; @@ -190,22 +191,29 @@ MKLDNNNode::MKLDNNNode(const InferenceEngine::CNNLayerPtr& layer, const mkldnn:: THROW_IE_EXCEPTION << "Unsupported CPU implementation " << str << " for node " << getName(); } } - if (layer->params.find("InputMemoryFormats") != layer->params.end()) { - std::istringstream stream(layer->params["InputMemoryFormats"]); - std::string str; - while (getline(stream, str, ',')) { - if (str.substr(0, 4) != "cpu:") - continue; - inputMemoryFormatsFilter.push_back(mkldnn_str2fmt(str.substr(4, str.size()).c_str())); + + auto ngraphNode = layer->getNode(); + if (ngraphNode != nullptr) { + std::string inputMemoryFormats = ngraph::getMLKDNNInputMemoryFormats(ngraphNode); + if (!inputMemoryFormats.empty()) { + std::istringstream stream(inputMemoryFormats); + std::string str; + while (getline(stream, str, ',')) { + if (str.substr(0, 4) != "cpu:") + continue; + inputMemoryFormatsFilter.push_back(mkldnn_str2fmt(str.substr(4, str.size()).c_str())); + } } - } - if (layer->params.find("OutputMemoryFormats") != layer->params.end()) { - std::istringstream stream(layer->params["OutputMemoryFormats"]); - std::string str; - while (getline(stream, str, ',')) { - if (str.substr(0, 4) != "cpu:") - continue; - outputMemoryFormatsFilter.push_back(mkldnn_str2fmt(str.substr(4, str.size()).c_str())); + + std::string outputMemoryFormats = ngraph::getMLKDNNOutputMemoryFormats(ngraphNode); + if (!outputMemoryFormats.empty()) { + std::istringstream stream(outputMemoryFormats); + std::string str; + while (getline(stream, str, ',')) { + if (str.substr(0, 4) != "cpu:") + continue; + outputMemoryFormatsFilter.push_back(mkldnn_str2fmt(str.substr(4, str.size()).c_str())); + } } } } diff --git a/inference-engine/src/mkldnn_plugin/mkldnn_node.h b/inference-engine/src/mkldnn_plugin/mkldnn_node.h index 369f109932fdfb..05de8f892a37dc 100644 --- a/inference-engine/src/mkldnn_plugin/mkldnn_node.h +++ b/inference-engine/src/mkldnn_plugin/mkldnn_node.h @@ -23,6 +23,7 @@ #include "mkldnn_weights_cache.hpp" #include "mkldnn.hpp" #include +#include namespace MKLDNNPlugin { diff --git a/inference-engine/src/mkldnn_plugin/utils/rt_info/memory_formats_attribute.cpp b/inference-engine/src/mkldnn_plugin/utils/rt_info/memory_formats_attribute.cpp new file mode 100644 index 00000000000000..6c0978475da3c3 --- /dev/null +++ b/inference-engine/src/mkldnn_plugin/utils/rt_info/memory_formats_attribute.cpp @@ -0,0 +1,27 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include +#include +#include + +#include "memory_formats_attribute.hpp" + +namespace ngraph { + +template class ngraph::MLKDNNMemoryFormatsHelper; +constexpr VariantTypeInfo VariantWrapper::type_info; + +std::string getMLKDNNInputMemoryFormats(const std::shared_ptr & node) { + return MLKDNNMemoryFormatsHelper::getMemoryFormats(node); +} + +template class ngraph::MLKDNNMemoryFormatsHelper; +constexpr VariantTypeInfo VariantWrapper::type_info; + +std::string getMLKDNNOutputMemoryFormats(const std::shared_ptr & node) { + return MLKDNNMemoryFormatsHelper::getMemoryFormats(node); +} + +} // namespace ngraph diff --git a/inference-engine/src/mkldnn_plugin/utils/rt_info/memory_formats_attribute.hpp b/inference-engine/src/mkldnn_plugin/utils/rt_info/memory_formats_attribute.hpp new file mode 100644 index 00000000000000..3e59c15dcc2e3b --- /dev/null +++ b/inference-engine/src/mkldnn_plugin/utils/rt_info/memory_formats_attribute.hpp @@ -0,0 +1,104 @@ +// Copyright (C) 2020 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include +#include + +#include +#include + +namespace ngraph { + +constexpr const char *MLKDNNInputMemoryFormatsAttr = "MLKDNNInputMemoryFormats"; +constexpr const char *MLKDNNOutputMemoryFormatsAttr = "MLKDNNOutputMemoryFormats"; + +class MLKDNNMemoryFormats { +protected: + std::string memory_format; + +public: + MLKDNNMemoryFormats() = default; + explicit MLKDNNMemoryFormats(const std::string &_memory_format) : memory_format(_memory_format) {} + std::string getMemoryFormats() const { return memory_format; } +}; + +template +class MLKDNNMemoryFormatsHelper : public VariantImpl { +public: + MLKDNNMemoryFormatsHelper(const MemoryFormatsType& value) : VariantImpl(value) {} + + static std::string getMemoryFormats(const std::shared_ptr& node) { + const auto &rtInfo = node->get_rt_info(); + using MemoryFormatsWraper = VariantWrapper; + if (!rtInfo.count(MemoryFormatsWraper::type_info.name)) return ""; + const auto &attr = rtInfo.at(MemoryFormatsWraper::type_info.name); + MemoryFormatsType mem_format = as_type_ptr(attr)->get(); + return mem_format.getMemoryFormats(); + } + + std::shared_ptr merge(const ngraph::NodeVector & nodes) override { + std::set unique_mem_format; + + for (auto &node : nodes) { + std::string mem_format = getMemoryFormats(node); + if (!mem_format.empty()) unique_mem_format.insert(mem_format); + } + + if (unique_mem_format.size() > 1) { + throw ngraph_error(std::string(VariantWrapper::type_info.name) + " no rule defined for multiple values."); + } + + std::string final_mem_format; + if (unique_mem_format.size() == 1) { + final_mem_format = *unique_mem_format.begin(); + } + return std::make_shared>(MemoryFormatsType(final_mem_format)); + } + + std::shared_ptr init(const std::shared_ptr & node) override { + throw ngraph_error(std::string(VariantWrapper::type_info.name) + " has no default initialization."); + } +}; + +class MLKDNNInputMemoryFormats : public MLKDNNMemoryFormats { +public: + MLKDNNInputMemoryFormats() = default; + explicit MLKDNNInputMemoryFormats(const std::string &_memory_format) : MLKDNNMemoryFormats(_memory_format) {} +}; + +extern template class MLKDNNMemoryFormatsHelper; + +template<> +class VariantWrapper : public MLKDNNMemoryFormatsHelper { +public: + static constexpr VariantTypeInfo type_info{MLKDNNInputMemoryFormatsAttr, 0}; + const VariantTypeInfo &get_type_info() const override { return type_info; } + + VariantWrapper(const MLKDNNInputMemoryFormats &value) : MLKDNNMemoryFormatsHelper(value) {} +}; + +std::string getMLKDNNInputMemoryFormats(const std::shared_ptr& node); + +class MLKDNNOutputMemoryFormats : public MLKDNNMemoryFormats { +public: + MLKDNNOutputMemoryFormats() = default; + explicit MLKDNNOutputMemoryFormats(const std::string &_memory_format) : MLKDNNMemoryFormats(_memory_format) {} +}; + +extern template class MLKDNNMemoryFormatsHelper; + +template<> +class VariantWrapper : public MLKDNNMemoryFormatsHelper { +public: + static constexpr VariantTypeInfo type_info{MLKDNNOutputMemoryFormatsAttr, 0}; + const VariantTypeInfo &get_type_info() const override { return type_info; } + + VariantWrapper(const MLKDNNOutputMemoryFormats &value) : MLKDNNMemoryFormatsHelper(value) {} +}; + +std::string getMLKDNNOutputMemoryFormats(const std::shared_ptr& node); + +} // namespace ngraph diff --git a/inference-engine/src/transformations/include/transformations/rt_info/dequantization_attribute.hpp b/inference-engine/src/transformations/include/transformations/rt_info/dequantization_attribute.hpp index 0ee53895e69b89..90c022312fac80 100644 --- a/inference-engine/src/transformations/include/transformations/rt_info/dequantization_attribute.hpp +++ b/inference-engine/src/transformations/include/transformations/rt_info/dequantization_attribute.hpp @@ -67,7 +67,7 @@ class TRANSFORMATIONS_API VariantWrapper : public VariantImp /** * @ingroup ie_runtime_attr_api - * @brief getPrimitivesPriority return string with dequantization value + * @brief getDequantization return string with dequantization value * @param[in] node The node will be used to get Dequantization attribute */ TRANSFORMATIONS_API std::string getDequantization(const std::shared_ptr& node); diff --git a/inference-engine/src/transformations/src/transformations/op_conversions/convert_convolutions.cpp b/inference-engine/src/transformations/src/transformations/op_conversions/convert_convolutions.cpp index 8f71cb90227d9e..131f3f9557844c 100644 --- a/inference-engine/src/transformations/src/transformations/op_conversions/convert_convolutions.cpp +++ b/inference-engine/src/transformations/src/transformations/op_conversions/convert_convolutions.cpp @@ -71,8 +71,7 @@ ngraph::pass::ConvertGroupConvolution::ConvertGroupConvolution() { } else { weights = std::make_shared(gconv->input_value(1), op::Constant::create(element::i64, Shape{reshape_shape.size()}, reshape_shape), true); - // FIXME: 42956 - // ngraph::copy_runtime_info(gconv, weights.get_node_shared_ptr()); + ngraph::copy_runtime_info(gconv, weights.get_node_shared_ptr()); } auto conv_ie = std::make_shared(gconv->input_value(0), weights, diff --git a/inference-engine/tests/functional/plugin/cpu/CMakeLists.txt b/inference-engine/tests/functional/plugin/cpu/CMakeLists.txt index 4cf18f81c9f72b..a81a784c0ff8c1 100644 --- a/inference-engine/tests/functional/plugin/cpu/CMakeLists.txt +++ b/inference-engine/tests/functional/plugin/cpu/CMakeLists.txt @@ -1,18 +1,24 @@ -# Copyright (C) 2019 Intel Corporation +# Copyright (C) 2019-2020 Intel Corporation # # SPDX-License-Identifier: Apache-2.0 # set(TARGET_NAME cpuFuncTests) +add_library(cpuSpecificRtInfo STATIC ${IE_MAIN_SOURCE_DIR}/src/mkldnn_plugin/utils/rt_info/memory_formats_attribute.hpp + ${IE_MAIN_SOURCE_DIR}/src/mkldnn_plugin/utils/rt_info/memory_formats_attribute.cpp) +target_link_libraries(cpuSpecificRtInfo PRIVATE ${NGRAPH_LIBRARIES}) + addIeTargetTest( NAME ${TARGET_NAME} ROOT ${CMAKE_CURRENT_SOURCE_DIR} INCLUDES ${CMAKE_CURRENT_SOURCE_DIR} + ${IE_MAIN_SOURCE_DIR}/src/mkldnn_plugin DEPENDENCIES MKLDNNPlugin LINK_LIBRARIES funcSharedTests + cpuSpecificRtInfo ADD_CPPLINT LABELS CPU diff --git a/inference-engine/tests/functional/plugin/cpu/subgraph_tests/src/conv_concat.cpp b/inference-engine/tests/functional/plugin/cpu/subgraph_tests/src/conv_concat.cpp index 74a4193acfa9b8..8faf69ce46379a 100644 --- a/inference-engine/tests/functional/plugin/cpu/subgraph_tests/src/conv_concat.cpp +++ b/inference-engine/tests/functional/plugin/cpu/subgraph_tests/src/conv_concat.cpp @@ -38,7 +38,7 @@ std::string ConvConcatSubgraphTest::getTestCaseName(testing::TestParamInfo inFmts, std::vector>(fmts2str(inFmts))}); + cpuInfo.insert({std::string(ngraph::MLKDNNInputMemoryFormatsAttr), + std::make_shared>(ngraph::MLKDNNInputMemoryFormats(fmts2str(inFmts)))}); } if (!outFmts.empty()) { - cpuInfo.insert({"OutputMemoryFormats", std::make_shared>(fmts2str(outFmts))}); + cpuInfo.insert({std::string(ngraph::MLKDNNOutputMemoryFormatsAttr), + std::make_shared>(ngraph::MLKDNNOutputMemoryFormats(fmts2str(outFmts)))}); } if (!priority.empty()) { cpuInfo.insert({"PrimitivesPriority", std::make_shared>(impls2str(priority))}); diff --git a/inference-engine/tests/functional/plugin/cpu/test_utils/cpu_test_utils.hpp b/inference-engine/tests/functional/plugin/cpu/test_utils/cpu_test_utils.hpp index 8b980da6062ff8..c43505e78b06ed 100644 --- a/inference-engine/tests/functional/plugin/cpu/test_utils/cpu_test_utils.hpp +++ b/inference-engine/tests/functional/plugin/cpu/test_utils/cpu_test_utils.hpp @@ -8,10 +8,8 @@ #include #include "ie_system_conf.h" #include "shared_test_classes/base/layer_test_utils.hpp" - -#include -#include #include +#include "ie_system_conf.h" namespace CPUTestUtils { typedef enum { @@ -29,10 +27,10 @@ namespace CPUTestUtils { } cpu_memory_format_t; using CPUSpecificParams = std::tuple< - std::vector, //input memomry format - std::vector, //output memory format - std::vector, //priority - std::string // selected primitive type + std::vector, // input memomry format + std::vector, // output memory format + std::vector, // priority + std::string // selected primitive type >; class CPUTestsBase { From dbedeae9c952ff4df7b16d3386ff434ad5a39661 Mon Sep 17 00:00:00 2001 From: Nikolay Tyukaev Date: Thu, 24 Dec 2020 10:30:51 +0300 Subject: [PATCH 139/244] ovino doc assets (#3046) * ovino doc assets * update cmake doc build * fixes --- docs/CMakeLists.txt | 61 +- docs/doxygen/assets/customdoxygen.css | 1452 +++++++++++++++++ .../assets/fonts/Lato/lato-v16-latin-700.eot | Bin 0 -> 26105 bytes .../assets/fonts/Lato/lato-v16-latin-700.svg | 438 +++++ .../assets/fonts/Lato/lato-v16-latin-700.ttf | Bin 0 -> 59032 bytes .../assets/fonts/Lato/lato-v16-latin-700.woff | Bin 0 -> 28052 bytes .../fonts/Lato/lato-v16-latin-700.woff2 | Bin 0 -> 22992 bytes .../fonts/Lato/lato-v16-latin-700italic.eot | Bin 0 -> 27882 bytes .../fonts/Lato/lato-v16-latin-700italic.svg | 451 +++++ .../fonts/Lato/lato-v16-latin-700italic.ttf | Bin 0 -> 62308 bytes .../fonts/Lato/lato-v16-latin-700italic.woff | Bin 0 -> 29920 bytes .../fonts/Lato/lato-v16-latin-700italic.woff2 | Bin 0 -> 24428 bytes .../fonts/Lato/lato-v16-latin-italic.eot | Bin 0 -> 27726 bytes .../fonts/Lato/lato-v16-latin-italic.svg | 450 +++++ .../fonts/Lato/lato-v16-latin-italic.ttf | Bin 0 -> 60936 bytes .../fonts/Lato/lato-v16-latin-italic.woff | Bin 0 -> 29836 bytes .../fonts/Lato/lato-v16-latin-italic.woff2 | Bin 0 -> 24440 bytes .../fonts/Lato/lato-v16-latin-regular.eot | Bin 0 -> 26668 bytes .../fonts/Lato/lato-v16-latin-regular.svg | 435 +++++ .../fonts/Lato/lato-v16-latin-regular.ttf | Bin 0 -> 60524 bytes .../fonts/Lato/lato-v16-latin-regular.woff | Bin 0 -> 28660 bytes .../fonts/Lato/lato-v16-latin-regular.woff2 | Bin 0 -> 23484 bytes .../fonts/roboto-mono-v5-latin-regular.eot | Bin 0 -> 17757 bytes .../fonts/roboto-mono-v5-latin-regular.svg | 390 +++++ .../fonts/roboto-mono-v5-latin-regular.ttf | Bin 0 -> 31052 bytes .../fonts/roboto-mono-v5-latin-regular.woff | Bin 0 -> 19576 bytes .../fonts/roboto-mono-v5-latin-regular.woff2 | Bin 0 -> 16028 bytes .../assets/fonts/roboto-v18-latin-500.eot | Bin 0 -> 17596 bytes .../assets/fonts/roboto-v18-latin-500.svg | 305 ++++ .../assets/fonts/roboto-v18-latin-500.ttf | Bin 0 -> 35588 bytes .../assets/fonts/roboto-v18-latin-500.woff | Bin 0 -> 20012 bytes .../assets/fonts/roboto-v18-latin-500.woff2 | Bin 0 -> 15552 bytes .../fonts/roboto-v18-latin-500italic.eot | Bin 0 -> 19148 bytes .../fonts/roboto-v18-latin-500italic.svg | 326 ++++ .../fonts/roboto-v18-latin-500italic.ttf | Bin 0 -> 37120 bytes .../fonts/roboto-v18-latin-500italic.woff | Bin 0 -> 21564 bytes .../fonts/roboto-v18-latin-500italic.woff2 | Bin 0 -> 16940 bytes .../assets/fonts/roboto-v18-latin-700.eot | Bin 0 -> 17391 bytes .../assets/fonts/roboto-v18-latin-700.svg | 309 ++++ .../assets/fonts/roboto-v18-latin-700.ttf | Bin 0 -> 35236 bytes .../assets/fonts/roboto-v18-latin-700.woff | Bin 0 -> 19888 bytes .../assets/fonts/roboto-v18-latin-700.woff2 | Bin 0 -> 15436 bytes .../fonts/roboto-v18-latin-700italic.eot | Bin 0 -> 18764 bytes .../fonts/roboto-v18-latin-700italic.svg | 325 ++++ .../fonts/roboto-v18-latin-700italic.ttf | Bin 0 -> 36096 bytes .../fonts/roboto-v18-latin-700italic.woff | Bin 0 -> 21132 bytes .../fonts/roboto-v18-latin-700italic.woff2 | Bin 0 -> 16572 bytes .../assets/fonts/roboto-v18-latin-italic.eot | Bin 0 -> 19158 bytes .../assets/fonts/roboto-v18-latin-italic.svg | 323 ++++ .../assets/fonts/roboto-v18-latin-italic.ttf | Bin 0 -> 36752 bytes .../assets/fonts/roboto-v18-latin-italic.woff | Bin 0 -> 21528 bytes .../fonts/roboto-v18-latin-italic.woff2 | Bin 0 -> 16944 bytes .../assets/fonts/roboto-v18-latin-regular.eot | Bin 0 -> 17405 bytes .../assets/fonts/roboto-v18-latin-regular.svg | 308 ++++ .../assets/fonts/roboto-v18-latin-regular.ttf | Bin 0 -> 35408 bytes .../fonts/roboto-v18-latin-regular.woff | Bin 0 -> 19824 bytes .../fonts/roboto-v18-latin-regular.woff2 | Bin 0 -> 15344 bytes docs/doxygen/assets/images/404-error.svg | 123 ++ docs/doxygen/assets/images/favicon.ico | Bin 0 -> 1150 bytes .../images/icon-accordion-arrow-dn-black.svg | 84 + .../images/icon-accordion-arrow-dn-white.svg | 84 + .../icon-accordion-arrow-right-black.svg | 84 + .../icon-accordion-arrow-right-white.svg | 84 + .../images/icon-accordion_arrow_dn--hover.svg | 17 + .../images/icon-accordion_arrow_dn--white.svg | 17 + .../assets/images/icon-accordion_arrow_dn.svg | 17 + .../icon-accordion_arrow_right--hover.svg | 17 + .../icon-accordion_arrow_right--white.svg | 17 + .../images/icon-accordion_arrow_right.svg | 17 + .../doxygen/assets/images/icon-arrow-down.svg | 11 + docs/doxygen/assets/images/icon-checkmark.svg | 10 + docs/doxygen/assets/images/icon-close_btn.svg | 3 + .../assets/images/icon-search-white.svg | 66 + docs/doxygen/assets/images/icon-search.svg | 8 + .../images/icon-section-api-references.svg | 29 + .../images/icon-section-getting-started.svg | 24 + .../assets/images/icon-section-guides.svg | 19 + .../assets/images/icon-section-how-tos.svg | 66 + .../assets/images/icon-section-resources.svg | 23 + .../doxygen/assets/images/icon-teaser-eye.svg | 20 + .../assets/images/icon-teaser-screen.svg | 19 + .../images/icon-teaser-spoke-diagram.svg | 7 + .../assets/images/int-openvino-wht.svg | 44 + docs/doxygen/assets/images/logo-openvino.svg | 36 + docs/doxygen/assets/jquery-2.2.4.min.js | 4 + docs/doxygen/assets/menu.js | 53 + docs/doxygen/assets/openvino-layout.js | 800 +++++++++ docs/doxygen/footer.html.in | 17 + docs/doxygen/header.html.in | 57 + docs/doxygen/ie_c_api.config | 4 +- docs/doxygen/ie_docs.config | 14 +- docs/doxygen/ie_plugin_api.config | 4 +- docs/doxygen/ie_py_api.config | 4 +- docs/doxygen/ngraph_cpp_api.config | 4 +- docs/doxygen/ngraph_py_api.config | 4 +- 95 files changed, 7456 insertions(+), 28 deletions(-) create mode 100644 docs/doxygen/assets/customdoxygen.css create mode 100644 docs/doxygen/assets/fonts/Lato/lato-v16-latin-700.eot create mode 100644 docs/doxygen/assets/fonts/Lato/lato-v16-latin-700.svg create mode 100644 docs/doxygen/assets/fonts/Lato/lato-v16-latin-700.ttf create mode 100644 docs/doxygen/assets/fonts/Lato/lato-v16-latin-700.woff create mode 100644 docs/doxygen/assets/fonts/Lato/lato-v16-latin-700.woff2 create mode 100644 docs/doxygen/assets/fonts/Lato/lato-v16-latin-700italic.eot create mode 100644 docs/doxygen/assets/fonts/Lato/lato-v16-latin-700italic.svg create mode 100644 docs/doxygen/assets/fonts/Lato/lato-v16-latin-700italic.ttf create mode 100644 docs/doxygen/assets/fonts/Lato/lato-v16-latin-700italic.woff create mode 100644 docs/doxygen/assets/fonts/Lato/lato-v16-latin-700italic.woff2 create mode 100644 docs/doxygen/assets/fonts/Lato/lato-v16-latin-italic.eot create mode 100644 docs/doxygen/assets/fonts/Lato/lato-v16-latin-italic.svg create mode 100644 docs/doxygen/assets/fonts/Lato/lato-v16-latin-italic.ttf create mode 100644 docs/doxygen/assets/fonts/Lato/lato-v16-latin-italic.woff create mode 100644 docs/doxygen/assets/fonts/Lato/lato-v16-latin-italic.woff2 create mode 100644 docs/doxygen/assets/fonts/Lato/lato-v16-latin-regular.eot create mode 100644 docs/doxygen/assets/fonts/Lato/lato-v16-latin-regular.svg create mode 100644 docs/doxygen/assets/fonts/Lato/lato-v16-latin-regular.ttf create mode 100644 docs/doxygen/assets/fonts/Lato/lato-v16-latin-regular.woff create mode 100644 docs/doxygen/assets/fonts/Lato/lato-v16-latin-regular.woff2 create mode 100644 docs/doxygen/assets/fonts/roboto-mono-v5-latin-regular.eot create mode 100644 docs/doxygen/assets/fonts/roboto-mono-v5-latin-regular.svg create mode 100644 docs/doxygen/assets/fonts/roboto-mono-v5-latin-regular.ttf create mode 100644 docs/doxygen/assets/fonts/roboto-mono-v5-latin-regular.woff create mode 100644 docs/doxygen/assets/fonts/roboto-mono-v5-latin-regular.woff2 create mode 100644 docs/doxygen/assets/fonts/roboto-v18-latin-500.eot create mode 100644 docs/doxygen/assets/fonts/roboto-v18-latin-500.svg create mode 100644 docs/doxygen/assets/fonts/roboto-v18-latin-500.ttf create mode 100644 docs/doxygen/assets/fonts/roboto-v18-latin-500.woff create mode 100644 docs/doxygen/assets/fonts/roboto-v18-latin-500.woff2 create mode 100644 docs/doxygen/assets/fonts/roboto-v18-latin-500italic.eot create mode 100644 docs/doxygen/assets/fonts/roboto-v18-latin-500italic.svg create mode 100644 docs/doxygen/assets/fonts/roboto-v18-latin-500italic.ttf create mode 100644 docs/doxygen/assets/fonts/roboto-v18-latin-500italic.woff create mode 100644 docs/doxygen/assets/fonts/roboto-v18-latin-500italic.woff2 create mode 100644 docs/doxygen/assets/fonts/roboto-v18-latin-700.eot create mode 100644 docs/doxygen/assets/fonts/roboto-v18-latin-700.svg create mode 100644 docs/doxygen/assets/fonts/roboto-v18-latin-700.ttf create mode 100644 docs/doxygen/assets/fonts/roboto-v18-latin-700.woff create mode 100644 docs/doxygen/assets/fonts/roboto-v18-latin-700.woff2 create mode 100644 docs/doxygen/assets/fonts/roboto-v18-latin-700italic.eot create mode 100644 docs/doxygen/assets/fonts/roboto-v18-latin-700italic.svg create mode 100644 docs/doxygen/assets/fonts/roboto-v18-latin-700italic.ttf create mode 100644 docs/doxygen/assets/fonts/roboto-v18-latin-700italic.woff create mode 100644 docs/doxygen/assets/fonts/roboto-v18-latin-700italic.woff2 create mode 100644 docs/doxygen/assets/fonts/roboto-v18-latin-italic.eot create mode 100644 docs/doxygen/assets/fonts/roboto-v18-latin-italic.svg create mode 100644 docs/doxygen/assets/fonts/roboto-v18-latin-italic.ttf create mode 100644 docs/doxygen/assets/fonts/roboto-v18-latin-italic.woff create mode 100644 docs/doxygen/assets/fonts/roboto-v18-latin-italic.woff2 create mode 100644 docs/doxygen/assets/fonts/roboto-v18-latin-regular.eot create mode 100644 docs/doxygen/assets/fonts/roboto-v18-latin-regular.svg create mode 100644 docs/doxygen/assets/fonts/roboto-v18-latin-regular.ttf create mode 100644 docs/doxygen/assets/fonts/roboto-v18-latin-regular.woff create mode 100644 docs/doxygen/assets/fonts/roboto-v18-latin-regular.woff2 create mode 100644 docs/doxygen/assets/images/404-error.svg create mode 100644 docs/doxygen/assets/images/favicon.ico create mode 100644 docs/doxygen/assets/images/icon-accordion-arrow-dn-black.svg create mode 100644 docs/doxygen/assets/images/icon-accordion-arrow-dn-white.svg create mode 100644 docs/doxygen/assets/images/icon-accordion-arrow-right-black.svg create mode 100644 docs/doxygen/assets/images/icon-accordion-arrow-right-white.svg create mode 100644 docs/doxygen/assets/images/icon-accordion_arrow_dn--hover.svg create mode 100644 docs/doxygen/assets/images/icon-accordion_arrow_dn--white.svg create mode 100644 docs/doxygen/assets/images/icon-accordion_arrow_dn.svg create mode 100644 docs/doxygen/assets/images/icon-accordion_arrow_right--hover.svg create mode 100644 docs/doxygen/assets/images/icon-accordion_arrow_right--white.svg create mode 100644 docs/doxygen/assets/images/icon-accordion_arrow_right.svg create mode 100644 docs/doxygen/assets/images/icon-arrow-down.svg create mode 100644 docs/doxygen/assets/images/icon-checkmark.svg create mode 100644 docs/doxygen/assets/images/icon-close_btn.svg create mode 100644 docs/doxygen/assets/images/icon-search-white.svg create mode 100644 docs/doxygen/assets/images/icon-search.svg create mode 100644 docs/doxygen/assets/images/icon-section-api-references.svg create mode 100644 docs/doxygen/assets/images/icon-section-getting-started.svg create mode 100644 docs/doxygen/assets/images/icon-section-guides.svg create mode 100644 docs/doxygen/assets/images/icon-section-how-tos.svg create mode 100644 docs/doxygen/assets/images/icon-section-resources.svg create mode 100644 docs/doxygen/assets/images/icon-teaser-eye.svg create mode 100644 docs/doxygen/assets/images/icon-teaser-screen.svg create mode 100644 docs/doxygen/assets/images/icon-teaser-spoke-diagram.svg create mode 100644 docs/doxygen/assets/images/int-openvino-wht.svg create mode 100644 docs/doxygen/assets/images/logo-openvino.svg create mode 100644 docs/doxygen/assets/jquery-2.2.4.min.js create mode 100644 docs/doxygen/assets/menu.js create mode 100644 docs/doxygen/assets/openvino-layout.js create mode 100644 docs/doxygen/footer.html.in create mode 100644 docs/doxygen/header.html.in diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 0ac309e1c426ca..a4ee2f62aa5851 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -90,6 +90,31 @@ function(build_docs) set(DOXY_LOG_SCRIPT "${DOXYGEN_DIR}/log.py") set(PYX_FILTER "${DOXYGEN_DIR}/pyx_filter.py") + # assets dir + set(ASSETS_DIR "${DOXYGEN_DIR}/assets") + + # header and footer + set(HEADER_SOURCE "${DOXYGEN_DIR}/header.html.in") + set(FOOTER_SOURCE "${DOXYGEN_DIR}/footer.html.in") + set(HEADER_BUILD "${DOCS_BUILD_DIR}/header.html") + set(FOOTER_BUILD "${DOCS_BUILD_DIR}/footer.html") + + configure_file(${HEADER_SOURCE} ${HEADER_BUILD} @ONLY) + configure_file(${FOOTER_SOURCE} ${FOOTER_BUILD} @ONLY) + + file(GLOB_RECURSE doc_source_files + LIST_DIRECTORIES true RELATIVE ${OpenVINO_MAIN_SOURCE_DIR} + "${OpenVINO_MAIN_SOURCE_DIR}/docs/*.md" + "${OpenVINO_MAIN_SOURCE_DIR}/docs/*.png" + "${OpenVINO_MAIN_SOURCE_DIR}/docs/*.gif" + "${OpenVINO_MAIN_SOURCE_DIR}/docs/*.jpg" + "${OpenVINO_MAIN_SOURCE_DIR}/docs/*.svg" + "${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/*.md" + "${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/*.png" + "${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/*.gif" + "${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/*.jpg" + "${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/*.svg") + configure_file(${PYTHON_API_IN} ${PYTHON_API_OUT} @ONLY) set(NGRAPH_CPP_CONFIG_SOURCE "${DOXYGEN_DIR}/ngraph_cpp_api.config") @@ -122,6 +147,15 @@ function(build_docs) set(PY_LAYOUT_BUILD "${DOCS_BUILD_DIR}/ie_py_api.xml") set(PLUGIN_LAYOUT_BUILD "${DOCS_BUILD_DIR}/ie_plugin_api.xml") + # out dirs + set(OUTPUT_DIRECTORY "${DOCS_BUILD_DIR}/html") + set(IE_OUTPUT "${OUTPUT_DIRECTORY}") + set(C_OUTPUT "${OUTPUT_DIRECTORY}/ie_c_api") + set(PY_OUTPUT "${OUTPUT_DIRECTORY}/ie_python_api") + set(PLUGIN_OUTPUT "${OUTPUT_DIRECTORY}/ie_plugin_api") + set(NGRAPH_CPP_OUTPUT "${OUTPUT_DIRECTORY}/ngraph_cpp_api") + set(NGRAPH_PY_OUTPUT "${OUTPUT_DIRECTORY}/ngraph_python_api") + # Tables of contents configure_file(${NGRAPH_CPP_LAYOUT_SOURCE} ${NGRAPH_CPP_LAYOUT_BUILD} @ONLY) configure_file(${NGRAPH_PY_LAYOUT_SOURCE} ${NGRAPH_PY_LAYOUT_BUILD} @ONLY) @@ -146,6 +180,7 @@ function(build_docs) # nGraph C++ API add_custom_target(ngraph_cpp_api + COMMAND ${CMAKE_COMMAND} -E copy_directory ${ASSETS_DIR} ${NGRAPH_CPP_OUTPUT}/assets COMMAND ${DOXYGEN_EXECUTABLE} ${NGRAPH_CPP_CONFIG_BUILD} WORKING_DIRECTORY ${DOCS_BUILD_DIR} VERBATIM) @@ -153,6 +188,7 @@ function(build_docs) # nGraph Python API add_custom_target(ngraph_py_api + COMMAND ${CMAKE_COMMAND} -E copy_directory ${ASSETS_DIR} ${NGRAPH_PY_OUTPUT}/assets COMMAND ${DOXYGEN_EXECUTABLE} ${NGRAPH_PY_CONFIG_BUILD} WORKING_DIRECTORY ${DOCS_BUILD_DIR} VERBATIM) @@ -160,6 +196,7 @@ function(build_docs) # C API add_custom_target(c_api + COMMAND ${CMAKE_COMMAND} -E copy_directory ${ASSETS_DIR} ${C_OUTPUT}/assets COMMAND ${DOXYGEN_EXECUTABLE} ${C_CONFIG_BUILD} WORKING_DIRECTORY ${DOCS_BUILD_DIR} COMMENT "Generating C API Reference" @@ -168,6 +205,7 @@ function(build_docs) # Python API add_custom_target(py_api + COMMAND ${CMAKE_COMMAND} -E copy_directory ${ASSETS_DIR} ${PY_OUTPUT}/assets COMMAND ${DOXYGEN_EXECUTABLE} ${PY_CONFIG_BUILD} WORKING_DIRECTORY ${DOCS_BUILD_DIR} COMMENT "Generating Python API Reference" @@ -283,25 +321,16 @@ function(build_docs) add_custom_target(ie_docs DEPENDS ngraph_cpp_api preprocess_docs + COMMAND ${CMAKE_COMMAND} -E copy_directory ${ASSETS_DIR} ${IE_OUTPUT}/assets COMMAND ${DOXYGEN_EXECUTABLE} ${IE_CONFIG_BUILD} WORKING_DIRECTORY ${DOCS_BUILD_DIR} VERBATIM) - add_custom_command(TARGET ie_docs - POST_BUILD - COMMAND ${Python3_EXECUTABLE} ${DOXY_LOG_SCRIPT} --log "${DOCS_BUILD_DIR}/ie_docs.log" - --include_omz $ - --include_wb $ - --include_pot $ - --include_gst $ - COMMENT "Parse doxygen log to find errors." - VERBATIM - ) - # Plugin API add_custom_target(plugin_api DEPENDS ngraph_cpp_api ie_docs + COMMAND ${CMAKE_COMMAND} -E copy_directory ${ASSETS_DIR} ${PLUGIN_OUTPUT}/assets COMMAND ${DOXYGEN_EXECUTABLE} ${PLUGIN_CONFIG_BUILD} WORKING_DIRECTORY ${DOCS_BUILD_DIR} COMMENT "Generating Plugin API Reference" @@ -318,6 +347,16 @@ function(build_docs) ngraph_py_api ngraph_cpp_api PROPERTIES FOLDER docs) + add_custom_command(TARGET openvino_docs + POST_BUILD + COMMAND ${Python3_EXECUTABLE} ${DOXY_LOG_SCRIPT} --log "${DOCS_BUILD_DIR}/ie_docs.log" + --include_omz $ + --include_wb $ + --include_pot $ + --include_gst $ + COMMENT "Parse doxygen log to find errors." + VERBATIM) + # added linkcheker if(EXISTS "${LINKCHECKER_PY}") diff --git a/docs/doxygen/assets/customdoxygen.css b/docs/doxygen/assets/customdoxygen.css new file mode 100644 index 00000000000000..4e6ef063dfe7b6 --- /dev/null +++ b/docs/doxygen/assets/customdoxygen.css @@ -0,0 +1,1452 @@ +/* CUSTOM FONTS */ +/* lato-100 - latin */ +@font-face { + font-family: 'Lato'; + font-style: normal; + font-weight: 100; + src: url('fonts/Lato/lato-v16-latin-100.eot'); /* IE9 Compat Modes */ + src: local('Lato Hairline'), local('Lato-Hairline'), + url('fonts/Lato/lato-v16-latin-100.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ + url('fonts/Lato/lato-v16-latin-100.woff2') format('woff2'), /* Super Modern Browsers */ + url('fonts/Lato/lato-v16-latin-100.woff') format('woff'), /* Modern Browsers */ + url('fonts/Lato/lato-v16-latin-100.ttf') format('truetype'), /* Safari, Android, iOS */ + url('fonts/Lato/lato-v16-latin-100.svg#Lato') format('svg'); /* Legacy iOS */ +} +/* lato-100italic - latin */ +@font-face { + font-family: 'Lato'; + font-style: italic; + font-weight: 100; + src: url('fonts/Lato/lato-v16-latin-100italic.eot'); /* IE9 Compat Modes */ + src: local('Lato Hairline Italic'), local('Lato-HairlineItalic'), + url('fonts/Lato/lato-v16-latin-100italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ + url('fonts/Lato/lato-v16-latin-100italic.woff2') format('woff2'), /* Super Modern Browsers */ + url('fonts/Lato/lato-v16-latin-100italic.woff') format('woff'), /* Modern Browsers */ + url('fonts/Lato/lato-v16-latin-100italic.ttf') format('truetype'), /* Safari, Android, iOS */ + url('fonts/Lato/lato-v16-latin-100italic.svg#Lato') format('svg'); /* Legacy iOS */ +} +/* lato-300 - latin */ +@font-face { + font-family: 'Lato'; + font-style: normal; + font-weight: 300; + src: url('fonts/Lato/lato-v16-latin-300.eot'); /* IE9 Compat Modes */ + src: local('Lato Light'), local('Lato-Light'), + url('fonts/Lato/lato-v16-latin-300.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ + url('fonts/Lato/lato-v16-latin-300.woff2') format('woff2'), /* Super Modern Browsers */ + url('fonts/Lato/lato-v16-latin-300.woff') format('woff'), /* Modern Browsers */ + url('fonts/Lato/lato-v16-latin-300.ttf') format('truetype'), /* Safari, Android, iOS */ + url('fonts/Lato/lato-v16-latin-300.svg#Lato') format('svg'); /* Legacy iOS */ +} +/* lato-300italic - latin */ +@font-face { + font-family: 'Lato'; + font-style: italic; + font-weight: 300; + src: url('fonts/Lato/lato-v16-latin-300italic.eot'); /* IE9 Compat Modes */ + src: local('Lato Light Italic'), local('Lato-LightItalic'), + url('fonts/Lato/lato-v16-latin-300italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ + url('fonts/Lato/lato-v16-latin-300italic.woff2') format('woff2'), /* Super Modern Browsers */ + url('fonts/Lato/lato-v16-latin-300italic.woff') format('woff'), /* Modern Browsers */ + url('fonts/Lato/lato-v16-latin-300italic.ttf') format('truetype'), /* Safari, Android, iOS */ + url('fonts/Lato/lato-v16-latin-300italic.svg#Lato') format('svg'); /* Legacy iOS */ +} +/* lato-regular - latin */ +@font-face { + font-family: 'Lato'; + font-style: normal; + font-weight: 400; + src: url('fonts/Lato/lato-v16-latin-regular.eot'); /* IE9 Compat Modes */ + src: local('Lato Regular'), local('Lato-Regular'), + url('fonts/Lato/lato-v16-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ + url('fonts/Lato/lato-v16-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */ + url('fonts/Lato/lato-v16-latin-regular.woff') format('woff'), /* Modern Browsers */ + url('fonts/Lato/lato-v16-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */ + url('fonts/Lato/lato-v16-latin-regular.svg#Lato') format('svg'); /* Legacy iOS */ +} +/* lato-italic - latin */ +@font-face { + font-family: 'Lato'; + font-style: italic; + font-weight: 400; + src: url('fonts/Lato/lato-v16-latin-italic.eot'); /* IE9 Compat Modes */ + src: local('Lato Italic'), local('Lato-Italic'), + url('fonts/Lato/lato-v16-latin-italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ + url('fonts/Lato/lato-v16-latin-italic.woff2') format('woff2'), /* Super Modern Browsers */ + url('fonts/Lato/lato-v16-latin-italic.woff') format('woff'), /* Modern Browsers */ + url('fonts/Lato/lato-v16-latin-italic.ttf') format('truetype'), /* Safari, Android, iOS */ + url('fonts/Lato/lato-v16-latin-italic.svg#Lato') format('svg'); /* Legacy iOS */ +} +/* lato-700 - latin */ +@font-face { + font-family: 'Lato'; + font-style: normal; + font-weight: 700; + src: url('fonts/Lato/lato-v16-latin-700.eot'); /* IE9 Compat Modes */ + src: local('Lato Bold'), local('Lato-Bold'), + url('fonts/Lato/lato-v16-latin-700.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ + url('fonts/Lato/lato-v16-latin-700.woff2') format('woff2'), /* Super Modern Browsers */ + url('fonts/Lato/lato-v16-latin-700.woff') format('woff'), /* Modern Browsers */ + url('fonts/Lato/lato-v16-latin-700.ttf') format('truetype'), /* Safari, Android, iOS */ + url('fonts/Lato/lato-v16-latin-700.svg#Lato') format('svg'); /* Legacy iOS */ +} +/* lato-700italic - latin */ +@font-face { + font-family: 'Lato'; + font-style: italic; + font-weight: 700; + src: url('fonts/Lato/lato-v16-latin-700italic.eot'); /* IE9 Compat Modes */ + src: local('Lato Bold Italic'), local('Lato-BoldItalic'), + url('fonts/Lato/lato-v16-latin-700italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ + url('fonts/Lato/lato-v16-latin-700italic.woff2') format('woff2'), /* Super Modern Browsers */ + url('fonts/Lato/lato-v16-latin-700italic.woff') format('woff'), /* Modern Browsers */ + url('fonts/Lato/lato-v16-latin-700italic.ttf') format('truetype'), /* Safari, Android, iOS */ + url('fonts/Lato/lato-v16-latin-700italic.svg#Lato') format('svg'); /* Legacy iOS */ +} +/* lato-900 - latin */ +@font-face { + font-family: 'Lato'; + font-style: normal; + font-weight: 900; + src: url('fonts/Lato/lato-v16-latin-900.eot'); /* IE9 Compat Modes */ + src: local('Lato Black'), local('Lato-Black'), + url('fonts/Lato/lato-v16-latin-900.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ + url('fonts/Lato/lato-v16-latin-900.woff2') format('woff2'), /* Super Modern Browsers */ + url('fonts/Lato/lato-v16-latin-900.woff') format('woff'), /* Modern Browsers */ + url('fonts/Lato/lato-v16-latin-900.ttf') format('truetype'), /* Safari, Android, iOS */ + url('fonts/Lato/lato-v16-latin-900.svg#Lato') format('svg'); /* Legacy iOS */ +} +/* lato-900italic - latin */ +@font-face { + font-family: 'Lato'; + font-style: italic; + font-weight: 900; + src: url('fonts/Lato/lato-v16-latin-900italic.eot'); /* IE9 Compat Modes */ + src: local('Lato Black Italic'), local('Lato-BlackItalic'), + url('fonts/Lato/lato-v16-latin-900italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ + url('fonts/Lato/lato-v16-latin-900italic.woff2') format('woff2'), /* Super Modern Browsers */ + url('fonts/Lato/lato-v16-latin-900italic.woff') format('woff'), /* Modern Browsers */ + url('fonts/Lato/lato-v16-latin-900italic.ttf') format('truetype'), /* Safari, Android, iOS */ + url('fonts/Lato/lato-v16-latin-900italic.svg#Lato') format('svg'); /* Legacy iOS */ +} + +* { + box-sizing: border-box; +} + +body, +table, +div, +p, +dl { + font: normal 400 1rem/1.25 "Lato", "Helvetica", sans-serif; +} + +body { + background: white; + color: #555555; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; + margin: 0; + min-height: 100vh; + max-width: 100%; + overflow-y: scroll; + padding: 0; + position: relative; + -webkit-font-kerning: normal; + font-kerning: normal; + -webkit-font-feature-settings: "liga"; + -ms-font-feature-settings: "liga"; + font-feature-settings: "liga"; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-rendering: optimizeLegibility; +} + +/* Optimization Notice */ + +div.opt-notice { + text-align:center; + width: 100%; + margin: auto; + padding: 1.5vh 20px; +} + +div.opt-notice a{ + text-decoration: underline; +} + +/* Failsafe in case JS is turned off */ +body > .header, +body > div.header, +body > .contents, +body > div.contents { + margin-left: auto; + margin-right: auto; + max-width: 1064px; + padding: 0 20px; +} +/* end failsafe */ + +a { + color: #368dcc; + font-weight: inherit; + text-decoration: none; +} + +a.el { + font-weight: inherit; +} + +a:hover { + color: #368dcc; + text-decoration: none; + cursor: pointer; +} + +a:visited, +.contents a:visited { + color: #368dcc; +} + +p { + margin: 1rem 0 1.5rem 0; +} + +p.startli, +p.startdd { + margin-top: 0; +} + +ol, +ul { + margin: 0 0 1.5rem 0; +} + +li { + margin-bottom: 1.1rem; +} + +li .image { + padding-left: 0; +} + +img { + max-width: 100%; + cursor: pointer; +} + +.image { + margin: 2.5rem 0; + padding: 0 1.875rem; + display: inline-block; +} + +hr { + background: #ececec; + border: none; + height: 1px; + margin: 1.5rem 0; + width: 100%; +} + +blockquote, .blockquote_note { + background: #ebf3fc; + border-left: 5px solid #2171b8; + font: inherit; + font-size: 0.875rem; + margin: 0 0 2.5rem 0; + padding: 0.5rem 1.5rem 1.5rem 1.5rem; +} + +.blockquote_caution { + background: #fcf4e7; + border-color: #ffb133; +} + +.blockquote_tip { + background: #effaee; + border-color: #0c6800; +} + +blockquote.blockquote_warning { + background: #ffebeb; + border-color: #d80000; +} + +blockquote p, +blockquote ul { + margin-bottom: 1.25rem; +} + +blockquote > ul { + list-style: disc; +} + +blockquote p:last-child, +blockquote ul:last-child, +blockquote ul li:last-child { + margin-bottom: 0; +} + +/* + min-height calculation: + header height: 120 + footer height: 254 + contents bottom margin: 20 +*/ + +#container { + min-height: calc(100vh - 394px); + padding: 0; + padding-bottom:200px; + margin: 150px auto 0 auto; + width: 800px; +} + +.textblock { + margin-bottom: 2.5rem; +} + +div.summary { + display: none; +} + +/* make sure that the width of the contents section is everything but left and right columns */ +@media screen and (max-width: 1400px) { + #container { + margin-left: 20rem; + width: 70%; + } +} + +/* at smaller breakpoints, only account for left nav column & gutter */ +/* +@media screen and (max-width: 1200px) { + #left-nav + div.contents, + #contents-nav + div.contents { + width: calc(100% - 297px); + margin-right: 0; + } +} +*/ + +h1, +div.header, +h2, +h2.groupheader, +h3, +h4, +h5, +h6 { + margin:0; + margin-bottom: 1rem; + margin-top: 2.5rem; +} + +h2, +h2.groupheader { + border: 0; + color: inherit; + font: normal 400 1.75rem/1.25 "Lato", "Helvetica", sans-serif; +} + +h3 { + font: normal 400 1.375rem/1.25 "Lato", "Helvetica", sans-serif; +} + +h4 { + font: normal 400 1.25/1.25 "Lato", "Helvetica", sans-serif; +} + +/* "H1" headings */ + +div.header { + background: none; + border: 0; +} + +div.headertitle { + padding: 0; +} + +h1, +.title { + color: #555555; + font: normal 400 2.25rem/1.25 "Lato", "Helvetica", sans-serif; +} + +.title { + margin:0; +} + +/* END "H1" headings */ + +/* Tables */ +.table-wrapper { + margin: 0 0 2.5rem 0; + overflow-x: auto; + overflow-y: hidden; +} + +table, +table.doxtable, +table.markdownTable { + border-collapse: collapse; + margin: 0; + width: 100%; +} + +table tr.heading td { + padding: 0; +} + +table.doxtable td, +table.doxtable th, +table.markdownTable td, +table.markdownTable th { + background: transparent; + border: 0; + border-bottom: 1px solid #ececec; + color: inherit; + font: inherit; + padding: 1rem; +} + +table.doxtable td:first-child, +table.doxtable th:first-child, +table.markdownTable td:first-child, +table.markdownTable th:first-child { + padding-left: 0; +} + +table.doxtable td:last-child, +table.doxtable th:last-child, +table.markdownTable td:last-child, +table.markdownTable th:last-child { + padding-right: 0; +} + +table.doxtable th, +table.markdownTable th { + border-bottom: 2px solid #ececec; + color: #777; + font-size: 0.875rem; + letter-spacing: 0.05em; + line-height: 1em; + padding-bottom: 0.5rem; + padding-top: 0.5rem; + text-transform: uppercase; +} + +table.doxtable th.markdownTableHeadCenter, +table.markdownTable th.markdownTableHeadCenter { + text-align: center; +} + +table.doxtable th.markdownTableHeadRight, +table.markdownTable th.markdownTableHeadRight { + text-align: right; +} + +table .image { + margin: 0; + padding: 0; +} + +table .markdownTableBodyNone .image, +table .markdownTableBodyLeft .image { + text-align: left; +} + +table h2.groupheader { + border-bottom: 2px solid #ececec; + color: inherit; + margin-bottom: 0; +} + +table.memberdecls td.memSeparator { + border-color: #ececec; + height: 0px; + line-height: 0px; +} + +.mdescLeft, +.mdescRight, +.memItemLeft, +.memItemRight, +.memTemplItemLeft, +.memTemplItemRight, +.memTemplParams { + padding-bottom: 5px; + padding-top: 5px; +} +/* END tables */ + +/* =========================================================== */ +/* H E A D E R */ + +#top { + background: #003C71; + position: fixed; + transform: translateZ(0); + top: 0; + width: 100%; + z-index: 1000; +} + +#titlearea { + color: white; + margin: 0 auto; + padding: 1rem auto; + position: relative; + transition: height 0.3s ease; + min-width: 768px; + max-width: 100%; + display: flex; + flex-direction: row; + flex-wrap: nowrap; + justify-content: space-between; + border:none; +} + +#projectalign { + margin-left:3.75rem; +} + +#projectalign, +#MSearchBox { + width: 18.375rem; + white-space: nowrap; + float: none; + right: 0px; + background: none; + box-shadow: none; +} + +#projectname { + font: inherit; + font-size: 1.25em; + line-height: 1em; + padding: 0; + position: relative; +} + +a.homelink-id { + color: white; + font-size: 1rem; + display:block; + padding: 1.4375rem 0 1rem 0; +} + +a.homelink-id > img { + min-width: 220px; + max-width: 220px; +} + +a.homelink-id > p { + margin: 0; + font-size: 1rem; +} + +#projectnumber { + display: none; + font: inherit; + font-size: 0.75em; +} + +#versionsSelector { + font-size: 0.875rem; + margin-right: 2.25rem; + min-width:90px; + position: relative; +} + +div.ovino-btn { + font-size: 1rem; + line-height: 1.25; + border-radius: 0.25rem; + padding: 0.625rem 1.5rem; + background: #003C71; + color: #ffffff; + white-space: nowrap; +} + +div.ovino-btn:hover { + background-color:#001F3B; +} + +div.ovino-btn > a { + color:white; + width:100%; +} + + +#versionsSelector button.version-toggle { + background: transparent url(images/icon-accordion-arrow-dn-black.svg) 97% 50% + no-repeat; + background-size: 0.75rem; + border: 0; + border-bottom: 1px solid #555555; + color: #555555; + cursor: pointer; + font: inherit; + height: 100%; + padding-left: 5px; + padding-right: 24px; +} + +#versionsList { + background: #f9f9f9; + border: 2px solid #368dcc; + box-shadow: 0 2px 3px rgba(0, 0, 0, 0.5); + box-sizing: content-box; + color: initial; + display: none; + font-weight: 300; + list-style: none; + max-height: 200px; + overflow-y: auto; + padding: 0.5rem; + position: absolute; + right: 0; + top: 0; + width: 100%; +} + +#versionsList.opened { + display: block; +} + +#versionsList li { + display: block; + margin: 0; +} + +#versionsList li a { + color: #555555; + display: block; + padding: 0.2rem 0 0.2rem 1.2rem; +} + +#versionsList li.active a, +#versionsList li.active a:hover, +#versionsList li.active a:visited { + background: url(images/icon-checkmark.svg) 0 50% no-repeat; + background-size: 1em; + color: #2171b8; +} + +#nav-path { + display: none; +} + +#main-nav { + text-align: center; + margin: 0 auto; + display: flex; + align-items: baseline; + padding: 0 0.2rem; +} + +#main-nav ul#main-menu { + list-style: none; + margin: 0 auto; + padding: 0; + width: 100%; + text-align: center; + display: flex; + height: 100%; + align-items: stretch; + justify-content: center; +} + +#main-nav ul#main-menu > li { + margin: 0; + display: inline-block; + margin-right: 6.875rem; + height:100%; +} + +#main-nav ul#main-menu > li:last-child { + margin-right: 0; +} + +ul.dropdown-menu { + box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1); + max-height: 500px; + overflow-y: scroll; +} + + +#main-nav ul.dropdown-menu a { + font-size: 0.75rem; + display: block; +} + +#main-nav ul#main-menu > li:hover>ul.dropdown-menu { + width: 100%; + display:flex; + margin:0; + padding: 2.25rem 2.9375rem 1.6875rem 2.9375rem; + flex-wrap: wrap; +} + +#main-nav ul.dropdown-menu > li { + padding-left:0; + padding: 0 0 0.5625rem 0; + margin-bottom:0; + border: 0.75rem solid transparent; +} + +#main-nav ul.dropdown-menu > li > ul { + margin-top: 0.625rem; + margin-right: 2.125rem; +} + +#main-nav ul.dropdown-menu > li > ul:last-child { + margin-right: 0; +} + +#main-nav ul.dropdown-menu > li > ul > li { + margin-bottom: 0.4375rem; +} + +#main-nav ul.dropdown-menu > li > a { + display: block; + padding: 0.1rem 0px; + font-weight: bold; + font-size: 0.875rem; + padding-bottom: 0.625rem; +} + +#main-nav ul.dropdown-menu > li > a { + border-bottom: 2px solid rgba(34,36,38,.15); +} + +#main-nav ul.dropdown-menu ul { + list-style: none; + padding: 0; +} + +#main-nav ul#main-menu > li > a { + display:flex; + align-items: center; + height:100%; + color: #ffffff; + font-size: 0.875rem; + font-weight: normal; + letter-spacing: 0.07rem; + position: relative; + text-transform: uppercase; + white-space: nowrap; +} + +#main-nav ul#main-menu > li > a:hover { + color: #AED1EB; +} + +a.see-all { + font-weight: bold; +} + +@media screen and (max-width: 1300px) { + #main-nav ul#main-menu > li > a { + font-size: 0.75rem; + } + + #main-nav ul#main-menu > li { + margin-right: 2.5rem; + } + + #main-nav ul#main-menu { + width: 500px; + } + + #projectalign, #MSearchBox, #MSearchBox .left { + width: 16rem; + } + + #download-link { + margin-right:3.28rem; + } +} + +#main-nav ul#main-menu > li > a.active { + font-weight: bold; +} + +div.old-version > p { + margin: 0; + text-align: center; + background: #ffb133; + padding: 5px; + color: white; +} + +#secondnav { + background: #f9f9f9; + box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1); + display: flex; + justify-content: flex-end; + padding:8px; +} + +#download-link { + margin-right: 3.75rem; +} + +.nav-placeholder { + background:#ececec; + width:10%; + height:30px; +} + +/* =========================================================== */ +/* L E F T - N A V */ + +#left-nav { + left: 0; + overflow-x: hidden; + overflow-y: auto; + position: fixed; + width: 17.3125rem; + margin-top: 20px; + max-height: 690px; +} + +#left-nav a { + color: inherit; + display: block; + padding: 3px 0; + position: relative; +} + +#left-nav a:hover { + color: #368dcc; +} + +div.accordion-heading { + position: relative; +} + +#left-nav ul, +div.accordion-heading { + font-size: 0.75rem; +} + +#left-nav ul { + font-weight: 700; + list-style: none; + margin: 0; + padding: 0; + width: 100%; +} + +#left-nav li { + margin-top: 0.8125rem; + margin-bottom: 0; + position: relative; +} + +#left-nav ul.main-menu > li { + margin-bottom: 13px; +} + +#left-nav ul.main-menu > li > ul > li { + margin-bottom: 0.4375rem; + margin-top:0; + background: #f3f3f3; +} + +#left-nav ul.main-menu > li > ul > li:last-child { + margin-bottom: 0; +} + +#left-nav ul.main-menu > li > ul > li > div.accordion-heading > a { + font-weight:bold; +} + +#left-nav ul.main-menu li.active > a, +#left-nav ul.main-menu li.active > div.accordion-heading > a { + font-weight: bold; + color: #368dcc; +} + +#left-nav > ul.main-menu > li > div.accordion-heading { + height:3.875rem; + font-weight: bold; + color: #ffffff; + font-size:0.875rem; + background: #003C71; +} + +#left-nav > ul.main-menu > li > div.accordion-heading > a { + top: 50%; + transform: translateY(-50%); + padding-left: 2rem; +} + +#left-nav > ul.main-menu > li > div.accordion-heading > span.accordion-trigger { + top: 1.9rem; + left: 0.6rem; +} + +div.accordion-heading > span.accordion-trigger { + top:50%; + transform: translateY(-50%); +} + +div.accordion-heading > a { + padding-left: 0; +} + +#left-nav ul.main-menu > li > ul > li > ul > li > ul { + background: #f9f9f9; +} + +#left-nav ul.main-menu > li > ul > li > ul > li > ul > li ul { + background: #fefefe; +} + +#left-nav ul.main-menu > li > ul > li, +#left-nav ul.main-menu > li > ul > li > ul > li > ul, +#left-nav ul.main-menu > li > ul > li > ul > li > ul > li ul { + padding-top:1.125rem; + padding-bottom:1.125rem; +} + +#left-nav ul.main-menu > li:last-child { + margin-bottom: 0; +} + +#left-nav li.accordion > span.accordion-trigger, +div.accordion-heading > span.accordion-trigger { + background: url(images/icon-accordion_arrow_right.svg) center center + no-repeat; + background-size: contain; + border: 5px solid transparent; + cursor: pointer; + display: block; + height: 20px; + left: 0.35rem; + position: absolute; + top: 0.3rem; + width: 20px; + z-index: 100; +} + +#left-nav li.accordion > div.accordion-heading > span.accordion-trigger { + background-image: url(images/icon-accordion-arrow-right-black.svg); + height: 21px; + top: 0.65rem; + width: 21px; +} + +#left-nav > ul.main-menu > li.accordion > div.accordion-heading > span.accordion-trigger { + background-image: url(images/icon-accordion-arrow-right-white.svg); +} + +#left-nav li.accordion-opened > div.accordion-heading > span.accordion-trigger { + background-image: url(images/icon-accordion-arrow-dn-black.svg); +} + +#left-nav > ul.main-menu > li.accordion-opened > div.accordion-heading > span.accordion-trigger { + background-image: url(images/icon-accordion-arrow-dn-white.svg); +} + +#left-nav li.accordion.active > div.accordion-heading > span.accordion-trigger { + background: url(images/icon-accordion_arrow_right.svg) center + center no-repeat; + opacity: 0.59; +} + +#left-nav li.accordion-opened.active > div.accordion-heading > span.accordion-trigger { + background: url(images/icon-accordion_arrow_dn.svg) center + center no-repeat; + opacity: 1; +} + +#left-nav li.accordion.active > div.accordion-heading > span.accordion-trigger { + opacity: 1; +} + +#left-nav li.accordion > ul { + display: none; + font-weight: 400; + overflow: hidden; +} + +#left-nav ul.main-menu ul li span.accordion-trigger { + left: 0.6rem; +} +#left-nav ul.main-menu ul li a { + font-size: 0.75rem; + padding-left: 2rem; +} + +#left-nav ul.main-menu ul ul { + margin-bottom: 0.5rem; + margin-right: 0; + width: auto; +} + +#left-nav ul.main-menu ul ul li span.accordion-trigger { + left: 1.7rem; +} +#left-nav ul.main-menu ul ul li a { + padding-left: 3rem; + position: relative; + padding-right: 18px; + line-height: 1.25em; +} + +#left-nav ul.main-menu ul ul ul ul li span.accordion-trigger { + left: 3.9rem; +} +#left-nav ul.main-menu ul ul ul ul li a { + padding-left: 5rem; +} + +#left-nav ul.main-menu ul ul ul ul ul li span.accordion-trigger { + left: 5rem; +} +#left-nav ul.main-menu ul ul ul ul ul li a { + padding-left: 6rem; +} + +#left-nav ul.main-menu ul ul ul ul ul ul li span.accordion-trigger { + left: 6.1rem; +} +#left-nav ul.main-menu ul ul ul ul ul ul li a { + padding-left: 7rem; +} + +#left-nav ul.main-menu ul ul ul ul ul ul ul li span.accordion-trigger { + left: 7.2rem; +} +#left-nav ul.main-menu ul ul ul ul ul ul ul li a { + padding-left: 8rem; +} + +#left-nav ul.main-menu ul ul ul li span.accordion-trigger { + left: 2.8rem; +} +#left-nav ul.main-menu ul ul ul li a { + padding-left: 4rem; +} + +/* =========================================================== */ +/* C O N T E N T S - N A V */ + +nav.contents-nav { + font-size: 0.875rem; + padding-bottom: 5px; + margin-top:80px; +} + +nav.contents-nav h2.contents-nav-title { + color: #555555; + font-size: 1rem; + font-weight: normal; + line-height: 2rem; + margin-bottom: 1rem; +} + +nav.contents-nav a:hover, +div.contents nav.contents-nav a:hover { + text-decoration: underline; + color: #368dcc; +} + +nav.contents-nav a.active, +div.contents nav.contents-nav a.active { + color: #003C71; +} + +nav.contents-nav ul { + list-style: none; + margin: 0; + padding: 0; +} + +nav.contents-nav ul li:first-child { + margin-top:0; +} + +nav.contents-nav ul li { + margin: .7vh 0; +} + +#left-nav a.removehover:hover { + color: #6e6e6e; + text-decoration: none; +} + +nav.contents-nav ul ul { + font-weight: 400; +} + +nav.contents-nav ul ul li { + padding-left: 15px; + position: relative; +} + +#inner-contents-nav { + display: none; + margin-bottom: 40px; +} + +#contents-nav { + background: #ffffff; + overflow-x: hidden; + overflow-y: auto; + position: fixed; + right: 10px; + width: 202px; + top: 10% !important; + margin-right:50px; +} + +@media screen and (max-width: 1400px) { + #inner-contents-nav { + display: block; + } + + #contents-nav { + display: none; + } +} + +/* =========================================================== */ +/* F O O T E R */ + +.footer { + background: #555555; + color: white; + font: inherit; + /* font-weight: 300; */ + position: absolute; + bottom: 0; + width: 100%; + /* height: 200px; */ +} + +.footer a { + color: #ffffff; +} + +.footer-content { + margin: 0 auto; + max-width: 1400px; + overflow: hidden; + padding: 10px 15px; + width: 100%; +} + +.footer-column { + display:inline-block; + margin: 0 10px; + font-size: calc(6px + (20 - 14) * ((100vw - 300px) / (1600 - 300))); + line-height: calc((6px + (20 - 14) * ((100vw - 300px) / (1600 - 300))) * 1.5); +} + +.footer-column h4 { + text-align: left; +} + +.footer-row { + text-align: center; + position: relative; + height: 50px; +} + +.footer-last { + float: right; + margin-right: 0; +} + +.footer-support, .footer-cookies { + position: absolute; + bottom: 0; +} + +.footer-support { + left: 0; +} + +.footer-cookies { + right: 0; +} + +.footer ul { + list-style: none; + margin: 0 auto; + padding: 0; + width: 100%; + text-align: center; +} + +.footer li { + margin: 0; + display: inline-block; + padding: 0.6em; +} + +.footer h4 { + margin: 0; + text-transform: uppercase; +} + +.copyright { + text-align: right; + margin-right: 20px; +} + +.copyright p { + font-size: 14px; +} + +/* Optimization Notice */ + +div.opt-notice-wrapper { + background: #4a4a4a; + color:#ffffff; + position: fixed; + bottom: 0; + left: 0; + width:100% +} + +p.opt-notice { + text-align:center; + width: 100%; + margin: auto; + padding: 1.5vh 20px; + font-size: calc(6px + (20 - 14) * ((100vw - 300px) / (1600 - 300))); + line-height: calc((6px + (20 - 14) * ((100vw - 300px) / (1600 - 300))) * 1.5); +} + +/* Cookies notification */ +div.cookies-notification { + position: fixed; + bottom: 0; + background: #ebf3fc; + padding:30px; + width: 100%; + text-align: center; + z-index: 1000; +} + +div.cookies-notification button { + border: none; + background-color: #0F93C2; + color: white; + padding: 10px 20px; + margin-left: 30px; + cursor: pointer; +} + +div.cookies-notification p { + margin:0; + color: #555555; + font-size: 15px; +} + +div.cookies-notification a, +div.cookies-notification a:hover { + color: #368dcc; + text-decoration: none; +} + +/* =========================================================== */ +/* C O D E - B L O C K S */ + +code, +pre, +div.line { + background: #f9f9f9; + font-family: monospace, fixed; + font-weight: 400; +} + +div.fragment, +pre.fragment { + background: #f9f9f9; + border: none; + counter-reset: codegroup; + margin: 1.1rem 0; + padding: 0.75rem 1rem; + overflow: auto; +} + +div.line { + box-sizing: content-box; + font-size: 12px; + line-height: 18px; + position: relative; + text-indent: 0; + white-space: pre; +} + +div.line::before { + color: #d1d0d0; + content: counter(codegroup); + counter-increment: codegroup; + left: 0; + position: absolute; + text-align: right; + width: 3em; +} + +div.line span.lineno { + display: none; +} + +div.fragment div.line:last-of-type { + margin-bottom: 0; +} + +.memtitle { + margin-top:0; + width:100%; +} + +.memitem { + margin-bottom: 15px; + display: block !important; +} + +.class-attr-name { + margin-top: 10px; +} + +.class-attr-desc { + overflow-x: auto; +} + +div.memdoc { + overflow-x: auto; +} + +/* =========================================================== */ +/* S E A R C H */ + +#MSearchResultsWindow { + background-color: white; + border: none; + border-radius: 0.5rem; + box-shadow: 0 3px 4px rgba(163, 163, 163, 0.5); + overflow: hidden; + padding: 10px; + position: fixed; +} + +iframe#MSearchResults { + width: 533px; +} + +#MSearchBox { + margin-top: 0; + position: relative; + height:auto; + margin-right: 3.75rem; +} + +#FSearchBox { + float: none; + min-height: 100%; + margin:0; + position: relative; +} + +#MSearchBox .left, +#MSearchBox .right { + background: none; + height: auto; + left: 0; + position: relative; + top: 0; + width: auto; +} + +#MSearchBox .left { + display: block; + position: absolute; + width:18.375rem; +} + +#MSearchBox .left { + height: 100%; +} + +#MSearchBox .left img { + display: none; +} + +#FSearchBox #MSearchField { + margin-left:0; +} + +#MSearchField { + background-size: 1rem; + font: inherit; + line-height: 30px; + margin: 0; + background: white; + border-radius: 0.25rem; + height: 2.125rem; + display:none; + position: absolute; + top: 50%; + transform: translateY(-50%); + right: 9rem; + width: 60vw; +} + +#search-slider { + cursor:pointer; + height:20px; + width:20px; + position:absolute; + top:50%; + transform:translateY(-50%); + z-index: 1000; + right: 9.1875rem; +} + +#search-slider.closed { + background: url(images/icon-search-white.svg) center no-repeat; +} + +#search-slider.open { + background: url(images/icon-close_btn.svg) center no-repeat; +} + + +#MSearchClose { + background: url(images/icon-close_btn.svg) no-repeat; + height: 16px; + margin: 0; + padding: 0; + top: 8px; + width: 16px; +} + +.right #MSearchClose { + right: 10px; +} + +#MSearchClose img { + display: none; +} + +/* viewer.js fix */ +.viewer-toolbar > ul > li::before { + position: absolute; +} diff --git a/docs/doxygen/assets/fonts/Lato/lato-v16-latin-700.eot b/docs/doxygen/assets/fonts/Lato/lato-v16-latin-700.eot new file mode 100644 index 0000000000000000000000000000000000000000..0d9dac2ff746763a5d0f2bcf0db068d3ce6b8b96 GIT binary patch literal 26105 zcmYg$Wl$VUu;Jak z0dW1d5CDFF*ngVQe^#IW;{M0yHGus;|Nn_}`Hyq{&*}m2{Lk|GKg|Q+_n(K|e;NP) z{r|aO|0@#!AgiaO{lAX%e<2D0Nd}M`0jP8W__3j1e#U)Sjv;O~mEFI;{U=YAvuVts zmzSr7w@p9=Ogt)&bN}s9)s-%NYF)BdK~I>Ao~7lg75EAJ&-$?RLvv5O38S;zU9m{& z5O&nb4#^A zwPB5HHurJ$D%lO$Iz1-v)Efl-@X^8jQ*6b+WR+(xb%pT6tyd3H#9Ty7bDHXW=igb*&$c&wyNEwAlzC4Y$6ZKCor z4cv(J$PL;sr`Y`#)zf|_E03Xd7OaRx#uc)Nmmnn${D#|QUHn&bUxncy?gXPel1n!# zExla+r1zashr$W>ca0y~>g`{4*$Cw~0M!;}WmBVU)p0`1T=$HsHOWiN_Zoa1iQNZm z8g|OtggnEc;9RDI5;G(OJPqut!zGh%q^hIlpspkB(Q+N^9)2H(J5(V16ij=Q%cPado;-nDFXk@8KSjm?~`d^tOu zJ-h#U>=<><6ql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whVT^3; z2;!ir0fau0FArZ5hZ?_#;jr9b@`Kv=aRxY_8g>u^alsIH_U zhM5CY!~Kg3E>3m^luasL17nInig|4HY}pwBJSdg7)G1px=$afQI2WXIP?mArP=y)= zFxVs0rN=_rvKnD}oP!|59x&}JCPJ9}1=%OI59gi~E6ZUOreOsj+GxolOqN(;WbneO zRft75H_f1xmpSfD#O7DANlbz2EL$oq2fg z>lN3o*42ee(!(sTUh&1ua0Dg zF@GG%3ofZTTY-mv6dfM{d65FJ*bgf8L`BVRsu^NxPOweSmK6Ba5{N2=*LwL~}?2}|0YrGhU zoGNWHEm9+Q%}eRKX}Fu}g*R#xqZgrTjhs zVQmt-V)`?@v_?xGNnLv?VTKj~oV+PeUo3vg!7x8$pc(k8J^_IT1=Ru)u>bX)mLnt_@R|Jr|WAtgCz#xR1ke;THSkr62(2>03~=CTY2ky+^5qla?&y zq@>l*^N>VUPm1RwFa_`FT8eb6tx6sm{gV47F<@#pZLk5vE#1TlgvU^AqHCy>&?+nM zJ=OBI@wsTR;2EFB#yhXQmTO!9xdOmR%~U%!)Vrx= + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/assets/fonts/Lato/lato-v16-latin-700.ttf b/docs/doxygen/assets/fonts/Lato/lato-v16-latin-700.ttf new file mode 100644 index 0000000000000000000000000000000000000000..4f3d84480b5bfa7103a13d33a27669daf5832cc9 GIT binary patch literal 59032 zcmc$H2Yg(`wfCKS_ioWPZP%`LSKHO=s>_mAl4Vu*F86K=+#TB(Y?>*-#6Us_EdfGe z2!UXd&_ZaTp0PtVNbJLb{&)aaqa2I<)_jmmMG3tkQtlPe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(`fEAnmdi=PD35_fH)rl7kOX6y$D(~DoPp63#1JUgPw3gBXA?Rwqb|KxPx(1!3Z!4 zjHQP+4&+d4CgSEpRUw)v0+Ycka3@$q+$H3<6fDEP8n+g#CC_zWJ*Wd4z>{Djc#3#i zz;j?Lcpkg}wt*d#_X=h00=vN;uot`vUIY6mb3Zr$4uV7A2xtVyz;SQ_oCK%9`{db# z+YC(~02h3>fL8pMz{kKl2KIN2p)FqcKm{Xh+HbEhG&#=Z9YgD{xjM#hgBeNGF@E|p LerFKMQ8E7wzH9G3 literal 0 HcmV?d00001 diff --git a/docs/doxygen/assets/fonts/Lato/lato-v16-latin-700.woff b/docs/doxygen/assets/fonts/Lato/lato-v16-latin-700.woff new file mode 100644 index 0000000000000000000000000000000000000000..abf0196d8329e4df2795f2c1a94a031f5ab757e0 GIT binary patch literal 28052 zcmZ6x1C%8}(=B>>TGQ@n+cu_c+t##g+qP}nwr$(Ct=Hdo|NpIbU#%0XR_uz%ip<&( znJ259WrT$RK!BgaG64YppYu`5kN#ieKidEI5RsKp004k2000P6005C6mJpgoL_vuk z0DxTivHQ6Ou!&-i@{m!WWdH!6sD5^Vg?9fi#j@MY%{>K-t=f?*6zXAh5Gq!Lw`oSgu z0A&pTpsO$cTQADQP}cweFe3Z0Vg8SNY~G2O{D420&X11!BSdgd;6)~u4lX~K4*>8B z?dLvD5fA(-7S{Sdb|xu5{p;;Sw%S@|H!7MR6nACIq) zdPlw0r5~d~9zvA(Vn`|P(+|o9*nHB0QRB+M2=jOXVu;N;z-SzwSf##Db@4LVIdks9 z%=+&-*W@R^qdTF8_Q$PRb`NN4Jl32F8dn5Pui9IfPHb1+gnN!Rq!HA2{DxTl;044{ zKuuEji1q}8Uwt675D%*j0UIH2Ev^RVP|1o$ff|T z^;Z$>UYHUA!rf*kFouEG!I?eobC80%b7;T~5C#hRxrwP7Vw_w-Beu98y96}}o*7jF z`mkCC8X8_960%T(f}Gk0wJv#!E{gv<v+`_-X*FN`HiY1}qK`QZ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wO|2pmw;7Z4e{54hrl|p9&7*`!8YDKO`J2}95@fcNcj}0o+8ClX#b~Z{y8X~g5oJO zeLb4K9xY!F^;2lTw8G-3ra!ht{# zL>Yp)7IK{hCu_Mb;CTsH1x|xA;2by)vUu}7-h7X@-lKL5q$ZrD7M!IPoTXhkOAR=S zoYIj~0&U8}$SD>XCBV@}+LN7dbs?I5mQ>zD(^=M~(q;`#vBhY8yZo&-;U zr@=E|3)lwDx1jenc!%friT?pO&AVs7IdC3aAnX$O5ZK7M8_lBiP_@cUUo{meO+`v4 z(5@5Y+DWb-K)a5S>uj{^U2^^aIc3ZZR)ICdTMHfn>%e-j0c-@@c;_^6&VaMfJ;(Jt zXyg7OkamVDQvC?Nxk>pWQm!K9Dq8q~)CW5)d>SqMKw6L%T96i6kQQ2y7FvxKT8tL> z<%VBw_~eF1GB;J^ri$EDk((-VQ$=p7$W0YJK^nEZg<9T1EpMTgw@}MlsO8v7z)r9W z>;`+lYhXV(2o8b6;0QPhj)7C)ebW2@oF(sV-~#s-xnAP>A&_>mZ)HbY(0F?t);9HT iCp((7ooRM7xu?{EUCo58&ds$Fd!h~-s$5_??*9M@_JO(p literal 0 HcmV?d00001 diff --git a/docs/doxygen/assets/fonts/Lato/lato-v16-latin-700italic.woff b/docs/doxygen/assets/fonts/Lato/lato-v16-latin-700italic.woff new file mode 100644 index 0000000000000000000000000000000000000000..cdf0d86aef9e4f4659949cd63043436b1402a227 GIT binary patch literal 29920 zcmZ^}19W9u(>A(ebl9e*F$ z)~tGJjXBqtuCk({03g8k<@6VT@Xz<1(YO9D@{jiay~N~X6#)PsD*yoU697OGCn+le z7E@Ff1OTAFF~Ik40J|8@7%y2xI>v9T=UdnM7CjGbBMn1qeLDc)2llrf@ht;Y>2*8I0Sn0P;`7N{%Js5E&cBaRz)_>&fYz@EdY*)VL*Y}UCF_v~&>$`oAYybP(5C0zl+J?BW(YH4K#yY-j zc)$Id`Dm0r>}(yK004*gZ!GN_6Hz^Y&9rkc{`PfB`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MPnmk oumU4Qvk3|V0xPo%5CZ}$vk?{p0xMav1SkeYQbe;05Cj4%0G1}?%m4rY literal 0 HcmV?d00001 diff --git a/docs/doxygen/assets/fonts/Lato/lato-v16-latin-700italic.woff2 b/docs/doxygen/assets/fonts/Lato/lato-v16-latin-700italic.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..5b3f882d813f50a6503b95b2c976a2f57dbb7171 GIT binary patch literal 24428 zcmZ6yQ>-vdur0W4Ti>>A+qP}nwr$(CZQHhOWBzkbCYd|+&`cVuR#z&OYBxDiMgTy7 z|3uFk0O5b?XY&8raQ{2@KmGq(uuH{p?7{Q_0)!!GA!AGsVW5K2F#^BQp@Reg09k>E zfkRzE@IgaZ!GlF$q_D+~NUqnT4qg30B=e-BMThGhaDbUwd8h(ofMHtupcek}l9k~a zVCA$hZnNYN(<1=k-6*PSlI43sgVlRP69`*mI!hfoDg;zaU{Kzn+5E;~770p#EB&36 zZ2xr!Z?dpF5YdKO=}sNyIT;W2xk~ve<$A|)+BtDUvMJ3q4r{q!ogYHWtHUUO>4(wi zj$~Yvw?IYfz$+N7RG{aM*WS6fyiI$5LWqfiurn$V1lD)C&C-Tg0i2$W0~U?48V*!q zG{j&5uL?Y46d5X0(Ugl}qX2_~LIXG0k*M-STUNiu*5LvkahVWN#z5OLG_#pPxZ*XdR%jD$V`%C?&WWA2A{{uOEI-3jR9s|zAY zgNbG@{Q0=N3O7@>?bdb`ZedTzWF-6K4VEP0$VtT#)~1c(2%V?57oJy*?^ykQlmzO3ZYc!cv{dHA=c;TPKn z;qTbftuZ!4P!rymoGC{T%S%cEY|zo;CGY#WsCw}yny?SQR(k!gthDtad58hex+5lk zkJ{d_RuhaPIRJix_a|h-d9_-mk7MW=7~fm9YEnf*=j#eE&A9NE3x;E5_)yqX)a>4_9q&e7G?ggs5CEm#v0X z*r{!G?S0gXg<}naaF>?leNXPCS$h1`E#&t{6uYjavK~VwDs?hiU3Y**G=G>UG<7|KwqCAIqqS>>Yh${lX84b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{YI zuAgw6QBR_Q!jUMG>DHXX4M|+e_^BwN(C(3f@mIt({Op7xRDtG7O-N%yOTttpx&qT< z{ti-$RpduZ9sw&ijU`=hAzglV_-fk%V9$aE4Ku`maufk`#P9fK01l0$EidD?eu*%Q z@m6Tp%bL&V8fC9q;uS40Iaw;;_y|xp_7yWx*~aK!0R_Njqp(ETm)=MK2KCeDR#l^;CF0h8;*wB<54 zDws3_pn=8{q(;QmWtRbx8JI~?^y|+92lFfxi6SvJ9yd(GWeVi2usg}zI;b*m9T0gu z16_>TS#k;ae27hFf9;gnG}&u0(A70RlS+& zguQ|7Ue7`;sWu_W8Jv}riqqm!1At?GQt}O)m-~XiXVZ(uP{6H7kkz+DU8W?F87Gb( z6I?Rp=GLB1M@6q>RQF9d#%C5Ff1-5qtBz)O1o3qqKJZD0VKTHRDwx{{jt-CS6lxn! zA~!H>hVey|LcVP{a}+R<)czjuw~75FZVPH?fny}Hg~TJ5skRLr4p>nNiU}=O36Yyb7*F!Kk2_sfq}9Voxw4SacHBEw4w4#m(?${8Kejh7}I&!K#QWaJ$0oZ*8s5}|3G1DNcO yvk%~Y$zdsQCE|nR8HRMk)B#y2C+(z%v99|JBvdTI213~^1OuU*o!3G-JDrSfgM2Xn literal 0 HcmV?d00001 diff --git a/docs/doxygen/assets/fonts/Lato/lato-v16-latin-italic.svg b/docs/doxygen/assets/fonts/Lato/lato-v16-latin-italic.svg new file mode 100644 index 00000000000000..e288645b12cec0 --- /dev/null +++ b/docs/doxygen/assets/fonts/Lato/lato-v16-latin-italic.svg @@ -0,0 +1,450 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/assets/fonts/Lato/lato-v16-latin-italic.ttf b/docs/doxygen/assets/fonts/Lato/lato-v16-latin-italic.ttf new file mode 100644 index 0000000000000000000000000000000000000000..cf3da8be2de3ed0f7e741dfa0ac9a4c46dda86eb GIT binary patch literal 60936 zcmce<2Yg)Bl|TOOd-JAidQ+K^Mk9^NsEpc-x<<`vwpCnYx%Y+*?gnhSO*O?-n+~Da zA%v2U0wIAcA-(-bHoKH1$);_xNeCNKur>aF&wcYoBU#2IyPy9jF;DZ}t>>P8&b?P) zf*{!NAB`aNjSMfS`0k1O1mVpQL2&l>Em+ibOYyI{P-@5Ug6i5!idO$c5We#Z z{9e6o`PLb_;D+KS8d#}Y5T6FyAp!%J-r}kf4OPR z?j3?%@S%MwZ{D=+l8xQ0Ww#(Ovmm@4*t}uQ`ct3$(*uI=O&h+)Hsgi$8u?=Sr->VJJM+W6}BH5cz-Kh^ymzbjC_;KDWAH#9#z zhVMV#CJ5qfJ1*M2XZ-(V?Gc2ZoW}3o9lJK{ctUrVR}g;m9?A~^29;>{lzdz$6&i(B zAt59aomQ@o)vQc_%4;B;s;MqOm+*;OM;65Rq51r`t_k%%dj!gq)fy!7kq_JOW6j`9Mp)xSgRMuFUXUaCOYma(L z{dT**)Dvw_J|cbZbZxD)?(_qiy`He&9!e~0jE}TL!o}V#Yn*0HesyWMsb;qrt<5CVBF2YzMgw6eNdxqu;1 zy-33t!zzeaGOU6mIivzjY8A5a4b2f%gr^F)r2;88Q8?|Jgf$1$)JCYSpoT+@Nft>L zYM0_pslHvDf>4zxYUgMzHkWxXlVqKC&TGzKWo}MYq0?Ddm6KZ;bjrskzgoFy@$&lm z<%<_pitQi%7++m3{*_7rJw@S7>0a^M@;!o4a0_=O943<>nA|3}-HJCxtwyWPHrr(Y zZn6MPhGs2G8VU0jFqNTae*=swP8HxEc$tt=2E~g|i~bkXYM^$h zyhbYvVwf6YOapMyUo?&)J|y}psLf5R7IX$(yIvV#M{0p|b%I{7n)FsQfaNsF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@oHjXEO@TaF@~BFbG96l!?G?BWfxi`pv* ziJpRD4N^UYR8KitTBnfeDQrFmYs$fza&oHHvx_%R z4sV`ayz8Gq%BQHG(#Tg4`6@!nr>LvasH?_NSB>Ls#P@5$@8^62;Tt*M3=dntRcO+5`y4m`8o=}51@Iy`2wnn>;APMR4ud14f0W~^;21a# zPJol(6!%^SZ-8d-E@_-5{C#+A0UyBcIdC3XwsO1xKIHr(?zM5e$nj&qTvl5PTKF9M zZ4sX6#fzgq*TX>??YA-1HJP^8u~n-WODf~J&L&p2pIj!qT6@%AbPzX)N{%7JCIMr=fBh zDyN}x+EokIU^O-H{eP(ztU=;6NV|qnFg+4*2cG1?i(@v&+mU1?$7NjCfDPaSa1OMB z3m~2+ck<*;p4v(2kUhy3NXQ>lRrVxX zNM$FM?(9iQz3s%hGf8zPmMwdaEm&_0*4u*hwqU(2SZ@o~+k*Zw(LfCvsKL@&urf#Q zk!R0=R&W7y?>(B~ya~&q_TcCRd~9>j(j2sO9_u;}*Ew*#9qT#?*V$NC3!HC<(O59;9;-T!Rh`GG&SO>Qv8wZMm5scb;GhXRp92?7a3SBtbCCKRb)2D$R1Y9G z`8Gd5%4MWnMh%}zy`D%7A4d(JN)6IL4bngj(m)N;K&{b0jnRO-ny49?kW&*flH8QR zO&Q#j!3}c^zz(nz(EFp5H&DtODCG^5@&-zI1EsuyQr;3=$ literal 0 HcmV?d00001 diff --git a/docs/doxygen/assets/fonts/Lato/lato-v16-latin-italic.woff b/docs/doxygen/assets/fonts/Lato/lato-v16-latin-italic.woff new file mode 100644 index 0000000000000000000000000000000000000000..95251da0946cd02f456816688144f7c8f926bc4e GIT binary patch literal 29836 zcmZ^{b95)o7B&2fZF6GVwlT4jiEZ1qZ9ADbnb@{Hv2A~O?)%(tz4wo|SD)4E>^i5a zdiOrHs>@YQObh@7_`aN?0EquQFCoAE{~-T(|Mw*>FQ)_m09gS5P~Yt+5;T)#nc_++ zLI41?-FMt~8^A7xE5=JsiJs{j8~FA$zf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&!0wrOv0YzgYVz2@uM6(GB0|G0v3lIYWE3*+6 V0|F~qvIHmwMN&kw3lIbXD*z%UIeP#A literal 0 HcmV?d00001 diff --git a/docs/doxygen/assets/fonts/Lato/lato-v16-latin-italic.woff2 b/docs/doxygen/assets/fonts/Lato/lato-v16-latin-italic.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..3246c1286f3cf243137975c5108ce2241aa91792 GIT binary patch literal 24440 zcmY(pQ;;r9u&&v*ZQHhO+qUhmZQHhOuC}$>Ty5K&f1e#Ob0%*J7gZVgyirk^k)DbY zEI`0O|Cyl|5YqpQH{1WsvHo}Of7bth!!4J>bAm7e3KD~2fQ~aqhJy)-a|^zAgbfh^ z0_FfA0}b~8BLWXYf(#Xhlf`}CfgIU+rE=l5%GdwgF-IF369xfmXXFX)!B;9eb9a3C z1?VhAn)Vp?JQAoR2M6!7(GC|eQR>iZ(UdNx5o>~*>bgD(VA^vTT#YK~l(VE&8U-Ll zyvC{)#c9OJsEOiqm;Xj>xeMPX7M@j71rQnk;BRncg?q8QDvFgwWXe3@B)(c*?u4P5 z#O#`&>=66Jw6n_I#bEB9Bz4z$+*hp;XTg`sE_u2PFEU7!J>kuVjj{mY#v+tD@Q>YOwEv*(edYk1sC zbv@wrY$&FelEqRPEwMw8&A5-PDM{adA7Ig>HSgjD_4?V7GI`WbGU;fG)<`O%32U{e z0ZLz_U!;L$q(1RGXKsti4d&GGniDGwBEAV)>TC@5ev1h7`+FfHvj}V*Q}GCD25BWs zJnPh!A_Fres$W#!{bKfWy5#p+(w=cQMxN-8>e5dX5wJ`T3m6X?-UoIC4H0}@?%`RE zLs#aQ^Us1?@NXm!iyn+4CXad>%Y*<5y~6(q!&*>i+d^Ibx&^q}?8Sei=fT}e3`UcS zo;LHERQ#eCrqq~HD@T)-6Yd=OBGQ7vK$A%og3HKPo@2J zv#RJa6L;9&FF>4AwJhm4 zPrWu50M9@?Q30gvi}QJ`bq8f8TLYzY*hC2N+v*$#{E7TyBBfLmW5P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SY zW_?qnM+d|XrL$-N@XZ+NW2)keiv;`)!7hlwu?H_q<1_fr{S-2_WK!CW82}|$V|Hz6 z;0LQZrtb+~0|sW*ZdYKcXj4Iu+Aj|J!IYt|4*E)+H6mC{t!Q5XM35lr=gtP5oHnG( zUzVN^u1f+*0R!P1Y}jrJBUMm28bp%Z)|+`N{RjkC#Cm{xNvg>r39~9bB4&J3i{58w zWx5UxXU$2G-IWaloz9rGPswg?feLP@gKh(!K%rg!e+4^l2#bQ-J|!tA0ml-Ry$^o< zi#`&=D3P&Agpmfp;m%tE0lN}fK*h1d5-J!49yqQ{XiK((*vb|dK!Eo&Q+!d2rGgWn ztP5_^K?;(}JzpD*lVVW--Dx(^2FSa3i*3L7#T<>j7(^ znb(}x0IfllYA_nHNpE=nGmnY9m?#S(D&@-h>(v#!#+Kb`%GG8Egxm?uSVy|h;}E;o zUk@S4eCBMF-hyLTGL}C@;yrxMWfIeZR}A%mTnI3WoqLc*2`$44iwDj8OLqfjxwheje3N{L}6`Lfu z?25h7=Xbh?U6U?PnSzL5muN1z1qScRxDiocF2-3M#2SR(q$P(3; zVgz%u3?%6-OghS_B?bcsE_=H4z>j_4lN<~>kmU@bCyI)MI^Gu;|Mz6unY*)#2ppZ7 zYmx!qY0P8Fy0*Y-jvN}Qt`HQbMlT{rDw0Gdk>dYDN#$^>w7M$+3Na(ZfDjNDa2^iA z*_AWu0pn$4|76e=9G8xGAS0$FAjN-f7tnFbx5w6878-CTxEpw|9Z(5EX)7AC5C~BO z99;d%*AoL8p}8%n6Sj()aB3X7;X|@0JWN=u2@4d}RI^O^evd^wb0}!hPd9SQaq0yj zvVgIhD`6*j0fZMqM_DbOp literal 0 HcmV?d00001 diff --git a/docs/doxygen/assets/fonts/Lato/lato-v16-latin-regular.svg b/docs/doxygen/assets/fonts/Lato/lato-v16-latin-regular.svg new file mode 100644 index 00000000000000..55b43fb86a0e91 --- /dev/null +++ b/docs/doxygen/assets/fonts/Lato/lato-v16-latin-regular.svg @@ -0,0 +1,435 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/assets/fonts/Lato/lato-v16-latin-regular.ttf b/docs/doxygen/assets/fonts/Lato/lato-v16-latin-regular.ttf new file mode 100644 index 0000000000000000000000000000000000000000..3c2d417ea4069f54cbcb038788c010adfaeb1af0 GIT binary patch literal 60524 zcmc${34B}Cl?VLpdwN=|#oA@bwq#khyswh?O}1mlv7OkCoy6HUXJ1J|2njm@QXru$ zErdc?3x!h3KsPAU7ASPu>CCj0_M1W}ZRy@l=`w98v6b(C?t4#`9VY}j-|s7RB)xan zbI*Rxy;op@AlUJbP7vk~4~;(iz#oi)@WZPF!FhQ8=#s7z%_lAsgx^h~)ZU@ds@h8n z)?X?J-?rfQx{bTm@BPflf4LdIcjEWgHy%8Yr~iA_LxS+y1b$a;-n(Vjz7_itg76>J zf}sD!mi7Dh3Qi#l?H|B<%a)y&ZccnM`-g(S(B8{^TQ{wrn7rrD5kdI3M!c`ziU*lr zFkB)C|Nd+IF4(&3z@f{p9csY)y@DVe+_`7t`uG0#+f9P-3ff~Y?pl9nFZ-e4ANW0n z@_D=0@7mP-r?F0q=MF&-@7lX(|AA$1SPu!p|5J|NJ$v_U+WUy%V?Mmcn1lhqpaSil zmQMegvFMr(1a~+Yy%EpG_ma=G}Z`;NBv9jXI=HghZ z)9dt3o~}wbf+ap*anRABd-%OA^>Vo&3a_8}6Z;-k%qoP1D-t$A2TdWo?zR z0Xv|0fsQc-=!;k?KwpxaQl3tQz8~)ZVEh5nsRAA;Ps&c@&v++ctpP2q47C;3acD7z z+a?+!l~SEUinoi?(5V#Jlak(~zZ8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;tF_pNZ>3iqvy86tR&iN2ifb8vqS?$5#fIk-Ou_nqji6TNl9c_%vSL}wqt`DM7i z4A(7i-2&GwaNPpe=ivGrT%UvMb8vkQuFt{sIk@gb51r_t6FqdIhfeg+i5@!9LnnIZ zL=Tc+W$grSfF|%J*adcjJ)oU57l4Hv zt>kDWrj?jhxG7;gFbPZsGeHH|3-*Ei-~c!Xj(}s}I5+`Lf@aVH&H@Mh+@T(hqPQLe zO59hWeiiChp?($WS7{B0Xbp#G4ToqAhiDClXbp#G4TmWCDkWc~NQ{ zO37C#`6?w}rR1xWe3g=~_S7yJJGhJ;T*eMAV+WV9gUfKx+kSm*_bKAHf#<;s;6?Bf zco}@xHg|?R((b~k|73cQ$<%wY@pe~0KRS*#!SRG^iCYKOgC{{F*Z?+yS4lHcSs7ad zflv@ZYfGhdIqAXEz%U>)8o7icK_0ry=l3!6!UgUFjKZoJg*9N?hp=sWcxXHbjb> z*DEPy6?laE#|T#w_XDn_YQa$8t;Mk z!Fh0zxDId$e87DWwWx!OI=HB#quQk>N--_@qQf${cy%YksyleL0~Od z2iAipK_l1zHiCB2T>$fFOG)IernDs5Qxa4bQLYP0i=b4^^Rx47Fw` zHAATxD$UIGSkZ0}2q9-E;TT371ze9OEF`R=_nAxIS54?Ls5e2q35rcnY=UAF6q}&f z1jQ!igRJgEC?-NJ5j$<5g|}gkZM5(*NTJR$D+lFo%&}{=8CcEgy4jG)ShyR9HQbK; z$1~bmLi*)kHCRj9bznVs5;TGhU?X^yJnxd`J=J~brpbd*yMP^V)tpDd8_JF;VwGZqE2f#sa1RMj$!3l5@ zG=ml(?_p;N+u-RP&`y0XfQwvrfJ;E;i#Re|YIm!1PfHfxU&9QQ@z-zeN#>_Kb58?| X(8Szl2s3ba&|wbF#Jr;{wVd+bSaAb0 literal 0 HcmV?d00001 diff --git a/docs/doxygen/assets/fonts/Lato/lato-v16-latin-regular.woff b/docs/doxygen/assets/fonts/Lato/lato-v16-latin-regular.woff new file mode 100644 index 0000000000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m>#``4ikl5Gva+YCuZuK@`w0QBZP@0Z6PLg4rTN3;RNrDWhhiEXJCu+kcC;@G6q zE1emJRVz`?@alm3!q^y(69W{WOh-%HGzI1x*LNa3* zhL=^urYq)!6vn-3<7CTmNnI5qW=&OQva31JCo0^}!3d^GjL25^0bLfu8A}Y4X`spn zO13#7i?M(Z9x9sUf!U)O3Xg7V+0l6 zGcSP(u^+1uCJ5C`yncog_2{Ya4i6k}a)5y~^pki#FyL;)0BuK#%FI5=y~6O4e$3ByD&&&+)b)L zo_c~p(h%f$vI0VqzyY5@nu!YdFUN@u6TUjE4Bx>Uhax~3z;JnReT0Si*puxy$6(sQ zTO?(GnPAGKe>p3Fa)fgu13>!3uw@DlgMWfjjfMyX2)SCkJ~b*LEFuysj*>6~oAa@Q@f zfP`(5NCzH#i#suv3Irw63^741#d{tZEKvs{;0G2wk1K!%f52-)qo;3$ZSE4e8*t#9 z`QgXLvT(bpS=d?09OQ2XAYH_meDG8NLr)2g(L^Trbxop9GBYtI=Cx|FQB@2XV0=%2 zOG*Q@%nga~A)t&6iSu6g2^higXyor~v}ScSS{AySEd^ao{eHT0`m1h5_6JyDxn7Fz zhXLxCbAp4kPlKFmITAt`pm3c9(GEtId|OiQGoA2YCk8sp%ToRc@=X3<=y z!0P53c1$WeMS%2%Qmwb#a?S+- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/assets/fonts/roboto-mono-v5-latin-regular.ttf b/docs/doxygen/assets/fonts/roboto-mono-v5-latin-regular.ttf new file mode 100644 index 0000000000000000000000000000000000000000..27363d17d074e53c02c3676a7a14501385cb16e7 GIT binary patch literal 31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g+An^AwMgf2#aKI}5$(qUGZF-hb$ zmVs%2htE)|ufP90DOTQzF#cbtkKv8+mqJ}`jCR&|YumkTEN95@A+>__U&}Dhn&|Dv zOqVOs`++zz}RknW0cHz?5)UOVxy%IGebfnLoXBF}209|$G0^o!chL;!2KFFNf1anyLbB6(|na)6^;#M-WLs| zOp&RG!?BEb;qQ7iYey@v8teX7rCdl=EgXSFDH|7i%OvsjzyC~N#d3z6 zVe33Zfe}w9TLp@5BGRZ~`eRS6v?iPdBjWrfyq|#*zaha%&nRi8Eb-TKOT+W+^0G-b z8m1!sY$YjR=L%VYB;Qk509SbLIcQ!Rz4wTI!b(bp5oW=NWD#MOPF9YBB*AMg-v^OJ zG!?7dVb~M5Vq?rIGC&4Vng(@e!n0$=T_wH_Vqw|4`pq_Z!aKQkh>dcBa(*H<98iW3%(AJF_h2+*x7aDe?^Y`nKmtv${$6&tSr`6 zGg{03@~}3w!kcot{p@}t{`yhRnACj*QxLM-v9i?a;cJQ>R;5q!~kKx+sW2{pDQuwmmiAZ0Avbbhy4ZOlL>+b1jDXF znG%QL#0qEb6M=gs5>g+9yD%CDX$(|97Tyr2cy@mzC=sfW#A=h75T+1A8gUsqr;~#W zGMC9@ESoImki%R&g?YRYF(0K1iM)uYOHitmb(C?&nG-EtIPA)yJQb{|iu31cmmQH>G+A|9kSkkyI>HDYjrgu(4n4z!V(G5Fa<{$>2 z`p_4?p-H{sA9{lC&+8s`u%Krsz#0w7g|1-%>)J4>!Y({$6LK&HYcPnymIc?lUU=7) zKf4|5TDAn}4sNm!HCdq|o5=Se3hn6t(r~0>olqsGGMK|E8lFQP&QSFMO4X(gb)uZS(fK(|Uc~ zHg{LEaS!medYa8|_7=C#WB$bd9gYGXOqg4sJ|WzN-qC1jDJpSRp}*BAlRqM)9~>2f AS^xk5 literal 0 HcmV?d00001 diff --git a/docs/doxygen/assets/fonts/roboto-mono-v5-latin-regular.woff b/docs/doxygen/assets/fonts/roboto-mono-v5-latin-regular.woff new file mode 100644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uBr)dfU2RBzg(1`j;+$gIbv%vdyM z-hwAqELqm*sdcN?Jag=Y=U#g4l{emc@0|}m`s|Z0zWU~e?|%C2m%sk_=f4v@g73%T z7wY4~UYeI_WMFQ>;#yji&t6iVuUA}Jz@DF%3ZgknGKx~cERMAN(jpK8q~5^5(FFj0 zUv$*~c-mv|-obDpC}JZcV_)P3#+@7t91O_?8yVP~wlcUI%d;?Of!GdQzKm8JY8)c$ zEF4e)KL!^z12$P!umG3SUf~A51Dpp~9T->`IDsO3PJ0;`7#x5QD#Fa*vQdSxBQRov zLr26$<`kEWY9QV&js^xs7Ke`HkO+{HNFV^2ZNs6#A;!+aqqT$af9nR8-i=H^?W`#- L0EMk7h5!HnfQj?9 literal 0 HcmV?d00001 diff --git a/docs/doxygen/assets/fonts/roboto-mono-v5-latin-regular.woff2 b/docs/doxygen/assets/fonts/roboto-mono-v5-latin-regular.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..6163de7b0ab1b46dfa01699d5d520fe2bf24980d GIT binary patch literal 16028 zcmV;NK4ZamPew8T0RR9106v@m4*&oF0D1HP06stf0RR9100000000000000000000 z0000SAO>Inf@}zZ90`{f5eN!_!DNB30}F#X00A}vBm;&91Rw>2Vh4m541q2iP;Mn- z+|BHEKm?KMEsjJ88wW^a;OfXguyL@_hPSf+|CpSNAuJC=)jEk~!7O*&$n=~JRtNFc zZbyq7eaM|On&Z1Kbf_U{QP?b&=*5JKLmOACNbT}G_4Ds%{Il=)KUC?nHONb^Jzk_r z#}w6*?voGV?E|r4dc)}|Llz&Qu}_j*cp$y6H%zj-CoA{cgPA>b?&jwNcdXUIoB@7r z{ToUNk`g)C*nkxS*065ah+0xB1|vf(TEe14B^0MU>+XyTv#!1uRsa7rt*^n3Q4rBI zMMZ-pQ!Cs0vA+A>uQRiahu~g)moY6N8w)rV3ny)L4{K?IS4(3dmx}-V@BNvcbMC$G zJuS_$f#m>zARtBSZvu@h)88Kg8B;cyp1A9Qs+5W0iP?IsC?!TSWFp2!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bjWiGj15P=8D%`iVZ^ZA-shZfe1Mg{=9O`JKnNR&%o#w zlegV;&uw?yW%kH@4;)wNsmGqE^0gY(YFSy>*wt}xs^`+6QIlq^TD0lVu1lwGJ-%_l zM&13qMB?lExH_xx`3d6QcG`U#KDA?#ISya@$ELmE|7UQd;C_D+M|Onu<-j(6mI1`? zczgZ{0;Pl8^#2?6H&4JP{s#PhB?Q!cT<DhhHE9lo3;w5Bkk|DQ| WRwDDpyt?1>|I0r2p_97nig5sB!Lbzp literal 0 HcmV?d00001 diff --git a/docs/doxygen/assets/fonts/roboto-v18-latin-500.eot b/docs/doxygen/assets/fonts/roboto-v18-latin-500.eot new file mode 100644 index 0000000000000000000000000000000000000000..849f4a50b77c70405f90dd39da7fec46a37278eb GIT binary patch literal 17596 zcmaHSV{jx+^zBS+8=INfww;M>+u2wfOl&*Z*tTt38*FUs##+7K|5d$L^}f8*b?f%I zeY&eZb$8vm-6stI>`DOuF#k0;!2kIF10diD_&h&g0RTx&Iko?HF8}~6z1c6eX=sS)V_5I|MDdGQ*|%Ks?z%Rz9qWmIa6-`u zI2wx5Ngrk8PSR^KrA+iTjSs!WDR7$N-%A#-XGjT52yMc)1<}~j2|u2o{~8lUUACl@ z0mg|Cr*1i>$MBB9iKwVRGX`VbAKKEZeC{y-Am$RO@=Q8~?@Zu@JV}-hzG$7<;D#FJ zih%fs%*zW-cTI#8ko|j90@SHxW%y&{Q(X76)n(Hk6K6;)g3^$m?Y=`O zJdpNKLpOYY;*Hi-`H-m3f@|1o*r$ZNgaV2-*-V6g$84rQ)ERC9KgDds#-H8?#d0$e z<2MaIz@NB^c&1y7Q08D)ulo{Vn>L@PT=CVGTm9VrDoR%G?oC?66D9Ur*UZ)fTf{#t$yR zO;R_{eQStH$;fE(AWlhY;RbY|f@=uOquH-N#jh{6?>IQY)7h(dA0&M#L{S`A7Cm)Z zTx#>0?CIVGnNc<*x7b668O|4DHrsnpD-Q+PSDFnE#9Q94&X8% zpEu~oVkz;Xw{afzC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2J+XDIp(J7$SQEU+{bb_NQ7%;IPuRplNahH$P#U-E-; zYsnY|#et54NJ#U{Wr+&0AvYo;9c7r!k0-qbGA1R;M2`~=Lmi=W%xFv)(t-Q>ku!M* zPq~T3rj}=Xj1JIjqpo@#29T(7hY`BwmckTcihwN2jzk`+V9J6p0K5#70n{mR91+-k z0won?vBQiVb;3GTj*eK92#Kz0uw%9M-{7FO`Yu4*9lem%OI94d28qW~dW!bgtgtpU z;__>9?^@r}3+O~-L$oAnV1hv6%7C?jGOpngp_>GaK46=OANW14-Y86MHLJFyTvKL) zx^%}UZ$#pBlkX%$X9mR;YK2y#85jTwYIt5dOh^)xEVzmj;dhVFP>9XicII`ic!RCM z97uipEFEN{6Q;jjlqYa6oSj3wdfg`D4&Y5)5K?S&$tW^+kToYt9B>hLpYC+fEBbg) zQWb*iO&=E-dBXV$#DtCX<{-tMN#utnn;hQsl|)?Qy_oDG8p-hWSQd9C`@rMH^V#<9 z(cCC9=hiGyw|Mn~l;UVRK+qFoUR_C);_sW*iDexq5*23~YlXEJ^gW7)c{1#&G*L<74b-_of^);+ZOX4afi4B%}v_#9}C$VmJ9qKrJ)gUX^!;Kn8h zpaJQx(De7v^_TZ=?wW?vdcKp!7Gw>W_-?nN<>zZX=6@{Oi46&^vyZNN)H{T?he>t^ zNmj|i>W)DVztJCv*;xN!;cGq)kv{$Pz~kI%1nQ2XEe0YwTo8-C(1cx}5h{P3EJoT9 vt$7yd$T@{~uytU#D|rg&3XXK~ULnN;6fJKBvJ|o)a&<{0bIcK#Jr)K+4&WoY literal 0 HcmV?d00001 diff --git a/docs/doxygen/assets/fonts/roboto-v18-latin-500.svg b/docs/doxygen/assets/fonts/roboto-v18-latin-500.svg new file mode 100644 index 00000000000000..67eecf442fc7f9 --- /dev/null +++ b/docs/doxygen/assets/fonts/roboto-v18-latin-500.svg @@ -0,0 +1,305 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/assets/fonts/roboto-v18-latin-500.ttf b/docs/doxygen/assets/fonts/roboto-v18-latin-500.ttf new file mode 100644 index 0000000000000000000000000000000000000000..55b559f6197a91883ef8d79c14005118195a9848 GIT binary patch literal 35588 zcmbrn2YeJo8$Uj?yLXqKOD6@=NJ0zg2}Hoqdq;ZjgkD1L9i)qhf`FnRNV%-2fJzqu z5rPUT@+zVzDhLuqh1}l%`^?^6;l=m&`~3cQncdsn*_mgadFFYZd7ft`j5EeUaZp%7 z^CnH3ndX^njLrBGcLz7`(7yAj=Qf!4PfTULiLey)AzjOuH8#a1LMb$SMn|uuK zzdvli#Bt1rg`vLlcpflp)U=_y(xiuYR*SLXYr_YRo*EeyAfx=5c>eeBAp-_iZ2fcs zV`F@9oj)8m{O+1}FgE^gTvr`FdeYPnZ?|oa=S8Uhol#>44d^|&XgXt~s-etpMh}=e zPOc&ckl2q30~ni*`uN;&V<%2>jAnxY&mMX{Zo-gpG1B(xj7>%TyfZV= zGr1ZtBr`MfWdSUhja37zAt9l4Z2?vrE2E=X9DT(xu#DMQ)9yAYBeqmZXwXAkFkCQe zgC43PF}$go^pizD`G}Lv@0uE*-w4!iNLE|Wwal!<#E?Weg!2$CC-OX=C|9%BlTPJp zziEegzz>qFXF3ueY7N&#k19VnF3w|$yQWgH7*4D(Gr3F z7(9s~^j8j$sQHyMN}23#pi*Y5EIJWK|1z6@MyZd-Q-AaVZdz@j0Mu#=7nvi=Y|Lt_ zB<@rx6Ua#pOU_FaDM!u;LyAZi3CFNx>EiV^Z?yS|n+nT$NV}cwzC$Yet?)mO+U%Ts zz3@7JNgK*v+QRE@<=eFWl(uRgZPA8Gb$DII*YO%R$jr7`R!V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6n@B6`aTkHD;z`FwJOWElQOLUkNRk0&c1XLphZk7$!}4(qyIZ zZU^h1h#o_SbUvV~u-zjTyw%uIgUhmS5Pnc?QyH+{aTKAw^wOykxh>$$r04)g-?T3% z6a-WarQnN&OmeS>OY2N^Ptz6Dkj&B@M*a2cWSVc)rQO_x>uTx#C?lTQ)D+|2WJTnn z)Q(bjJmQkcGbdUp%t7=Ce??1scI(8AKhUg75qBuFi=gOno1~!A2R%~=$}B9R2*m-= zrenT-PhDv`+;-5aTL*~~jUy}=R gNSk|?K~q6Atcc{N!e|$Mjnf{4IYZgdiPTw0nEkBre*gdg literal 0 HcmV?d00001 diff --git a/docs/doxygen/assets/fonts/roboto-v18-latin-500italic.svg b/docs/doxygen/assets/fonts/roboto-v18-latin-500italic.svg new file mode 100644 index 00000000000000..bed50dcf2e63f9 --- /dev/null +++ b/docs/doxygen/assets/fonts/roboto-v18-latin-500italic.svg @@ -0,0 +1,326 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/assets/fonts/roboto-v18-latin-500italic.ttf b/docs/doxygen/assets/fonts/roboto-v18-latin-500italic.ttf new file mode 100644 index 0000000000000000000000000000000000000000..dcf655fb2e014a7b9c816c8912b174e8ca25ae27 GIT binary patch literal 37120 zcmb5X2VfLM`#(N2yL)%(mt2xdBkfXvBm@Y_C80|%(tGc{_ugyhiu9_0bT2Da5fo60 zEeK*mM8)O*!d~@0P}G|*3=?|UTxbkx8|e|ZPN*vdI$CU z4IJHn-1+Ezw+NYz`cmtGQzj+XNH9E2$lOi%zSod(Lq{(yPdh}&tVMYK%+UT5#}N~; z;C+|zeel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% zHWJot+CbP)S3{~TsS3u*$iJTGOrGm7GU%%PoIz1dV}QlF$R6?PI$WLD$!vV@rRrrW5?Fh z+S6e*eefc0zd6QRY<|w3$V==+=stN;zQa|VDKGOa*lyP2ukhxaS9vn#b$J7cKF0YS H$dvyA8@`i= literal 0 HcmV?d00001 diff --git a/docs/doxygen/assets/fonts/roboto-v18-latin-500italic.woff b/docs/doxygen/assets/fonts/roboto-v18-latin-500italic.woff new file mode 100644 index 0000000000000000000000000000000000000000..d4d8b157f37b3da8f0e38f3dc5c4250df432670f GIT binary patch literal 21564 zcmYg%V{j&2*Yy?Kwr$(CZA~(Q4TQr|F#2!d#kQdUy?*0ulu zh&uoP{&fUre^p9NLlgjjn)}v~z5(PiMQ&A6V`2pWp!dGxRK8*Cx=iL}W@q9E0Kl++ zdujmyF!>?OvMn=rS7HDF_VC-I{~uWJAr*c&TG{~saKhid?><0!BHqcXElpg$W8q!D zJ@EenGyu)g*6YVN4Fmv$%K!k!0>$ndX)AL(PXIuH`rGrp4e*SH4*g|iVPgKRC4O_x z|M0%C;BNITerx03ob(&y@SBLqR(7uc#a;pcpf=z6wKYMqCEGffefyNPzw_Aq#*S1n zEvcP}=XWlu-}?a|{tsY;U_|yNb{5~7`Zxcs4M-D7k)WlcgUffmYRumn#(%yq6M(s+ zv&DC;n)Eln|MqF~Y)3tKZXgV@fPg4tLk_&{Kq`wOWNUy6*aC#1kVR<--aU$NK##NP zqAD|VA}!+F;_TwY;#}gYyFFj6`utV#Ua{d+e+3|=!Lb57H{#O49Dm3WO3n7}#>KIu zn+Yb=8uJ`)wAt~~@rAY8-FW7WMH8A@UMbvEs-NQ(E9HJ&-LJNHzpkR7Bu?65Ce>(b z^v2IK`ONAW&7NxYK48?F-Cr2pJ#w*TffIw15_@mc?Yv4hHAW;Oha6MZQ~n`DHMY2) zQa7k#%)+0R6UaQ5V^#Z#OCNE{$u<8S_IKR#M-RFG&-X`ip-=Po7jupGxaa)8!m12R z@(M}}vYe%DXL<$)|8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}w&GoC0G^BYLV-gII^9Y8XOn zM}?#$?H5fE6T=D{5CxJ0P&BL(iqe0i%KsLwZXROih$WZfAw1F)BP$PY6_H^61(r66 zt~lWTF@cO6q7M*?-)aY6&^eZVqm*eJBnN0H#$$v^&r5u%#bmb6e zfkwa(Mw9n%4t<3nGzoNLhf7HgATk6jTw#Jvt>8x>M^GBb&a@YT5WfeLZFhQI5_E`f zYoJp1%44+~{Yj97MTm?!djPE!NJ*Sn>^?*tutTu$#(1V-;LjU+O4u~mqrtu1o({8H zj1>1Z2DYUV#)7(`9+`*Ky^i^4`PGy+YMQkG3O!%~DDtS%maUgJY5~HtASTdkRV~ON zHJVw(Jz^?NP11|^mn^_nHby4RZWn~1NA5iioNzJ=ISd=+dzApdUw~I+0=(*(5QaS0mE#S=^p9Xcnswl#Xr|l^Ms`V) z;y*8!(?8-l?I~W*21AGqn!~nnB{WSSUf>QmL%K0<^5Gh5 zx=|sd(5J#TMkMkO=F*u`6KLdHIb!buy+W6+6U7@v3UGw0{7if3vr!TI1H|gN49Hb$+b9ixinK0_ydhm#0R=` z|9=xB8Z@D*FaPe?sEf_boeAvg-Ohw|gC$K?F`_el(u`#Ixr3#OysJ8!puFFV5Cbe+ zV;5Ld>`bvmz88l+r34C`hr@HcG`v^Oav2$MnCIrgUW|8`ro@+off2-Aj4$mDFv!)H zauU}1AzUV9ovQ#=8 HQDA>gAqLb4 literal 0 HcmV?d00001 diff --git a/docs/doxygen/assets/fonts/roboto-v18-latin-700.svg b/docs/doxygen/assets/fonts/roboto-v18-latin-700.svg new file mode 100644 index 00000000000000..11db87dd0eb530 --- /dev/null +++ b/docs/doxygen/assets/fonts/roboto-v18-latin-700.svg @@ -0,0 +1,309 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/assets/fonts/roboto-v18-latin-700.ttf b/docs/doxygen/assets/fonts/roboto-v18-latin-700.ttf new file mode 100644 index 0000000000000000000000000000000000000000..031bf06cb27a5fb3fcdf02127adedb36f9d2851c GIT binary patch literal 35236 zcmb?^cVHAn`~S@B?p=B=JtUA^5|U5?=?MwF1PHwZNPy652#`SNNRcWX0jbgvRKUxM zqF4Y$L==sPVg&?6q==xe1(LnrXXb9NAim%CkKbKp_jY%7=9y=ndFE*|A(Rjjh=WYb z9opr!SLQ1gLS|0K-4Pvnbnktt*7p~2{VgFr4?6Vj(GS)c0`PR<&&wu_ENd_|D}|70sGrs+3V$Zm z1BN7GAfCjB_>&&QLh=eNEIG20g|{dY7X%l?r$vz}GZGM(qbjzO(RT6>CyUp&s*ml4 zuk8jiS^U0DNsWmKh>-#)4WLpC&7?6>y_#n1RF?LOc8vP`z$8thtfoe>JlLxkYo1`! z9tN=KHG|lorECx(jLf$FN{Q_LKr3Z~#j9aq z%$JeBqXktKlAMxC_(mC+g_^&YL${z<|XkPEZJhLvPdS2M-|GK;sVkYexP3UcAuqr ziMu~grfMTu{4##vZE1x9x1lYOB${kjqs=kAkZ7RE-WDH#@1wWHgbR~?A-V$%6WtMk zClS0m>i95}FxyfmIlPh>oh_EDEOks4gE)FuS-g`gJzSo8^9n6E23A=-OqO7gEfh#H zS;EDgDBhYlDK023Ge)FzDLn`&Bu*q8gW}lMlO2zCyhdr-4QkAPHUFLbqxs)FNV}qS zJUZZH+BX8z-X`w%!yS zs5d$W?Tq2=WHDYGQ(h*EZ#G%j&tABnDUasQFLyvp}l&JT{Z0aF9W~$s@8wroj$F&SC@f9`iy&O zzzY|G-aj4s=ecQfiwQ>BVC!vVjq)DxB@v_^$skS05;Z#~m$xfh^cDI6KVqsZ$)JYJ zWJ`9k=xjIojt55KIT?WFys9i-$&~@ji37=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mC-GBl2@_JpR$8HCqO8w3eg1 zQ!Y1Leu7p%aJjVq#Ec?7)(ad%*7KmcS8xSGpcjIS3;OU9ci_=ZA?OUKg;e1idN6O5f4e7zuJakT3Mq(%jD<2l^_ z73Q&Cw+<5?ZSJ5BWfI&%Mko#Y37z_{?3=kL$MwtP?2=BvS zfk*rg4tyE3?1ngU+=U5z@wYQ^CmUZsfi*9IHBW&x{=W{JV$5)?`3tOh3#^$0);PZM z0dZ%1slXK0x8W-bOiAct{O5Pl4__Zrgs&p7=HY@h4}mpbp|vpBmsS9hl|o-xOP&V& z9FGA4kHG?u0RoS~0*}GuD88Wrj|PE9CNRhZ20aA^y#)r1z#spgdK`C>z?}@+*Db)q zY0v|7&ovk?)DGPKi|*5aOB@(q@T-daoc@fh`{$WSr?$NcaBSbJwV5>Q+Pw>o-CFm> zu~+x5I2QEkjHlvFUIN#X6qhT>?TX>bFk-^Q@g!l?q@lw}Qt8;yLrIo6HWSB=6Q+!x zgcUiqlDN*!kWeB@=B=>RVQUfB$M`+UOGWRd0rO?R-JAAY9{+DZ83!N+_A^49kGxD}XzJRsmP&fkwMQY9MAY0dp}I!+M4) eV86NqxDsw7!zPB!3|kns0!?HDrgK@KItBpba)3_& literal 0 HcmV?d00001 diff --git a/docs/doxygen/assets/fonts/roboto-v18-latin-700.woff b/docs/doxygen/assets/fonts/roboto-v18-latin-700.woff new file mode 100644 index 0000000000000000000000000000000000000000..a0d26516a8c8d9d85722e22fe8c7ff98c4561b95 GIT binary patch literal 19888 zcmYg%b8sik_w^^Xv$1X4Ha50x+qP{d8{4+Mv9Yo3{PKL?f8MS-HFZy)+jZwwP1os} z8aH_{F#r(YXUNt8kpH_z6#vBkWB!Z&{~<0SDh2=mCI4{ZKQIOh0IL)KEwA*$Z2|yb zcK`tF+Ysj7inx-B5C8x%_roLnV1nHcu~}Y;o(TYe-2KV>{R4fM9O51$8v}a)0E*#9 zQw;!s$PA#BZW_5d6953v|LG+D1GO(`v#GtA4FCW`@uOq@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xD-Okt&~+7DxH;4 z%Dn%V0Ud|}5fleCK~vBJ3<0yjCU6p50MDTc24NQFfaPH`*cVQL3*dHm65fW-kqUVb zf%2kqs3vNIdZ3YLHrj~xpmXR6`i;#vf(2X-HW2P7PejsO4v z009610PX;f02TmF00jU60000001f~E0ssOs00sa7c-l>lfd;~06otR4QY1hC1_EkT zhys-)5-I_rYOQ6q*{1XcJxx#1gLUwmInMRn!*MTA<3@=>xegq`aDfI#!$oR543}sT z8!qR#LYt4_s`9VlCVPI&35j?UlkeJNs$ExnM`J`u?m z?l{^)Vq9!|JY^06`c$@AvtrJI4Li*ax=im6pAI!tc-muNW&nf#Sqv!*SO5Sj9|6$- zc-lS9fd;}r9LMpys;ZV+nOsqu5^1r5VK7o46ad8n2$ZS^dsd)f$wCX5;K+WFR8^8k>P!zPb7C55bKo>OZ0Ux|T1YFEnHEaOOAY9@L H;4)Fj+t)Y- literal 0 HcmV?d00001 diff --git a/docs/doxygen/assets/fonts/roboto-v18-latin-700.woff2 b/docs/doxygen/assets/fonts/roboto-v18-latin-700.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..e327dc95b6a3b75d2cfecfc611b84526dd360cb7 GIT binary patch literal 15436 zcmV-SJhQ`hPew8T0RR9106a_p5&!@I0E&D706Xab0RR9100000000000000000000 z0000QWE+`!9D_;*U;u_p2uKNoJP`~Efz=R!yk!f6UH}q-cmXy7Bm;*w1Rw>1eg_~7 zf+-s}dll^1OMvr$AjE5aor3A+BJOr5mHDw-jSSRMMV2J{|4RZLLoB!_sM~u&ON>J% z6Zgr^*(XdP1PZxCT8_;dr{3TK9V<5aa`MI4y-TuaQ%q~;7YUA6l zO*#>sJxlECTtdV)B4(ldl#%%jdf@S=+M5r+0}%;;Bp8<5C3lxUBrO!u*WEdVI&~fu z&4r?M(Mg@hl~i=+(w%dU=@qKZ*WdtbS*eh#O4c@SP81J$8otjlEJ+brc=oMqb*qRZx(*l?J@0m+ZCbk}yZt?*|=UaJbB>OZcPHgEps zfd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k7Q zE6tuRtpziGhRpyB&)B{5j0g3#taY~a)t+u6shbd(cEI*shHQNS*9-J8mX-kkyg)2- z5V8&w{q)P8P34Iz0;|erRSdLvOQmYr)?pE$CMKjuciD*xHQCdqxXKV&JXRD@G&9z* ztqP+!ML4|M5&>fU1Lcw;Q%Hb_;r7vo7-%s1a@0E!C#>XFtKgau+{?I?J>fut+%5pv zd5Pa-$1^LH<_tFdJgzPZ@Dc zYQB)%#X-xYB&NL+(Vn8T|5>FuZrY-yF{^m5xUVaUY|+8tnzdBpH*z)ess#1*mUJys znPVn(@gGAJg9;+Zu!Wr?wFTDk8xMHVLya+;>QVUkpwGg8ZDSl z-8gVhN@k)+@Ywi*b}fk^lVqX|X-NklcKsw=6gscC)YEAT#1$x5gizWzTY_*pqD2Z8 zDmKZhNuh`@e6_%k)_CWzut;shVlAy-?{L@weMCQq14r_3K>4$`qDO}L10 zVzoFf?jSW1EGDC5fLB8Ph&N7t6m!@ohtzCI6aHegcwgLM<{>FMiYyMvIyjtW;h;o` CPzPE7 literal 0 HcmV?d00001 diff --git a/docs/doxygen/assets/fonts/roboto-v18-latin-700italic.eot b/docs/doxygen/assets/fonts/roboto-v18-latin-700italic.eot new file mode 100644 index 0000000000000000000000000000000000000000..7dc0ff449f7838c94cd53c5691c0ea6e7350bc9a GIT binary patch literal 18764 zcmZ^pRZtvE(5{!o7hBv3?(Q0FaS0aO-Q6JscUjzFad+1M!QF#};1(dbhn(*}Rp;Wr zI6c+%&ePq~H5YT!Rimr`0NBa{0Koqi0^oo2{}~)y@Bam5H3k46So;5k|IznIy7dpm%|e;Im!Hoywt4)FMo zT>#Gi<+%au04@LzKmZ`}e~I%y68Nu@_J8%H{Qq_Y0HieK)c*H<004M^!#O}m6(Cd$ zV0gfpIgK5+*w8_>TMlCsvpSXJW@<@MonjpGK?`kbUzPH#9Jr6mB}KKR?s#kjEv}RMrX?-{OuKz`_E~~ zxl3XJ@K#M~?KzeHB2^J~Up4W|6oq9g=z;}TsppIqfS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t=3(+%we1WTB(O8R}+S803p$%p*(FI=aDSdpx=skFmBkL`}S z0TrS|J4>`;Ci43(QvGRAYx=z%GPRm9821AfR;-aH09{Z16x+0 z99hjXPubC?TF~T8B=9<4-T>{vcjjlMA%7PJW5fO@2t~^#cC*O6s-VjXSOV>)1xlo$ z`V8(5E3HHl`uL>nXh*q*6O+&&YrBvWD7^$By^kXG^MgI<(u~G1!8NlX8ym#nvtnK` zR!=S0hk(?a`%F5UFgkxmTbQ_!-pdmPSn9yT#Vaff6+D!|&P%Y-!-d1};`?ymnp+S? zg&CLRL^A_4Wra;uq*RA1m3-s8J%OtmB)i8re{h0o9Hc7S>&HqQOnf+~=yJHlEPbA& TD5GihU(zEu$Y1AflX?~a>=Z#< literal 0 HcmV?d00001 diff --git a/docs/doxygen/assets/fonts/roboto-v18-latin-700italic.svg b/docs/doxygen/assets/fonts/roboto-v18-latin-700italic.svg new file mode 100644 index 00000000000000..050bee0e4add2f --- /dev/null +++ b/docs/doxygen/assets/fonts/roboto-v18-latin-700italic.svg @@ -0,0 +1,325 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/assets/fonts/roboto-v18-latin-700italic.ttf b/docs/doxygen/assets/fonts/roboto-v18-latin-700italic.ttf new file mode 100644 index 0000000000000000000000000000000000000000..c74a6781842903c5d28acadde2c57e3e7074c9d5 GIT binary patch literal 36096 zcmb4s2YeL8`}dUHyIkrem*mn&a;cC6l8|x)kluTT(0daIy>}21k)j~IDWa(0<>03v zA{GP%OArMM3MwEfieQJ_-us=o+uWT${_p#L;WN9pyR);;JoC)cXF@0;Bnk(Gq_%C< zx{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# z^sbH-_^1=L=5g{>tX}W@aiQ$JKL=L|j%TWLmSDghD?yL`pX-z-mfzzOJL~%EwOV6i zB|*2NO#weHI?s%EUJj4P137iq+%hk|jCb6rk^iQ3#>fr1Liy{SCh2Jpb+SN{ zR-_`xZ1^}+F8 zETahSQ8?aTI@&*(LsBZj72nmR+mt!6=xBeS-^fgQo7H|t+6l3InATR?QiZXUhyQl= z*jOIM5gh$6lkgpBk&*4ut6byTFB7{H8lh+WGV7-o>>}L2ohj<%i;knF*pc_^AudSAbYo_eX+8} zbFY|yPsiGth@CJA-<|g4Q-1+Ik(N#6Sr2Vn$hIwDt-k>F-yEM+aV7_`7TylJ*hnzCZL1e?B%kH veO12Zxx+oIgy4=*v)01*>4WO(MLb;4^Q(i#!FNM literal 0 HcmV?d00001 diff --git a/docs/doxygen/assets/fonts/roboto-v18-latin-700italic.woff b/docs/doxygen/assets/fonts/roboto-v18-latin-700italic.woff new file mode 100644 index 0000000000000000000000000000000000000000..a3ca246269e4b3bea46e29077b640d1d51fdf4bf GIT binary patch literal 21132 zcmYg$b8sf#^Ys(k*x0tMjcsS+C$^nzY}>ZIv29~xb7Sk5&-eZ3y;Y~C`t<2LGd)#P zeeZ2I1#xiz2;h4tM*&d(yG8@P?f)_VS^xi#5ET>ub|!su65jwq_(Rl5C@QFYa~l8v z#4P{-|2l}hyCR{YCJX>T&3^Mp-x%jKLT*-2VPpXSpm)CGl)qu%l1*A_Y-4B-0Kl+) zYpMYNFxh_0k_}^5XCeRq_TXD1{U5;h=o+=$?{F*444uAX;ep>8 z`2PVKfM#axVft-;^Md#Qfc4(zH7%Vv(8e7Akcs=&n0@2<2Ra;xxryO-oXqpL&G8>T zQ0EQIzexZ<_WK?Hl5db9pduEU+c;1MjzjY--s|~o1)>~}&XnBL1ZLZvNMj{A|%r51w%2m&B3l*}zF7H=bJ6=~%P~s-6G2^Q= z)w*Kl7`YAN;zPz_A( zCslPT7&7ptWcbt1WLQ+bqEiMPva*50!8fDsrk!NI7Vn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nvX&GIm1ReuCRbi_@% literal 0 HcmV?d00001 diff --git a/docs/doxygen/assets/fonts/roboto-v18-latin-italic.svg b/docs/doxygen/assets/fonts/roboto-v18-latin-italic.svg new file mode 100644 index 00000000000000..4d59797103447a --- /dev/null +++ b/docs/doxygen/assets/fonts/roboto-v18-latin-italic.svg @@ -0,0 +1,323 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/assets/fonts/roboto-v18-latin-italic.ttf b/docs/doxygen/assets/fonts/roboto-v18-latin-italic.ttf new file mode 100644 index 0000000000000000000000000000000000000000..91cd95e2866c8f81d97a88e161f77bce3d55a25a GIT binary patch literal 36752 zcma%k2S8KT_y4{3jj#y`Bp@J5KtVx8h~lVP_uiw{fm>Xtxc97k@4aW$5CwO&t+m=E z-Ah|*m)*8@OJ4q;dy_|!e*69Y{^-riOYVE`+;h)8``i#p2r=PBCW)U-$drfZKWNC< zf}$5Jhwl(Ftqmbkhappn6Xi>_J|bk!Mtt9Gc+rTllm19JLC8#;)5{|YCKZtYV#f3M z_aP(3Odo!wQ^6X1SCf$O_K`!!P79AvD+rm|1>gTUa#+F8ibHP=BV;0;LGni8gOI~v zGx7Y_a9(ZX*y3r2>oht~$fQU-ziiC-Aq9EPm~Dg<;U4spu?5qLq^c6bIln$}T*263 z@rL|Q0pA0Bzr1Mtq+(YA847rc`S(Q=hZSAf-yipzjpx%AMB(2_)qx?2s3eetkZ>}= z5n_ypFg37;811B-zpCOjP`rkg6FX_y$Ih~2OIUo9zT$-7ghVvy>yR12l@7&yFt`r^ z;!qM4@~b1n{Yj`e*qN~;EacbPb&`@IlB5VqBd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$VDUxM^$i7Ri6SrLJD?YTDdb zC-W^Xw)nxV+qbk}n|YFS4DJ9(M6#B`yM~_Wc*;9!ZiCeA9Q3{o%^i($X}OmIj1+DB zuaQ(HD;e)OU{8|r+!n|48_QEE2jHoMuJ)K-OQrabvJ1>OgpfyLY)=dHF>~PMMMruL zvlGnY@kPgLmfPcWXk#gS(RdL0Z&}aud%iT(8E)l?apb`9I==~RWla5syeVDs7W=v! MLZXjWo(G@&4-QUSZvX%Q literal 0 HcmV?d00001 diff --git a/docs/doxygen/assets/fonts/roboto-v18-latin-italic.woff b/docs/doxygen/assets/fonts/roboto-v18-latin-italic.woff new file mode 100644 index 0000000000000000000000000000000000000000..27c34da2a63a4441ced0eda52bd232f7e315ad04 GIT binary patch literal 21528 zcmYg%18^o?wC$IPZQBz&nb>wRv2EMQ#I`lDZQFM8#kMB)%YW6<+8}}Xm5A$F2e}}k;s2BhMlJw1qf5R9&0K8UQL0CS5jd2b`q$YV~24(;Ns`lHb^bLJy2U0U58v}a) z02=IDQw0Ek%JgFtZy32c69E7)jsIV#1lB}tE@3}VfVZQKC>*>5kv>>JOB$Pn-5CI-ge+_xXV z{vY0p=1t7M$#1UoJ0|%C8C)@fm${Aef8I#|;D^?b0C!;2JZK!A7S_3~2hf89>a6N(+@^$S30c7p!ZEB7iL}a%2 zR(MInD)xx3Jw_z*zQow-&OPc3cjVkN6*B6d=;)PyHINB)+z=C@b|Q9Q6=0d7*P`1Z z4|9Y1nT&Aa;tvLbtrD%Ot+MXg?t+UrTWDLz3@F{kEc>E{dUH~95VuNmx~_j#TF19; z-k*-Nb?pqV%5#01Jg<7K%G{}bxRRNY?PJMP(bO|n)KXW}HE(>Tbzh8p;tdkx4e#QO&27wp@(d1m_m_ANAA9$udJnC5543oXJiU+Gy-yRq zOOi*k&dIQbp?dXzcN&F1X@^O{{#;_N6pqKpA5>iwtX$$xl;yD% zZ>n!-UmbF7+O+ZGo<&ef5ndWIusoLNSZIRe{X+Jd-wU+vyCLN;R~#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vgV1=(kESpT6C+Zv3uViyoCTHPOXtraJlv%wVvZ<_^Ix@PQD>fyQd4 rmQE0lzzpQ|bnLetLsS+t*3;%k-~(xp1B=)<*oYHE9$N=hIRF3v_`_vA literal 0 HcmV?d00001 diff --git a/docs/doxygen/assets/fonts/roboto-v18-latin-italic.woff2 b/docs/doxygen/assets/fonts/roboto-v18-latin-italic.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..3791c883e8d0e8d3d5331b60584cf3869276cd43 GIT binary patch literal 16944 zcmV(}K+wN;Pew8T0RR91075VT5&!@I0FZP5071(D0RR9100000000000000000000 z0000QWE+`49D_;*U;u_p2vP}yJP`~Ef#DQ^$rcNPUH}q-cmXy7Bm;*w1Rw>23I`wz zflYZ&PS{x{y8iqeK_~!5(~YPIdR)FCX{QBQ*9&E)UWgpD&rr zZh=WLkh)4hTUOP_tuTP#Ndf&CqO~=%bHOFY9Z?cugCHp_2rbdlB}Y|DwI>ontEi}` zprR%Q+k`eWflZd^0sdb`p-#9{w#xOCtB^hZ`S*5Z2%mHTdK6G6()Rpp z-&`CLNivYk<~x#06Xfpayk?-+t*S41PLnGAzWYek8dH-tYciQ+7q~C28-K>d2+#^G zzujk3U+(^!5jlj0&-8kv*`2lT;xo(f1z2ZK;Ks_+nF5`t##M|t8>xWsZuJ?6+0k%cK)tlSMu{7 zirza(hguzj9Hf@GO(!d8UjU%HDnL{7!2ys_HMSK}*Z+TY{o9@`0sp}p7XRueyR$pDF1jn`{oFa1u3c1c z#BlYvz?&s84#Us$975*k!m@P1L2|~SOc&Q2nbLD2w2TA+Hgl7Yi0+8 zuS$pv1;W=w`h@`Do4umLfG`}ui;(Z8Ya+t{*PbiDAx=%?l7(u!hyR$^+lJau918U| z+7{bJyAwKzVO(e<>6l>3rcQcibbFS$SzLnIL+DS|*`OV0N+s4TFvYhGwN#4GjW#-d zvE6ChIIL$Sh{QNkKNWBYD5zNWJLr(Zj*xSVA|=XHs8Xjvi?$O?m@;F@nhl%AmIFu5 zT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0(t z^|@>!@2UX-0{;EUiBX-s+PVg{bmx)ouvRg?@Fkz}XI%*f%YkD>ik=3R1Nm~iZxoW- z(>VUgeQm@~j2sFT<$M&V&>?lJU&2w6r~3&!QmUw(msELJ#1s(a6eUwp zMF~aul&HvK32aEG97NfaK!hdp2oUhAa{L_N6Yt7eK*Bad00FD;hrl8M;8LJ70#Uic zLhuM8EVd9gf_Ff9B5+~iRq5=k(!&-mL8Kr70!5Rc;28NiFTn_V8J(g0CYlK2LpJFK zLX|~r93U#;`H8Y#q*&wmk_|jIZ^F^037K9uP9Ma_G+d$!4z6C5AV3%mEW1+CaT=tC zAJ=`4GF2KaoI1Ig#F?_0KsYbYk1WlM6hLmipD@COD00kjMS2Wauw~$==h9;kFn-!I z3+Agg>XJ32mw>d<;Krn5bRE*)jLCIAK0l2SxOO)g#s@v!RqwJ_sN?af*H#d-IZEl& z1abFMG#~mPp|Z!m4?#u5C58%PkgT}RRs9g8Qm?a88-ldmF)HUO$i!ZLN@dR3tg9_- zg7EP&yGk?2@veg;LXg+o^D>nSg4Gc;HZ!`eB}y-WKaN&&)QXQpFFVnbsAV22Ee*+a zM=!I~*jkx(PTNJ|-7(8fXdYTxoO{oeID5}aOH*GI67P;)=Ao5oceP!0!p4(Z$?19G HBnkikn^Nxw literal 0 HcmV?d00001 diff --git a/docs/doxygen/assets/fonts/roboto-v18-latin-regular.eot b/docs/doxygen/assets/fonts/roboto-v18-latin-regular.eot new file mode 100644 index 0000000000000000000000000000000000000000..a0780d6e3ffaa2fa65fb6aa672f334da5a91b3a6 GIT binary patch literal 17405 zcmZ6uRZtvUv@AThySux)!@%I~E`z&Ea0YjRL$Kf$+&#FvLvV-S79c?GcmDeCdAMs; z*Y57>T6?|hhy4Kp0EGSn^nVQt_@DFt78D>E>VLShIs*Uz`7iRn^&JX8`9A{sizWO2 zn*U2s0h$0;fW?3C`VRmA`hVIQU<>dDI04K79{)M?0Nwu_4}d4Y{=bCFf5W%|>;NtR z4?qAQ^8YE$|C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r&=U+rVq*K&N0)mRiepXDi_D3>i`Jldpt>+tAUA)$q=D_BK{ zoV=8+LvRABh~Y!w0&c&qXno0dS%=U-&hbjYc1gufKl603VSaY@?SN4#wb)btim+Px zg*9qxh+(D=PlqX$zmnX}{cetAeLp9TJB5$FrH6#wHq#1*CGD*ziISvhT*!pT*9U5^IER9z_udRVC(J7BCHVu@q@shSe ziz33wk;1vPS)M2A6 z#sSa}#*NUUxi?})W%no}yY}Uw_LTGFCgo+*Cia{YJ@_7od)t8gyp#H&zRH zixKH1R!-GOrEo~=SynpydjirV9m~Mq_N*ZiPss%wsO!qs$!2vUX?R- zDM*n0Q$fP_HOQG`yT)(+;}D zf389BL$=|!#p{}DaOVwJ|0kCNX#9(-%h0;T!B{mG z(n@FIzNWzx_Jp*l8UXUf&-b7ur6<*=KzAN?chxzOE~5Wl+D=GyI^zAW$R9nAap%bp?L{4?E=E}*LQb|;pTh-kwT9KV zPYA+$CIlI$WS+L==+KQPcH+V=L@z`86js1+fc0Og7G=L7aoK>`^#sR>^nAc@yY@y_r7ILYqWXG`z65_q=g!)WE&M>J1jz>YIz z6ZA$)nQ61v;Nk3b*};|&vKX=Y>>>RfxD3|gcqMumDUY%cK-ey;uP&GI2m(TZMDKy5 zN;jQynSN?((1CRg+xpqDg=d!2NI+wrp`G|+&{uK5VJxoP8yn!o1qKl?>JiLAMG6?- zsfINf1w;g$ZI!b!zUkE)S8wOSlJ}y#T9D)cyGbWe$ZBtg8KddPg|t{cr>szPvZQcZ z50r!VpagyoA8|;rn6;P0Tkt(9?DjyAoD12$YSQ9|ZPF63EO%4=QbSsn8=H z|0d9m2zUwb)iZ0!#`S9+WLqc-n$XD)e{pF;nCt#2vzv5)++(?hW zP+ZkHuVhVyUg&{V6o5HZk|E#vk6RL4euJJ_^ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/assets/fonts/roboto-v18-latin-regular.ttf b/docs/doxygen/assets/fonts/roboto-v18-latin-regular.ttf new file mode 100644 index 0000000000000000000000000000000000000000..b91bf3f7e31942ea4c6b0f0fb68bf1bab8d76d6f GIT binary patch literal 35408 zcmbq+2Y3@lxAx5LN^-a43K+0#flYU}!8AkYy<;HsZi?w(ddFaT?fdnU{hk&*E-Oy%BvUjS|a?p15Z3 zn@9E?F|bVMT1LQEfal{zWsV(ZA3*@yltlJ?)R=*z-W&At0wI&kc;1}o*fX&bFeDN^ z@gzRPpNy7$j3!e+Evt{wN($Lt&-b2u?^{T$q;a}chzZLT%Gc}0F9(qlmJ$Ud#u9wfBvX6SlmmjQxG1t%M&)B$#2vdY;qSQpi2%1DA#7ee0!s%q?7bTzi zJQ74jp@Pk(v%dU5XRu8ZCcZKWlWe_&UfDt~B9QI&zvvWR10NFm7T~-AoHu~W)$6QY zRnsGGh5gx0rg{N@#>P>Lm>?!5$A<*zBco`K-M*h)NEu$U=I|7{NeX`XVfDIoyVtHw z@Re*SK(Oc;Re6%q#45(ff|tm!B*a(^g;vpM^(aJfq9rgv$96Qhd?sB?{n%bNN!dt$ z$!0s0G!cbd2fSebUGxeT6^VQ4Pr!=RsPEf-TNmxv{` zvPy;4a=f{)_b#-0$K-mrJoPqO{czK04JfpF7_C7(b4a0;7_FuFo${;(5rE#36cHGK zlpwN{5DX+CS#T90*pwITmbH6MJsYE0%5_-QfqHaU-r>t9jUT*fw|p!0Xso=T8+gw*d1_UT#6={lr4Z@K5bSBR z`V_Lgk?nH>sk6Qypwcdvkw$BHp%wcmw$H8Xe1v)>Mny+OB_$@OBqaoggalg>qb!m7 z;Ghr*7eRVMuq6qP6M{k#;*-VnSsT9k{N(O6dyXHQKW5_ec{FZ+`!7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4h7`~bV;+FVP zjwz92O5&Ij(Z(zyyeob_m_ySIHDuJ`;es^}jx}FydtilY{MZ`z%<5P{Rsw#8M-#_m z5XYm5<1vWiF$n)9_%ZS@JnA_f1&%?1W6+ah(3@k>0Q|Al7Z~nDjynk+u4jOU(Vz#O zF#BaO!|Z>sU#c*D1HH?R_nF1QsL#-#dt)^pU6iKqNcRsyqibS_t-+m(PT{eY2~BS_SsF@5`!YQu*P?n{#Sz7F3v8##W&80cnd zNzB$3kWeB@X0=ei!LFD+r5+iydbDjk@IDHd`^1rp)jJIdmLh-tK1ynV|L@*`>((xL z%DUwFfahsP-b0>txX<)4_AOQlMJa5hd)Og3Q}4l^2L)1i2vk^@r6<4(0lyvD2@k0X zwF*NWw83ty*02++ne4^iChq4RZI(wZOF$p?BL8pef!8V)1AEjP7&Zb&EH*Q20q%|i MojfE0EQf#q0LFnShX4Qo literal 0 HcmV?d00001 diff --git a/docs/doxygen/assets/fonts/roboto-v18-latin-regular.woff b/docs/doxygen/assets/fonts/roboto-v18-latin-regular.woff new file mode 100644 index 0000000000000000000000000000000000000000..92dfacc618f920a9dbf9cbbb844fb0d77072e37c GIT binary patch literal 19824 zcmYgW1B`AxwEf1OJGObpwr$(i9p15R+qP}nwrzXv_|5;4m%Qezp6r#i+ufa;Opry~E{y?Ehu{v;Kb(6BZE#0DuyIII$lXgZY8gipk3<{cxKA09YRY z0NdO1Z`WK*NktF0=vaQx>GDs%!py+o#}}6WM+5u6 zfCM0$S-F}1n9=|MClvtj$2Tve4948p+7$p0{Q!AivE`42*xc-5;CvKYaX| zcQ^kbe};weW8?pT1iBqO%G}!V$4`tM007qciLbeBUDe9U*62qkk@^$I&zOO>`ErS4 ztqoj%Vv%zE@gw*TAb229HU`!vKiq%0n)=Z>VySQ-*x5S#XrzDo1|a{Z`?dxc+u57^ z_)7ou19Pz3;6c=`-lb%_fJbC`ZikgL ztYVJn+Mz`t9*B>v?mi;Va7E1hqd-LVkBVBkuYriK;{u-$u@$xjtpLp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q)?faYML*2}p1YwS}@X&F0}Vp!^ybgCXxK8jj93+)sI zEyuO9c(f+BT%^${JUc)^d{P((>tvNvVSG}*z)?C#K^Jq8F$;L)C;->f1}uFqq}m}q z;m+0%r|TA8<>;8BbmEIa6FVYh-Sbh}Q($*;86)`lrHCtjtE^vhE=PXTgiDnvt7-ln zCT*H>u3km?Pi7nP%0qg2NGmfXHA!t9&`(}v@kewXN~|`CHN}5yu$#)Prke1&1-~S& zpBv9F8a&YnS;(=3`MwM!T^iA&e3h~Mg#76A*MSIz0k0SUDrY3OL3+KQuwXVj33 zDkpM9K(5osX(w_Bc{nRieu%VWedHaKlWcv``iU>gM)e(!0myr4I%8@ zH-zC7lnLLL$pjlBNQvJNNm%3EH_iFv5ASAR2RGFNqPts|)rvq9}np%pAx}R&?G4<4d2H z%_hA-gR#*fsFU53I8%m~2p8)kfFBvsi56syKt2}2(7yb#%$U$;zycw1Y118Y;Ff!| zPWdVsHI4l&4V(o-5E^zC8sdhi2jkr8a*{%5fI17tA>#`&;yky6ahRjA>M3pqx6xOU zLgy=0{(Xvbn}pd!U%#~SN-QAMPa zEz8$J#E$*x5ZOn=j)Moy&Vsb#)KEAn%x%Y|qjXw?X9U_x*P=PV5QdHUEDijjp!gwe zK`3g-<5^4-WNV^_EX8n=$=khbU{rWstK(0d5tp&(WhJ>(%$#e3qBpj{I) O6y7R}gQBj@I4BA`2c0zl literal 0 HcmV?d00001 diff --git a/docs/doxygen/assets/images/404-error.svg b/docs/doxygen/assets/images/404-error.svg new file mode 100644 index 00000000000000..96feb223411034 --- /dev/null +++ b/docs/doxygen/assets/images/404-error.svg @@ -0,0 +1,123 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/assets/images/favicon.ico b/docs/doxygen/assets/images/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..d8d6993caa8245fbcc18c1904c4a95a0a36b6d5c GIT binary patch literal 1150 zcma)5K~EY{5Pk+yxap~945BSM* zJRWbFcQ`NJ`CLE8#;$QoEEa2$18^>!k5sGGV+OdtdUv=chu6K*Im+eo@sxiB%^6Fr zR=c0Sye<7#pT)_%)w!9VQmGg|-+j0K^_%+pFF)yb%J60+Gxh8Kg~Q>_a5$Xw54|$| zbJB0b8;mA7@I;H*zs|IN_HPw%c~7U)mLC|LpKlaNCX;5*IKQU= + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/assets/images/icon-accordion-arrow-dn-white.svg b/docs/doxygen/assets/images/icon-accordion-arrow-dn-white.svg new file mode 100644 index 00000000000000..f881d968739228 --- /dev/null +++ b/docs/doxygen/assets/images/icon-accordion-arrow-dn-white.svg @@ -0,0 +1,84 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/assets/images/icon-accordion-arrow-right-black.svg b/docs/doxygen/assets/images/icon-accordion-arrow-right-black.svg new file mode 100644 index 00000000000000..a7744ad033fdc5 --- /dev/null +++ b/docs/doxygen/assets/images/icon-accordion-arrow-right-black.svg @@ -0,0 +1,84 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/assets/images/icon-accordion-arrow-right-white.svg b/docs/doxygen/assets/images/icon-accordion-arrow-right-white.svg new file mode 100644 index 00000000000000..f22a04d749babd --- /dev/null +++ b/docs/doxygen/assets/images/icon-accordion-arrow-right-white.svg @@ -0,0 +1,84 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/assets/images/icon-accordion_arrow_dn--hover.svg b/docs/doxygen/assets/images/icon-accordion_arrow_dn--hover.svg new file mode 100644 index 00000000000000..b9188f654cc15a --- /dev/null +++ b/docs/doxygen/assets/images/icon-accordion_arrow_dn--hover.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/doxygen/assets/images/icon-accordion_arrow_dn--white.svg b/docs/doxygen/assets/images/icon-accordion_arrow_dn--white.svg new file mode 100644 index 00000000000000..0aa5a9cb067180 --- /dev/null +++ b/docs/doxygen/assets/images/icon-accordion_arrow_dn--white.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/doxygen/assets/images/icon-accordion_arrow_dn.svg b/docs/doxygen/assets/images/icon-accordion_arrow_dn.svg new file mode 100644 index 00000000000000..fcd70fe9f63aa6 --- /dev/null +++ b/docs/doxygen/assets/images/icon-accordion_arrow_dn.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/doxygen/assets/images/icon-accordion_arrow_right--hover.svg b/docs/doxygen/assets/images/icon-accordion_arrow_right--hover.svg new file mode 100644 index 00000000000000..51e203821515e0 --- /dev/null +++ b/docs/doxygen/assets/images/icon-accordion_arrow_right--hover.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/doxygen/assets/images/icon-accordion_arrow_right--white.svg b/docs/doxygen/assets/images/icon-accordion_arrow_right--white.svg new file mode 100644 index 00000000000000..8db35966088624 --- /dev/null +++ b/docs/doxygen/assets/images/icon-accordion_arrow_right--white.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/doxygen/assets/images/icon-accordion_arrow_right.svg b/docs/doxygen/assets/images/icon-accordion_arrow_right.svg new file mode 100644 index 00000000000000..d584ff26465b1e --- /dev/null +++ b/docs/doxygen/assets/images/icon-accordion_arrow_right.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/doxygen/assets/images/icon-arrow-down.svg b/docs/doxygen/assets/images/icon-arrow-down.svg new file mode 100644 index 00000000000000..3a27257202354d --- /dev/null +++ b/docs/doxygen/assets/images/icon-arrow-down.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/docs/doxygen/assets/images/icon-checkmark.svg b/docs/doxygen/assets/images/icon-checkmark.svg new file mode 100644 index 00000000000000..1d8d8d293c5412 --- /dev/null +++ b/docs/doxygen/assets/images/icon-checkmark.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/docs/doxygen/assets/images/icon-close_btn.svg b/docs/doxygen/assets/images/icon-close_btn.svg new file mode 100644 index 00000000000000..9d46da5f00050b --- /dev/null +++ b/docs/doxygen/assets/images/icon-close_btn.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/docs/doxygen/assets/images/icon-search-white.svg b/docs/doxygen/assets/images/icon-search-white.svg new file mode 100644 index 00000000000000..efcd933e1e0d02 --- /dev/null +++ b/docs/doxygen/assets/images/icon-search-white.svg @@ -0,0 +1,66 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/docs/doxygen/assets/images/icon-search.svg b/docs/doxygen/assets/images/icon-search.svg new file mode 100644 index 00000000000000..5042e336b60702 --- /dev/null +++ b/docs/doxygen/assets/images/icon-search.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/docs/doxygen/assets/images/icon-section-api-references.svg b/docs/doxygen/assets/images/icon-section-api-references.svg new file mode 100644 index 00000000000000..16df2b971d66f6 --- /dev/null +++ b/docs/doxygen/assets/images/icon-section-api-references.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/doxygen/assets/images/icon-section-getting-started.svg b/docs/doxygen/assets/images/icon-section-getting-started.svg new file mode 100644 index 00000000000000..a4738d1048f71c --- /dev/null +++ b/docs/doxygen/assets/images/icon-section-getting-started.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/doxygen/assets/images/icon-section-guides.svg b/docs/doxygen/assets/images/icon-section-guides.svg new file mode 100644 index 00000000000000..f40a3051126b9b --- /dev/null +++ b/docs/doxygen/assets/images/icon-section-guides.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/doxygen/assets/images/icon-section-how-tos.svg b/docs/doxygen/assets/images/icon-section-how-tos.svg new file mode 100644 index 00000000000000..368fc0209b359e --- /dev/null +++ b/docs/doxygen/assets/images/icon-section-how-tos.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/assets/images/icon-section-resources.svg b/docs/doxygen/assets/images/icon-section-resources.svg new file mode 100644 index 00000000000000..df49c596d6da71 --- /dev/null +++ b/docs/doxygen/assets/images/icon-section-resources.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/doxygen/assets/images/icon-teaser-eye.svg b/docs/doxygen/assets/images/icon-teaser-eye.svg new file mode 100644 index 00000000000000..63b729969e8b68 --- /dev/null +++ b/docs/doxygen/assets/images/icon-teaser-eye.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/doxygen/assets/images/icon-teaser-screen.svg b/docs/doxygen/assets/images/icon-teaser-screen.svg new file mode 100644 index 00000000000000..5562ef574669f4 --- /dev/null +++ b/docs/doxygen/assets/images/icon-teaser-screen.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/doxygen/assets/images/icon-teaser-spoke-diagram.svg b/docs/doxygen/assets/images/icon-teaser-spoke-diagram.svg new file mode 100644 index 00000000000000..1a7cc71453d03e --- /dev/null +++ b/docs/doxygen/assets/images/icon-teaser-spoke-diagram.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/docs/doxygen/assets/images/int-openvino-wht.svg b/docs/doxygen/assets/images/int-openvino-wht.svg new file mode 100644 index 00000000000000..300620df3b2bf3 --- /dev/null +++ b/docs/doxygen/assets/images/int-openvino-wht.svg @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/assets/images/logo-openvino.svg b/docs/doxygen/assets/images/logo-openvino.svg new file mode 100644 index 00000000000000..213ef7835adc59 --- /dev/null +++ b/docs/doxygen/assets/images/logo-openvino.svg @@ -0,0 +1,36 @@ + + + + + + + + + \ No newline at end of file diff --git a/docs/doxygen/assets/jquery-2.2.4.min.js b/docs/doxygen/assets/jquery-2.2.4.min.js new file mode 100644 index 00000000000000..5c82cc00e72caf --- /dev/null +++ b/docs/doxygen/assets/jquery-2.2.4.min.js @@ -0,0 +1,4 @@ +/*! jQuery v2.2.4 | (c) jQuery Foundation | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="2.2.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isPlainObject:function(a){var b;if("object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;if(a.constructor&&!k.call(a,"constructor")&&!k.call(a.constructor.prototype||{},"isPrototypeOf"))return!1;for(b in a);return void 0===b||k.call(a,b)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=d.createElement("script"),b.text=a,d.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:h.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(d=e.call(arguments,2),f=function(){return a.apply(b||this,d.concat(e.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fa.selectors={cacheLength:50,createPseudo:ha,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fa.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(P," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Y.test(a.nodeName)},input:function(a){return X.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return h.call(b,a)>-1!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&f.parentNode&&(this.length=1,this[0]=f),this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?void 0!==c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=w.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?h.call(n(a),this[0]):h.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(E[a]||n.uniqueSort(e),D.test(a)&&e.reverse()),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.removeEventListener("DOMContentLoaded",J),a.removeEventListener("load",J),n.ready()}n.ready.promise=function(b){return I||(I=n.Deferred(),"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(n.ready):(d.addEventListener("DOMContentLoaded",J),a.addEventListener("load",J))),I.promise(b)},n.ready.promise();var K=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)K(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},L=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function M(){this.expando=n.expando+M.uid++}M.uid=1,M.prototype={register:function(a,b){var c=b||{};return a.nodeType?a[this.expando]=c:Object.defineProperty(a,this.expando,{value:c,writable:!0,configurable:!0}),a[this.expando]},cache:function(a){if(!L(a))return{};var b=a[this.expando];return b||(b={},L(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[b]=c;else for(d in b)e[d]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=a[this.expando];if(void 0!==f){if(void 0===b)this.register(a);else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in f?d=[b,e]:(d=e,d=d in f?[d]:d.match(G)||[])),c=d.length;while(c--)delete f[d[c]]}(void 0===b||n.isEmptyObject(f))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!n.isEmptyObject(b)}};var N=new M,O=new M,P=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Q=/[A-Z]/g;function R(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Q,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:P.test(c)?n.parseJSON(c):c; +}catch(e){}O.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return O.hasData(a)||N.hasData(a)},data:function(a,b,c){return O.access(a,b,c)},removeData:function(a,b){O.remove(a,b)},_data:function(a,b,c){return N.access(a,b,c)},_removeData:function(a,b){N.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=O.get(f),1===f.nodeType&&!N.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),R(f,d,e[d])));N.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){O.set(this,a)}):K(this,function(b){var c,d;if(f&&void 0===b){if(c=O.get(f,a)||O.get(f,a.replace(Q,"-$&").toLowerCase()),void 0!==c)return c;if(d=n.camelCase(a),c=O.get(f,d),void 0!==c)return c;if(c=R(f,d,void 0),void 0!==c)return c}else d=n.camelCase(a),this.each(function(){var c=O.get(this,d);O.set(this,d,b),a.indexOf("-")>-1&&void 0!==c&&O.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){O.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=N.get(a,b),c&&(!d||n.isArray(c)?d=N.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return N.get(a,c)||N.access(a,c,{empty:n.Callbacks("once memory").add(function(){N.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length",""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};$.optgroup=$.option,$.tbody=$.tfoot=$.colgroup=$.caption=$.thead,$.th=$.td;function _(a,b){var c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function aa(a,b){for(var c=0,d=a.length;d>c;c++)N.set(a[c],"globalEval",!b||N.get(b[c],"globalEval"))}var ba=/<|&#?\w+;/;function ca(a,b,c,d,e){for(var f,g,h,i,j,k,l=b.createDocumentFragment(),m=[],o=0,p=a.length;p>o;o++)if(f=a[o],f||0===f)if("object"===n.type(f))n.merge(m,f.nodeType?[f]:f);else if(ba.test(f)){g=g||l.appendChild(b.createElement("div")),h=(Y.exec(f)||["",""])[1].toLowerCase(),i=$[h]||$._default,g.innerHTML=i[1]+n.htmlPrefilter(f)+i[2],k=i[0];while(k--)g=g.lastChild;n.merge(m,g.childNodes),g=l.firstChild,g.textContent=""}else m.push(b.createTextNode(f));l.textContent="",o=0;while(f=m[o++])if(d&&n.inArray(f,d)>-1)e&&e.push(f);else if(j=n.contains(f.ownerDocument,f),g=_(l.appendChild(f),"script"),j&&aa(g),c){k=0;while(f=g[k++])Z.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var da=/^key/,ea=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,fa=/^([^.]*)(?:\.(.+)|)/;function ga(){return!0}function ha(){return!1}function ia(){try{return d.activeElement}catch(a){}}function ja(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)ja(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=ha;else if(!e)return a;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return"undefined"!=typeof n&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(G)||[""],j=b.length;while(j--)h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.hasData(a)&&N.get(a);if(r&&(i=r.events)){b=(b||"").match(G)||[""],j=b.length;while(j--)if(h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&N.remove(a,"handle events")}},dispatch:function(a){a=n.event.fix(a);var b,c,d,f,g,h=[],i=e.call(arguments),j=(N.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())a.rnamespace&&!a.rnamespace.test(g.namespace)||(a.handleObj=g,a.data=g.data,d=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!==this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>-1:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,la=/\s*$/g;function pa(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function qa(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function ra(a){var b=na.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function sa(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(N.hasData(a)&&(f=N.access(a),g=N.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}O.hasData(a)&&(h=O.access(a),i=n.extend({},h),O.set(b,i))}}function ta(a,b){var c=b.nodeName.toLowerCase();"input"===c&&X.test(a.type)?b.checked=a.checked:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}function ua(a,b,c,d){b=f.apply([],b);var e,g,h,i,j,k,m=0,o=a.length,p=o-1,q=b[0],r=n.isFunction(q);if(r||o>1&&"string"==typeof q&&!l.checkClone&&ma.test(q))return a.each(function(e){var f=a.eq(e);r&&(b[0]=q.call(this,e,f.html())),ua(f,b,c,d)});if(o&&(e=ca(b,a[0].ownerDocument,!1,a,d),g=e.firstChild,1===e.childNodes.length&&(e=g),g||d)){for(h=n.map(_(e,"script"),qa),i=h.length;o>m;m++)j=e,m!==p&&(j=n.clone(j,!0,!0),i&&n.merge(h,_(j,"script"))),c.call(a[m],j,m);if(i)for(k=h[h.length-1].ownerDocument,n.map(h,ra),m=0;i>m;m++)j=h[m],Z.test(j.type||"")&&!N.access(j,"globalEval")&&n.contains(k,j)&&(j.src?n._evalUrl&&n._evalUrl(j.src):n.globalEval(j.textContent.replace(oa,"")))}return a}function va(a,b,c){for(var d,e=b?n.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||n.cleanData(_(d)),d.parentNode&&(c&&n.contains(d.ownerDocument,d)&&aa(_(d,"script")),d.parentNode.removeChild(d));return a}n.extend({htmlPrefilter:function(a){return a.replace(ka,"<$1>")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=_(h),f=_(a),d=0,e=f.length;e>d;d++)ta(f[d],g[d]);if(b)if(c)for(f=f||_(a),g=g||_(h),d=0,e=f.length;e>d;d++)sa(f[d],g[d]);else sa(a,h);return g=_(h,"script"),g.length>0&&aa(g,!i&&_(a,"script")),h},cleanData:function(a){for(var b,c,d,e=n.event.special,f=0;void 0!==(c=a[f]);f++)if(L(c)){if(b=c[N.expando]){if(b.events)for(d in b.events)e[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);c[N.expando]=void 0}c[O.expando]&&(c[O.expando]=void 0)}}}),n.fn.extend({domManip:ua,detach:function(a){return va(this,a,!0)},remove:function(a){return va(this,a)},text:function(a){return K(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return ua(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=pa(this,a);b.appendChild(a)}})},prepend:function(){return ua(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=pa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return ua(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return ua(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(_(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return K(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!la.test(a)&&!$[(Y.exec(a)||["",""])[1].toLowerCase()]){a=n.htmlPrefilter(a);try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(_(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return ua(this,arguments,function(b){var c=this.parentNode;n.inArray(this,a)<0&&(n.cleanData(_(this)),c&&c.replaceChild(b,this))},a)}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),f=e.length-1,h=0;f>=h;h++)c=h===f?this:this.clone(!0),n(e[h])[b](c),g.apply(d,c.get());return this.pushStack(d)}});var wa,xa={HTML:"block",BODY:"block"};function ya(a,b){var c=n(b.createElement(a)).appendTo(b.body),d=n.css(c[0],"display");return c.detach(),d}function za(a){var b=d,c=xa[a];return c||(c=ya(a,b),"none"!==c&&c||(wa=(wa||n("

a#r}H5>ShMWRCs`l@G<1+SAtKhD*S4k~L(ukExqZnYW`=u7~)b zjjbbvAliHW%`fqhMbys_B+cjlrO&Rzryp?VgXId2*AI&=4&}U<1(ze#66O>5lJqYw zVNQI5vrNt;x(*jk^YPVRi^Hvw3a!Su*j?o*xF)W)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}XG^&*mvF0$6`b#?yIGMoSPv!0E_U;vC${;7a)SKU( za%ktJ)PYn2b*w%e^^vS>-0u}EJP$~&OFw95LI#*{gPJtYD3h~DVbK<61M zrPkd_2iMde%&JTJr=RF?_+pX87ecuw6vE1V%me3uB7~k@OH@TGEqAnwXA86ZMe~87#z4lZI}{XQlL1cmJ5Bbcu?^jJ44!B|H1AE3*R=<0+<6WolF~$XB2Wz@JV4K$sArLXd7^p#V8O320ni zHKa-v(JG+_5UEy3t5PihOD%(3`eGp+fH_>Hz~L0Rishx#OV5DP&SyU3YT(W;C;D1k=k29-p5m=o-Ym#S7_orvxr zc{r7-TCo_xf`_c*S}J>OSBb1usuzV`y3zAb>m@iuQ^z+*dbJVx-W4EG6!-bS28mRC z+9kbqq&sAH*8>EUCokT7z`!9Oq4)xzVLlO)iO+QZv5qKE&}U;ps_64ERf@>&FAW_7 z6AK#$7Z0C+kce0k$){%0)5gXOnPi`yNmq{tTO*q`Y8E#5u5&K9`dOL!UdVg>8+griJLG%6 z*d4drR^XL4x)>Q0DpsV#h*IUsRH#&~iiz2w9?UZtiRYeK8a3YwR+HD>I%L{}o$mVE zJ-h6-&wi)uvDaxGwmN3gkx04eohip-GKIth6jG#KEKg0fULEg!`ZVyV$P6`oocYol z-_5JB^=+~4e|vLp>ucKN8|!YwjjPL7OYeR|Y>98;pJ&GPkKZL~9DBKUxOs#A`|$e@ zBs&C(J!NMYw%2s~z4SZYJbe%OG_n?i!c{G5JU2C;>=G)q)^dMgsM<|j0RR91hvkYe literal 0 HcmV?d00001 diff --git a/docs/doxygen/assets/fonts/Lato/lato-v16-latin-700italic.eot b/docs/doxygen/assets/fonts/Lato/lato-v16-latin-700italic.eot new file mode 100644 index 0000000000000000000000000000000000000000..1ab37ef7ba299a74418c5548603de652d587c486 GIT binary patch literal 27882 zcmZ^~bx<6<7dE=PEU@^pxVyW%yDu)q-JKRF#bt4KDDLj=uEmR$0>#}*p?crno$t$b|6kA4|G)hL0J6GD@c(PL|F4P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Y=x=MSZf{|1VWtHpszw3{g@$^Cfl3? z2V3W~tZagHq}2ZCgyyJbnh-IPwpF;9_MOHj`f@sSos-;s>RMpa^n$!P;ef;}uYaA9 zkE)zK&;s>6NrT|c35+iGXKi3N7J{OuxY3h1r z;DUFZ7Nt4l!Ki!8Bg6w$uDRF5ni3ES?6JfE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/doxygen/assets/fonts/Lato/lato-v16-latin-700italic.ttf b/docs/doxygen/assets/fonts/Lato/lato-v16-latin-700italic.ttf new file mode 100644 index 0000000000000000000000000000000000000000..96b4f8234749142369f3db9e73951605d468a5b9 GIT binary patch literal 62308 zcmce<2Yg%A**|{Iy}BBfELqmHWXY1XY{`~~yr(=9kJuRw*?STave+SEl(3;tHUUZ* zDbPh|87-8yZ(F)3^rd~pE`2DR7=baPKeZAx+LHNZk{7!D(wPnYi<$KbC@Z%0a(7wH8 z-QHb-NkH8<@5g)7mhBgAey-sg^96yK1mOn@w{BXu@#ydW`c*-AsUPo~w&FpN)|?Q8 z|D^uITX&pu!IDQ>=ioiYB%QZ?=Z1B^sDI>nL3r^}wDBK1)?KiRy{Y?e{9cRlfwR}` z*wkG;F^TcqF9_mOyLRq9XUW@zhXmn`rT9ItYtN=#hjq8P@IH+4BY;61fGCv@3sIp> z=n{H`OxoGolkV>7>}YRptWHEi0l&3KBNpfqBag3{zck$^Fi~KBK@yoLv3h}NM5d`l zW1=L849#c+S+9}lo57&P90aY_SSIN8I{L2DnREezcjWO+XsT!SrnG`V&>93ZFk7R! zhAg^(-kTo&NNwnJdO--~21R2F8kQ}4yd`1lVySw+=&+kL78Z&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